X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Ffield_class.py;h=13c5e46213a26cd4d9f6ec011a173e95ceaf6ebc;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hp=6091d24de8130da1261186c61df1c85a4d383a0f;hpb=81b8fa4490092c27f40470f1f50a925f768b7b83;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/field_class.py b/src/bindings/python/bt2/bt2/field_class.py index 6091d24d..13c5e462 100644 --- a/src/bindings/python/bt2/bt2/field_class.py +++ b/src/bindings/python/bt2/bt2/field_class.py @@ -1,24 +1,6 @@ -# The MIT License (MIT) +# SPDX-License-Identifier: MIT # # Copyright (c) 2017 Philippe Proulx -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. from bt2 import native_bt, object, utils import collections.abc @@ -517,7 +499,7 @@ class _OptionWithSelectorFieldClassConst(_OptionFieldClassConst): @property def selector_field_path(self): - ptr = native_bt.field_class_option_with_selector_borrow_selector_field_path_const( + ptr = native_bt.field_class_option_with_selector_field_borrow_selector_field_path_const( self._ptr ) if ptr is None: @@ -532,7 +514,7 @@ class _OptionWithBoolSelectorFieldClassConst(_OptionWithSelectorFieldClassConst) @property def selector_is_reversed(self): return bool( - native_bt.field_class_option_with_selector_bool_selector_is_reversed( + native_bt.field_class_option_with_selector_field_bool_selector_is_reversed( self._ptr ) ) @@ -554,7 +536,7 @@ class _OptionWithUnsignedIntegerSelectorFieldClassConst( _NAME = 'Const option (with unsigned integer selector)' _range_set_pycls = bt2_integer_range_set._UnsignedIntegerRangeSetConst _borrow_selector_ranges_ptr = staticmethod( - native_bt.field_class_option_with_selector_integer_unsigned_borrow_selector_ranges_const + native_bt.field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const ) @@ -564,7 +546,7 @@ class _OptionWithSignedIntegerSelectorFieldClassConst( _NAME = 'Const option (with signed integer selector)' _range_set_pycls = bt2_integer_range_set._SignedIntegerRangeSetConst _borrow_selector_ranges_ptr = staticmethod( - native_bt.field_class_option_with_selector_integer_signed_borrow_selector_ranges_const + native_bt.field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const ) @@ -591,7 +573,7 @@ class _OptionWithBoolSelectorFieldClass( def _selector_is_reversed(self, selector_is_reversed): utils._check_bool(selector_is_reversed) - native_bt.field_class_option_with_selector_bool_set_selector_is_reversed( + native_bt.field_class_option_with_selector_field_bool_set_selector_is_reversed( self._ptr, selector_is_reversed ) @@ -701,10 +683,10 @@ class _VariantFieldClassWithSignedIntegerSelectorOptionConst( _VariantFieldClassWithIntegerSelectorOptionConst ): _as_option_ptr = staticmethod( - native_bt.field_class_variant_with_selector_integer_signed_option_as_option_const + native_bt.field_class_variant_with_selector_field_integer_signed_option_as_option_const ) _borrow_ranges_ptr = staticmethod( - native_bt.field_class_variant_with_selector_integer_signed_option_borrow_ranges_const + native_bt.field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const ) _range_set_pycls = bt2_integer_range_set._SignedIntegerRangeSetConst @@ -720,10 +702,10 @@ class _VariantFieldClassWithUnsignedIntegerSelectorOptionConst( _VariantFieldClassWithIntegerSelectorOptionConst ): _as_option_ptr = staticmethod( - native_bt.field_class_variant_with_selector_integer_unsigned_option_as_option_const + native_bt.field_class_variant_with_selector_field_integer_unsigned_option_as_option_const ) _borrow_ranges_ptr = staticmethod( - native_bt.field_class_variant_with_selector_integer_unsigned_option_borrow_ranges_const + native_bt.field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const ) _range_set_pycls = bt2_integer_range_set._UnsignedIntegerRangeSetConst @@ -843,7 +825,7 @@ class _VariantFieldClassWithIntegerSelectorConst(_VariantFieldClassConst): @property def selector_field_path(self): - ptr = native_bt.field_class_variant_with_selector_borrow_selector_field_path_const( + ptr = native_bt.field_class_variant_with_selector_field_borrow_selector_field_path_const( self._ptr ) @@ -897,10 +879,10 @@ class _VariantFieldClassWithUnsignedIntegerSelectorConst( ): _NAME = 'Const variant (with unsigned integer selector)' _borrow_option_ptr_by_name = staticmethod( - native_bt.field_class_variant_with_selector_integer_unsigned_borrow_option_by_name_const + native_bt.field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const ) _borrow_option_ptr_by_index = staticmethod( - native_bt.field_class_variant_with_selector_integer_unsigned_borrow_option_by_index_const + native_bt.field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const ) _variant_option_pycls = _VariantFieldClassWithUnsignedIntegerSelectorOptionConst _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr) @@ -914,7 +896,7 @@ class _VariantFieldClassWithUnsignedIntegerSelector( _variant_option_pycls = _VariantFieldClassWithUnsignedIntegerSelectorOption _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr) _append_option = staticmethod( - native_bt.field_class_variant_with_selector_integer_unsigned_append_option + native_bt.field_class_variant_with_selector_field_integer_unsigned_append_option ) @@ -923,10 +905,10 @@ class _VariantFieldClassWithSignedIntegerSelectorConst( ): _NAME = 'Const variant (with signed integer selector)' _borrow_option_ptr_by_name = staticmethod( - native_bt.field_class_variant_with_selector_integer_signed_borrow_option_by_name_const + native_bt.field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const ) _borrow_option_ptr_by_index = staticmethod( - native_bt.field_class_variant_with_selector_integer_signed_borrow_option_by_index_const + native_bt.field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const ) _variant_option_pycls = _VariantFieldClassWithSignedIntegerSelectorOptionConst _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr) @@ -940,7 +922,7 @@ class _VariantFieldClassWithSignedIntegerSelector( _variant_option_pycls = _VariantFieldClassWithSignedIntegerSelectorOption _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr) _append_option = staticmethod( - native_bt.field_class_variant_with_selector_integer_signed_append_option + native_bt.field_class_variant_with_selector_field_integer_signed_append_option ) @@ -1021,13 +1003,13 @@ _FIELD_CLASS_TYPE_TO_CONST_OBJ = { native_bt.FIELD_CLASS_TYPE_STATIC_ARRAY: _StaticArrayFieldClassConst, native_bt.FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD: _DynamicArrayFieldClassConst, native_bt.FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD: _DynamicArrayWithLengthFieldFieldClassConst, - native_bt.FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR: _OptionFieldClassConst, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR: _OptionWithBoolSelectorFieldClassConst, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionWithUnsignedIntegerSelectorFieldClassConst, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionWithSignedIntegerSelectorFieldClassConst, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantFieldClassWithoutSelectorConst, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantFieldClassWithUnsignedIntegerSelectorConst, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantFieldClassWithSignedIntegerSelectorConst, + native_bt.FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD: _OptionFieldClassConst, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD: _OptionWithBoolSelectorFieldClassConst, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD: _OptionWithUnsignedIntegerSelectorFieldClassConst, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD: _OptionWithSignedIntegerSelectorFieldClassConst, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD: _VariantFieldClassWithoutSelectorConst, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD: _VariantFieldClassWithUnsignedIntegerSelectorConst, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD: _VariantFieldClassWithSignedIntegerSelectorConst, } _FIELD_CLASS_TYPE_TO_OBJ = { @@ -1044,11 +1026,11 @@ _FIELD_CLASS_TYPE_TO_OBJ = { native_bt.FIELD_CLASS_TYPE_STATIC_ARRAY: _StaticArrayFieldClass, native_bt.FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD: _DynamicArrayFieldClass, native_bt.FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD: _DynamicArrayWithLengthFieldFieldClass, - native_bt.FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR: _OptionFieldClass, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR: _OptionWithBoolSelectorFieldClass, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR: _OptionWithUnsignedIntegerSelectorFieldClass, - native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR: _OptionWithSignedIntegerSelectorFieldClass, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR: _VariantFieldClassWithoutSelector, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR: _VariantFieldClassWithUnsignedIntegerSelector, - native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR: _VariantFieldClassWithSignedIntegerSelector, + native_bt.FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD: _OptionFieldClass, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD: _OptionWithBoolSelectorFieldClass, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD: _OptionWithUnsignedIntegerSelectorFieldClass, + native_bt.FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD: _OptionWithSignedIntegerSelectorFieldClass, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD: _VariantFieldClassWithoutSelector, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD: _VariantFieldClassWithUnsignedIntegerSelector, + native_bt.FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD: _VariantFieldClassWithSignedIntegerSelector, }