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

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

#include <attribute_set.hpp>

Public Member Functions

 AttributeSet (const AttributeSet &)=delete
 AttributeSet (AttributeSet &&rhs) noexcept
auto operator= (const AttributeSet &) -> AttributeSet &=delete
auto operator= (AttributeSet &&rhs) noexcept -> AttributeSet &
 ~AttributeSet ()
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.

Friends

class AttributeSetView

Detailed Description

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

Definition at line 78 of file attribute_set.hpp.

Constructor & Destructor Documentation

◆ AttributeSet() [1/2]

iox2::AttributeSet::AttributeSet ( const AttributeSet & )
delete

◆ AttributeSet() [2/2]

iox2::AttributeSet::AttributeSet ( AttributeSet && rhs)
noexcept

References AttributeSet().

◆ ~AttributeSet()

iox2::AttributeSet::~AttributeSet ( )

Member Function Documentation

◆ iter_key_values()

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

Returns all values to a specific key.

References iter_key_values().

Referenced by iter_key_values().

◆ key_value()

auto iox2::AttributeSet::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].

References key_value().

Referenced by key_value().

◆ number_of_attributes()

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

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

◆ number_of_key_values()

auto iox2::AttributeSet::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.

References number_of_key_values().

Referenced by number_of_key_values().

◆ operator=() [1/2]

auto iox2::AttributeSet::operator= ( AttributeSet && rhs) ->AttributeSet &
noexcept

References AttributeSet().

◆ operator=() [2/2]

auto iox2::AttributeSet::operator= ( const AttributeSet & ) ->AttributeSet &=delete
delete

References AttributeSet().

◆ operator[]()

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

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

◆ AttributeSetView

friend class AttributeSetView
friend

Definition at line 110 of file attribute_set.hpp.

References AttributeSet(), and AttributeSetView.

Referenced by AttributeSetView.


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