DL Logo

CosObjCollection Typedefs

CosObjCollection

Header: CosExpT.h:97

Syntax

typedef OPAQUE_64_BITS CosObjCollection;

Returned From

Used By

CosObjCollection Functions

CosNewObjCollection

Header: CosProcs.h:1604

Description

Creates a new object collection for objects in a document.

Syntax

CosObjCollection CosNewObjCollection(CosDoc dP);

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.

CosObjAddToCollection

Header: CosProcs.h:1650

Description

Adds a Cos object to a collection; see CosObjCollection for requirements of these collections. This method sets the dirty flag of the collection's Cos document.

An exception is raised if the collection and the object belong to different Cos documents.

Syntax

ASBool CosObjAddToCollection(CosObjCollection coll, CosObj item);

Parameters

coll
The Cos object collection.
item
The object to add.

Returns

true if obj was successfully added to the collection, false otherwise.

CosObjCollectionEnum

Header: CosProcs.h:1759

Description

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.

Related Methods

Syntax

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

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).

CosObjCollectionEqual

Header: CosProcs.h:1738

Description

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).

Syntax

ASBool CosObjCollectionEqual(CosObjCollection c1, CosObjCollection c2);

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.

CosObjCollectionIsNull

Header: CosProcs.h:1616

Description

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.

Related Methods

Syntax

ASBool CosObjCollectionIsNull(CosObjCollection coll);

Parameters

coll
The object collection to test.

Returns

true if coll is NULL, false otherwise.

CosObjCollectionSize

Header: CosProcs.h:1721

Description

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

Syntax

ASUns32 CosObjCollectionSize(CosObjCollection coll);

Parameters

coll
The object collection whose size is obtained.

Returns

The number of objects in the collection.

CosObjGetCollection

Header: CosProcs.h:1631

Description

Gets the CosObjCollection containing the specified object. If the object is not in a collection, the method raises an exception.

An error is raised if obj is not in a collection.

Syntax

CosObjCollection CosObjGetCollection(CosObj obj);

Parameters

obj
The object whose CosObjCollection is obtained.

Returns

The CosObjCollection to which the object belongs.

CosObjRemoveFromCollection

Header: CosProcs.h:1665

Description

Removes a Cos object from the CosObjCollection to which it belongs.

An exception is raised if the object is not in the collection.

Syntax

void CosObjRemoveFromCollection(CosObj obj);

Parameters

obj
The object to remove.