class _ClockClassConst(object._SharedObject):
- _get_ref = staticmethod(native_bt.clock_class_get_ref)
- _put_ref = staticmethod(native_bt.clock_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.clock_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.clock_class_put_ref(ptr)
+
_create_value_from_ptr_and_get_ref = staticmethod(
bt2_value._create_from_const_ptr_and_get_ref
)
class _SourceComponentClassConst(_ComponentClassConst):
- _get_ref = staticmethod(native_bt.component_class_source_get_ref)
- _put_ref = staticmethod(native_bt.component_class_source_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_class_source_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_class_source_put_ref(ptr)
+
_bt_as_component_class_ptr = staticmethod(
native_bt.component_class_source_as_component_class
)
class _FilterComponentClassConst(_ComponentClassConst):
- _get_ref = staticmethod(native_bt.component_class_filter_get_ref)
- _put_ref = staticmethod(native_bt.component_class_filter_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_class_filter_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_class_filter_put_ref(ptr)
+
_bt_as_component_class_ptr = staticmethod(
native_bt.component_class_filter_as_component_class
)
class _SinkComponentClassConst(_ComponentClassConst):
- _get_ref = staticmethod(native_bt.component_class_sink_get_ref)
- _put_ref = staticmethod(native_bt.component_class_sink_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_class_sink_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_class_sink_put_ref(ptr)
+
_bt_as_component_class_ptr = staticmethod(
native_bt.component_class_sink_as_component_class
)
# This is analogous to _SourceComponentClassConst, but for source
# component objects.
class _GenericSourceComponentConst(object._SharedObject, _SourceComponentConst):
- _get_ref = staticmethod(native_bt.component_source_get_ref)
- _put_ref = staticmethod(native_bt.component_source_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_source_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_source_put_ref(ptr)
@property
def output_ports(self):
# This is analogous to _FilterComponentClassConst, but for filter
# component objects.
class _GenericFilterComponentConst(object._SharedObject, _FilterComponentConst):
- _get_ref = staticmethod(native_bt.component_filter_get_ref)
- _put_ref = staticmethod(native_bt.component_filter_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_filter_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_filter_put_ref(ptr)
@property
def output_ports(self):
# This is analogous to _SinkComponentClassConst, but for sink
# component objects.
class _GenericSinkComponentConst(object._SharedObject, _SinkComponentConst):
- _get_ref = staticmethod(native_bt.component_sink_get_ref)
- _put_ref = staticmethod(native_bt.component_sink_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.component_sink_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.component_sink_put_ref(ptr)
@property
def input_ports(self):
class _ConnectionConst(bt2_object._SharedObject):
- _get_ref = staticmethod(native_bt.connection_get_ref)
- _put_ref = staticmethod(native_bt.connection_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.connection_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.connection_put_ref(ptr)
@property
def downstream_port(self):
class _EventClassConst(object._SharedObject):
- _get_ref = staticmethod(native_bt.event_class_get_ref)
- _put_ref = staticmethod(native_bt.event_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.event_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.event_class_put_ref(ptr)
+
_borrow_stream_class_ptr = staticmethod(
native_bt.event_class_borrow_stream_class_const
)
class _FieldClassConst(object._SharedObject):
- _get_ref = staticmethod(native_bt.field_class_get_ref)
- _put_ref = staticmethod(native_bt.field_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.field_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.field_class_put_ref(ptr)
+
_borrow_user_attributes_ptr = staticmethod(
native_bt.field_class_borrow_user_attributes_const
)
class _FieldPathConst(object._SharedObject, collections.abc.Iterable):
- _get_ref = staticmethod(native_bt.field_path_get_ref)
- _put_ref = staticmethod(native_bt.field_path_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.field_path_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.field_path_put_ref(ptr)
@property
def root_scope(self):
class Graph(object._SharedObject):
- _get_ref = staticmethod(native_bt.graph_get_ref)
- _put_ref = staticmethod(native_bt.graph_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.graph_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.graph_put_ref(ptr)
def __init__(self, mip_version=0):
utils._check_uint64(mip_version)
class _SignedIntegerRangeSetConst(_IntegerRangeSetConst):
- _get_ref = staticmethod(native_bt.integer_range_set_signed_get_ref)
- _put_ref = staticmethod(native_bt.integer_range_set_signed_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.integer_range_set_signed_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.integer_range_set_signed_put_ref(ptr)
+
_as_range_set_ptr = staticmethod(
native_bt.integer_range_set_signed_as_range_set_const
)
class _UnsignedIntegerRangeSetConst(_IntegerRangeSetConst):
- _get_ref = staticmethod(native_bt.integer_range_set_unsigned_get_ref)
- _put_ref = staticmethod(native_bt.integer_range_set_unsigned_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.integer_range_set_unsigned_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.integer_range_set_unsigned_put_ref(ptr)
+
_as_range_set_ptr = staticmethod(
native_bt.integer_range_set_unsigned_as_range_set_const
)
class Interrupter(object._SharedObject):
- _get_ref = staticmethod(native_bt.interrupter_get_ref)
- _put_ref = staticmethod(native_bt.interrupter_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.interrupter_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.interrupter_put_ref(ptr)
def __init__(self):
ptr = native_bt.interrupter_create()
class _MessageConst(object._SharedObject):
- _get_ref = staticmethod(native_bt.message_get_ref)
- _put_ref = staticmethod(native_bt.message_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.message_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.message_put_ref(ptr)
@staticmethod
def _check_has_default_clock_class(clock_class):
class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageIterator):
- _get_ref = staticmethod(native_bt.message_iterator_get_ref)
- _put_ref = staticmethod(native_bt.message_iterator_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.message_iterator_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.message_iterator_put_ref(ptr)
def __init__(self, ptr):
self._current_msgs = []
class _PacketConst(object._SharedObject):
- _get_ref = staticmethod(native_bt.packet_get_ref)
- _put_ref = staticmethod(native_bt.packet_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.packet_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.packet_put_ref(ptr)
+
_borrow_stream_ptr = staticmethod(native_bt.packet_borrow_stream_const)
_borrow_context_field_ptr = staticmethod(
native_bt.packet_borrow_context_field_const
class _PluginSet(object._SharedObject, collections.abc.Sequence):
- _put_ref = staticmethod(native_bt.plugin_set_put_ref)
- _get_ref = staticmethod(native_bt.plugin_set_get_ref)
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.plugin_set_put_ref(ptr)
+
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.plugin_set_get_ref(ptr)
def __len__(self):
count = native_bt.plugin_set_get_plugin_count(self._ptr)
class _Plugin(object._SharedObject):
- _put_ref = staticmethod(native_bt.plugin_put_ref)
- _get_ref = staticmethod(native_bt.plugin_get_ref)
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.plugin_put_ref(ptr)
+
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.plugin_get_ref(ptr)
@property
def name(self):
class QueryExecutor(object._SharedObject, _QueryExecutorCommon):
- _get_ref = staticmethod(native_bt.query_executor_get_ref)
- _put_ref = staticmethod(native_bt.query_executor_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.query_executor_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.query_executor_put_ref(ptr)
def _as_query_executor_ptr(self):
return self._ptr
class _StreamConst(bt2_object._SharedObject):
- _get_ref = staticmethod(native_bt.stream_get_ref)
- _put_ref = staticmethod(native_bt.stream_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.stream_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.stream_put_ref(ptr)
+
_borrow_class_ptr = staticmethod(native_bt.stream_borrow_class_const)
_borrow_user_attributes_ptr = staticmethod(
native_bt.stream_borrow_user_attributes_const
class _StreamClassConst(object._SharedObject, collections.abc.Mapping):
- _get_ref = staticmethod(native_bt.stream_class_get_ref)
- _put_ref = staticmethod(native_bt.stream_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.stream_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.stream_class_put_ref(ptr)
+
_borrow_event_class_ptr_by_id = staticmethod(
native_bt.stream_class_borrow_event_class_by_id_const
)
class _StreamClass(_StreamClassConst):
- _get_ref = staticmethod(native_bt.stream_class_get_ref)
- _put_ref = staticmethod(native_bt.stream_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.stream_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.stream_class_put_ref(ptr)
+
_borrow_event_class_ptr_by_id = staticmethod(
native_bt.stream_class_borrow_event_class_by_id
)
class _TraceConst(object._SharedObject, collections.abc.Mapping):
- _get_ref = staticmethod(native_bt.trace_get_ref)
- _put_ref = staticmethod(native_bt.trace_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.trace_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.trace_put_ref(ptr)
+
_borrow_stream_ptr_by_id = staticmethod(native_bt.trace_borrow_stream_by_id_const)
_borrow_stream_ptr_by_index = staticmethod(
native_bt.trace_borrow_stream_by_index_const
class _TraceClassConst(object._SharedObject, collections.abc.Mapping):
- _get_ref = staticmethod(native_bt.trace_class_get_ref)
- _put_ref = staticmethod(native_bt.trace_class_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.trace_class_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.trace_class_put_ref(ptr)
+
_borrow_stream_class_ptr_by_index = staticmethod(
native_bt.trace_class_borrow_stream_class_by_index_const
)
class _ValueConst(object._SharedObject, metaclass=abc.ABCMeta):
- _get_ref = staticmethod(native_bt.value_get_ref)
- _put_ref = staticmethod(native_bt.value_put_ref)
+ @staticmethod
+ def _get_ref(ptr):
+ native_bt.value_get_ref(ptr)
+
+ @staticmethod
+ def _put_ref(ptr):
+ native_bt.value_put_ref(ptr)
+
_create_value_from_ptr = staticmethod(_create_from_const_ptr)
_create_value_from_ptr_and_get_ref = staticmethod(
_create_from_const_ptr_and_get_ref