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 roles for generating C++ code (C++ code)
  
Setting up roles for generating C++ code (C++ code)
In addition to the standard Role properties in Modeler, you can apply the «C++ Role» stereotype to a Role, 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 Role as required.
3. Apply the «C++ Role» stereotype to the Role.
For information about applying Stereotypes to an item, see Applying a Stereotype to a model item.
4. Open the Role's Property Pages, and then click the C++ Role tab.
For information about setting the tagged value of a Tag Definition, see Setting a tagged value for an applied Tag Definition.
5. If you want to specify array text for the Role, specify the text (including brackets) as the tagged value of the C++ Array Spec tag definition.
6. If you want to specify a CV qualifier for the Role, set the tagged value of the C++ CV Qualifier tag definition as required.
7. If you want to use a container template class to implement the Role, reference the Class, Data Type or Interface through the tagged value of the C++ Data Type tag definition. If the container template class is not modeled in the Model, set the tagged value of the C++ Template Name tag definition to that of the container template class.
8. If a collection template class is used to implement the Role, specify the text you want between the angle brackets as the tagged value of the C++ Actual Template Parameters tag definition.
9. If you want to specify indirection text for the Role, such as * or *const, specify the text as the tagged value of the C++ Indirection tag definition.
10. If you want to specify a storage class keyword for the Role, set the tagged value of the C++ Storage Class tag definition to auto, register, extern or mutable.
11. If you want to specify the linkage, set the tagged value of the C++ Linkage tag definition as required, for example, extern "C".