X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Ffields.py;h=507f047fa65524795ef736461c328fe5a6439f8f;hb=da2edb5bdef1e06be21c85776381477754710ffe;hp=8f0d3203f9c3b35e119bee6c0150c0424072b341;hpb=50842bdc4c21f3de2b63e29cdac730af8b6dcca6;p=babeltrace.git diff --git a/bindings/python/bt2/bt2/fields.py b/bindings/python/bt2/bt2/fields.py index 8f0d3203..507f047f 100644 --- a/bindings/python/bt2/bt2/fields.py +++ b/bindings/python/bt2/bt2/fields.py @@ -324,6 +324,7 @@ class _IntegerField(_IntegralField): value = property(fset=_set_value) + class _FloatingPointNumberField(_RealField): _NAME = 'Floating point number' @@ -352,6 +353,7 @@ class _FloatingPointNumberField(_RealField): value = property(fset=_set_value) + class _EnumerationField(_IntegerField): _NAME = 'Enumeration' @@ -520,6 +522,7 @@ class _StructureField(_ContainerField, collections.abc.MutableMapping): value = property(fset=_set_value) + class _VariantField(_Field): _NAME = 'Variant' @@ -565,6 +568,7 @@ class _VariantField(_Field): value = property(fset=_set_value) + class _ArraySequenceField(_ContainerField, collections.abc.MutableSequence): def __getitem__(self, index): if not isinstance(index, numbers.Integral): @@ -693,6 +697,7 @@ class _SequenceField(_ArraySequenceField): value = property(fset=_set_value) + _TYPE_ID_TO_OBJ = { native_bt.FIELD_TYPE_ID_INTEGER: _IntegerField, native_bt.FIELD_TYPE_ID_FLOAT: _FloatingPointNumberField,