LayerCOS_Layer
ObjectCosObjCollection

The CosObjCollection is an opaque structure representing a set of Cos objects associated with a particular Cos document. The initial value of a variable of type CosObjCollection is undefined. Use CosNewObjCollection() to create a collection.

Any indirect object whose generation number is zero and which is not a stream may be added to at most one CosObjCollection. When the file is saved, all the objects in a given collection are stored together in the PDF file, in one or more object streams (see the PDF Reference), which are normally compressed in order to reduce file size.

Collections allow grouping of objects that are likely to have a similar usage pattern. If one of them is required (and therefore decompressed), they are likely to all be required, but it is possible that none will be required. For example, there could be a collection that stores bookmarks. If the user never opens the bookmarks panel in Acrobat, none of the objects need to be decoded. If the user opens the bookmarks panel, it is likely they will all be needed, and having them together in the PDF file reduces the amount of time needed to load them all.

The CosObjCollection methods allow you to compare collections and iterate over the objects in a collection.



Typedef Summary
 Typedef
 CosObjCollection
Method Summary
 Method
 
CosObjCollection CosNewObjCollection(CosDoc dP)
Creates a new object collection for objects in a document.
 
ASBool CosObjCollectionEnum(CosObjCollection coll, CosObjEnumProc proc, void* clientData)
Enumerates the members of a Cos object collection, calling a user-supplied procedure for each member object. The order in which the objects are enumerated is undefined.
 
Tests whether two Cos object collections are the same collection. Two NULL collections are always equal (a NULL collection is not associated with a document and cannot store objects; it is generally used only as an initial value for a variable of type CosObjCollection).
 
Tests whether an object collection is NULL. A NULL collection is not associated with a document and cannot store objects; it is generally used only as an initial value for a variable of type CosObjCollection.
 
Gets the number of objects in an object collection. The size of a NULL collection is zero.

Typedefs Detail
CosObjCollection 
Product availability: All
Platform availability: All

Syntax

typedef OPAQUE_64_BITS CosObjCollection;

File: CosExpT.h
Line: 86



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

Syntax

CosObjCollection CosNewObjCollection(CosDoc dP)

Creates a new object collection for objects in a document.

Parameters

dP — 

The document whose objects are collected, or NULL to create a NULL collection (a NULL collection is not associated with a document and cannot store objects; it is generally used only as an initial value for a variable of type CosObjCollection).

Returns

The newly created Cos object collection.

See Also

Since

PI_COS_VERSION >= 0x00060000

File: CosProcs.h
Line: 1571
CosObjCollectionEnum() 
Product availability: All
Platform availability: All

Syntax

ASBool CosObjCollectionEnum(CosObjCollection coll, CosObjEnumProc proc, void* clientData)

Enumerates the members of a Cos object collection, calling a user-supplied procedure for each member object. The order in which the objects are enumerated is undefined.

Parameters

coll — 

The object collection whose members are enumerated.

 
proc — 

A user-supplied callback to call for each member object of coll. Enumeration ends if proc returns false. The callback must not modify the collection (for example, by adding or removing objects). Doing so produces undefined results or errors.

 
clientData — 

A pointer to user-supplied data to pass to proc each time it is called.

Returns

Returns the value that proc returned (meaning that it returns true if all the member objects were enumerated, false if enumeration was terminated at the request of proc).

See Also

Since

PI_COS_VERSION >= 0x00060000

File: CosProcs.h
Line: 1727
CosObjCollectionEqual() 
Product availability: All
Platform availability: All

Syntax

ASBool CosObjCollectionEqual(CosObjCollection c1, CosObjCollection c2)

Tests whether two Cos object collections are the same collection. Two NULL collections are always equal (a NULL collection is not associated with a document and cannot store objects; it is generally used only as an initial value for a variable of type CosObjCollection).

Parameters

c1 — 

An object collection to compare.

 
c2 — 

An object collection to compare.

Returns

true if c1 and c2 are the same collection, false otherwise.

See Also

Since

PI_COS_VERSION >= 0x00060000

File: CosProcs.h
Line: 1705
CosObjCollectionIsNull() 
Product availability: All
Platform availability: All

Syntax

ASBool CosObjCollectionIsNull(CosObjCollection coll)

Tests whether an object collection is NULL. A NULL collection is not associated with a document and cannot store objects; it is generally used only as an initial value for a variable of type CosObjCollection.

Parameters

coll — 

The object collection to test.

Returns

true if coll is NULL, false otherwise.

See Also

Since

PI_COS_VERSION >= 0x00060000

File: CosProcs.h
Line: 1583
CosObjCollectionSize() 
Product availability: All
Platform availability: All

Syntax

ASUns32 CosObjCollectionSize(CosObjCollection coll)

Gets the number of objects in an object collection. The size of a NULL collection is zero.

Parameters

coll — 

The object collection whose size is obtained.

Returns

The number of objects in the collection.

See Also

Since

PI_COS_VERSION >= 0x00060000

File: CosProcs.h
Line: 1688