/*! \file object_manager.h \brief this manager will ceep track of the objects in the world This is specially designed to: - Give an interface to the world data - separate the world data from the world build,update,draw process - recycle deleted objects: specific for Projectils since there is a lot of world entity creation/deletion (and this needs a lot of time) - control the garbage collector */ #ifndef _OBJECT_MANAGER_H #define _OBJECT_MANAGER_H #include "base_object.h" #define OM_ #include "class_list.h" class WorldEntity; class GarbageCollector; template class tList; template class ManagedObject; //! the object manager itself class ObjectManager : public BaseObject { public: static ObjectManager* getInstance(void); virtual ~ObjectManager(void); void cache(classList index, int number, const BaseObject ©Object); void addToDeadList(classList index, BaseObject* object); BaseObject* getFromDeadList(classList index, int number = 1); void debug(); private: ObjectManager(void); static ObjectManager* singletonRef; //BaseObject** managedObjectList; tList** managedObjectList; GarbageCollector* garbageCollector; }; #endif /* _OBJECT_MANAGER_H */