Changeset 4313 in orxonox.OLD for orxonox/trunk/src/util/object_manager.h
- Timestamp:
- May 26, 2005, 11:24:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.h
r4312 r4313 8 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 9 - control the garbage collector 10 11 TO ADD SUPPORT FOR A CLASS do the following steps: 12 1. include the hader file : #include "class_header.h" 13 2. add the class to the type enum classList {}; 14 3. define a function void mCache( ClassName ) in class ObjectManager 15 10 16 */ 11 17 … … 35 41 36 42 37 template<class T> class tList; 38 template<class T> class ManagedObject; 39 40 41 42 43 43 //! This defines the "template" makro function for cache(...) 44 44 #define mCache( Class ) \ 45 45 cache(classList index, int number, Class * copyObject) \ … … 61 61 virtual ~ObjectManager(void); 62 62 63 64 63 void mCache(Projectile); 65 66 64 void addToDeadList(classList index, BaseObject* object); 67 65 BaseObject* getFromDeadList(classList index, int number = 1); 68 69 70 66 71 67 void debug(); … … 73 69 private: 74 70 ObjectManager(void); 75 //void cache(classList index, int number, Projectile* copyObject);76 71 77 72 static ObjectManager* singletonRef; 78 73 79 //BaseObject** managedObjectList;80 74 tList<BaseObject>** managedObjectList; 81 75 GarbageCollector* garbageCollector;
Note: See TracChangeset
for help on using the changeset viewer.