Class: Origami::XRefToCompressedObject
- Inherits:
-
Object
- Object
- Origami::XRefToCompressedObject
- Defined in:
- lib/origami/xreftable.rb
Overview
An xref poiting to an Object embedded in an ObjectStream.
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#objstmno ⇒ Object
Returns the value of attribute objstmno.
Instance Method Summary collapse
- #free? ⇒ Boolean
-
#initialize(objstmno, index) ⇒ XRefToCompressedObject
constructor
A new instance of XRefToCompressedObject.
- #to_xrefstm_data(type_w, field1_w, field2_w) ⇒ Object
- #used? ⇒ Boolean
Constructor Details
#initialize(objstmno, index) ⇒ XRefToCompressedObject
Returns a new instance of XRefToCompressedObject.
349 350 351 352 |
# File 'lib/origami/xreftable.rb', line 349 def initialize(objstmno, index) @objstmno = objstmno @index = index end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
347 348 349 |
# File 'lib/origami/xreftable.rb', line 347 def index @index end |
#objstmno ⇒ Object
Returns the value of attribute objstmno.
347 348 349 |
# File 'lib/origami/xreftable.rb', line 347 def objstmno @objstmno end |
Instance Method Details
#to_xrefstm_data(type_w, field1_w, field2_w) ⇒ Object
354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/origami/xreftable.rb', line 354 def to_xrefstm_data(type_w, field1_w, field2_w) type_w <<= 3 field1_w <<= 3 field2_w <<= 3 type = "\002".unpack("B#{type_w}")[0] objstmno = @objstmno.to_s(2).rjust(field1_w, '0') index = @index.to_s(2).rjust(field2_w, '0') [ type , objstmno, index ].pack("B#{type_w}B#{field1_w}B#{field2_w}") end |