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/ConfigFileManager.h

    r3196 r3366  
    3838
    3939#include "util/OrxEnum.h"
     40#include "util/Singleton.h"
    4041
    4142namespace orxonox
     
    267268    // ConfigFileManager //
    268269    ///////////////////////
    269     class _CoreExport ConfigFileManager
    270     {
     270    class _CoreExport ConfigFileManager : public Singleton<ConfigFileManager>
     271    {
     272        friend class Singleton<ConfigFileManager>;
    271273        public:
    272274            ConfigFileManager();
     
    305307            void updateConfigValues(ConfigFileType type);
    306308
    307             static ConfigFileManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
    308 
    309309        private:
    310310            ConfigFileManager(const ConfigFileManager&);
     
    315315            unsigned int mininmalFreeType_;
    316316
    317             static ConfigFileManager* singletonRef_s;
     317            static ConfigFileManager* singletonPtr_s;
    318318    };
    319319}
Note: See TracChangeset for help on using the changeset viewer.