Changeset 5829 for code/branches/core5/src/libraries
- Timestamp:
- Sep 28, 2009, 9:31:24 PM (15 years ago)
- Location:
- code/branches/core5/src/libraries
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/BaseObject.h
r5806 r5829 40 40 if (this->getMainStateName() == statename) \ 41 41 { \ 42 this->functorSetMainState_ = createFunctor(&classname::setfunction )->setObject(this); \43 this->functorGetMainState_ = createFunctor(&classname::getfunction )->setObject(this); \42 this->functorSetMainState_ = createFunctor(&classname::setfunction, this); \ 43 this->functorGetMainState_ = createFunctor(&classname::getfunction, this); \ 44 44 } 45 45 -
code/branches/core5/src/libraries/core/EventIncludes.h
r5738 r5829 49 49 if (!containername) \ 50 50 { \ 51 ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor(&classname::functionname), std::string( #classname ) + "::" + #functionname); \ 52 executor->setObject(this); \ 51 ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor(&classname::functionname, this), std::string( #classname ) + "::" + #functionname); \ 53 52 containername = new orxonox::EventContainer(std::string(eventname), executor, orxonox::ClassIdentifier<subclassname>::getIdentifier()); \ 54 53 this->addEventContainer(eventname, containername); \ … … 61 60 if (!containername) \ 62 61 { \ 63 ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::functionname), std::string( #classname ) + "::" + #functionname); \ 64 executor->setObject(this); \ 62 ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::functionname, this), std::string( #classname ) + "::" + #functionname); \ 65 63 containername = new orxonox::EventContainer(std::string(eventname), executor, orxonox::ClassIdentifier<subclassname>::getIdentifier()); \ 66 64 this->addEventContainer(eventname, containername); \ -
code/branches/core5/src/libraries/core/GraphicsManager.cc
r5810 r5829 318 318 319 319 // add console commands 320 FunctorMember<GraphicsManager>* functor1 = createFunctor(&GraphicsManager::printScreen); 321 ccPrintScreen_ = createConsoleCommand(functor1->setObject(this), "printScreen"); 320 ccPrintScreen_ = createConsoleCommand(createFunctor(&GraphicsManager::printScreen, this), "printScreen"); 322 321 CommandExecutor::addConsoleCommandShortcut(ccPrintScreen_); 323 322 } -
code/branches/core5/src/libraries/core/input/InputManager.cc
r5796 r5829 109 109 InputState* detector = createInputState("detector", false, false, InputStatePriority::Detector); 110 110 // Create a callback to avoid buttonHeld events after the key has been detected 111 FunctorMember<InputManager>* bufferFunctor = createFunctor(&InputManager::clearBuffers); 112 bufferFunctor->setObject(this); 113 detector->setLeaveFunctor(bufferFunctor); 111 detector->setLeaveFunctor(createFunctor(&InputManager::clearBuffers, this)); 114 112 keyDetector_ = new KeyDetector(); 115 113 detector->setHandler(keyDetector_); … … 124 122 this->updateActiveStates(); 125 123 126 { 127 // calibrate console command 128 FunctorMember<InputManager>* functor = createFunctor(&InputManager::calibrate); 129 functor->setObject(this); 130 this->getIdentifier()->addConsoleCommand(createConsoleCommand(functor, "calibrate"), true); 131 } 132 { 133 // reload console command 134 FunctorMember<InputManager>* functor = createFunctor(&InputManager::reload); 135 functor->setObject(this); 136 this->getIdentifier()->addConsoleCommand(createConsoleCommand(functor, "reload"), false); 137 } 124 // calibrate console command 125 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&InputManager::calibrate, this), "calibrate"), true); 126 // reload console command 127 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&InputManager::reload, this), "reload"), false); 138 128 139 129 CCOUT(4) << "Construction complete." << std::endl; -
code/branches/core5/src/libraries/core/input/Mouse.cc
r5738 r5829 48 48 49 49 #ifdef ORXONOX_PLATFORM_LINUX 50 { 51 // Mouse grab console command 52 FunctorMember<Mouse>* functor = createFunctor(&Mouse::grab); 53 functor->setObject(this); 54 this->getIdentifier()->addConsoleCommand(createConsoleCommand(functor, "grab"), false); 55 } 56 { 57 // Mouse ungrab console command 58 FunctorMember<Mouse>* functor = createFunctor(&Mouse::ungrab); 59 functor->setObject(this); 60 this->getIdentifier()->addConsoleCommand(createConsoleCommand(functor, "ungrab"), false); 61 } 50 // Mouse grab console command 51 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&Mouse::grab, this), "grab"), false); 52 // Mouse ungrab console command 53 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&Mouse::ungrab, this), "ungrab"), false); 62 54 #endif 63 55 } -
code/branches/core5/src/libraries/network/GamestateManager.cc
r5797 r5829 160 160 finishGamestate( cid, &clientGamestates.back(), client, reference ); 161 161 //FunctorMember<GamestateManager>* functor = 162 // ExecutorMember<GamestateManager>* executor = createExecutor( createFunctor(&GamestateManager::finishGamestate) ); 163 // executor->setObject(this); 162 // ExecutorMember<GamestateManager>* executor = createExecutor( createFunctor(&GamestateManager::finishGamestate, this) ); 164 163 // executor->setDefaultValues( cid, &clientGamestates.back(), client, reference ); 165 164 // (*static_cast<Executor*>(executor))();
Note: See TracChangeset
for help on using the changeset viewer.