NRE_MotionEvent.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include <Header/NRE_Math.hpp>
13 
14  #include "../../Input/Buttons/NRE_Buttons.hpp"
15 
20  namespace NRE {
25  namespace Event {
26 
31  class MotionEvent {
32  private: //Fields
33  ButtonCode code;
34  Math::Point2D<unsigned int> position;
36  public: // Methods
37  //## Constructor ##//
41  MotionEvent() = delete;
47  MotionEvent(ButtonCode c, Math::Point2D<unsigned int> const& pos);
48 
49  //## Copy-Constructor ##//
54  MotionEvent(MotionEvent const& e) = default;
55 
56  //## Move-Constructor ##//
61  MotionEvent(MotionEvent && e) = default;
62 
63  //## Deconstructor ##//
67  ~MotionEvent() = default;
68 
69  //## Getter ##//
73  ButtonCode getCode() const;
77  Math::Point2D<unsigned int> const& getPosition() const;
83  bool isCode(ButtonCode c) const;
84 
85  //## Assignment Operator ##//
91  MotionEvent& operator =(MotionEvent const& e) = default;
97  MotionEvent& operator =(MotionEvent && e) = default;
98 
99  //## Comparison Operator ##//
105  bool operator ==(MotionEvent const& e) const;
106  };
107  }
108  }
109 
110  #include "NRE_MotionEvent.tpp"
bool operator==(MotionEvent const &e) const
Event&#39;s API.
Manage a controller motion event.
Definition: NRE_MotionEvent.hpp:31
ButtonCode getCode() const
The NearlyRealEngine&#39;s global namespace.
bool isCode(ButtonCode c) const
ButtonCode
Definition: NRE_Buttons.hpp:27
Math::Point2D< unsigned int > const & getPosition() const
MotionEvent & operator=(MotionEvent const &e)=default