ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
OSCollection |
Inherits from: | |
Declared In: |
Abstract super class for all collections.
OSCollection is the abstract super class for all OSObject-derived collections and provides the necessary interfaces for managing storage space and iteration through a collection.
Returns the storage space in the collection subclass.
Returns the growth factor of the collection subclass.
Returns the number of objects in the collection subclass.
Returns the next member of a collection.
Tracks all updates to the collection.
Initializes the OSCollection object.
Allocates and initializes the iterator context data.
Returns the size of the iterator context.
Sets the growth factor of the collection subclass.
ensureCapacity |
public
virtual unsigned int ensureCapacity( unsigned int newCapacity) = 0;
newCapacity
flushCollection |
public
virtual void flushCollection() = 0;
getCapacity |
Returns the storage space in the collection subclass.
public
virtual unsigned int getCapacity() const = 0;
Returns the number objects in a collection.
getCapacityIncrement |
Returns the growth factor of the collection subclass.
public
virtual unsigned int getCapacityIncrement() const = 0;
Returns the size by which the collection subclass should grow.
getCount |
Returns the number of objects in the collection subclass.
public
virtual unsigned int getCount() const = 0;
Returns the number objects in a collection.
getNextObjectForIterator |
Returns the next member of a collection.
protected
virtual bool getNextObjectForIterator( void *iterator, OSObject **ret) const = 0;
iterator
The iterator context.
ret
The object returned to the caller.
Returns true if an object was found, false otherwise.
This is the entry point used by an OSCollectionIterator object to advance to the next object in the collection. The iterator context is passed to the receiver to allow it to find the location of the current object and then advance the iterator context to the next object.
haveUpdated |
Tracks all updates to the collection.
public
void haveUpdated();
init |
Initializes the OSCollection object.
protected
virtual bool init();
Returns true if an object was initialized successfully, false otherwise.
This function is used to initialize state within a newly created OSCollection object.
initIterator |
Allocates and initializes the iterator context data.
protected
virtual bool initIterator( void *iterator) const = 0;
iterator
The iterator context.
Returns true if initialization was successful, false otherwise.
iteratorSize |
Returns the size of the iterator context.
protected
virtual unsigned int iteratorSize() const = 0;
Returns an integer size for the storage space required to contain context necessary for iterating through a collection.
This member function is called by an OSCollectionIterator object to allow it to allocate enough storage space for the iterator context. This context contains the data necessary to iterate through the collection when getNextObjectForIterator is called.
setCapacityIncrement |
Sets the growth factor of the collection subclass.
public
virtual unsigned int setCapacityIncrement( unsigned increment) = 0;
increment
The new size by which the capacity of the collection should grow.
Returns the new capacity increment.
reserved |
protected
ExpansionData *reserved;
Reserved for future use. (Internal use only)
|
Last Updated: 2008-12-19