Assembly

yasmine provides a header assembly.hpp that is also included via the yasmine.hpp collection header. This header contains macros that make the assembly code of the state machine smaller and easier to create and maintain. The macros remove the burden from the developer to write a wrapper lambda function by providing it automatically.

The following table contains the macros that are available and a short description for each:

Macro

Description

Status

Y_EMPTY_BEHAVIOR

Macro for creating a behavior that does nothing.

 

Y_EMPTY_GUARD

Macro for an empty guard.

 

Y_BEHAVIOR_METHOD2

Macro for using class methods as a behavior. It can take up to 10 methods as parametes.

since version 1.1.0

Y_BEHAVIOR_FUNCTION2

Macro for using free functions as a behavior. It can take up to 10 functions as parametes.

since version 1.1.0

Y_GUARD_METHOD2

Macro for using class methods as a guard. It can take up to 10 methods as parametes.

since version 1.1.0

Y_GUARD_FUNCTION2

Macro for using free functions as a guard. It can take up to 10 functions as parametes.

since version 1.1.0

Y_BEHAVIOR_ACTION

Macro for using any type of action as a behavior.

since version 1.1.0

Y_GUARD_ACTION

Macro for using any type of action as a guard.

since version 1.1.0

Y_BEHAVIOR_METHOD

Macro for using a class method as a behavior.

DEPRECATED (since version 1.1.0)

Y_BEHAVIOR_METHOD_NO_EVENT

Macro for using a class method as a behavior without an event.

DEPRECATED (since version 1.1.0)

Y_BEHAVIOR_FUNCTION

Macro for using a free function as a behavior.

DEPRECATED (since version 1.1.0)

Y_BEHAVIOR_FUNCTION_NO_EVENT

Macro for using a free function as a behavior without an event.

DEPRECATED (since version 1.1.0)

Y_GUARD_METHOD

Macro for using a class method as a guard.

DEPRECATED (since version 1.1.0)

Y_GUARD_METHOD_NO_EVENT

Macro for using a class method as a guard without an event.

DEPRECATED (since version 1.1.0)

Y_GUARD_FUNCTION

Macro for using a free function as a guard.

DEPRECATED (since version 1.1.0)

Y_GUARD_FUNCTION_NO_EVENT

Macro for using a free function as a guard without an event.

DEPRECATED (since version 1.1.0)