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

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR