Handling object reference streams

This commit is contained in:
Jakub Melka
2019-07-01 12:29:57 +02:00
parent 8c130ca013
commit 4d782af971
7 changed files with 383 additions and 20 deletions

View File

@ -49,14 +49,17 @@ public:
enum class EntryType
{
Free, ///< Entry represents a free item (no object)
Occupied ///< Entry represents a occupied item (object)
Free, ///< Entry represents a free item (no object)
Occupied, ///< Entry represents a occupied item (object)
InObjectStream ///< Entry in object stream
};
struct Entry
{
PDFObjectReference reference;
PDFObjectReference objectStream;
PDFInteger offset = -1;
PDFInteger indexInObjectStream = -1;
EntryType type = EntryType::Free;
};
@ -70,6 +73,9 @@ public:
/// Filters only occupied entries and returns them
std::vector<Entry> getOccupiedEntries() const;
/// Filters only object stream entries and returns them
std::vector<Entry> getObjectStreamEntries() const;
/// Returns size of the reference table
std::size_t getSize() const { return m_entries.size(); }