X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Ftrace.py;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Ftrace.py;h=5830ec3f8bc0b694dc3a1d081aae9fd5a9e1bad6;hp=47dab8f73fd65b9e188e5fd7def41a9f9faf3362;hb=05abc762716e96308952c1d83e290f393596cd90;hpb=e8ac1aaec8f07304d16bf787950c14cd7c49fc75 diff --git a/bindings/python/bt2/bt2/trace.py b/bindings/python/bt2/bt2/trace.py index 47dab8f7..5830ec3f 100644 --- a/bindings/python/bt2/bt2/trace.py +++ b/bindings/python/bt2/bt2/trace.py @@ -25,6 +25,7 @@ import bt2.field_class import collections.abc import bt2.value import bt2.stream +import bt2.trace_class import bt2 import functools @@ -63,6 +64,12 @@ class _Trace(object._SharedObject, collections.abc.Mapping): yield id + @property + def cls(self): + trace_class_ptr = native_bt.trace_borrow_class(self._ptr) + assert trace_class_ptr is not None + return bt2.trace_class._TraceClass._create_from_ptr_and_get_ref(trace_class_ptr) + @property def name(self): return native_bt.trace_get_name(self._ptr)