Changeset 9659 for code/branches/core6/src/libraries/core
- Timestamp:
- Aug 18, 2013, 4:57:51 PM (11 years ago)
- Location:
- code/branches/core6/src/libraries/core
- Files:
-
- 14 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
Note: See TracChangeset
for help on using the changeset viewer.