* `LibObjT` is the direct libbabeltrace2 object type, for example
* `bt_stream_class` or `const bt_value`.
*
- * Methods of a derived class can call libObjPtr() to access the
- * libbabeltrace2 object pointer.
+ * The user of a borrowed object, including methods of a derived class,
+ * can call libObjPtr() to access the libbabeltrace2 object pointer.
*/
template <typename LibObjT>
class BorrowedObject
template <typename LibObjT>
class CommonFieldClass : public BorrowedObject<LibObjT>
{
- /* Allow appendMember() to call `fc.libObjPtr()` */
- friend class CommonStructureFieldClass<bt_field_class>;
-
- /* Allow appendOption() to call `fc.libObjPtr()` */
- friend class CommonVariantWithoutSelectorFieldClass<bt_field_class>;
-
- friend class CommonVariantWithIntegerSelectorFieldClass<
- bt_field_class,
- ConstVariantWithIntegerSelectorFieldClassOption<
- const bt_field_class_variant_with_selector_field_integer_unsigned_option>>;
-
- friend class CommonVariantWithIntegerSelectorFieldClass<
- bt_field_class,
- ConstVariantWithIntegerSelectorFieldClassOption<
- const bt_field_class_variant_with_selector_field_integer_signed_option>>;
-
- /* Allow *FieldClass() to call `fc.libObjPtr()` */
- friend class CommonEventClass<bt_event_class>;
- friend class CommonStreamClass<bt_stream_class>;
-
- /* Allow create*FieldClass() to call `fc.libObjPtr()` */
- friend class CommonTraceClass<bt_trace_class>;
-
private:
using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
} /* namespace internal */
-template <typename LibObjT>
-class ConstVariantWithIntegerSelectorFieldClassOption;
-
-template <typename LibObjT, typename RangeSetT>
-class CommonVariantWithIntegerSelectorFieldClass;
-
-template <typename LibObjT>
-class CommonTraceClass;
-
template <typename LibObjT>
class CommonIntegerRangeSet final : public BorrowedObject<LibObjT>
{
- /* Allow operator==() to call `other.libObjPtr()` */
- friend class CommonIntegerRangeSet<bt_integer_range_set_unsigned>;
- friend class CommonIntegerRangeSet<const bt_integer_range_set_unsigned>;
- friend class CommonIntegerRangeSet<bt_integer_range_set_signed>;
- friend class CommonIntegerRangeSet<const bt_integer_range_set_signed>;
-
- /* Allow appendOption() to call `ranges.libObjPtr()` */
- friend class CommonVariantWithIntegerSelectorFieldClass<
- bt_field_class,
- ConstVariantWithIntegerSelectorFieldClassOption<
- const bt_field_class_variant_with_selector_field_integer_unsigned_option>>;
-
- friend class CommonVariantWithIntegerSelectorFieldClass<
- bt_field_class,
- ConstVariantWithIntegerSelectorFieldClassOption<
- const bt_field_class_variant_with_selector_field_integer_signed_option>>;
-
- /* Allow create*FieldClass() to call `ranges.libObjPtr()` */
- friend class CommonTraceClass<bt_trace_class>;
-
private:
using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
using typename BorrowedObject<LibObjT>::_LibObjPtr;
template <typename LibObjT>
class CommonTrace final : public BorrowedObject<LibObjT>
{
- /* Allow instantiate() to call `trace.libObjPtr()` */
- friend class CommonStreamClass<bt_stream_class>;
-
private:
using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
using typename BorrowedObject<LibObjT>::_LibObjPtr;
MAP = BT_VALUE_TYPE_MAP,
};
-template <typename LibObjT>
-class CommonClockClass;
-
-template <typename LibObjT>
-class CommonFieldClass;
-
-template <typename LibObjT>
-class CommonTraceClass;
-
-template <typename LibObjT>
-class CommonStreamClass;
-
-template <typename LibObjT>
-class CommonEventClass;
-
-template <typename LibObjT>
-class CommonStream;
-
template <typename LibObjT>
class CommonValue : public BorrowedObject<LibObjT>
{
- /* Allow append() to call `val.libObjPtr()` */
- friend class CommonArrayValue<bt_value>;
-
- /* Allow insert() to call `val.libObjPtr()` */
- friend class CommonMapValue<bt_value>;
-
- /* Allow userAttributes() to call `val.libObjPtr()` */
- friend class CommonClockClass<bt_clock_class>;
- friend class CommonFieldClass<bt_field_class>;
- friend class CommonTraceClass<bt_trace_class>;
- friend class CommonStreamClass<bt_stream_class>;
- friend class CommonEventClass<bt_event_class>;
- friend class CommonStream<bt_stream>;
-
- /* Allow operator==() to call `other.libObjPtr()` */
- friend class CommonValue<bt_value>;
- friend class CommonValue<const bt_value>;
-
private:
using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;