Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

ActionEngine Class Reference

Collaboration diagram for ActionEngine:

Collaboration graph
[legend]
List of all members.

Detailed Description

The base class for a game.


Defines the sequence of screens, and takes care of persistence.

Definition at line 43 of file ActionEngine.h.

Public Member Functions

Lifecycle management
 ActionEngine (UInt16 numStateDescriptors) SEC_GAME
 Construct a new ActionEngine.

virtual ~ActionEngine () SEC_GAME=0
 Destroy the ActionEngine.

Control flow
virtual void init () SEC_GAME=0
 Initialize the ActionEngine and all Screens.

virtual ScreengetCurrentScreen () const SEC_GAME=0
 Get the currently needed Screen Ownership of the screen is transferred to the caller.

virtual ScreengetNextScreen () SEC_GAME=0
 Get the next Screen in the sequence of Screens.

Persistence
virtual UInt16 getStateDescriptorsVersion () const SEC_GAME=0
 The version number of the application state.

StateDescriptorgetStateDescriptor (UInt16 index) const SEC_GAME
 Return the nth state descriptor for this ActionEngine.

Miscellaneous
virtual Boolean getPreventAutoOff () const SEC_GAME

Protected Attributes

StateDescriptorPtrstateDescriptors


Constructor & Destructor Documentation

ActionEngine::ActionEngine UInt16    numStateDescriptors
 

Construct a new ActionEngine.

virtual ActionEngine::~ActionEngine   [pure virtual]
 

Destroy the ActionEngine.


Member Function Documentation

virtual void ActionEngine::init   [pure virtual]
 

Initialize the ActionEngine and all Screens.

Make sure you set the persistent state of the ActionEngine and all Screens to working default values.

virtual Screen* ActionEngine::getCurrentScreen   const [pure virtual]
 

Get the currently needed Screen Ownership of the screen is transferred to the caller.

virtual Screen* ActionEngine::getNextScreen   [pure virtual]
 

Get the next Screen in the sequence of Screens.

Ownership of the screen is transferred to the caller.

virtual UInt16 ActionEngine::getStateDescriptorsVersion   const [pure virtual]
 

The version number of the application state.

This should be increased by 1 every time the application's state descriptor layout changes.

Returns:
a version number

StateDescriptor* ActionEngine::getStateDescriptor UInt16    index const
 

Return the nth state descriptor for this ActionEngine.

Ownership of the descriptor remains with the ActionEngine.

Returns:
a StateDescriptor

virtual Boolean ActionEngine::getPreventAutoOff   const [virtual]
 


Member Data Documentation

StateDescriptorPtr* ActionEngine::stateDescriptors [protected]
 

Definition at line 114 of file ActionEngine.h.


The documentation for this class was generated from the following file:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 31 May 2003