| Methods Index |
Subclasses: None
CSparseArray objects are containers that store data in a two-dimensional array. CSparseArray is useful when the data stored is sparse because the number of array cells (memory) is equal to the number of non-empty array locations.
CSparseArray using the interface methods provided below.
|
|
friend class CSparseArrayIterator;
|
friend class CSparseRowIterator;
|
friend class CSparseColIterator;
|
CSparseArray(void);
CSparseArray(const CSparseArray& theSparseArray);
theSparseArray, including any pointers it contains. It does not copy the objects to which the array is pointing.
CSparseArray& operator=(
const CSparseArray& theSparseArray);
theSparseArray, including any pointers it contains. It does not copy the objects to which the array is pointing.
virtual ~CSparseArray(void);
virtual void Insert(RWCollectable *theItem,
int theRow, int theCol);
theItem) into the array.
virtual BOOLEAN Remove(RWCollectable *theItem);
theItem) from the array and returns a Boolean value of TRUE. It returns FALSE if it does not remove the item, possibly because it could not find it.
virtual RWCollectable* Remove(int theRow, int theCol);
NULL.
virtual void* GetContents(int theRow,
int theCol) const;
virtual int GetNumRows(void) const;
virtual int GetNumCols(void) const;
virtual int GetNumEntries(void) const;
virtual void Clear(void);
void ShiftColumns(int theColumn, int theShift);
theShift, starting with theColumn. This method affects all rows.