Class state

Inheritance Relationships

Derived Types

Class Documentation

class state

Abstract state base class that all states inherit from.

Subclassed by rcppsw::patterns::fsm::hfsm_state, rcppsw::patterns::fsm::state_action0< SM, Func >, rcppsw::patterns::fsm::state_action1< SM, Event, Func >

Public Functions

state(const state&) = default
state(void) = default
virtual ~state(void) = default
virtual int invoke_state_action(base_fsm *sm, event_data *data) const = 0

Called by the state machine engine to execute a state action. If a guard condition exists and it evaluates to false, the state action will not execute.

Parameters:
  • sm – A state machine instance.

  • data – The event data.

Returns:

integer indicating whether or not the event was handled.