OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
statemanager.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWSTATE_STATEMANAGER_H
2 #define GAME_MWSTATE_STATEMANAGER_H
3 
4 #include <list>
5 #include <string>
6 
7 namespace MWState
8 {
9  struct Slot;
10  class Character;
11 }
12 
13 namespace MWBase
14 {
17  {
18  public:
19 
20  enum State
21  {
25  };
26 
27  typedef std::list<MWState::Character>::const_iterator CharacterIterator;
28 
29  private:
30 
31  StateManager (const StateManager&);
33 
36 
37  public:
38 
40 
41  virtual ~StateManager() {}
42 
43  virtual void requestQuit() = 0;
44 
45  virtual bool hasQuitRequest() const = 0;
46 
47  virtual void askLoadRecent() = 0;
48 
49  virtual State getState() const = 0;
50 
51  virtual void newGame (bool bypass = false) = 0;
55 
56  virtual void endGame() = 0;
57 
58  virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot) = 0;
59 
60  virtual void saveGame (const std::string& description, const MWState::Slot *slot = 0) = 0;
64 
65  virtual void loadGame (const std::string& filepath) = 0;
69 
70  virtual void loadGame (const MWState::Character *character, const std::string& filepath) = 0;
72 
74 
75  virtual void quickSave(std::string = "Quicksave")=0;
76 
78 
79  virtual void quickLoad()=0;
80 
83 
84  virtual CharacterIterator characterBegin() = 0;
87 
88  virtual CharacterIterator characterEnd() = 0;
89 
90  virtual void update (float duration) = 0;
91  };
92 }
93 
94 #endif
virtual void askLoadRecent()=0
Definition: character.hpp:19
virtual MWState::Character * getCurrentCharacter()=0
std::list< MWState::Character >::const_iterator CharacterIterator
Definition: statemanager.hpp:27
virtual bool hasQuitRequest() const =0
Definition: statemanager.hpp:22
virtual void deleteGame(const MWState::Character *character, const MWState::Slot *slot)=0
StateManager & operator=(const StateManager &)
not implemented
virtual void requestQuit()=0
virtual void loadGame(const std::string &filepath)=0
Definition: statemanager.hpp:23
virtual void quickLoad()=0
Simple loader, loads the last saved file.
StateManager()
Definition: statemanager.hpp:39
Interface for game state manager (implemented in MWState)
Definition: statemanager.hpp:16
State
Definition: statemanager.hpp:20
virtual void update(float duration)=0
Definition: statemanager.hpp:24
virtual CharacterIterator characterEnd()=0
virtual void quickSave(std::string="Quicksave")=0
Simple saver, writes over the file if already existing.
virtual ~StateManager()
Definition: statemanager.hpp:41
virtual CharacterIterator characterBegin()=0
virtual void newGame(bool bypass=false)=0
virtual void endGame()=0
virtual State getState() const =0
virtual void saveGame(const std::string &description, const MWState::Slot *slot=0)=0
Definition: character.hpp:10