company logo

PropertyHandle :: SetGenAttribute - - Title unknown

The function sets the type for a generic attribute. The attribute type (as e.g. language) can be passed as string (attrstr) or type number (attrtype). When the property handle does not refer directly to a generic attribute the property path for the generic attribute in the instance must be passed to the function (propnames).

Return value:  Success ( logical  )

Implementation overview

Implementation details

  1. Set current property handle to attribute name
    logical PropertyHandle  :: SetGenAttribute ( NString &attrstr )
    • attrstr - Attribute type

      The attribute type is passed as 0-terminated string. It must be one of the defined values in the enumerated value set for the attribute types defined for the generic attribute. When the index is not generic, no attribute needs to be passes. If no attribute is passed for a generic index the current setting is used.

      Notes:

      retval checked for const &NString

  2. to list
  3. Set referenced property handle to attribute name
    logical PropertyHandle  :: SetGenAttribute ( NString &attrstr, NString &prop_path )

    The function searches for the property handle named in prop_path and changes the attribute type (attrstr) of it. In order to change all generic attributes to the same type (typically the same language) one may pass "*" in prop_path.

    • attrstr - Attribute type

      The attribute type is passed as 0-terminated string. It must be one of the defined values in the enumerated value set for the attribute types defined for the generic attribute. When the index is not generic, no attribute needs to be passes. If no attribute is passed for a generic index the current setting is used.

      Notes:

      retval checked for const &NString

    • prop_path - Property path

      A property path is passed as 0-terminated string. It may contain an extent or property name but also a sequence of property names separated by dot.

      Property path may start with a dot (.), which indicates, that the path starts in an upper property handle. One dot indicates, that the path starts in the current property handle. This distinction becomes necessary, when a property has the same name as an extent. To access the property in this case, one dot must precede the property name. The first dot can be omitted, when the property name is not an extent name.

      Referring to a path starting in a parent property handle requires two dots (..), the parents parent three and so on.

      address.street

      .address.street

  4. to list