Changeset 4286 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- May 25, 2005, 11:59:21 PM (20 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.cc
r4285 r4286 17 17 18 18 #include "object_manager.h" 19 #include "list.h" 20 #include "world_entity.h" 19 21 20 22 using namespace std; … … 26 28 ObjectManager::ObjectManager () 27 29 { 28 this->setClassName ("ObjectManager"); 29 30 this->managedObjectList = new BaseObject*[CL_NUMBER]; 30 this->setClassName ("ObjectManager"); 31 32 //this->managedObjectList = new BaseObject*[CL_NUMBER]; 33 this->managedObjectList = new tList<BaseObject>*[CL_NUMBER]; 31 34 } 32 35 … … 57 60 58 61 59 void ObjectManager::cache(classList index, int number )62 void ObjectManager::cache(classList index, int number, const BaseObject ©Object) 60 63 { 61 this->managedObjectList[index] = new BaseObject(); 64 //this->managedObjectList[index] = new BaseObject[number]; 65 this->managedObjectList[index] = new tList<BaseObject>(); 66 for(int i = 0; i < number; ++i) 67 { 68 this->managedObjectList[index]->add(new BaseObject(copyObject)); 69 } 62 70 } 63 71 -
orxonox/trunk/src/util/object_manager.h
r4285 r4286 40 40 virtual ~ObjectManager(void); 41 41 42 void cache(classList index, int number );42 void cache(classList index, int number, const BaseObject ©Object); 43 43 void addToDeadList(const char* className, BaseObject* object); 44 44 BaseObject* getFromDeadList(const char* className, int number = 1); … … 48 48 static ObjectManager* singletonRef; 49 49 50 BaseObject** managedObjectList; 50 //BaseObject** managedObjectList; 51 tList<BaseObject>** managedObjectList; 51 52 }; 52 53
Note: See TracChangeset
for help on using the changeset viewer.