TBoldIndirectElement¶
Reference to a TBoldElement
Unit: BoldElements
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldIndirectElement
Description¶
A TBoldIndirectElement may either own its Value, or refer to an existing TBoldElement that is owned by someone else. A common use of a TBoldIndirectElement is to use it for returning the result of evaluating an expression Evaluate A TBoldIndirectElement can be created by anyone. When destroyed, it might or might not cascade the destroy to its value depending on whether the value is owned or not (but this is somehting determined by the Evaluate-method, and not the creator of the indirect element.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| OwnsValue | True if the indirect element owns the value it refers to. | read-only |
| Value | Referred element of the indirect element | read-only |
OwnsValue¶
The Value of a TBoldIndirectElement can either be an existing TBoldElement, or one that has been created solely for the purpose of some derivation. In the latter case, the indirect value owns the value, and will be responsible for freeing it.
Value¶
The purpose of an indirect element is to refer to a TBoldElement, that it either owns or not. The Value property holds that element.
Methods¶
| Name | Summary | Notes |
|---|---|---|
| Destroy | Destructor | override |
| RelinquishValue | Makes the indirect element give up ownership of its value. | |
| SetOwnedValue | Sets the value, and passes ownership. | |
| SetReferenceValue | Sets the value, without passing ownership. | |
| TransferValue | Transfers the value to another indirect element. |
Destroy¶
Destructor
RelinquishValue¶
This function returns the value of the indirect element. It also passes the ownership of the element to the caller. After RelinquishValue the indirect element's Value property will be **nil**
SetOwnedValue¶
This method will set the indirect element's Value property to NewValue, and OwnsValue to true. If the indirect element was already owning another element, that element will be freed.
SetReferenceValue¶
This method will set the indirect element's Value property to NewValue, and OwnsValue to false. If the indirect element was owning another element, that element will be freed.
TransferValue¶
The Value element will be transferred to the Target. If the indirect element has ownership of the value, ownership will also be passed. After TransferValue, the Value property will be **nil**.
Generated from the Bold 4.0 help (Help/BfD.chm) by Tools/chm2mkdocs.py; member lists reflect Bold 4.0, see the source for members added since.