Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2009, 6:19:58 PM (14 years ago)
Author:
rgrieder
Message:

Removed CoreConfiguration and GameConfiguration workaround. I have found an easy solution that doesn't need this.
Config values for these classes can again be found under "Game" and "Core".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/Core.h

    r6105 r6121  
    3535#include <cassert>
    3636#include <boost/scoped_ptr.hpp>
    37 #include "util/OutputHandler.h"
    38 #include "util/Scope.h"
    3937#include "util/ScopeGuard.h"
    4038#include "util/Singleton.h"
     39#include "core/OrxonoxClass.h"
    4140
    4241namespace orxonox
    4342{
    44     class CoreConfiguration;
    45 
    4643    /**
    4744    @brief
     
    5047        You should only create this singleton once because it destroys the identifiers!
    5148    */
    52     class _CoreExport Core : public Singleton<Core>
     49    class _CoreExport Core : public Singleton<Core>, public OrxonoxClass
    5350    {
    5451        typedef Loki::ScopeGuardImpl0<void (*)()> SimpleScopeGuard;
     
    6966            void setConfigValues();
    7067
    71             static const std::string& getLanguage();
    72             static void  resetLanguage();
     68            //! Returns the configured language.
     69            const std::string& getLanguage()
     70                { return this->language_; }
     71            void resetLanguage();
    7372
    7473        private:
    7574            Core(const Core&); //!< Don't use (undefined symbol)
     75
     76            void languageChanged();
     77            void initRandomNumberGenerator();
    7678
    7779            void preUpdate(const Clock& time);
     
    8284
    8385            void setThreadAffinity(int limitToCPU);
    84 
     86            // MANAGED SINGLETONS/OBJECTS
    8587            // Mind the order for the destruction!
    8688            scoped_ptr<PathConfig>        pathConfig_;
     
    9294            scoped_ptr<Language>          languageInstance_;
    9395            scoped_ptr<IOConsole>         ioConsole_;
    94             scoped_ptr<CoreConfiguration> configuration_;
    9596            scoped_ptr<TclBind>           tclBind_;
    9697            scoped_ptr<TclThreadManager>  tclThreadManager_;
     98            scoped_ptr<Scope<ScopeID::Root> >     rootScope_;
    9799            // graphical
    98100            scoped_ptr<GraphicsManager>   graphicsManager_;     //!< Interface to OGRE
    99101            scoped_ptr<InputManager>      inputManager_;        //!< Interface to OIS
    100102            scoped_ptr<GUIManager>        guiManager_;          //!< Interface to GUI
    101             scoped_ptr<Scope<ScopeID::Root> >     rootScope_;
    102103            scoped_ptr<Scope<ScopeID::Graphics> > graphicsScope_;
    103104
    104105            bool                          bGraphicsLoaded_;
    105             static Core* singletonPtr_s;
     106            int                           softDebugLevelLogFile_;      //!< The debug level for the log file (belongs to OutputHandler)
     107            std::string                   language_;                   //!< The language
     108            bool                          bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
     109
     110            static Core*                  singletonPtr_s;
    106111    };
    107112}
Note: See TracChangeset for help on using the changeset viewer.