|
#include <ArmarXCore/core/util/FiniteStateMachine.h>
Public Types | |
using | state = std::function< StatusType(T *)> |
Public Member Functions | |
FiniteStateMachine (std::shared_ptr< T > context) | |
FiniteStateMachine (T &context) | |
FiniteStateMachine (T *context) | |
ChainType & | from (state from_state) |
ChainType & | on (StatusType status) |
ChainType & | on_any_failure () |
ChainType & | on_failure () |
virtual StatusType | run () const |
ChainType & | start_from (state start_state) |
ChainType & | to (state to_state) |
Static Public Attributes | |
static const StatusType | failure_status_value = failure_status |
Protected Member Functions | |
long | get_id (const state &fn) const |
long | get_id (std::optional< state > fn) const |
std::optional< state > | get_next_state (const long state_id, const StatusType status) const |
Protected Attributes | |
T * | m_context |
std::optional< state > | m_default_fail_state |
std::optional< state > | m_init_from_state |
std::optional< state > | m_init_to_state |
std::optional< state > | m_start_state |
std::map< long, std::optional< state > > | m_states |
std::map< std::tuple< long, StatusType >, long > | m_transitions |
Definition at line 41 of file FiniteStateMachine.h.
Definition at line 46 of file FiniteStateMachine.h.
|
inline |
Definition at line 61 of file FiniteStateMachine.h.
|
inline |
Definition at line 66 of file FiniteStateMachine.h.
|
inline |
Definition at line 71 of file FiniteStateMachine.h.
|
inline |
Definition at line 84 of file FiniteStateMachine.h.
|
inlineprotected |
Definition at line 231 of file FiniteStateMachine.h.
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
Definition at line 154 of file FiniteStateMachine.h.
|
inline |
Definition at line 148 of file FiniteStateMachine.h.
|
inlinevirtual |
Definition at line 169 of file FiniteStateMachine.h.
|
inline |
Definition at line 77 of file FiniteStateMachine.h.
|
inline |
Definition at line 100 of file FiniteStateMachine.h.
|
static |
Definition at line 47 of file FiniteStateMachine.h.
|
mutableprotected |
Definition at line 51 of file FiniteStateMachine.h.
|
protected |
Definition at line 55 of file FiniteStateMachine.h.
|
protected |
Definition at line 53 of file FiniteStateMachine.h.
|
protected |
Definition at line 54 of file FiniteStateMachine.h.
|
protected |
Definition at line 52 of file FiniteStateMachine.h.
|
protected |
Definition at line 56 of file FiniteStateMachine.h.
|
protected |
Definition at line 57 of file FiniteStateMachine.h.