Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4747 in orxonox.OLD for orxonox/trunk/src/lib/lang/class_list.h


Ignore:
Timestamp:
Jul 1, 2005, 4:10:44 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: classList now counts the count of classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/class_list.h

    r4744 r4747  
    33    \brief Definition of the Class List, that handles a Class-Specific-Control structure
    44
    5 */
     5 */
    66
    77#ifndef _CLASS_LIST_H
     
    1515
    1616
    17 //! A class for
     17//! A class that handles Pointers to Objects of all type.
     18/**
     19  here all the Pointers to all the Object of orxonox are stored, that implement BaseObject
     20  for now, this is only for debugging reasons, and we should be able to detect undeleted
     21  Objects.
     22 */
    1823class ClassList {
    1924
    20  public:
    21   ClassList();
    22   virtual ~ClassList();
     25  public:
     26    ClassList(const long& classID, const char* className);
     27    virtual ~ClassList();
     28
     29    static void addToClassList(BaseObject* objectPointer, const long& classID, const char* className);
     30    static void removeFromClassList(BaseObject* objectPointer);
     31
     32    static void debug();
     33
     34  private:
     35    //! a Struct for Lists of Objects
     36    struct ObjectList
     37    {
     38      BaseObject*            pointerToObject;
     39      ObjectList*            next;
     40    };
     41
     42    long                     classID;
     43    const char*              className;
     44
     45    ClassList*               next;
     46
     47    unsigned int             objectCount;
    2348
    2449
    25   void addToClassList(BaseObject* objectPointer, ClassID classID, const char* className);
    26  private:
    27    static ClassList* first;
    28    static ClassList* last;
    29 
    30    int classCount;
    31 
     50    static ClassList*        first;
     51    static unsigned int      classCount;
    3252
    3353};
Note: See TracChangeset for help on using the changeset viewer.