class HexaPDF:: Reference
Parent | Object |
---|---|
Included Modules |
Comparable |
A reference to an indirect object.
The PDF syntax allows for references to existing and non-existing indirect objects. Such references are represented with objects of this class.
Note that after initialization changing the object or generation numbers is not possible anymore!
The methods hash
and eql?
are implemented so that objects of this class can be used as hash keys. Furthermore the implementation is compatible to the one of Object
, i.e. the hash of a Reference
object is the same as the hash of an indirect Object
.
See: PDF2.0 s7.3.10, Object
Attributes
Returns the generation number of the referenced indirect object.
Returns the object number of the referenced indirect object.
Public Class Methods
Public Instance Methods
Compares this object to another object.
If the other object does not respond to oid
or gen
, nil
is returned. Otherwise objects are ordered first by object number and then by generation number.
Returns true
if the other object references the same PDF object as this reference object.
This is necessary so that Object
and Reference
objects can be used as interchangable hash keys and can be compared.
Computes the hash value based on the object and generation numbers.
Returns the object identifier as “oid,gen”.