Application Class Reference

#include <Application.h>

Inherited by XClone.

Inheritance diagram for Application:

Inheritance graph
[legend]
List of all members.

Detailed Description

Represents the entire 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

GameStategetCurrentGameState ()
void popAllStates ()

Private Attributes

bool _running
vector< GameState * > _states


Constructor & Destructor Documentation

Application::Application (  ) 

Definition at line 11 of file Application.cpp.

Application::~Application (  )  [virtual]

Definition at line 17 of file Application.cpp.


Member Function Documentation

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  ) 

Definition at line 34 of file Application.cpp.

References _states.

void Application::quit (  ) 

Definition at line 53 of file Application.cpp.

References _running.

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.


Member Data Documentation

bool Application::_running [private]

Definition at line 35 of file Application.h.

Referenced by quit(), and running().

vector<GameState*> Application::_states [private]

Definition at line 34 of file Application.h.

Referenced by changeState(), getCurrentGameState(), popAllStates(), popState(), and pushState().


The documentation for this class was generated from the following files:
Generated on Fri Sep 22 06:00:26 2006 for X-CLONE by  doxygen 1.4.7