Class Index

Classes


Class PDFNet.NumberTree

PDFNet.NumberTree

Class Summary
Constructor Attributes Constructor Name and Description
 
A NumberTree is a common data structure in PDF.
Method Summary
Method Attributes Method Name and Description
 
copy()
Assignment operator
<static>  
PDFNet.NumberTree.create(number_tree)
Create a high level NumberTree wrapper around an existing SDF/Cos NumberTree.
 
erase(pos)
Removes the NumberTree entry pointed by the iterator.
 
eraseKey(key)
Removes the specified object from the tree.
 
Search for the specified key in the NumberTree.
 
 
 
getValue(key)
[Documentation Not Yet Added]
 
 
put(key, value)
Puts a new entry in the name tree.
Class Detail
PDFNet.NumberTree(id)
A NumberTree is a common data structure in PDF. See section 3.8.6 'Number Trees' in PDF Reference Manual for more details. A number tree serves a similar purpose to a dictionary - associating keys and values - but by different means. NumberTrees allow efficient storage of very large association collections (number/Obj* maps). A NumberTree can have many more entries than a SDF/Cos dictionary can. Sample code:
Parameters:
id
Method Detail
{NumberTree} copy()
Assignment operator
Returns:
{NumberTree} A promise that resolves to an object of type: "NumberTree" (generated documentation)

<static> {NumberTree} PDFNet.NumberTree.create(number_tree)
Create a high level NumberTree wrapper around an existing SDF/Cos NumberTree. This does not copy the object.
Parameters:
{Obj} number_tree
SDF/Cos root of the NumberTree object.
Returns:
{NumberTree} A promise that resolves to an object of type: "NumberTree" (generated documentation)

erase(pos)
Removes the NumberTree entry pointed by the iterator.
Parameters:
{DictIterator} pos
dictionary iterator object that points to the NumberTree entry to be removed

eraseKey(key)
Removes the specified object from the tree. Does nothing if no object with that number exists.
Parameters:
{number} key
A number representing the key of the entry to be removed.

{DictIterator} getIterator(key)
Search for the specified key in the NumberTree.
Parameters:
{number} key
the number representing the key to be found. Sample code: NumberTreeIterator i = dests.Find(5); if (i.HasNext()) { cout << "Key: " << i.GetKey()->GetNumber() << endl; cout << "Value: " << i.GetValue()->GetType() << endl; }
Returns:
{DictIterator} A promise that resolves to if the key is present the function returns a NumberTreeIterator the points to the given Key/Value pair. If the key is not found the function returns End() (a non-valid) iterator.

{DictIterator} getIteratorBegin()
Returns:
{DictIterator} A promise that resolves to an iterator to the first key/value pair (i.e. NNTreeData) in the document. You can use the Next method on the returned iterator to traverse all entries stored under the NumberTree. Sample code: for (NumberTreeIterator i = dests.GetIterator(); i.HasNext(); i.Next()) cout << "Key: " << i.GetKey().GetNumber() << endl;

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to the object to the underlying SDF/Cos object. If the NumberTree.IsValid() returns false the SDF/Cos object is NULL.

{Obj} getValue(key)
[Documentation Not Yet Added]
Parameters:
{number} key
(generated documentation)
Returns:
{Obj} A promise that resolves to an object of type: "Obj" (generated documentation)

{boolean} isValid()
Returns:
{boolean} A promise that resolves to whether this is a valid (non-null) NumberTree. If the function returns false the underlying SDF/Cos object is null and the NumberTree object should be treated as null as well.

put(key, value)
Puts a new entry in the name tree. If an entry with this number is already in the tree, it is replaced.
Parameters:
{number} key
A number representing the key of the new entry.
{Obj} value
the value associated with the key. It can be any SDF::Obj.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:40 GMT-0700 (PDT)