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/service_type.hpp"
22
23namespace iox2 {
26template <ServiceType S>
28 public:
31#ifdef DOXYGEN_MACRO_FIX
32 auto default_event_id(const EventId value) -> decltype(auto);
33#else
35#endif
36
37 public:
39 auto operator=(PortFactoryNotifier&&) noexcept -> PortFactoryNotifier& = default;
40 ~PortFactoryNotifier() = default;
41
43 auto operator=(const PortFactoryNotifier&) -> PortFactoryNotifier& = delete;
44
46 auto create() && -> bb::Expected<Notifier<S>, NotifierCreateError>;
47
48 private:
49 template <ServiceType>
50 friend class PortFactoryEvent;
51
52 explicit PortFactoryNotifier(iox2_port_factory_notifier_builder_h handle);
53
54 iox2_port_factory_notifier_builder_h m_handle = nullptr;
55};
56} // namespace iox2
57
58#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:28
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 default_event_id(const EventId value) -> decltype(auto)