User-defined data type

Via a user-defined data type (“Data Unit Type” = DUT) the user can define data types, e.g. in the form of structures or enumerations.

A user-defined structure data type can have the following relationship type:

User-defined data type 1:

A user-defined data type is represented by a two-part rectangle in pale yellow and overwritten with <<struct>>, if it is a structure or a union. <<enum>> indicates an enumeration type. The identifier follows in bold. All attributes are shown after the first dividing line:

<attribute name>: <data type>

Properties

“Property”

Description

“Identifier”

Insert or change an unique name of the selected element.

Edit DUT

The following user inputs are available if “Selection” is enabled in the toolbox (default).

User input in the class diagram

Response in the class diagram

Description

Select the tool "Data Unit Type (DUT)":

User-defined data type 2:

Click in an empty area of the diagram. The dialog “Add DUT” opens. Enter a name for the new object, adjust the settings and close the dialog with "Add".

A data type object is created.

The object exists in the diagram and in the project. The view in the project tree is updated automatically.

Click on a DUT.

User-defined data type 3:

Icons are visible to the left above.

Click on User-defined data type 4:.

DUT is only removed from the diagram.

Use "flat" removal to remove it from the class diagram view only. The object still exists and is visible in the project tree.

Click on User-defined data type 5:.

DUT is removed from the diagram and the project.

The object is removed. It then no longer exists.

Click on User-defined data type 6: and then in an empty area of the diagram.
The dialog “Add DUT” opens. Enter a name for the parent object and exit the dialog with "Add".

A generalization points from the existing DUT to the new DUT. The existing DUT inherits from the new one.

The existing DUT contains the declaration. Example:

TYPE ST_Sample EXTENDS ST_New

Click on User-defined data type 7:, then on an existing DUT.

A generalization arrow points from the second DUT to the first DUT.

The first DUT inherits from the second DUT. The first DUT contains the declaration. Example:

TYPE ST_Sample EXTENDS ST_Existent

Click on User-defined data type 8:.

 

The attribute or operation list is minimized.

Click on User-defined data type 9:.

 

The attribute or operation list expands.

Double-click on the identifier. Then change the name in the line editor.

After the first click, the name has a blue border. After the second click the line editor opens.

The change is applied synchronously and automatically to the project.

Double-click the element.

The corresponding object editor opens.

Edit the declaration or implementation. After closing of the editor you are returned to class diagram. The changes are automatically applied to the class diagram.

User-defined data type 10:

The default settings in the dialog “Add DUT” originate from the last application of this dialog.

Sample

User-defined data type 11:

TYPE ST_Sub EXTENDS ST_Sample :
STRUCT
aMessages : ARRAY[1..10] OF STRING;
END_STRUCT
END_TYPE