$parent

Get or set the parent of the Struct node.

Struct->$parent

Return Values

Return Values

Return Value

Meaning

Reference to the parent Struct

Reference to the Struct of which Struct is a member.

""

Returned if one the following is true:

  • The Struct node has no parent

  • Struct refers to multiple Structs that do not have the same parent

  • Struct does not refer to a Struct.

Values of $procerror Commonly Returned Following $parent

Value

Error Constant

Meaning

-84

UACTERR_NO_OBJECT

Struct does not refer to a Stuct

-1151

USTRUCTERR_NO_COMMON_CHARACTERISTICS

Structs do not have a common name or parent

-1156

USTRUCTERR_NOT_A_SINGLE_STRUCT

Tried to assign a Struct node to multiple parents.

-1157

USTRUCTERR_ILLEGAL_MEMBER_TYPE

Not a valid Struct member type

-1158

USTRUCTERR_CIRCULAR_REFERENCE

Tried to move the Struct to a descendent of its current parent.

-1162

USTRUCTERR_NOT_ALLOWED_ON_TAGS

Tried to move the Struct to a $tags Struct of another Struct

Description

You use the $parent function to:

  • Get the parent of a Struct member, or get the parent of a collection of Structs that have the same parent. If the Structs have different parents, an error is returned in $procerror.

  • Detach a Struct node from its parent, making it a top node. For example:

    vStruct->$parent = ""
  • Move a Struct node to another Struct. For example:

    vStructA->$parent = vStructB

    This detaches the node StructA from its current parent and adds it as a member of StructB.

History

Version

Change

9.5.01

Introduced

Related Topics