Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 1, 2009, 11:44:53 AM (15 years ago)
Author:
rgrieder
Message:

Moved the singleton creation/destruction mess to the Core class by using just two possible Scopes:

  • ScopeID::Root for singletons that may always persists
  • ScopeID::Graphics for singletons that only work when graphics was loaded
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/LevelManager.h

    r3370 r5850  
    3636#include <string>
    3737
    38 #include "util/Singleton.h"
     38#include "util/ScopedSingleton.h"
    3939#include "core/OrxonoxClass.h"
    4040
     
    4444    class _OrxonoxExport LevelManager
    4545    // tolua_end
    46         : public Singleton<LevelManager>, public OrxonoxClass
     46        : public ScopedSingleton<LevelManager, ScopeID::Root>, public OrxonoxClass
    4747    { // tolua_export
    48             friend class Singleton<LevelManager>;
     48            friend class ScopedSingleton<LevelManager, ScopeID::Root>;
    4949        public:
    5050            LevelManager();
     
    6363
    6464            static LevelManager* getInstancePtr() { return singletonPtr_s; }
    65             static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
     65            static LevelManager& getInstance()    { return ScopedSingleton<LevelManager, ScopeID::Root>::getInstance(); } // tolua_export
    6666
    6767        private:
Note: See TracChangeset for help on using the changeset viewer.