Debian Codegraph @

src/plan/StateManager.h

raw
1 #ifndef HEADER_STATEMANAGER_H
2 #define HEADER_STATEMANAGER_H
3
4 class GameState;
5
6 #include "NoCopy.h"
7
8 #include <list>
9
10 /**
11 * Stack of states.
12 */
13 class StateManager : public NoCopy {
14 private:
15 typedef std::list<GameState*> t_states;
16 t_states m_states;
17 t_states m_trash;
18 private:
19 void emptyTrash();
20 void removeState(GameState *state);
21 void insertAfter(GameState *who, GameState *new_state);
22 t_states::iterator findIter(GameState *who);
23 void checkStack();
24 void pauseBg(t_states::iterator stateIt);
25 void resumeBg(t_states::iterator stateIt);
26 void installHandlers();
27 public:
28 virtual ~StateManager();
29 void updateGame();
30
31 void changeState(GameState *who, GameState *new_state);
32 void pushState(GameState *who, GameState *new_state);
33 void popState(GameState *who);
34 };
35
36 #endif