Changeset 5629 in orxonox.OLD for branches/world_entities/src/util/object_manager.h
- Timestamp:
- Nov 18, 2005, 12:32:35 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/util/object_manager.h
r5628 r5629 1 1 /*! 2 * @file proto_singleton.h2 * @file object_manager.h 3 3 * @brief Definition of the ... singleton Class 4 4 */ 5 5 6 #ifndef _ PROTO_SINGLETON_H7 #define _ PROTO_SINGLETON_H6 #ifndef _OBJECT_MANAGER_H 7 #define _OBJECT_MANAGER_H 8 8 9 9 #include "base_object.h" … … 12 12 13 13 //! A default singleton class. 14 class ProtoSingleton: public BaseObject {14 class ObjectManager : public BaseObject { 15 15 16 16 public: 17 virtual ~ ProtoSingleton(void);17 virtual ~ObjectManager(void); 18 18 /** @returns a Pointer to the only object of this Class */ 19 inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); returnsingletonRef; };19 inline static ObjectManager* getInstance(void) { if (!ObjectManager::singletonRef) ObjectManager::singletonRef = new ObjectManager(); return ObjectManager::singletonRef; }; 20 20 21 21 private: 22 ProtoSingleton(void);23 static ProtoSingleton* singletonRef;22 ObjectManager(void); 23 static ObjectManager* singletonRef; 24 24 }; 25 25 26 #endif /* _ PROTO_SINGLETON_H */26 #endif /* _OBJECT_MANAGER_H */
Note: See TracChangeset
for help on using the changeset viewer.