#include <PdfVariant.h>
Inheritance diagram for PoDoFo::PdfVariant:
Public Member Functions | |
PdfVariant () | |
PdfVariant (bool b) | |
PdfVariant (pdf_int64 l) | |
PdfVariant (double d) | |
PdfVariant (const PdfString &rsString) | |
PdfVariant (const PdfName &rName) | |
PdfVariant (const PdfReference &rRef) | |
PdfVariant (const PdfArray &tList) | |
PdfVariant (const PdfDictionary &rDict) | |
PdfVariant (const PdfData &rData) | |
PdfVariant (const PdfVariant &rhs) | |
bool | IsEmpty () const |
void | Clear () |
EPdfDataType | GetDataType () const |
const char * | GetDataTypeString () const |
bool | IsBool () const |
bool | IsNumber () const |
bool | IsReal () const |
bool | IsString () const |
bool | IsHexString () const |
bool | IsName () const |
bool | IsArray () const |
bool | IsDictionary () const |
bool | IsRawData () const |
bool | IsNull () const |
bool | IsReference () const |
void | Write (PdfOutputDevice *pDevice, EPdfWriteMode eWriteMode, const PdfEncrypt *pEncrypt=NULL) const |
virtual void | Write (PdfOutputDevice *pDevice, EPdfWriteMode eWriteMode, const PdfEncrypt *pEncrypt, const PdfName &keyStop) const |
void | ToString (std::string &rsData, EPdfWriteMode eWriteMode=ePdfWriteMode_Clean) const |
void | SetBool (bool b) |
bool | GetBool () const |
void | SetNumber (long l) |
pdf_int64 | GetNumber () const |
void | SetReal (double d) |
double | GetReal () const |
const PdfString & | GetString () const |
const PdfName & | GetName () const |
const PdfArray & | GetArray () const |
PdfArray & | GetArray () |
const PdfDictionary & | GetDictionary () const |
PdfDictionary & | GetDictionary () |
const PdfReference & | GetReference () const |
const PdfData & | GetRawData () const |
PdfData & | GetRawData () |
const PdfVariant & | operator= (const PdfVariant &rhs) |
bool | operator== (const PdfVariant &rhs) const |
bool | operator!= (const PdfVariant &rhs) const |
bool | IsDirty () const |
void | SetImmutable (bool bImmutable) |
bool | GetImmutable () const |
Protected Member Functions | |
void | AssertMutable () const |
void | SetDirty (bool bDirty) |
void | DelayedLoad () const |
void | EnableDelayedLoading () |
virtual void | DelayedLoadImpl () |
PODOFO_NOTHROW bool | DelayedLoadDone () const |
const PdfDictionary & | GetDictionary_NoDL () const |
PdfDictionary & | GetDictionary_NoDL () |
const PdfArray & | GetArray_NoDL () const |
PdfArray & | GetArray_NoDL () |
|
Construct an empty variant type IsNull() will return true. |
|
Construct a PdfVariant that is a bool.
|
|
Construct a PdfVariant that is a number.
|
|
Construct a PdfVariant that is a real number.
|
|
Construct a PdfVariant that is a string. The argument string will be escaped where necessary, so it should be passed in unescaped form.
|
|
Construct a PdfVariant that is a name.
|
|
Construct a PdfVariant that is a name.
|
|
Initalize a PdfVariant object with array data. The variant will automatically get the datatype ePdfDataType_Array. This Init call is the fastest way to create a new PdfVariant that is an array.
|
|
Construct a PdfVariant that is a dictionary.
|
|
Construct a PdfVariant that contains raw PDF data.
|
|
Constructs a new PdfVariant which has the same contents as rhs.
|
|
Will throw an exception if called on an immutable object, so this should be called before actually changing a value! |
|
Clear all internal member variables and free the memory they have allocated. Sets the datatype to ePdfDataType_Null This will reset the dirty flag of this object to be clean.
|
|
Dynamically load the contents of this object from a PDF file by calling the virtual method DelayedLoadImpl() if the object is not already loaded. For objects complete created in memory and those that do not support deferred loading this function does nothing, since deferred loading will not be enabled. |
|
Returns true if delayed loading is disabled, or if it is enabled and loading has completed. External callers should never need to see this, it's an internal state flag only. |
|
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 in PoDoFo::PdfParserObject. |
|
Flag the object incompletely loaded. DelayedLoad() will be called when any method that requires more information than is currently available is loaded. All constructors initialize a PdfVariant with delayed loading disabled . If you want delayed loading you must ask for it. If you do so, call this method early in your ctor and be sure to override DelayedLoadImpl(). |
|
Returns the value of the object as array
|
|
Returns the value of the object as array
|
|
Version of GetArray() that doesn't trigger a delayed load.
|
|
Version of GetArray() that doesn't trigger a delayed load
|
|
Get the value if this object is a bool.
|
|
|
|
|
|
Returns the dictionary value of this object
|
|
Returns the dictionary value of this object
|
|
Version of GetDictionary() that doesn't trigger a delayed load
|
|
Version of GetDictionary() that doesn't trigger a delayed load
|
|
Retrieve if an object is immutable. This is used by PdfImmediateWriter and PdfStreamedDocument so that no keys can be added to an object after setting stream data on it.
|
|
|
|
Get the value of the object as long.
|
|
Get the reference values of this object.
|
|
Get the reference values of this object.
|
|
Get the value of the object as double.
|
|
Get the reference values of this object.
|
|
|
|
|
|
|
|
|
|
The dirty flag is set if this variant has been modified after construction. Usually the dirty flag is also set if you call any non-const member function (e.g. GetDictionary()) as PdfVariant cannot determine if you actually changed the dictionary or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assign the values of another PdfVariant to this one.
|
|
Test to see if the value contained by this variant is the same as the value of the other variant. |
|
Set the value of this object as bool
|
|
Sets the dirty flag of this PdfVariant
|
|
Sets this object to immutable, so that no keys can be edited or changed.
|
|
Set the value of this object as long
|
|
Set the value of this object as double
|
|
Converts the current object into a string representation which can be written directly to a PDF file on disc.
|
|
Write the complete variant to an output device.
|
|
Write the complete variant to an output device. This is an overloaded member function.
|