Class: MachO::LoadCommands::TwolevelHintsCommand

Inherits:
LoadCommand show all
Defined in:
lib/macho/load_commands.rb

Overview

A load command containing the offset and number of hints in the two-level namespace lookup hints table. Corresponds to LC_TWOLEVEL_HINTS.

Defined Under Namespace

Classes: TwolevelHintsTable

Instance Method Summary collapse

Methods inherited from LoadCommand

#cmd, #cmdsize, create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type, #view

Methods inherited from MachOStructure

bytesize, format, #initialize, new_from_bin

Constructor Details

This class inherits a constructor from MachO::MachOStructure

Instance Method Details

#htoffsetInteger

Returns the offset to the hint table.

Returns:

  • (Integer)

    the offset to the hint table



953
# File 'lib/macho/load_commands.rb', line 953

field :htoffset, :uint32

#nhintsInteger

Returns the number of hints in the hint table.

Returns:

  • (Integer)

    the number of hints in the hint table



956
# File 'lib/macho/load_commands.rb', line 956

field :nhints, :uint32

#tableTwolevelHintsTable

Returns the hint table.

Returns:



960
# File 'lib/macho/load_commands.rb', line 960

field :table, :two_level_hints_table

#to_hHash

Returns a hash representation of this MachO::LoadCommands::TwolevelHintsCommand.

Returns:



963
964
965
966
967
968
969
# File 'lib/macho/load_commands.rb', line 963

def to_h
  {
    "htoffset" => htoffset,
    "nhints" => nhints,
    "table" => table.hints.map(&:to_h),
  }.merge super
end