#include <tvobjs.h>
Inheritance diagram for TNSSortedCollection::
Public Methods | |
TNSSortedCollection (ccIndex aLimit, ccIndex aDelta) | |
virtual Boolean | search (void *key, ccIndex &index) |
virtual ccIndex | indexOf (void *item) |
virtual ccIndex | insert (void *item) |
virtual void* | keyOf (void *item) |
Public Attributes | |
Boolean | duplicates |
Protected Methods | |
TNSSortedCollection () |
Definition at line 415 of file tvobjs.h.
|
Invokes the TNSCollection constructor to set count, items and limit to 0; calls setLimit(aLimit) to set the collection limit to `aLimit', then sets delta to `aDelta'.
|
|
Undocumented. |
|
Returns the index of the given item; that is, the converse operation to at(). If the item is not in the collection, indexOf() calls error(). The address of the item is passed in the `item' parameter. Reimplemented from TNSCollection. Referenced by TFileCollection::indexOf().
|
|
If duplicates data member is False, insert works as follows: if the target item is not found in the sorted collection, it is inserted at the correct index position. Calls search() to determine if the item exists, and if not, where to insert it. If duplicates is True, the item is inserted ahead of any items (if any) with the same key. Reimplemented from TNSCollection. Referenced by TFileCollection::insert().
|
|
Undocumented. Reimplemented in TResourceCollection. |
|
Returns True if the item identified by `key' is found in the sorted collection. If the item is found, `index' is set to the found index; otherwise `index' is set to the index where the item would be placed if inserted and False is returned. |
|
Set to True if duplicate indexes are allowed; otherwise set to False. The default is False. If duplicates data member is True methods search(), insert() and indexOf() work differently. |