Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4312 in orxonox.OLD


Ignore:
Timestamp:
May 26, 2005, 11:18:59 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now the object manager works absolutly unflexible! Reaching the limits of C++, embrace for impact

Location:
orxonox/trunk/src/util
Files:
2 edited

Legend:

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

    r4311 r4312  
    6363
    6464
     65/*
    6566void ObjectManager::cache(classList index, int number, Projectile* copyObject)
    6667{
     
    7273    }
    7374}
     75*/
    7476
    7577
  • orxonox/trunk/src/util/object_manager.h

    r4311 r4312  
    1515
    1616#include "base_object.h"
     17#include "projectile.h"
     18#include "list.h"
    1719
    1820#define OM_
     
    2931 
    3032
    31 
    32 
    33 
    3433class WorldEntity;
    3534class GarbageCollector;
    36 class Projectile;
     35
    3736
    3837template<class T> class tList;
    3938template<class T> class ManagedObject;
    4039
     40
     41
     42
     43
    4144#define mCache( Class ) \
    42  cache(classList index, int number, Class * copyObject)
     45 cache(classList index, int number, Class * copyObject)        \
     46{                                                              \
     47  this->managedObjectList[index] = new tList<BaseObject>(); \
     48  for(int i = 0; i < number; ++i)\
     49    {\
     50      this->managedObjectList[index]->add(new Class (*copyObject));\
     51    }\
     52}
    4353
    4454
Note: See TracChangeset for help on using the changeset viewer.