Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4285 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 25, 2005, 4:51:27 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: started implementing objectmanager - this will be some hard work…

Location:
orxonox/trunk/src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/loading/load_param.cc

    r4261 r4285  
    1010
    1111   ### File Specific:
    12    main-programmer: Christian Meyer
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
  • orxonox/trunk/src/util/object_manager.cc

    r4245 r4285  
    2828   this->setClassName ("ObjectManager");
    2929
     30  this->managedObjectList = new BaseObject*[CL_NUMBER];
    3031}
    3132
     
    4546}
    4647
     48
    4749/**
    4850   \brief standard deconstructor
     
    5254{
    5355  ObjectManager::singletonRef = NULL;
     56}
    5457
     58
     59void ObjectManager::cache(classList index, int number)
     60{
     61  this->managedObjectList[index] = new BaseObject();
    5562}
     63
     64
     65void ObjectManager::addToDeadList(const char* className, BaseObject* object)
     66{}
     67
     68
     69BaseObject* ObjectManager::getFromDeadList(const char* className, int number)
     70{}
  • orxonox/trunk/src/util/object_manager.h

    r4245 r4285  
    2121
    2222
     23//! list of classes able to be loaded via the object manager
     24struct classListElement
     25{
     26  char* name;
     27};
     28#include "class_list.h"
     29
     30
     31
    2332template<class T> class tList;
     33template<class T> class ManagedObject;
    2434
    2535//! the object manager itself
     
    2939  static ObjectManager* getInstance(void);
    3040  virtual ~ObjectManager(void);
    31 
    32   void preLoad();
     41 
     42  void cache(classList index, int number);
     43  void addToDeadList(const char* className, BaseObject* object);
     44  BaseObject* getFromDeadList(const char* className, int number = 1);
    3345
    3446 private:
     
    3648  static ObjectManager* singletonRef;
    3749
    38   tList<WorldEntity>* projectileBuffer;            //!< a list of projectiles that is generated at the beginning to make orx faster
     50  BaseObject** managedObjectList;
     51};
    3952
    4053
     54template<class T> class ManagedObject
     55{
     56 public:
     57  const char* className;
     58  tList<T>* objectList;
    4159};
    4260
     61#define createClassFromName(className)
     62
     63
    4364#endif /* _OBJECT_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.