Class Origami::XRefToCompressedObj
In: sources/parser/xreftable.rb
Parent: Object

An xref poiting to an Object embedded in an ObjectStream.

Methods

Attributes

index  [RW] 
objstmno  [RW] 

Public Class methods

[Source]

     # File sources/parser/xreftable.rb, line 282
282:     def initialize(objstmno, index)
283:       @objstmno = objstmno
284:       @index = index
285:     end

Public Instance methods

[Source]

     # File sources/parser/xreftable.rb, line 287
287:     def to_xrefstm_data(type_w, field1_w, field2_w)
288: 
289:       type_w <<= 3
290:       field1_w <<= 3
291:       field2_w <<= 3
292: 
293:       type = "\002".unpack("B#{type_w}")[0]
294:       objstmno = @objstmno.to_s(2)
295:       objstmno = '0' * (field1_w - objstmno.size) + objstmno
296:       index = @index.to_s(2)
297:       index = '0' * (field2_w - index.size) + index
298: 
299:       [ type , objstmno, index ].pack("B#{type_w}B#{field1_w}B#{field2_w}")
300:     end

[Validate]