Changeset 10817 for code/branches/cpp11_v2/src/libraries/core/input
- Timestamp:
- Nov 19, 2015, 11:40:28 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/input
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/HalfAxis.h
r10768 r10817 56 56 using Button::execute; 57 57 bool execute(); 58 bool addParamCommand(ParamCommand* command) ;59 void clear() ;58 bool addParamCommand(ParamCommand* command) override; 59 void clear() override; 60 60 void reset(); 61 61 -
code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.h
r9667 r10817 66 66 { } 67 67 virtual ~InputBufferListenerTuple() { } 68 void callFunction() 68 void callFunction() override 69 69 { 70 70 (listener_->*function_)(); … … 165 165 { if (this->cursor_ > 0) { --this->cursor_; } } 166 166 167 void buttonPressed(const KeyEvent& evt) ;167 void buttonPressed(const KeyEvent& evt) override; 168 168 169 169 private: 170 170 bool charIsAllowed(const char& input); 171 171 172 void buttonHeld (const KeyEvent& evt) ;172 void buttonHeld (const KeyEvent& evt) override; 173 173 void processKey (const KeyEvent& evt); 174 174 175 void keyboardUpdated(float dt) ;175 void keyboardUpdated(float dt) override; 176 176 177 177 std::string buffer_; -
code/branches/cpp11_v2/src/libraries/core/input/InputCommands.h
r10768 r10817 76 76 { 77 77 public: 78 bool execute(float abs = 1.0f, float rel = 1.0f) ;79 CommandEvaluation* getEvaluation() ;80 virtual SimpleCommand* clone() { return new SimpleCommand(*this); }78 bool execute(float abs = 1.0f, float rel = 1.0f) override; 79 CommandEvaluation* getEvaluation() override; 80 virtual SimpleCommand* clone() override { return new SimpleCommand(*this); } 81 81 82 82 CommandEvaluation evaluation_; … … 104 104 public: 105 105 ParamCommand() : scale_(1.0f), paramCommand_(nullptr) { } 106 bool execute(float abs = 1.0f, float rel = 1.0f) ;107 CommandEvaluation* getEvaluation() ;108 virtual ParamCommand* clone() { return new ParamCommand(*this); }106 bool execute(float abs = 1.0f, float rel = 1.0f) override; 107 CommandEvaluation* getEvaluation() override; 108 virtual ParamCommand* clone() override { return new ParamCommand(*this); } 109 109 110 110 float scale_; -
code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h
r8858 r10817 153 153 154 154 //! Captures OIS events (which then get distributed to the derived class) and creates the button held events 155 void update(const Clock& time) 155 void update(const Clock& time) override 156 156 { 157 157 oisDevice_->capture(); … … 160 160 for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB) 161 161 for (unsigned int iS = 0; iS < inputStates_.size(); ++iS) 162 inputStates_[iS]-> buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(162 inputStates_[iS]->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>( 163 163 this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB])); 164 164 … … 171 171 172 172 //! Clears the list of pressed buttons and calls the derived class's method 173 void clearBuffers() 173 void clearBuffers() override 174 174 { 175 175 pressedButtons_.clear(); … … 180 180 OISDeviceClass* getOISDevice() { return this->oisDevice_; } 181 181 // Returns the name of the derived class as string 182 std::string getClassName() const { return DeviceClass::getClassNameImpl(); }182 std::string getClassName() const override { return DeviceClass::getClassNameImpl(); } 183 183 184 184 protected: … … 197 197 // Call states 198 198 for (unsigned int i = 0; i < inputStates_.size(); ++i) 199 inputStates_[i]-> buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));199 inputStates_[i]->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button)); 200 200 } 201 201 … … 219 219 // Call states 220 220 for (unsigned int i = 0; i < inputStates_.size(); ++i) 221 inputStates_[i]-> buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));221 inputStates_[i]->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button)); 222 222 } 223 223 -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
r10775 r10817 208 208 209 209 // From WindowEventListener 210 void windowFocusChanged(bool bFocus) ;210 void windowFocusChanged(bool bFocus) override; 211 211 212 212 private: // variables -
code/branches/cpp11_v2/src/libraries/core/input/InputState.h
r10775 r10817 157 157 ~InputState() { } 158 158 159 void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) ;159 void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 160 160 161 161 //! Sets the priority (only to be used by the InputManager!) -
code/branches/cpp11_v2/src/libraries/core/input/JoyStick.h
r9667 r10817 77 77 78 78 private: 79 void calibrationStarted() ;80 void calibrationStopped() ;79 void calibrationStarted() override; 80 void calibrationStopped() override; 81 81 void evaluateCalibration(); 82 82 … … 86 86 87 87 //! OIS event handler 88 bool buttonPressed (const OIS::JoyStickEvent &arg, int button) 88 bool buttonPressed (const OIS::JoyStickEvent &arg, int button) override 89 89 { 90 90 super::buttonPressed(static_cast<JoyStickButtonCode::ByEnum>(button)); … … 93 93 94 94 //! OIS event handler 95 bool buttonReleased(const OIS::JoyStickEvent &arg, int button) 95 bool buttonReleased(const OIS::JoyStickEvent &arg, int button) override 96 96 { 97 97 super::buttonReleased(static_cast<JoyStickButtonCode::ByEnum>(button)); … … 99 99 } 100 100 101 bool axisMoved (const OIS::JoyStickEvent &arg, int axis) ;102 bool sliderMoved (const OIS::JoyStickEvent &arg, int id) ;103 bool povMoved (const OIS::JoyStickEvent &arg, int id) ;101 bool axisMoved (const OIS::JoyStickEvent &arg, int axis) override; 102 bool sliderMoved (const OIS::JoyStickEvent &arg, int id) override; 103 bool povMoved (const OIS::JoyStickEvent &arg, int id) override; 104 104 //! OIS event handler (don't remove that because of OIS version issues!) 105 bool vector3Moved (const OIS::JoyStickEvent &arg, int id) { return true; }105 bool vector3Moved (const OIS::JoyStickEvent &arg, int id) override { return true; } 106 106 107 107 //! Returns the class name as string -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
r10771 r10817 84 84 void compilePointerLists(); 85 85 // from JoyStickQuantityListener interface 86 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) ;87 88 void allDevicesUpdated(float dt) ;89 void mouseUpdated(float dt) ;90 void joyStickUpdated(unsigned int joyStick, float dt) ;86 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 87 88 void allDevicesUpdated(float dt) override; 89 void mouseUpdated(float dt) override; 90 void joyStickUpdated(unsigned int joyStick, float dt) override; 91 91 // internal 92 92 void tickHalfAxis(HalfAxis& halfAxis); 93 93 94 void buttonPressed (const KeyEvent& evt) ;95 void buttonReleased(const KeyEvent& evt) ;96 void buttonHeld (const KeyEvent& evt) ;97 98 void buttonPressed (MouseButtonCode::ByEnum button) ;99 void buttonReleased(MouseButtonCode::ByEnum button) ;100 void buttonHeld (MouseButtonCode::ByEnum button) ;101 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) ;102 void mouseScrolled (int abs, int rel) ;103 104 void buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button) ;105 void buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button) ;106 void buttonHeld (unsigned int device, JoyStickButtonCode::ByEnum button) ;107 void axisMoved (unsigned int device, unsigned int axis, float value) ;94 void buttonPressed (const KeyEvent& evt) override; 95 void buttonReleased(const KeyEvent& evt) override; 96 void buttonHeld (const KeyEvent& evt) override; 97 98 void buttonPressed (MouseButtonCode::ByEnum button) override; 99 void buttonReleased(MouseButtonCode::ByEnum button) override; 100 void buttonHeld (MouseButtonCode::ByEnum button) override; 101 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) override; 102 void mouseScrolled (int abs, int rel) override; 103 104 void buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button) override; 105 void buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button) override; 106 void buttonHeld (unsigned int device, JoyStickButtonCode::ByEnum button) override; 107 void axisMoved (unsigned int device, unsigned int axis, float value) override; 108 108 109 109 protected: // variables -
code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.h
r8729 r10817 51 51 52 52 void callback(const std::string& name); 53 void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) ;53 void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 54 54 void assignCommands(); 55 55 -
code/branches/cpp11_v2/src/libraries/core/input/Keyboard.h
r8729 r10817 75 75 } 76 76 77 bool keyPressed(const OIS::KeyEvent& arg) ;78 bool keyReleased(const OIS::KeyEvent& arg) ;77 bool keyPressed(const OIS::KeyEvent& arg) override; 78 bool keyReleased(const OIS::KeyEvent& arg) override; 79 79 80 80 //! Returns the class name as string -
code/branches/cpp11_v2/src/libraries/core/input/Mouse.h
r7809 r10817 74 74 private: 75 75 //! OIS event handler 76 bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id) 76 bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id) override 77 77 { 78 78 super::buttonPressed(static_cast<MouseButtonCode::ByEnum>(id)); … … 81 81 82 82 //! OIS event handler 83 bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id) 83 bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id) override 84 84 { 85 85 super::buttonReleased(static_cast<MouseButtonCode::ByEnum>(id)); … … 87 87 } 88 88 89 bool mouseMoved(const OIS::MouseEvent &arg) ;89 bool mouseMoved(const OIS::MouseEvent &arg) override; 90 90 91 void windowResized(unsigned int newWidth, unsigned int newHeight) ;91 void windowResized(unsigned int newWidth, unsigned int newHeight) override; 92 92 93 93 // Returns the class name as string
Note: See TracChangeset
for help on using the changeset viewer.