bt2: namespace private attributes of inheritable classes
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 5 Jul 2019 05:11:10 +0000 (01:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:34 +0000 (11:53 -0400)
commitdeec48a6812e8a263b61a4534d451333288a65b0
treeb8650c25f3bf1cad899111151d54d76d0c84aa16
parent3e2cc5dc6a86042f2e35ed82e0117bf01b0cb2f5
bt2: namespace private attributes of inheritable classes

Add `_bt` prefix to all private attributes and methods of classes of
which the user can inherit. This is done to prevent attribute name
clashes between the base class and the user class. We will document that
the user must not have any attribute with the `_bt_` prefix.

Here are the attribute and method names of inheritable classes with this
commit:
_UserSinkComponent:
  self._add_input_port
  self._bt_as_component_class_ptr
  self._bt_as_component_ptr
  self._bt_as_not_self_specific_component_ptr
  self._bt_as_self_component_ptr
  self._bt_borrow_component_class_ptr
  self._bt_cc_ptr
  self._bt_comp_cls_type
  self._bt_graph_is_configured_from_native
  self._bt_port_connected_from_native
  self._bt_ptr
  self._consume
  self._create_clock_class
  self._create_trace_class
  self._finalize
  self._input_ports
  self._port_connected
  self.addr
  self.cls
  self.logging_level
  self.name

_UserMessageIterator:
  self._bt_can_seek_beginning_from_native
  self._bt_init_from_native
  self._bt_next_from_native
  self._bt_ptr
  self._bt_seek_beginning_from_native
  self._bt_validate_stream_activity_message_default_clock_snapshot
  self._can_seek_beginning
  self._component
  self._create_discarded_events_message
  self._create_discarded_packets_message
  self._create_event_message
  self._create_message_iterator_inactivity_message
  self._create_packet_beginning_message
  self._create_packet_end_message
  self._create_stream_activity_beginning_message
  self._create_stream_activity_end_message
  self._create_stream_beginning_message
  self._create_stream_end_message
  self._finalize
  self._infinite_clock_snapshot
  self._seek_beginning
  self._unknown_clock_snapshot
  self.addr

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ia42f247038cc3d054199a8c94becddcb088b646a
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1626
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/graph.py
src/bindings/python/bt2/bt2/message_iterator.py
src/bindings/python/bt2/bt2/native_bt_component_class.i
src/bindings/python/bt2/bt2/plugin.py
src/bindings/python/bt2/bt2/query_executor.py
This page took 0.026619 seconds and 4 git commands to generate.