iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
port_factory_notifier.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_PORTFACTORY_NOTIFIER_HPP
14#define IOX2_PORTFACTORY_NOTIFIER_HPP
15
17#include "iox2/bb/expected.hpp"
19#include "iox2/notifier.hpp"
21#include "iox2/port_name.hpp"
22#include "iox2/service_type.hpp"
23
24namespace iox2 {
27template <ServiceType S>
29 public:
32#ifdef DOXYGEN_MACRO_FIX
33 auto default_event_id(const EventId value) -> decltype(auto);
34#else
36#endif
37
41#ifdef DOXYGEN_MACRO_FIX
42 auto name(const PortName value) -> decltype(auto);
43#else
45#endif
46
47 public:
49 auto operator=(PortFactoryNotifier&&) noexcept -> PortFactoryNotifier& = default;
50 ~PortFactoryNotifier() = default;
51
53 auto operator=(const PortFactoryNotifier&) -> PortFactoryNotifier& = delete;
54
56 auto create() && -> bb::Expected<Notifier<S>, NotifierCreateError>;
57
58 private:
59 template <ServiceType>
60 friend class PortFactoryEvent;
61
62 explicit PortFactoryNotifier(iox2_port_factory_notifier_builder_h handle);
63
64 iox2_port_factory_notifier_builder_h m_handle = nullptr;
65};
66} // namespace iox2
67
68#endif
#define IOX2_BUILDER_OPTIONAL(type, name)
Definition builder.hpp:47
Type that allows to identify an event uniquely.
Definition event_id.hpp:22
Represents the sending endpoint of an event based communication.
Definition notifier.hpp:29
Represents the port factory of a [Service] with [MessagingPattern::Event].
auto create() &&-> bb::Expected< Notifier< S >, NotifierCreateError >
Creates a new [Notifier] port or returns a [NotifierCreateError] on failure.
PortFactoryNotifier(PortFactoryNotifier &&) noexcept=default
auto name(const PortName value) -> decltype(auto)
auto default_event_id(const EventId value) -> decltype(auto)
Represent the name for a [Port].
Definition port_name.hpp:52