Changeset 3923 in orxonox.OLD for orxonox/branches/particleEngine/src/lib
- Timestamp:
- Apr 21, 2005, 3:04:21 PM (20 years ago)
- Location:
- orxonox/branches/particleEngine/src/lib/graphics/partices
- Files:
-
- 1 added
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/particleEngine/src/lib/graphics/partices/particle_engine.cc
r3922 r3923 24 24 \brief standard constructor 25 25 */ 26 P rotoSingleton::ProtoSingleton()26 ParticleEngine::ParticleEngine () 27 27 { 28 this->setClassName ("P rotoSingleton");28 this->setClassName ("ParticleEngine"); 29 29 30 30 } … … 33 33 \brief the singleton reference to this class 34 34 */ 35 P rotoSingleton* ProtoSingleton::singletonRef = NULL;35 ParticleEngine* ParticleEngine::singletonRef = NULL; 36 36 37 37 /** 38 38 \returns a Pointer to this Class 39 39 */ 40 P rotoSingleton* ProtoSingleton::getInstance(void)40 ParticleEngine* ParticleEngine::getInstance(void) 41 41 { 42 if (!P rotoSingleton::singletonRef)43 P rotoSingleton::singletonRef = new ProtoSingleton();44 return P rotoSingleton::singletonRef;42 if (!ParticleEngine::singletonRef) 43 ParticleEngine::singletonRef = new ParticleEngine(); 44 return ParticleEngine::singletonRef; 45 45 } 46 46 47 47 /** 48 \brief standard de constructor48 \brief standard destructor 49 49 50 50 */ 51 P rotoSingleton::~ProtoSingleton()51 ParticleEngine::~ParticleEngine () 52 52 { 53 P rotoSingleton::singletonRef = NULL;53 ParticleEngine::singletonRef = NULL; 54 54 55 55 } -
orxonox/branches/particleEngine/src/lib/graphics/partices/particle_engine.h
r3922 r3923 1 1 /*! 2 \file proto_singleton.h 3 \brief Definition of the proto class template, used quickly start work 4 5 a simple file to copy and create a singleton-class from 2 \file particle_engine.h 3 \brief Definition of the ParticleEngine 6 4 */ 7 5 8 #ifndef _P ROTO_SINGLETON_H9 #define _P ROTO_SINGLETON_H6 #ifndef _PARTICLE_ENGINE_H 7 #define _PARTICLE_ENGINE_H 10 8 11 9 #include "base_object.h" 12 10 13 // FORWARD DEFINITION \\11 // FORWARD DEFINITION 14 12 15 13 //! A default singleton class. 16 class P rotoSingleton: public BaseObject {14 class ParticleEngine : public BaseObject { 17 15 18 16 public: 19 static P rotoSingleton* getInstance(void);20 virtual ~P rotoSingleton(void);17 static ParticleEngine* getInstance(void); 18 virtual ~ParticleEngine(void); 21 19 22 20 private: 23 P rotoSingleton(void);24 static P rotoSingleton* singletonRef;21 ParticleEngine(void); 22 static ParticleEngine* singletonRef; 25 23 }; 26 24 27 #endif /* _P ROTO_SINGLETON_H */25 #endif /* _PARTICLE_ENGINE_H */
Note: See TracChangeset
for help on using the changeset viewer.