Location:
e32base.h
Link against: euser.lib
class CArrayVarBase : public CBase;
An implementation base class for variable length arrays.
It provides implementation and public functions which are common to all variable length type arrays.
The class is always derived from and is never instantiated explicitly.
CBase
- Base class for all classes to be instantiated on the heap
CArrayVarBase
- An implementation base class for variable length arrays
Defined in CArrayVarBase
:
Compress()
, Count()
, Delete()
, Delete()
, Length()
, Reset()
, Sort()
, ~CArrayVarBase()
Inherited from CBase
:
Extension_()
,
operator new()
IMPORT_C ~CArrayVarBase();
Destructor.
Frees all resources owned by the object, prior to its destruction.
inline TInt Count() const;
Gets the number of elements held in the array.
|
IMPORT_C TInt Length(TInt anIndex) const;
Gets the length of a specific element.
|
|
|
IMPORT_C void Compress();
Removes 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 represent 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.
IMPORT_C void Reset();
Deletes all elements from the array and frees the memory allocated to the array buffer.
As each element of a variable array is contained within its own heap cell, this function has the effect of freeing all such cells.
IMPORT_C TInt Sort(TKeyArrayVar &aKey);
Sorts the elements of the array into key sequence.
|
|
IMPORT_C void Delete(TInt anIndex);
Removes one element from the array.
Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayVarBase::Compress()
to return excess space to the heap.
|
|
IMPORT_C void Delete(TInt anIndex, TInt aCount);
Removes one or more contiguous elements from the array, starting at the specified position.
Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayVarBase::Compress()
to return excess space to the heap.
|
|