Nemo  2.4.0
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
service.h
Go to the documentation of this file.
1 
29 #ifndef SERVICE_H
30 #define SERVICE_H
31 
32 #include <string>
33 #include <list>
34 #include "handler.h"
35 
36 class SimComponent;
37 
42 class Service {
43 
44 public:
45 
46  Service( ) { }
47 
48  virtual ~Service( ) { }
50  virtual bool init ( ) = 0;
52  virtual void notify ( ) = 0;
54  virtual void load ( SimComponent* sc ) = 0;
56  virtual void attach ( Handler* h ) = 0;
58  virtual void reset ( ) = 0;
59 
60 };
61 
62 #endif //SERVICE_H
Service handler (an observer).
Definition: handler.h:35
Interface for the simulation services (files and stats).
Definition: service.h:42
virtual void attach(Handler *h)=0
Adds an observer to the list.
virtual void reset()=0
Clears the observers list.
virtual void notify()=0
Notifies all observers to update their state.
virtual ~Service()
Definition: service.h:48
Service()
Definition: service.h:46
virtual bool init()=0
Inits internals.
virtual void load(SimComponent *sc)=0
Interface used by a simulation component to load its obervers onto a service provider.
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:44
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