PoDoFo 0.9.20
|
#include <PdfParserObject.h>
Public Member Functions | |
PdfParserObject (InputStreamDevice &device, ssize_t offset=-1) | |
void | FreeObjectMemory (bool force=false) |
bool | HasStreamToParse () const |
ssize_t | GetOffset () const |
![]() | |
PdfObject () | |
PdfObject (const PdfVariant &var) | |
PdfObject (bool b) | |
PdfObject (int64_t l) | |
PdfObject (double d) | |
PdfObject (const PdfString &str) | |
PdfObject (const PdfName &name) | |
PdfObject (const PdfReference &ref) | |
PdfObject (const PdfArray &arr) | |
PdfObject (const PdfDictionary &dict) | |
PdfObject (const PdfObject &rhs) | |
PdfDataType | GetDataType () const |
const char * | GetDataTypeString () const |
bool | IsBool () const |
bool | IsNumber () const |
bool | IsRealStrict () const |
bool | IsNumberOrReal () const |
bool | IsString () const |
bool | IsName () const |
bool | IsArray () const |
bool | IsDictionary () const |
bool | IsRawData () const |
bool | IsNull () const |
bool | IsReference () const |
std::string | ToString () const |
bool | GetBool () const |
int64_t | GetNumberLenient () const |
int64_t | GetNumber () const |
double | GetReal () const |
double | GetRealStrict () const |
const PdfString & | GetString () const |
const PdfName & | GetName () const |
PdfReference | GetReference () const |
const PdfArray & | GetArray () const |
const PdfDictionary & | GetDictionary () const |
void | SetBool (bool b) |
void | SetNumber (int64_t l) |
void | SetReal (double d) |
void | SetName (const PdfName &name) |
void | SetString (const PdfString &str) |
void | Write (OutputStream &stream, PdfWriteFlags writeMode, const PdfEncrypt *encrypt, charbuff &buffer) const |
PdfObjectStream & | GetOrCreateStream () |
const PdfObjectStream & | MustGetStream () const |
PdfObjectStream & | MustGetStream () |
bool | HasStream () const |
bool | operator< (const PdfObject &rhs) const |
bool | operator== (const PdfObject &rhs) const |
bool | operator!= (const PdfObject &rhs) const |
bool | operator== (const PdfVariant &rhs) const |
bool | operator!= (const PdfVariant &rhs) const |
PdfObject & | operator= (const PdfObject &rhs) |
bool | IsDirty () const |
PdfDocument * | GetDocument () const |
PdfDocument & | MustGetDocument () const |
const PdfReference & | GetIndirectReference () const |
bool | IsDelayedLoadDone () const |
Protected Member Functions | |
void | DelayedLoadImpl () override |
![]() | |
void | DelayedLoad () const |
void | SetDirty () |
void | SetDocument (PdfDocument *document) |
void | EnableDelayedLoading () |
A PdfParserObject constructs a PdfObject from a PDF file. Parsing starts always at the current file position.
PdfParserObject::PdfParserObject | ( | InputStreamDevice & | device, |
ssize_t | offset = -1 |
||
) |
|
overrideprotectedvirtual |
Load all data of the object if delayed loading is enabled.
Never call this method directly; use DelayedLoad() instead.
You should override this to control deferred loading in your subclass. Note that this method should not load any associated streams, just the base object.
The default implementation throws. It should never be called, since objects that do not support delayed loading should not enable it.
While this method is not ‘const’ it may be called from a const context, so be careful what you mess with.
Reimplemented from PoDoFo::PdfObject.
Reimplemented in PoDoFo::PdfXRefStreamParserObject.
void PdfParserObject::FreeObjectMemory | ( | bool | force = false | ) |
Tries to free all memory allocated by this PdfObject (variables and streams) and reads it from disk again if it is requested another time.
This will only work if load on demand is used. If the object is dirty if will not be free'd.
force | if true the object will be free'd even if IsDirty() returns true. So you will loose any changes made to this object. |
|
inline |
Gets an offset in which the object beginning is stored in the file. Note the offset points just after the object identificator ("0 0 obj").
|
inline |
Returns if this object has a stream object appended. which has to be parsed.