AI_StateMachine Class Reference
[InExIn]

#include <AI_StateMachine.h>

List of all members.


Detailed Description

Generic state machine.

USAGE: Create classes derived form AI_State. Add objects of these classes into state machine object. Create session object and use it within work() method to let state machine work.

This state machine can contains final or non-final states. Once you run work() then state machine ends work when it reaches some final state. When you run work() again then state machine starts where it ends previously.

Version:
1.0 Initial release.
Author:
Jindrich Rohlik

Public Member Functions

 AI_StateMachine (void)
 Constructor.
 ~AI_StateMachine (void)
 Destructor.
void beginStates (int i_number)
 Begin with state machine building.
void setState (int i_index, AI_State *ptr_state)
 Set state of given index.
void endStates (void)
 Finish state machine building.
void clear (void)
 Clear all states.
void work (Session &session)
 Let state machine work until new final state is reached.
const bool isClear (void) const
 Is clear?
AI_StategetState (int i_index)
 Get state machine state by given index.

Classes

class  Session

Constructor & Destructor Documentation

AI_StateMachine::AI_StateMachine ( void   )  [inline]

Constructor.

AI_StateMachine::~AI_StateMachine ( void   )  [inline]

Destructor.


Member Function Documentation

void AI_StateMachine::beginStates ( int  i_number  )  [inline]

Begin with state machine building.

void AI_StateMachine::setState ( int  i_index,
AI_State ptr_state 
) [inline]

Set state of given index.

void AI_StateMachine::endStates ( void   )  [inline]

Finish state machine building.

void AI_StateMachine::clear ( void   ) 

Clear all states.

void AI_StateMachine::work ( Session session  ) 

Let state machine work until new final state is reached.

const bool AI_StateMachine::isClear ( void   )  const [inline]

Is clear?

AI_State * AI_StateMachine::getState ( int  i_index  )  [inline]

Get state machine state by given index.


The documentation for this class was generated from the following files: