Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/lang/class_list.h @ 4752

Last change on this file since 4752 was 4752, checked in by bensch, 19 years ago

orxonox/trunk: heavy business. The Objects are now aligned along a List for the BaseObjects, this will be taken out in the next commit, because it is f much debug

File size: 1.5 KB
Line 
1/*!
2    \file class_list.h
3    \brief Definition of the Class List, that handles a Class-Specific-Control structure
4
5 */
6
7#ifndef _CLASS_LIST_H
8#define _CLASS_LIST_H
9
10#include "class_id.h"
11
12// FORWARD DEFINITION
13class BaseObject;
14template<class T> class tList;
15
16
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 */
23class ClassList {
24
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(unsigned int debugLevel = 0);
33
34  private:
35    tList<BaseObject>*       objectList;             //!< A list of Objects belonging to this Class
36
37    long                     classID;                //!< ClassID stored in this ClassList \see ClassID
38    const char*              className;              //!< Name of the Class Stored here
39
40    ClassList*               next;                   //!< Pointer to the next class in the List
41
42    // STATIC MEMBERS
43    static ClassList*        first;                  //!< The first Class in the List (should be BaseObject)
44    static unsigned int      classCount;             //!< The Count of classes that have been registered (should match the lower description)
45};
46
47#endif /* _CLASS_LIST_H */
Note: See TracBrowser for help on using the repository browser.