Commit | Line | Data |
---|---|---|
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" | |
a65c7bf4 | 15 | #include "error.hpp" |
87fc9c82 PP |
16 | #include "field-class.hpp" |
17 | #include "field.hpp" | |
0f286fd6 | 18 | #include "graph.hpp" |
87fc9c82 PP |
19 | #include "integer-range-set.hpp" |
20 | #include "integer-range.hpp" | |
21 | #include "message-iterator.hpp" | |
22 | #include "message.hpp" | |
f27423d4 | 23 | #include "optional-borrowed-object.hpp" |
87fc9c82 PP |
24 | #include "private-query-executor.hpp" |
25 | #include "self-component-class.hpp" | |
26 | #include "self-component-port.hpp" | |
27 | #include "self-message-iterator-configuration.hpp" | |
28 | #include "self-message-iterator.hpp" | |
29 | #include "trace-ir.hpp" | |
30 | #include "value.hpp" | |
31 | ||
32 | namespace bt2 { | |
33 | ||
a65c7bf4 SM |
34 | inline ConstErrorCause wrap(const bt_error_cause * const libObjPtr) noexcept |
35 | { | |
36 | return ConstErrorCause {libObjPtr}; | |
37 | } | |
38 | ||
0f286fd6 SM |
39 | inline Graph wrap(bt_graph * const libObjPtr) noexcept |
40 | { | |
41 | return Graph {libObjPtr}; | |
42 | } | |
43 | ||
87fc9c82 PP |
44 | inline ClockClass wrap(bt_clock_class * const libObjPtr) noexcept |
45 | { | |
46 | return ClockClass {libObjPtr}; | |
47 | } | |
48 | ||
49 | inline ConstClockClass wrap(const bt_clock_class * const libObjPtr) noexcept | |
50 | { | |
51 | return ConstClockClass {libObjPtr}; | |
52 | } | |
53 | ||
54 | inline ConstClockSnapshot wrap(const bt_clock_snapshot * const libObjPtr) noexcept | |
55 | { | |
56 | return ConstClockSnapshot {libObjPtr}; | |
57 | } | |
58 | ||
59 | inline ConstComponent wrap(const bt_component * const libObjPtr) noexcept | |
60 | { | |
61 | return ConstComponent {libObjPtr}; | |
62 | } | |
63 | ||
64 | inline ConstSourceComponent wrap(const bt_component_source * const libObjPtr) noexcept | |
65 | { | |
66 | return ConstSourceComponent {libObjPtr}; | |
67 | } | |
68 | ||
69 | inline ConstFilterComponent wrap(const bt_component_filter * const libObjPtr) noexcept | |
70 | { | |
71 | return ConstFilterComponent {libObjPtr}; | |
72 | } | |
73 | ||
74 | inline ConstSinkComponent wrap(const bt_component_sink * const libObjPtr) noexcept | |
75 | { | |
76 | return ConstSinkComponent {libObjPtr}; | |
77 | } | |
78 | ||
79 | inline ConstInputPort wrap(const bt_port_input * const libObjPtr) noexcept | |
80 | { | |
81 | return ConstInputPort {libObjPtr}; | |
82 | } | |
83 | ||
84 | inline ConstOutputPort wrap(const bt_port_output * const libObjPtr) noexcept | |
85 | { | |
86 | return ConstOutputPort {libObjPtr}; | |
87 | } | |
88 | ||
2e2a065e PP |
89 | inline ConstUnsignedEnumerationFieldClassMapping |
90 | wrap(const bt_field_class_enumeration_unsigned_mapping * const libObjPtr) noexcept | |
91 | { | |
92 | return ConstUnsignedEnumerationFieldClassMapping {libObjPtr}; | |
93 | } | |
94 | ||
95 | inline ConstSignedEnumerationFieldClassMapping | |
96 | wrap(const bt_field_class_enumeration_signed_mapping * const libObjPtr) noexcept | |
97 | { | |
98 | return ConstSignedEnumerationFieldClassMapping {libObjPtr}; | |
99 | } | |
100 | ||
101 | inline VariantFieldClassOption wrap(bt_field_class_variant_option * const libObjPtr) noexcept | |
102 | { | |
103 | return VariantFieldClassOption {libObjPtr}; | |
104 | } | |
105 | ||
106 | inline ConstVariantFieldClassOption | |
107 | wrap(const bt_field_class_variant_option * const libObjPtr) noexcept | |
108 | { | |
109 | return ConstVariantFieldClassOption {libObjPtr}; | |
110 | } | |
111 | ||
112 | inline ConstVariantWithUnsignedIntegerSelectorFieldClassOption | |
113 | wrap(const bt_field_class_variant_with_selector_field_integer_unsigned_option | |
114 | * const libObjPtr) noexcept | |
115 | { | |
116 | return ConstVariantWithUnsignedIntegerSelectorFieldClassOption {libObjPtr}; | |
117 | } | |
118 | ||
119 | inline ConstVariantWithSignedIntegerSelectorFieldClassOption | |
120 | wrap(const bt_field_class_variant_with_selector_field_integer_signed_option | |
121 | * const libObjPtr) noexcept | |
122 | { | |
123 | return ConstVariantWithSignedIntegerSelectorFieldClassOption {libObjPtr}; | |
124 | } | |
125 | ||
87fc9c82 PP |
126 | inline FieldClass wrap(bt_field_class * const libObjPtr) noexcept |
127 | { | |
128 | return FieldClass {libObjPtr}; | |
129 | } | |
130 | ||
131 | inline ConstFieldClass wrap(const bt_field_class * const libObjPtr) noexcept | |
132 | { | |
133 | return ConstFieldClass {libObjPtr}; | |
134 | } | |
135 | ||
136 | inline ConstFieldPathItem wrap(const bt_field_path_item * const libObjPtr) noexcept | |
137 | { | |
138 | return ConstFieldPathItem {libObjPtr}; | |
139 | } | |
140 | ||
141 | inline ConstFieldPath wrap(const bt_field_path * const libObjPtr) noexcept | |
142 | { | |
143 | return ConstFieldPath {libObjPtr}; | |
144 | } | |
145 | ||
146 | inline Field wrap(bt_field * const libObjPtr) noexcept | |
147 | { | |
148 | return Field {libObjPtr}; | |
149 | } | |
150 | ||
151 | inline ConstField wrap(const bt_field * const libObjPtr) noexcept | |
152 | { | |
153 | return ConstField {libObjPtr}; | |
154 | } | |
155 | ||
156 | inline UnsignedIntegerRangeSet wrap(bt_integer_range_set_unsigned * const libObjPtr) noexcept | |
157 | { | |
158 | return UnsignedIntegerRangeSet {libObjPtr}; | |
159 | } | |
160 | ||
161 | inline ConstUnsignedIntegerRangeSet | |
162 | wrap(const bt_integer_range_set_unsigned * const libObjPtr) noexcept | |
163 | { | |
164 | return ConstUnsignedIntegerRangeSet {libObjPtr}; | |
165 | } | |
166 | ||
167 | inline SignedIntegerRangeSet wrap(bt_integer_range_set_signed * const libObjPtr) noexcept | |
168 | { | |
169 | return SignedIntegerRangeSet {libObjPtr}; | |
170 | } | |
171 | ||
172 | inline ConstSignedIntegerRangeSet wrap(const bt_integer_range_set_signed * const libObjPtr) noexcept | |
173 | { | |
174 | return ConstSignedIntegerRangeSet {libObjPtr}; | |
175 | } | |
176 | ||
177 | inline ConstUnsignedIntegerRange wrap(const bt_integer_range_unsigned * const libObjPtr) noexcept | |
178 | { | |
179 | return ConstUnsignedIntegerRange {libObjPtr}; | |
180 | } | |
181 | ||
182 | inline ConstSignedIntegerRange wrap(const bt_integer_range_signed * const libObjPtr) noexcept | |
183 | { | |
184 | return ConstSignedIntegerRange {libObjPtr}; | |
185 | } | |
186 | ||
187 | inline MessageIterator wrap(bt_message_iterator * const libObjPtr) noexcept | |
188 | { | |
189 | return MessageIterator {libObjPtr}; | |
190 | } | |
191 | ||
192 | inline Message wrap(bt_message * const libObjPtr) noexcept | |
193 | { | |
194 | return Message {libObjPtr}; | |
195 | } | |
196 | ||
197 | inline ConstMessage wrap(const bt_message * const libObjPtr) noexcept | |
198 | { | |
199 | return ConstMessage {libObjPtr}; | |
200 | } | |
201 | ||
202 | inline PrivateQueryExecutor wrap(bt_private_query_executor * const libObjPtr) noexcept | |
203 | { | |
204 | return PrivateQueryExecutor {libObjPtr}; | |
205 | } | |
206 | ||
207 | inline SelfComponentClass wrap(bt_self_component_class * const libObjPtr) noexcept | |
208 | { | |
209 | return SelfComponentClass {libObjPtr}; | |
210 | } | |
211 | ||
212 | inline SelfComponentClass wrap(bt_self_component_class_source * const libObjPtr) noexcept | |
213 | { | |
214 | return SelfComponentClass {libObjPtr}; | |
215 | } | |
216 | ||
217 | inline SelfComponentClass wrap(bt_self_component_class_filter * const libObjPtr) noexcept | |
218 | { | |
219 | return SelfComponentClass {libObjPtr}; | |
220 | } | |
221 | ||
222 | inline SelfComponentClass wrap(bt_self_component_class_sink * const libObjPtr) noexcept | |
223 | { | |
224 | return SelfComponentClass {libObjPtr}; | |
225 | } | |
226 | ||
227 | inline SelfComponent wrap(bt_self_component * const libObjPtr) noexcept | |
228 | { | |
229 | return SelfComponent {libObjPtr}; | |
230 | } | |
231 | ||
232 | inline SelfSourceComponent wrap(bt_self_component_source * const libObjPtr) noexcept | |
233 | { | |
234 | return SelfSourceComponent {libObjPtr}; | |
235 | } | |
236 | ||
237 | inline SelfFilterComponent wrap(bt_self_component_filter * const libObjPtr) noexcept | |
238 | { | |
239 | return SelfFilterComponent {libObjPtr}; | |
240 | } | |
241 | ||
242 | inline SelfSinkComponent wrap(bt_self_component_sink * const libObjPtr) noexcept | |
243 | { | |
244 | return SelfSinkComponent {libObjPtr}; | |
245 | } | |
246 | ||
247 | inline SelfComponentInputPort wrap(bt_self_component_port_input * const libObjPtr) noexcept | |
248 | { | |
249 | return SelfComponentInputPort {libObjPtr}; | |
250 | } | |
251 | ||
252 | inline SelfComponentOutputPort wrap(bt_self_component_port_output * const libObjPtr) noexcept | |
253 | { | |
254 | return SelfComponentOutputPort {libObjPtr}; | |
255 | } | |
256 | ||
257 | inline SelfMessageIterator wrap(bt_self_message_iterator * const libObjPtr) noexcept | |
258 | { | |
259 | return SelfMessageIterator {libObjPtr}; | |
260 | } | |
261 | ||
262 | inline SelfMessageIteratorConfiguration | |
263 | wrap(bt_self_message_iterator_configuration * const libObjPtr) noexcept | |
264 | { | |
265 | return SelfMessageIteratorConfiguration {libObjPtr}; | |
266 | } | |
267 | ||
268 | inline Event wrap(bt_event * const libObjPtr) noexcept | |
269 | { | |
270 | return Event {libObjPtr}; | |
271 | } | |
272 | ||
273 | inline ConstEvent wrap(const bt_event * const libObjPtr) noexcept | |
274 | { | |
275 | return ConstEvent {libObjPtr}; | |
276 | } | |
277 | ||
278 | inline Packet wrap(bt_packet * const libObjPtr) noexcept | |
279 | { | |
280 | return Packet {libObjPtr}; | |
281 | } | |
282 | ||
283 | inline ConstPacket wrap(const bt_packet * const libObjPtr) noexcept | |
284 | { | |
285 | return ConstPacket {libObjPtr}; | |
286 | } | |
287 | ||
288 | inline Stream wrap(bt_stream * const libObjPtr) noexcept | |
289 | { | |
290 | return Stream {libObjPtr}; | |
291 | } | |
292 | ||
293 | inline ConstStream wrap(const bt_stream * const libObjPtr) noexcept | |
294 | { | |
295 | return ConstStream {libObjPtr}; | |
296 | } | |
297 | ||
298 | inline Trace wrap(bt_trace * const libObjPtr) noexcept | |
299 | { | |
300 | return Trace {libObjPtr}; | |
301 | } | |
302 | ||
303 | inline ConstTrace wrap(const bt_trace * const libObjPtr) noexcept | |
304 | { | |
305 | return ConstTrace {libObjPtr}; | |
306 | } | |
307 | ||
308 | inline EventClass wrap(bt_event_class * const libObjPtr) noexcept | |
309 | { | |
310 | return EventClass {libObjPtr}; | |
311 | } | |
312 | ||
313 | inline ConstEventClass wrap(const bt_event_class * const libObjPtr) noexcept | |
314 | { | |
315 | return ConstEventClass {libObjPtr}; | |
316 | } | |
317 | ||
318 | inline StreamClass wrap(bt_stream_class * const libObjPtr) noexcept | |
319 | { | |
320 | return StreamClass {libObjPtr}; | |
321 | } | |
322 | ||
323 | inline ConstStreamClass wrap(const bt_stream_class * const libObjPtr) noexcept | |
324 | { | |
325 | return ConstStreamClass {libObjPtr}; | |
326 | } | |
327 | ||
328 | inline TraceClass wrap(bt_trace_class * const libObjPtr) noexcept | |
329 | { | |
330 | return TraceClass {libObjPtr}; | |
331 | } | |
332 | ||
333 | inline ConstTraceClass wrap(const bt_trace_class * const libObjPtr) noexcept | |
334 | { | |
335 | return ConstTraceClass {libObjPtr}; | |
336 | } | |
337 | ||
338 | inline Value wrap(bt_value * const libObjPtr) noexcept | |
339 | { | |
340 | return Value {libObjPtr}; | |
341 | } | |
342 | ||
343 | inline ConstValue wrap(const bt_value * const libObjPtr) noexcept | |
344 | { | |
345 | return ConstValue {libObjPtr}; | |
346 | } | |
347 | ||
f27423d4 PP |
348 | inline OptionalBorrowedObject<ClockClass> wrapOptional(bt_clock_class * const libObjPtr) noexcept |
349 | { | |
350 | return libObjPtr; | |
351 | } | |
352 | ||
353 | inline OptionalBorrowedObject<ConstClockClass> | |
354 | wrapOptional(const bt_clock_class * const libObjPtr) noexcept | |
355 | { | |
356 | return libObjPtr; | |
357 | } | |
358 | ||
359 | inline OptionalBorrowedObject<ConstClockSnapshot> | |
360 | wrapOptional(const bt_clock_snapshot * const libObjPtr) noexcept | |
361 | { | |
362 | return libObjPtr; | |
363 | } | |
364 | ||
365 | inline OptionalBorrowedObject<ConstComponent> | |
366 | wrapOptional(const bt_component * const libObjPtr) noexcept | |
367 | { | |
368 | return libObjPtr; | |
369 | } | |
370 | ||
371 | inline OptionalBorrowedObject<ConstSourceComponent> | |
372 | wrapOptional(const bt_component_source * const libObjPtr) noexcept | |
373 | { | |
374 | return libObjPtr; | |
375 | } | |
376 | ||
377 | inline OptionalBorrowedObject<ConstFilterComponent> | |
378 | wrapOptional(const bt_component_filter * const libObjPtr) noexcept | |
379 | { | |
380 | return libObjPtr; | |
381 | } | |
382 | ||
383 | inline OptionalBorrowedObject<ConstSinkComponent> | |
384 | wrapOptional(const bt_component_sink * const libObjPtr) noexcept | |
385 | { | |
386 | return libObjPtr; | |
387 | } | |
388 | ||
389 | inline OptionalBorrowedObject<ConstInputPort> | |
390 | wrapOptional(const bt_port_input * const libObjPtr) noexcept | |
391 | { | |
392 | return libObjPtr; | |
393 | } | |
394 | ||
395 | inline OptionalBorrowedObject<ConstOutputPort> | |
396 | wrapOptional(const bt_port_output * const libObjPtr) noexcept | |
397 | { | |
398 | return libObjPtr; | |
399 | } | |
400 | ||
401 | inline OptionalBorrowedObject<FieldClass> wrapOptional(bt_field_class * const libObjPtr) noexcept | |
402 | { | |
403 | return libObjPtr; | |
404 | } | |
405 | ||
406 | inline OptionalBorrowedObject<ConstFieldClass> | |
407 | wrapOptional(const bt_field_class * const libObjPtr) noexcept | |
408 | { | |
409 | return libObjPtr; | |
410 | } | |
411 | ||
412 | inline OptionalBorrowedObject<ConstFieldPathItem> | |
413 | wrapOptional(const bt_field_path_item * const libObjPtr) noexcept | |
414 | { | |
415 | return libObjPtr; | |
416 | } | |
417 | ||
418 | inline OptionalBorrowedObject<ConstFieldPath> | |
419 | wrapOptional(const bt_field_path * const libObjPtr) noexcept | |
420 | { | |
421 | return libObjPtr; | |
422 | } | |
423 | ||
424 | inline OptionalBorrowedObject<Field> wrapOptional(bt_field * const libObjPtr) noexcept | |
425 | { | |
426 | return libObjPtr; | |
427 | } | |
428 | ||
429 | inline OptionalBorrowedObject<ConstField> wrapOptional(const bt_field * const libObjPtr) noexcept | |
430 | { | |
431 | return libObjPtr; | |
432 | } | |
433 | ||
434 | inline OptionalBorrowedObject<UnsignedIntegerRangeSet> | |
435 | wrapOptional(bt_integer_range_set_unsigned * const libObjPtr) noexcept | |
436 | { | |
437 | return libObjPtr; | |
438 | } | |
439 | ||
440 | inline OptionalBorrowedObject<ConstUnsignedIntegerRangeSet> | |
441 | wrapOptional(const bt_integer_range_set_unsigned * const libObjPtr) noexcept | |
442 | { | |
443 | return libObjPtr; | |
444 | } | |
445 | ||
446 | inline OptionalBorrowedObject<SignedIntegerRangeSet> | |
447 | wrapOptional(bt_integer_range_set_signed * const libObjPtr) noexcept | |
448 | { | |
449 | return libObjPtr; | |
450 | } | |
451 | ||
452 | inline OptionalBorrowedObject<ConstSignedIntegerRangeSet> | |
453 | wrapOptional(const bt_integer_range_set_signed * const libObjPtr) noexcept | |
454 | { | |
455 | return libObjPtr; | |
456 | } | |
457 | ||
458 | inline OptionalBorrowedObject<ConstUnsignedIntegerRange> | |
459 | wrapOptional(const bt_integer_range_unsigned * const libObjPtr) noexcept | |
460 | { | |
461 | return libObjPtr; | |
462 | } | |
463 | ||
464 | inline OptionalBorrowedObject<ConstSignedIntegerRange> | |
465 | wrapOptional(const bt_integer_range_signed * const libObjPtr) noexcept | |
466 | { | |
467 | return libObjPtr; | |
468 | } | |
469 | ||
470 | inline OptionalBorrowedObject<MessageIterator> | |
471 | wrapOptional(bt_message_iterator * const libObjPtr) noexcept | |
472 | { | |
473 | return libObjPtr; | |
474 | } | |
475 | ||
476 | inline OptionalBorrowedObject<Message> wrapOptional(bt_message * const libObjPtr) noexcept | |
477 | { | |
478 | return libObjPtr; | |
479 | } | |
480 | ||
481 | inline OptionalBorrowedObject<ConstMessage> | |
482 | wrapOptional(const bt_message * const libObjPtr) noexcept | |
483 | { | |
484 | return libObjPtr; | |
485 | } | |
486 | ||
487 | inline OptionalBorrowedObject<PrivateQueryExecutor> | |
488 | wrapOptional(bt_private_query_executor * const libObjPtr) noexcept | |
489 | { | |
490 | return libObjPtr; | |
491 | } | |
492 | ||
493 | inline OptionalBorrowedObject<SelfComponentClass> | |
494 | wrapOptional(bt_self_component_class * const libObjPtr) noexcept | |
495 | { | |
496 | return libObjPtr; | |
497 | } | |
498 | ||
499 | inline OptionalBorrowedObject<SelfComponentClass> | |
500 | wrapOptional(bt_self_component_class_source * const libObjPtr) noexcept | |
501 | { | |
502 | return bt_self_component_class_source_as_self_component_class(libObjPtr); | |
503 | } | |
504 | ||
505 | inline OptionalBorrowedObject<SelfComponentClass> | |
506 | wrapOptional(bt_self_component_class_filter * const libObjPtr) noexcept | |
507 | { | |
508 | return bt_self_component_class_filter_as_self_component_class(libObjPtr); | |
509 | } | |
510 | ||
511 | inline OptionalBorrowedObject<SelfComponentClass> | |
512 | wrapOptional(bt_self_component_class_sink * const libObjPtr) noexcept | |
513 | { | |
514 | return bt_self_component_class_sink_as_self_component_class(libObjPtr); | |
515 | } | |
516 | ||
517 | inline OptionalBorrowedObject<SelfComponent> | |
518 | wrapOptional(bt_self_component * const libObjPtr) noexcept | |
519 | { | |
520 | return libObjPtr; | |
521 | } | |
522 | ||
523 | inline OptionalBorrowedObject<SelfSourceComponent> | |
524 | wrapOptional(bt_self_component_source * const libObjPtr) noexcept | |
525 | { | |
526 | return libObjPtr; | |
527 | } | |
528 | ||
529 | inline OptionalBorrowedObject<SelfFilterComponent> | |
530 | wrapOptional(bt_self_component_filter * const libObjPtr) noexcept | |
531 | { | |
532 | return libObjPtr; | |
533 | } | |
534 | ||
535 | inline OptionalBorrowedObject<SelfSinkComponent> | |
536 | wrapOptional(bt_self_component_sink * const libObjPtr) noexcept | |
537 | { | |
538 | return libObjPtr; | |
539 | } | |
540 | ||
541 | inline OptionalBorrowedObject<SelfComponentInputPort> | |
542 | wrapOptional(bt_self_component_port_input * const libObjPtr) noexcept | |
543 | { | |
544 | return libObjPtr; | |
545 | } | |
546 | ||
547 | inline OptionalBorrowedObject<SelfComponentOutputPort> | |
548 | wrapOptional(bt_self_component_port_output * const libObjPtr) noexcept | |
549 | { | |
550 | return libObjPtr; | |
551 | } | |
552 | ||
553 | inline OptionalBorrowedObject<SelfMessageIterator> | |
554 | wrapOptional(bt_self_message_iterator * const libObjPtr) noexcept | |
555 | { | |
556 | return libObjPtr; | |
557 | } | |
558 | ||
559 | inline OptionalBorrowedObject<SelfMessageIteratorConfiguration> | |
560 | wrapOptional(bt_self_message_iterator_configuration * const libObjPtr) noexcept | |
561 | { | |
562 | return libObjPtr; | |
563 | } | |
564 | ||
565 | inline OptionalBorrowedObject<Event> wrapOptional(bt_event * const libObjPtr) noexcept | |
566 | { | |
567 | return libObjPtr; | |
568 | } | |
569 | ||
570 | inline OptionalBorrowedObject<ConstEvent> wrapOptional(const bt_event * const libObjPtr) noexcept | |
571 | { | |
572 | return libObjPtr; | |
573 | } | |
574 | ||
575 | inline OptionalBorrowedObject<Packet> wrapOptional(bt_packet * const libObjPtr) noexcept | |
576 | { | |
577 | return libObjPtr; | |
578 | } | |
579 | ||
580 | inline OptionalBorrowedObject<ConstPacket> wrapOptional(const bt_packet * const libObjPtr) noexcept | |
581 | { | |
582 | return libObjPtr; | |
583 | } | |
584 | ||
585 | inline OptionalBorrowedObject<Stream> wrapOptional(bt_stream * const libObjPtr) noexcept | |
586 | { | |
587 | return libObjPtr; | |
588 | } | |
589 | ||
590 | inline OptionalBorrowedObject<ConstStream> wrapOptional(const bt_stream * const libObjPtr) noexcept | |
591 | { | |
592 | return libObjPtr; | |
593 | } | |
594 | ||
595 | inline OptionalBorrowedObject<Trace> wrapOptional(bt_trace * const libObjPtr) noexcept | |
596 | { | |
597 | return libObjPtr; | |
598 | } | |
599 | ||
600 | inline OptionalBorrowedObject<ConstTrace> wrapOptional(const bt_trace * const libObjPtr) noexcept | |
601 | { | |
602 | return libObjPtr; | |
603 | } | |
604 | ||
605 | inline OptionalBorrowedObject<EventClass> wrapOptional(bt_event_class * const libObjPtr) noexcept | |
606 | { | |
607 | return libObjPtr; | |
608 | } | |
609 | ||
610 | inline OptionalBorrowedObject<ConstEventClass> | |
611 | wrapOptional(const bt_event_class * const libObjPtr) noexcept | |
612 | { | |
613 | return libObjPtr; | |
614 | } | |
615 | ||
616 | inline OptionalBorrowedObject<StreamClass> wrapOptional(bt_stream_class * const libObjPtr) noexcept | |
617 | { | |
618 | return libObjPtr; | |
619 | } | |
620 | ||
621 | inline OptionalBorrowedObject<ConstStreamClass> | |
622 | wrapOptional(const bt_stream_class * const libObjPtr) noexcept | |
623 | { | |
624 | return libObjPtr; | |
625 | } | |
626 | ||
627 | inline OptionalBorrowedObject<TraceClass> wrapOptional(bt_trace_class * const libObjPtr) noexcept | |
628 | { | |
629 | return libObjPtr; | |
630 | } | |
631 | ||
632 | inline OptionalBorrowedObject<ConstTraceClass> | |
633 | wrapOptional(const bt_trace_class * const libObjPtr) noexcept | |
634 | { | |
635 | return libObjPtr; | |
636 | } | |
637 | ||
638 | inline OptionalBorrowedObject<Value> wrapOptional(bt_value * const libObjPtr) noexcept | |
639 | { | |
640 | return libObjPtr; | |
641 | } | |
642 | ||
643 | inline OptionalBorrowedObject<ConstValue> wrapOptional(const bt_value * const libObjPtr) noexcept | |
644 | { | |
645 | return libObjPtr; | |
646 | } | |
647 | ||
87fc9c82 PP |
648 | } /* namespace bt2 */ |
649 | ||
650 | #endif /* BABELTRACE_CPP_COMMON_BT2_WRAP_HPP */ |