I moved return name; into the inner if-condition to avoid an exit of readComplexType before appending m_types. Then, the code generation runs through. Although the generated class looks good and I got some further insight into CPACS-generator through the debugging process, I'm still struggling with some details of the code. Maybe someone can check whether this is a reasonable fix or whether something else needs to be considered.
CPACS 3.4 constains some new baseTypes, e.g.
posExcl0IntBaseType
, which are leading to the following error:The xsd specification is as follows:
The problem is that the first
if
-condition (L340) is met, but the second is not (L347). Thus onlyname
is returned without adding the type tom_types
: https://github.com/RISCSoftware/cpacs_tigl_gen/blob/65f66ea98a1e7c4368e75e5f80b955a0b7e0aaf8/src/lib/SchemaParser.cpp#L339-L368I moved
return name;
into the innerif
-condition to avoid an exit ofreadComplexType
before appendingm_types
. Then, the code generation runs through. Although the generated class looks good and I got some further insight into CPACS-generator through the debugging process, I'm still struggling with some details of the code. Maybe someone can check whether this is a reasonable fix or whether something else needs to be considered.