CStateManager.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "IState.h"
5 
6 
7 namespace ion
8 {
9 
10  class CWindow;
11 
12  class CStateManager : public Singleton<CStateManager>, public IEventListener
13  {
14 
15  friend class Singleton<CStateManager>;
16 
17  public:
18 
19  void SetState(IState * State);
20  void DoStateChange();
21 
22  void Update(f32 const ElapsedTime);
23 
24  void Connect(CWindow * Window);
25  void ShutDown();
26 
27  private:
28 
29  CStateManager();
30 
31  protected:
32 
33  IState * CurrentState = nullptr;
34  IState * NextState = nullptr;
35 
36  };
37 
38 }
void Update(f32 const ElapsedTime)
Definition: CStateManager.cpp:31
IState * NextState
Definition: CStateManager.h:34
Definition: CStateManager.h:12
IState * CurrentState
Definition: CStateManager.h:33
Definition: IState.h:8
float f32
Definition: ionTypes.h:94
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
void ShutDown()
Definition: CStateManager.cpp:37
Definition: CWindow.h:17
void DoStateChange()
Definition: CStateManager.cpp:13
Definition: IEventListener.h:8
Base class for Singleton design pattern implementation.
Definition: ionClass.h:90
void SetState(IState *State)
Definition: CStateManager.cpp:8
void Connect(CWindow *Window)