2#include <game/sLib/s_StateInterfaces.hpp> 
    3#include <game/sLib/s_StateMethod.hpp> 
    4#include <game/sLib/s_StateID.hpp> 
The interface for state factories.
 
The interface for state ID checkers.
 
The interface for state IDs.
 
virtual bool isNull() const =0
Returns whether this is a null state.
 
virtual void executeStateLocalMethod()=0
Performs the actual state execution.
 
virtual int initializeStateLocalMethod()=0
Performs the actual state initialization.
 
virtual void finalizeStateLocalMethod()=0
Performs the actual state termination.
 
virtual void initializeStateMethod()
Initializes the current state.
 
const sStateIDIf_c * mpStateID
The current state ID.
 
const sStateIDIf_c * mpOldStateID
The previous state ID.
 
bool mExecutionLock
A lock to ensure executeStateMethod is not called recursively.
 
sStateIDChkIf_c & mpStateChk
The state checker to use.
 
sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState)
Constructs a new sStateMethod_c instance.
 
virtual void finalizeStateMethod()
Prepares the current state for termination.
 
virtual ~sStateMethod_c()
Destroys the sStateMethod_c instance.
 
sStateFctIf_c & mpStateFct
The state factory which produces the state holder.
 
bool mInitFinalizeLock
A lock to ensure initializeStateMethod and finalizeStateMethod are not called recursively.
 
bool mStateChanged
If the current state has changed during execution.
 
virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID)=0
Performs the actual state transition.
 
sStateIf_c * mpState
The current state holder.
 
const sStateIDIf_c * mpNewStateID
The next state ID.
 
bool mIsValid
If the state holder contains a valid state ID.
 
virtual void executeStateMethod()
Executes the current state.
 
virtual void changeStateMethod(const sStateIDIf_c &newStateID)
Transitions to a new state ID.
 
bool mRefreshStateMethod
True, if after a state transition, the state should be executed again.