DL Logo

PDEObject Typedefs

PDEObject

Header: PEExpT.h:108

Description

The abstract super class of the PDFEdit classes. You can find the type of any object with the PDEObjectGetType() method. You can then cast and apply that class' methods to the object. In addition, you can cast any of the PDFEdit objects to a PDEObject and use it anywhere a PDEObject is called for, such as in the PDEObject methods.

Syntax

typedef struct _t_PDEObject *PDEObject;

Used By

Used In

PDEObject Functions

PDEAcquire

Header: PERProcs.h:1233

Description

Increments the reference count for an object.

Related Methods

Syntax

void PDEAcquire(IN PDEObject obj);

Parameters

obj
IN/OUT The element whose count is incremented.

Exceptions

PDEAddTag

Header: PEWProcs.h:1008

Description

Adds an identifier-value pair to an object.

The clientID-tag combination is a unique identifier for the value. Each client has its own identifier space. It is often convenient to use ASAtoms as tags.

Note: Tags are a purely memory-resident feature. In addition, management of tags is the responsibility of the client. A client must manage any memory pointed to by a tag. This method only contains a pointer to the data passed in by the client. The data and the pointer will not be saved to a file. The generic pointer type is not in the PDF specification.

Related Methods

PDEGetTag PDERemoveTag

Syntax

void PDEAddTag(IN PDEObject object, IN ExtensionID clientID, IN ASUns32 tag, IN void *value);

Parameters

object
The element to tag. The object may be a PDEElement, PDEContent, PDEFont, PDEColorSpace, and so on.
clientID
Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID. (A negative clientID is reserved for the implementation.)
tag
The tag to add to object. If tag is 0, this is the same as calling PDERemoveTag(). In other words, you cannot tell the difference between a tag whose value is zero and a tag that is nonexistent.
value
A pointer to a value to associate with object. Only the pointer is stored. If the pointer points to data, it is the responsibility of the client to manage the data and its memory.

Exceptions

PDEGetTag

Header: PEWProcs.h:1029

Description

Gets an object's value for a given clientID-tag identifier that was added by PDEAddTag.

Related Methods

PDEAddTag PDERemoveTag

Syntax

void *PDEGetTag(IN PDEObject object, IN ExtensionID clientID, IN ASUns32 tag);

Parameters

object
The element whose value is obtained.
clientID
Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID. (A negative clientID is reserved for the implementation.)
tag
The object's tag. If object has no tag, this is 0.

Returns

The value associated with the clientID-tag identifier.

Exceptions

PDEObjectGetType

Header: PERProcs.h:1219

Description

Gets the type of an element.

Syntax

ASInt32 PDEObjectGetType(IN PDEObject obj);

Parameters

obj
IN/OUT The element whose type is obtained.

Returns

The object type, which is one of PDEType.

Exceptions

PDERelease

Header: PERProcs.h:1254

Description

Decrements the reference count for the object. If the count becomes zero, the object is destroyed.

Do not call PDERelease() on PDEContent that you acquired with PDPageAcquirePDEContent(); call PDPageReleasePDEContent() instead.

Note: Objects should only be disposed of with PDERelease() if the method by which they were obtained incremented the reference count for the object. In general, methods that get an object do not increment the reference count. Methods that increment the reference count typically contain the word acquire or create in the method name and specifically state that you must release the object.

Related Methods

Syntax

void PDERelease(IN PDEObject obj);

Parameters

obj
IN/OUT The element released.

PDERemoveTag

Header: PEWProcs.h:1051

Description

Removes an object's value for a given clientID-tag identifier that was added by PDEAddTag.

If PDEAddTag is called with a 0 tag, this is the same as calling PDERemoveTag().

Related Methods

PDEAddTag PDEGetTag

Syntax

void PDERemoveTag(IN PDEObject object, IN ExtensionID clientID, IN ASUns32 tag);

Parameters

object
The element whose tag is removed.
clientID
Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID. (A negative clientID is reserved for the implementation.)
tag
The tag value.

Exceptions