Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5629 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 18, 2005, 12:32:35 PM (19 years ago)
Author:
bensch
Message:

we: added grid for ObjectManager

Location:
branches/world_entities/src/util
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/world_entities/src/util/Makefile.am

    r5558 r5629  
    55
    66libORXutils_a_SOURCES = fast_factory.cc \
     7                        object_manager.cc \
    78                        loading/factory.cc \
    89                        garbage_collector.cc \
     
    1819                        track/pilot_node.cc \
    1920                        track/track_manager.cc \
    20                         track/track_node.cc
     21                        track/track_node.cc 
    2122
    2223noinst_HEADERS =        fast_factory.h \
     24                        object_manager.h \
    2325                        garbage_collector.h \
    2426                        state.h \
  • branches/world_entities/src/util/Makefile.in

    r5558 r5629  
    5454libORXutils_a_AR = $(AR) $(ARFLAGS)
    5555libORXutils_a_LIBADD =
    56 am_libORXutils_a_OBJECTS = fast_factory.$(OBJEXT) factory.$(OBJEXT) \
     56am_libORXutils_a_OBJECTS = fast_factory.$(OBJEXT) \
     57        object_manager.$(OBJEXT) factory.$(OBJEXT) \
    5758        garbage_collector.$(OBJEXT) state.$(OBJEXT) \
    5859        user_control.$(OBJEXT) animation3d.$(OBJEXT) \
     
    190191noinst_LIBRARIES = libORXutils.a
    191192libORXutils_a_SOURCES = fast_factory.cc \
     193                        object_manager.cc \
    192194                        loading/factory.cc \
    193195                        garbage_collector.cc \
     
    203205                        track/pilot_node.cc \
    204206                        track/track_manager.cc \
    205                         track/track_node.cc
     207                        track/track_node.cc 
    206208
    207209noinst_HEADERS = fast_factory.h \
     210                        object_manager.h \
    208211                        garbage_collector.h \
    209212                        state.h \
     
    278281@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param.Po@am__quote@
    279282@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param_description.Po@am__quote@
     283@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object_manager.Po@am__quote@
    280284@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pilot_node.Po@am__quote@
    281285@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
  • branches/world_entities/src/util/fast_factory.cc

    r5041 r5629  
    1313*/
    1414
    15 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_OBJECT_MANAGER
     15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
    1616
    1717#include "fast_factory.h"
  • branches/world_entities/src/util/object_manager.cc

    r5628 r5629  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1717
    18 #include "proto_singleton.h"
     18#include "object_manager.h"
    1919
    2020using namespace std;
     
    2424 * standard constructor
    2525 */
    26 ProtoSingleton::ProtoSingleton ()
     26ObjectManager::ObjectManager ()
    2727{
    28    this->setClassID(CL_PROTO_ID, "ProtoSingleton");
    29    this->setName("ProtoSingleton");
    30 
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    35    !!!!!!!!!! IMPORTANT FOR SINGLETON !!!!!!!!!!!!!!!!
    36         3. SingleTon MUST be CL_NEW_CLASS = 0x00000fxx
    37 
    38       Advanced Topics:
    39       - if you want to let your object be managed via the ObjectManager make sure to read
    40         the object_manager.h header comments. You will use this most certanly only if you
    41         make many objects of your class, like a weapon bullet.
    42    */
     28   this->setClassID(CL_OBJECT_MANAGER, "ObjectManager");
     29   this->setName("ObjectManager");
    4330}
    4431
     
    4633 *  the singleton reference to this class
    4734 */
    48 ProtoSingleton* ProtoSingleton::singletonRef = NULL;
     35ObjectManager* ObjectManager::singletonRef = NULL;
    4936
    5037/**
    5138   @brief standard deconstructor
    5239 */
    53 ProtoSingleton::~ProtoSingleton ()
     40ObjectManager::~ObjectManager ()
    5441{
    55   ProtoSingleton::singletonRef = NULL;
     42  ObjectManager::singletonRef = NULL;
    5643}
  • branches/world_entities/src/util/object_manager.h

    r5628 r5629  
    11/*!
    2  * @file proto_singleton.h
     2 * @file object_manager.h
    33 * @brief Definition of the ... singleton Class
    44*/
    55
    6 #ifndef _PROTO_SINGLETON_H
    7 #define _PROTO_SINGLETON_H
     6#ifndef _OBJECT_MANAGER_H
     7#define _OBJECT_MANAGER_H
    88
    99#include "base_object.h"
     
    1212
    1313//! A default singleton class.
    14 class ProtoSingleton : public BaseObject {
     14class ObjectManager : public BaseObject {
    1515
    1616 public:
    17   virtual ~ProtoSingleton(void);
     17  virtual ~ObjectManager(void);
    1818  /** @returns a Pointer to the only object of this Class */
    19   inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton();  return singletonRef; };
     19  inline static ObjectManager* getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager();  return ObjectManager::singletonRef; };
    2020
    2121 private:
    22   ProtoSingleton(void);
    23   static ProtoSingleton* singletonRef;
     22  ObjectManager(void);
     23  static ObjectManager* singletonRef;
    2424};
    2525
    26 #endif /* _PROTO_SINGLETON_H */
     26#endif /* _OBJECT_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.