Пример #1
0
    def __init__(self, encoding=None):
        ptr = native_bt.field_class_string_create()
        self._check_create_status(ptr)
        super().__init__(ptr)

        if encoding is not None:
            self.encoding = encoding
Пример #2
0
 def create_string_field_class(self, user_attributes=None):
     field_class_ptr = native_bt.field_class_string_create(self._ptr)
     self._check_field_class_create_status(field_class_ptr, 'string')
     fc = bt2_field_class._StringFieldClass._create_from_ptr(
         field_class_ptr)
     self._set_field_class_user_attrs(fc, user_attributes)
     return fc
Пример #3
0
    def __init__(self, encoding=None):
        ptr = native_bt.field_class_string_create()
        self._check_create_status(ptr)
        super().__init__(ptr)

        if encoding is not None:
            self.encoding = encoding
Пример #4
0
    def create_string_field_class(self):
        field_class_ptr = native_bt.field_class_string_create(self._ptr)
        self._check_create_status(field_class_ptr, 'string')

        return bt2_field_class._StringFieldClass._create_from_ptr(
            field_class_ptr)