record TgoBsonBinaryData

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TgoBsonBinaryData = record

Description

A blob of binary data

Overview

Methods

class function Create: TgoBsonBinaryData; overload; static;
class function Create(const AData: TBytes): TgoBsonBinaryData; overload; static;
class function Create(const AData: TBytes; const ASubType: TgoBsonBinarySubType): TgoBsonBinaryData; overload; static;
class operator Implicit(const A: TgoBsonBinaryData): TgoBsonValue; static;
class operator Equal(const A, B: TgoBsonBinaryData): Boolean; static;
class operator NotEqual(const A, B: TgoBsonBinaryData): Boolean; static;
function IsNil: Boolean; inline;
procedure SetNil; inline;
function Clone: TgoBsonBinaryData; inline;
function DeepClone: TgoBsonBinaryData; inline;
function ToBson: TBytes; inline;
function ToJson: String; overload; inline;
function ToJson(const ASettings: TgoJsonWriterSettings): String; overload; inline;

Properties

property SubType: TgoBsonBinarySubType read GetSubType;
property Count: Integer read GetCount;
property Bytes[constAIndex:Integer]: Byte read GetByte write SetByte;
property AsBytes: TBytes read GetAsBytes;

Description

Methods

class function Create: TgoBsonBinaryData; overload; static;

Creates an empty BSON binary.

Returns

The empty BSON binary

class function Create(const AData: TBytes): TgoBsonBinaryData; overload; static;

Creates a BSON binary from a byte array.

Parameters
AData
the bytes to populate the binary with.
Returns

The BSON binary

class function Create(const AData: TBytes; const ASubType: TgoBsonBinarySubType): TgoBsonBinaryData; overload; static;

Creates a BSON binary from a byte array.

Parameters
AData
the bytes to populate the binary with.
ASubType
the type of binary data in AData.
Returns

The BSON binary

class operator Implicit(const A: TgoBsonBinaryData): TgoBsonValue; static;

Implicitly casts a BSON binary to a BSON value.

class operator Equal(const A, B: TgoBsonBinaryData): Boolean; static;

See TgoBsonValue.Equal

class operator NotEqual(const A, B: TgoBsonBinaryData): Boolean; static;

See TgoBsonValue.NotEqual

function IsNil: Boolean; inline;

See TgoBsonValue.IsNil

procedure SetNil; inline;

See TgoBsonValue.SetNil

function Clone: TgoBsonBinaryData; inline;

See TgoBsonValue.Clone

function DeepClone: TgoBsonBinaryData; inline;

See TgoBsonValue.DeepClone

function ToBson: TBytes; inline;

See TgoBsonValue.ToBson

function ToJson: String; overload; inline;

See TgoBsonValue.ToJson

function ToJson(const ASettings: TgoJsonWriterSettings): String; overload; inline;

See TgoBsonValue.ToJson

Properties

property SubType: TgoBsonBinarySubType read GetSubType;

The type of binary data this object contains

property Count: Integer read GetCount;

Number of bytes in the binary data

property Bytes[constAIndex:Integer]: Byte read GetByte write SetByte;

The bytes in the binary data.

Parameters
AIndex
the index of the byte to get or set.
Exceptions raised
EArgumentOutOfRangeException
in AIndex is out of bounds.
property AsBytes: TBytes read GetAsBytes;

Returns the binary as a byte array


Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26