Interface to access names trees in the document.
More...
#include <PdfNameTrees.h>
|
template<typename TNameTree > |
TNameTree * | GetTree () |
|
template<typename TNameTree > |
const TNameTree * | GetTree () const |
|
template<typename TNameTree > |
TNameTree & | MustGetTree () |
|
template<typename TNameTree > |
const TNameTree & | MustGetTree () const |
|
template<typename TNameTree > |
TNameTree & | GetOrCreateTree () |
|
const PdfObject * | GetValue (PdfKnownNameTree tree, const std::string_view &key) const override |
| Get the object referenced by a string key in one of the dictionaries of the name tree. More...
|
|
PdfObject * | GetValue (PdfKnownNameTree tree, const std::string_view &key) override |
|
bool | HasKey (PdfKnownNameTree tree, const std::string_view &key) const override |
| Tests whether a certain nametree has a value. More...
|
|
void | ToDictionary (PdfKnownNameTree tree, PdfStringMap< PdfObject > &dict, bool skipClear=false) const override |
| Adds all keys and values from a name tree to a dictionary. More...
|
|
Interface to access names trees in the document.
◆ GetValue()
const PdfObject* PoDoFo::PdfNameTrees::GetValue |
( |
PdfKnownNameTree |
tree, |
|
|
const std::string_view & |
key |
|
) |
| const |
|
overridevirtual |
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.
Implements PoDoFo::PdfNameTreeOperations.
◆ HasKey()
bool PoDoFo::PdfNameTrees::HasKey |
( |
PdfKnownNameTree |
tree, |
|
|
const std::string_view & |
key |
|
) |
| const |
|
overridevirtual |
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.
Implements PoDoFo::PdfNameTreeOperations.
◆ ToDictionary()
void PdfNameTrees::ToDictionary |
( |
PdfKnownNameTree |
tree, |
|
|
PdfStringMap< PdfObject > & |
dict, |
|
|
bool |
skipClear = false |
|
) |
| const |
|
overridevirtual |
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 |
Implements PoDoFo::PdfNameTreeOperations.
The documentation for this class was generated from the following files: