State Class Reference

#include <State.h>

Inheritance diagram for State:
ListenerObject GameState ToolState AnimationInspectorState DebugState SoundTestState StageEditorState

# Public Member Functions

void constructor ()
 Class's constructor.
void destructor ()
 Class's destructor.
virtual void start (void *owner)
virtual void update (void *owner)
virtual void stop (void *owner)
virtual void pause (void *owner)
virtual void unpause (void *owner)
virtual bool processMessage (void *owner, Telegram telegram)

# Additional Inherited Members

- Private Member Functions inherited from ListenerObject
void constructor ()
 Class' constructor.
void destructor ()
 Class' destructor.
void addEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListeners (uint16 eventCode)
void removeAllEventListeners ()
 Remove all listener objects.
bool hasActiveEventListeners ()
void fireEvent (uint16 eventCode)
void sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay)
void sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay)
void discardAllMessages ()
 Discard all messages, both to be sent and to be received.
void discardMessages (uint32 message)
virtual bool onEvent (ListenerObject eventFirer, uint16 eventCode)
virtual bool handleMessage (Telegram telegram)
- Private Attributes inherited from ListenerObject
VirtualList events
 List of registered events.
int8 eventFirings
 Counter that keeps track of the number of fired events to prevent race conditions in nested firings.

# Detailed Description

Class State

Inherits from ListenerObject

Implements a behavioral model to be used in a finite state machine.

Definition at line 34 of file State.h.

# Member Function Documentation

# constructor()

void State::constructor ( )

Class's constructor.

Definition at line 22 of file State.c.

# destructor()

void State::destructor ( )

Class's destructor.

Definition at line 30 of file State.c.

# pause()

void State::pause ( void * owner)
virtual

Prepares the object to become inactive in this state.

Parameters
ownerObject that is in this state

Reimplemented in GameState.

Definition at line 55 of file State.c.

# processMessage()

bool State::processMessage ( void * owner,
Telegram telegram )
virtual

Process a Telegram sent to an object that is in this state.

Parameters
ownerObject that is in this state
telegramTelegram to process

Reimplemented in GameState.

Definition at line 65 of file State.c.

# start()

void State::start ( void * owner)
virtual

Prepares the object to enter this state.

Parameters
ownerObject that is entering in this state

Reimplemented in GameState, and ToolState.

Definition at line 40 of file State.c.

# stop()

void State::stop ( void * owner)
virtual

Prepares the object to exit this state.

Parameters
ownerObject that is exiting this state

Reimplemented in GameState, and ToolState.

Definition at line 50 of file State.c.

# unpause()

void State::unpause ( void * owner)
virtual

Prepares the object to become active in this state.

Parameters
ownerObject that is in this state

Reimplemented in GameState.

Definition at line 60 of file State.c.

# update()

void State::update ( void * owner)
virtual

Updates the object in this state.

Parameters
ownerObject that is in this state

Reimplemented in GameState, and ToolState.

Definition at line 45 of file State.c.


The documentation for this class was generated from the following files:
  • VUEngine-Core/source/State/State.h
  • VUEngine-Core/source/State/State.c