Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2015, 11:19:15 PM (9 years ago)
Author:
landauf
Message:

StaticallyInitializedScopedSingletonWrapper registers ScopedSingletonWrapper in ScopeManager

File:
1 edited

Legend:

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

    r10458 r10460  
    7676        template <ScopeID::Value scope>
    7777        friend class Scope;
    78         friend class ScopeListener;
     78        friend class StaticallyInitializedScopedSingletonWrapper;
    7979
    8080        private:
     
    9595
    9696        protected:
    97             //! Constructor: Registers the instance.
    98             ScopeListener(ScopeID::Value scope) : scope_(scope), bActivated_(false)
    99                 { ScopeManager::getListeners()[this->scope_].insert(this); }
    100             //! Destructor: Unregisters the instance.
    101             virtual ~ScopeListener()
    102                 { ScopeManager::getListeners()[this->scope_].erase(this); }
     97            ScopeListener(ScopeID::Value scope) : scope_(scope), bActivated_(false) { }
     98            virtual ~ScopeListener() { }
    10399
    104100            //! Gets called if the scope is activated
     
    106102            //! Gets called if the scope is deactivated
    107103            virtual void deactivated() = 0;
     104
     105        public:
     106            inline ScopeID::Value getScope() const
     107                { return this->scope_; }
    108108
    109109        private:
Note: See TracChangeset for help on using the changeset viewer.