|
Nemo
2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Implementation of the ParamUpdaterBase interface. More...
#include <param.h>
Inheritance diagram for ParamUpdater< SC >:
Collaboration diagram for ParamUpdater< SC >: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... | |
Public Member Functions inherited from ParamUpdaterBase | |
| ParamUpdaterBase () | |
| ParamUpdaterBase (const ParamUpdaterBase &PU) | |
| virtual | ~ParamUpdaterBase () |
| virtual void | update () |
| 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... | |
Public Member Functions inherited from Handler | |
| virtual | ~Handler () |
Private Attributes | |
| bool(SC::* | _myUpdaterFunction )(void) |
| SC * | _myComponent |
Additional Inherited Members | |
Public Types inherited from ParamUpdaterBase | |
| typedef list< Param * >::iterator | PIT |
Protected Attributes inherited from ParamUpdaterBase | |
| 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 |
|
inline |
References ParamUpdater< SC >::_myComponent, ParamUpdater< SC >::_myUpdaterFunction, and ParamUpdaterBase::_params.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Sets the pointer to the SimComponent.
It is deduced from the parameters' owner.
Implements ParamUpdaterBase.
|
inline |
Sets the pointer to the updating function.
|
inlinevirtual |
Calls the SimComponent's updating function using its pointer.
Implements ParamUpdaterBase.
|
private |
Referenced by ParamUpdater< SC >::ParamUpdater().
|
private |
Referenced by ParamUpdater< SC >::ParamUpdater().
1.9.1 -- Nemo is hosted on