Functions



free

Abstract: A member function to release and deallocate all resources created or used by the OSCollectionIterator object.
public:

virtual void free();

This function should not be called directly, use release() instead.


getNextObject

Abstract: A member function to get the next object in the collection being iterated.
public:

virtual OSObject *getNextObject();

Result: Returns the next object in the collection or 0 when the end has been reached.

isValid

Abstract: A member function for determining if the collection was modified during iteration.
public:

virtual bool isValid();


reset

Abstract: A member function which resets the iterator to begin the next iteration from the beginning of the collection.
public:

virtual void reset();


withCollection

Abstract: A static constructor function which creates and initialize an intance of OSCollectionIterator for the provided colleciton object.
public:

static OSCollectionIterator *withCollection(OSCollection *inColl);

Parameters

NameDescription
inCollThe OSCollection derived collection object to be iteratated.
Result: Returns an new instance of OSCollection or 0 on failure.

withCollection

Abstract: A member function to initialize the intance of OSCollectionIterator with the provided colleciton object.
public:

virtual bool initWithCollection(OSCollection *inColl);

Parameters

NameDescription
inCollThe OSCollection derived collection object to be iteratated.
Result: Returns true if the initialization was successful or false on failure.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)