Location:
BADESCA.H
Link against: bafl.lib
class CDesC8Array : public CArrayFixBase, public MDesC8Array;
An implementation base class for 8 bit descriptor arrays.
It provides some of the behaviour for 8 bit descriptor arrays. The class is abstract and cannot be instantiated.
MDesC8Array
- Interface class for 8 bit descriptor arrays
CBase
- Base class for all classes to be instantiated on the heap
CArrayFixBase
- Base class for arrays of fixed length objects
CDesC8Array
- An implementation base class for 8 bit descriptor arrays
Defined in CDesC8Array
:
AppendL()
, CDesC8Array()
, Delete()
, Delete()
, Find()
, FindIsq()
, InsertIsqAllowDuplicatesL()
, InsertIsqL()
, InsertL()
, MdcaCount()
, MdcaPoint()
, Reset()
, Sort()
, operator[]()
, ~CDesC8Array()
Inherited from CArrayFixBase
:
Compress()
,
Count()
,
Length()
Inherited from CBase
:
Extension_()
,
operator new()
protected: IMPORT_C CDesC8Array(TBufRep aRep, TInt aGranularity);
|
IMPORT_C ~CDesC8Array();
Frees all resources owned by the object, prior to its destruction. In particular, it deletes all descriptors from the array and frees the memory allocated to the array buffer.
IMPORT_C void AppendL(const TDesC8 &aPtr);
Appends a descriptor onto the end of any existing descriptor elements in the array.
|
|
IMPORT_C void InsertL(TInt aPos, const TDesC8 &aPtr);
Inserts a descriptor into the array at the specified position.
If the specified position is the same as the current number of descriptor elements in the array, this has the effect of appending the element.
|
|
IMPORT_C TInt InsertIsqL(const TDesC8 &aPtr, TKeyCmpText aTextComparisonType=ECmpFolded);
Inserts a descriptor into the array at a position which maintains the sequence of the descriptors.
The sequence is determined by comparing descriptors using one of the TDesC comparison functions. The enumeration aTextComparisonType governs how the descriptors are to be compared.
The array should already be in sequence, otherwise the position of the new descriptor element is unpredictable. Descriptor elements which are the same are not permitted.
|
|
|
IMPORT_C TInt InsertIsqAllowDuplicatesL(const TDesC8 &aPtr, TKeyCmpText aTextComparisonType=ECmpFolded);
Inserts a descriptor into the array at a position which maintains the sequence of the descriptors - allows duplicates.
The sequence is determined by comparing descriptors using one of the TDesC comparison functions. The enumeration aTextComparisonType governs how the descriptors are to be compared.
The array should already be in sequence, otherwise the position of the new descriptor element is unpredictable. Descriptor elements which are the same are permitted; if the descriptor aPtr is a duplicate of an existing descriptor within the array, then the new descriptor element is positioned after the existing descriptor element.
|
|
|
IMPORT_C void Sort(TKeyCmpText aTextComparisonType=ECmpFolded);
Sorts the descriptor elements into sequence.
The sequence is determined by comparing descriptors using one of the member functions of the descriptor base class TDesC.
|
IMPORT_C TInt Find(const TDesC8 &aPtr, TInt &aPos, TKeyCmpText aTextComparisonType=ECmpFolded) const;
Finds the position of a descriptor element within the array which matches the specified descriptor using a sequential search.
The array is searched sequentially for a matching descriptor element, starting with the first descriptor element in the array. Descriptors are compared using one of the TDesC comparison functions. The enumeration aTextComparisonType governs how the descriptors are to be compared.
Where an array has duplicate descriptor elements, the function only supplies the position of the first descriptor element.
|
|
IMPORT_C TInt FindIsq(const TDesC8 &aPtr, TInt &aPos, TKeyCmpText aTextComparisonType=ECmpFolded) const;
Finds the position of a descriptor element within the array which matches the specified descriptor using a binary search technique. The array must be in sequence, otherwise the outcome is unpredictable.
Descriptors are compared using one of the TDesC comparison functions. The enumeration aTextComparisonType governs how the descriptors are to be compared.
Where an array has duplicate descriptor elements, the function cannot guarantee which matching descriptor element it will return; except that it will find one of them.
|
|
IMPORT_C void Delete(TInt aIndex, TInt aCount);
Deletes one or more logically contiguous descriptor elements from the array.
The deletion starts at the specified position.Deleting descriptor elements from the array frees the memory occupied by the
associated heap descriptors and removes their pointers from the array buffer but does not cause the array buffer to be automatically
compressed. Call the Compress()
function to return excess space in the array buffer to the heap.
|
IMPORT_C void Reset();
Deletes all descriptors from the array and frees the memory allocated to the array buffer.
virtual IMPORT_C TInt MdcaCount() const;
Returns the number of descriptor elements in the array. The function implements the interface MDesC8Array::MdcaCount()
.
|
virtual IMPORT_C TPtrC8 MdcaPoint(TInt aIndex) const;
Indexes into a descriptor array. The function implements the interface MDesC8Array::MdcaPoint()
.
|
|