A low level interface with operations to handle document name trees stored in the /Names element.
More...
#include <PdfNameTreeOperations.h>
|
virtual void | AddValue (PdfKnownNameTree tree, const PdfString &key, const PdfObject &value)=0 |
| Insert a key and value in one of the dictionaries of the name tree. More...
|
|
virtual void | AddValue (const PdfName &treeName, const PdfString &key, const PdfObject &value)=0 |
|
virtual const PdfObject * | GetValue (PdfKnownNameTree tree, const std::string_view &key) const =0 |
| Get the object referenced by a string key in one of the dictionaries of the name tree. More...
|
|
virtual const PdfObject * | GetValue (const std::string_view &treeName, const std::string_view &key) const =0 |
|
virtual PdfObject * | GetValue (PdfKnownNameTree tree, const std::string_view &key)=0 |
|
virtual PdfObject * | GetValue (const std::string_view &treeName, const std::string_view &key)=0 |
|
virtual bool | HasKey (PdfKnownNameTree tree, const std::string_view &key) const =0 |
| Tests whether a certain nametree has a value. More...
|
|
virtual bool | HasKey (const std::string_view &treeName, const std::string_view &key) const =0 |
|
virtual void | ToDictionary (PdfKnownNameTree tree, PdfStringMap< PdfObject > &dict, bool skipClear=false) const =0 |
| Adds all keys and values from a name tree to a dictionary. More...
|
|
virtual void | ToDictionary (const std::string_view &treeName, PdfStringMap< PdfObject > &dict, bool skipClear=false) const =0 |
|
A low level interface with operations to handle document name trees stored in the /Names element.
◆ AddValue()
virtual void PoDoFo::PdfNameTreeOperations::AddValue |
( |
PdfKnownNameTree |
tree, |
|
|
const PdfString & |
key, |
|
|
const PdfObject & |
value |
|
) |
| |
|
pure virtual |
Insert a key and value in one of the dictionaries of the name tree.
- Parameters
-
tree | name of the tree to search for the key. |
key | the key to insert. If it exists, it will be overwritten. |
value | the value to insert. |
◆ GetValue()
virtual const PdfObject* PoDoFo::PdfNameTreeOperations::GetValue |
( |
PdfKnownNameTree |
tree, |
|
|
const std::string_view & |
key |
|
) |
| const |
|
pure virtual |
Get the object referenced by a string key in one of the dictionaries of the name tree.
- Parameters
-
tree | name of the tree to search for the key. |
key | the key to search for |
- Returns
- the value of the key or nullptr if the key was not found. if the value is a reference, the object referenced by this reference is returned.
Implemented in PoDoFo::PdfNameTrees.
◆ HasKey()
virtual bool PoDoFo::PdfNameTreeOperations::HasKey |
( |
PdfKnownNameTree |
tree, |
|
|
const std::string_view & |
key |
|
) |
| const |
|
pure virtual |
Tests whether a certain nametree has a value.
It is generally faster to use GetValue and check for nullptr as return value.
- Parameters
-
tree | name of the tree to search for the key. |
key | name of the key to look for |
- Returns
- true if the dictionary has such a key.
Implemented in PoDoFo::PdfNameTrees.
◆ ToDictionary()
virtual void PoDoFo::PdfNameTreeOperations::ToDictionary |
( |
PdfKnownNameTree |
tree, |
|
|
PdfStringMap< PdfObject > & |
dict, |
|
|
bool |
skipClear = false |
|
) |
| const |
|
pure virtual |
Adds all keys and values from a name tree to a dictionary.
Removes all keys that have been previously in the dictionary.
- Parameters
-
tree | the name of the tree to convert into a dictionary |
dict | add all keys and values to this dictionary |
skipClear | skip clearing the output dictionary |
Implemented in PoDoFo::PdfNameTrees.
The documentation for this class was generated from the following files: