cpp-common/bt2: remove useless `avail` variable where applicable
[babeltrace.git] / src / cpp-common / bt2 / wrap.hpp
CommitLineData
87fc9c82
PP
1/*
2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef BABELTRACE_CPP_COMMON_BT2_WRAP_HPP
8#define BABELTRACE_CPP_COMMON_BT2_WRAP_HPP
9
10#include <babeltrace2/babeltrace.h>
11
12#include "clock-class.hpp"
13#include "clock-snapshot.hpp"
14#include "component-port.hpp"
15#include "field-class.hpp"
16#include "field.hpp"
17#include "integer-range-set.hpp"
18#include "integer-range.hpp"
19#include "message-iterator.hpp"
20#include "message.hpp"
21#include "private-query-executor.hpp"
22#include "self-component-class.hpp"
23#include "self-component-port.hpp"
24#include "self-message-iterator-configuration.hpp"
25#include "self-message-iterator.hpp"
26#include "trace-ir.hpp"
27#include "value.hpp"
28
29namespace bt2 {
30
31inline ClockClass wrap(bt_clock_class * const libObjPtr) noexcept
32{
33 return ClockClass {libObjPtr};
34}
35
36inline ConstClockClass wrap(const bt_clock_class * const libObjPtr) noexcept
37{
38 return ConstClockClass {libObjPtr};
39}
40
41inline ConstClockSnapshot wrap(const bt_clock_snapshot * const libObjPtr) noexcept
42{
43 return ConstClockSnapshot {libObjPtr};
44}
45
46inline ConstComponent wrap(const bt_component * const libObjPtr) noexcept
47{
48 return ConstComponent {libObjPtr};
49}
50
51inline ConstSourceComponent wrap(const bt_component_source * const libObjPtr) noexcept
52{
53 return ConstSourceComponent {libObjPtr};
54}
55
56inline ConstFilterComponent wrap(const bt_component_filter * const libObjPtr) noexcept
57{
58 return ConstFilterComponent {libObjPtr};
59}
60
61inline ConstSinkComponent wrap(const bt_component_sink * const libObjPtr) noexcept
62{
63 return ConstSinkComponent {libObjPtr};
64}
65
66inline ConstInputPort wrap(const bt_port_input * const libObjPtr) noexcept
67{
68 return ConstInputPort {libObjPtr};
69}
70
71inline ConstOutputPort wrap(const bt_port_output * const libObjPtr) noexcept
72{
73 return ConstOutputPort {libObjPtr};
74}
75
76inline FieldClass wrap(bt_field_class * const libObjPtr) noexcept
77{
78 return FieldClass {libObjPtr};
79}
80
81inline ConstFieldClass wrap(const bt_field_class * const libObjPtr) noexcept
82{
83 return ConstFieldClass {libObjPtr};
84}
85
86inline ConstFieldPathItem wrap(const bt_field_path_item * const libObjPtr) noexcept
87{
88 return ConstFieldPathItem {libObjPtr};
89}
90
91inline ConstFieldPath wrap(const bt_field_path * const libObjPtr) noexcept
92{
93 return ConstFieldPath {libObjPtr};
94}
95
96inline Field wrap(bt_field * const libObjPtr) noexcept
97{
98 return Field {libObjPtr};
99}
100
101inline ConstField wrap(const bt_field * const libObjPtr) noexcept
102{
103 return ConstField {libObjPtr};
104}
105
106inline UnsignedIntegerRangeSet wrap(bt_integer_range_set_unsigned * const libObjPtr) noexcept
107{
108 return UnsignedIntegerRangeSet {libObjPtr};
109}
110
111inline ConstUnsignedIntegerRangeSet
112wrap(const bt_integer_range_set_unsigned * const libObjPtr) noexcept
113{
114 return ConstUnsignedIntegerRangeSet {libObjPtr};
115}
116
117inline SignedIntegerRangeSet wrap(bt_integer_range_set_signed * const libObjPtr) noexcept
118{
119 return SignedIntegerRangeSet {libObjPtr};
120}
121
122inline ConstSignedIntegerRangeSet wrap(const bt_integer_range_set_signed * const libObjPtr) noexcept
123{
124 return ConstSignedIntegerRangeSet {libObjPtr};
125}
126
127inline ConstUnsignedIntegerRange wrap(const bt_integer_range_unsigned * const libObjPtr) noexcept
128{
129 return ConstUnsignedIntegerRange {libObjPtr};
130}
131
132inline ConstSignedIntegerRange wrap(const bt_integer_range_signed * const libObjPtr) noexcept
133{
134 return ConstSignedIntegerRange {libObjPtr};
135}
136
137inline MessageIterator wrap(bt_message_iterator * const libObjPtr) noexcept
138{
139 return MessageIterator {libObjPtr};
140}
141
142inline Message wrap(bt_message * const libObjPtr) noexcept
143{
144 return Message {libObjPtr};
145}
146
147inline ConstMessage wrap(const bt_message * const libObjPtr) noexcept
148{
149 return ConstMessage {libObjPtr};
150}
151
152inline PrivateQueryExecutor wrap(bt_private_query_executor * const libObjPtr) noexcept
153{
154 return PrivateQueryExecutor {libObjPtr};
155}
156
157inline SelfComponentClass wrap(bt_self_component_class * const libObjPtr) noexcept
158{
159 return SelfComponentClass {libObjPtr};
160}
161
162inline SelfComponentClass wrap(bt_self_component_class_source * const libObjPtr) noexcept
163{
164 return SelfComponentClass {libObjPtr};
165}
166
167inline SelfComponentClass wrap(bt_self_component_class_filter * const libObjPtr) noexcept
168{
169 return SelfComponentClass {libObjPtr};
170}
171
172inline SelfComponentClass wrap(bt_self_component_class_sink * const libObjPtr) noexcept
173{
174 return SelfComponentClass {libObjPtr};
175}
176
177inline SelfComponent wrap(bt_self_component * const libObjPtr) noexcept
178{
179 return SelfComponent {libObjPtr};
180}
181
182inline SelfSourceComponent wrap(bt_self_component_source * const libObjPtr) noexcept
183{
184 return SelfSourceComponent {libObjPtr};
185}
186
187inline SelfFilterComponent wrap(bt_self_component_filter * const libObjPtr) noexcept
188{
189 return SelfFilterComponent {libObjPtr};
190}
191
192inline SelfSinkComponent wrap(bt_self_component_sink * const libObjPtr) noexcept
193{
194 return SelfSinkComponent {libObjPtr};
195}
196
197inline SelfComponentInputPort wrap(bt_self_component_port_input * const libObjPtr) noexcept
198{
199 return SelfComponentInputPort {libObjPtr};
200}
201
202inline SelfComponentOutputPort wrap(bt_self_component_port_output * const libObjPtr) noexcept
203{
204 return SelfComponentOutputPort {libObjPtr};
205}
206
207inline SelfMessageIterator wrap(bt_self_message_iterator * const libObjPtr) noexcept
208{
209 return SelfMessageIterator {libObjPtr};
210}
211
212inline SelfMessageIteratorConfiguration
213wrap(bt_self_message_iterator_configuration * const libObjPtr) noexcept
214{
215 return SelfMessageIteratorConfiguration {libObjPtr};
216}
217
218inline Event wrap(bt_event * const libObjPtr) noexcept
219{
220 return Event {libObjPtr};
221}
222
223inline ConstEvent wrap(const bt_event * const libObjPtr) noexcept
224{
225 return ConstEvent {libObjPtr};
226}
227
228inline Packet wrap(bt_packet * const libObjPtr) noexcept
229{
230 return Packet {libObjPtr};
231}
232
233inline ConstPacket wrap(const bt_packet * const libObjPtr) noexcept
234{
235 return ConstPacket {libObjPtr};
236}
237
238inline Stream wrap(bt_stream * const libObjPtr) noexcept
239{
240 return Stream {libObjPtr};
241}
242
243inline ConstStream wrap(const bt_stream * const libObjPtr) noexcept
244{
245 return ConstStream {libObjPtr};
246}
247
248inline Trace wrap(bt_trace * const libObjPtr) noexcept
249{
250 return Trace {libObjPtr};
251}
252
253inline ConstTrace wrap(const bt_trace * const libObjPtr) noexcept
254{
255 return ConstTrace {libObjPtr};
256}
257
258inline EventClass wrap(bt_event_class * const libObjPtr) noexcept
259{
260 return EventClass {libObjPtr};
261}
262
263inline ConstEventClass wrap(const bt_event_class * const libObjPtr) noexcept
264{
265 return ConstEventClass {libObjPtr};
266}
267
268inline StreamClass wrap(bt_stream_class * const libObjPtr) noexcept
269{
270 return StreamClass {libObjPtr};
271}
272
273inline ConstStreamClass wrap(const bt_stream_class * const libObjPtr) noexcept
274{
275 return ConstStreamClass {libObjPtr};
276}
277
278inline TraceClass wrap(bt_trace_class * const libObjPtr) noexcept
279{
280 return TraceClass {libObjPtr};
281}
282
283inline ConstTraceClass wrap(const bt_trace_class * const libObjPtr) noexcept
284{
285 return ConstTraceClass {libObjPtr};
286}
287
288inline Value wrap(bt_value * const libObjPtr) noexcept
289{
290 return Value {libObjPtr};
291}
292
293inline ConstValue wrap(const bt_value * const libObjPtr) noexcept
294{
295 return ConstValue {libObjPtr};
296}
297
298} /* namespace bt2 */
299
300#endif /* BABELTRACE_CPP_COMMON_BT2_WRAP_HPP */
This page took 0.051374 seconds and 4 git commands to generate.