Nemo  2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
service.h
Go to the documentation of this file.
1 
30 #ifndef SERVICE_H
31 #define SERVICE_H
32 
33 #include <string>
34 #include <list>
35 #include "handler.h"
36 
37 class SimComponent;
38 
43 class Service {
44 
45 public:
46 
47  Service( ) { }
48 
49  virtual ~Service( ) { }
51  virtual bool init ( ) = 0;
53  virtual void notify ( ) = 0;
55  virtual void load ( SimComponent* sc ) = 0;
57  virtual void attach ( Handler* h ) = 0;
59  virtual void reset ( ) = 0;
60 
61 };
62 
63 #endif //SERVICE_H
Service handler (an observer).
Definition: handler.h:36
Interface for the simulation services (files and stats).
Definition: service.h:43
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:49
Service()
Definition: service.h:47
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:45

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