Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: classList now counts the count of classes

File size: 1.2 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;
39      ObjectList*            next;
40    };
41
42    long                     classID;
43    const char*              className;
44
45    ClassList*               next;
46
47    unsigned int             objectCount;
48
49
50    static ClassList*        first;
51    static unsigned int      classCount;
52
53};
54
55#endif /* _CLASS_LIST_H */
Note: See TracBrowser for help on using the repository browser.