Index

C/C++ Functions

pdPropAddAsRef

DT_SWORD pdPropAddAsRef(DT_PDDOC power_doc, DT_ID_SLONG obj, DT_SLONG name, DT_ID_SLONG ref_obj, DT_SLONG ref_name)

Short Description: Add property by reference

The pdPropAddAsRef function adds a PowerDoc property to the PowerDoc object obj. This function is compatible with pdPropAdd, which means that the properties created by this function can be used in the same capacity as if they were created by pdPropAdd. However, unlike pdPropAdd which adds a property by value, this functions only adds a reference to another existing property in the document (which is called the target property or referenced property). In this way, the newly added property is a virtual copy of the target property and occupies a very small amount of storage space in the object obj (only the amount it takes to store the reference). The value of this property always equals the value of its target property. In other words, whenever the value of the target property changes, the value of the referencing property created by this function also changes to that same value.

The target property can be located anywhere in the document (i.e. it can be in the same object or it can be in some other PowerDoc object) and can even be a property reference itself.

Parameters

ParameterDescription

power_doc

Handle of the associated Power Engine document.

obj

Object's index in the Power Engine document.

name

A numerical value that identifies the property to be added. Can be a user-defined value or one of the predefined PowerDoc values. For a list of predefined name values, see the pdPropAdd function.

ref_obj

Index of the PowerDoc object that holds the referenced (target) property.

ref_name

A numerical value that identifies the referenced (target) property in the object ref_obj.

Return Value

See pdPropAdd.

Comments

See pdPropAdd.

Related Functions

pdPropGetAsRef, pdPropSetAsRef
pdPropAdd
pdPropDel

 

Index