-
Notifications
You must be signed in to change notification settings - Fork 8
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 profile class and writer to cpp #41
Add profile class and writer to cpp #41
Conversation
Most of the changes are fixes for class or attribute types in the generated code plus generation of profile class. Furtermore I try to minimize the interface between cimgen.py and lang_pack.py. Ideally there should be only 3 called functions:
The call to set_float_classes and set_enum_classes are now not needed anymore. I hope to get rid of the confusing calls to class_details["langPack"].base["base_class"] and class_details["langPack"].base"class_location", too. |
ok, when do you think this will be merged, so that @HUG0-D can rebase his PRs on top?
we think reflection is a more flexible approach with dataclasses because we can easily create serialisers and parsers without needs of templates and similar things (this should work also for JSON-LD, for example). what do you think? we are happy to have a call next week if you think the approach is interesting :) |
I'm not maintainer of the cimgen project.
If there is a better solution, I can remove the modernpython writer (including is_used..is_primitive_attribute in modernpython\templates\cimpy_class_template.mustache if not needed). I'm working currently more with cpp and java. I use the python stuff only for tests. Your function is_a_cim_datatype seems useful for cpp/java, too. It could make the detection of float classes easier. BTW: Do you think CIMDatatype is always only used as float, with fixed multiplier and unit? Like: Or should we be prepared to parse data with value, multiplier and unit, too: This example is from an older CIM file. But would it be valid to use value, multiplier and unit with CGMES 2.4.15/3.0.0? |
fdc2279
to
ee3b6a1
Compare
ee3b6a1
to
17986d1
Compare
Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
…m namespace Signed-off-by: Thomas Günther <[email protected]>
…writer to export CIM data into several files based on CGMES profiles) Signed-off-by: Thomas Günther <[email protected]>
17986d1
to
2ead869
Compare
Quality Gate passedIssues Measures |
Only changes for cpp: