TBufC8 Class Reference

#include <e32des8.h>

class TBufC8 : public TBufCBase8

Inherits from

Protected Attributes
TUint8 iBuf
Public Member Functions
TBufC8()
TBufC8(const TUint8 *)
TBufC8(const TDesC8 &)
TPtr8 Des()
TBufC8< S > &operator=(const TUint8 *)
TBufC8< S > &operator=(const TDesC8 &)
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

Detailed Description

8-bit non-modifiable buffer descriptor.

This is a descriptor class which provides a buffer of fixed length for containing and accessing TUint8 data.

The class intended for instantiation. The 8-bit data that the descriptor represents is part of the descriptor object itself.

The class is templated, based on an integer value which defines the size of the descriptor's data area.

The 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 provides the functions through which the data is accessed.

See also: TBufC TDesC8 TPtr8 TUint8

Member Attribute Documentation

iBuf

TUint8 iBuf[protected]

Constructor & Destructor Documentation

TBufC8 ( )

TBufC8()[inline]

Constructs an empty 8-bit non-modifiable buffer descriptor.

It contains no data.

The integer template parameter determines the size of the data area which is created as part of the buffer descriptor object.

Data can, subsequently, be assigned into this buffer descriptor using the assignment operators.

See also: TBufC8::operator=

TBufC8 ( const TUint8 * )

TBufC8(const TUint8 *aString)[inline]

Constructs the 8-bit non-modifiable buffer descriptor from a zero terminated string.

The integer template parameter determines the size of the data area which is created as part of this object.

The string, excluding the zero terminator, is copied into this buffer descriptor's data area. The length of this buffer descriptor is set to the length of the string, excluding the zero terminator.

Parameters
aStringA pointer to a zero terminated string.
Panic Codes
USER20, if the length of the string, excluding the zero terminator, is greater than the value of the integer template parameter.

TBufC8 ( const TDesC8 & )

TBufC8(const TDesC8 &aDes)[inline]

Constructs the 8-bit non-modifiable buffer descriptor from any existing descriptor.

The integer template parameter determines the size of the data area which is created as part of this object.

Data is copied from the source descriptor into this buffer descriptor and the length of this buffer descriptor is set to the length of the source descriptor.

Parameters
aDesThe source 8-bit non-modifiable descriptor.
Panic Codes
USER20, if the length of the source descriptor is greater than the value of the integer template parameter.

Member Function Documentation

Des ( )

TPtr8 Des()[inline]

Creates and returns an 8-bit modifiable pointer descriptor for the data represented by this 8-bit non-modifiable buffer descriptor.

The content of a non-modifiable buffer descriptor normally cannot be altered, other than by complete replacement of the data. Creating a modifiable pointer descriptor provides a way of changing the data.

The modifiable pointer descriptor is set to point to this non-modifiable buffer descriptor's data.

The length of the modifiable pointer descriptor is set to the length of this non-modifiable buffer descriptor.

The maximum length of the modifiable pointer descriptor is set to the value of the integer template parameter.

When data is modified through this new pointer descriptor, the lengths of both it and this constant buffer descriptor are changed.

Return Value
An 8-bit modifiable pointer descriptor representing the data in this 8-bit non-modifiable buffer descriptor.

operator= ( const TUint8 * )

TBufC8< S > &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.

Parameters
aStringA pointer to a zero-terminated string.
Return Value
A reference to this descriptor.
Panic Codes
USER23, if the length of the string, excluding the zero terminator, is greater than the maximum length of this (target) descriptor.

operator= ( const TDesC8 & )

TBufC8< S > &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.

Parameters
aDesAn 8-bit non-modifiable descriptor.
Return Value
A reference to this descriptor.
Panic Codes
USER23, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.