LoveBrains  1.0.0
a_observer.h
1 /*
2 ** iobserver.h for GAEngine in /home/robin_f/Programming/Git/CPP/GAEngine
3 **
4 ** Made by Guillaume ROBIN
5 ** Login <robin_f@epitech.eu>
6 **
7 ** Started on Mon Jul 20 18:23:32 2015 Guillaume ROBIN
8 ** Last update Fri Aug 21 16:26:18 2015 Guillaume ROBIN
9 */
10 
11 #ifndef A_OBSERVER_H_
12 # define A_OBSERVER_H_
13 
14 namespace GA
15 {
20  class AObserver
21  {
22  public:
23  enum class States { NONE, QUIT, REPORT };
24 
29  unsigned int id(void) const;
30 
35  States const& getState(void) const;
40  void Update(States state);
41 
42  protected:
43  States _state;
48  void setId(void);
49 
50  private:
51  unsigned int _id;
53  static unsigned int _iterator;
54  };
55 }
56 
57 #endif /* !A_OBSERVER_H_ */
unsigned int id(void) const
Return the ID of the observer.
Definition: a_observer.cc:23
States _state
Definition: a_observer.h:43
States const & getState(void) const
Return the state of the observer.
Definition: a_observer.cc:28
Contains the objects that define the GAEngine.
void setId(void)
Set the ID of the observer.
Definition: a_observer.cc:17
void Update(States state)
Update the observer.
Definition: a_observer.cc:33
Define the abstract class that allow to be an observer.
Definition: a_observer.h:20