Closed sstiller closed 5 years ago
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). Perhaps we can add a compiler switch.
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
#if __cplusplus >= 201703L
to the generated code to use boost::any
or std::any
Then the type changes with the used c++ version automatically, what may not be wanted by the user.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/#SystemVariables with the contentsname
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.