Ipelib
|
#include <ipepdfparser.h>
Inherits ipe::PdfObj.
Public Member Functions | |
PdfDict () | |
~PdfDict () | |
virtual const PdfDict * | dict () const noexcept |
String | dictRepr () const noexcept |
void | dictWrite (Stream &stream, const PdfRenumber *renumber, bool inflate, int length) const noexcept |
virtual void | write (Stream &stream, const PdfRenumber *renumber, bool inflate) const noexcept |
void | setStream (const Buffer &stream) |
void | add (String key, const PdfObj *obj) |
const PdfObj * | get (String key, const PdfFile *file=nullptr) const noexcept |
const PdfDict * | getDict (String key, const PdfFile *file=nullptr) const noexcept |
const PdfArray * | getArray (String key, const PdfFile *file=nullptr) const noexcept |
String | getName (String key, const PdfFile *file=nullptr) const noexcept |
bool | getNumber (String key, double &val, const PdfFile *file=nullptr) const noexcept |
int | getInteger (String key, const PdfFile *file=nullptr) const noexcept |
bool | getNumberArray (String key, const PdfFile *file, std::vector< double > &vals) const noexcept |
int | count () const noexcept |
String | key (int index) const noexcept |
const PdfObj * | value (int index) const noexcept |
Buffer | stream () const noexcept |
bool | deflated () const noexcept |
Buffer | inflate () const noexcept |
void | setLateStream (int pos) noexcept |
int | lateStream () const noexcept |
Public Member Functions inherited from ipe::PdfObj | |
virtual | ~PdfObj ()=0 |
virtual const PdfNull * | null () const noexcept |
virtual const PdfBool * | boolean () const noexcept |
virtual const PdfNumber * | number () const noexcept |
virtual const PdfString * | string () const noexcept |
virtual const PdfName * | name () const noexcept |
virtual const PdfRef * | ref () const noexcept |
virtual const PdfArray * | array () const noexcept |
String | repr () const noexcept |
The PDF dictionary and stream objects.
A dictionary may or may not have attached stream data.
PdfDict::~PdfDict | ( | ) |
|
virtualnoexcept |
|
noexcept |
Return PDF representation of the PdfDict without the stream.
References dictWrite().
|
noexcept |
References stream().
Referenced by dictRepr(), and write().
|
virtualnoexcept |
Implements ipe::PdfObj.
References dictWrite(), inflate(), ipe::Buffer::size(), and stream().
void PdfDict::setStream | ( | const Buffer & | stream | ) |
Add stream data to this dictionary.
References stream().
Look up key in dictionary.
Indirect objects (references) are looked up if file is not nullptr, and the object referred to is returned. Returns nullptr if key is not in dictionary.
References key().
Referenced by ipe::PdfResources::collect(), deflated(), getArray(), getDict(), getName(), getNumber(), getNumberArray(), ipe::Latex::readPdf(), and ipe::PdfThumbnail::render().
Look up key and return if it is a dictionary.
References ipe::PdfObj::dict(), get(), key(), and PdfDict().
Look up key and return if it is an array.
References ipe::PdfObj::array(), get(), and key().
Look up key and return its value if it is a /Name, otherwise return empty string.
References get(), key(), ipe::PdfObj::name(), and ipe::PdfName::value().
Retrieve a single number and stor in val.
References get(), key(), ipe::PdfObj::number(), and ipe::PdfNumber::value().
Referenced by getInteger().
|
noexcept |
Retrieve an array of numbers and store in vals.
References ipe::PdfObj::array(), count(), get(), key(), ipe::PdfObj::number(), ipe::PdfArray::obj(), and ipe::PdfNumber::value().
Referenced by ipe::PdfFile::mediaBox().
|
inlinenoexcept |
References count().
Referenced by ipe::PdfResources::collect(), count(), getNumberArray(), and ipe::Latex::readPdf().
|
inlinenoexcept |
Referenced by add(), ipe::PdfResources::collect(), get(), getArray(), getDict(), getInteger(), getName(), getNumber(), getNumberArray(), and ipe::Latex::readPdf().
|
inlinenoexcept |
Referenced by ipe::PdfResources::collect(), and ipe::Latex::readPdf().
|
inlinenoexcept |
Referenced by dictWrite(), setStream(), and write().
|
noexcept |
Is this stream compressed with flate compression?
References ipe::PdfObj::array(), ipe::PdfArray::count(), get(), ipe::PdfObj::name(), ipe::PdfArray::obj(), and ipe::PdfName::value().
Referenced by inflate().
|
noexcept |
Return the (uncompressed) stream data.
This only handles the /Flate compression.
References ipe::String::data(), deflated(), ipe::InflateSource::getChar(), and ipe::String::size().
Referenced by write().
|
inlinenoexcept |
References setLateStream().
Referenced by setLateStream().
|
inlinenoexcept |
Referenced by ipe::PdfParser::getObjectDef().