iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
marker.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 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_MARKER_HPP
14#define IOX2_MARKER_HPP
15
16#include "iox2/deployment/iceoryx2_cxx_feature_flags.hpp"
17
18#include <cstdint>
19
20namespace iox2 {
21#if IOX2_FEATURE_FLATBUFFERS
23template <typename T>
24struct Flatbuffer {
25 using ValueType = T;
27 static constexpr const char* IOX2_TYPE_NAME = "iox2::Flatbuffer";
28};
29#endif // IOX2_FEATURE_FLATBUFFERS
30
33
36 uint8_t value = 0;
37};
38
39
40namespace internal {
41template <typename Given, template <typename> class Required>
42struct HasMarker {
43 static const bool VALUE = false;
44};
45
46template <typename T, template <typename> class Required>
47struct HasMarker<Required<T>, Required> {
48 static const bool VALUE = true;
49};
50} // namespace internal
51
52template <typename T>
53constexpr auto has_flatbuffer_marker() -> bool {
54#if IOX2_FEATURE_FLATBUFFERS
56#else
57 return false;
58#endif // IOX2_FEATURE_FLATBUFFERS
59}
60} // namespace iox2
61
62#endif
constexpr auto has_flatbuffer_marker() -> bool
Definition marker.hpp:53
User header type for a service whose user header type details are set at runtime.
Definition marker.hpp:32
Payload element for a service whose payload type details are set at runtime.
Definition marker.hpp:35
Identifies payloads that are serialized via flatbuffer.
Definition marker.hpp:24
static constexpr const char * IOX2_TYPE_NAME
IOX2_TYPE_NAME is equivalent to the payload type name used on the Rust side.
Definition marker.hpp:27
static const bool VALUE
Definition marker.hpp:43