NameTree Class Documentation
class NameTreeNamespace:datalogics_interface
Detailed Description
The name tree is a common data structure in PDF files.
A name tree is a type of dictionary that can store many more pairs of matched records than a standard object dictionary.
A name tree uses keys that are character strings to map to data objects. The strings can use a standard coding format, such as Unicode, are sorted in order in the data structure, and can be associated with any type of object.
Referenced by
Constructor & Destructor Documentation
NameTree
NameTree(Document & doc)Parameters
doc: Document &The Document in which to create the NameTree.
Creates a new, empty NameTree in the specified Document.
NameTree
NameTree(NameTree && )Parameters
~NameTree
~NameTree()Member Function Documentation
get
std::unique_ptr< PDFObject > get(PDFString & key)Parameters
key: PDFString &- The name of the PDFObject to get from the tree.
Returns:
std::unique_ptr< PDFObject >- The PDFObject value corresponding to the supplied key
Retrieves an entry from this NameTree.
get_pdf_dict
PDFDict get_pdf_dict()Returns:
PDFDictThe PDFDict representing the NameTree's data structure.
Gets the underlying PDFDict of this NameTree.
operator=
NameTree & operator=(NameTree && )Parameters
Returns:
NameTree &put
void put(const std::string & key, ViewDestination & dest)Parameters
key: const std::string &dest: ViewDestination &
Returns:
voidConvenience overload: put a ViewDestination into the name tree under the given string key. Encodes the destination as its PDF array representation. Equivalent to building a PDFString key and calling put() with the destination's underlying array.
put
void put(PDFString & key, PDFObject & value)Parameters
key: PDFString &- The name of the PDFObject to put in the tree.
value: PDFObject &- The PDFObject to be associated with key.
Returns:
voidPuts a new entry in this NameTree. If an entry with this name is already in the tree, it is replaced.
remove
void remove(PDFString & key)Parameters
key: PDFString &- The name of the PDFObject to remove from the tree.
Returns:
voidRemoves the specified PDFObject from this NameTree. It does nothing if no PDFObject of that name exists in this NameTree.