Location:
BADESCA.H
Link against: bafl.lib
class CDesC16Array : public CArrayFixBase, public MDesC16Array;
An implementation base class for 16 bit descriptor arrays. It provides some of the behaviour for 16 bit descriptor arrays.
The class is abstract and cannot be instantiated. " bafl.lib "
MDesC16Array
- Interface class for 16 bit descriptor arrays
CBase
- Base class for all classes to be instantiated on the heap
CArrayFixBase
- Base class for arrays of fixed length objects
CDesC16Array
- An implementation base class for 16 bit descriptor arrays
Defined in CDesC16Array
:
AppendL()
, CDesC16Array()
, Delete()
, Delete()
, Find()
, FindIsq()
, InsertIsqAllowDuplicatesL()
, InsertIsqL()
, InsertL()
, MdcaCount()
, MdcaPoint()
, Reset()
, Sort()
, operator[]()
, ~CDesC16Array()
Inherited from CArrayFixBase
:
Compress()
,
Count()
,
Length()
Inherited from CBase
:
Extension_()
,
operator new()
protected: IMPORT_C CDesC16Array(TBufRep aRep, TInt aGranularity);
|
IMPORT_C ~CDesC16Array();
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 TDesC16 &aPtr);
Appends a descriptor onto the end of any existing descriptor elements in the array.
|
IMPORT_C void InsertL(TInt aPos, const TDesC16 &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 TDesC16 &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 TDesC16 &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 TDesC16 &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 TDesC16 &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.
inline TPtrC16 operator[](TInt aIndex) const;
Returns a non-modifiable descriptor to represent the descriptor element located at the specified index within the array.
|
|
virtual IMPORT_C TInt MdcaCount() const;
Returns the number of descriptor elements in the array. The function implements the function interface MDesC16Array::MdcaCount()
.
|
virtual IMPORT_C TPtrC16 MdcaPoint(TInt aIndex) const;
Indexes into a descriptor array. The function implements the interface MDesC16Array::MdcaPoint()
.
|
|