Changeset 9659 for code/branches/core6/src/libraries
- Timestamp:
- Aug 18, 2013, 4:57:51 PM (11 years ago)
- Location:
- code/branches/core6/src/libraries
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/libraries/core/BaseObject.cc
r9638 r9659 57 57 BaseObject::BaseObject(Context* context) : bInitialized_(false) 58 58 { 59 Register RootObject(BaseObject);59 RegisterObject(BaseObject); 60 60 61 61 this->bInitialized_ = true; -
code/branches/core6/src/libraries/core/Core.cc
r9658 r9659 179 179 // Do this soon after the ConfigFileManager has been created to open up the 180 180 // possibility to configure everything below here 181 Register RootObject(Core);181 RegisterObject(Core); 182 182 orxout(internal_info) << "configuring Core" << endl; 183 183 this->setConfigValues(); … … 516 516 DevModeListener::DevModeListener() 517 517 { 518 Register RootObject(DevModeListener);518 RegisterObject(DevModeListener); 519 519 } 520 520 } -
code/branches/core6/src/libraries/core/CoreIncludes.h
r9646 r9659 37 37 @brief Defines several very important macros used to register objects, register classes, and to work with identifiers. 38 38 39 Every class needs the @c RegisterObject(class) macro in its constructor. If the class is an interface 40 or the @c BaseObject itself, it needs the macro @c RegisterRootObject(class) instead. 39 Every class needs the @c RegisterObject(class) macro in its constructor. 41 40 42 41 To register @a class in the class-hierarchy, use the @c RegisterClass(class) macro outside of the class implementation, 43 42 so it gets executed statically before @c main(). If you don't want @a class to be loadable, but still register it, call 44 43 @c RegisterUnloadableClass(class). 44 45 Abstract classes are registered with @c RegisterAbstractClass(class). For abstract classes, the inheritance must be 46 defined manually with @c RegisterAbstractClass(class).inheritsFrom(Class(parent)). Multiple parent classes can be defined 47 by chaining the above command. 45 48 46 49 Example: … … 125 128 126 129 /** 127 @brief Intern macro, containing the common parts of @c RegisterObject and @c RegisterRootObject. 128 @param ClassName The name of the class 129 @param bRootClass True if the class is directly derived from orxonox::OrxonoxClass 130 */ 131 #define InternRegisterObject(ClassName) \ 130 @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName. 131 @param ClassName The name of the class 132 */ 133 #define RegisterObject(ClassName) \ 132 134 if (ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initializeObject(this)) \ 133 135 return; \ 134 136 else \ 135 137 ((void)0) 136 137 /**138 @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.139 @param ClassName The name of the class140 */141 #define RegisterObject(ClassName) \142 InternRegisterObject(ClassName)143 144 /**145 @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.146 @param ClassName The name of the class147 148 In contrast to RegisterObject, this is used for classes that inherit directly from149 orxonox::OrxonoxClass, namely all interfaces and orxonox::BaseObject.150 */151 #define RegisterRootObject(ClassName) \152 InternRegisterObject(ClassName)153 138 154 139 /** -
code/branches/core6/src/libraries/core/GUIManager.cc
r9558 r9659 256 256 , destructionHelper_(this) 257 257 { 258 Register RootObject(GUIManager);258 RegisterObject(GUIManager); 259 259 260 260 orxout(internal_status) << "initializing GUIManager..." << endl; -
code/branches/core6/src/libraries/core/Game.cc
r9560 r9659 112 112 113 113 // Do this after the Core creation! 114 Register RootObject(Game);114 RegisterObject(Game); 115 115 this->setConfigValues(); 116 116 -
code/branches/core6/src/libraries/core/ViewportEventListener.cc
r9656 r9659 36 36 ViewportEventListener::ViewportEventListener() 37 37 { 38 Register RootObject(ViewportEventListener);38 RegisterObject(ViewportEventListener); 39 39 } 40 40 } -
code/branches/core6/src/libraries/core/WindowEventListener.cc
r9656 r9659 39 39 WindowEventListener::WindowEventListener() 40 40 { 41 Register RootObject(WindowEventListener);41 RegisterObject(WindowEventListener); 42 42 } 43 43 -
code/branches/core6/src/libraries/core/XMLNameListener.cc
r9656 r9659 36 36 XMLNameListener::XMLNameListener() 37 37 { 38 Register RootObject(XMLNameListener);38 RegisterObject(XMLNameListener); 39 39 } 40 40 } -
code/branches/core6/src/libraries/core/command/Shell.cc
r9658 r9659 68 68 , bScrollable_(bScrollable) 69 69 { 70 Register RootObject(Shell);70 RegisterObject(Shell); 71 71 72 72 OutputManager::getInstance().registerListener(this); -
code/branches/core6/src/libraries/core/input/InputBuffer.cc
r9658 r9659 39 39 InputBuffer::InputBuffer() 40 40 { 41 Register RootObject(InputBuffer);41 RegisterObject(InputBuffer); 42 42 43 43 this->cursor_ = 0; … … 59 59 InputBuffer::InputBuffer(const std::string& allowedChars) 60 60 { 61 Register RootObject(InputBuffer);61 RegisterObject(InputBuffer); 62 62 63 63 this->maxLength_ = 1024; -
code/branches/core6/src/libraries/core/input/InputManager.cc
r9589 r9659 98 98 , calibratorCallbackHandler_(0) 99 99 { 100 Register RootObject(InputManager);100 RegisterObject(InputManager); 101 101 102 102 orxout(internal_status, context::input) << "InputManager: Constructing..." << endl; -
code/branches/core6/src/libraries/core/input/JoyStick.cc
r9559 r9659 51 51 : super(id, oisInputManager) 52 52 { 53 Register RootObject(JoyStick);53 RegisterObject(JoyStick); 54 54 this->setConfigValues(); 55 55 // Initialise POV and Slider states -
code/branches/core6/src/libraries/core/input/KeyBinder.cc
r9559 r9659 58 58 mousePosition_[1] = 0.0; 59 59 60 Register RootObject(KeyBinder);60 RegisterObject(KeyBinder); 61 61 62 62 // initialise all buttons and half axes to avoid creating everything with 'new' -
code/branches/core6/src/libraries/core/input/Mouse.cc
r8729 r9659 54 54 : super(id, oisInputManager) 55 55 { 56 Register RootObject(Mouse);56 RegisterObject(Mouse); 57 57 this->windowResized(this->getWindowWidth(), this->getWindowHeight()); 58 58 -
code/branches/core6/src/libraries/network/ClientConnectionListener.cc
r9656 r9659 39 39 ClientConnectionListener::ClientConnectionListener() 40 40 { 41 Register RootObject(ClientConnectionListener);41 RegisterObject(ClientConnectionListener); 42 42 } 43 43 -
code/branches/core6/src/libraries/network/Host.cc
r9557 r9659 145 145 NetworkChatListener::NetworkChatListener() 146 146 { 147 Register RootObject(NetworkChatListener);147 RegisterObject(NetworkChatListener); 148 148 } 149 149 -
code/branches/core6/src/libraries/network/NetworkFunction.cc
r9658 r9659 44 44 NetworkFunctionBase::NetworkFunctionBase(const std::string& name) 45 45 { 46 RegisterRootObject(NetworkFunctionBase);46 RegisterObject(NetworkFunctionBase); 47 47 48 48 static uint32_t networkID = 0; -
code/branches/core6/src/libraries/network/synchronisable/Synchronisable.cc
r9656 r9659 53 53 Synchronisable::Synchronisable(Context* context) 54 54 { 55 RegisterRootObject(Synchronisable);55 RegisterObject(Synchronisable); 56 56 static uint32_t idCounter=0; 57 57 objectMode_=0x1; // by default do not send data to server -
code/branches/core6/src/libraries/tools/Timer.cc
r9658 r9659 140 140 { 141 141 this->init(); 142 Register RootObject(Timer);142 RegisterObject(Timer); 143 143 } 144 144 … … 153 153 { 154 154 this->init(); 155 Register RootObject(Timer);155 RegisterObject(Timer); 156 156 157 157 this->setTimer(interval, bLoop, executor, bKillAfterCall); -
code/branches/core6/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc
r9656 r9659 50 50 TimeFactorListener::TimeFactorListener() 51 51 { 52 Register RootObject(TimeFactorListener);52 RegisterObject(TimeFactorListener); 53 53 } 54 54 … … 74 74 Tickable::Tickable() 75 75 { 76 Register RootObject(Tickable);76 RegisterObject(Tickable); 77 77 } 78 78 }
Note: See TracChangeset
for help on using the changeset viewer.