Class: Babeltrace2::BTField
Defined Under Namespace
Modules: Enumeration
Classes: Array, BitArray, Bool, Integer, Option, Real, String, Structure, Variant
Constant Summary
collapse
- TYPE_MAP =
{}
Instance Attribute Summary
Attributes inherited from BTObject
#handle
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BTObject
#==, #initialize, #to_ptr
Class Method Details
.from_handle(handle) ⇒ Object
17
18
19
20
21
22
|
# File 'lib/babeltrace2/trace-ir/field.rb', line 17
def self.from_handle(handle)
clss = TYPE_MAP[Babeltrace2.bt_field_get_class_type(handle)]
raise "unsupported field class type" unless clss
handle = clss[0].new(handle)
clss[1].new(handle)
end
|
Instance Method Details
#get_class_type ⇒ Object
Also known as:
class_type
24
25
26
|
# File 'lib/babeltrace2/trace-ir/field.rb', line 24
def get_class_type
Babeltrace2.bt_field_get_class_type(@handle)
end
|
#to_s ⇒ Object
33
34
35
|
# File 'lib/babeltrace2/trace-ir/field.rb', line 33
def to_s
value.to_s
end
|