+ return CommonBaseEnumerationFieldClass<const bt_field_class> {*this};
+ }
+
+ std::uint64_t length() const noexcept
+ {
+ return bt_field_class_enumeration_get_mapping_count(this->libObjPtr());
+ }
+
+ Shared shared() const noexcept
+ {
+ return Shared::createWithRef(*this);
+ }
+};
+
+template <typename LibObjT, typename MappingT>
+class CommonEnumerationFieldClass final : public CommonBaseEnumerationFieldClass<LibObjT>
+{
+private:
+ using typename CommonBaseEnumerationFieldClass<LibObjT>::_ThisCommonBaseEnumerationFieldClass;
+
+public:
+ using typename CommonFieldClass<LibObjT>::LibObjPtr;
+ using Shared = SharedFieldClass<CommonEnumerationFieldClass, LibObjT>;
+ using Iterator = BorrowedObjectIterator<CommonEnumerationFieldClass>;
+ using Mapping = MappingT;
+
+ explicit CommonEnumerationFieldClass(const LibObjPtr libObjPtr) noexcept :
+ _ThisCommonBaseEnumerationFieldClass {libObjPtr}
+ {
+ BT_ASSERT_DBG(this->isEnumeration());
+ }
+
+ template <typename OtherLibObjT>
+ CommonEnumerationFieldClass(
+ const CommonEnumerationFieldClass<OtherLibObjT, MappingT> fc) noexcept :
+ CommonEnumerationFieldClass {fc}
+ {
+ }
+
+ template <typename OtherLibObjT>
+ CommonEnumerationFieldClass
+ operator=(const CommonEnumerationFieldClass<OtherLibObjT, MappingT> fc) noexcept
+ {
+ CommonEnumerationFieldClass::operator=(fc);
+ return *this;