Property sets in capsule-based UML models

You can associate a capsule-based UML model with several property sets. These property sets add domain-specific information to models to control aspects of code generation. The product includes predefined property sets for C++ transformations.

Each property set contains groups of properties that apply to a specific type of model element. Each property has a name, a default value, and a type, such as Boolean, integer, float, string, text, or enumeration.

When you create a capsule-based UML model, the properties in the property sets have default values. When you transform a model into code, you can either use the default values or you can change them. You can also define custom property sets for specific purposes.

You can change the default property values either at the model level or at the element level. If you change a property at the model level, the new value becomes the default value for all elements of that type in the model, unless you change that property at the element level.

If you change a property at the element level, the new value applies only to that specific element. A property that you change at the element level is not affected by any changes to the property value, either at the model level or in a default model. After you change the value of a property in a group, the other properties in that group are not affected by any changes to the property value at higher levels.

You can also define a separate default model that you can use for capsule-based UML models. If you specify that the capsule-based UML model uses a default model, the properties for all elements in the model are set to the values in the default model, unless you change the properties at the model or element level. You can use any model in the workspace as the default model, and multiple capsule-based models can use the same default model file.

At any time, you can set the value of a property to one of the following values:

At run time, the property sets that are available to a model are determined by which property profiles are applied to it. You can define custom property sets and create new properties and property groups by defining a new property profile. The new profile can apply to an existing domain, such as C, C++, or Java, or it can contain properties for a new domain. To use the properties after you create a new property profile, you apply the profile to a capsule-based UML model.


Feedback