From 69f0ef364ebc462a072fb136f387fa57b4616a0c Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 5 Dec 2014 20:10:01 -0500 Subject: [PATCH] Python: document CTFTypeId MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- bindings/python/bt.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/bindings/python/bt.py b/bindings/python/bt.py index ddedf060..6091bdb9 100644 --- a/bindings/python/bt.py +++ b/bindings/python/bt.py @@ -370,19 +370,47 @@ class ByteOrder: # These are taken directly from ctf/events.h # All changes to enums must also be made here class CTFTypeId: + """ + CTF numeric type identifiers. + """ + + #: Unknown type UNKNOWN = 0 + + #: Integer INTEGER = 1 + + #: Floating point number FLOAT = 2 + + #: Enumeration ENUM = 3 + + #: String STRING = 4 + + #: Structure STRUCT = 5 + + #: Untagged variant UNTAGGED_VARIANT = 6 + + #: Variant VARIANT = 7 + + #: Array ARRAY = 8 + + #: Sequence SEQUENCE = 9 + NR_CTF_TYPES = 10 def type_name(id): + """ + Returns the name of the CTF numeric type identifier *id*. + """ + name = "UNKNOWN_TYPE" constants = [ attr for attr in dir(CTFTypeId) if not callable( -- 2.34.1