Changeset 10114 in orxonox.OLD for trunk/src/lib/lang/object_list.h
- Timestamp:
- Dec 19, 2006, 11:55:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/object_list.h
r9869 r10114 32 32 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition 33 33 * @param ClassName: the Name of the Class. 34 * @param ID: optional set a Fixed ID.35 */36 #define ObjectListDefinitionID(ClassName, ID) \37 ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)38 39 /**40 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition41 * @param ClassName: the Name of the Class.42 34 */ 43 35 #define ObjectListDefinition(ClassName) \ 44 ObjectList DefinitionID(ClassName, -1)36 ObjectList<ClassName> ClassName::_objectList(#ClassName) 45 37 46 38 class BaseObject; … … 109 101 110 102 protected: 111 ObjectListBase(const std::string& className , int id = -1);103 ObjectListBase(const std::string& className); 112 104 virtual ~ObjectListBase(); 113 105 … … 133 125 static NameMap* _classesByName; //!< A Map of all the classes in existance. 134 126 static std::list<std::string> _classNames; //!< A list of all the registered ClassNames. 127 128 public: 129 static void replaceIDMap( const std::map<std::string, int>& str2id ); 130 static std::map<std::string, int>* createStrToId(); 135 131 }; 136 132 … … 199 195 200 196 public: 201 ObjectList(const std::string& name , int id = -1);197 ObjectList(const std::string& name); 202 198 ~ObjectList(); 203 199 … … 256 252 */ 257 253 template <class T> 258 ObjectList<T>::ObjectList(const std::string& name , int id)259 : ObjectListBase(name , id)254 ObjectList<T>::ObjectList(const std::string& name) 255 : ObjectListBase(name) 260 256 {} 261 257
Note: See TracChangeset
for help on using the changeset viewer.