iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::AttributeSetView Class Reference

#include <attribute_set.hpp>

Public Member Functions

auto number_of_attributes () const -> uint64_t
 Returns the number of [Attribute]s stored inside the [AttributeSet].
 
auto operator[] (uint64_t index) const -> AttributeView
 
auto number_of_key_values (const Attribute::Key &key) const -> uint64_t
 
auto key_value (const Attribute::Key &key, uint64_t idx) -> bb::Optional< Attribute::Value >
 
void iter_key_values (const Attribute::Key &key, const iox2::bb::StaticFunction< CallbackProgression(const Attribute::Value &)> &callback) const
 Returns all values to a specific key.
 
auto to_owned () const -> AttributeSet
 Creates a copy of the [AttributeSetView] that owns the attributes.
 

Friends

template<ServiceType , typename , typename >
class PortFactoryPublishSubscribe
 
template<ServiceType , typename , typename , typename , typename >
class PortFactoryRequestResponse
 
template<ServiceType >
class PortFactoryEvent
 
template<ServiceType , typename >
class PortFactoryBlackboard
 
class AttributeVerifier
 
class AttributeSpecifier
 
class StaticConfig
 
class AttributeSet
 

Detailed Description

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

Attention
The parent from which the view was extracted MUST live longer than the [AttributeSetView].

Definition at line 30 of file attribute_set.hpp.

Member Function Documentation

◆ iter_key_values()

void iox2::AttributeSetView::iter_key_values ( const Attribute::Key key,
const iox2::bb::StaticFunction< CallbackProgression(const Attribute::Value &)> &  callback 
) const

Returns all values to a specific key.

◆ key_value()

auto iox2::AttributeSetView::key_value ( const Attribute::Key key,
uint64_t  idx 
) -> bb::Optional< Attribute::Value >

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 [None].

◆ number_of_attributes()

auto iox2::AttributeSetView::number_of_attributes ( ) const -> uint64_t

Returns the number of [Attribute]s stored inside the [AttributeSet].

◆ number_of_key_values()

auto iox2::AttributeSetView::number_of_key_values ( const Attribute::Key key) const -> uint64_t

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

◆ operator[]()

auto iox2::AttributeSetView::operator[] ( uint64_t  index) const -> AttributeView

Returns a [AttributeView] at a specific index. The number of indices is returned via [AttributeSetView::number_of_attributes()].

◆ to_owned()

auto iox2::AttributeSetView::to_owned ( ) const -> AttributeSet

Creates a copy of the [AttributeSetView] that owns the attributes.

Friends And Related Symbol Documentation

◆ AttributeSet

friend class AttributeSet
friend

Definition at line 70 of file attribute_set.hpp.

◆ AttributeSpecifier

friend class AttributeSpecifier
friend

Definition at line 68 of file attribute_set.hpp.

◆ AttributeVerifier

friend class AttributeVerifier
friend

Definition at line 67 of file attribute_set.hpp.

◆ PortFactoryBlackboard

template<ServiceType , typename >
friend class PortFactoryBlackboard
friend

Definition at line 66 of file attribute_set.hpp.

◆ PortFactoryEvent

template<ServiceType >
friend class PortFactoryEvent
friend

Definition at line 64 of file attribute_set.hpp.

◆ PortFactoryPublishSubscribe

template<ServiceType , typename , typename >
friend class PortFactoryPublishSubscribe
friend

Definition at line 60 of file attribute_set.hpp.

◆ PortFactoryRequestResponse

template<ServiceType , typename , typename , typename , typename >
friend class PortFactoryRequestResponse
friend

Definition at line 62 of file attribute_set.hpp.

◆ StaticConfig

friend class StaticConfig
friend

Definition at line 69 of file attribute_set.hpp.


The documentation for this class was generated from the following file: