Changeset 10542 for code/branches/core7/src/libraries/core/module
- Timestamp:
- Jun 7, 2015, 2:16:55 PM (9 years ago)
- Location:
- code/branches/core7/src/libraries/core/module
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/module/StaticInitializationManager.cc
r10536 r10542 33 33 namespace orxonox 34 34 { 35 /* static */ StaticInitializationManager& StaticInitializationManager::getInstance() 36 { 37 static StaticInitializationManager instance; 38 return instance; 39 } 35 StaticInitializationManager* StaticInitializationManager::singletonPtr_s = 0; 40 36 41 37 void StaticInitializationManager::addHandler(StaticInitializationHandler* handler) 42 38 { 39 handler->setupHandler(); 43 40 this->handlers_.push_back(handler); 44 41 } … … 47 44 { 48 45 this->handlers_.remove(handler); 46 handler->shutdownHandler(); 49 47 } 50 48 -
code/branches/core7/src/libraries/core/module/StaticInitializationManager.h
r10535 r10542 34 34 #include <list> 35 35 36 #include "util/Singleton.h" 37 36 38 namespace orxonox 37 39 { 38 class _CoreExport StaticInitializationManager 40 class _CoreExport StaticInitializationManager : public Singleton<StaticInitializationManager> 39 41 { 42 friend class Singleton<StaticInitializationManager>; 43 40 44 public: 41 static StaticInitializationManager& getInstance();42 43 45 StaticInitializationManager() {} 44 46 virtual ~StaticInitializationManager() {} … … 52 54 private: 53 55 std::list<StaticInitializationHandler*> handlers_; 56 57 static StaticInitializationManager* singletonPtr_s; 54 58 }; 55 59 }
Note: See TracChangeset
for help on using the changeset viewer.