NameTree Class Documentation

classNameTree

Namespace:datalogics_interface

Detailed Description

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

Uses types

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()

Member Function Documentation

get_pdf_dict

PDFDictget_pdf_dict()

Returns:

The PDFDict representing the NameTree's data structure.

Gets the underlying PDFDict of this NameTree.

put

voidput(const std::string &key, ViewDestination &dest)

Parameters

key: const std::string &

Returns:

void

Convenience 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

voidput(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:

void

Puts a new entry in this NameTree. If an entry with this name is already in the tree, it is replaced.

remove

voidremove(PDFString &key)

Parameters

key: PDFString &

- The name of the PDFObject to remove from the tree.

Returns:

void

Removes the specified PDFObject from this NameTree. It does nothing if no PDFObject of that name exists in this NameTree.