Specifying how UML-to-C++ transformations generate
standard operations
You can specify which standard operations
the transformation generates. Standard operations are constructors, copy constructors,
assignment operators, destructors, and getter and setter operations.
To specify how the C++ transformation generates
standard operations:
In the Project Explorer view, right-click
a transformation configuration file; then click Open.
Click the Properties tab.
On the Properties page, select the standard
operations that you want the transformation to generate.
Select the Assignment check box to generate
assignment operators.
Select the Destructor check box to generate
destructors.
Select the Virtual destructor check box to
generate virtual destructors in the target classes.
Select the Getters and setters check box to
generate getter and setter methods for the attributes of the generated classes,
structs, or unions.
Select the Inline check box to generate inline
getter and setter methods.
Select the By reference check box to generate
getter and setter methods that pass parameters and return values by using
references.
Click File > Save.
The transformation
creates the operations in the generated classes the next time that you run
the transformation.
Note: If you create a
new transformation configuration, you can specify this information on the Properties page
of the New Transformation Configuration wizard.