Nemo  2.3.46
LCE_FileServicesNotifier Class Reference

Event used to notify all file handlers to update their state through the FileServices::notify() interface. More...

#include <servicenotifiers.h>

+ Inheritance diagram for LCE_FileServicesNotifier:
+ Collaboration diagram for LCE_FileServicesNotifier:

Public Member Functions

 LCE_FileServicesNotifier ()
 
virtual ~LCE_FileServicesNotifier ()
 
virtual void execute ()
 
virtual bool setParameters ()
 
virtual LifeCycleEventclone ()
 
virtual void loadFileServices (FileServices *loader)
 
virtual void loadStatServices (StatServices *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 loadUpdaters (UpdaterServices *loader)
 Loads the parameters and component updater onto the updater manager. More...
 
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

FileServices_service
 

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

Event used to notify all file handlers to update their state through the FileServices::notify() interface.

Constructor & Destructor Documentation

LCE_FileServicesNotifier::LCE_FileServicesNotifier ( )
inline

Referenced by clone().

76  : LifeCycleEvent("save_files",""), _service(0) { }
LifeCycleEvent(const char *name, const char *trait_link)
Cstor.
Definition: lifecycleevent.h:98
FileServices * _service
Definition: servicenotifiers.h:72
virtual LCE_FileServicesNotifier::~LCE_FileServicesNotifier ( )
inlinevirtual
77 { }

Member Function Documentation

virtual age_t LCE_FileServicesNotifier::addAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

88 {return 0;}
virtual LifeCycleEvent* LCE_FileServicesNotifier::clone ( )
inlinevirtual

Implements LifeCycleEvent.

References LCE_FileServicesNotifier().

82 {return new LCE_FileServicesNotifier();}
LCE_FileServicesNotifier()
Definition: servicenotifiers.h:75
void LCE_FileServicesNotifier::execute ( )
virtual

Implements LifeCycleEvent.

References _service, LifeCycleEvent::get_pop_ptr(), message(), and FileServices::notify().

63 {
64 #ifdef _DEBUG_
65  message("LCE_FileServicesNotifier::execute (gen: %i rpl: %i)\n",
66  this->get_pop_ptr()->getCurrentGeneration(),
67  this->get_pop_ptr()->getCurrentReplicate());
68 #endif
69  _service->notify();
70 }
void message(const char *message,...)
Definition: output.cc:40
virtual void notify()
Definition: fileservices.cc:159
virtual Metapop * get_pop_ptr()
Definition: lifecycleevent.h:174
FileServices * _service
Definition: servicenotifiers.h:72
virtual void LCE_FileServicesNotifier::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

85 {_service = loader;}
FileServices * _service
Definition: servicenotifiers.h:72
virtual void LCE_FileServicesNotifier::loadStatServices ( StatServices loader)
inlinevirtual

Implements SimComponent.

86 {}
virtual age_t LCE_FileServicesNotifier::removeAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

87 {return 0;}
virtual age_t LCE_FileServicesNotifier::requiredAgeClass ( )
inlinevirtual

Implements LifeCycleEvent.

89 {return 0;}
virtual bool LCE_FileServicesNotifier::setParameters ( )
inlinevirtual

Implements SimComponent.

80 {return true;}

Member Data Documentation

FileServices* LCE_FileServicesNotifier::_service
private

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