Closed valioiv closed 5 years ago
well, your proposed example should work already exactly as is ;-) except for the inclusion of custom types. The include part is not supported yet, but I will try if I can priorotize that.
An obvious workaround is to include the files before you include your state machine.
The documentation regarding this is also missing.
Yep, the float is OK, I agree. Sorry for the confusion... I wrote the following XML:
<data id="#include "<path_to_my_custom_header>/cust_header.h"" src=""/>
<data id="float flt" expr="0.5"/>
<data id="my::custom::name::space::CustomStruct1 cust" src=""/>
and managed to produce the following code, which seems OK for my needs at that moment:
#include "<path_to_my_custom_header>/cust_header.h";
float flt;
my::custom::name::space::CustomStruct1 cust;
data_model() : flt(0.5) {}
Thanks for confirmation!
You are welcome. It's hard to know, when the documentation is not complete ;-)
It seems impossible to put your own type for the entries - float, std::vector, some custom structure (#include "custom_struct.h" prior to), etc. Data in SCXML like that:
produce the following snippet:
Is it known to fixing it or how to workaround it in a different way?
For example if have something like that:
how the output will become (or anything compilable close to):