DL Logo

PDNumTree Typedefs

PDNumTree

Header: PDExpT.h:5531

Description

An object that points to the root node of a number tree inside a PDF file. A number tree is used to map integers to arbitrary Cos objects just as a Cos dictionary is used to map Cos names to Cos objects. However, a number tree can have many more entries than a Cos dictionary can.

Syntax

typedef OPAQUE_64_BITS PDNumTree;

Returned From

Used By

PDNumTree Functions

PDNumTreeEnum

Header: PDProcs.h:7811

Description

Enumerates the entries in the tree.

Related Methods

PDNumTreeGet PDNumTreePut

Syntax

void PDNumTreeEnum(PDNumTree theTree, CosObjEnumProc proc, void *clientData);

Parameters

theTree
IN/OUT A number tree.
proc
IN/OUT A procedure to call once for each number destination pair in theTree.
clientData
IN/OUT Data used by the enumeration procedure. clientData is passed to the enumeration procedure proc each time a number tree is encountered.

PDNumTreeEqual

Header: PDProcs.h:7752

Description

Compares two number trees to determine if they are the same object.

Related Methods

Syntax

ASBool PDNumTreeEqual(PDNumTree tree1, PDNumTree tree2);

Parameters

tree1
A number tree.
tree2
Another number tree.

Returns

true if the two number trees are equivalent, false otherwise.

PDNumTreeFromCosObj

Header: PDProcs.h:7717

Description

Creates a type cast of the CosObj to a number tree.

Syntax

PDNumTree PDNumTreeFromCosObj(CosObj obj);

Parameters

obj
IN/OUT The CosObj for which a PDNumTree representation is desired.

Returns

A PDNumTree representation of obj.

PDNumTreeGet

Header: PDProcs.h:7781

Description

Retrieves an object from the number tree.

Syntax

ASBool PDNumTreeGet(PDNumTree theTree, ASInt32 key, CosObj *value);

Parameters

theTree
The PDNumTree requested.
key
The number of the entry to retrieve.
value
(Filled by the method) The value associated with key.

Returns

true if the object was retrieved, false if no object with this number exists.

PDNumTreeGetCosObj

Header: PDProcs.h:7729

Description

Creates a type cast of the number tree to a CosObj.

Syntax

CosObj PDNumTreeGetCosObj(PDNumTree theTree);

Parameters

theTree
IN/OUT The PDNumTree for which a CosObj representation is desired.

Returns

A CosObj representation of theTree.

PDNumTreeIsValid

Header: PDProcs.h:7740

Description

Validates whether a PDNumTree is a CosDict Cos object.

Related Methods

Syntax

ASBool PDNumTreeIsValid(PDNumTree theTree);

Parameters

theTree
The PDNumTree whose validity is desired.

Returns

true if the number tree is a CosDict, false otherwise.

PDNumTreeNew

Header: PDProcs.h:7705

Description

Creates a new number tree in the document.

Syntax

PDNumTree PDNumTreeNew(PDDoc pdDoc);

Parameters

pdDoc
The document for which a new number tree is desired.

Returns

The newly created number tree, or a NULL CosObj if Acrobat is unable to create a PDNumTree for the document specified by pdDoc.

PDNumTreeIsValid() should be called to determine if the number tree returned by PDNumTreeNew() is usable.

PDNumTreePut

Header: PDProcs.h:7767

Description

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

Syntax

void PDNumTreePut(PDNumTree theTree, ASInt32 key, CosObj value);

Parameters

theTree
IN/OUT The number tree for which a new entry is added
key
IN/OUT The number of the entry.
value
IN/OUT The value associated with key.

PDNumTreeRemove

Header: PDProcs.h:7795

Description

Removes the specified object from the tree. It does nothing if no object with that number exists.

Related Methods

PDNumTreeGet PDNumTreePut

Syntax

void PDNumTreeRemove(PDNumTree theTree, ASInt32 key);

Parameters

theTree
IN/OUT The number tree from which an entry is removed.
key
IN/OUT The number of the entry to remove.