OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
environment.hpp
Go to the documentation of this file.
1 #ifndef GAME_BASE_ENVIRONMENT_H
2 #define GAME_BASE_ENVIRONMENT_H
3 
4 namespace MWBase
5 {
6  class World;
7  class ScriptManager;
8  class DialogueManager;
9  class Journal;
10  class SoundManager;
11  class MechanicsManager;
12  class InputManager;
13  class WindowManager;
14  class StateManager;
15 
23  {
24  static Environment *sThis;
25 
36 
37  Environment (const Environment&);
39 
42 
43  public:
44 
45  Environment();
46 
47  ~Environment();
48 
49  void setWorld (World *world);
50 
51  void setSoundManager (SoundManager *soundManager);
52 
53  void setScriptManager (MWBase::ScriptManager *scriptManager);
54 
55  void setWindowManager (WindowManager *windowManager);
56 
57  void setMechanicsManager (MechanicsManager *mechanicsManager);
58 
59  void setDialogueManager (DialogueManager *dialogueManager);
60 
61  void setJournal (Journal *journal);
62 
63  void setInputManager (InputManager *inputManager);
64 
65  void setStateManager (StateManager *stateManager);
66 
67  void setFrameDuration (float duration);
69 
70  World *getWorld() const;
71 
73 
75 
77 
79 
81 
82  Journal *getJournal() const;
83 
85 
87 
88  float getFrameDuration() const;
89 
90  void cleanup();
92 
93  static const Environment& get();
95  };
96 }
97 
98 #endif
Interface for dialogue manager (implemented in MWDialogue)
Definition: dialoguemanager.hpp:27
void setStateManager(StateManager *stateManager)
Definition: environment.cpp:72
void setWindowManager(WindowManager *windowManager)
Definition: environment.cpp:47
Interface for input manager (implemented in MWInput)
Definition: inputmanager.hpp:24
World * getWorld() const
Definition: environment.cpp:82
Interface for the World (implemented in MWWorld)
Definition: world.hpp:77
StateManager * mStateManager
Definition: environment.hpp:34
World * mWorld
Definition: environment.hpp:26
Interface for the player's journal (implemented in MWDialogue)
Definition: journal.hpp:28
WindowManager * getWindowManager() const
Definition: environment.cpp:100
Central hub for mw-subsystems.
Definition: environment.hpp:22
SoundManager * mSoundManager
Definition: environment.hpp:27
SoundManager * getSoundManager() const
Definition: environment.cpp:88
MechanicsManager * getMechanicsManager() const
Definition: environment.cpp:106
static Environment * sThis
Definition: environment.hpp:24
ScriptManager * mScriptManager
Definition: environment.hpp:28
Journal * getJournal() const
Definition: environment.cpp:118
ScriptManager * getScriptManager() const
Definition: environment.cpp:94
InputManager * mInputManager
Definition: environment.hpp:33
Environment & operator=(const Environment &)
not implemented
float mFrameDuration
Definition: environment.hpp:35
float getFrameDuration() const
Definition: environment.cpp:136
Environment()
Definition: environment.cpp:17
void setDialogueManager(DialogueManager *dialogueManager)
Definition: environment.cpp:57
void setInputManager(InputManager *inputManager)
Definition: environment.cpp:67
Interface for game state manager (implemented in MWState)
Definition: statemanager.hpp:16
Journal * mJournal
Definition: environment.hpp:32
Interface for widnow manager (implemented in MWGui)
Definition: windowmanager.hpp:85
void setScriptManager(MWBase::ScriptManager *scriptManager)
Definition: environment.cpp:42
Interface for script manager (implemented in MWScript)
Definition: scriptmanager.hpp:24
DialogueManager * getDialogueManager() const
Definition: environment.cpp:112
Interface for sound manager (implemented in MWSound)
Definition: soundmanager.hpp:29
void setWorld(World *world)
Definition: environment.cpp:32
StateManager * getStateManager() const
Definition: environment.cpp:130
void setFrameDuration(float duration)
Set length of current frame in seconds.
Definition: environment.cpp:77
InputManager * getInputManager() const
Definition: environment.cpp:124
Interface for game mechanics manager (implemented in MWMechanics)
Definition: mechanicsmanager.hpp:38
void setJournal(Journal *journal)
Definition: environment.cpp:62
void cleanup()
Delete all mw*-subsystems.
Definition: environment.cpp:141
MechanicsManager * mMechanicsManager
Definition: environment.hpp:30
DialogueManager * mDialogueManager
Definition: environment.hpp:31
WindowManager * mWindowManager
Definition: environment.hpp:29
void setMechanicsManager(MechanicsManager *mechanicsManager)
Definition: environment.cpp:52
void setSoundManager(SoundManager *soundManager)
Definition: environment.cpp:37
~Environment()
Definition: environment.cpp:26