IStateManagerImpl< T > Class Template Reference

State manager class. Inherit from this class and create some states to give your agents FSM functionality. More...

#include <ceStateCoreImpl.h>

Collaboration diagram for IStateManagerImpl< T >:

List of all members.

Public Member Functions

const short VerifyStateManager (void) const
 Verify the integrity of the manager class.
void SetGlobalState (IState *State) const
 Set a global state that will be called every time the FSM is updated.
IStateGetGlobalState (void) const
 Get the global state in use.
void SetCurrentState (IState *State) const
 Set a current state that will be called every time the FSM is updated.
IStateGetCurrentState (void) const
 Get the current state in use.
void SetPreviousState (IState *State) const
 Set a previous state.
IStateGetPreviousState (void) const
 Get the previous state.
void Update (void) const
 This function will trigger update on the global state the current state.
void ChangeState (IState *State) const
 Change to a new current state.
void RevertToPreviousState (void) const
 Change back the current state to the previous state.
short IsInState (const IState &State) const
 Check if state is equal to the current state in use of the FSM.

Protected Attributes

IStateManagerState
 Instance to the state manager.

Detailed Description

template<class T>
class ce::IStateManagerImpl< T >

State manager class. Inherit from this class and create some states to give your agents FSM functionality.


Member Function Documentation

const short VerifyStateManager ( void   )  const [inline]

Verify the integrity of the manager class.

Returns:
TRUE if everything is ok or FALSE in case of some error.
void SetGlobalState ( IState State  )  const [inline]

Set a global state that will be called every time the FSM is updated.

Parameters:
State A state that will be the global state or also the null state instance (ce::NullState) or also the NULL value.
IState* GetGlobalState ( void   )  const [inline]

Get the global state in use.

Returns:
IState A pointer to the global state in use.

Here is the caller graph for this function:

void SetCurrentState ( IState State  )  const [inline]

Set a current state that will be called every time the FSM is updated.

Parameters:
State A state that will be the current state or also the null state instance (ce::NullState) or also the NULL value.

Here is the call graph for this function:

IState* GetCurrentState ( void   )  const [inline]

Get the current state in use.

Returns:
IState A pointer to the current state in use.
void SetPreviousState ( IState State  )  const [inline]

Set a previous state.

Parameters:
State A state that will be the global state or also the null state instance (ce::NullState) or also the NULL value.

Here is the caller graph for this function:

IState* GetPreviousState ( void   )  const [inline]

Get the previous state.

Returns:
IState A pointer to the previous state.

Here is the caller graph for this function:

void Update ( void   )  const [inline]

This function will trigger update on the global state the current state.

Here is the call graph for this function:

Here is the caller graph for this function:

void ChangeState ( IState State  )  const [inline]

Change to a new current state.

Parameters:
State A state that will be the current state or also the null state instance (ce::NullState) or also the NULL value.

Here is the call graph for this function:

void RevertToPreviousState ( void   )  const [inline]

Change back the current state to the previous state.

Here is the call graph for this function:

Here is the caller graph for this function:

short IsInState ( const IState State  )  const [inline]

Check if state is equal to the current state in use of the FSM.

Parameters:
State A state that will be the current state or also the null state instance (ce::NullState).
Returns:
TRUE if the current state's type is equal to the type of the class passed as a parameter.

Here is the call graph for this function:


Member Data Documentation

IStateManager* State [protected]

Instance to the state manager.


The documentation for this class was generated from the following file:
Copyleft (cc) 2010 by FX Programmer. Some Rights Reserved.