Nemo  2.3.46
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 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...

Private Attributes


Additional Inherited Members

- Protected Attributes inherited from LifeCycleEvent
std::string _event_name
 The param name to be read in the init file. More...
 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
 The parameters container. More...

Detailed Description

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

Constructor & Destructor Documentation

LCE_ParamUpdaterNotifier::LCE_ParamUpdaterNotifier ( )

Referenced by clone().

48 : LifeCycleEvent("param_updater",""), _manager(0) { }
LifeCycleEvent(const char *name, const char *trait_link)
Definition: lifecycleevent.h:98
UpdaterServices * _manager
Definition: servicenotifiers.h:44
virtual LCE_ParamUpdaterNotifier::~LCE_ParamUpdaterNotifier ( )
49 {}

Member Function Documentation

virtual age_t LCE_ParamUpdaterNotifier::addAgeClass ( )

Implements LifeCycleEvent.

62 {return 0;}
virtual LifeCycleEvent* LCE_ParamUpdaterNotifier::clone ( )

Implements LifeCycleEvent.

References LCE_ParamUpdaterNotifier().

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

Implements LifeCycleEvent.

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

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 }
void message(const char *message,...)
unsigned int getCurrentGeneration()
Definition: metapop.h:286
virtual void notify()
Definition: updaterservices.h:78
UpdaterServices * _manager
Definition: servicenotifiers.h:44
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
virtual Metapop * get_pop_ptr()
Definition: lifecycleevent.h:174
virtual void LCE_ParamUpdaterNotifier::loadFileServices ( FileServices loader)

Implements SimComponent.

58 {}
virtual void LCE_ParamUpdaterNotifier::loadStatServices ( StatServices loader)

Implements SimComponent.

59 {}
virtual void LCE_ParamUpdaterNotifier::loadUpdaters ( UpdaterServices loader)

Reimplemented from SimComponent.

60 {_manager = loader;}
UpdaterServices * _manager
Definition: servicenotifiers.h:44
virtual age_t LCE_ParamUpdaterNotifier::removeAgeClass ( )

Implements LifeCycleEvent.

61 {return 0;}
virtual age_t LCE_ParamUpdaterNotifier::requiredAgeClass ( )

Implements LifeCycleEvent.

63 {return 0;}
void LCE_ParamUpdaterNotifier::setManager ( UpdaterServices mng)

Referenced by SimRunner::init_components().

51 {_manager = mng;}
UpdaterServices * _manager
Definition: servicenotifiers.h:44
virtual bool LCE_ParamUpdaterNotifier::setParameters ( )

Implements SimComponent.

53 {return true;}

Member Data Documentation

UpdaterServices* LCE_ParamUpdaterNotifier::_manager

Referenced by execute().

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

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR