Skip to content

TAttributeSet

Represents all service attributes. They can be set when the service is created.

Definition

Unit: Neslib.Iceoryx2.Types

type TAttributeSet = record ... end;

Properties

Name Description
Attributes Returns a TAttributeView at a specific index. The number of indices is returned via Count.
Count Returns the number of attributes stored inside the TAttributeSet.
Handle

Constructors

Name Description
Assign
Finalize
Initialize

Operators

Name Description
Equal
NotEqual

Methods

Name Description
IterateKeyValues Returns all values to a specific key
KeyValue Returns a value of a key at a specific index. The index enumerates the values of the key if the key has multiple values. The values are always stored at the same position during the lifetime of the service but they can change when the process is recreated by another process when the system restarts. If the key does not exist or it does not have a value at the specified index, it returns an empty string.
ToString Returns a string representation of the attributes
ValueCount Returns the number of values stored under a specific key. If the key does not exist it returns 0.
ValueCountUtf8 Returns the number of values stored under a specific key. If the key does not exist it returns 0.

Property Descriptions

Attributes

Returns a TAttributeView at a specific index. The number of indices is returned via Count.

property Attributes[const AIndex: Int64]: TAttributeView read GetAttribute; default

Type: TAttributeView


Count

Returns the number of attributes stored inside the TAttributeSet.

property Count: Int64 read GetCount

Type: Int64


Handle

property Handle: THandle read GetHandle

Type: THandle


Constructor Descriptions

Assign

constructor Assign(var ADest: TAttributeSet; const ASrc: TAttributeSet)

Parameters

ADest: TAttributeSet

ASrc: TAttributeSet


Finalize

destructor Finalize


Initialize

constructor Initialize


Operator Descriptions

Equal(TAttributeSet, Pointer)

class operator Equal(const ALeft: TAttributeSet; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TAttributeSet

ARight: Pointer

Returns

Boolean


NotEqual(TAttributeSet, Pointer)

class operator NotEqual(const ALeft: TAttributeSet; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TAttributeSet

ARight: Pointer

Returns

Boolean


Method Descriptions

IterateKeyValues(String, TCallback<String>)

Returns all values to a specific key

procedure IterateKeyValues(const AKey: String; const ACallback: TCallback<String>); inline

Parameters

AKey: String

ACallback: TCallback<String>


KeyValue(String, Int64)

Returns a value of a key at a specific index. The index enumerates the values of the key if the key has multiple values. The values are always stored at the same position during the lifetime of the service but they can change when the process is recreated by another process when the system restarts. If the key does not exist or it does not have a value at the specified index, it returns an empty string.

function KeyValue(const AKey: String; const AIndex: Int64): String; inline

Parameters

AKey: String

AIndex: Int64

Returns

String


ToString

Returns a string representation of the attributes

function ToString: String

Returns

String


ValueCount(String)

Returns the number of values stored under a specific key. If the key does not exist it returns 0.

function ValueCount(const AKey: String): Int64; inline

Parameters

AKey: String

Returns

Int64

Remarks

Use ValueCountUtf8 for a more efficient version that doesn't require UTF-8 conversion.


ValueCountUtf8(UTF8String)

Returns the number of values stored under a specific key. If the key does not exist it returns 0.

function ValueCountUtf8(const AKey: UTF8String): Int64; inline

Parameters

AKey: UTF8String

Returns

Int64