duncan
Mom and Dad were wrong!
Public Types | Public Member Functions | Protected Member Functions
client::State Class Reference

#include <state.h>

Inheritance diagram for client::State:
Inheritance graph
[legend]
Collaboration diagram for client::State:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Action { NOTHING, POP_ME, PUSH_CHILD }

Public Member Functions

virtual std::tr1::shared_ptr
< State
child ()
virtual void on_push ()
virtual void on_pop ()
virtual void on_active ()
virtual void resize (unsigned int, unsigned int)
virtual Action update ()
virtual void draw ()

Protected Member Functions

virtual void key_pressed (unsigned int wh)
virtual void key_released (unsigned int wh)

Detailed Description

Interface for a game state.

Author:
Harry Slatyer

see LICENSE


Member Enumeration Documentation

Action for the Client object to perform on this state.


Member Function Documentation

virtual std::tr1::shared_ptr<State> client::State::child ( ) [inline, virtual]

Get the child state (to be pushed on top of this).

Returns:
child state

Reimplemented in client::StartState.

virtual void client::State::draw ( ) [inline, virtual]

Draw this state.

Reimplemented in client::GameState, and client::StartState.

virtual void client::State::on_active ( ) [inline, virtual]

Called when the state on top of this is popped.

Reimplemented in client::GameState, and client::StartState.

virtual void client::State::on_pop ( ) [inline, virtual]

Called when this state is popped.

Reimplemented in client::GameState.

virtual void client::State::on_push ( ) [inline, virtual]

Called when this state is pushed.

Reimplemented in client::GameState, and client::StartState.

virtual void client::State::resize ( unsigned int  ,
unsigned int   
) [inline, virtual]

Called when the window is resized.

Reimplemented in client::GameState, and client::StartState.

virtual Action client::State::update ( ) [inline, virtual]

Update this state.

Returns:
action to be performed on this state

Reimplemented in client::GameState, and client::StartState.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations