/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Patrick Boenzli co-programmer: ... */ #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_OBJECT_MANAGER #include "object_manager.h" #include "list.h" #include "world_entity.h" using namespace std; /** \brief standard constructor */ ObjectManager::ObjectManager () { this->setClassName ("ObjectManager"); //this->managedObjectList = new BaseObject*[CL_NUMBER]; this->managedObjectList = new tList*[CL_NUMBER]; } /** \brief the singleton reference to this class */ ObjectManager* ObjectManager::singletonRef = NULL; /** \returns a Pointer to this Class */ ObjectManager* ObjectManager::getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager(); return ObjectManager::singletonRef; } /** \brief standard deconstructor */ ObjectManager::~ObjectManager () { ObjectManager::singletonRef = NULL; } void ObjectManager::cache(classList index, int number, const BaseObject ©Object) { //this->managedObjectList[index] = new BaseObject[number]; this->managedObjectList[index] = new tList(); for(int i = 0; i < number; ++i) { this->managedObjectList[index]->add(new BaseObject(copyObject)); } } void ObjectManager::addToDeadList(const char* className, BaseObject* object) {} BaseObject* ObjectManager::getFromDeadList(const char* className, int number) {}