NRE_KeyEvent.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include "../../Input/Keys/NRE_Keys.hpp"
13 
18  namespace NRE {
23  namespace Event {
24 
29  class KeyEvent {
30  private: //Fields
31  KeyCode code;
33  public: // Methods
34  //## Constructor ##//
38  KeyEvent() = delete;
43  KeyEvent(KeyCode c);
44 
45  //## Copy-Constructor ##//
50  KeyEvent(KeyEvent const& e) = default;
51 
52  //## Move-Constructor ##//
57  KeyEvent(KeyEvent && e) = default;
58 
59  //## Deconstructor ##//
63  ~KeyEvent() = default;
64 
65  //## Getter ##//
69  inline KeyCode getCode() const;
75  inline bool isCode(KeyCode c) const;
76 
77  //## Assignment Operator ##//
83  KeyEvent& operator =(KeyEvent const& e) = default;
89  KeyEvent& operator =(KeyEvent && e) = default;
90  };
91  }
92  }
93 
94  #include "NRE_KeyEvent.tpp"
KeyCode
Definition: NRE_Keys.hpp:27
Manage a key event.
Definition: NRE_KeyEvent.hpp:29
Event's API.
KeyEvent & operator=(KeyEvent const &e)=default
bool isCode(KeyCode c) const
The NearlyRealEngine's global namespace.
KeyCode getCode() const