assert self._label is not None
ranges_ptr = self._mapping_borrow_ranges_ptr(mapping_ptr)
assert ranges_ptr is not None
- self._ranges = self._ranges_type._create_from_ptr_and_get_ref(ranges_ptr)
+ self._ranges = self._range_set_pycls._create_from_ptr_and_get_ref(ranges_ptr)
@property
def label(self):
class _UnsignedEnumerationFieldClassMappingConst(_EnumerationFieldClassMapping):
- _ranges_type = bt2_integer_range_set.UnsignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.UnsignedIntegerRangeSet
_as_enumeration_field_class_mapping_ptr = staticmethod(
native_bt.field_class_enumeration_unsigned_mapping_as_mapping_const
)
class _SignedEnumerationFieldClassMappingConst(_EnumerationFieldClassMapping):
- _ranges_type = bt2_integer_range_set.SignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.SignedIntegerRangeSet
_as_enumeration_field_class_mapping_ptr = staticmethod(
native_bt.field_class_enumeration_signed_mapping_as_mapping_const
)
class _EnumerationFieldClass(_EnumerationFieldClassConst, _IntegerFieldClass):
def add_mapping(self, label, ranges):
utils._check_str(label)
- utils._check_type(ranges, self._range_set_type)
+ utils._check_type(ranges, self._range_set_pycls)
if label in self:
raise ValueError("duplicate mapping label '{}'".format(label))
_EnumerationFieldClassConst, _UnsignedIntegerFieldClassConst
):
_NAME = 'Const nsigned enumeration'
- _range_set_type = bt2_integer_range_set.UnsignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.UnsignedIntegerRangeSet
_borrow_mapping_ptr_by_label = staticmethod(
native_bt.field_class_enumeration_unsigned_borrow_mapping_by_label_const
)
_EnumerationFieldClassConst, _SignedIntegerFieldClassConst
):
_NAME = 'Const signed enumeration'
- _range_set_type = bt2_integer_range_set.SignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.SignedIntegerRangeSet
_borrow_mapping_ptr_by_label = staticmethod(
native_bt.field_class_enumeration_signed_borrow_mapping_by_label_const
)
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _OptionFieldClass(_OptionFieldClassConst, _FieldClass):
native_bt.field_class_variant_option_borrow_field_class
)
_borrow_user_attributes_ptr = staticmethod(
- native_bt.field_class_variant_option_borrow_user_attributes_const
+ native_bt.field_class_variant_option_borrow_user_attributes
)
_create_value_from_ptr_and_get_ref = staticmethod(
bt2_value._create_from_ptr_and_get_ref
def ranges(self):
range_set_ptr = self._borrow_ranges_ptr(self._spec_ptr)
assert range_set_ptr is not None
- return self._range_set_type._create_from_ptr_and_get_ref(range_set_ptr)
+ return self._range_set_pycls._create_from_ptr_and_get_ref(range_set_ptr)
class _VariantFieldClassWithSelectorOption(
_borrow_ranges_ptr = staticmethod(
native_bt.field_class_variant_with_selector_signed_option_borrow_ranges_const
)
- _range_set_type = bt2_integer_range_set.SignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.SignedIntegerRangeSet
class _VariantFieldClassWithSignedSelectorOption(
_borrow_ranges_ptr = staticmethod(
native_bt.field_class_variant_with_selector_unsigned_option_borrow_ranges_const
)
- _range_set_type = bt2_integer_range_set.UnsignedIntegerRangeSet
+ _range_set_pycls = bt2_integer_range_set.UnsignedIntegerRangeSet
class _VariantFieldClassWithUnsignedSelectorOption(
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _VariantFieldClassWithSelector(
def append_option(self, name, field_class, ranges, user_attributes=None):
utils._check_str(name)
utils._check_type(field_class, _FieldClass)
- utils._check_type(ranges, self._variant_option_pycls._range_set_type)
+ utils._check_type(ranges, self._variant_option_pycls._range_set_pycls)
if name in self:
raise ValueError("duplicate option name '{}'".format(name))
_borrow_option_ptr_by_index = staticmethod(
native_bt.field_class_variant_with_selector_unsigned_borrow_option_by_index_const
)
- _append_option = staticmethod(
- native_bt.field_class_variant_with_selector_unsigned_append_option
- )
_variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOptionConst
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
_NAME = 'Variant (with unsigned selector)'
_variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOption
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
+ _append_option = staticmethod(
+ native_bt.field_class_variant_with_selector_unsigned_append_option
+ )
class _VariantFieldClassWithSignedSelectorConst(_VariantFieldClassWithSelectorConst):
_borrow_option_ptr_by_index = staticmethod(
native_bt.field_class_variant_with_selector_signed_borrow_option_by_index_const
)
- _append_option = staticmethod(
- native_bt.field_class_variant_with_selector_signed_append_option
- )
_variant_option_pycls = _VariantFieldClassWithSignedSelectorOptionConst
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
_NAME = 'Variant (with signed selector)'
_variant_option_pycls = _VariantFieldClassWithSignedSelectorOption
_as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
+ _append_option = staticmethod(
+ native_bt.field_class_variant_with_selector_signed_append_option
+ )
class _ArrayFieldClassConst(_FieldClassConst):
if ptr is None:
return
- return bt2_field_path._FieldPath._create_from_ptr_and_get_ref(ptr)
+ return bt2_field_path._FieldPathConst._create_from_ptr_and_get_ref(ptr)
class _DynamicArrayFieldClass(_DynamicArrayFieldClassConst, _ArrayFieldClass):