From d246c45795719ead7e4fa616e752c839d6979565 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 23 Nov 2023 22:38:28 -0500 Subject: [PATCH] cpp-common/bt2: make `bt2::BorrowedObject::LibObj` public This patch changes the protected `bt2::BorrowedObject::_LibObjPtr` to the public `bt2::BorrowedObject::LibObjPtr`. There's already a public libObjPtr() method anyway which used to return `_LibObjPtr`. Also adding `LibObj` which is the object without the pointer part. Signed-off-by: Philippe Proulx Change-Id: I23c841bdc9f58b4b3ecb9c7dee0403d49f048c1d Reviewed-on: https://review.lttng.org/c/babeltrace/+/11437 Reviewed-by: Simon Marchi CI-Build: Simon Marchi Tested-by: jenkins --- src/cpp-common/bt2/borrowed-object-proxy.hpp | 2 +- src/cpp-common/bt2/borrowed-object.hpp | 19 ++-- src/cpp-common/bt2/clock-class.hpp | 4 +- src/cpp-common/bt2/clock-snapshot.hpp | 2 +- src/cpp-common/bt2/component-port.hpp | 12 +-- src/cpp-common/bt2/field-class.hpp | 88 +++++++++---------- src/cpp-common/bt2/field-path.hpp | 6 +- src/cpp-common/bt2/field.hpp | 64 +++++++------- src/cpp-common/bt2/integer-range-set.hpp | 5 +- src/cpp-common/bt2/integer-range.hpp | 6 +- src/cpp-common/bt2/message-iterator.hpp | 2 +- src/cpp-common/bt2/message.hpp | 37 ++++---- src/cpp-common/bt2/private-query-executor.hpp | 2 +- src/cpp-common/bt2/self-component-class.hpp | 2 +- src/cpp-common/bt2/self-component-port.hpp | 14 +-- .../self-message-iterator-configuration.hpp | 2 +- src/cpp-common/bt2/self-message-iterator.hpp | 2 +- src/cpp-common/bt2/trace-ir.hpp | 31 +++---- src/cpp-common/bt2/value.hpp | 32 +++---- 19 files changed, 170 insertions(+), 162 deletions(-) diff --git a/src/cpp-common/bt2/borrowed-object-proxy.hpp b/src/cpp-common/bt2/borrowed-object-proxy.hpp index 93ef4053..1b20cc89 100644 --- a/src/cpp-common/bt2/borrowed-object-proxy.hpp +++ b/src/cpp-common/bt2/borrowed-object-proxy.hpp @@ -18,7 +18,7 @@ template class BorrowedObjectProxy final { public: - explicit BorrowedObjectProxy(typename ObjT::_LibObjPtr libObjPtr) noexcept : _mObj {libObjPtr} + explicit BorrowedObjectProxy(typename ObjT::LibObjPtr libObjPtr) noexcept : _mObj {libObjPtr} { } diff --git a/src/cpp-common/bt2/borrowed-object.hpp b/src/cpp-common/bt2/borrowed-object.hpp index 678fed82..f3b4fdcc 100644 --- a/src/cpp-common/bt2/borrowed-object.hpp +++ b/src/cpp-common/bt2/borrowed-object.hpp @@ -70,19 +70,24 @@ private: }; protected: - /* libbabeltrace2 object pointer */ - using _LibObjPtr = LibObjT *; - /* This complete borrowed object */ using _ThisBorrowedObject = BorrowedObject; +public: + /* libbabeltrace2 object */ + using LibObj = LibObjT; + + /* libbabeltrace2 object pointer */ + using LibObjPtr = LibObjT *; + +protected: /* * Builds a borrowed object to wrap the libbabeltrace2 object * pointer `libObjPtr`. * * `libObjPtr` must not be `nullptr`. */ - explicit BorrowedObject(const _LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr} + explicit BorrowedObject(const LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr} { BT_ASSERT_DBG(libObjPtr); } @@ -138,7 +143,7 @@ public: */ std::size_t hash() const noexcept { - return std::hash<_LibObjPtr> {}(_mLibObjPtr); + return std::hash {}(_mLibObjPtr); } /* @@ -151,13 +156,13 @@ public: } /* Wrapped libbabeltrace2 object pointer */ - _LibObjPtr libObjPtr() const noexcept + LibObjPtr libObjPtr() const noexcept { return _mLibObjPtr; } private: - _LibObjPtr _mLibObjPtr; + LibObjPtr _mLibObjPtr; }; } /* namespace bt2 */ diff --git a/src/cpp-common/bt2/clock-class.hpp b/src/cpp-common/bt2/clock-class.hpp index 2c58770b..fd2683bd 100644 --- a/src/cpp-common/bt2/clock-class.hpp +++ b/src/cpp-common/bt2/clock-class.hpp @@ -91,13 +91,13 @@ class CommonClockClass final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; - explicit CommonClockClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonClockClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/clock-snapshot.hpp b/src/cpp-common/bt2/clock-snapshot.hpp index 3b819ea7..38ea940b 100644 --- a/src/cpp-common/bt2/clock-snapshot.hpp +++ b/src/cpp-common/bt2/clock-snapshot.hpp @@ -20,7 +20,7 @@ namespace bt2 { class ConstClockSnapshot final : public BorrowedObject { public: - explicit ConstClockSnapshot(const _LibObjPtr libObjPtr) noexcept : + explicit ConstClockSnapshot(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/component-port.hpp b/src/cpp-common/bt2/component-port.hpp index 6a7db67f..b8239848 100644 --- a/src/cpp-common/bt2/component-port.hpp +++ b/src/cpp-common/bt2/component-port.hpp @@ -113,10 +113,10 @@ template class ConstSpecificComponent : public BorrowedObject { public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; protected: - explicit ConstSpecificComponent(const _LibObjPtr libObjPtr) noexcept : + explicit ConstSpecificComponent(const LibObjPtr libObjPtr) noexcept : BorrowedObject {libObjPtr} { } @@ -245,11 +245,11 @@ private: using _Spec = internal::ConstComponentPortsSpec; public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; using Port = ConstPort; using Iterator = BorrowedObjectIterator; - explicit ConstComponentPorts(const _LibObjPtr libObjPtr) noexcept : + explicit ConstComponentPorts(const LibObjPtr libObjPtr) noexcept : BorrowedObject {libObjPtr} { } @@ -460,10 +460,10 @@ template class ConstPort final : public BorrowedObject { public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject>; - explicit ConstPort(const _LibObjPtr libObjPtr) noexcept : BorrowedObject {libObjPtr} + explicit ConstPort(const LibObjPtr libObjPtr) noexcept : BorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index 94cdb8e6..2cef7290 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -166,14 +166,14 @@ private: using typename BorrowedObject::_ThisBorrowedObject; protected: - using typename BorrowedObject::_LibObjPtr; using _ThisCommonFieldClass = CommonFieldClass; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; using UserAttributes = internal::DepUserAttrs; - explicit CommonFieldClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -452,13 +452,13 @@ template class CommonBitArrayFieldClass final : public CommonFieldClass { private: - using typename CommonFieldClass::_LibObjPtr; using typename CommonFieldClass::_ThisCommonFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonBitArrayFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonBitArrayFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isBitArray()); @@ -532,13 +532,13 @@ private: using typename CommonFieldClass::_ThisCommonFieldClass; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonIntegerFieldClass = CommonIntegerFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonIntegerFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonIntegerFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isInteger()); @@ -664,14 +664,15 @@ class ConstEnumerationFieldClassMapping final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; public: + using typename BorrowedObject::LibObjPtr; + using RangeSet = typename std::conditional< std::is_same::value, ConstUnsignedIntegerRangeSet, ConstSignedIntegerRangeSet>::type; - explicit ConstEnumerationFieldClassMapping(const _LibObjPtr libObjPtr) noexcept : + explicit ConstEnumerationFieldClassMapping(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -768,13 +769,13 @@ private: using typename CommonIntegerFieldClass::_ThisCommonIntegerFieldClass; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonBaseEnumerationFieldClass = CommonBaseEnumerationFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass<_ThisCommonBaseEnumerationFieldClass, LibObjT>; - explicit CommonBaseEnumerationFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonBaseEnumerationFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonIntegerFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isEnumeration()); @@ -815,15 +816,15 @@ template class CommonEnumerationFieldClass final : public CommonBaseEnumerationFieldClass { private: - using typename CommonFieldClass::_LibObjPtr; using typename CommonBaseEnumerationFieldClass::_ThisCommonBaseEnumerationFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass; using Iterator = BorrowedObjectIterator; using Mapping = MappingT; - explicit CommonEnumerationFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonEnumerationFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonBaseEnumerationFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isEnumeration()); @@ -988,14 +989,14 @@ template class CommonStructureFieldClassMember final : public BorrowedObject { private: - using typename BorrowedObject::_LibObjPtr; using typename BorrowedObject::_ThisBorrowedObject; using _FieldClass = internal::DepFc; public: + using typename BorrowedObject::LibObjPtr; using UserAttributes = internal::DepUserAttrs; - explicit CommonStructureFieldClassMember(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStructureFieldClassMember(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -1115,17 +1116,17 @@ template class CommonStructureFieldClass final : public CommonFieldClass { private: - using typename CommonFieldClass::_LibObjPtr; using typename CommonFieldClass::_ThisCommonFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; using Iterator = BorrowedObjectIterator>; using Member = internal::DepType; - explicit CommonStructureFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStructureFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isStructure()); @@ -1265,13 +1266,13 @@ private: using _FieldClass = internal::DepFc; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonArrayFieldClass = CommonArrayFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonArrayFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonArrayFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isArray()); @@ -1335,12 +1336,12 @@ class CommonStaticArrayFieldClass final : public CommonArrayFieldClass { private: using typename CommonArrayFieldClass::_ThisCommonArrayFieldClass; - using typename CommonFieldClass::_LibObjPtr; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonStaticArrayFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStaticArrayFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonArrayFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isStaticArray()); @@ -1404,12 +1405,12 @@ class CommonDynamicArrayWithLengthFieldClass final : public CommonArrayFieldClas { private: using typename CommonArrayFieldClass::_ThisCommonArrayFieldClass; - using typename CommonFieldClass::_LibObjPtr; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonDynamicArrayWithLengthFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDynamicArrayWithLengthFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonArrayFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isDynamicArrayWithLength()); @@ -1506,13 +1507,13 @@ private: using _FieldClass = internal::DepFc; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonOptionFieldClass = CommonOptionFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonOptionFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonOptionFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isOption()); @@ -1578,13 +1579,13 @@ private: using typename CommonOptionFieldClass::_ThisCommonOptionFieldClass; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonOptionWithSelectorFieldClass = CommonOptionWithSelectorFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonOptionWithSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonOptionWithSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonOptionFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isOptionWithSelector()); @@ -1650,15 +1651,14 @@ template class CommonOptionWithBoolSelectorFieldClass : public CommonOptionWithSelectorFieldClass { private: - using typename CommonFieldClass::_LibObjPtr; - using typename CommonOptionWithSelectorFieldClass< LibObjT>::_ThisCommonOptionWithSelectorFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonOptionWithBoolSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonOptionWithBoolSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonOptionWithSelectorFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isOptionWithBoolSelector()); @@ -1754,16 +1754,15 @@ template class CommonOptionWithIntegerSelectorFieldClass : public CommonOptionWithSelectorFieldClass { private: - using typename CommonFieldClass::_LibObjPtr; - using typename CommonOptionWithSelectorFieldClass< LibObjT>::_ThisCommonOptionWithSelectorFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass; using RangeSet = RangeSetT; - explicit CommonOptionWithIntegerSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonOptionWithIntegerSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonOptionWithSelectorFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isOptionWithIntegerSelector()); @@ -1888,13 +1887,13 @@ class CommonVariantFieldClassOption : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _FieldClass = internal::DepFc; public: + using typename BorrowedObject::LibObjPtr; using UserAttributes = internal::DepUserAttrs; - explicit CommonVariantFieldClassOption(const _LibObjPtr libObjPtr) noexcept : + explicit CommonVariantFieldClassOption(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -2024,17 +2023,18 @@ class ConstVariantWithIntegerSelectorFieldClassOption : public BorrowedObject
  • ::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::ConstVariantWithIntegerSelectorFieldClassOptionSpec; public: + using typename BorrowedObject::LibObjPtr; + using RangeSet = typename std::conditional< std::is_same< LibObjT, const bt_field_class_variant_with_selector_field_integer_unsigned_option>::value, ConstUnsignedIntegerRangeSet, ConstSignedIntegerRangeSet>::type; - explicit ConstVariantWithIntegerSelectorFieldClassOption(const _LibObjPtr libObjPtr) noexcept : + explicit ConstVariantWithIntegerSelectorFieldClassOption(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -2131,17 +2131,17 @@ private: using typename CommonFieldClass::_ThisCommonFieldClass; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonVariantFieldClass = CommonVariantFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; using Iterator = BorrowedObjectIterator; using Option = internal::DepType; - explicit CommonVariantFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonVariantFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isVariant()); @@ -2237,12 +2237,12 @@ class CommonVariantWithoutSelectorFieldClass : public CommonVariantFieldClass
  • ::_ThisCommonVariantFieldClass; - using typename CommonFieldClass::_LibObjPtr; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass, LibObjT>; - explicit CommonVariantWithoutSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonVariantWithoutSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonVariantFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isVariantWithoutSelector()); @@ -2389,13 +2389,13 @@ private: using typename CommonVariantFieldClass::_ThisCommonVariantFieldClass; protected: - using typename CommonFieldClass::_LibObjPtr; using _ThisCommonVariantWithSelectorFieldClass = CommonVariantWithSelectorFieldClass; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass<_ThisCommonVariantWithSelectorFieldClass, LibObjT>; - explicit CommonVariantWithSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonVariantWithSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonVariantFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isVariantWithSelector()); @@ -2445,18 +2445,18 @@ class CommonVariantWithIntegerSelectorFieldClass : private: using typename CommonVariantWithSelectorFieldClass< LibObjT>::_ThisCommonVariantWithSelectorFieldClass; - using typename CommonFieldClass::_LibObjPtr; using _Spec = internal::CommonVariantWithIntegerSelectorFieldClassSpec; public: + using typename CommonFieldClass::LibObjPtr; using Shared = SharedFieldClass; using Option = OptionT; using Iterator = BorrowedObjectIterator>; - explicit CommonVariantWithIntegerSelectorFieldClass(const _LibObjPtr libObjPtr) noexcept : + explicit CommonVariantWithIntegerSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonVariantWithSelectorFieldClass {libObjPtr} { BT_ASSERT_DBG(this->isVariant()); diff --git a/src/cpp-common/bt2/field-path.hpp b/src/cpp-common/bt2/field-path.hpp index 300b7376..2d4af443 100644 --- a/src/cpp-common/bt2/field-path.hpp +++ b/src/cpp-common/bt2/field-path.hpp @@ -31,7 +31,7 @@ enum class FieldPathItemType class ConstFieldPathItem : public BorrowedObject { public: - explicit ConstFieldPathItem(const _LibObjPtr libObjPtr) noexcept : + explicit ConstFieldPathItem(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -68,7 +68,7 @@ private: class ConstIndexFieldPathItem final : public ConstFieldPathItem { public: - explicit ConstIndexFieldPathItem(const _LibObjPtr libObjPtr) noexcept : + explicit ConstIndexFieldPathItem(const LibObjPtr libObjPtr) noexcept : ConstFieldPathItem {libObjPtr} { BT_ASSERT_DBG(this->isIndex()); @@ -117,7 +117,7 @@ public: EVENT_PAYLOAD = BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD, }; - explicit ConstFieldPath(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit ConstFieldPath(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp index 69bf4ab6..cbc5fede 100644 --- a/src/cpp-common/bt2/field.hpp +++ b/src/cpp-common/bt2/field.hpp @@ -98,13 +98,13 @@ private: using typename BorrowedObject::_ThisBorrowedObject; protected: - using typename BorrowedObject::_LibObjPtr; using _ThisCommonField = CommonField; public: + using typename BorrowedObject::LibObjPtr; using Class = internal::DepFc; - explicit CommonField(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonField(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -254,13 +254,13 @@ template class CommonBoolField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; public: + using typename CommonField::LibObjPtr; using Value = bool; - explicit CommonBoolField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonBoolField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isBool()); } @@ -327,13 +327,13 @@ template class CommonBitArrayField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; public: + using typename CommonField::LibObjPtr; using Class = internal::DepType; - explicit CommonBitArrayField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonBitArrayField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isBitArray()); } @@ -417,14 +417,14 @@ private: using typename CommonField::_ThisCommonField; protected: - using typename CommonField::_LibObjPtr; using _ThisCommonUnsignedIntegerField = CommonUnsignedIntegerField; public: + using typename CommonField::LibObjPtr; using Value = std::uint64_t; using Class = internal::DepType; - explicit CommonUnsignedIntegerField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonUnsignedIntegerField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isUnsignedInteger()); @@ -503,14 +503,14 @@ private: using typename CommonField::_ThisCommonField; protected: - using typename CommonField::_LibObjPtr; using _ThisCommonSignedIntegerField = CommonSignedIntegerField; public: + using typename CommonField::LibObjPtr; using Value = std::int64_t; using Class = internal::DepType; - explicit CommonSignedIntegerField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonSignedIntegerField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isSignedInteger()); @@ -612,13 +612,14 @@ class CommonUnsignedEnumerationField final : public CommonUnsignedIntegerField::_ThisCommonUnsignedIntegerField; - using typename CommonField::_LibObjPtr; public: + using typename CommonField::LibObjPtr; + using Class = internal::DepType; - explicit CommonUnsignedEnumerationField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonUnsignedEnumerationField(const LibObjPtr libObjPtr) noexcept : _ThisCommonUnsignedIntegerField {libObjPtr} { BT_ASSERT_DBG(this->isUnsignedEnumeration()); @@ -692,13 +693,14 @@ class CommonSignedEnumerationField final : public CommonSignedIntegerField::_ThisCommonSignedIntegerField; - using typename CommonField::_LibObjPtr; public: + using typename CommonField::LibObjPtr; + using Class = internal::DepType; - explicit CommonSignedEnumerationField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonSignedEnumerationField(const LibObjPtr libObjPtr) noexcept : _ThisCommonSignedIntegerField {libObjPtr} { BT_ASSERT_DBG(this->isSignedEnumeration()); @@ -770,13 +772,13 @@ template class CommonSinglePrecisionRealField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; public: + using typename CommonField::LibObjPtr; using Value = float; - explicit CommonSinglePrecisionRealField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonSinglePrecisionRealField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isSinglePrecisionReal()); @@ -848,13 +850,13 @@ template class CommonDoublePrecisionRealField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; public: + using typename CommonField::LibObjPtr; using Value = double; - explicit CommonDoublePrecisionRealField(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDoublePrecisionRealField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isDoublePrecisionReal()); @@ -926,13 +928,13 @@ template class CommonStringField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; public: + using typename CommonField::LibObjPtr; using Value = const char *; - explicit CommonStringField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonStringField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isString()); } @@ -1070,15 +1072,14 @@ template class CommonStructureField final : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; using _Spec = internal::CommonStructureFieldSpec; public: + using typename CommonField::LibObjPtr; using Class = internal::DepType; - explicit CommonStructureField(const _LibObjPtr libObjPtr) noexcept : - _ThisCommonField {libObjPtr} + explicit CommonStructureField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isStructure()); } @@ -1189,13 +1190,13 @@ private: using _Spec = internal::CommonArrayFieldSpec; protected: - using typename CommonField::_LibObjPtr; using _ThisCommonArrayField = CommonArrayField; public: + using typename CommonField::LibObjPtr; using Class = internal::DepType; - explicit CommonArrayField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonArrayField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isArray()); } @@ -1260,11 +1261,12 @@ template class CommonDynamicArrayField : public CommonArrayField { private: - using typename CommonField::_LibObjPtr; using typename CommonArrayField::_ThisCommonArrayField; public: - explicit CommonDynamicArrayField(const _LibObjPtr libObjPtr) noexcept : + using typename CommonField::LibObjPtr; + + explicit CommonDynamicArrayField(const LibObjPtr libObjPtr) noexcept : _ThisCommonArrayField {libObjPtr} { BT_ASSERT_DBG(this->isDynamicArray()); @@ -1357,14 +1359,14 @@ template class CommonOptionField : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; using _Spec = internal::CommonOptionFieldSpec; public: + using typename CommonField::LibObjPtr; using Class = internal::DepType; - explicit CommonOptionField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonOptionField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isOption()); } @@ -1466,14 +1468,14 @@ template class CommonVariantField : public CommonField { private: - using typename CommonField::_LibObjPtr; using typename CommonField::_ThisCommonField; using _Spec = internal::CommonVariantFieldSpec; public: + using typename CommonField::LibObjPtr; using Class = internal::DepType; - explicit CommonVariantField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} + explicit CommonVariantField(const LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr} { BT_ASSERT_DBG(this->isVariant()); } diff --git a/src/cpp-common/bt2/integer-range-set.hpp b/src/cpp-common/bt2/integer-range-set.hpp index 1cfbfc3a..403b7fe7 100644 --- a/src/cpp-common/bt2/integer-range-set.hpp +++ b/src/cpp-common/bt2/integer-range-set.hpp @@ -136,11 +136,12 @@ class CommonIntegerRangeSet final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _ConstLibObjT = typename std::add_const::type; using _Spec = internal::CommonIntegerRangeSetSpec<_ConstLibObjT>; public: + using typename BorrowedObject::LibObjPtr; + using Shared = SharedObject>; @@ -151,7 +152,7 @@ public: using Value = typename Range::Value; using Iterator = BorrowedObjectIterator; - explicit CommonIntegerRangeSet(const _LibObjPtr libObjPtr) noexcept : + explicit CommonIntegerRangeSet(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/integer-range.hpp b/src/cpp-common/bt2/integer-range.hpp index 026e1d52..6f449403 100644 --- a/src/cpp-common/bt2/integer-range.hpp +++ b/src/cpp-common/bt2/integer-range.hpp @@ -69,16 +69,16 @@ class ConstIntegerRange final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; public: + using typename BorrowedObject::LibObjPtr; + using Value = typename std::conditional::value, std::uint64_t, std::int64_t>::type; public: - explicit ConstIntegerRange(const _LibObjPtr libObjPtr) noexcept : - _ThisBorrowedObject {libObjPtr} + explicit ConstIntegerRange(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/message-iterator.hpp b/src/cpp-common/bt2/message-iterator.hpp index 9f3084b1..9691ee4e 100644 --- a/src/cpp-common/bt2/message-iterator.hpp +++ b/src/cpp-common/bt2/message-iterator.hpp @@ -41,7 +41,7 @@ public: using Shared = SharedObject; - explicit MessageIterator(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit MessageIterator(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/message.hpp b/src/cpp-common/bt2/message.hpp index b335d817..fd2a8d2b 100644 --- a/src/cpp-common/bt2/message.hpp +++ b/src/cpp-common/bt2/message.hpp @@ -85,13 +85,13 @@ private: using typename BorrowedObject::_ThisBorrowedObject; protected: - using typename BorrowedObject::_LibObjPtr; using _ThisCommonMessage = CommonMessage; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonMessage(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonMessage(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -228,14 +228,14 @@ template class CommonStreamBeginningMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Stream = internal::DepStream; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonStreamBeginningMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStreamBeginningMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isStreamBeginning()); @@ -343,14 +343,14 @@ template class CommonStreamEndMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Stream = internal::DepStream; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonStreamEndMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStreamEndMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isStreamEnd()); @@ -457,14 +457,14 @@ template class CommonPacketBeginningMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Packet = internal::DepPacket; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonPacketBeginningMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonPacketBeginningMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isPacketBeginning()); @@ -567,14 +567,14 @@ template class CommonPacketEndMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Packet = internal::DepPacket; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonPacketEndMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonPacketEndMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isPacketEnd()); @@ -676,15 +676,14 @@ template class CommonEventMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Event = internal::DepType, CommonEvent>; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonEventMessage(const _LibObjPtr libObjPtr) noexcept : - _ThisCommonMessage {libObjPtr} + explicit CommonEventMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isEvent()); } @@ -786,14 +785,14 @@ template class CommonDiscardedEventsMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Stream = internal::DepStream; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonDiscardedEventsMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDiscardedEventsMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isDiscardedEvents()); @@ -917,14 +916,14 @@ template class CommonDiscardedPacketsMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; using _Stream = internal::DepStream; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonDiscardedPacketsMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDiscardedPacketsMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isDiscardedPackets()); @@ -1025,13 +1024,13 @@ template class CommonMessageIteratorInactivityMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; public: + using typename CommonMessage::LibObjPtr; using Shared = SharedMessage, LibObjT>; - explicit CommonMessageIteratorInactivityMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonMessageIteratorInactivityMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isMessageIteratorInactivity()); diff --git a/src/cpp-common/bt2/private-query-executor.hpp b/src/cpp-common/bt2/private-query-executor.hpp index 76f1f09d..016b9a42 100644 --- a/src/cpp-common/bt2/private-query-executor.hpp +++ b/src/cpp-common/bt2/private-query-executor.hpp @@ -18,7 +18,7 @@ namespace bt2 { class PrivateQueryExecutor final : public BorrowedObject { public: - explicit PrivateQueryExecutor(const _LibObjPtr libObjPtr) noexcept : + explicit PrivateQueryExecutor(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/self-component-class.hpp b/src/cpp-common/bt2/self-component-class.hpp index 3aa28f2c..4d597f79 100644 --- a/src/cpp-common/bt2/self-component-class.hpp +++ b/src/cpp-common/bt2/self-component-class.hpp @@ -16,7 +16,7 @@ namespace bt2 { class SelfComponentClass final : public BorrowedObject { public: - explicit SelfComponentClass(const _LibObjPtr libObjPtr) noexcept : + explicit SelfComponentClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/self-component-port.hpp b/src/cpp-common/bt2/self-component-port.hpp index 1dea532f..82201008 100644 --- a/src/cpp-common/bt2/self-component-port.hpp +++ b/src/cpp-common/bt2/self-component-port.hpp @@ -30,7 +30,7 @@ class SelfSinkComponent; class SelfComponent final : public BorrowedObject { public: - explicit SelfComponent(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit SelfComponent(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -113,10 +113,10 @@ private: using typename BorrowedObject::_ThisBorrowedObject; public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; protected: - explicit SelfSpecificComponent(const _LibObjPtr libObjPtr) noexcept : + explicit SelfSpecificComponent(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -281,11 +281,11 @@ private: using _Spec = internal::SelfComponentPortsSpec; public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; using Port = SelfComponentPort; using Iterator = BorrowedObjectIterator; - explicit SelfComponentPorts(const _LibObjPtr libObjPtr) noexcept : + explicit SelfComponentPorts(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -503,9 +503,9 @@ template class SelfComponentPort final : public BorrowedObject { public: - using typename BorrowedObject::_LibObjPtr; + using typename BorrowedObject::LibObjPtr; - explicit SelfComponentPort(const _LibObjPtr libObjPtr) noexcept : + explicit SelfComponentPort(const LibObjPtr libObjPtr) noexcept : BorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/self-message-iterator-configuration.hpp b/src/cpp-common/bt2/self-message-iterator-configuration.hpp index 5ae36720..e628194a 100644 --- a/src/cpp-common/bt2/self-message-iterator-configuration.hpp +++ b/src/cpp-common/bt2/self-message-iterator-configuration.hpp @@ -17,7 +17,7 @@ class SelfMessageIteratorConfiguration final : public BorrowedObject { public: - explicit SelfMessageIteratorConfiguration(const _LibObjPtr libObjPtr) noexcept : + explicit SelfMessageIteratorConfiguration(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/self-message-iterator.hpp b/src/cpp-common/bt2/self-message-iterator.hpp index 5d296eea..4eeabe60 100644 --- a/src/cpp-common/bt2/self-message-iterator.hpp +++ b/src/cpp-common/bt2/self-message-iterator.hpp @@ -21,7 +21,7 @@ namespace bt2 { class SelfMessageIterator final : public BorrowedObject { public: - explicit SelfMessageIterator(const _LibObjPtr libObjPtr) noexcept : + explicit SelfMessageIterator(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/trace-ir.hpp b/src/cpp-common/bt2/trace-ir.hpp index 51e53732..c4a08f8b 100644 --- a/src/cpp-common/bt2/trace-ir.hpp +++ b/src/cpp-common/bt2/trace-ir.hpp @@ -130,17 +130,18 @@ class CommonEvent final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonEventSpec; using _Packet = internal::DepPacket; using _Stream = internal::DepStream; using _StructureField = internal::DepStructField; public: + using typename BorrowedObject::LibObjPtr; + using Class = internal::DepType, CommonEventClass>; - explicit CommonEvent(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonEvent(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -273,15 +274,15 @@ class CommonPacket final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonPacketSpec; using _Stream = internal::DepStream; using _StructureField = internal::DepStructField; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; - explicit CommonPacket(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonPacket(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -421,18 +422,18 @@ class CommonStream final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonStreamSpec; using _Trace = internal::DepType, CommonTrace>; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; using Class = internal::DepType, CommonStreamClass>; - explicit CommonStream(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonStream(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -623,11 +624,11 @@ class CommonTrace final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonTraceSpec; using _Stream = internal::DepStream; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; @@ -640,7 +641,7 @@ public: ConstValue value; }; - explicit CommonTrace(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonTrace(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -922,7 +923,6 @@ class CommonEventClass final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonEventClassSpec; using _StructureFieldClass = internal::DepStructFc; @@ -930,6 +930,7 @@ private: CommonStreamClass>; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; @@ -952,7 +953,7 @@ public: DEBUG = BT_EVENT_CLASS_LOG_LEVEL_DEBUG, }; - explicit CommonEventClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonEventClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -1248,7 +1249,6 @@ class CommonStreamClass final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; using _Spec = internal::CommonStreamClassSpec; using _StructureFieldClass = internal::DepStructFc; @@ -1261,11 +1261,11 @@ private: using _ClockClass = internal::DepType; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; - explicit CommonStreamClass(const _LibObjPtr libObjPtr) noexcept : - _ThisBorrowedObject {libObjPtr} + explicit CommonStreamClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -1678,17 +1678,18 @@ class CommonTraceClass final : public BorrowedObject { private: using typename BorrowedObject::_ThisBorrowedObject; - using typename BorrowedObject::_LibObjPtr; + using _Spec = internal::CommonTraceClassSpec; using _StreamClass = internal::DepType, CommonStreamClass>; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedObject; using UserAttributes = internal::DepUserAttrs; - explicit CommonTraceClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonTraceClass(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } diff --git a/src/cpp-common/bt2/value.hpp b/src/cpp-common/bt2/value.hpp index 19919ed2..13d30a98 100644 --- a/src/cpp-common/bt2/value.hpp +++ b/src/cpp-common/bt2/value.hpp @@ -112,13 +112,13 @@ private: using typename BorrowedObject::_ThisBorrowedObject; protected: - using typename BorrowedObject::_LibObjPtr; using _ThisCommonValue = CommonValue; public: + using typename BorrowedObject::LibObjPtr; using Shared = SharedValue, LibObjT>; - explicit CommonValue(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} + explicit CommonValue(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } @@ -453,14 +453,14 @@ template class CommonBoolValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Value = bool; - explicit CommonBoolValue(const _LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} + explicit CommonBoolValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isBool()); } @@ -540,14 +540,14 @@ template class CommonUnsignedIntegerValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Value = std::uint64_t; - explicit CommonUnsignedIntegerValue(const _LibObjPtr libObjPtr) noexcept : + explicit CommonUnsignedIntegerValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isUnsignedInteger()); @@ -631,14 +631,14 @@ template class CommonSignedIntegerValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Value = std::int64_t; - explicit CommonSignedIntegerValue(const _LibObjPtr libObjPtr) noexcept : + explicit CommonSignedIntegerValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isSignedInteger()); @@ -722,14 +722,14 @@ template class CommonRealValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Value = double; - explicit CommonRealValue(const _LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} + explicit CommonRealValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isReal()); } @@ -809,14 +809,14 @@ template class CommonStringValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Value = const char *; - explicit CommonStringValue(const _LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} + explicit CommonStringValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isString()); } @@ -935,14 +935,14 @@ template class CommonArrayValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; using Iterator = BorrowedObjectIterator>; - explicit CommonArrayValue(const _LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} + explicit CommonArrayValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isArray()); } @@ -1239,13 +1239,13 @@ template class CommonMapValue final : public CommonValue { private: - using typename CommonValue::_LibObjPtr; using typename CommonValue::_ThisCommonValue; public: + using typename CommonValue::LibObjPtr; using Shared = SharedValue, LibObjT>; - explicit CommonMapValue(const _LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} + explicit CommonMapValue(const LibObjPtr libObjPtr) noexcept : _ThisCommonValue {libObjPtr} { BT_ASSERT_DBG(this->isMap()); } -- 2.34.1