refactor: session: provide an iterator over consumer data channel keys
[lttng-tools.git] / src / bin / lttng-sessiond / ust-field-quirks.hpp
1 /*
2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8 #ifndef LTTNG_UST_FIELD_CONVERT_H
9 #define LTTNG_UST_FIELD_CONVERT_H
10
11 #include <cstddef>
12 #include <type_traits>
13 #include <vector>
14
15 namespace lttng {
16 namespace sessiond {
17 namespace ust {
18
19 enum class ctl_field_quirks : unsigned int {
20 NONE = 0,
21 /*
22 * LTTng-UST with ABI major version <= 9 express variants with a tag
23 * enumeration that doesn't match the fields of the variant. The
24 * tag's mapping names are systematically prefixed with an underscore.
25 */
26 UNDERSCORE_PREFIXED_VARIANT_TAG_MAPPINGS = 1 << 0,
27 };
28
29 inline ctl_field_quirks operator&(ctl_field_quirks lhs, ctl_field_quirks rhs)
30 {
31 using enum_type = std::underlying_type<ctl_field_quirks>::type;
32 return ctl_field_quirks(static_cast<enum_type>(lhs) & static_cast<enum_type>(rhs));
33 }
34
35 inline ctl_field_quirks operator|(ctl_field_quirks lhs, ctl_field_quirks rhs)
36 {
37 using enum_type = std::underlying_type<ctl_field_quirks>::type;
38 return ctl_field_quirks(static_cast<enum_type>(lhs) | static_cast<enum_type>(rhs));
39 }
40
41 } /* namespace ust */
42 } /* namespace sessiond */
43 } /* namespace lttng */
44
45 #endif /* LTTNG_UST_FIELD_CONVERT_H */
This page took 0.029747 seconds and 4 git commands to generate.