HBufC8 Class Reference

class HBufC8 : public TBufCBase8

8-bit heap descriptor.

This is a descriptor class which provides a buffer of fixed length, allocated on the heap, for containing and accessing data.

The class is intended for instantiation.

Heap descriptors have the important property that they can be made larger or smaller, changing the size of the descriptor buffer. This is achieved by reallocating the descriptor. Unlike the behaviour of dynamic buffers, reallocation is not done automatically.

Data is intended to be accessed, but not modified; however, it can be completely replaced using the assignment operators of this class. The base class (TDesC8) provides the functions through which the data is accessed.

The descriptor is hosted by a heap cell, and the 8-bit data that the descriptor represents is part of the descriptor object itself. The size of the cell depends on the requested maximum length of the descriptor buffer when the descriptor is created or re-allocated.

It is important to note that the size of the allocated cell, and, therefore, the resulting maximum length of the descriptor, may be larger than requested due to the way memory is allocated in Symbian OS. The amount by which this may be rounded up depends on the platform and build type.

HBufC

TPtr8

TDesC8

Inherits from

Public Member Functions
IMPORT_C TPtr8Des()
IMPORT_C HBufC8 *New(TInt)
IMPORT_C HBufC8 *NewL(TInt)
IMPORT_C HBufC8 *NewL(RReadStream &, TInt)
IMPORT_C HBufC8 *NewLC(TInt)
IMPORT_C HBufC8 *NewLC(RReadStream &, TInt)
IMPORT_C HBufC8 *NewMax(TInt)
IMPORT_C HBufC8 *NewMaxL(TInt)
IMPORT_C HBufC8 *NewMaxLC(TInt)
IMPORT_C HBufC8 *ReAlloc(TInt)
IMPORT_C HBufC8 *ReAllocL(TInt)
IMPORT_C HBufC8 &operator=(const TUint8 *)
IMPORT_C HBufC8 &operator=(const TDesC8 &)
HBufC8 &operator=(const HBufC8 &)
Private Member Functions
HBufC8(TInt)
Inherited Functions
TBufCBase8::Copy(const TDesC8 &,TInt)
TBufCBase8::Copy(const TUint8 *,TInt)
TBufCBase8::DoDes(TInt)
TBufCBase8::TBufCBase8()
TBufCBase8::TBufCBase8(TInt)
TBufCBase8::TBufCBase8(const TDesC8 &,TInt)
TBufCBase8::TBufCBase8(const TUint8 *,TInt)
TBufCBase8::WPtr()const
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
TDesC8::operator[](TInt)const
Private Attributes
__DECLARE_TEST
TText8 iBuf

Constructor & Destructor Documentation

HBufC8(TInt)

HBufC8(TIntaLength)[private, inline]

Parameters

TInt aLength

Member Functions Documentation

Des()

IMPORT_C TPtr8Des()

New(TInt)

IMPORT_C HBufC8 *New(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

NewL(TInt)

IMPORT_C HBufC8 *NewL(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

NewL(RReadStream &, TInt)

IMPORT_C HBufC8 *NewL(RReadStream &aStream,
TIntaMaxLength
)[static]

Parameters

RReadStream & aStream
TInt aMaxLength

NewLC(TInt)

IMPORT_C HBufC8 *NewLC(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

NewLC(RReadStream &, TInt)

IMPORT_C HBufC8 *NewLC(RReadStream &aStream,
TIntaMaxLength
)[static]

Parameters

RReadStream & aStream
TInt aMaxLength

NewMax(TInt)

IMPORT_C HBufC8 *NewMax(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

NewMaxL(TInt)

IMPORT_C HBufC8 *NewMaxL(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

NewMaxLC(TInt)

IMPORT_C HBufC8 *NewMaxLC(TIntaMaxLength)[static]

Parameters

TInt aMaxLength

ReAlloc(TInt)

IMPORT_C HBufC8 *ReAlloc(TIntaMaxLength)

Parameters

TInt aMaxLength

ReAllocL(TInt)

IMPORT_C HBufC8 *ReAllocL(TIntaMaxLength)

Parameters

TInt aMaxLength

operator=(const TUint8 *)

IMPORT_C HBufC8 &operator=(const TUint8 *aString)

Parameters

const TUint8 * aString

operator=(const TDesC8 &)

IMPORT_C HBufC8 &operator=(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

operator=(const HBufC8 &)

HBufC8 &operator=(const HBufC8 &aLcb)[inline]

Copies data into this 8-bit heap descriptor replacing any existing data.

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

Note that the maximum length of this (target) descriptor is the length of the descriptor buffer in the allocated host heap cell; this may be greater than the maximum length specified when this descriptor was created or last re-allocated.

A reference to this 8-bit heap descriptor.

panic

USER 23, if the length of the descriptor aLcb is greater than the maximum length of this (target) descriptor

Parameters

const HBufC8 & aLcbThe source 8-bit heap descriptor.

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST[private]

TText8 iBuf

TText8 iBuf[private]