Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/Core.h

    r9667 r10624  
    4747#include "util/DestructionHelper.h"
    4848#include "util/Singleton.h"
    49 #include "config/Configurable.h"
     49#include "CoreConfig.h"
    5050
    5151namespace orxonox
    5252{
    53     //! Informs about changes in the Development Mode.
    54     class DevModeListener : virtual public Listable
    55     {
    56     public:
    57         DevModeListener();
    58         virtual ~DevModeListener() {}
    59         virtual void devModeChanged(bool value) = 0;
    60     };
    61 
    6253    /**
    6354    @brief
     
    6657        You should only create this singleton once because it destroys the identifiers!
    6758    */
    68     class _CoreExport Core : public Singleton<Core>, public Configurable
     59    class _CoreExport Core : public Singleton<Core>
    6960    {
    7061        friend class Singleton<Core>;
    71         friend class Game;
    7262
    7363        public:
     
    8676            void destroy();
    8777
    88             void setConfigValues();
     78            void preUpdate(const Clock& time);
     79            void postUpdate(const Clock& time);
    8980
    90             //! Returns the configured language.
    91             const std::string& getLanguage()
    92                 { return this->language_; }
    93             void resetLanguage();
     81            void loadGraphics();
     82            void unloadGraphics(bool loadGraphicsManagerWithoutRenderer = true);
    9483
    95             void updateLastLevelTimestamp();
    96             inline long long getLastLevelTimestamp() const
    97                 { return this->lastLevelTimestamp_; }
     84            void loadModules();
     85            void unloadModules();
     86            void loadModule(ModuleInstance* module);
     87            void unloadModule(ModuleInstance* module);
    9888
    99             void updateOgreConfigTimestamp();
    100             inline long long getOgreConfigTimestamp() const
    101                 { return this->ogreConfigTimestamp_; }
    102 
    103             //! Developers bit. If returns false, some options are not available as to not confuse the normal user.
    104             inline bool inDevMode(void) const
    105                 { return this->bDevMode_; }
     89            inline CoreConfig* getConfig() const
     90                { return this->config_; }
    10691
    10792        private:
    10893            Core(const Core&); //!< Don't use (undefined symbol)
    10994
    110             void devModeChanged();
    111             void languageChanged();
    112             void initRandomNumberGenerator();
    113 
    114             void preUpdate(const Clock& time);
    115             void postUpdate(const Clock& time);
    116 
    117             void loadGraphics();
    118             void unloadGraphics();
    119 
    12095            void setThreadAffinity(int limitToCPU);
    12196
    122             PathConfig*               pathConfig_;
    123             DynLibManager*            dynLibManager_;
    124             SignalHandler*            signalHandler_;
    125             ConfigFileManager*        configFileManager_;
    126             Language*                 languageInstance_;
    127             IOConsole*                ioConsole_;
    128             TclBind*                  tclBind_;
    129             TclThreadManager*         tclThreadManager_;
    130             Scope<ScopeID::Root>*     rootScope_;
     97            ApplicationPaths*                applicationPaths_;
     98            ConfigurablePaths*               configurablePaths_;
     99            DynLibManager*                   dynLibManager_;
     100            SignalHandler*                   signalHandler_;
     101            ConfigFileManager*               configFileManager_;
     102            Language*                        languageInstance_;
     103            Loader*                          loaderInstance_;
     104            IOConsole*                       ioConsole_;
     105            TclBind*                         tclBind_;
     106            TclThreadManager*                tclThreadManager_;
     107            Scope<ScopeID::ROOT>*            rootScope_;
    131108            // graphical
    132             GraphicsManager*          graphicsManager_;            //!< Interface to OGRE
    133             InputManager*             inputManager_;               //!< Interface to OIS
    134             GUIManager*               guiManager_;                 //!< Interface to GUI
    135             Scope<ScopeID::Graphics>* graphicsScope_;
     109            GraphicsManager*                 graphicsManager_;            //!< Interface to OGRE
     110            InputManager*                    inputManager_;               //!< Interface to OIS
     111            GUIManager*                      guiManager_;                 //!< Interface to GUI
     112            Scope<ScopeID::GRAPHICS>*        graphicsScope_;
     113            bool                             bGraphicsLoaded_;
    136114
    137             bool                      bGraphicsLoaded_;
    138             std::string               language_;                   //!< The language
    139             bool                      bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
    140             bool                      bStartIOConsole_;            //!< Set to false if you don't want to use the IOConsole
    141             long long                 lastLevelTimestamp_;         ///< Timestamp when the last level was started
    142             long long                 ogreConfigTimestamp_;        ///< Timestamp wehen the ogre config level was modified
    143             bool                      bDevMode_;                   //!< Developers bit. If set to false, some options are not available as to not confuse the normal user.
     115            CoreStaticInitializationHandler* staticInitHandler_;
     116            PluginManager*                   pluginManager_;
     117            ModuleInstance*                  rootModule_;
     118            std::list<ModuleInstance*>       modules_;
     119
     120            /// Helper object that stores the config values
     121            CoreConfig*                      config_;
    144122
    145123            /// Helper object that executes the surrogate destructor destroy()
    146             DestructionHelper<Core>   destructionHelper_;
     124            DestructionHelper<Core>          destructionHelper_;
    147125
    148             static Core*              singletonPtr_s;
     126            static Core*                     singletonPtr_s;
    149127    };
    150128}
Note: See TracChangeset for help on using the changeset viewer.