Code generation for objects

For objects with explicit type, code is generated as in previous versions of the product.

The following table lists the results of generating code for objects with implicit type.

Table 1. Results of generating code for objects with implicit type
Situation Results of code generation
Implicit type During code generation, the object is mapped in two parts:
  • An implicit class with the name <object>_C.
  • The instance of the class in its owner (either a composite class or package). The name of the instance is <object>.
Implicit type in a package (global) The code for the instance is generated in the package file and the code for the implicit class is generated into files named <object>.h and <object>.cpp.
Implicit type in a structured class (part) The code for the instance is generated in the composite class file and the code for the implicit class is generated as a nested class of the composite (in the file for the composite).
Embeddable objects The default code scheme for code generation for objects is changed to embeddable. The default values of the following properties were changed:
  • CPP_CG::Class::Embeddable is Checked
  • CPP_CG::Relation::ImplementWithStaticArray is FixedAndBounded
Note: For implicit objects, you can customize the suffix that is used in the generated code to differentiate the class/struct from the object by modifying the value of the property [lang]_CG::Configuration::ImplicitObjectTypeSuffix.