Version: 9.15.0
YACS::ENGINE::PyOptimizerAlgBase Class Reference

Base class factorizing common methods for python algorithms interfaces. More...

#include <PyOptimizerAlg.hxx>

Inheritance diagram for YACS::ENGINE::PyOptimizerAlgBase:
Collaboration diagram for YACS::ENGINE::PyOptimizerAlgBase:

Public Member Functions

virtual ~PyOptimizerAlgBase ()
 
virtual TypeCodegetTCForInProxy () const
 
virtual TypeCodegetTCForOutProxy () const
 
virtual TypeCodegetTCForAlgoInitProxy () const
 
virtual TypeCodegetTCForAlgoResultProxy () const
 
virtual void initializeProxy (const Any *input)
 
virtual void startProxy ()
 
virtual void takeDecisionProxy ()
 
virtual void finishProxy ()
 
virtual AnygetAlgoResultProxy ()
 
- Public Member Functions inherited from YACS::ENGINE::OptimizerAlgBase
virtual void setPool (Pool *pool)
 
virtual void setProc (Proc *proc)
 
virtual ProcgetProc ()
 
virtual bool hasError () const
 
virtual const std::string & getError () const
 
virtual void setError (const std::string &message)
 
void setNbOfBranches (int nbOfBranches)
 
int getNbOfBranches () const
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef () const
 

Protected Member Functions

 PyOptimizerAlgBase (Pool *pool)
 
- Protected Member Functions inherited from YACS::ENGINE::OptimizerAlgBase
 OptimizerAlgBase (Pool *pool)
 
virtual ~OptimizerAlgBase ()
 
virtual TypeCodegetTCForIn () const =0
 returns typecode of type expected as Input. OwnerShip of returned pointer is held by this. More...
 
virtual TypeCodegetTCForOut () const =0
 returns typecode of type expected as Output. OwnerShip of returned pointer is held by this. More...
 
virtual TypeCodegetTCForAlgoInit () const
 returns typecode of type expected for algo initialization. OwnerShip of returned pointer is held by this. More...
 
virtual TypeCodegetTCForAlgoResult () const
 returns typecode of type expected as algo result. OwnerShip of returned pointer is held by this. More...
 
virtual void initialize (const Any *input)
 
virtual void start ()=0
 
virtual void takeDecision ()=0
 Update _pool attribute before performing anything. More...
 
virtual void finish ()
 
virtual AnygetAlgoResult ()
 Called when optimization has succeed. More...
 
- Protected Member Functions inherited from YACS::ENGINE::RefCounter
 RefCounter ()
 
 RefCounter (const RefCounter &other)
 
virtual ~RefCounter ()
 

Additional Inherited Members

- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 
- Protected Attributes inherited from YACS::ENGINE::OptimizerAlgBase
Pool_pool
 
Proc_proc
 
std::string _errorMessage
 
int _nbOfBranches
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Detailed Description

Base class factorizing common methods for python algorithms interfaces.

Definition at line 32 of file PyOptimizerAlg.hxx.

Constructor & Destructor Documentation

◆ ~PyOptimizerAlgBase()

PyOptimizerAlgBase::~PyOptimizerAlgBase ( )
virtual

Definition at line 50 of file PyOptimizerAlg.cxx.

51 {
52 }

◆ PyOptimizerAlgBase()

PyOptimizerAlgBase::PyOptimizerAlgBase ( Pool pool)
protected

Definition at line 45 of file PyOptimizerAlg.cxx.

46  : OptimizerAlgBase(pool)
47 {
48 }

Member Function Documentation

◆ finishProxy()

void PyOptimizerAlgBase::finishProxy ( )
virtual

◆ getAlgoResultProxy()

Any * PyOptimizerAlgBase::getAlgoResultProxy ( )
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 102 of file PyOptimizerAlg.cxx.

103 {
104  GILState gs;
106 }
virtual Any * getAlgoResultProxy()

References YACS::ENGINE::OptimizerAlgBase::getAlgoResultProxy().

◆ getTCForAlgoInitProxy()

TypeCode * PyOptimizerAlgBase::getTCForAlgoInitProxy ( ) const
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 90 of file PyOptimizerAlg.cxx.

91 {
92  GILState gs;
94 }
virtual TypeCode * getTCForAlgoInitProxy() const

References YACS::ENGINE::OptimizerAlgBase::getTCForAlgoInitProxy().

◆ getTCForAlgoResultProxy()

TypeCode * PyOptimizerAlgBase::getTCForAlgoResultProxy ( ) const
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 96 of file PyOptimizerAlg.cxx.

97 {
98  GILState gs;
100 }
virtual TypeCode * getTCForAlgoResultProxy() const

References YACS::ENGINE::OptimizerAlgBase::getTCForAlgoResultProxy().

◆ getTCForInProxy()

TypeCode * PyOptimizerAlgBase::getTCForInProxy ( ) const
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 78 of file PyOptimizerAlg.cxx.

79 {
80  GILState gs;
82 }
virtual TypeCode * getTCForInProxy() const

References YACS::ENGINE::OptimizerAlgBase::getTCForInProxy().

◆ getTCForOutProxy()

TypeCode * PyOptimizerAlgBase::getTCForOutProxy ( ) const
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 84 of file PyOptimizerAlg.cxx.

85 {
86  GILState gs;
88 }
virtual TypeCode * getTCForOutProxy() const

References YACS::ENGINE::OptimizerAlgBase::getTCForOutProxy().

◆ initializeProxy()

void PyOptimizerAlgBase::initializeProxy ( const Any input)
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Definition at line 72 of file PyOptimizerAlg.cxx.

73 {
74  GILState gs;
76 }
virtual void initializeProxy(const Any *input)

References YACS::ENGINE::OptimizerAlgBase::initializeProxy().

◆ startProxy()

void PyOptimizerAlgBase::startProxy ( )
virtual

Reimplemented from YACS::ENGINE::OptimizerAlgBase.

Reimplemented in YACS::ENGINE::PyOptimizerAlgASync.

Definition at line 54 of file PyOptimizerAlg.cxx.

55 {
56  GILState gs;
58 }

References YACS::ENGINE::OptimizerAlgBase::startProxy().

◆ takeDecisionProxy()

void PyOptimizerAlgBase::takeDecisionProxy ( )
virtual

The documentation for this class was generated from the following files: