Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4288 in orxonox.OLD for orxonox/trunk/src/util/object_manager.cc


Ignore:
Timestamp:
May 26, 2005, 12:38:44 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: implementing the add/get from DeadList functions, resturctured the garbage collector hirarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/object_manager.cc

    r4287 r4288  
    1111   ### File Specific:
    1212   main-programmer: Patrick Boenzli
    13    co-programmer: ...
    1413*/
    1514
     
    1716
    1817#include "object_manager.h"
     18#include "garbage_collector.h"
    1919#include "list.h"
    20 #include "world_entity.h"
     20
    2121
    2222using namespace std;
     
    3232  //this->managedObjectList = new BaseObject*[CL_NUMBER];
    3333  this->managedObjectList = new tList<BaseObject>*[CL_NUMBER];
     34
     35  this->garbageCollector = GarbageCollector::getInstance();
    3436}
    3537
     
    7173
    7274
    73 void ObjectManager::addToDeadList(const char* className, BaseObject* object)
    74 {}
     75void ObjectManager::addToDeadList(classList index, BaseObject* object)
     76{
     77  if( likely(this->managedObjectList[index] != NULL))
     78    this->managedObjectList[index]->add(object);
     79  else
     80    PRINTF(0)(" Error: unable to add object to the list nr. %i, ignoring\n", index);
     81}
    7582
    7683
    77 BaseObject* ObjectManager::getFromDeadList(const char* className, int number)
     84BaseObject* ObjectManager::getFromDeadList(classList index, int number)
    7885{}
    7986
Note: See TracChangeset for help on using the changeset viewer.