TBoldObjectReference¶
Reference to a Bold object
Unit: BoldSystem
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- TBoldElement
- TBoldDomainElement
- TBoldMember
- TBoldObjectReference
Description¶
A TBoldObjectReference is a member that holds a reference to a Bold object. It is primarily used for roles with [0..1] multiplicity. Like TBoldObjectList, it has additional methods for manipulating the Bold object by its locator. This is more efficient since the Bold object does not have to be loaded into memory.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| BoldObject | The object the reference refers to | |
| BoldRoleRTInfo | The model information for the object reference | read-only |
| HasOldValues | Bold-internal | |
| Locator | The locator of the referred object | |
| OldEmbeddingOtherEndId | Bold-internal | read-only |
BoldObject¶
The object the reference refers to
BoldRoleRTInfo¶
This property is the same as BoldMemberRtInfo, casted to TBoldRoleRTInfo.
HasOldValues¶
Bold-internal
Locator¶
It can be more efficient to access the Locator property, than the BoldObject property, as it will not require the object to be fetched.
OldEmbeddingOtherEndId¶
Bold-internal
Methods¶
| Name | Summary | Notes |
|---|---|---|
| Assign | Overrides TBoldElement.Assign | override |
| CanClear | If it is allowed to Clear the reference | |
| CanSet | If it is allowed to set the object reference to the NewObject | |
| CanSetLocator | Same as CanSet, but takes a locator instead. | |
| Clear | Set the object reference to nil. | |
| CompareToAs | Overrides TBoldElement.CompareToAs | override |
| CreateTypedReference | Construct a TBoldObjectReference for Bold objects of type ObjectClass. | |
| DefaultSubscribe | Overrides TBoldElement.DefaultSubscribe | override |
| Destroy | Destructor | override |
| GetAsList | Overrides TBoldElement.GetAsList | override |
| GetStreamName | Overrides TBoldMember.GetStreamName | protected, override |
| GetStringRepresentation | Overrides TBoldElement.GetStringRepresentation | protected, override |
| InitializeMember | Overrides TBoldMember.InitializeMember | protected, override |
| IsEqualAs | Overrides TBoldElement.IsEqualAs | override |
| IsEqualToValue | Overrides TBoldMember.IsEqualToValue | override |
| ObserverMayModify | Overrides TBoldElement.ObserverMayModify | override |
| ProxyClass | Overrides TBoldMember.ProxyClass | protected, override |
| ProxyInterface | Overrides TBoldElement.ProxyClass | override |
| SetStringRepresentation | Overrides TBoldElement.SetStringRepresentation | protected, override |
| SubscribeToStringRepresentation | Overrides TBoldElement.SubscribeToStringRepresentation | override |
Assign¶
A TBoldObjectReference can be assigned another TBoldObjectReference, or a TBoldObject.
CanClear¶
You can make CanClear return false, and thus prohibit Clear on a TBoldObjectReference, by subscribing to the bqMayClear query and returning false.
CanSet¶
Returns True if it is allowed to set the object reference to the NewObject. A programmer can disallow setting by subscribing to the bqMaySet query. If a Subscriber is passed to the function, subscriptions will be placed to notify when the result of CanSet may have changed. Note that the parameter to the bqMaySet query will be the locator of the NewObject, and not the NewObject itself.
See Also
- Subscriptions
CanSetLocator¶
Returns True if it is allowed to set the object reference to the Bold object of NewLocator. A programmer can disallow setting by subscribing to the bqMaySet query. If a Subscriber is passed to the function, subscriptions will be placed to notify when the result of CanSetLocator may have changed.
See Also
- Subscriptions
Clear¶
Set the object reference to **nil**.
CompareToAs¶
function CompareToAs(CompareType: TBoldCompareType; BoldElement: TBoldElement): Integer; override; See also Ancestor Method
Overrides CompareToAs. An object reference can be compared with another object reference, or a TBoldObject. The result is the same as comparing the objects, except if one of the references is **nil**. **Nil** is considered smaller than any object.
CreateTypedReference¶
Construct a TBoldObjectReference for Bold objects of type ObjectClass.
DefaultSubscribe¶
procedure DefaultSubscribe(Subscriber: TBoldSubscriber; RequestedEvent: TBoldEvent = breReEvaluate); override; See also Ancestor Method
The default events for a TBoldObjectReference are beValueChanged and beValueInvalid.
See Also
- Subscriptions
Destroy¶
Destructor
GetAsList¶
Will result in a TBoldObjectList containing the Bold object that the references refers to. If the reference is **nil**, the list will be empty.
GetStreamName¶
Overrides GetStreamName
GetStringRepresentation¶
function GetStringRepresentation(Representation: TBoldRepresentation): string; override; See also Ancestor Method
The string representation of a TBoldObjectReference is the string representation of the object it refers, or the empty string if **nil**
InitializeMember¶
procedure InitializeMember(AOwningElement: TBoldDomainElement; ElementTypeInfo: TBoldElementTypeInfo); override; See also Ancestor Method
Overrides TBoldMember
IsEqualAs¶
function IsEqualAs(CompareType: TBoldCompareType; BoldElement: TBoldElement): Boolean; override; See also Ancestor Method
A reference is considered equal if the object it refers is equal. Also, a **nil** reference is equal to another **nil** reference, or to **nil**.
IsEqualToValue¶
Overrides IsEqualToValue. In contrast to IsEqualAs, IsEqualToValue is only true if the references refer the same object, but not if two different objects are equal (using IsEqual).
ObserverMayModify¶
Overrides ObserverMayModify
ProxyClass¶
Overrides ProxyClass
ProxyInterface¶
function ProxyInterface(const IId: TGUID; Mode: TBoldDomainElementProxyMode; out Obj): Boolean; override; See also Ancestor Method
Overrides ProxyClass
SetStringRepresentation¶
procedure SetStringRepresentation(Representation: TBoldRepresentation; Value: string); override; See also Ancestor Method
This sets the string representation of the referred object.
SubscribeToStringRepresentation¶
procedure SubscribeToStringRepresentation(Representation: TBoldRepresentation; Subscriber: TBoldSubscriber; RequestedEvent: TBoldEvent = breReEvaluate); override; See also Ancestor Method
Overrides SubscribeToStringRepresentation
See Also
- Subscriptions
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.