Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: some nicer debug information, and doxygen tags

File size: 1.7 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();
33
34  private:
35    //! a Struct for Lists of Objects
36    struct ObjectList
37    {
38      BaseObject*            pointerToObject;        //! Pointer to the Object
39      ObjectList*            next;                   //!< pointer to the next Object in the List
40    };
41
42    long                     classID;                //!< ClassID stored in this ClassList \see ClassID
43    const char*              className;              //!< Name of the Class Stored here
44
45    ClassList*               next;                   //!< Pointer to the next class in the List
46
47    unsigned int             objectCount;            //!< how many Objects of this particular Object have been loaded??
48
49
50    static ClassList*        first;                  //!< The first Class in the List (should be BaseObject)
51    static unsigned int      classCount;             //!< The Count of classes that have been registered (should match the lower description)
52
53};
54
55#endif /* _CLASS_LIST_H */
Note: See TracBrowser for help on using the repository browser.