PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | List of all members
PITransitionTimeout Class Reference

Transition that fires automatically after a timeout. More...

#include <pistatemachine_transition.h>

Inheritance diagram for PITransitionTimeout:
Inheritance graph
[legend]

Public Member Functions

 PITransitionTimeout (PIStateBase *source, PIStateBase *target, PISystemTime timeout)
 Creates a transition that fires after timeout while the source state is active.
 
 ~PITransitionTimeout ()
 Stops the internal timer and destroys the transition.
 
- Public Member Functions inherited from PITransitionBase
 PITransitionBase (PIStateBase *source, PIStateBase *target, int event_id)
 Creates a transition from source to target for the specified event identifier.
 
virtual ~PITransitionBase ()
 Destroys the transition and its stored guard.
 
PIStateMachinemachine () const
 Returns the root state machine.
 
PIStateBasesource () const
 Returns the source state.
 
PIStateBasetarget () const
 Returns the target state.
 
template<typename R , typename... Args>
PITransitionBaseaddGuard (std::function< R(Args...)> f)
 Sets a guard function that must return bool.
 
template<typename L >
PITransitionBaseaddGuard (L f)
 Sets a guard from a lambda or other callable object.
 
template<typename... Args>
bool testGuard (Args... args)
 Tests the guard against event arguments passed to the transition.
 
PITransitionBaseaddAction (std::function< void()> a)
 Sets an action executed when the transition fires.
 
void makeAction ()
 Executes the transition action if it is set.
 
void trigger ()
 Triggers the transition and updates active states.
 

Detailed Description

Transition that fires automatically after a timeout.