#include <e32base.h>
Link against: euser_v5.lib
class CArrayVarBase : public CBase |
Public Member Functions | |
---|---|
~CArrayVarBase() | |
IMPORT_C TAny * | At(TInt) |
IMPORT_C void | Compress() |
TInt | Count() |
IMPORT_C void | Delete(TInt) |
IMPORT_C void | Delete(TInt, TInt) |
IMPORT_C TAny * | ExpandL(TInt, TInt) |
IMPORT_C TInt | Find(const TAny *, TKeyArrayVar &, TInt &) |
IMPORT_C TInt | FindIsq(const TAny *, TKeyArrayVar &, TInt &) |
IMPORT_C TInt | InsertIsqAllowDuplicatesL(const TAny *, TInt, TKeyArrayVar &) |
IMPORT_C TInt | InsertIsqL(const TAny *, TInt, TKeyArrayVar &) |
IMPORT_C void | InsertL(TInt, const TAny *, TInt) |
IMPORT_C TInt | Length(TInt) |
IMPORT_C void | Reset() |
IMPORT_C TInt | Sort(TKeyArrayVar &) |
Protected Member Functions | |
---|---|
CArrayVarBase(TBufRep, TInt) | |
IMPORT_C const TAny * | AtR(const CBase *, TInt) |
IMPORT_C TInt | CountR(const CBase *) |
IMPORT_C void | SetKey(TKeyArrayVar &) |
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.
IMPORT_C | ~CArrayVarBase | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
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.
TInt | Count | ( | ) | const [inline] |
Gets the number of elements held in the array.
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.
Parameters | |
---|---|
anIndex | The position within the array of the element to delete. The position is relative to zero. |
Panic Codes | |
---|---|
E32USER-CBase | 21, if anIndex is negative or greater than the number of elements currently in the array. |
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.
Parameters | |
---|---|
anIndex | The position within the array from where deletion of elements is to start. The position is relative to zero, i.e. zero implies that elements, starting with the first, are deleted from the array. |
aCount | The number of elements to be deleted from the array. |
Panic Codes | |
---|---|
E32USER-CBase | 21, if anIndex is negative or greater than or equal to the number of elements currently in the array. |
E32USER-CBase | 25, if aCount is negative. |
E32USER-CBase | 29, if the sum of anIndexPos and aCount is greater than the number of elements currently in the array. |
IMPORT_C TInt | Find | ( | const TAny * | aPtr, |
TKeyArrayVar & | aKey, | |||
TInt & | anIndex | |||
) | const |
IMPORT_C TInt | FindIsq | ( | const TAny * | aPtr, |
TKeyArrayVar & | aKey, | |||
TInt & | anIndex | |||
) | const |
IMPORT_C TInt | InsertIsqAllowDuplicatesL | ( | const TAny * | aPtr, |
TInt | aLength, | |||
TKeyArrayVar & | aKey | |||
) |
IMPORT_C TInt | InsertIsqL | ( | const TAny * | aPtr, |
TInt | aLength, | |||
TKeyArrayVar & | aKey | |||
) |
Gets the length of a specific element.
Parameters | |
---|---|
anIndex | The position of the element within the array. The position is relative to zero, (i.e. the first element in the array is at position 0). |
Panic Codes | |
---|---|
E32USER-CBase | 21, if anIndex is negative or is greater than the number of elements currently in the array. |
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 void | SetKey | ( | TKeyArrayVar & | aKey | ) | const [protected] |
IMPORT_C TInt | Sort | ( | TKeyArrayVar & | aKey | ) |
Sorts the elements of the array into key sequence.
Parameters | |
---|---|
aKey | The key object defining the properties of the key. |