Changeset 4519 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 6, 2005, 2:36:04 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/event/event_handler.cc
r4457 r4519 55 55 */ 56 56 EventHandler* EventHandler::singletonRef = NULL; 57 58 59 /**60 \returns a Pointer to this Class61 */62 EventHandler* EventHandler::getInstance(void)63 {64 if (!EventHandler::singletonRef)65 EventHandler::singletonRef = new EventHandler();66 return EventHandler::singletonRef;67 }68 57 69 58 -
orxonox/trunk/src/lib/event/event_handler.h
r4457 r4519 19 19 20 20 public: 21 static EventHandler* getInstance(void);22 21 virtual ~EventHandler(void); 22 /** \returns a Pointer to the only object of this Class */ 23 inline static EventHandler* getInstance(void) { if (!singletonRef) singletonRef = new EventHandler(); return singletonRef; }; 23 24 void init(); 24 25 -
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r4458 r4519 47 47 */ 48 48 GraphicsEngine* GraphicsEngine::singletonRef = NULL; 49 50 /**51 \returns A pointer to this GraphicsEngine52 */53 GraphicsEngine* GraphicsEngine::getInstance()54 {55 if (!GraphicsEngine::singletonRef)56 GraphicsEngine::singletonRef = new GraphicsEngine();57 return GraphicsEngine::singletonRef;58 }59 60 49 61 50 /** -
orxonox/trunk/src/lib/graphics/graphics_engine.h
r4458 r4519 25 25 { 26 26 public: 27 static GraphicsEngine* getInstance();28 27 virtual ~GraphicsEngine(); 28 /** \returns a Pointer to the only object of this Class */ 29 inline static GraphicsEngine* getInstance(void) { if (!singletonRef) singletonRef = new GraphicsEngine(); return singletonRef; }; 29 30 30 31 int initVideo(); -
orxonox/trunk/src/lib/graphics/light.cc
r4471 r4519 251 251 */ 252 252 LightManager* LightManager::singletonRef = NULL; 253 254 255 /**256 \returns The Instance of the Lights257 */258 LightManager* LightManager::getInstance(void)259 {260 if (!singletonRef)261 LightManager::singletonRef = new LightManager();262 return singletonRef;263 }264 265 253 266 254 /** -
orxonox/trunk/src/lib/graphics/light.h
r4469 r4519 106 106 public: 107 107 virtual ~LightManager(void); 108 static LightManager* getInstance(); 108 /** \returns a Pointer to the only object of this Class */ 109 inline static LightManager* getInstance(void) { if (!singletonRef) singletonRef = new LightManager(); return singletonRef; }; 109 110 110 111 // set Attributes -
orxonox/trunk/src/lib/graphics/text_engine.cc
r4518 r4519 814 814 815 815 /** 816 \returns a Pointer to this Class817 */818 TextEngine* TextEngine::getInstance(void)819 {820 if (!TextEngine::singletonRef)821 TextEngine::singletonRef = new TextEngine();822 return TextEngine::singletonRef;823 }824 825 /**826 816 \brief standard deconstructor 827 817 -
orxonox/trunk/src/lib/graphics/text_engine.h
r4458 r4519 205 205 { 206 206 public: 207 static TextEngine* getInstance(void);208 207 virtual ~TextEngine(void); 208 /** \returns a Pointer to the only object of this Class */ 209 inline static TextEngine* getInstance(void) { if (!singletonRef) singletonRef = new TextEngine(); return singletonRef; }; 209 210 210 211 Text* createText(const char* fontFile, -
orxonox/trunk/src/lib/particles/particle_engine.cc
r4478 r4519 43 43 */ 44 44 ParticleEngine* ParticleEngine::singletonRef = NULL; 45 46 /**47 \returns a Pointer to this Class48 */49 ParticleEngine* ParticleEngine::getInstance(void)50 {51 if (!ParticleEngine::singletonRef)52 ParticleEngine::singletonRef = new ParticleEngine();53 return ParticleEngine::singletonRef;54 }55 45 56 46 /** -
orxonox/trunk/src/lib/particles/particle_engine.h
r4478 r4519 30 30 31 31 public: 32 static ParticleEngine* getInstance(void);33 32 virtual ~ParticleEngine(void); 33 /** \returns a Pointer to the only object of this Class */ 34 inline static ParticleEngine* getInstance(void) { if (!singletonRef) singletonRef = new ParticleEngine(); return singletonRef; }; 34 35 35 36 void tick(float dt); -
orxonox/trunk/src/lib/physics/physics_engine.cc
r4396 r4519 41 41 */ 42 42 PhysicsEngine* PhysicsEngine::singletonRef = NULL; 43 44 /**45 \returns a Pointer to this Class46 */47 PhysicsEngine* PhysicsEngine::getInstance(void)48 {49 if (!PhysicsEngine::singletonRef)50 PhysicsEngine::singletonRef = new PhysicsEngine();51 return PhysicsEngine::singletonRef;52 }53 43 54 44 /** -
orxonox/trunk/src/lib/physics/physics_engine.h
r4394 r4519 22 22 23 23 public: 24 static PhysicsEngine* getInstance(void);25 24 virtual ~PhysicsEngine(void); 25 /** \returns a Pointer to the only object of this Class */ 26 inline static PhysicsEngine* getInstance(void) { if (!singletonRef) singletonRef = new PhysicsEngine(); return singletonRef; }; 26 27 27 28 void addPhysicsInterface(PhysicsInterface* physicsInterface); -
orxonox/trunk/src/lib/sound/sound_engine.cc
r4506 r4519 174 174 */ 175 175 SoundEngine* SoundEngine::singletonRef = NULL; 176 177 /**178 \returns a Pointer to this Class179 */180 SoundEngine* SoundEngine::getInstance(void)181 {182 if (!SoundEngine::singletonRef)183 SoundEngine::singletonRef = new SoundEngine();184 return SoundEngine::singletonRef;185 }186 176 187 177 /** -
orxonox/trunk/src/lib/sound/sound_engine.h
r4506 r4519 71 71 72 72 public: 73 static SoundEngine* getInstance(void);74 73 virtual ~SoundEngine(void); 74 /** \returns a Pointer to the only object of this Class */ 75 inline static SoundEngine* getInstance(void) { if (!singletonRef) singletonRef = new SoundEngine(); return singletonRef; }; 75 76 76 77 SoundSource* createSource(const char* fileName, PNode* sourceNode = NULL); -
orxonox/trunk/src/proto/proto_singleton.cc
r4320 r4519 47 47 48 48 /** 49 \returns a Pointer to this Class50 */51 ProtoSingleton* ProtoSingleton::getInstance(void)52 {53 if (!ProtoSingleton::singletonRef)54 ProtoSingleton::singletonRef = new ProtoSingleton();55 return ProtoSingleton::singletonRef;56 }57 58 /**59 49 \brief standard deconstructor 60 50 -
orxonox/trunk/src/proto/proto_singleton.h
r3955 r4519 16 16 17 17 public: 18 static ProtoSingleton* getInstance(void);19 18 virtual ~ProtoSingleton(void); 19 /** \returns a Pointer to the only object of this Class */ 20 inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; }; 20 21 21 22 private: -
orxonox/trunk/src/subprojects/framework.cc
r4374 r4519 236 236 Framework* Framework::singletonRef = NULL; 237 237 238 Framework* Framework::getInstance(void)239 {240 if (Framework::singletonRef == NULL)241 Framework::singletonRef = new Framework();242 return Framework::singletonRef;243 }244 245 238 Framework::Framework() 246 239 { -
orxonox/trunk/src/subprojects/framework.h
r4374 r4519 37 37 ~Framework(); 38 38 39 static Framework* getInstance(void); 39 /** \returns a Pointer to the only object of this Class */ 40 inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework(); return singletonRef; }; 40 41 41 42 -
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.