Class: Babeltrace2::BTFieldClass::Option::WithoutSelectorField
- Inherits:
-
Babeltrace2::BTFieldClass::Option
- Object
- Babeltrace2::BTObject
- Babeltrace2::BTSharedObject
- Babeltrace2::BTFieldClass
- Babeltrace2::BTFieldClass::Option
- Babeltrace2::BTFieldClass::Option::WithoutSelectorField
- 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, optional_field_class: nil) ⇒ WithoutSelectorField
constructor
A new instance of WithoutSelectorField.
Methods inherited from Babeltrace2::BTFieldClass::Option
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, optional_field_class: nil) ⇒ WithoutSelectorField
Returns a new instance of WithoutSelectorField.
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 1147 def initialize(handle = nil, retain: true, auto_release: true, trace_class: nil, optional_field_class: nil) if handle super(handle, retain: retain, auto_release: auto_release) else handle = Babeltrace2.bt_field_class_option_without_selector_create( trace_class, optional_field_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
1159 1160 1161 1162 1163 1164 1165 1166 |
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 1159 def self.from_h(trace_class, h, stream_class_h = nil) o = self.new(trace_class: trace_class, optional_field_class: BTFieldClass.from_h(trace_class, h[:field_class], stream_class_h)).from_h(h) h[:bt_field_class] = o o end |