class TDesC16 |
Abstract base class for 16-bit descriptors.
The class encapsulates the data member containing the length of data represented by a 16-bit descriptor. It also provides member functions through which the data can be accessed, but not modified.
Data represented by this class is treated as a contiguous set of 16-bit (i.e. double byte) values or data items.
This class cannot be instantiated as it is intended to form part of a class hierarchy; it provides a well defined part of descriptor behaviour. It can, however, be passed as an argument type for functions which want access to descriptor data but do not need to modify that data.
Public Member Functions | |
---|---|
IMPORT_C HBufC16 * | Alloc() |
IMPORT_C HBufC16 * | AllocL() |
IMPORT_C HBufC16 * | AllocLC() |
IMPORT_C TInt | Compare(const TDesC16 &) |
IMPORT_C TInt | CompareC(const TDesC16 &) |
IMPORT_C TInt | CompareC(const TDesC16 &, TInt, const TCollationMethod *) |
IMPORT_C TInt | CompareF(const TDesC16 &) |
IMPORT_C TInt | Find(const TDesC16 &) |
IMPORT_C TInt | Find(const TUint16 *, TInt) |
IMPORT_C TInt | FindC(const TDesC16 &) |
IMPORT_C TInt | FindC(const TUint16 *, TInt) |
IMPORT_C TInt | FindC(const TUint16 *, TInt, TInt) |
IMPORT_C TInt | FindC(const TDesC16 &, TInt &, const TCollationMethod &, TInt) |
IMPORT_C TInt | FindF(const TDesC16 &) |
IMPORT_C TInt | FindF(const TUint16 *, TInt) |
IMPORT_C HBufC8 * | GetCollationKeysL(TInt, const TCollationMethod *) |
IMPORT_C HBufC16 * | GetFoldedDecomposedFormL() |
IMPORT_C HBufC16 * | GetNormalizedDecomposedFormL() |
IMPORT_C TPrefix | HasPrefixC(const TDesC16 &, TInt, const TCollationMethod *) |
IMPORT_C TPtrC16 | Left(TInt) |
TInt | Length() |
IMPORT_C TInt | Locate(TChar) |
IMPORT_C TInt | LocateF(TChar) |
IMPORT_C TInt | LocateReverse(TChar) |
IMPORT_C TInt | LocateReverseF(TChar) |
IMPORT_C TInt | Match(const TDesC16 &) |
IMPORT_C TInt | MatchC(const TDesC16 &) |
IMPORT_C TInt | MatchC(const TDesC16 &, TInt, TInt, TInt, TInt, const TCollationMethod *) |
IMPORT_C TInt | MatchC(const TDesC16 &, const TCollationMethod *, TInt, TInt, TInt, TInt) |
IMPORT_C TInt | MatchF(const TDesC16 &) |
IMPORT_C TPtrC16 | Mid(TInt) |
IMPORT_C TPtrC16 | Mid(TInt, TInt) |
IMPORT_C const TUint16 * | Ptr() |
IMPORT_C TPtrC16 | Right(TInt) |
TInt | Size() |
TBool | operator!=(const TDesC16 &) |
TBool | operator<(const TDesC16 &) |
TBool | operator<=(const TDesC16 &) |
TBool | operator==(const TDesC16 &) |
TBool | operator>(const TDesC16 &) |
TBool | operator>=(const TDesC16 &) |
const TUint16 & | operator[](TInt) |
Protected Member Functions | |
---|---|
TDesC16() | |
TDesC16(TInt, TInt) | |
IMPORT_C const TUint16 & | AtC(TInt) |
void | DoSetLength(TInt) |
TInt | Type() |
Public Member Enumerations | |
---|---|
enum | TPrefix { EIsPrefix = 0, EMightBePrefix = 1, EIsNotPrefix = 2 } |
Private Attributes | |
---|---|
__DECLARE_TEST | |
TUint | iLength |
IMPORT_C TInt | Compare | ( | const TDesC16 & | aDes | ) | const |
const TDesC16 & aDes |
IMPORT_C TInt | CompareC | ( | const TDesC16 & | aDes | ) | const |
const TDesC16 & aDes |
IMPORT_C TInt | CompareC | ( | const TDesC16 & | aDes, |
TInt | aMaxLevel, | |||
const TCollationMethod * | aCollationMethod | |||
) | const |
IMPORT_C TInt | CompareF | ( | const TDesC16 & | aDes | ) | const |
const TDesC16 & aDes |
IMPORT_C TInt | FindC | ( | const TUint16 * | aText, |
TInt | aLength, | |||
TInt | aMaxLevel | |||
) | const |
IMPORT_C TInt | FindC | ( | const TDesC16 & | aDes, |
TInt & | aLengthFound, | |||
const TCollationMethod & | aMethod, | |||
TInt | aMaxLevel | |||
) | const |
IMPORT_C HBufC8 * | GetCollationKeysL | ( | TInt | aMaxLevel, |
const TCollationMethod * | aCollationMethod | |||
) | const |
TInt aMaxLevel | |
const TCollationMethod * aCollationMethod |
IMPORT_C TPrefix | HasPrefixC | ( | const TDesC16 & | aPossiblePrefix, |
TInt | aLevel, | |||
const TCollationMethod * | aCollationMethod | |||
) | const |
TInt | Length | ( | ) | const [inline] |
Gets the length of the data.
This is the number of 16-bit values or data items represented by the descriptor.
The length of the data represented by the descriptor.
IMPORT_C TInt | MatchC | ( | const TDesC16 & | aDes | ) | const |
const TDesC16 & aDes |
IMPORT_C TInt | MatchC | ( | const TDesC16 & | aPattern, |
TInt | aWildChar, | |||
TInt | aWildSequenceChar, | |||
TInt | aEscapeChar, | |||
TInt | aMaxLevel = 3, | |||
const TCollationMethod * | aCollationMethod = NULL | |||
) | const |
IMPORT_C TInt | MatchC | ( | const TDesC16 & | aPattern, |
const TCollationMethod * | aCollationMethod, | |||
TInt | aMaxLevel = 3, | |||
TInt | aWildChar = '?', | |||
TInt | aWildSequenceChar = '*', | |||
TInt | aEscapeChar = 0 | |||
) | const |
IMPORT_C TInt | MatchF | ( | const TDesC16 & | aDes | ) | const |
const TDesC16 & aDes |
TInt | Size | ( | ) | const [inline] |
Gets the size of the data.
This is the number of bytes occupied by the data represented by the descriptor.
The size of the data represented by the descriptor. This is always twice the length.
TBool | operator!= | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is not equal to the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if not equal, false otherwise.
const TDesC16 & aDes | The 16-bit non-modifiable descriptor whose data is to be compared with this descriptor's data. |
TBool | operator< | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is less than the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if less than, false otherwise.
const TDesC16 & aDes | The 16-bit non-modifable descriptor whose data is to be compared with this descriptor's data. |
TBool | operator<= | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is less than or equal to the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if less than or equal, false otherwise.
const TDesC16 & aDes | The 16-bit non- modifiable descriptor whose data is to be compared with this descriptor's data. |
TBool | operator== | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is equal to the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if equal, false otherwise.
const TDesC16 & aDes | The 16-bit non-modifiable descriptor whose data is to be compared with this descriptor's data. |
TBool | operator> | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is greater than the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if greater than, false otherwise.
const TDesC16 & aDes | The 16-bit non-modifiable descriptor whose data is to be compared with this descriptor's data. |
TBool | operator>= | ( | const TDesC16 & | aDes | ) | const [inline] |
Determines whether this descriptor's data is greater than or equal to the specified descriptor's data.
The comparison is implemented using the Compare() member function.
True if greater than or equal, false otherwise.
const TDesC16 & aDes | The 16-bit non-modifiable descriptor whose data is to be compared with this descriptor's data. |
const TUint16 & | operator[] | ( | TInt | anIndex | ) | const [inline] |
Gets a reference to a single data item within this descriptor's data.
A reference to the data item.
panic
USER 9, if anIndex is negative or greater than or equal to the current length of the descriptor.
TInt anIndex | The position of the individual data item within the descriptor's data. This is an offset value; a zero value refers to the leftmost data position. |
A value returned by a call to HasPrefixC().
EIsPrefix = 0 |
Indicates that a supplied prefix can be extended to be equivalent to the text at the start of a descriptor. |
EMightBePrefix = 1 |
Indicates that a supplied prefix does not seem to be a prefix, but it is possible that it could be extended to become equivalent to text at the start of this descriptor. |
EIsNotPrefix = 2 |
Indicates that a supplied prefix cannot be extended to be equivalent to the text at the start of a descriptor. |