Changeset 2087 for code/trunk/src/core/CoreIncludes.h
- Timestamp:
- Nov 1, 2008, 7:04:09 PM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/core/CoreIncludes.h
r1856 r2087 46 46 #include "Factory.h" 47 47 #include "ClassFactory.h" 48 #include "Functor.h" 48 49 #include "util/Debug.h" 49 50 … … 98 99 */ 99 100 #define CreateFactory(ClassName) \ 100 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName) 101 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, true) 102 103 /** 104 @brief Creates the entry in the Factory for classes which should not be loaded through XML. 105 @param ClassName The name of the class 106 */ 107 #define CreateUnloadableFactory(ClassName) \ 108 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, false) 101 109 102 110 /** … … 105 113 */ 106 114 #define Class(ClassName) \ 107 ClassIdentifier<ClassName>::getIdentifier()115 orxonox::ClassIdentifier<ClassName>::getIdentifier() 108 116 109 117 /** … … 111 119 @param String The name of the class 112 120 */ 113 #define ClassBy Name(String) \121 #define ClassByString(String) \ 114 122 orxonox::Factory::getIdentifier(String) 115 123 … … 121 129 orxonox::Factory::getIdentifier(networkID) 122 130 131 /** 132 @brief Registers a member function as callback when an object of 'type' is created. 133 @param 134 */ 135 #define RegisterConstructionCallback(ThisClassName, TargetClassName, FunctionName) \ 136 orxonox::ClassIdentifier<TargetClassName>::getIdentifier()->addConstructionCallback( \ 137 createFunctor(&ThisClassName::FunctionName)->setObject(this)) 138 123 139 #endif /* _CoreIncludes_H__ */
Note: See TracChangeset
for help on using the changeset viewer.