|
libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
|
Implements the COS cross-reference table. More...
#include <art/paperback/carousel/cross-reference.hxx>
Classes | |
| struct | Free_entry |
| Represents a free entry in the cross-reference table. More... | |
| struct | Used_entry |
| Represents a used entry in the cross-reference table. More... | |
Public Member Functions | |
| cross_Reference () | |
| Constructor. | |
| cross_Reference (cross_Reference const &) | |
| Constructor. | |
| cross_Reference (cross_Reference &&) | |
| Constructor. | |
| ~cross_Reference () noexcept | |
| Destructor. | |
| uint32_t | size () const |
| Get the size of the cross-reference table. | |
| Identity | allocate () |
| Allocate a new object index. | |
| int64_t | get_offset (Identity) const |
| Get the offset of a used entry. | |
| void | set_offset (Identity, int64_t) |
| Set the offset of a used entry. | |
| Identity | next () const |
| Get the next available object identity. | |
| void | write (Writer &, bool) |
| Write the cross-reference to an output stream. | |
| void | clear_offsets () |
| Clears the offsets of used entries. | |
| cross_Reference & | operator= (cross_Reference const &) |
| Assignment. | |
| cross_Reference & | operator= (cross_Reference &&) |
| Assignment. | |
Private Types | |
| using | Entry = variant<Free_entry, Used_entry> |
Private Attributes | |
| map< Identity, Entry > | _table |
| Cross-reference table entries. | |
Implements the COS cross-reference table.
The cross-reference table maintains a link between an object index/generation and its position in the COS-file.
The paperback implementation of the PDF 1.4 specification does not re-use the index of a previously deleted object, hence the generation of new objects will always be zero (0).
| Art::Paperback::Carousel::cross_Reference::cross_Reference | ( | ) |
Constructor.
This constructor creates a new cross-reference table.
Object 0 will be automatically allocated.
|
default |
Constructor.
|
default |
Constructor.
|
noexcept |
Destructor.
| uint32_t Art::Paperback::Carousel::cross_Reference::size | ( | ) | const |
Get the size of the cross-reference table.
| Identity Art::Paperback::Carousel::cross_Reference::allocate | ( | ) |
Allocate a new object index.
| int64_t Art::Paperback::Carousel::cross_Reference::get_offset | ( | Identity | identity | ) | const |
Get the offset of a used entry.
| identity | The object identity for which to retrieve the offset. |
| void Art::Paperback::Carousel::cross_Reference::set_offset | ( | Identity | identity, |
| int64_t | offset ) |
Set the offset of a used entry.
| Internal_error | Thrown if the object is not allocated. |
| Identity Art::Paperback::Carousel::cross_Reference::next | ( | ) | const |
Get the next available object identity.
| void Art::Paperback::Carousel::cross_Reference::write | ( | Writer & | w, |
| bool | update ) |
Write the cross-reference to an output stream.
| w | The COS-file writer. |
| update | True if this is an update; false otherwise. |
| void Art::Paperback::Carousel::cross_Reference::clear_offsets | ( | ) |
Clears the offsets of used entries.
|
default |
Assignment.
|
default |
Assignment.
|
private |
Cross-reference table entries.