Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2015, 10:14:12 AM (9 years ago)
Author:
landauf
Message:

refactoring: moved code from Scope.h into ScopeManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/singleton/Scope.h

    r10463 r10513  
    6868    class _CoreExport ScopeListener
    6969    {
    70         template <ScopeID::Value scope>
    71         friend class Scope;
     70        friend class ScopeManager;
    7271
    7372        protected:
     
    108107                Loki::ScopeGuard deactivator = Loki::MakeObjGuard(*this, &Scope::deactivateScope);
    109108                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                 }
    115109                deactivator.Dismiss();
    116110
     
    132126            {
    133127                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                         try
    139                             { (*it)->deactivated(); }
    140                         catch (...)
    141                             { orxout(internal_warning) << "ScopeListener::deactivated() failed! This MUST NOT happen, fix it!" << endl; }
    142                         (*(it++))->bActivated_ = false;
    143                     }
    144                     else
    145                         ++it;
    146                 }
    147128            }
    148129
Note: See TracChangeset for help on using the changeset viewer.