#include <Application.h>
Inherited by XClone.
Inheritance diagram for Application:

Serves as a state manager for the game. Starts up the initial state and tells it to continually update. States use this class to actually change to a different state.
Definition at line 9 of file Application.h.
Public Member Functions | |
| Application () | |
| void | changeState (GameState *gs) |
| too many comments!! | |
| virtual void | deinit ()=0 |
| virtual void | init ()=0 |
| void | popState () |
| virtual void | processSDLEvent (SDL_Event &event)=0 |
| void | pushState (GameState *gs) |
| void | quit () |
| bool const | running () |
| virtual void | update ()=0 |
| virtual | ~Application () |
Protected Member Functions | |
| GameState * | getCurrentGameState () |
| void | popAllStates () |
Private Attributes | |
| bool | _running |
| vector< GameState * > | _states |
| Application::Application | ( | ) |
Definition at line 11 of file Application.cpp.
| Application::~Application | ( | ) | [virtual] |
Definition at line 17 of file Application.cpp.
| void Application::changeState | ( | GameState * | gs | ) |
too many comments!!
Definition at line 23 of file Application.cpp.
References _states, and SAFE_DELETE.
Referenced by XClone::init().
Here is the caller graph for this function:

| virtual void Application::deinit | ( | ) | [pure virtual] |
Implemented in XClone.
| GameState * Application::getCurrentGameState | ( | ) | [protected] |
Definition at line 58 of file Application.cpp.
References _states.
Referenced by XClone::processSDLEvent(), and XClone::update().
Here is the caller graph for this function:

| virtual void Application::init | ( | ) | [pure virtual] |
Implemented in XClone.
| void Application::popAllStates | ( | ) | [protected] |
Definition at line 63 of file Application.cpp.
References _states, and popState().
Referenced by XClone::deinit().
Here is the call graph for this function:

Here is the caller graph for this function:

| void Application::popState | ( | ) |
Definition at line 40 of file Application.cpp.
References _states, GameState::deinit(), and SAFE_DELETE.
Referenced by popAllStates().
Here is the call graph for this function:

Here is the caller graph for this function:

| virtual void Application::processSDLEvent | ( | SDL_Event & | event | ) | [pure virtual] |
Implemented in XClone.
| void Application::pushState | ( | GameState * | gs | ) |
| void Application::quit | ( | ) |
| bool const Application::running | ( | ) |
Definition at line 48 of file Application.cpp.
References _running.
Referenced by main().
Here is the caller graph for this function:

| virtual void Application::update | ( | ) | [pure virtual] |
Implemented in XClone.
bool Application::_running [private] |
vector<GameState*> Application::_states [private] |
Definition at line 34 of file Application.h.
Referenced by changeState(), getCurrentGameState(), popAllStates(), popState(), and pushState().
1.4.7