Creating attributes

 

Creating an attribute

Attributes can be created by clicking on the  icon from a reference or a stereotype.

 

Steps:

1.      In the explorer, click on the stereotype or reference inside which you want to create the attribute.

2.      Click on the  icon.

3.      Enter the name of the attribute, choose its type, indicate the maximum cardinality for the type “String”.

4.      Confirm by clicking on the “OK” button.

 

The “Attribute” dialog box

 

Figure 88. The “Attribute” dialog box

 

Key:

·         Name”: This field is used to enter the name of the new attribute.

·         Type”: This field is used to select the type of the new attribute. An attribute is transformed after compilation by a tagged value usable in the UML model. A boolean-type attribute means that the compiled tagged value has no parameters. In this case, a true value indicates that the tagged value is present, while a false value means it is absent.

·         Maximum size”: This field is used to define the maximum cardinality for the attribute, only for the string-type.

·         "Inclusion in the signature": This field indicates that the operation signature comparison algorithm will taken the attribute into account.  For code generation purposes, typically for C++, the presence of certain tagged values must be taken into account by this algorithm.  When this option is selected, the parameters and qualifier of the tagged value, as well as its type, are included in the signature.

 

Updating diagrams

If the “Create/update MDA diagrams automatically” MDAC option is activated and if you use the MDA icons to create the attribute, the detailed diagram of the associated stereotype or reference is automatically updated.

 

Otherwise, the  button allows you to force the creation or update of the MDA diagrams.

 

Toolbar

The icons appearing in the “MDA” tab of the auxiliary window can be used to run the following commands:

 

Icon

Description

This icon is used to open this page.

This icon is used to check that the attribute has been correctly modeled.