#include <PdfDictionary.h>
The PDF dictionary data type of PoDoFo (inherits from PdfDataType, the base class for such representations)
§ PdfDictionary() [1/2]
PoDoFo::PdfDictionary::PdfDictionary |
( |
| ) |
|
Create a new, empty dictionary
§ PdfDictionary() [2/2]
PoDoFo::PdfDictionary::PdfDictionary |
( |
const PdfDictionary & |
rhs | ) |
|
Deep copy a dictionary
- Parameters
-
§ ~PdfDictionary()
PoDoFo::PdfDictionary::~PdfDictionary |
( |
| ) |
|
|
virtual |
§ AddKey() [1/2]
void PoDoFo::PdfDictionary::AddKey |
( |
const PdfName & |
identifier, |
|
|
const PdfObject & |
rObject |
|
) |
| |
Add a key to the dictionary. If an existing key of this name exists, its value is replaced and the old value object will be deleted. The passed object is copied.
- Parameters
-
identifier | the key is identified by this name in the dictionary |
rObject | a variant object containing the data. The object is copied. |
This will set the dirty flag of this object.
- See also
- IsDirty
§ AddKey() [2/2]
void PoDoFo::PdfDictionary::AddKey |
( |
const PdfName & |
identifier, |
|
|
const PdfObject * |
pObject |
|
) |
| |
Add a key to the dictionary. If an existing key of this name exists, its value is replaced and the old value object will be deleted. The passed object is copied.
This is an overloaded member function.
- Parameters
-
identifier | the key is identified by this name in the dictionary |
rObject | a variant object containing the data. The object is copied. |
This will set the dirty flag of this object.
- See also
- IsDirty
§ Clear()
void PoDoFo::PdfDictionary::Clear |
( |
| ) |
|
Removes all keys from the dictionary
§ GetKey() [1/2]
Get the keys value out of the dictionary.
The returned value is a pointer to the internal object in the dictionary so it MUST not be deleted.
- Parameters
-
key | look for the key names pszKey in the dictionary |
- Returns
- pointer to the found value or 0 if the key was not found.
§ GetKey() [2/2]
Get the keys value out of the dictionary. This is an overloaded member function.
The returned value is a pointer to the internal object in the dictionary. It may be modified but is still owned by the dictionary so it MUST not be deleted.
- Parameters
-
key | look for the key named key in the dictionary |
- Returns
- the found value or 0 if the key was not found.
§ GetKeys() [1/2]
const TKeyMap & PoDoFo::PdfDictionary::GetKeys |
( |
| ) |
const |
|
inline |
Get access to the internal map of keys.
- Returns
- all keys of this dictionary
§ GetKeys() [2/2]
TKeyMap & PoDoFo::PdfDictionary::GetKeys |
( |
| ) |
|
|
inline |
Get access to the internal map of keys.
- Returns
- all keys of this dictionary
§ HasKey()
bool PoDoFo::PdfDictionary::HasKey |
( |
const PdfName & |
key | ) |
const |
Allows to check if a dictionary contains a certain key.
- Parameters
-
key | look for the key named key.Name() in the dictionary |
- Returns
- true if the key is part of the dictionary, otherwise false.
§ IsDirty()
bool PoDoFo::PdfDictionary::IsDirty |
( |
| ) |
const |
|
virtual |
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 as we cannot determine if you actually changed something or not.
- Returns
- true if the value is dirty and has been modified since construction
Reimplemented from PoDoFo::PdfDataType.
§ operator!=()
bool PoDoFo::PdfDictionary::operator!= |
( |
const PdfDictionary & |
rhs | ) |
const |
|
inline |
§ operator=()
Asignment operator. Asign another PdfDictionary to this dictionary. This is a deep copy; all elements of the source dictionary are duplicated.
- Parameters
-
- Returns
- this PdfDictionary
This will set the dirty flag of this object.
- See also
- IsDirty
§ operator==()
bool PoDoFo::PdfDictionary::operator== |
( |
const PdfDictionary & |
rhs | ) |
const |
Comparison operator. If this dictionary contains all the same keys as the other dictionary, and for each key the values compare equal, the dictionaries are considered equal.
§ RemoveKey()
bool PoDoFo::PdfDictionary::RemoveKey |
( |
const PdfName & |
identifier | ) |
|
Remove a key from this dictionary. If the key does not exists, this function does nothing.
- Parameters
-
identifier | the name of the key to delete |
- Returns
- true if the key was found in the object and was removed if there was is no key with this name, false is returned.
This will set the dirty flag of this object.
- See also
- IsDirty
§ SetDirty()
void PoDoFo::PdfDictionary::SetDirty |
( |
bool |
bDirty | ) |
|
|
virtual |
§ Write() [1/2]
Write the complete dictionary to a file.
- Parameters
-
pDevice | write the object to this device |
eWriteMode | additional options for writing this object |
pEncrypt | an encryption object which is used to encrypt this object or NULL to not encrypt this object |
Implements PoDoFo::PdfDataType.
§ Write() [2/2]
Write the complete dictionary to a file.
- Parameters
-
pDevice | write the object to this device |
eWriteMode | additional options for writing this object |
pEncrypt | an encryption object which is used to encrypt this object or NULL to not encrypt this object |
keyStop | if not KeyNull and a key == keyStop is found writing will stop right before this key! |