Generate C++ files for EXPRESS schema

The C++ files representing an EXPRESS schema are generated by means of the EDMsupervisor™ command.
Schemata->Generate Interface->Cpp 2010
The command has the parameters and options listed in Table 3, below.
Table 3: Parameters and options for the Generate Cpp 2010 command

Parameter name

Description and options

Schema:

The name of the EXPRESS schema the generator shall generate C++ files for.

Cpp interface output directory:

The directory where the generated C++ files shall be written.

Namespace:

The C++ namespace used in the generated C++ files

Class addition folder:

It is possible to add declarations to the generated C++ classes. The additions must be written in a file located in the specified folder. The name of the file must be as follows:

<entity name>_addition.h

If you, for example, want to implement a method called getShape in the class fea_model, you write a file named fea_model_addition.h with the following content:

public:
product_definition_shape *getShape();

and store the file in the specified folder.

Complex entity file name:

In EXPRESS it is possible to compose entity definitions that are the union of other entities (object classes). These entities are called complex entities and the syntax is as follows:

<entity_1>+<entity_2>
The specified file shall contain one line for each complex entity the generator shall generate implementation for in addition to the entities in the specified schema.

A file containing the following line

conversion_based_unit+mass_unit

specifies that the generator shall generate a class named conversion_based_unit_mass_unit.
The possible combinations are numerous and the EDMcompiler does not include any complex entities in the dictionary model. The dictionary model is updated on the fly the first time a proper complex entity is being instantiated. Such a pattern will not work for the generated C++ classes. One needs to anticipate up front which complex entities will be used in a project; but, if just one is forgotten, one must regenerate the C++ files after updating the complex entity file.