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.
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".