DL Logo

ASAtom Definitions

ASAtomNull

Header: CoreExpT.h:144

Syntax

#define ASAtomNull ASMAXUns32

ASAtomNull

Header: CoreExpT.h:147

Syntax

#define ASAtomNull ASMAXUns16

ASAtom Typedefs

ASAtom

Header: CoreExpT.h:143

Syntax

typedef ASUns32 ASAtom;

ASAtom

Header: CoreExpT.h:146

Syntax

typedef ASUns16 ASAtom;

Returned From

Used By

Used In

ASAtom Functions

ASAtomExistsForString

Header: CorProcs.h:130

Description

Tests whether an ASAtom exists for the specified string.

Related Methods

ASAtomGetCount (Only available with PDF Library SDK)

Syntax

ASBool ASAtomExistsForString(const char *nameStr, ASAtom *atom);

Parameters

nameStr
The string to test.
atom
(Filled by the method, may be NULL) If the ASAtom corresponding to nameStr already exists, it is returned in atom. Pass NULL to simply check whether the ASAtom already exists.

Returns

true if an ASAtom already exists for nameStr, false otherwise.

ASAtomFromString

Header: CorProcs.h:114

Description

Gets the ASAtom for the specified string. You can also use this method to create an ASAtom, since it creates one for the string if one does not already exist.

If an ASAtom already exists for nameStr, the existing ASAtom is returned. Thus, ASAtom objects may be compared for equality of the underlying string.

Because ASAtom objects cannot be deleted, they are useful for strings that are used many times in an Acrobat viewer session, but are not recommended for strings that have a short lifetime. For the same reason, it is not a good idea to create large numbers of ASAtom objects.

Related Methods

ASAtomGetCount (Only available with the PDF Library SDK)

Syntax

ASAtom ASAtomFromString(const char *nameStr);

Parameters

nameStr
The string for which an ASAtom is created.

Returns

The ASAtom corresponding to nameStr.

ASAtomGetString

Header: CorProcs.h:142

Description

Gets the string associated with the specified ASAtom.

Syntax

const char *ASAtomGetString(ASAtom atm);

Parameters

atm
The ASAtom whose string is obtained.

Returns

The string corresponding to atom. It returns an empty string if atom == ASAtomNull, or NULL if the atom has not been defined.