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 a method as a behavior.

since version 1.1.0

Y_BEHAVIOR_FREE_ACTION

Macro for using a free function as a behavior.

since version 1.5.0

Y_GUARD_ACTION

Macro for using a method as a guard.

since version 1.1.0

Y_GUARD_FREE_ACTION

Macro for using a free function as a guard.

since version 1.5.0

Create behaviors

Macro

Description

Status

C++ version

Y_BEHAVIOR_METHOD2_1

Macro for using a class method as a behavior.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_2

Macro for using class methods as a behavior. It takes 2 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_3

Macro for using class methods as a behavior. It takes 3 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_4

Macro for using class methods as a behavior. It takes 4 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_5

Macro for using class methods as a behavior. It takes 5 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_6

Macro for using class methods as a behavior. It takes 6 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_7

Macro for using class methods as a behavior. It takes 7 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_8

Macro for using class methods as a behavior. It takes 8 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_9

Macro for using class methods as a behavior. It takes 9 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_METHOD2_10

Macro for using class methods as a behavior. It takes 10 methods as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_1

Macro for using a free function as a behavior.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_2

Macro for using free functions as a behavior. It takes 2 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_3

Macro for using free functions as a behavior. It takes 3 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_4

Macro for using free functions as a behavior. It takes 4 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_5

Macro for using free functions as a behavior. It takes 5 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_6

Macro for using free functions as a behavior. It takes 6 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_7

Macro for using free functions as a behavior. It takes 7 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_8

Macro for using free functions as a behavior. It takes 8 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_9

Macro for using free functions as a behavior. It takes 9 functions as parametes.

since version 1.3.3

C++11/C++03

Y_BEHAVIOR_FUNCTION2_10

Macro for using free functions as a behavior. It takes 10 functions as parametes.

since version 1.3.3

C++11/C++03

Creating guards

Macro

Description

Status

C++ version

Y_GUARD_METHOD2_1

Macro for using a class method as a guard.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_2

Macro for using class methods as a guard. It takes 2 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_3

Macro for using class methods as a guard. It takes 3 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_4

Macro for using class methods as a guard. It takes 4 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_5

Macro for using class methods as a guard. It takes 5 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_6

Macro for using class methods as a guard. It takes 6 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_7

Macro for using class methods as a guard. It takes 7 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_8

Macro for using class methods as a guard. It takes 8 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_9

Macro for using class methods as a guard. It takes 9 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_METHOD2_10

Macro for using class methods as a guard. It takes 10 methods as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_1

Macro for using a free function as a guard.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_2

Macro for using free functions as a guard. It takes 2 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_3

Macro for using free functions as a guard. It takes 3 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_4

Macro for using free functions as a guard. It takes 4 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_5

Macro for using free functions as a guard. It takes 5 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_6

Macro for using free functions as a guard. It takes 6 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_7

Macro for using free functions as a guard. It takes 7 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_8

Macro for using free functions as a guard. It takes 8 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_9

Macro for using free functions as a guard. It takes 9 functions as parametes.

since version 1.3.3

C++11/C++03

Y_GUARD_FUNCTION2_10

Macro for using free functions as a guard. It takes 10 functions as parametes.

since version 1.3.3

C++11/C++03

Deprecated macros

The following table contains the macros that are marked as deprecated.

These macros can still be used if Y_USE_DEPRECATED is declared with a value coresponding to the level of the deprecation.

Macro

Description

Status

Level

Replaced by

Y_BEHAVIOR_METHOD

Macro for using a class method as a behavior.

DEPRECATED (since version 1.1.0)

1

Y_BEHAVIOR_METHOD2

Y_BEHAVIOR_METHOD_NO_EVENT

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

DEPRECATED (since version 1.1.0)

1

Y_BEHAVIOR_METHOD2

Y_BEHAVIOR_FUNCTION

Macro for using a free function as a behavior.

DEPRECATED (since version 1.1.0)

1

Y_BEHAVIOR_FUNCTION2

Y_BEHAVIOR_FUNCTION_NO_EVENT

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

DEPRECATED (since version 1.1.0)

1

Y_BEHAVIOR_FUNCTION2

Y_GUARD_METHOD

Macro for using a class method as a guard.

DEPRECATED (since version 1.1.0)

1

Y_GUARD_METHOD2

Y_GUARD_METHOD_NO_EVENT

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

DEPRECATED (since version 1.1.0)

1

Y_GUARD_METHOD2

Y_GUARD_FUNCTION

Macro for using a free function as a guard.

DEPRECATED (since version 1.1.0)

1

Y_GUARD_FUNCTION2

Y_GUARD_FUNCTION_NO_EVENT

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

DEPRECATED (since version 1.1.0)

1

Y_GUARD_FUNCTION2