TDes16 Class Reference

class TDes16 : public TDesC16

Abstract base class for 16-bit modifiable descriptors.

The class encapsulates the data member containing the maximum length of data represented by a 16-bit descriptor. It also provides member functions through which the data can be modified.

The class adds to the behaviour provided by TDesC16.

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 need to both modify and access descriptor data.

TDes

TDesC8

TDesC16

Inherits from

Public Member Functions
IMPORT_C voidAppend(TChar)
IMPORT_C voidAppend(const TDesC16 &)
IMPORT_C voidAppend(const TUint16 *, TInt)
IMPORT_C voidAppendFill(TChar, TInt)
IMPORT_C voidAppendFormat(TRefByValue< const TDesC16 >, TDes16Overflow *, ...)
IMPORT_C voidAppendFormat(TRefByValue< const TDesC16 >, ...)
IMPORT_C voidAppendFormatList(const TDesC16 &, VA_LIST, TDes16Overflow *)
IMPORT_C voidAppendJustify(const TDesC16 &, TInt, TAlign, TChar)
IMPORT_C voidAppendJustify(const TDesC16 &, TInt, TInt, TAlign, TChar)
IMPORT_C voidAppendJustify(const TUint16 *, TInt, TAlign, TChar)
IMPORT_C voidAppendJustify(const TUint16 *, TInt, TInt, TAlign, TChar)
IMPORT_C TIntAppendNum(TReal, const TRealFormat &)
IMPORT_C voidAppendNum(TInt64)
IMPORT_C voidAppendNum(TUint64, TRadix)
IMPORT_C voidAppendNumFixedWidth(TUint, TRadix, TInt)
IMPORT_C voidAppendNumFixedWidthUC(TUint, TRadix, TInt)
IMPORT_C voidAppendNumUC(TUint64, TRadix)
IMPORT_C voidCapitalize()
IMPORT_C TPtr8Collapse()
IMPORT_C voidCollate()
IMPORT_C voidCopy(const TDesC8 &)
IMPORT_C voidCopy(const TDesC16 &)
IMPORT_C voidCopy(const TUint16 *, TInt)
IMPORT_C voidCopy(const TUint16 *)
IMPORT_C voidCopyC(const TDesC16 &)
IMPORT_C voidCopyCP(const TDesC16 &)
IMPORT_C voidCopyF(const TDesC16 &)
IMPORT_C voidCopyLC(const TDesC16 &)
IMPORT_C voidCopyUC(const TDesC16 &)
IMPORT_C voidDelete(TInt, TInt)
IMPORT_C voidFill(TChar)
IMPORT_C voidFill(TChar, TInt)
IMPORT_C voidFillZ()
IMPORT_C voidFillZ(TInt)
IMPORT_C voidFold()
IMPORT_C voidFormat(TRefByValue< const TDesC16 >, ...)
IMPORT_C voidFormatList(const TDesC16 &, VA_LIST)
IMPORT_C voidInsert(TInt, const TDesC16 &)
IMPORT_C voidJustify(const TDesC16 &, TInt, TAlign, TChar)
IMPORT_C TPtr16LeftTPtr(TInt)
IMPORT_C voidLowerCase()
TInt MaxLength()
TInt MaxSize()
IMPORT_C TPtr16MidTPtr(TInt)
IMPORT_C TPtr16MidTPtr(TInt, TInt)
IMPORT_C TIntNum(TReal, const TRealFormat &)
IMPORT_C voidNum(TInt64)
IMPORT_C voidNum(TUint64, TRadix)
IMPORT_C voidNumFixedWidth(TUint, TRadix, TInt)
IMPORT_C voidNumFixedWidthUC(TUint, TRadix, TInt)
IMPORT_C voidNumUC(TUint64, TRadix)
IMPORT_C const TUint16 *PtrZ()
IMPORT_C voidRepeat(const TDesC16 &)
IMPORT_C voidRepeat(const TUint16 *, TInt)
IMPORT_C voidReplace(TInt, TInt, const TDesC16 &)
IMPORT_C TPtr16RightTPtr(TInt)
IMPORT_C voidSetLength(TInt)
IMPORT_C voidSetMax()
IMPORT_C voidSwap(TDes16 &)
IMPORT_C voidTrim()
IMPORT_C voidTrimAll()
IMPORT_C voidTrimLeft()
IMPORT_C voidTrimRight()
IMPORT_C voidUpperCase()
IMPORT_C voidZero()
IMPORT_C voidZeroTerminate()
TDes16 &operator+=(const TDesC16 &)
TDes16 &operator=(const TUint16 *)
TDes16 &operator=(const TDesC16 &)
TDes16 &operator=(const TDes16 &)
const TUint16 &operator[](TInt)
TUint16 &operator[](TInt)
Protected Member Functions
TDes16()
TDes16(TInt, TInt, TInt)
voidDoAppendNum(TUint64, TRadix, TUint, TInt)
voidDoPadAppendNum(TInt, TInt, const TUint8 *)
TUint16 *WPtr()
Inherited Functions
TDesC16::Alloc()const
TDesC16::AllocL()const
TDesC16::AllocLC()const
TDesC16::AtC(TInt)const
TDesC16::Compare(const TDesC16 &)const
TDesC16::CompareC(const TDesC16 &)const
TDesC16::CompareC(const TDesC16 &,TInt,const TCollationMethod *)const
TDesC16::CompareF(const TDesC16 &)const
TDesC16::DoSetLength(TInt)
TDesC16::Find(const TDesC16 &)const
TDesC16::Find(const TUint16 *,TInt)const
TDesC16::FindC(const TDesC16 &)const
TDesC16::FindC(const TDesC16 &,TInt &,const TCollationMethod &,TInt)const
TDesC16::FindC(const TUint16 *,TInt)const
TDesC16::FindC(const TUint16 *,TInt,TInt)const
TDesC16::FindF(const TDesC16 &)const
TDesC16::FindF(const TUint16 *,TInt)const
TDesC16::GetCollationKeysL(TInt,const TCollationMethod *)const
TDesC16::GetFoldedDecomposedFormL()const
TDesC16::GetNormalizedDecomposedFormL()const
TDesC16::HasPrefixC(const TDesC16 &,TInt,const TCollationMethod *)const
TDesC16::Left(TInt)const
TDesC16::Length()const
TDesC16::Locate(TChar)const
TDesC16::LocateF(TChar)const
TDesC16::LocateReverse(TChar)const
TDesC16::LocateReverseF(TChar)const
TDesC16::Match(const TDesC16 &)const
TDesC16::MatchC(const TDesC16 &)const
TDesC16::MatchC(const TDesC16 &,TInt,TInt,TInt,TInt,const TCollationMethod *)const
TDesC16::MatchC(const TDesC16 &,const TCollationMethod *,TInt,TInt,TInt,TInt)const
TDesC16::MatchF(const TDesC16 &)const
TDesC16::Mid(TInt)const
TDesC16::Mid(TInt,TInt)const
TDesC16::Ptr()const
TDesC16::Right(TInt)const
TDesC16::Size()const
TDesC16::TDesC16()
TDesC16::TDesC16(TInt,TInt)
TDesC16::Type()const
TDesC16::operator!=(const TDesC16 &)const
TDesC16::operator<(const TDesC16 &)const
TDesC16::operator<=(const TDesC16 &)const
TDesC16::operator==(const TDesC16 &)const
TDesC16::operator>(const TDesC16 &)const
TDesC16::operator>=(const TDesC16 &)const
Inherited Enumerations
TDesC16:TPrefix
Protected Attributes
__DECLARE_TEST
TInt iMaxLength

Constructor & Destructor Documentation

TDes16()

TDes16()[protected, inline]

TDes16(TInt, TInt, TInt)

TDes16(TIntaType,
TIntaLength,
TIntaMaxLength
)[protected, inline]

Parameters

TInt aType
TInt aLength
TInt aMaxLength

Member Functions Documentation

Append(TChar)

IMPORT_C voidAppend(TCharaChar)

Parameters

TChar aChar

Append(const TDesC16 &)

IMPORT_C voidAppend(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

Append(const TUint16 *, TInt)

IMPORT_C voidAppend(const TUint16 *aBuf,
TIntaLength
)

Parameters

const TUint16 * aBuf
TInt aLength

AppendFill(TChar, TInt)

IMPORT_C voidAppendFill(TCharaChar,
TIntaLength
)

Parameters

TChar aChar
TInt aLength

AppendFormat(TRefByValue< const TDesC16 >, TDes16Overflow *, ...)

IMPORT_C voidAppendFormat(TRefByValue< const TDesC16 >aFmt,
TDes16Overflow *aOverflowHandler,
...
)

Parameters

TRefByValue< const TDesC16 > aFmt
TDes16Overflow * aOverflowHandler
...

AppendFormat(TRefByValue< const TDesC16 >, ...)

IMPORT_C voidAppendFormat(TRefByValue< const TDesC16 >aFmt,
...
)

Parameters

TRefByValue< const TDesC16 > aFmt
...

AppendFormatList(const TDesC16 &, VA_LIST, TDes16Overflow *)

IMPORT_C voidAppendFormatList(const TDesC16 &aFmt,
VA_LISTaList,
TDes16Overflow *aOverflowHandler = NULL
)

Parameters

const TDesC16 & aFmt
VA_LIST aList
TDes16Overflow * aOverflowHandler = NULL

AppendJustify(const TDesC16 &, TInt, TAlign, TChar)

IMPORT_C voidAppendJustify(const TDesC16 &Des,
TIntaWidth,
TAlignanAlignment,
TCharaFill
)

Parameters

const TDesC16 & Des
TInt aWidth
TAlign anAlignment
TChar aFill

AppendJustify(const TDesC16 &, TInt, TInt, TAlign, TChar)

IMPORT_C voidAppendJustify(const TDesC16 &Des,
TIntaLength,
TIntaWidth,
TAlignanAlignment,
TCharaFill
)

Parameters

const TDesC16 & Des
TInt aLength
TInt aWidth
TAlign anAlignment
TChar aFill

AppendJustify(const TUint16 *, TInt, TAlign, TChar)

IMPORT_C voidAppendJustify(const TUint16 *aString,
TIntaWidth,
TAlignanAlignment,
TCharaFill
)

Parameters

const TUint16 * aString
TInt aWidth
TAlign anAlignment
TChar aFill

AppendJustify(const TUint16 *, TInt, TInt, TAlign, TChar)

IMPORT_C voidAppendJustify(const TUint16 *aString,
TIntaLength,
TIntaWidth,
TAlignanAlignment,
TCharaFill
)

Parameters

const TUint16 * aString
TInt aLength
TInt aWidth
TAlign anAlignment
TChar aFill

AppendNum(TReal, const TRealFormat &)

IMPORT_C TIntAppendNum(TRealaVal,
const TRealFormat &aFormat
)

Parameters

TReal aVal
const TRealFormat & aFormat

AppendNum(TInt64)

IMPORT_C voidAppendNum(TInt64aVal)

Parameters

TInt64 aVal

AppendNum(TUint64, TRadix)

IMPORT_C voidAppendNum(TUint64aVal,
TRadixaRadix
)

Parameters

TUint64 aVal
TRadix aRadix

AppendNumFixedWidth(TUint, TRadix, TInt)

IMPORT_C voidAppendNumFixedWidth(TUintaVal,
TRadixaRadix,
TIntaWidth
)

Parameters

TUint aVal
TRadix aRadix
TInt aWidth

AppendNumFixedWidthUC(TUint, TRadix, TInt)

IMPORT_C voidAppendNumFixedWidthUC(TUintaVal,
TRadixaRadix,
TIntaWidth
)

Parameters

TUint aVal
TRadix aRadix
TInt aWidth

AppendNumUC(TUint64, TRadix)

IMPORT_C voidAppendNumUC(TUint64aVal,
TRadixaRadix = EDecimal
)

Parameters

TUint64 aVal
TRadix aRadix = EDecimal

Capitalize()

IMPORT_C voidCapitalize()

Collapse()

IMPORT_C TPtr8Collapse()

Collate()

IMPORT_C voidCollate()

Copy(const TDesC8 &)

IMPORT_C voidCopy(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

Copy(const TDesC16 &)

IMPORT_C voidCopy(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

Copy(const TUint16 *, TInt)

IMPORT_C voidCopy(const TUint16 *aBuf,
TIntaLength
)

Parameters

const TUint16 * aBuf
TInt aLength

Copy(const TUint16 *)

IMPORT_C voidCopy(const TUint16 *aString)

Parameters

const TUint16 * aString

CopyC(const TDesC16 &)

IMPORT_C voidCopyC(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

CopyCP(const TDesC16 &)

IMPORT_C voidCopyCP(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

CopyF(const TDesC16 &)

IMPORT_C voidCopyF(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

CopyLC(const TDesC16 &)

IMPORT_C voidCopyLC(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

CopyUC(const TDesC16 &)

IMPORT_C voidCopyUC(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

Delete(TInt, TInt)

IMPORT_C voidDelete(TIntaPos,
TIntaLength
)

Parameters

TInt aPos
TInt aLength

DoAppendNum(TUint64, TRadix, TUint, TInt)

voidDoAppendNum(TUint64aVal,
TRadixaRadix,
TUintaA,
TIntaW
)[protected]

Parameters

TUint64 aVal
TRadix aRadix
TUint aA
TInt aW

DoPadAppendNum(TInt, TInt, const TUint8 *)

voidDoPadAppendNum(TIntaLength,
TIntaW,
const TUint8 *aBuf
)[protected]

Parameters

TInt aLength
TInt aW
const TUint8 * aBuf

Fill(TChar)

IMPORT_C voidFill(TCharaChar)

Parameters

TChar aChar

Fill(TChar, TInt)

IMPORT_C voidFill(TCharaChar,
TIntaLength
)

Parameters

TChar aChar
TInt aLength

FillZ()

IMPORT_C voidFillZ()

FillZ(TInt)

IMPORT_C voidFillZ(TIntaLength)

Parameters

TInt aLength

Fold()

IMPORT_C voidFold()

Format(TRefByValue< const TDesC16 >, ...)

IMPORT_C voidFormat(TRefByValue< const TDesC16 >aFmt,
...
)

Parameters

TRefByValue< const TDesC16 > aFmt
...

FormatList(const TDesC16 &, VA_LIST)

IMPORT_C voidFormatList(const TDesC16 &aFmt,
VA_LISTaList
)

Parameters

const TDesC16 & aFmt
VA_LIST aList

Insert(TInt, const TDesC16 &)

IMPORT_C voidInsert(TIntaPos,
const TDesC16 &aDes
)

Parameters

TInt aPos
const TDesC16 & aDes

Justify(const TDesC16 &, TInt, TAlign, TChar)

IMPORT_C voidJustify(const TDesC16 &aDes,
TIntaWidth,
TAlignanAlignment,
TCharaFill
)

Parameters

const TDesC16 & aDes
TInt aWidth
TAlign anAlignment
TChar aFill

LeftTPtr(TInt)

IMPORT_C TPtr16LeftTPtr(TIntaLength)const

Parameters

TInt aLength

LowerCase()

IMPORT_C voidLowerCase()

MaxLength()

TInt MaxLength()const [inline]

Gets the maximum length of the descriptor.

This is the upper limit for the number of 16-bit values or data items that the descriptor can represent.

The maximum length of data that the descriptor can represent.

MaxSize()

TInt MaxSize()const [inline]

Gets the maximum size of the descriptor.

This is the upper limit for the number of bytes which the data represented by the descriptor can occupy.

The maximum size of the descriptor data.

MidTPtr(TInt)

IMPORT_C TPtr16MidTPtr(TIntaPos)const

Parameters

TInt aPos

MidTPtr(TInt, TInt)

IMPORT_C TPtr16MidTPtr(TIntaPos,
TIntaLength
)const

Parameters

TInt aPos
TInt aLength

Num(TReal, const TRealFormat &)

IMPORT_C TIntNum(TRealaVal,
const TRealFormat &aFormat
)

Parameters

TReal aVal
const TRealFormat & aFormat

Num(TInt64)

IMPORT_C voidNum(TInt64aVal)

Parameters

TInt64 aVal

Num(TUint64, TRadix)

IMPORT_C voidNum(TUint64aVal,
TRadixaRadix
)

Parameters

TUint64 aVal
TRadix aRadix

NumFixedWidth(TUint, TRadix, TInt)

IMPORT_C voidNumFixedWidth(TUintaVal,
TRadixaRadix,
TIntaWidth
)

Parameters

TUint aVal
TRadix aRadix
TInt aWidth

NumFixedWidthUC(TUint, TRadix, TInt)

IMPORT_C voidNumFixedWidthUC(TUintaVal,
TRadixaRadix,
TIntaWidth
)

Parameters

TUint aVal
TRadix aRadix
TInt aWidth

NumUC(TUint64, TRadix)

IMPORT_C voidNumUC(TUint64aVal,
TRadixaRadix = EDecimal
)

Parameters

TUint64 aVal
TRadix aRadix = EDecimal

PtrZ()

IMPORT_C const TUint16 *PtrZ()

Repeat(const TDesC16 &)

IMPORT_C voidRepeat(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

Repeat(const TUint16 *, TInt)

IMPORT_C voidRepeat(const TUint16 *aBuf,
TIntaLength
)

Parameters

const TUint16 * aBuf
TInt aLength

Replace(TInt, TInt, const TDesC16 &)

IMPORT_C voidReplace(TIntaPos,
TIntaLength,
const TDesC16 &aDes
)

Parameters

TInt aPos
TInt aLength
const TDesC16 & aDes

RightTPtr(TInt)

IMPORT_C TPtr16RightTPtr(TIntaLength)const

Parameters

TInt aLength

SetLength(TInt)

IMPORT_C voidSetLength(TIntaLength)

Parameters

TInt aLength

SetMax()

IMPORT_C voidSetMax()

Swap(TDes16 &)

IMPORT_C voidSwap(TDes16 &aDes)

Parameters

TDes16 & aDes

Trim()

IMPORT_C voidTrim()

TrimAll()

IMPORT_C voidTrimAll()

TrimLeft()

IMPORT_C voidTrimLeft()

TrimRight()

IMPORT_C voidTrimRight()

UpperCase()

IMPORT_C voidUpperCase()

WPtr()

TUint16 *WPtr()const [protected, inline]

Zero()

IMPORT_C voidZero()

ZeroTerminate()

IMPORT_C voidZeroTerminate()

operator+=(const TDesC16 &)

TDes16 &operator+=(const TDesC16 &aDes)[inline]

Appends data onto the end of this descriptor's data and returns a reference to this descriptor.

The length of this descriptor is incremented to reflect the new content.

A reference to this descriptor.

panic

USER 11, if the resulting length of this descriptor is greater than its maximum length.

Parameters

const TDesC16 & aDesA 16-bit non-modifiable descriptor whose data is to be appended.

operator=(const TUint16 *)

TDes16 &operator=(const TUint16 *aString)[inline]

Copies data into this descriptor replacing any existing data.

The length of this descriptor is set to reflect the new data.

A reference to this, the target descriptor.

panic

USER 11, if the length of the string, excluding the zero terminator, is greater than the maximum length of this (target) descriptor.

Parameters

const TUint16 * aStringA pointer to a zero-terminated string.

operator=(const TDesC16 &)

TDes16 &operator=(const TDesC16 &aDes)[inline]

Copies data into this descriptor replacing any existing data.

The length of this descriptor is set to reflect the new data.

A reference to this, the target descriptor.

panic

USER 11, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.

Parameters

const TDesC16 & aDesA 16-bit non-modifiable descriptor.

operator=(const TDes16 &)

TDes16 &operator=(const TDes16 &aDes)[inline]

Copies data into this descriptor replacing any existing data.

The length of this descriptor is set to reflect the new data.

A reference to this, the target descriptor.

panic

USER 11, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.

Parameters

const TDes16 & aDesA 16-bit modifiable descriptor.

operator[](TInt)

const TUint16 &operator[](TIntanIndex)const [inline]

Gets a const reference to a single data item within this descriptor's data.

A const reference to the data item at the specified position.

panic

USER 9, if anIndex is negative or is greater than or equal to the current length of this descriptor.

Parameters

TInt anIndexThe position the data item within this descriptor's data. This is an offset value; a zero value refers to the leftmost data position.

operator[](TInt)

TUint16 &operator[](TIntanIndex)[inline]

Gets a non-const reference to a single data item within this descriptor's data.

A non-const reference to the data item at the specified position.

panic

USER 9, if anIndex is negative or is greater than or equal to the current length of this descriptor.

Parameters

TInt anIndexThe position of the data item within this descriptor's data. This is an offset value; a zero value refers to the leftmost data position.

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST[protected]

TInt iMaxLength

TInt iMaxLength[protected]