YAPOG  0.0.1
Yet Another Pokemon Online Game
GameInputEntry.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_GAMEINPUTENTRY_HPP
2 # define YAPOG_GAMEINPUTENTRY_HPP
3 
4 # include "YAPOG/Macros.hpp"
6 
7 namespace yap
8 {
10  {
12 
13  public:
14 
15  GameInputEntry ();
16  virtual ~GameInputEntry ();
17 
18  bool IsActive () const;
19  bool IsActivated () const;
20  bool IsDeactivated () const;
21 
22  bool IsActive (const GuiEvent& guiEvent) const;
23  bool IsActivated (const GuiEvent& guiEvent) const;
24  bool IsDeactivated (const GuiEvent& guiEvent) const;
25 
26  void BeginUpdate ();
27  virtual void Update (const GuiEvent& guiEvent) = 0;
28  void EndUpdate ();
29 
30  protected:
31 
32  void Activate (bool isActive);
33 
34  private:
35 
38  virtual bool GuiEventIsCompatible (const GuiEvent& guiEvent) const = 0;
39 
40  bool isActive_;
42  };
43 } // namespace yap
44 
45 #endif // YAPOG_GAMEINPUTENTRY_HPP