Changeset 871 for code/trunk/src/orxonox/core/CoreIncludes.h
- Timestamp:
- Mar 9, 2008, 4:44:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/core/CoreIncludes.h
r790 r871 44 44 // All needed header-files 45 45 #include "Identifier.h" 46 #include "ClassManager.h" 46 47 #include "Factory.h" 47 48 #include "ClassFactory.h" … … 51 52 #include "Debug.h" 52 53 54 55 // All needed macros 53 56 /** 54 57 @brief Intern macro, containing the common parts of RegisterObject and RegisterRootObject. … … 57 60 */ 58 61 #define InternRegisterObject(ClassName, bRootClass) \ 59 this->setIdentifier(orxonox::Class Identifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \62 this->setIdentifier(orxonox::ClassManager<ClassName>::getIdentifier()->registerClass(this->getParents(), #ClassName, bRootClass)); \ 60 63 if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \ 61 this->getParents()-> add(this->getIdentifier()); \62 orxonox::Class Identifier<ClassName>::addObject(this)64 this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \ 65 orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this) 63 66 64 67 /** … … 68 71 #define InternRegisterRootObject(ClassName) \ 69 72 if (orxonox::Identifier::isCreatingHierarchy() && !this->getParents()) \ 70 this-> setParents(new orxonox::IdentifierList()); \73 this->createParents(); \ 71 74 InternRegisterObject(ClassName, true) 72 75 … … 76 79 */ 77 80 #define RegisterObject(ClassName) \ 78 COUT( 4) << "*** Register Object: " << #ClassName << std::endl; \81 COUT(5) << "*** Register Object: " << #ClassName << std::endl; \ 79 82 InternRegisterObject(ClassName, false) 80 83 … … 84 87 */ 85 88 #define RegisterRootObject(ClassName) \ 86 COUT( 4) << "*** Register Root-Object: " << #ClassName << std::endl; \89 COUT(5) << "*** Register Root-Object: " << #ClassName << std::endl; \ 87 90 InternRegisterRootObject(ClassName) 88 89 /**90 @brief Exports the necessary templates in order to make them available to all libraries.91 @param ClassName The name of the Class92 @param LibraryName The name of the Library93 */94 #define ExportClass(ClassName, LibraryName) \95 template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \96 template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \97 template class _##LibraryName##Export orxonox::ClassFactory<ClassName>98 99 /**100 @brief Exports the necessary templates in order to make them available to all libraries.101 @param ClassName The name of the Class102 @param LibraryName The name of the Library103 */104 #define ExportAbstractClass(ClassName, LibraryName) \105 template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \106 template class _##LibraryName##Export orxonox::ObjectList<ClassName>107 91 108 92 /** … … 111 95 */ 112 96 #define Class(ClassName) \ 113 Class Identifier<ClassName>::getIdentifier()97 ClassManager<ClassName>::getIdentifier() 114 98 115 99 /** … … 137 121 { \ 138 122 container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, varname = defvalue); \ 139 this->getIdentifier()-> setConfigValueContainer(#varname, container##varname); \123 this->getIdentifier()->addConfigValueContainer(#varname, container##varname); \ 140 124 } \ 141 container##varname->getValue( varname)125 container##varname->getValue(&varname) 142 126 143 127 /** … … 150 134 { \ 151 135 container##varname##reset->resetConfigValue(); \ 152 container##varname##reset->getValue( varname); \136 container##varname##reset->getValue(&varname); \ 153 137 } \ 154 138 else \
Note: See TracChangeset
for help on using the changeset viewer.