-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add _event system variable if string events enabled #87
Conversation
Great addition I would prefer to use std:any instead boost:any to have a dependency on c++17 instead of boost |
In my targets I can only use C++14 (too old compilers). |
Yes, then both options are available. I think we should make the c++17 option the default because c++17 eventually will become more and more common. Also, we already have the c++17 dependency when using the --threadsafe option, where boost is a new one. |
Would you prefer
Or do you have another idea? |
I think I prefer a 'use boost instead c++17' option rather than using the ifdef, because its a matter of using/not using an external library more than enabling/disabling a feature that requires c++17 Also, it could end up with a lot of ifdefs with the other method because the threadsafe option has the same issue which also requires c++17 (this could also be implemented with boost as an alternative) |
Thanks a lot :-) |
Adding variable
_event
https://www.w3.org/TR/scxml/#SystemVariableswith the contents
name
anddata
. https://www.w3.org/TR/scxml/#InternalStructureofEvents_event.name
contains the event name asstd::string
_event.data
is aboost::any
(new dependency)The support for
_event
currently only works for string events._event.data
could be added to the other version ofdispatch()
later._event.data
is really great to update the data model in scxml or for guard conditions for transitions.