iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
attribute_specifier.hpp
Go to the documentation of this file.
1// Copyright (c) 2024 Contributors to the Eclipse Foundation
2//
3// See the NOTICE file(s) distributed with this work for additional
4// information regarding copyright ownership.
5//
6// This program and the accompanying materials are made available under the
7// terms of the Apache Software License 2.0 which is available at
8// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
9// which is available at https://opensource.org/licenses/MIT.
10//
11// SPDX-License-Identifier: Apache-2.0 OR MIT
12
13#ifndef IOX2_ATTRIBUTE_SPECIFIER_HPP
14#define IOX2_ATTRIBUTE_SPECIFIER_HPP
15
16#include "attribute_error.hpp"
19#include "iox2/bb/expected.hpp"
20
21namespace iox2 {
22
26 public:
32
33 auto operator=(const AttributeSpecifier&) -> AttributeSpecifier& = delete;
34 auto operator=(AttributeSpecifier&&) noexcept -> AttributeSpecifier&;
35
37 auto define(const Attribute::Key& key, const Attribute::Value& value)
38 -> bb::Expected<void, AttributeDefinitionError>;
39
42
43 private:
44 template <ServiceType>
45 friend class ServiceBuilderEvent;
46 template <typename, typename, ServiceType>
48 template <typename, typename, typename, typename, ServiceType>
50 template <typename, ServiceType>
52
53 void drop();
54
55 iox2_attribute_specifier_h m_handle = nullptr;
56};
57} // namespace iox2
58
59#endif
AttributeSpecifier()
Creates a new empty set of [Attribute]s.
AttributeSpecifier(const AttributeSpecifier &)=delete
auto attributes() const -> AttributeSetView
Returns the underlying [AttributeSetView].
AttributeSpecifier(AttributeSpecifier &&) noexcept
auto define(const Attribute::Key &key, const Attribute::Value &value) -> bb::Expected< void, AttributeDefinitionError >
Defines a value for a specific key. A key is allowed to have multiple values.
Builder to create new [MessagingPattern::Blackboard] based [Service]s.
Builder to create new [MessagingPattern::Event] based [Service]s.
Builder to create new [MessagingPattern::PublishSubscribe] based [Service]s.
AttributeDefinitionError
Failures that can occur when defining [Attribute]s with [AttributeSpecifier::define()].