Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 10, 2005, 7:17:22 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: derivations work.
now the only thing to do is specify all the classes, and DO it CLEAN.

@patrick: is it ok, how i treated your ObjectManager??

File:
1 edited

Legend:

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

    r4519 r4592  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2626   \brief standard constructor
    2727*/
    28 ObjectManager::ObjectManager () 
     28ObjectManager::ObjectManager ()
    2929{
    3030  this->setClassID(CL_OBJECT_MANAGER, "ObjectManager");
    31  
     31
    3232  this->managedObjectList = new tList<BaseObject>*[CL_NUMBER];
    3333  for(int i = 0; i < CL_NUMBER; ++i)
     
    4848   \brief standard deconstructor
    4949*/
    50 ObjectManager::~ObjectManager () 
     50ObjectManager::~ObjectManager ()
    5151{
    5252  ObjectManager::singletonRef = NULL;
     
    8080      this->managedObjectList[index]->remove(obj);
    8181      if( unlikely(obj == NULL))
    82         {
    83           PRINTF(0)("Critical: there was no object anymore in the dead list! This could result in Segfaults\n");
    84         }
     82        {
     83          PRINTF(0)("Critical: there was no object anymore in the dead list! This could result in Segfaults\n");
     84        }
    8585      return obj;
    8686    }
     
    9696{
    9797  PRINT(0)("\n==========================| ObjectManager::debug() |===\n");
    98   PRINT(0)("=  Number of registerable classes: %i\n", CL_NUMBER ); 
     98  PRINT(0)("=  Number of registerable classes: %i\n", CL_NUMBER );
    9999  PRINT(0)("=  Currently cached objects: \n");
    100100  for(int i = 0; i < CL_NUMBER; ++i)
    101101    {
    102102      if( this->managedObjectList[i] != NULL)
    103         PRINT(0)("=   o Class Nr. %i has cached %i object(s)\n", i, this->managedObjectList[i]->getSize());
     103        PRINT(0)("=   o Class Nr. %i has cached %i object(s)\n", i, this->managedObjectList[i]->getSize());
    104104      else
    105         PRINT(0)("=   o Class Nr. %i has cached 0 object(s)\n", i);
     105        PRINT(0)("=   o Class Nr. %i has cached 0 object(s)\n", i);
    106106    }
    107107  PRINT(0)("=======================================================\n");
Note: See TracChangeset for help on using the changeset viewer.