LayerCOS_Layer
ObjectCosName

A name is a sequence of non-white space characters. In code, a name is preceded by the forward slash (/) character indicating that it is a string literal, for example: /AName. See Section 3.2.4 in the PDF Reference for details.



Define Summary
 Define
 CosNewNameFromString
Method Summary
 Method
 
ASAtom CosNameValue(CosObj obj)
Gets the value of a name object.
 
CosObj CosNewName(CosDoc dP, ASBool indirect, ASAtom name)
Creates a new name object associated with the specified document and having the specified value.
 
CosObj CosNewNameFromString(CosDoc dP, ASBool indirect, const char* namestring)
Creates a new name object associated with the specified document and having the specified value.
Defines Detail
CosNewNameFromString 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNewNameFromString CosCallMacro(CosNewNameFromString, 7)

File: CosCalls.h
Line: 453




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

Syntax

ASAtom CosNameValue(CosObj obj)

Gets the value of a name object.

Parameters

obj — 

The object of type CosName whose value is obtained.

Returns

The ASAtom corresponding to the specified name object. An ASAtom can be converted to a string using ASAtomGetString() . Note that CosCopyNameStringValue() can be used to obtain the name as a string, without creating an ASAtom (ASAtom objects consume global memory that is not deallocated).

An exception is raised if obj has the wrong type, if storage is exhausted, or if file access fails.

See Also

Since

PI_COS_VERSION >= 0x00020000

File: CosProcs.h
Line: 532
CosNewName() 
Product availability: All
Platform availability: All

Syntax

CosObj CosNewName(CosDoc dP, ASBool indirect, ASAtom name)

Creates a new name object associated with the specified document and having the specified value.

Parameters

dP — 

The document in which the new name is used.

 
indirect — 

If true, it creates the name as an indirect object, and sets the document's PDDocNeedsSave flag (see PDDocFlags) flag. If false, it creates the name as a direct object.

 
name — 

The ASAtom corresponding to the name to create. A C string can be converted to an ASAtom using ASAtomFromString() . Note that a name object can be created directly from a C string, without creating an ASAtom, by using CosNewNameFromString() .

Returns

The newly created name Cos object.

See Also

Since

PI_COS_VERSION >= 0x00020000

File: CosProcs.h
Line: 217
CosNewNameFromString() 
Product availability: All
Platform availability: All

Syntax

CosObj CosNewNameFromString(CosDoc dP, ASBool indirect, const char* namestring)

Creates a new name object associated with the specified document and having the specified value.

Parameters

dP — 

The document in which the new name is used.

 
indirect — 

If true, it creates the name as an indirect object, and sets the document's PDDocNeedsSave flag (see PDDocFlags) flag. If false, it creates the name as a direct object.

 
namestring — 

The name to create. This routine will not create an ASAtom corresponding to namestring and is generally more efficient than CosNewName() . (ASAtom objects consume global memory that is not deallocated.)

Returns

The newly created name Cos object.

See Also

Since

PI_COS_VERSION >= 0x00070000

File: CosProcs.h
Line: 2122