Skip to content

TAttributeSetView

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

Definition

Unit: Neslib.Iceoryx2.Types

type TAttributeSetView = record ... end;

Remarks

The parent from which the view was extracted MUST live longer than the TAttributeSetView.

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.

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.
ToOwned Creates a copy of the TAttributeSet that owns the attributes.
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.

property Count: Int64 read GetCount

Type: Int64


Method Descriptions

IterateKeyValues(String, TCallback<String>)

Returns all values to a specific key

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

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

Parameters

AKey: String

AIndex: Int64

Returns

String


ToOwned

Creates a copy of the TAttributeSet that owns the attributes.

function ToOwned: TAttributeSet; inline

Returns

TAttributeSet


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

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