Table of Contents

Interface IObjectInstance

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

Represents a single live object instance — a class module's activation record, owning the storage for every instance field it declares (RD-VBAL §2.3.1.2's instance heap tier). Two instances of the same class module never share a field's storage: each gets its own independent binding, exactly as two activations of the same procedure never share a local's storage on ICallStackFrame.

public interface IObjectInstance

Remarks

⚠️ An IObjectInstance is not immutable: the value retrieved for a given field may be different at a subsequent retrieval. Its lifetime is tracked separately, by ISessionObjects and the VBRuntimeObjectId it was created for.

Properties

ClassModule

The VBClassModuleSymbol this is an instance of.

VBClassModuleSymbol ClassModule { get; }

Property Value

VBClassModuleSymbol

ObjectId

The identity ISessionObjects tracks this instance's lifetime under.

VBRuntimeObjectId ObjectId { get; }

Property Value

VBRuntimeObjectId

Methods

GetValue(Symbol)

Gets the IBindingHandle currently held on this instance for the specified instance field Symbol.

IBindingHandle GetValue(Symbol field)

Parameters

field Symbol

Returns

IBindingHandle

Exceptions

KeyNotFoundException

No binding exists for field on this instance.

Push(Symbol, VBTypedValue)

Declares field on this instance and reserves storage sized for value, its initial value — the class's declared type default for a freshly created instance.

void Push(Symbol field, VBTypedValue value)

Parameters

field Symbol
value VBTypedValue

Exceptions

InvalidOperationException

field is already declared on this instance.

TryResolve(Symbol, out IBindingHandle?)

Gets the IBindingHandle currently held on this instance for the specified instance field Symbol, if any.

bool TryResolve(Symbol field, out IBindingHandle? value)

Parameters

field Symbol
value IBindingHandle

Returns

bool