Class TXQValueObject
Unit
xquery
Declaration
type TXQValueObject = class(TXQValueJSONIQItem)
Description
(Experimental) object type. Every object obj has properties obj.something which are arbitrary TXQValue-s and a prototype from which it inherits all properties. The objects can be used mutable and immutable. If used immutable, they still appear mutable, but every change creates a new object that is linked to the previous objects (i.e. has the old object as prototype). (Having the objects immutable, is necessary for the template matcher, so that it can correctly rollback all changes)
Hierarchy
Overview
Fields
Methods
Description
Fields
Methods
|
constructor create(); reintroduce; virtual; |
|
|
destructor Destroy; override; |
|
|
function hasProperty(const name: string; value: PXQValue): boolean; |
Checks if the object (or its prototype) has a certain property, and returns the property value directly (i.e. changing valueˆ will change the value stored in the object). (You can pass nil for value, if you don't need the value)
|
|
function getProperty(const name: string): IXQValue; override; |
Returns the value of a property
|
|
procedure setMutable(const name: string; const v: IXQValue); |
Changes a property
|
|
function setImmutable(const name: string; const v: IXQValue): TXQValueObject; |
Creates a new object with the same values as the current one and changes a property of it
|
|
procedure setMutable(const name: string; const s: string); |
Changes a property (string wrapper)
|
|
function setImmutable(const name: string; const s: string): TXQValueObject; |
Creates a new object with the same values as the current one and changes a property of it (string wrapper)
|
|
procedure enumerateKeys(sl: TStringList); |
|
|
function toBooleanEffective: boolean; override; |
|
|
function clone: IXQValue; override; |
Creates a hard clone of the object (i.e. also clones all properties)
|
|
function jsonSerialize(nodeFormat: TTreeNodeSerialization; insertWhitespace: boolean = false; const indent: string = ''): string; override; |
|
|
function xmlSerialize(nodeFormat: TTreeNodeSerialization; sequenceTag: string = 'seq'; elementTag: string = 'e'; objectTag: string = 'object'): string; override; |
|
|
class procedure prepareInternetRequest(const obj: IXQValue; out method, url, post: string; internet: TInternetAccess); static; |
|
Generated by PasDoc 0.14.0.
|