company logo

PropertyHandle :: GetAttribute - Get attribute according to position

The function returns the name of the attribute according to the given index. The attribute index corresponds to the definition of the structure. Attributes returned are always attributes with basic (elementary) types.

Attributes in base structures or embedded structures are returned as property paths (e.g. address.city when address is a structured attribute in person). The leading part for base structures (usually the structure name) is displayed only when passing YES for the full_path option (default: NO ).

Generic attributes can be considered as references or as attributes. The generic option defines whether generic attributes are considered as attributes (default: YES ).

If there are no attributes defined for the structure the function returns NULL . When an attribute with the given index has been found the function returns the property path in the fldpath .

The function returns the path in communication area of the property handle. This area is destroyed when calling the next PropertyHandle function.

Return value:  proppath - Title unknown ( NString & )

Implementation details

const NString & PropertyHandle  :: GetAttribute ( int32 indx0, logical full_path_w=YES, logical generic=YES )
  • indx0 - Position in collection

    The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.

    For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.

    Special positions are

    CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.

    FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).

    FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).

  • full_path_w - - internal feature (not documented) Default: YES
  • generic - Generic attribute option

    The option allows considering generic attributes as references.

    Default: YES