Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
LCE_ParamUpdaterNotifier Class Reference

Calls the UpdaterServices to notify its components of a generation change. More...

#include <servicenotifiers.h>

+ Inheritance diagram for LCE_ParamUpdaterNotifier:
+ Collaboration diagram for LCE_ParamUpdaterNotifier:

Public Member Functions

 LCE_ParamUpdaterNotifier ()
 
virtual ~LCE_ParamUpdaterNotifier ()
 
void setManager (UpdaterServices *mng)
 
virtual void execute ()
 
virtual bool setParameters ()
 
virtual LifeCycleEventclone ()
 
virtual void loadFileServices (FileServices *loader)
 
virtual void loadStatServices (StatServices *loader)
 
virtual void loadUpdaters (UpdaterServices *loader)
 
virtual bool resetParameterFromSource (std::string param, SimComponent *cmpt)
 
virtual age_t removeAgeClass ()
 
virtual age_t addAgeClass ()
 
virtual age_t requiredAgeClass ()
 
- Public Member Functions inherited from LifeCycleEvent
 LifeCycleEvent (const char *name, const char *trait_link)
 Cstor. More...
 
virtual ~LifeCycleEvent ()
 
virtual void init (Metapop *popPtr)
 Sets the pointer to the current Metapop and the trait link if applicable. More...
 
virtual bool attach_trait (string trait)
 
virtual void set_paramset (std::string name, bool required, SimComponent *owner)
 
virtual void set_event_name (std::string &name)
 Set the name of the event (name of the ParamSet) and add the corresponding parameter to the set. More...
 
virtual void set_event_name (const char *name)
 
virtual string & get_event_name ()
 Accessor to the LCE's name. More...
 
virtual int get_rank ()
 Accessor to the LCE rank in the life cycle. More...
 
virtual void set_pop_ptr (Metapop *popPtr)
 Accessors for the population pointer. More...
 
virtual Metapopget_pop_ptr ()
 
- Public Member Functions inherited from SimComponent
 SimComponent ()
 
virtual ~SimComponent ()
 
virtual void set_paramset (ParamSet *paramset)
 Sets the ParamSet member. More...
 
virtual void set_paramsetFromCopy (const ParamSet &PSet)
 Reset the set of parameters from a another set. More...
 
virtual ParamSetget_paramset ()
 ParamSet accessor. More...
 
virtual void add_parameter (Param *param)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater)
 Interface to add a parameter and its updater to the set. More...
 
virtual Paramget_parameter (std::string name)
 Param getter. More...
 
virtual double get_parameter_value (std::string name)
 Param value getter. More...
 
virtual string get_name ()
 Returnd the name of the ParamSet, i.e. More...
 
virtual bool has_parameter (std::string name)
 Param getter. More...
 

Private Attributes

UpdaterServices_manager
 

Additional Inherited Members

- Protected Attributes inherited from LifeCycleEvent
std::string _event_name
 The param name to be read in the init file. More...
 
Metapop_popPtr
 The ptr to the current Metapop. More...
 
std::string _LCELinkedTraitType
 The name of the linked trait. More...
 
int _LCELinkedTraitIndex
 The index in the individual's trait table of the linked trait. More...
 
- Protected Attributes inherited from SimComponent
ParamSet_paramSet
 The parameters container. More...
 

Detailed Description

Calls the UpdaterServices to notify its components of a generation change.

Constructor & Destructor Documentation

◆ LCE_ParamUpdaterNotifier()

LCE_ParamUpdaterNotifier::LCE_ParamUpdaterNotifier ( )
inline
48: LifeCycleEvent("param_updater",""), _manager(0) { }
UpdaterServices * _manager
Definition: servicenotifiers.h:44
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73

Referenced by clone().

+ Here is the caller graph for this function:

◆ ~LCE_ParamUpdaterNotifier()

virtual LCE_ParamUpdaterNotifier::~LCE_ParamUpdaterNotifier ( )
inlinevirtual
49{}

Member Function Documentation

◆ addAgeClass()

virtual age_t LCE_ParamUpdaterNotifier::addAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

63{return 0;}

◆ clone()

virtual LifeCycleEvent * LCE_ParamUpdaterNotifier::clone ( )
inlinevirtual

Implements LifeCycleEvent.

55{return new LCE_ParamUpdaterNotifier();}
LCE_ParamUpdaterNotifier()
Definition: servicenotifiers.h:48

References LCE_ParamUpdaterNotifier().

◆ execute()

void LCE_ParamUpdaterNotifier::execute ( )
virtual

Implements LifeCycleEvent.

46{
47#ifdef _DEBUG_
48 message("LCE_ParamUpdaterNotifier::execute (gen: %i rpl: %i)\n",
49 this->get_pop_ptr()->getCurrentGeneration(),
50 this->get_pop_ptr()->getCurrentReplicate());
51#endif
53}
virtual Metapop * get_pop_ptr()
Definition: lifecycleevent.h:174
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
unsigned int getCurrentGeneration()
Definition: metapop.h:294
virtual void notify()
Definition: updaterservices.h:78
void message(const char *message,...)
Definition: output.cc:40

References _manager, LifeCycleEvent::_popPtr, LifeCycleEvent::get_pop_ptr(), Metapop::getCurrentGeneration(), message(), and UpdaterServices::notify().

◆ loadFileServices()

virtual void LCE_ParamUpdaterNotifier::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

58{}

◆ loadStatServices()

virtual void LCE_ParamUpdaterNotifier::loadStatServices ( StatServices loader)
inlinevirtual

Implements SimComponent.

59{}

◆ loadUpdaters()

virtual void LCE_ParamUpdaterNotifier::loadUpdaters ( UpdaterServices loader)
inlinevirtual

Reimplemented from SimComponent.

60{_manager = loader;}

References _manager.

◆ removeAgeClass()

virtual age_t LCE_ParamUpdaterNotifier::removeAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

62{return 0;}

◆ requiredAgeClass()

virtual age_t LCE_ParamUpdaterNotifier::requiredAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

64{return 0;}

◆ resetParameterFromSource()

virtual bool LCE_ParamUpdaterNotifier::resetParameterFromSource ( std::string  param,
SimComponent cmpt 
)
inlinevirtual

Implements SimComponent.

61{return false;}

◆ setManager()

void LCE_ParamUpdaterNotifier::setManager ( UpdaterServices mng)
inline
51{_manager = mng;}

References _manager.

Referenced by SimRunner::init_components().

+ Here is the caller graph for this function:

◆ setParameters()

virtual bool LCE_ParamUpdaterNotifier::setParameters ( )
inlinevirtual

Implements SimComponent.

53{return true;}

Member Data Documentation

◆ _manager

UpdaterServices* LCE_ParamUpdaterNotifier::_manager
private

Referenced by execute(), loadUpdaters(), and setManager().


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

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR