Open Haifischbecken opened 5 months ago
@m-mirz Can you maybe say something about whether this is a bug or a naming issue?
I'll have a look at fixing this for modern_python.
@Haifischbecken I am not really sure but I don’t think that it was intentionally done this way. I think it is a good idea to check and potentially change this.
@m-mirz Ok, great. As I said the same info is available via other attributes and it is basically unused as of now, so we can probably just remove it to avoid confusion.
Context
When running the generation for a class the templater is fed with the
class_details
dictonary. Within there is a list of attributes (class_details["attributes"}
]`) that describe the attributes. This attribute description contains a key dataType.Problem
The value of this key seems to be inconsitent or the name might be missleading, as for primitives (Integer, Boolean etc.) it does contain the type but for complex types it contains the muliplicity (e.g.
M:0..n
) for some reason. This seems to be either:Either way the contained information is available from other values
class_name
andmultiplicity
respectively which both seem to be more consitent and should likely be used instead.Scope
Other than the generation of a comment in the cpp generation the value from
dataType
is thus far only used in the modern_python langPack.