- Timestamp:
- May 31, 2015, 10:14:12 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/singleton/Scope.h
r10463 r10513 68 68 class _CoreExport ScopeListener 69 69 { 70 template <ScopeID::Value scope> 71 friend class Scope; 70 friend class ScopeManager; 72 71 73 72 protected: … … 108 107 Loki::ScopeGuard deactivator = Loki::MakeObjGuard(*this, &Scope::deactivateScope); 109 108 ScopeManager::getInstance().addScope(scope); 110 for (typename std::set<ScopeListener*>::iterator it = ScopeManager::getInstance().getListeners(scope).begin(); it != ScopeManager::getInstance().getListeners(scope).end(); )111 {112 (*it)->activated();113 (*(it++))->bActivated_ = true;114 }115 109 deactivator.Dismiss(); 116 110 … … 132 126 { 133 127 ScopeManager::getInstance().removeScope(scope); 134 for (typename std::set<ScopeListener*>::iterator it = ScopeManager::getInstance().getListeners(scope).begin(); it != ScopeManager::getInstance().getListeners(scope).end(); )135 {136 if ((*it)->bActivated_)137 {138 try139 { (*it)->deactivated(); }140 catch (...)141 { orxout(internal_warning) << "ScopeListener::deactivated() failed! This MUST NOT happen, fix it!" << endl; }142 (*(it++))->bActivated_ = false;143 }144 else145 ++it;146 }147 128 } 148 129
Note: See TracChangeset
for help on using the changeset viewer.