Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9682 in orxonox.OLD for trunk/src/lib/lang


Ignore:
Timestamp:
Aug 22, 2006, 12:31:29 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: sync

Location:
trunk/src/lib/lang
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/new_class_id.h

    r9681 r9682  
    1313#include <list>
    1414
    15 
    1615//! A class to dynamically allocate ClassID's and support a isA operator
    1716class NewClassID
     
    2120  ~NewClassID();
    2221
    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(); }
    2426
    2527  template<class T> void registerObject(T* object, NewObjectList<T>& list);
  • trunk/src/lib/lang/new_object_list.h

    r9681 r9682  
    1818   static NewObjectList<ClassName> objectList
    1919
    20 #define NewObjectListDefinition(ClassName) \
    21    NewObjectList<ClassName> ClassName::objectList(#ClassName)
    22 
    2320#define NewObjectListDefinitionID(ClassName, ID) \
    2421   NewObjectList<ClassName> ClassName::objectList(#ClassName, ID)
     22
     23
     24#define NewObjectListDefinition(ClassName) \
     25    NewObjectListDefinitionID(ClassName, -1)
    2526
    2627
  • trunk/src/lib/lang/test_object_list.cc

    r9681 r9682  
    6565    this->registerObject(this, Bone::objectList);
    6666    //this->_id.listInheritance();
    67     std::cout << "LeafID:" << this->_id.leafClassID() << std::endl;
     67    //std::cout << "LeafID:" << this->_id.leafClassID() << std::endl;
    6868
    6969    //std::cout << "Bone()\n";
     
    8585    std::cout<< i <<  std::endl ;
    8686    Bone* test = new Bone[COUNT];
    87     delete[]test;
     87    delete []test;
    8888  }
    8989  //   char tmp[100];
Note: See TracChangeset for help on using the changeset viewer.