Changeset 10542 for code/branches/core7/src/libraries/core/singleton
- Timestamp:
- Jun 7, 2015, 2:16:55 PM (9 years ago)
- Location:
- code/branches/core7/src/libraries/core/singleton
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/singleton/ScopeManager.cc
r10538 r10542 38 38 namespace orxonox 39 39 { 40 /* static */ ScopeManager& ScopeManager::getInstance() 41 { 42 static ScopeManager instance; 43 return instance; 44 } 40 ScopeManager* ScopeManager::singletonPtr_s = 0; 45 41 46 42 void ScopeManager::addScope(ScopeID::Value scope) -
code/branches/core7/src/libraries/core/singleton/ScopeManager.h
r10538 r10542 41 41 #include <set> 42 42 43 #include "util/Singleton.h" 44 43 45 namespace orxonox 44 46 { … … 52 54 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 53 55 */ 54 class _CoreExport ScopeManager 56 class _CoreExport ScopeManager : public Singleton<ScopeManager> 55 57 { 58 friend class Singleton<ScopeManager>; 59 56 60 public: 57 static ScopeManager& getInstance();58 59 61 /** Adds a scope and activates all listeners which are registered for this scope */ 60 62 void addScope(ScopeID::Value scope); … … 78 80 std::set<ScopeID::Value> activeScopes_; 79 81 std::map<ScopeID::Value, std::set<ScopeListener*> > listeners_; //!< Stores all listeners for a scope 82 83 static ScopeManager* singletonPtr_s; 80 84 }; 81 85 }
Note: See TracChangeset
for help on using the changeset viewer.