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

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR