Description
The SetParentObject method sets the referenced PBDOM_OBJECT to be the parent of the current PBDOM_ENTITYREFERENCE object.
Syntax
pbdom_entityref_name.SetParentObject(pbdom_object pbdom_object_ref)
Argument |
Description |
---|---|
pbdom_entityref_name |
The name of a PBDOM_ENTITYREFERENCE object |
pbdom_object_ref |
The PBDOM_OBJECT to be set as the parent of the current PBDOM_ENTITYREFERENCE object |
Return value
PBDOM_OBJECT.
Throws
EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE -- If the input PBDOM_OBJECT is not an object derived from PBDOM_OBJECT.
EXCEPTION_PBDOM_OBJECT_ALREADY_HAS_PARENT -- If the current PBDOM_ENTITYREFERENCE object already has a parent.
EXCEPTION_INAPPROPRIATE_USE_OF_PBDOM_OBJECT -- If the input PBDOM_OBJECT is of a class that does not have a legal parent-child relationship with the PBDOM_ENTITYREFERENCE class.
EXCEPTION_USE_OF_UNNAMED_PBDOM_OBJECT -- If the input PBDOM_OBJECT requires a user-defined name and it has not been named, or the name of the entity reference object has not been set.
Usage
This method sets the input PBDOM_OBJECT to be the parent of this PBDOM_ENTITYREFERENCE object. The caller is responsible for ensuring that the current PBDOM_ENTITYREFERENCE object and the input PBDOM_OBJECT can have a legal parent-child relationship. Currently only a PBDOM_ELEMENT or a PBDOM_ATTRIBUTE can be set as the parent of a PBDOM_ENTITYREFERENCE object.
See also