Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C++ code > Generating C++ code > Generating C++ code > Modeling C++ code in Modeler > Setting up type definitions for generating C++ code (C++ code)
  
Setting up type definitions for generating C++ code (C++ code)
In addition to the standard Type Definition properties in Modeler, you can apply the «C++ Typedef» stereotype to a Type Definition, and then use its Tag Definitions to define C++ specific information.
1. If you have not done so already, add the C++ Profile package to your Model. How?
2. Set the standard properties of the Type Definition as required.
3. If you want to generate the Type Definitions of a Model, Package, Class, Interface or Signal in a specific order, order the Type Definitions as required. Tell me more...
4. Apply the «C++ Typedef» stereotype to the Type Definition.
For information about applying Stereotypes to an item, see Applying a Stereotype to a model item.
5. Open the Type Definition's Property Pages, and then click the C++ Typedef tab.
For information about setting the tagged value of a Tag Definition, see Setting a tagged value for an applied Tag Definition.
6. If you want to specify array text for the Type Definition, specify the text (including brackets) as the tagged value of the C++ Array Spec tag definition.
7. If you want to specify a CV qualifier for the Type Definition, set the tagged value of the C++ CV Qualifiertag definition as required.
8. If you want to specify indirection text for the Type Definition, such as * or *const, specify the text as the tagged value of the C++ Indirection tag definition.
9. If the Type Definition's underlying type is a template class, specify the text you want between the angle brackets as the tagged value of the C++ Actual Template Parameterstag definition.
10. If you want to specify that the Type Definition is of type 'pointer to function', specify the function pointer return as the tagged value of the C++ Function Pointer Return tag definition and specify any function pointer parameters as the tagged value of the C++ Function Pointer Parameterstag definition. The tag definitions are generated as follows for the Type Definition:
typedef <C++ Function Pointer Return> (<C++ Indirection><C++ Name>)(<C++ Function Pointer Parameters>);
11. If the Type Definition is scoped to a Class or Interface and you want to specify that the Type Definition is a non-member, that is, the Type Definition is not a member of the owning Class or Interface but you want it to appear in the owning Class' or Data Type's header file, set the tagged value of the C++ Non Member tag definition to TRUE.
12. If you want to specify the linkage, set the tagged value of the C++ Linkage tag definition as required, for example, extern "C".