Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32des8.h
Link against: euser.lib

Class TPtrC8

class TPtrC8 : public TDesC8;

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.

Derivation

Members

Defined in TPtrC8:
Set(), Set(), Set(), TPtrC8(), TPtrC8(), TPtrC8(), TPtrC8(), iPtr

Inherited from TDesC8:
Alloc(), AllocL(), AllocLC(), AtC(), Compare(), CompareC(), CompareF(), DoSetLength(), Find(), FindC(), FindF(), Left(), Length(), Locate(), LocateF(), LocateReverse(), LocateReverseF(), Match(), MatchC(), MatchF(), Mid(), Ptr(), Right(), Size(), Type(), operator!=(), operator>(), operator>=(), operator<(), operator<=(), operator==(), operator[]()

See also:


Construction and destruction


TPtrC8()

IMPORT_C TPtrC8();

Description

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

IMPORT_C TPtrC8(const TDesC8 &aDes);

Description

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

const TDesC8 &aDes

A reference to an 8bit non-modifiable descriptor.


TPtrC8()

IMPORT_C TPtrC8(const TUint8 *aString);

Description

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

const TUint8 *aString

A pointer to a zero terminated string.


TPtrC8()

IMPORT_C TPtrC8(const TUint8 *aBuf, TInt aLength);

Description

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

const TUint8 *aBuf

A pointer to the location that the descriptor is to represent.

TInt aLength

The length of the descriptor. This value must be non-negative.

Panic codes

USER

29 if aLength is negative.

[Top]


Member functions


Set()

inline void Set(const TUint8 *aBuf, TInt aLength);

Description

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

const TUint8 *aBuf

A pointer to the location that the descriptor is to represent.

TInt aLength

The length of the descriptor. This value must be non-negative.

Panic codes

USER

29, if aLength is negative.


Set()

inline void Set(const TDesC8 &aDes);

Description

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

const TDesC8 &aDes

A reference to an 8-bit non-modifiable descriptor.


Set()

inline void Set(const TPtrC8 &aPtr);

Description

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

const TPtrC8 &aPtr

A reference to an 8-bit non-modifiable pointer descriptor.

[Top]


Member data


iPtr

protected: const TUint8 * iPtr;

Description