Changeset 9682 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Aug 22, 2006, 12:31:29 AM (18 years ago)
- Location:
- trunk/src/lib/lang
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/lang/new_class_id.h
r9681 r9682 13 13 #include <list> 14 14 15 16 15 //! A class to dynamically allocate ClassID's and support a isA operator 17 16 class NewClassID … … 21 20 ~NewClassID(); 22 21 23 int leafClassID() const { return _classes.front()._objectList->id(); } 22 /** @returns the ClassName of the Topmost Object of the ClassStack */ 23 inline const std::string& getClassName() const { return _classes.front()._objectList->name(); } 24 /** @returns the ID of the Topmost object of the ClassStack */ 25 inline int leafClassID() const { return _classes.front()._objectList->id(); } 24 26 25 27 template<class T> void registerObject(T* object, NewObjectList<T>& list); -
trunk/src/lib/lang/new_object_list.h
r9681 r9682 18 18 static NewObjectList<ClassName> objectList 19 19 20 #define NewObjectListDefinition(ClassName) \21 NewObjectList<ClassName> ClassName::objectList(#ClassName)22 23 20 #define NewObjectListDefinitionID(ClassName, ID) \ 24 21 NewObjectList<ClassName> ClassName::objectList(#ClassName, ID) 22 23 24 #define NewObjectListDefinition(ClassName) \ 25 NewObjectListDefinitionID(ClassName, -1) 25 26 26 27 -
trunk/src/lib/lang/test_object_list.cc
r9681 r9682 65 65 this->registerObject(this, Bone::objectList); 66 66 //this->_id.listInheritance(); 67 std::cout << "LeafID:" << this->_id.leafClassID() << std::endl;67 //std::cout << "LeafID:" << this->_id.leafClassID() << std::endl; 68 68 69 69 //std::cout << "Bone()\n"; … … 85 85 std::cout<< i << std::endl ; 86 86 Bone* test = new Bone[COUNT]; 87 delete []test;87 delete []test; 88 88 } 89 89 // char tmp[100];
Note: See TracChangeset
for help on using the changeset viewer.