Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Implementation of the ParamUpdaterBase interface. More...
#include <param.h>
Public Member Functions | |
ParamUpdater (bool(SC::*updateFuncPtr)(void)) | |
ParamUpdater (const ParamUpdater< SC > &PU) | |
virtual | ~ParamUpdater () |
virtual void | init () |
Sets the pointer to the SimComponent. More... | |
virtual bool | update (unsigned int generation) |
Calls the SimComponent's updating function using its pointer. More... | |
void | setFuncPtr (bool(SC::*updateFuncPtr)(void)) |
Sets the pointer to the updating function. More... | |
virtual SC * | getComponent () |
Accessor to the SimComponent. More... | |
![]() | |
ParamUpdaterBase () | |
ParamUpdaterBase (const ParamUpdaterBase &PU) | |
virtual | ~ParamUpdaterBase () |
virtual void | init ()=0 |
virtual void | update () |
virtual bool | update (unsigned int generation)=0 |
Updating procedure. More... | |
virtual SimComponent * | getComponent ()=0 |
virtual void | addParam (Param *param) |
Adds a parameter to the stack. More... | |
virtual void | reset () |
Clears the parameters stack. More... | |
list< Param * > | getParams () |
Returns the list of parameters. More... | |
![]() | |
virtual void | init ()=0 |
Inits state. More... | |
virtual void | update ()=0 |
Updates the handler state. More... | |
virtual | ~Handler () |
Private Attributes | |
bool(SC::* | _myUpdaterFunction )(void) |
SC * | _myComponent |
Additional Inherited Members | |
![]() | |
typedef list< Param * >::iterator | PIT |
![]() | |
list< Param * > | _params |
List of the parameters affected by this updater. More... | |
Implementation of the ParamUpdaterBase interface.
Stores the pointers to the SimComponent and its updating function. The template argument allows to pass SimComponent class type necessary to call the updating function. The updating procedure is as follow: the parameters are first updated with their generational values (if the generation matches) and the component is then updated using its updating function. The updating process is implemented in the UpdaterServices class. Several parameters may want to use the same updating function and thus this class allows to run that function only once, after updating all the parameters that use it.
|
inline |
References ParamUpdater< SC >::_myUpdaterFunction.
|
inline |
References ParamUpdater< SC >::_myComponent, ParamUpdater< SC >::_myUpdaterFunction, and ParamUpdaterBase::_params.
|
inlinevirtual |
References ParamUpdaterBase::_params.
|
inlinevirtual |
Accessor to the SimComponent.
Implements ParamUpdaterBase.
References ParamUpdater< SC >::_myComponent.
|
inlinevirtual |
Sets the pointer to the SimComponent.
It is deduced from the parameters' owner.
Implements ParamUpdaterBase.
References ParamUpdater< SC >::_myComponent, and ParamUpdaterBase::_params.
|
inline |
Sets the pointer to the updating function.
References ParamUpdater< SC >::_myUpdaterFunction.
|
inlinevirtual |
Calls the SimComponent's updating function using its pointer.
Implements ParamUpdaterBase.
References ParamUpdater< SC >::_myComponent, and ParamUpdater< SC >::_myUpdaterFunction.
|
private |
|
private |