State manager class. Inherit from this class and create some states to give your agents FSM functionality.
More...
#include <ceStateCoreImpl.h>
List of all members.
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.
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. |
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. |
IState* GetPreviousState |
( |
void |
|
) |
const [inline] |
Get the previous state.
- Returns:
- IState A pointer to the previous state.
void Update |
( |
void |
|
) |
const [inline] |
This function will trigger update on the global state the current state.
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. |
void RevertToPreviousState |
( |
void |
|
) |
const [inline] |
Change back the current state to the previous state.
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.
Member Data Documentation
Instance to the state manager.
The documentation for this class was generated from the following file: