Parent

Class/Module Index [+]

Quicksearch

Origami::XRefToCompressedObj

An xref poiting to an Object embedded in an ObjectStream.

Attributes

index[RW]
objstmno[RW]

Public Class Methods

new(objstmno, index) click to toggle source
# File lib/origami/xreftable.rb, line 284
def initialize(objstmno, index)
  @objstmno = objstmno
  @index = index
end

Public Instance Methods

to_xrefstm_data(type_w, field1_w, field2_w) click to toggle source
# File lib/origami/xreftable.rb, line 289
def to_xrefstm_data(type_w, field1_w, field2_w)

  type_w <<= 3
  field1_w <<= 3
  field2_w <<= 3

  type = "\0002".unpack("B#{type_w}")[0]
  objstmno = @objstmno.to_s(2)
  objstmno = '0' * (field1_w - objstmno.size) + objstmno
  index = @index.to_s(2)
  index = '0' * (field2_w - index.size) + index

  [ type , objstmno, index ].pack("B#{type_w}B#{field1_w}B#{field2_w}")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.