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

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

Locations of visitors to this page
Catalogued on GSR