module Babeltrace2::BTFieldClass::Variant::WithSelectorField::IntegerUnsigned

Public Instance Methods

append(name, option_field_class, ranges)
Alias for: append_option
append_option(name, option_field_class, ranges) click to toggle source
# File lib/babeltrace2/trace-ir/field-class.rb, line 1578
def append_option(name, option_field_class, ranges)
  name = name.inspect if name.kind_of?(Symbol)
  ranges = BTIntegerRangeSetUnsigned.from_value(ranges)
  res = Babeltrace2.bt_field_class_variant_with_selector_field_integer_unsigned_append_option(
          @handle, name, option_field_class, ranges)
  raise Babeltrace2.process_error(res) if res != :BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK
  self
end
Also aliased as: append
get_option_by_index(index) click to toggle source
# File lib/babeltrace2/trace-ir/field-class.rb, line 1588
def get_option_by_index(index)
  count = get_option_count
  index += count if index < 0
  return nil if index >= count || index < 0
  BTFieldClassVariantWithSelectorFieldIntegerUnsignedOption.new(
    Babeltrace2.bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const(
      @handle, index))
end
get_option_by_name(name) click to toggle source
# File lib/babeltrace2/trace-ir/field-class.rb, line 1597
def get_option_by_name(name)
  name = name.inspect if name.kind_of?(Symbol)
  handle = Babeltrace2.bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const(@handle, name)
  return nil if handle.null?
  BTFieldClassVariantWithSelectorFieldIntegerUnsignedOption.new(handle)
end