- Timestamp:
- May 24, 2015, 11:42:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/singleton/ScopeManager.cc
r10461 r10462 32 32 */ 33 33 34 #include "ScopeManager.h" 35 34 36 #include "Scope.h" 35 37 36 38 namespace orxonox 37 39 { 38 /* static*/ std::map<ScopeID::Value, int>& ScopeManager::getInstanceCounts()40 /* static */ ScopeManager& ScopeManager::getInstance() 39 41 { 40 static std::map<ScopeID::Value, int> instanceCounts;41 return instance Counts;42 static ScopeManager instance; 43 return instance; 42 44 } 43 /*static*/ std::map<ScopeID::Value, std::set<ScopeListener*> >& ScopeManager::getListeners() 45 46 void ScopeManager::addListener(ScopeListener* listener) 44 47 { 45 static std::map<ScopeID::Value, std::set<ScopeListener*> > listeners; 46 return listeners; 48 this->listeners_[listener->getScope()].insert(listener); 49 } 50 51 void ScopeManager::removeListener(ScopeListener* listener) 52 { 53 this->listeners_[listener->getScope()].erase(listener); 47 54 } 48 55 }
Note: See TracChangeset
for help on using the changeset viewer.