Changeset 4519 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Jun 6, 2005, 2:36:04 PM (20 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/collision_detection/cd_engine.cc
r4511 r4519 36 36 37 37 /** 38 \returns a Pointer to this Class39 */40 CDEngine* CDEngine::getInstance(void)41 {42 if (!CDEngine::singletonRef)43 CDEngine::singletonRef = new CDEngine();44 return CDEngine::singletonRef;45 }46 47 /**48 38 \brief standard deconstructor 49 39 -
orxonox/trunk/src/util/collision_detection/cd_engine.h
r4511 r4519 15 15 16 16 public: 17 static CDEngine* getInstance(void);18 17 virtual ~CDEngine(void); 18 /** \returns a Pointer to the only object of this Class */ 19 inline static CDEngine* getInstance(void) { if (!singletonRef) singletonRef = new CDEngine(); return singletonRef; }; 19 20 20 21 private: -
orxonox/trunk/src/util/garbage_collector.cc
r4485 r4519 48 48 // delete what has to be deleted here 49 49 } 50 51 52 /**53 \brief this returns the singleton reference this this class54 \returns singleton reference55 */56 GarbageCollector* GarbageCollector::getInstance()57 {58 if( singletonRef == NULL)59 singletonRef = new GarbageCollector();60 return singletonRef;61 }62 63 50 64 51 /** -
orxonox/trunk/src/util/garbage_collector.h
r4485 r4519 22 22 23 23 public: 24 GarbageCollector();25 24 virtual ~GarbageCollector(); 26 static GarbageCollector* getInstance(); 25 /** \returns a Pointer to the only object of this Class */ 26 inline static GarbageCollector* getInstance(void) { if (!singletonRef) singletonRef = new GarbageCollector(); return singletonRef; }; 27 27 28 28 void setCollectionDelay(float delay); … … 34 34 35 35 private: 36 GarbageCollector(); 37 38 private: 36 39 static GarbageCollector* singletonRef; //!< The reference to this class (singleton) 37 40 float delay; //!< this is the delay to wait until collection -
orxonox/trunk/src/util/object_manager.cc
r4485 r4519 44 44 */ 45 45 ObjectManager* ObjectManager::singletonRef = NULL; 46 47 /**48 \returns a Pointer to this Class49 */50 ObjectManager* ObjectManager::getInstance(void)51 {52 if (!ObjectManager::singletonRef)53 ObjectManager::singletonRef = new ObjectManager();54 return ObjectManager::singletonRef;55 }56 57 46 58 47 /** -
orxonox/trunk/src/util/object_manager.h
r4485 r4519 48 48 49 49 public: 50 static ObjectManager* getInstance(void);51 50 virtual ~ObjectManager(void); 51 /** \returns a Pointer to the only object of this Class */ 52 inline static ObjectManager* getInstance(void) { if (!singletonRef) singletonRef = new ObjectManager(); return singletonRef; }; 52 53 53 54 /** a class handled by the objectManage */ -
orxonox/trunk/src/util/resource_manager.cc
r4504 r4519 46 46 this->imageDirs = new tList<char>(); 47 47 this->resourceList = new tList<Resource>(); 48 }49 50 /**51 \returns the Instance to this ResourceManager52 */53 ResourceManager* ResourceManager::getInstance(void)54 {55 if (!ResourceManager::singletonRef)56 ResourceManager::singletonRef = new ResourceManager();57 return ResourceManager::singletonRef;58 48 } 59 49 -
orxonox/trunk/src/util/resource_manager.h
r4465 r4519 74 74 public: 75 75 virtual ~ResourceManager(); 76 77 static ResourceManager* getInstance();76 /** \returns a Pointer to the only object of this Class */ 77 inline static ResourceManager* getInstance(void) { if (!singletonRef) singletonRef = new ResourceManager(); return singletonRef; }; 78 78 79 79 bool setDataDir(const char* dataDir);
Note: See TracChangeset
for help on using the changeset viewer.