Changeset 6038 for sandbox/src/libraries/core/CoreIncludes.h
- Timestamp:
- Nov 5, 2009, 9:22:22 PM (14 years ago)
- Location:
- sandbox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox
- Property svn:mergeinfo changed
-
sandbox/src/libraries/core/CoreIncludes.h
r5782 r6038 29 29 /** 30 30 @file 31 @brief Definition of macros for Identifier and Factory.31 @brief Definition of macros for Identifiers 32 32 33 33 Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface … … 45 45 #include "util/Debug.h" 46 46 #include "Identifier.h" 47 #include "Factory.h"48 47 #include "ClassFactory.h" 49 48 #include "ObjectList.h" … … 76 75 77 76 /** 78 @brief Creates the entry in theFactory.77 @brief Creates the Factory. 79 78 @param ClassName The name of the class 80 79 */ 81 80 #define CreateFactory(ClassName) \ 82 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)81 Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName) 83 82 84 83 /** … … 93 92 { 94 93 /** 95 @brief Returns the Identifier with a given name through the factory.94 @brief Returns the Identifier with a given name. 96 95 @param String The name of the class 97 96 */ 98 97 inline Identifier* ClassByString(const std::string& name) 99 98 { 100 return Factory::getIdentifier(name);99 return Identifier::getIdentifierByString(name); 101 100 } 102 101 103 102 /** 104 @brief Returns the Identifier with a given network ID through the factory.105 @param networkID The network IDof the class103 @brief Returns the Identifier with a given lowercase name. 104 @param String The lowercase name of the class 106 105 */ 107 inline Identifier* ClassBy ID(uint32_t id)106 inline Identifier* ClassByLowercaseString(const std::string& name) 108 107 { 109 return Factory::getIdentifier(id);108 return Identifier::getIdentifierByLowercaseString(name); 110 109 } 111 110 }
Note: See TracChangeset
for help on using the changeset viewer.