LayerAS_Layer
ObjectASAtom

ASAtom objects are hashed tokens that Acrobat uses in place of strings to optimize performance (it is much faster to compare ASAtom objects than strings). ASAtom methods convert between strings and ASAtom objects.



Define Summary
 Define
 ASAtomNull
Typedef Summary
 Typedef
 ASAtom
Method Summary
 Method
 
ASBool ASAtomExistsForString(const char* nameStr, ASAtom* atom)
Tests whether an ASAtom exists for the specified string.
 
ASAtom ASAtomFromString(const char* nameStr)
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.
 
const char* ASAtomGetString(ASAtom atm)
Gets the string associated with the specified ASAtom.
Defines Detail
ASAtomNull 
Product availability: All
Platform availability: All

Syntax

#define ASAtomNull ASMAXUns32

File: CoreExpT.h
Line: 131

Typedefs Detail
ASAtom 
Product availability: All
Platform availability: All

Syntax

typedef ASUns32 ASAtom;

File: CoreExpT.h
Line: 130



Method Detail
ASAtomExistsForString()
Product availability: All
Platform availability: All

Syntax

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

Tests whether an ASAtom exists for the specified string.

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.

See Also

ASAtomFromString
ASAtomGetCount (Only available with PDF Library SDK)
ASAtomGetString

Since

PI_ACROSUPPORT_VERSION >= 0x00020000

File: CorProcs.h
Line: 132
ASAtomFromString() 
Product availability: All
Platform availability: All

Syntax

ASAtom ASAtomFromString(const char* nameStr)

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.

Parameters

nameStr — 

The string for which an ASAtom is created.

Returns

The ASAtom corresponding to nameStr.

See Also

ASAtomExistsForString
ASAtomGetCount (Only available with the PDF Library SDK)
ASAtomGetString

Since

PI_ACROSUPPORT_VERSION >= 0x00020000

File: CorProcs.h
Line: 116
ASAtomGetString() 
Product availability: All
Platform availability: All

Syntax

const char* ASAtomGetString(ASAtom atm)

Gets the string associated with the specified ASAtom.

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.

See Also

Since

PI_ACROSUPPORT_VERSION >= 0x00020000

File: CorProcs.h
Line: 144