Class: Babeltrace2::BTFieldClass::String
- Inherits:
-
Babeltrace2::BTFieldClass
- Object
- Babeltrace2::BTObject
- Babeltrace2::BTSharedObject
- Babeltrace2::BTFieldClass
- Babeltrace2::BTFieldClass::String
- Defined in:
- lib/babeltrace2/trace-ir/field-class.rb
Constant Summary
Constants inherited from Babeltrace2::BTFieldClass
IntegerSigned, IntegerUnsigned, RealDoublePrecision, RealSinglePrecision, TYPE_MAP
Instance Attribute Summary
Attributes inherited from Babeltrace2::BTObject
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(handle = nil, retain: true, auto_release: true, trace_class: nil) ⇒ String
constructor
A new instance of String.
Methods inherited from Babeltrace2::BTFieldClass
#from_h, from_handle, #get_type, #get_user_attributes, #set_user_attributes, #to_h, #type_is, #user_attributes=
Methods inherited from Babeltrace2::BTSharedObject
Methods inherited from Babeltrace2::BTObject
Constructor Details
#initialize(handle = nil, retain: true, auto_release: true, trace_class: nil) ⇒ String
Returns a new instance of String.
783 784 785 786 787 788 789 790 791 792 |
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 783 def initialize(handle = nil, retain: true, auto_release: true, trace_class: nil) if handle super(handle, retain: retain, auto_release: auto_release) else handle = Babeltrace2.bt_field_class_string_create(trace_class) raise Babeltrace2.process_error if handle.null? super(handle, retain: false) end end |
Class Method Details
.from_h(trace_class, h, stream_class_h = nil) ⇒ Object
794 795 796 797 798 |
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 794 def self.from_h(trace_class, h, stream_class_h = nil) o = self.new(trace_class: trace_class).from_h(h) h[:bt_field_class] = o o end |