Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TSortedCollection Class Reference

Sorted, streamable collection of objects. More...

#include <objects.h>

Inheritance diagram for TSortedCollection::

TNSSortedCollection TCollection TNSCollection TNSCollection TStreamable TObject TObject TFileCollection TStringCollection TResourceCollection List of all members.

Public Methods

 TSortedCollection (ccIndex aLimit, ccIndex aDelta)

Static Public Attributes

const char* const name

Protected Methods

 TSortedCollection (StreamableInit)
virtual void* read (ipstream &is)
virtual void write (opstream &os)

Detailed Description

The abstract class TSortedCollection is a specialized derivative of both TCollection and TNSSortedCollection. It implements streamable collections sorted by a key (with or without duplicates).

No instances of TSortedCollection are allowed. It exists solely as a base for other standard or user-defined derived classes.

Definition at line 449 of file objects.h.


Constructor & Destructor Documentation

TSortedCollection::TSortedCollection ( ccIndex aLimit,
ccIndex aDelta ) [inline]
 

Invokes the TCollection constructor to set count and items data members to 0; calls setLimit(aLimit) to set the collection limit to `aLimit', then sets delta to `aDelta'. Note that ccIndex is a typedef of int.

duplicates is set to False. If you want to allow duplicate keys, you must set duplicates True.

Definition at line 461 of file objects.h.

TSortedCollection::TSortedCollection ( StreamableInit ) [protected]
 

Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized vtable pointers. This is achieved by calling this constructor with an argument of type StreamableInit.


Member Function Documentation

void * TSortedCollection::read ( ipstream & is ) [protected, virtual]
 

Reads a sorted collection from the input stream `is'.

Reimplemented from TCollection.

void TSortedCollection::write ( opstream & os ) [protected, virtual]
 

Writes the associated TSortedCollection object to the output stream `os'.

Reimplemented from TCollection.


Member Data Documentation

const char *const TSortedCollection::name [static]
 

Undocumented.

Reimplemented from TCollection.

Reimplemented in TStringCollection, TResourceCollection, and TFileCollection.

Definition at line 506 of file objects.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:34 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001