Nemo  2.2.0
Public Member Functions | Private Attributes
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:

List of all members.

Public Member Functions

 LCE_ParamUpdaterNotifier ()
virtual ~LCE_ParamUpdaterNotifier ()
void setManager (UpdaterServices *mng)
virtual void execute ()
 Execute the event on the pop.
virtual bool setParameters ()
 Default interface needed to initialize the component's variables from its input parameters value.
virtual LifeCycleEventclone ()
 Cloning interface.
virtual void loadFileServices (FileServices *loader)
 Loads the component's FileHandler onto the FileServices.
virtual void loadStatServices (StatServices *loader)
 Loads the component's StatHandler onto the StatServices.
virtual void loadUpdaters (UpdaterServices *loader)
 Loads the parameters and component updater onto the updater manager.
virtual age_t removeAgeClass ()
 Removes the returned age-class flag(s) from the current Metapop age-class flags.
virtual age_t addAgeClass ()
 Adds the returned age-class flag(s) to the current Metapop age-class flags.
virtual age_t requiredAgeClass ()
 Specifies what age-classes are required by the LCE to execute.

Private Attributes

UpdaterServices_manager

Detailed Description

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

Definition at line 41 of file servicenotifiers.h.


Constructor & Destructor Documentation

LCE_ParamUpdaterNotifier::LCE_ParamUpdaterNotifier ( ) [inline]

Definition at line 48 of file servicenotifiers.h.

Referenced by clone().

: LifeCycleEvent("param_updater",""), _manager(0) { }
virtual LCE_ParamUpdaterNotifier::~LCE_ParamUpdaterNotifier ( ) [inline, virtual]

Definition at line 49 of file servicenotifiers.h.

{}

Member Function Documentation

virtual age_t LCE_ParamUpdaterNotifier::addAgeClass ( ) [inline, virtual]

Adds the returned age-class flag(s) to the current Metapop age-class flags.

Implements LifeCycleEvent.

Definition at line 62 of file servicenotifiers.h.

{return 0;}
virtual LifeCycleEvent* LCE_ParamUpdaterNotifier::clone ( ) [inline, virtual]

Cloning interface.

Implements LifeCycleEvent.

Definition at line 55 of file servicenotifiers.h.

References LCE_ParamUpdaterNotifier().

{return new LCE_ParamUpdaterNotifier();}
void LCE_ParamUpdaterNotifier::execute ( ) [virtual]

Execute the event on the pop.

Implements LifeCycleEvent.

Definition at line 45 of file servicenotifiers.cc.

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

{
#ifdef _DEBUG_
  message("LCE_ParamUpdaterNotifier::execute (gen: %i rpl: %i)\n",
                  this->get_pop_ptr()->getCurrentGeneration(),
                  this->get_pop_ptr()->getCurrentReplicate());
#endif
  _manager->notify( _popPtr->getCurrentGeneration() );
}
virtual void LCE_ParamUpdaterNotifier::loadFileServices ( FileServices loader) [inline, virtual]

Loads the component's FileHandler onto the FileServices.

Parameters:
loaderthe file service

Implements SimComponent.

Definition at line 58 of file servicenotifiers.h.

{}
virtual void LCE_ParamUpdaterNotifier::loadStatServices ( StatServices loader) [inline, virtual]

Loads the component's StatHandler onto the StatServices.

Parameters:
loaderthe stat service

Implements SimComponent.

Definition at line 59 of file servicenotifiers.h.

{}
virtual void LCE_ParamUpdaterNotifier::loadUpdaters ( UpdaterServices loader) [inline, virtual]

Loads the parameters and component updater onto the updater manager.

Parameters:
loaderthe updater manager

Reimplemented from SimComponent.

Definition at line 60 of file servicenotifiers.h.

References _manager.

{_manager = loader;}
virtual age_t LCE_ParamUpdaterNotifier::removeAgeClass ( ) [inline, virtual]

Removes the returned age-class flag(s) from the current Metapop age-class flags.

Implements LifeCycleEvent.

Definition at line 61 of file servicenotifiers.h.

{return 0;}
virtual age_t LCE_ParamUpdaterNotifier::requiredAgeClass ( ) [inline, virtual]

Specifies what age-classes are required by the LCE to execute.

Implements LifeCycleEvent.

Definition at line 63 of file servicenotifiers.h.

{return 0;}
void LCE_ParamUpdaterNotifier::setManager ( UpdaterServices mng) [inline]

Definition at line 51 of file servicenotifiers.h.

References _manager.

Referenced by SimRunner::init_components().

{_manager = mng;}
virtual bool LCE_ParamUpdaterNotifier::setParameters ( ) [inline, virtual]

Default interface needed to initialize the component's variables from its input parameters value.

Formerly called 'init'.

Implements SimComponent.

Definition at line 53 of file servicenotifiers.h.

{return true;}

Member Data Documentation

Definition at line 44 of file servicenotifiers.h.

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


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

Generated for Nemo v2.2.0 by  doxygen 1.7.5.1 -- Nemo is hosted by  SourceForge.net Logo