Nemo  2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
updaterservices.h
Go to the documentation of this file.
1 
30 #ifndef UPDATERSERVICES_H
31 #define UPDATERSERVICES_H
32 
33 #include <map>
34 #include <list>
35 #include "service.h"
36 #include "param.h"
37 
38 using namespace std;
39 
40 class SimComponent;
64 class UpdaterServices : public Service {
65 
66 private:
67 
68  map< unsigned int, list< Param* > > _paramUpdater;
69  map< unsigned int, list< ParamUpdaterBase* > > _componentUpdater;
70  list< ParamUpdaterBase* > _updaters;
71 
72 public:
73 
75  virtual ~UpdaterServices () {reset();}
76 
77  virtual bool init ();
78  virtual void notify () {}
80  virtual void notify (unsigned int generation);
82  virtual void load ( SimComponent* sc );
84  virtual void attach ( Handler* H );
86  virtual void reset();
88  void update_params (unsigned int generation);
90  void update_components (unsigned int generation);
92  bool hasTemporals () {return !_paramUpdater.empty();}
93 };
94 
95 #endif
Service handler (an observer).
Definition: handler.h:36
Interface for the simulation services (files and stats).
Definition: service.h:43
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
Class to update the simulation components' state during a simulation.
Definition: updaterservices.h:64
list< ParamUpdaterBase * > _updaters
Definition: updaterservices.h:70
map< unsigned int, list< Param * > > _paramUpdater
Definition: updaterservices.h:68
map< unsigned int, list< ParamUpdaterBase * > > _componentUpdater
Definition: updaterservices.h:69
UpdaterServices()
Definition: updaterservices.h:74
virtual void notify()
Definition: updaterservices.h:78
virtual ~UpdaterServices()
Definition: updaterservices.h:75
bool hasTemporals()
Checks if any updater has been uploaded.
Definition: updaterservices.h:92

Generated for Nemo v2.4.0b by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR