Changeset 4346 in orxonox.OLD for orxonox/trunk/src/util/event/event_handler.cc
- Timestamp:
- May 27, 2005, 11:53:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/event/event_handler.cc
r4329 r4346 10 10 11 11 ### File Specific: 12 main-programmer: ...13 co-programmer: ...12 main-programmer: Patrick Boenzli 13 co-programmer: 14 14 */ 15 15 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_EVENT 17 17 18 #include " proto_singleton.h"18 #include "event_handler.h" 19 19 20 20 using namespace std; … … 24 24 \brief standard constructor 25 25 */ 26 ProtoSingleton::ProtoSingleton()26 EventHandler::EventHandler () 27 27 { 28 this->setClassName("ProtoSingleton"); 29 this->setClassID(CL_PROTO_ID, "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_list.h eg. CL_NEW_CLASS 35 36 Advanced Topics: 37 - if you want to let your object be managed via the ObjectManager make sure to read 38 the object_manager.h header comments. You will use this most certanly only if you 39 make many objects of your class, like a weapon bullet. 40 */ 28 this->setClassID(CL_EVENT_HANDLER, "EventHandler"); 41 29 } 42 30 … … 44 32 \brief the singleton reference to this class 45 33 */ 46 ProtoSingleton* ProtoSingleton::singletonRef = NULL;34 EventHandler* EventHandler::singletonRef = NULL; 47 35 48 36 /** 49 37 \returns a Pointer to this Class 50 38 */ 51 ProtoSingleton* ProtoSingleton::getInstance(void)39 EventHandler* EventHandler::getInstance(void) 52 40 { 53 if (! ProtoSingleton::singletonRef)54 ProtoSingleton::singletonRef = new ProtoSingleton();55 return ProtoSingleton::singletonRef;41 if (!EventHandler::singletonRef) 42 EventHandler::singletonRef = new EventHandler(); 43 return EventHandler::singletonRef; 56 44 } 57 45 … … 60 48 61 49 */ 62 ProtoSingleton::~ProtoSingleton()50 EventHandler::~EventHandler () 63 51 { 64 ProtoSingleton::singletonRef = NULL;52 EventHandler::singletonRef = NULL; 65 53 66 54 }
Note: See TracChangeset
for help on using the changeset viewer.