Class state_guard

Inheritance Relationships

Derived Types

Class Documentation

class state_guard

Abstract guard base class that all guards classes inherit from.

Subclassed by rcppsw::patterns::fsm::state_guard_condition0< SM, Func >, rcppsw::patterns::fsm::state_guard_condition1< SM, Event, Func >

Public Functions

virtual ~state_guard(void) = default
virtual bool invoke_guard_condition(base_fsm *sm, const event_data*) const = 0

Called by the state machine engine to execute a guard condition action. If guard condition evaluates to TRUE the state action is executed. If FALSE, no state transition is performed.

Parameters:

sm – A state machine instance.

Returns:

Returns TRUE if no guard condition or the guard condition evaluates to TRUE.