RISCSoftware / cpacs_tigl_gen

Generates CPACS schema based classes for TiGL
Apache License 2.0
5 stars 5 forks source link

Question: What does `Type with name doubleBaseType already exists` mean? #58

Open MarAlder opened 6 months ago

MarAlder commented 6 months ago

I'm a bit stumped. Why do I get the following message with the CPACS 3.5 schema?

Exception: Type with name doubleBaseType already exists

https://github.com/RISCSoftware/cpacs_tigl_gen/blob/5661239f06a7436df24be5b07e75f384b609ec5e/src/lib/SchemaParser.cpp#L313-L314

What could have changed in the 3.5 schema compared to 3.3 that triggers this problem?

cpacs_schema.zip

MarAlder commented 4 months ago

Further testing has revealed that it is due to the alphabetic sorting of the types that I introduced with CPACS 3.5 using a Python script.

Applied alphabetic sorting to CPACS 3.4, it shows that the C++ code is generated when I move doubleBaseType, stringArrayBaseType, and stringVectorBaseType to the beginning of the XSD.

Does this give an indication of what might be buggy about the CPACSGen code shown above?