Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/physics/src/util/object_manager.h @ 4301

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

orxonox/branches/physics: merged the trunk back to the physics-branche
merged with command:
svn merge -4 4283:HEAD ../../trunk/ .
no conflicts

File size: 1.2 KB
Line 
1/*!
2    \file object_manager.h
3    \brief this manager will ceep track of the objects  in the world
4   
5    This is specially designed to:
6    - Give an interface to the world data
7    - separate the world data from the world build,update,draw process
8    - recycle deleted objects: specific for Projectils since there is a lot of world entity creation/deletion (and this needs a lot of time)
9    - control the garbage collector
10*/
11
12
13#ifndef _OBJECT_MANAGER_H
14#define _OBJECT_MANAGER_H
15
16#include "base_object.h"
17
18#define OM_
19
20#include "class_list.h"
21
22
23class WorldEntity;
24class GarbageCollector;
25
26
27template<class T> class tList; 
28template<class T> class ManagedObject;
29
30//! the object manager itself
31class ObjectManager : public BaseObject {
32
33 public:
34  static ObjectManager* getInstance(void);
35  virtual ~ObjectManager(void);
36 
37  void cache(classList index, int number, const BaseObject &copyObject);
38  void addToDeadList(classList index, BaseObject* object);
39  BaseObject* getFromDeadList(classList index, int number = 1);
40
41  void debug();
42
43 private:
44  ObjectManager(void);
45  static ObjectManager* singletonRef;
46
47  //BaseObject** managedObjectList;
48  tList<BaseObject>** managedObjectList;
49  GarbageCollector* garbageCollector;
50};
51
52
53
54#endif /* _OBJECT_MANAGER_H */
Note: See TracBrowser for help on using the repository browser.