2.1 Definition of User-defined Attributes

Syntax

Scalar Attributes

<data type> <attribute name> { := <value> } ;

Indexed Attributes

<data type> <attribute name> [ <integer value> ] ;

shadow Attributes

<data type> <attribute name> shadows { instance }
    <object> <attribute> { [ <index> ] } ;
<data type>

One of the data types available in the IDM, e.g. integer, object, string, boolean… can be used.

<attribute name>

The name of the attribute, it can be arbitrarily chosen by the user. The name has to correspond to the DM name convention for identifiers (uppercase letters at the beginning, etc.)

Example

  • Declaration without point:

    pushbutton MyButton
    {
      integer Position;
    }
  • Referencing with point:

    MyButton.Position := 1;
<value>

Value that corresponds to the data type defined before.

<integer value>

Number which defines the field size.

An attribute can be defined with the keyword shadows. It does not memorize its value, but accesses (by reading and writing) the following indicated object attribute. When the additional keyword instance is used, this means when the model is instantiated, the reference is set to the newly created instance and does not stay on the model.

<object>

Object which the attribute accesses.

<attribute>

Attribute of the object which the attribute accesses.

<index>

Indicates rows and columns for list objects and their attributes.

Examples