Class: MachO::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.

Constant Summary collapse

FORMAT =
"VVVV"
SIZEOF =
16

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s, #type

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(raw_data, offset, cmd, cmdsize, htoffset, nhints) ⇒ TwolevelHintsCommand

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TwolevelHintsCommand.



719
720
721
722
723
# File 'lib/macho/load_commands.rb', line 719

def initialize(raw_data, offset, cmd, cmdsize, htoffset, nhints)
	super(raw_data, offset, cmd, cmdsize)
	@htoffset = htoffset
	@nhints = nhints
end

Instance Attribute Details

#htoffsetFixnum (readonly)

Returns the offset to the hint table.

Returns:

  • (Fixnum)

    the offset to the hint table



710
711
712
# File 'lib/macho/load_commands.rb', line 710

def htoffset
  @htoffset
end

#nhintsFixnum (readonly)

Returns the number of hints in the hint table.

Returns:

  • (Fixnum)

    the number of hints in the hint table



713
714
715
# File 'lib/macho/load_commands.rb', line 713

def nhints
  @nhints
end