|
libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
|
Represents a COS-format file. More...
#include <art/paperback/carousel/file.hxx>
Classes | |
| struct | Create_new |
| struct | Internal |
| COS-file internals. More... | |
| struct | Revision |
| Represents a COS-file revision. More... | |
Public Member Functions | |
| File (Create_new const &, iostream &, int, int, string) | |
| Constructor. | |
| ~File () noexcept | |
| Destructor. | |
| Dictionary & | catalog () |
| Access the COS-file catalog dictionary object. | |
| Dictionary & | info () |
| Access the COS-file info dictionary object. | |
| template<typename T, typename... Args> | |
| Object | create_object (Args &&... args) |
| Create a new object. | |
| void | commit_revision () |
| Commit the current COS-file revision to the output stream. | |
Static Public Attributes | |
| static constexpr Create_new | create_new {} |
| Dispatch-tag for creating a new COS-file. | |
Private Member Functions | |
| Object_model::Container_base & | get_container (Identity const &) |
| Get container. | |
| Object_model::Container_base const & | get_container (Identity const &) const |
| Get container. | |
| File (File const &)=delete | |
| File (File &&)=delete | |
| File & | operator= (File const &)=delete |
| File & | operator= (File &&)=delete |
| Identity | allocate () |
| Allocates a new index. | |
| void | insert (Identity const &, shared_ptr< Object_model::Container_base >) |
| Inserts an object into the cross-reference table. | |
Private Attributes | |
| unique_ptr< Internal > | internal |
Represents a COS-format file.
Object generations are not used for new files in the paperback implementation of the COS file format.
Newly allocated objects are always assigned the next available object index with a generation of 0.
Note though that paperback io support _enerations when opening an existing PDF file. That is, the index and generation will be used when looking up an object reference.
| Art::Paperback::Carousel::File::File | ( | Create_new const & | , |
| iostream & | ios, | ||
| int | major, | ||
| int | minor, | ||
| string | header ) |
Constructor.
Creates a new COS-file.
The parameters major and minor correspond to the version of the PDF-document which the file represents.
| ios | The io stream for this COS-file. |
| major | The major version of the document. |
| minor | The minor version of the document. |
| header | The COS-file header, e.g. PDF-1.4. |
|
noexcept |
Destructor.
This destructor will automatically commit the current revision, but any exceptions thrown during write will be ignored.
| Dictionary & Art::Paperback::Carousel::File::catalog | ( | ) |
Access the COS-file catalog dictionary object.
| Dictionary & Art::Paperback::Carousel::File::info | ( | ) |
Access the COS-file info dictionary object.
|
inline |
Create a new object.
| void Art::Paperback::Carousel::File::commit_revision | ( | ) |
Commit the current COS-file revision to the output stream.
Calling this function will write all objects in the current revision to the output stream.
A new revision will be created automatically.
All modified objects will be marked as clean.
|
private |
Get container.
|
private |
Get container.
|
private |
Allocates a new index.
|
private |
Inserts an object into the cross-reference table.
| identity | The identity of the object. |
| container | The container of the object. |
|
staticconstexpr |
Dispatch-tag for creating a new COS-file.