ePrivacy and GPDR Cookie Consent by Cookie Consent

Behavior

A behavior is a functor that gets an event as a parameter and performs an action. The action is generally a call into user code.

It can be assigned to a transition ('do' behavior) or to a state ('entry', 'do' or 'exit' behavior).

Not all types of states support 'entry', 'do' and 'exit' behaviors!

Transition behavior

It is performed when a transition is executed.

Entry behavior

It is performed when a simple state or a composite state is entered. It is performed prior to any internal behavior within the state.

Do behavior (do activity)

It is performed by a simple state while being in the state.

Asynchronous simple states have an asynchronous behavior.

Exit behavior

It is performed when a simple state or a composite state is exited. It is performed after any internal behavior within the state.

Default behavior function in yasmine

The default initialization value for a behavior is an empty functor.

using behavior_function = std::function< void ( const event& ) >;