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
Location:
code/branches/core5/src/modules/questsystem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/questsystem/QuestManager.h

    r5760 r5850  
    5050namespace orxonox
    5151{
    52 
    53     typedef ScopedSingleton<QuestManager, ScopeID::GSLevel> ScopedSingletonQuestManagerGSLevel; // workaround for tolua
    54 
    5552    /**
    5653    @brief
     
    6057        Damian 'Mozork' Frick
    6158    */
    62     class _QuestsystemExport QuestManager : public ScopedSingletonQuestManagerGSLevel, public orxonox::OrxonoxClass
    63     {
     59    class _QuestsystemExport QuestManager
    6460// tolua_end
     61        : public ScopedSingleton<QuestManager, ScopeID::Root>, public orxonox::OrxonoxClass
     62    { // tolua_export
    6563
    66             friend class ScopedSingleton<QuestManager, ScopeID::GSLevel>;
     64            friend class ScopedSingleton<QuestManager, ScopeID::Root>;
    6765            friend class QuestGUI;
    6866
     
    7270
    7371            //! Returns a reference to the single instance of the Quest Manager.
    74             static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::GSLevel>::getInstance(); } // tolua_export
     72            static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::Root>::getInstance(); } // tolua_export
    7573
    7674            //! Retreive the main window for the GUI.
  • code/branches/core5/src/modules/questsystem/notifications/NotificationManager.h

    r5738 r5850  
    4646namespace orxonox
    4747{
    48 
    4948    /**
    5049    @brief
     
    5453        Damian 'Mozork' Frick
    5554    */
    56     class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::GSLevel>, public OrxonoxClass
     55    class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::Root>, public OrxonoxClass
    5756    {
    58             friend class ScopedSingleton<NotificationManager, ScopeID::GSLevel>;
     57            friend class ScopedSingleton<NotificationManager, ScopeID::Root>;
    5958        public:
    6059            NotificationManager();
Note: See TracChangeset for help on using the changeset viewer.