Changeset 5935 for code/branches/pickup/src/libraries/core/CoreIncludes.h
- Timestamp:
- Oct 13, 2009, 5:05:17 PM (15 years ago)
- Location:
- code/branches/pickup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup
- Property svn:mergeinfo changed
-
code/branches/pickup/src/libraries/core/CoreIncludes.h
r5781 r5935 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"47 #include "SubclassIdentifier.h" 48 48 #include "ClassFactory.h" 49 49 #include "ObjectList.h" … … 76 76 77 77 /** 78 @brief Creates the entry in theFactory.78 @brief Creates the Factory. 79 79 @param ClassName The name of the class 80 80 */ 81 81 #define CreateFactory(ClassName) \ 82 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, true)82 Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, true) 83 83 84 84 /** 85 @brief Creates the entry in theFactory for classes which should not be loaded through XML.85 @brief Creates the Factory for classes which should not be loaded through XML. 86 86 @param ClassName The name of the class 87 87 */ 88 88 #define CreateUnloadableFactory(ClassName) \ 89 bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, false)89 Factory* _##ClassName##Factory = new orxonox::ClassFactory<ClassName>(#ClassName, false) 90 90 91 91 /** … … 100 100 { 101 101 /** 102 @brief Returns the Identifier with a given name through the factory.102 @brief Returns the Identifier with a given name. 103 103 @param String The name of the class 104 104 */ 105 105 inline Identifier* ClassByString(const std::string& name) 106 106 { 107 return Factory::getIdentifier(name);107 return Identifier::getIdentifierByString(name); 108 108 } 109 109 110 110 /** 111 @brief Returns the Identifier with a given network ID through the factory. 111 @brief Returns the Identifier with a given lowercase name. 112 @param String The lowercase name of the class 113 */ 114 inline Identifier* ClassByLowercaseString(const std::string& name) 115 { 116 return Identifier::getIdentifierByLowercaseString(name); 117 } 118 119 /** 120 @brief Returns the Identifier with a given network ID. 112 121 @param networkID The network ID of the class 113 122 */ 114 123 inline Identifier* ClassByID(uint32_t id) 115 124 { 116 return Factory::getIdentifier(id);125 return Identifier::getIdentifierByID(id); 117 126 } 118 127 }
Note: See TracChangeset
for help on using the changeset viewer.