Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2015, 2:16:55 PM (9 years ago)
Author:
landauf
Message:

clean and explicit setup/shutdown of singletons that are used by statically initialized instances

File:
1 edited

Legend:

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

    r10538 r10542  
    4141#include <set>
    4242
     43#include "util/Singleton.h"
     44
    4345namespace orxonox
    4446{
     
    5254        @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager.
    5355    */
    54     class _CoreExport ScopeManager
     56    class _CoreExport ScopeManager : public Singleton<ScopeManager>
    5557    {
     58        friend class Singleton<ScopeManager>;
     59
    5660        public:
    57             static ScopeManager& getInstance();
    58 
    5961            /** Adds a scope and activates all listeners which are registered for this scope */
    6062            void addScope(ScopeID::Value scope);
     
    7880            std::set<ScopeID::Value> activeScopes_;
    7981            std::map<ScopeID::Value, std::set<ScopeListener*> > listeners_; //!< Stores all listeners for a scope
     82
     83            static ScopeManager* singletonPtr_s;
    8084    };
    8185}
Note: See TracChangeset for help on using the changeset viewer.