Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "any state" feature #602

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Conversation

rvdvvdw
Copy link
Contributor

@rvdvvdw rvdvvdw commented Oct 11, 2023

Allowing a default reaction on events without having to add them to every state.
I believe a similar feature exists in sml2

Problem:
-Many (of my) state machines have events that are handled in (almost) all states. For example, transitions to an error state or a stop/abort event. Currently there is no way to express a default reaction to an event.

Solution:
-Added an "any" state. The any state is written as "state<>". Whenever an event is processed in a state that does NOT handle that event, the "any" state is checked. If the "any" state handles the event it is processed as if the current state is the "any" state. This change could break code that already uses "state<>" as a normal state.

Issue: #328

Reviewers:
@krzysztof-jusiak

@kris-jusiak kris-jusiak merged commit 07d1590 into boost-ext:master Oct 11, 2023
4 checks passed
@rvdvvdw rvdvvdw deleted the any_state branch October 12, 2023 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants