Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6278 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Dec 24, 2005, 7:14:06 PM (19 years ago)
Author:
bensch
Message:

trunk: christmas commit…. fixed baseObject

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

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/base_object.cc

    r6276 r6278  
    7979  this->className = className;
    8080
    81   ClassList::addToClassList(this, classID, className);
    82 }
    83 
    84 /**
    85   \brief set the name of the Object
     81  ClassList::addToClassList(this, classID, this->classID, className);
     82}
     83
     84/**
     85 * @briefbrief set the name of the Object
    8686 */
    8787void BaseObject::setName (const char* objectName)
  • trunk/src/lib/lang/class_list.cc

    r6077 r6278  
    3737 *  Creates a new ClassList
    3838*/
    39 ClassList::ClassList(ClassID classID, const char* className)
     39ClassList::ClassList(ClassID classID, unsigned long classIDFull, const char* className)
    4040{
    4141  this->className = className;
    4242  this->classID = classID;
     43  this->classIDFull = classIDFull;
    4344}
    4445
     
    6667 * !! Before unsing the ClassList, as it creates the ClassLits
    6768 */
    68 void ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, const char* className)
     69void ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className)
    6970{
    7071  if (unlikely(classList == NULL))
     
    7879  else
    7980  {
    80     ClassList::classList->push_back(ClassList(classID, className));
     81    ClassList::classList->push_back(ClassList(classID, classIDFull, className));
    8182    ClassList::classList->back().objectList.push_back(objectPointer);
    8283  }
  • trunk/src/lib/lang/class_list.h

    r6077 r6278  
    3131 */
    3232class ClassList {
    33 
    3433  public:
    35     ClassList(ClassID classID, const char* className);
     34    ClassList(ClassID classID, unsigned long classIDFull, const char* className);
    3635    virtual ~ClassList();
    3736
    38     // STATIC FUNCTIONS
    39     static void                           addToClassList(BaseObject* objectPointer, ClassID classID, const char* className);
     37    /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */
     38    static void                           addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className);
    4039    static void                           removeFromClassList(BaseObject* objectPointer);
     40
     41
    4142
    4243    static const std::list<BaseObject*>*  getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; };
     
    5960
    6061  private:
    61 
    6262    static ClassList*                     getClassList(ClassID classID);
    6363    static ClassList*                     getClassList(const char* className);
    6464
    6565  private:
     66    ClassID                         classID;                //!< ClassID stored in this ClassList
     67    unsigned long                   classIDFull;            //!< The Full ClassID of this Class.
    6668
    67     ClassID                         classID;                //!< ClassID stored in this ClassList
    6869    const char*                     className;              //!< Name of the Class Stored here
    6970
Note: See TracChangeset for help on using the changeset viewer.