Draft: Aron/feature/defaults ranges docs
TODOs:
- allow defaults, ranges and docs in ARON XML file definition
- docs are generated in seperate struct
- doc available for all
- ranges are generated in seperate struct
- e.g. int member
temperature
can have a min and max value - generated struct
docs_
with string membertemperature
- generated struct
ranges_
with memberstemerature.min
andtemperature.max
. TODO: What if only min is set? - range available for: long, float, double, time(?)
- range can be final (resulting in static const member) or variable
- e.g. int member
- defaults set the initial value of the members (TODO: reset hard or reset soft?)
- only possible to define defaults in XML for int, long, float, double, bool, string, time, enums
I would suggest the following syntax:
<ObjectChild key="temperature" doc="foo" author="xyz@foo.bar">
<float>
<default value="0" />
<min value="0" final/>
<max value="1" final/>
</float>
</ObjectChild>
Questions:
- In my eyes the doc belongs to the member definition (
<ObjectChild>
) and not the the value definition (the<float>
). What do you think?- Another option would be: keep the existing doc and author attribute in ObjectChild (which is only used to generate the doxygen/javadoc/whatever string) and have a
<doc value="foo" />
-tag inside the float-tag in addition which is used to create thedocs_
-struct? - If we all agree on this syntax, I will update the optional/raw_ptr/unique_ptr/shared_ptr definition as well (
<float><optional /></float>
). PS: I am aware that this is different to C++ where you have optional but it was easier that way.
- Another option would be: keep the existing doc and author attribute in ObjectChild (which is only used to generate the doxygen/javadoc/whatever string) and have a