Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2009, 10:27:10 PM (15 years ago)
Author:
rgrieder
Message:

Derived all singletons implemented in a usual manner from orxonox::Singleton<T>.
This resolves inconsistencies with the singletonPtr_s variable in case of exceptions (asserts were being triggered then).
And while at it replaced singletonRef_s with singletonPtr_s for it to be less misleading (as fabian has already pointed out).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/Shell.h

    r3280 r3366  
    6060    };
    6161
    62     class _CoreExport Shell : virtual public OrxonoxClass, public OutputBufferListener
     62    class _CoreExport Shell : public Singleton<Shell>, virtual public OrxonoxClass, public OutputBufferListener
    6363    {
     64        friend class Singleton<Shell>;
    6465        public:
    6566            Shell();
    6667            virtual ~Shell();
    67 
    68             static Shell& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
    6968
    7069            static void clearShell();
     
    148147            ConfigFileType commandHistoryConfigFileType_;
    149148
    150             static Shell* singletonRef_s;
     149            static Shell* singletonPtr_s;
    151150    };
    152151}
Note: See TracChangeset for help on using the changeset viewer.