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 warning and code formatting preferences for UML-to-C++ transformations.
For example, you can specify C++ preface and closing comments, and specify
indentation style preferences.
Setting system arguments for UML-to-C++ transformations
You can specify system arguments for the UML-to-C++ transformation
in the eclipse.ini file, which enables you to specify transformation behavior
that is not contained in the transformation configuration file. For example,
you can specify alternate file name extensions and change the display order,
based on visibility, of generated attributes and operations.
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
can 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.