TPtrC8 Class Reference

#include <e32des8.h>

class TPtrC8 : public TDesC8

Inherits from

Detailed Description

8-bit non-modifiable pointer descriptor.

This is a descriptor class intended for instantiation and encapsulates a pointer to the 8-bit data that it represents. The data can live in ROM or RAM and this location is separate from the descriptor object itself.

The data is intended to be accessed, but not changed, through this descriptor. The base class provides the functions through which data is accessed.

See also: TPtr8 TDesC8 TDes8 TBufC8 TBuf8 HBufC8

Member Attribute Documentation

iPtr

const TUint8 *iPtr[protected]

Constructor & Destructor Documentation

TPtrC8 ( )

IMPORT_CTPtrC8()

Default constructor.

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

It represents no data and its length is zero.

The non-modifiable pointer descriptor can, subsequently, be set to represent data.

See also: TPtrC8::Set()

TPtrC8 ( const TDesC8 & )

IMPORT_CTPtrC8(const TDesC8 &aDes)

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

It is set to point to the same data and is given the same length as the source descriptor.

Parameters
aDesA reference to an 8bit non-modifiable descriptor.

TPtrC8 ( const TUint8 * )

IMPORT_CTPtrC8(const TUint8 *aString)

Constructs the 8-bit non-modifiable pointer descriptor to point to a zero terminated string, whether in RAM or ROM.

The length of the descriptor is set to the length of the zero terminated string, excluding the zero terminator.

Parameters
aStringA pointer to a zero terminated string.

TPtrC8 ( const TUint8 *, TInt )

IMPORT_CTPtrC8(const TUint8 *aBuf,
TIntaLength
)

Constructs the 8-bit non-modifiable pointer descriptor to point to the specified location in memory, whether in RAM or ROM.

The length of the descriptor is set to the specified length.

Parameters
aBufA pointer to the location that the descriptor is to represent.
aLengthThe length of the descriptor. This value must be non-negative.
Panic Codes
USER29 if aLength is negative.

Member Function Documentation

Set ( const TUint8 *, TInt )

voidSet(const TUint8 *aBuf,
TIntaLength
)[inline]

Sets the 8-bit non-modifiable pointer descriptor to point to the specified location in memory, whether in RAM or ROM.

The length of the descriptor is set to the specified length.

Parameters
aBufA pointer to the location that the descriptor is to represent.
aLengthThe length of the descriptor. This value must be non-negative.
Panic Codes
USER29, if aLength is negative.

Set ( const TDesC8 & )

voidSet(const TDesC8 &aDes)[inline]

Sets the 8-bit non-modifiable pointer descriptor from the specified descriptor.

It is set to point to the same data and is given the same length.

Parameters
aDesA reference to an 8-bit non-modifiable descriptor.

Set ( const TPtrC8 & )

voidSet(const TPtrC8 &aPtr)[inline]

Sets the 8-bit non-modifiable pointer descriptor from the specified non-modifiable pointer descriptor.

It is set to point to the same data and is given the same length.

Parameters
aPtrA reference to an 8-bit non-modifiable pointer descriptor.