コード例 #1
0
ファイル: field_class.py プロジェクト: efficios/babeltrace
    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
ファイル: trace_class.py プロジェクト: tbricks/babeltrace
 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
ファイル: field_class.py プロジェクト: stephening/babeltrace
    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
ファイル: trace_class.py プロジェクト: pbl-game-sc/babeltrace
    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)