class Babeltrace2::BTField::Enumeration::Signed

Public Instance Methods

get_mapping_labels() click to toggle source
# File lib/babeltrace2/trace-ir/field.rb, line 304
def get_mapping_labels
  ptr1 = FFI::MemoryPointer.new(:pointer)
  ptr2 = FFI::MemoryPointer.new(:uint64)
  res = Babeltrace2.bt_field_enumeration_signed_get_mapping_labels(
          @handle, ptr1, ptr2)
  raise Babeltrace2.process_error(res) if res != :BT_FIELD_ENUMERATION_GET_MAPPING_LABELS_STATUS_OK
  count = ptr2.read_uint64
  return [] if count == 0
  ptr1 = ptr1.read_pointer
  ptr1.read_array_of_pointer(count).collect.collect { |v|
    v = v.read_string
    v[0] == ':' ? v[1..-1].to_sym : v
  }
end
Also aliased as: mapping_labels
mapping_labels()
Alias for: get_mapping_labels