- Timestamp:
- Dec 9, 2007, 11:21:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/core/CoreIncludes.h
r443 r447 1 1 /** 2 2 @file CoreIncludes.h 3 @brief Definition of macros for the class-hierarchy and the factory.3 @brief Definition of macros and typedefs. 4 4 5 5 Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface … … 21 21 #include "OgreColourValue.h" 22 22 23 24 // Some typedefs 23 25 namespace orxonox 24 26 { … … 27 29 } 28 30 29 // Intern macro, containing the common parts of RegisterObject and RegisterRootObject 31 32 /** 33 @brief Intern macro, containing the common parts of RegisterObject and RegisterRootObject. 34 @param ClassName The name of the class 35 @param bRootClass True if the class is directly derived from OrxonoxClass 36 */ 30 37 #define InternRegisterObject(ClassName, bRootClass) \ 31 38 this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \ … … 34 41 ClassIdentifier<ClassName>::addObject(this) 35 42 36 // Intern macro, containing the specific part of RegisterRootObject 43 /** 44 @brief Intern macro, containing the specific part of RegisterRootObject. 45 @param ClassName The name of the class 46 */ 37 47 #define InternRegisterRootObject(ClassName) \ 38 48 if (Identifier::isCreatingHierarchy() && !this->getParents()) \ … … 40 50 InternRegisterObject(ClassName, true) 41 51 42 // RegisterObject - with and without debug output 52 /** 53 @brief RegisterObject - with and without debug output. 54 @param ClassName The name of the class 55 */ 43 56 #if HIERARCHY_VERBOSE 44 57 #define RegisterObject(ClassName) \ … … 50 63 #endif 51 64 52 // RegisterRootObject - with and without debug output 65 /** 66 @brief RegisterRootObject - with and without debug output. 67 @param ClassName The name of the class 68 */ 53 69 #if HIERARCHY_VERBOSE 54 70 #define RegisterRootObject(ClassName) \ … … 60 76 #endif 61 77 62 // Class(ClassName) returns the Identifier of the given class 78 /** 79 @brief Returns the Identifier of the given class. 80 @param ClassName The name of the class 81 */ 63 82 #define Class(ClassName) \ 64 83 ClassIdentifier<ClassName>::getIdentifier() 65 84 66 // Creates the entry in the Factory 85 /** 86 @brief Creates the entry in the Factory. 87 @param ClassName The name of the class 88 */ 67 89 #define CreateFactory(ClassName) \ 68 90 bool bCreated##ClassName##Factory = ClassFactory<ClassName>::create() 69 91 70 // ID(StringOrInt) returns the Identifier with either a given name or a given NetworkID through the factory 92 /** 93 @brief Returns the Identifier with either a given name or a given network ID through the factory. 94 @param StringOrInt The name or the network ID of the class 95 */ 71 96 #define ID(StringOrInt) \ 72 97 Factory::getIdentifier(StringOrInt) 73 98 74 // bla 99 /** 100 @brief Assigns the value, defined in the config-file, to the variable (or the default-value, if there is no entry in the file). 101 @param varname The name of the variable 102 @param defvalue The default-value of the variable 103 */ 75 104 #define SetConfigValue(varname, defvalue) \ 76 105 ConfigValueContainer* container##varname = this->getIdentifier()->getConfigValueContainer(#varname); \
Note: See TracChangeset
for help on using the changeset viewer.