OpenMW
apps/openmw/mwbase/environment.hpp
Go to the documentation of this file.
00001 #ifndef GAME_BASE_INVIRONMENT_H
00002 #define GAME_BASE_INVIRONMENT_H
00003 
00004 namespace MWBase
00005 {
00006     class World;
00007     class ScriptManager;
00008     class DialogueManager;
00009     class Journal;
00010     class SoundManager;
00011     class MechanicsManager;
00012     class InputManager;
00013     class WindowManager;
00014 
00021     class Environment
00022     {
00023             static Environment *sThis;
00024 
00025             World *mWorld;
00026             SoundManager *mSoundManager;
00027             ScriptManager *mScriptManager;
00028             WindowManager *mWindowManager;
00029             MechanicsManager *mMechanicsManager;
00030             DialogueManager *mDialogueManager;
00031             Journal *mJournal;
00032             InputManager *mInputManager;
00033             float mFrameDuration;
00034 
00035             static bool sExit;
00036 
00037             Environment (const Environment&);
00039 
00040             Environment& operator= (const Environment&);
00042 
00043         public:
00044 
00045             Environment();
00046 
00047             ~Environment();
00048 
00049             static void setRequestExit () { sExit = true; }
00050             static bool getRequestExit () { return sExit; }
00051 
00052             void setWorld (World *world);
00053 
00054             void setSoundManager (SoundManager *soundManager);
00055 
00056             void setScriptManager (MWBase::ScriptManager *scriptManager);
00057 
00058             void setWindowManager (WindowManager *windowManager);
00059 
00060             void setMechanicsManager (MechanicsManager *mechanicsManager);
00061 
00062             void setDialogueManager (DialogueManager *dialogueManager);
00063 
00064             void setJournal (Journal *journal);
00065 
00066             void setInputManager (InputManager *inputManager);
00067 
00068             void setFrameDuration (float duration);
00070 
00071             World *getWorld() const;
00072 
00073             SoundManager *getSoundManager() const;
00074 
00075             ScriptManager *getScriptManager() const;
00076 
00077             WindowManager *getWindowManager() const;
00078 
00079             MechanicsManager *getMechanicsManager() const;
00080 
00081             DialogueManager *getDialogueManager() const;
00082 
00083             Journal *getJournal() const;
00084 
00085             InputManager *getInputManager() const;
00086 
00087             float getFrameDuration() const;
00088 
00089             void cleanup();
00091 
00092             static const Environment& get();
00094     };
00095 }
00096 
00097 #endif