You can use the UML-to-C++ transformation to generate C++ code
from a UML model by creating a UML-to-C++ transformation configuration and
applying it to a model.
Applying the UML-to-C++ transformation profile
When you create a UML model, you can apply a profile to the model to control how the transformation generates code or artifacts. Adding a profile enables you to model additional elements that you cannot model with UML elements.
Setting preferences for UML-to-C++ transformations You can set preferences for UML-to-C++ transformations. For example, you can specify C++ preface and ending comments, and specify code formatting preferences.
Creating or editing UML-to-C++ transformation configurations To generate output such as code from a source model,or to generate a model from code, you must run a transformation. To run a transformation, you must create a transformation configuration. A transformation configuration specifies information that a transformation requires to generate the expected output.
Running and rerunning UML-to-C++ transformations You can run a transformation on an entire UML model or on a subset of model elements to generate output such as code. When you rerun the transformation after you change the source model or the generated code, you must identify the sections of generated code that you do not want the transformation to overwrite, and then protect them. Rerunning a transformation involves the same steps as running a transformation for the first time.