Changeset 10775 for code/branches/cpp11_v2/src/libraries/core/input
- Timestamp:
- Nov 8, 2015, 10:40:44 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
r10769 r10775 35 35 #include <string> 36 36 #include <vector> 37 #include < boost/function.hpp>37 #include <functional> 38 38 39 39 #include "util/Singleton.h" … … 186 186 // Function call caching 187 187 //------------------------------- 188 void pushCall(const boost::function<void ()>& function)188 void pushCall(const std::function<void ()>& function) 189 189 { this->callBuffer_.push_back(function); } 190 190 … … 225 225 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 226 226 227 std::vector< boost::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate)227 std::vector<std::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 228 228 229 229 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton -
code/branches/cpp11_v2/src/libraries/core/input/InputState.h
r10765 r10775 35 35 #include <string> 36 36 #include <vector> 37 #include <boost/function.hpp> 38 #include <boost/bind.hpp> 37 #include <functional> 39 38 40 39 #include "util/tribool.h" … … 44 43 45 44 #define INPUT_STATE_PUSH_CALL(deviceIndex, functionName, ...) \ 46 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__)))45 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__))) 47 46 48 47 namespace orxonox … … 212 211 // We have to store the function pointer to tell the compiler about its actual type because of overloading 213 212 void (InputHandler::*function)(unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>; 214 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(function, handlers_[device], device, button, EventType())));213 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(function, handlers_[device], device, button, EventType()))); 215 214 } 216 215 }
Note: See TracChangeset
for help on using the changeset viewer.