TDes8 Class Reference

class TDes8 : public TDesC8

Abstract base class for 8-bit modifiable descriptors.

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

The class adds to the behaviour provided by TDesC8.

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

Constructor & Destructor Documentation

TDes8(TInt, TInt, TInt)

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

Parameters

TInt aType
TInt aLength
TInt aMaxLength

TDes8()

TDes8()[protected, inline]

Member Functions Documentation

Append(TChar)

IMPORT_C voidAppend(TCharaChar)

Parameters

TChar aChar

Append(const TDesC8 &)

IMPORT_C voidAppend(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

Append(const TDesC16 &)

IMPORT_C voidAppend(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

Append(const TUint8 *, TInt)

IMPORT_C voidAppend(const TUint8 *aBuf,
TIntaLength
)

Parameters

const TUint8 * aBuf
TInt aLength

AppendFill(TChar, TInt)

IMPORT_C voidAppendFill(TCharaChar,
TIntaLength
)

Parameters

TChar aChar
TInt aLength

AppendFormat(TRefByValue< const TDesC8 >, TDes8Overflow *, ...)

IMPORT_C voidAppendFormat(TRefByValue< const TDesC8 >aFmt,
TDes8Overflow *aOverflowHandler,
...
)

Parameters

TRefByValue< const TDesC8 > aFmt
TDes8Overflow * aOverflowHandler
...

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

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

Parameters

TRefByValue< const TDesC8 > aFmt
...

AppendFormatList(const TDesC8 &, VA_LIST, TDes8Overflow *)

IMPORT_C voidAppendFormatList(const TDesC8 &aFmt,
VA_LISTaList,
TDes8Overflow *aOverflowHandler = NULL
)

Parameters

const TDesC8 & aFmt
VA_LIST aList
TDes8Overflow * aOverflowHandler = NULL

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

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

Parameters

const TDesC8 & Des
TInt aWidth
TAlign anAlignment
TChar aFill

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

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

Parameters

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

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

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

Parameters

const TUint8 * aString
TInt aWidth
TAlign anAlignment
TChar aFill

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

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

Parameters

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

AppendNum(TInt64)

IMPORT_C voidAppendNum(TInt64aVal)

Parameters

TInt64 aVal

AppendNum(TUint64, TRadix)

IMPORT_C voidAppendNum(TUint64aVal,
TRadixaRadix
)

Parameters

TUint64 aVal
TRadix aRadix

AppendNum(TReal, const TRealFormat &)

IMPORT_C TIntAppendNum(TRealaVal,
const TRealFormat &aFormat
)

Parameters

TReal aVal
const TRealFormat & aFormat

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 voidCollapse()

Collate()

IMPORT_C voidCollate()

Copy(const TDesC8 &)

IMPORT_C voidCopy(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

Copy(const TUint8 *, TInt)

IMPORT_C voidCopy(const TUint8 *aBuf,
TIntaLength
)

Parameters

const TUint8 * aBuf
TInt aLength

Copy(const TUint8 *)

IMPORT_C voidCopy(const TUint8 *aString)

Parameters

const TUint8 * aString

Copy(const TDesC16 &)

IMPORT_C voidCopy(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

CopyC(const TDesC8 &)

IMPORT_C voidCopyC(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

CopyCP(const TDesC8 &)

IMPORT_C voidCopyCP(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

CopyF(const TDesC8 &)

IMPORT_C voidCopyF(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

CopyLC(const TDesC8 &)

IMPORT_C voidCopyLC(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

CopyUC(const TDesC8 &)

IMPORT_C voidCopyUC(const TDesC8 &aDes)

Parameters

const TDesC8 & 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

Expand()

IMPORT_C TPtr16Expand()

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 TDesC8 >, ...)

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

Parameters

TRefByValue< const TDesC8 > aFmt
...

FormatList(const TDesC8 &, VA_LIST)

IMPORT_C voidFormatList(const TDesC8 &aFmt,
VA_LISTaList
)

Parameters

const TDesC8 & aFmt
VA_LIST aList

Insert(TInt, const TDesC8 &)

IMPORT_C voidInsert(TIntaPos,
const TDesC8 &aDes
)

Parameters

TInt aPos
const TDesC8 & aDes

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

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

Parameters

const TDesC8 & aDes
TInt aWidth
TAlign anAlignment
TChar aFill

LeftTPtr(TInt)

IMPORT_C TPtr8LeftTPtr(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 8-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 TPtr8MidTPtr(TIntaPos)const

Parameters

TInt aPos

MidTPtr(TInt, TInt)

IMPORT_C TPtr8MidTPtr(TIntaPos,
TIntaLength
)const

Parameters

TInt aPos
TInt aLength

Num(TInt64)

IMPORT_C voidNum(TInt64aVal)

Parameters

TInt64 aVal

Num(TUint64, TRadix)

IMPORT_C voidNum(TUint64aVal,
TRadixaRadix
)

Parameters

TUint64 aVal
TRadix aRadix

Num(TReal, const TRealFormat &)

IMPORT_C TIntNum(TRealaVal,
const TRealFormat &aFormat
)

Parameters

TReal aVal
const TRealFormat & aFormat

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 TUint8 *PtrZ()

Repeat(const TUint8 *, TInt)

IMPORT_C voidRepeat(const TUint8 *aBuf,
TIntaLength
)

Parameters

const TUint8 * aBuf
TInt aLength

Repeat(const TDesC8 &)

IMPORT_C voidRepeat(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

Replace(TInt, TInt, const TDesC8 &)

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

Parameters

TInt aPos
TInt aLength
const TDesC8 & aDes

RightTPtr(TInt)

IMPORT_C TPtr8RightTPtr(TIntaLength)const

Parameters

TInt aLength

SetLength(TInt)

IMPORT_C voidSetLength(TIntaLength)

Parameters

TInt aLength

SetMax()

IMPORT_C voidSetMax()

Swap(TDes8 &)

IMPORT_C voidSwap(TDes8 &aDes)

Parameters

TDes8 & aDes

Trim()

IMPORT_C voidTrim()

TrimAll()

IMPORT_C voidTrimAll()

TrimLeft()

IMPORT_C voidTrimLeft()

TrimRight()

IMPORT_C voidTrimRight()

UpperCase()

IMPORT_C voidUpperCase()

WPtr()

TUint8 *WPtr()const [protected, inline]

Zero()

IMPORT_C voidZero()

ZeroTerminate()

IMPORT_C voidZeroTerminate()

operator+=(const TDesC8 &)

TDes8 &operator+=(const TDesC8 &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 23, if the resulting length of this descriptor is greater than its maximum length.

Parameters

const TDesC8 & aDesAn-8 bit non-modifiable descriptor whose data is to be appended.

operator=(const TUint8 *)

TDes8 &operator=(const TUint8 *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 23, if the length of the string, excluding the zero terminator, is greater than the maximum length of this (target) descriptor.

Parameters

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

operator=(const TDesC8 &)

TDes8 &operator=(const TDesC8 &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 23, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.

Parameters

const TDesC8 & aDesAn 8-bit non-modifiable descriptor.

operator=(const TDes8 &)

TDes8 &operator=(const TDes8 &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 23, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.

Parameters

const TDes8 & aDesAn 8-bit modifiable descriptor.

operator[](TInt)

const TUint8 &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 21, 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.

operator[](TInt)

TUint8 &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 21, 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]