Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
state.h
1 #pragma once
2 #ifndef STATE_H
3 #define STATE_H
4 
5 #include <SDL.h>
6 #include <iostream>
7 #include <string.h>
8 
9 /*forward declaration of StateManager for the pointer to the StateManager*/
10 class StateManager;
11 
17 class State
18 {
19 protected:
20  /*A pointer to the state manager*/
21  StateManager * stateManager;
22  /*The render to display to*/
23  SDL_Renderer * renderer;
24  /*The name of the State*/
25  std::string name;
26 public:
33  State(StateManager *, SDL_Renderer *);
34 
39  virtual ~State();
40 
46  virtual bool HandleSDLEvents() = 0;
47 
53  virtual void Update(float deltaTime) = 0;
54 
59  virtual void Draw() = 0;
60 
65  std::string GetStateName();
66 };
67 #endif
Creates a State object. Creates a State object to be inherited. Made using information from http://bl...
Definition: state.h:17
virtual bool HandleSDLEvents()=0
virtual void Draw()=0
Creates a State manager object. Creates a State manager object to be inherited. Made using informatio...
Definition: stateManager.h:13
State(StateManager *, SDL_Renderer *)
Definition: state.cpp:6
virtual void Update(float deltaTime)=0
virtual ~State()
Definition: state.cpp:18
std::string GetStateName()
Definition: state.cpp:25