2 * Copyright 2019-2020 (c) Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
8 #define BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP
10 #include <type_traits>
12 #include <babeltrace2/babeltrace.h>
14 #include "cpp-common/bt2/exc.hpp"
22 class CommonFieldClass;
32 template <typename LibObjPtrT>
33 void validateCreatedObjPtr(const LibObjPtrT libOjbPtr)
40 template <typename LibObjT, typename DepObjT, typename ConstDepObjT>
42 typename std::conditional<std::is_const<LibObjT>::value, ConstDepObjT, DepObjT>::type;
44 template <typename LibObjT>
45 using DepUserAttrs = DepType<LibObjT, CommonMapValue<bt_value>, CommonMapValue<const bt_value>>;
47 template <typename LibObjT>
49 DepType<LibObjT, CommonFieldClass<bt_field_class>, CommonFieldClass<const bt_field_class>>;
51 template <typename LibObjT>
52 using DepPacket = DepType<LibObjT, CommonPacket<bt_packet>, CommonPacket<const bt_packet>>;
54 template <typename LibObjT>
55 using DepStream = DepType<LibObjT, CommonStream<bt_stream>, CommonStream<const bt_stream>>;
57 template <typename ObjT>
60 } /* namespace internal */
63 #endif /* BABELTRACE_CPP_COMMON_BT2_INTERNAL_UTILS_HPP */