17class State :
public QObject
47 virtual void OnEnter(
const int32_t stateRequestCode );
55 virtual void OnResume(
const int32_t stateRequestCode,
const int32_t stateResultCode,
StorageList &storageList );
StateAlgorithmResult
Definition StateDefines.h:24
ChangeStateFlag
Definition StateDefines.h:10
@ ChangeStateFlagUndefined
Definition StateDefines.h:11
FinishStateFlag
Definition StateDefines.h:18
@ FinishStateFlagUndefined
Definition StateDefines.h:19
Definition StateManager.h:14
abstract interface class creating API for states.
Definition State.h:18
virtual void OnResume(const int32_t stateRequestCode, const int32_t stateResultCode, StorageList &storageList)
virtual bool IsTimerActive()
Method to determine if timer is now running.
QString GetStateName() const
Function returns string representation of state.
virtual bool IsChangeStateForResultMapEmpty()
IsChangeStateForResultMapEmpty method returns information about existing states which have to be retu...
virtual State * Clone(StorageList &inputStream)=0
Function returns concreete new instantion of descendent EState class.
virtual StorageList & GetStorageList()
Gets storage list saved in this class.
virtual StateDefines::StateAlgorithmResult ChangeState(const QString &stateName, StorageList &storageList, const StateDefines::ChangeStateFlag changeStateFlag=StateDefines::ChangeStateFlagUndefined)
Launch a new state. You will not receive any information about when the state exits.
virtual void TimerStop()
Stop currently running timer.
virtual StateDefines::StateAlgorithmResult FinishState(const StateDefines::FinishStateFlag finishStateFlag=StateDefines::FinishStateFlagUndefined)
Call this when your state is done and should be closed. finishStateFlag - Additional options for how ...
virtual void OnLeave()
This method is called immediately before state is to be inactivated.
StateManager * GetStateManager()
Method for getting used ECore.
virtual StateDefines::StateAlgorithmResult ChangeStateForResult(const QString &stateName, StorageList &storageList, const int32_t stateRequestCode)
Launch state for which you would like a result when it finished. When this state (stateName) exits,...
virtual void OnEnter()
This method is called when state is going to be active.
virtual void FillStorageList(const StorageList &storageList)
Copy all items from storageList and copy to member in this class.
virtual void OnTimeOut()
Called when on show of timer is expired.
virtual StateDefines::StateAlgorithmResult FinishStateWithResult(const int32_t stateResultCode, StorageList &storageList)
Call this when your state is done and should be closed. State result code stateResultCode is propagat...
virtual void OnSecondTick()
Called every second.
virtual void TimerStart(unsigned long timeout)
virtual void OnResume()
This method is called when state is going to be reactivated from state history.
virtual void OnEnter(const int32_t stateRequestCode)
State(const QString &stateName, StateManager *context)
virtual void OnMinuteTick()
Called on every minute change.
Definition StorageList.h:12