Location:
e32base.h
Link against: euser.lib
CArrayFixBase
Supported from 5.0
Base class for arrays of fixed length objects. It provides implementation and public functions which are common to all arrays of this type.
The class is always derived from and is never instantiated explicitly.
|
Defined in CArrayFixBase
:
Compress()
, Count()
, Delete()
, Length()
, Reset()
, Sort()
, ~CArrayFixBase()
Inherited from CBase
:
operator new()
~CArrayFixBase();
Destructor. This frees all resources owned by the object, prior to its destruction.
TInt Count() const;
Returns the number of elements held in the array.
|
TInt Length() const;
Returns the length of an element.
|
void Reset();
Resets the array.
Thsi function deletes all elements from the array and frees the memory allocated to the array buffer.
void Compress();
Compresses the array.
This function removes the excess space from the array buffer. The effect is to reduce the memory allocated to the array buffer so that it is just sufficient to contain the elements of the array. This applies to both flat and segmented array buffers.
If the array is empty, then the memory allocated to the array buffer is freed.
TInt Sort(TKeyArrayFix& aKey);
Sorts the elements of the array into key sequence.
|
|
void Delete(TInt anIndex);
void Delete(TInt anIndex,TInt aCount);
Delete elements by position.
This function removes one or more contiguous elements from the array, starting at a specific position within the array.
Deleting elements from the array does not cause the array buffer to be
automatically compressed. Call CArrayFixBase::Compress()
to return
excess space to the heap.
Note:
The sum of anIndex
and aCount
must not be
greater than the number of elements currently in the array, otherwise the
functions raise an E32USER-CBase 29 panic.
|