Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <e32des8.h>
Link against: euser.lib

Class TPtr8

class TPtr8 : public TDes8;

Description

8-bit 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 and modified through this descriptor. The base classes provide the functions through which the data can be manipulated.

Derivation

Members

Defined in TPtr8:

Inherited from TDes8:

Inherited from TDesC8:

See also:


Construction and destruction


TPtr8(TUint8 *,TInt)

IMPORT_C TPtr8(TUint8 *aBuf, TInt aMaxLength);

Description

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

The length of the descriptor is set to zero and its maximum length is set to the specified value.

Parameters

TUint8 *aBuf

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

TInt aMaxLength

The maximum length of the descriptor.

Panic codes

USER

30 if aMaxLength is negative.


TPtr8(TUint8 *,TInt,TInt)

IMPORT_C TPtr8(TUint8 *aBuf, TInt aLength, TInt aMaxLength);

Description

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

The length of the descriptor and its maximum length are set to the specified values.

Parameters

TUint8 *aBuf

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

TInt aLength

The length of the descriptor.

TInt aMaxLength

The maximum length of the descriptor.

Panic codes

USER

20 if aLength is negative, or is greater than the descriptor's maximum length,

USER

30 if aMaxLength is negative.

[Top]


Member functions


operator=(const TUint8 *)

inline TPtr8& operator=(const TUint8 *aString);

Description

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

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

Parameters

const TUint8 *aString

A pointer to a zero-terminated string.

Return value

TPtr8 &

A reference to this 8-bit modifiable pointer descriptor.

Panic codes

USER

23, if the length of the string, excluding the zero terminator, is greater than the maximum length of this descriptor.


operator=(const TDesC8 &)

inline TPtr8& operator=(const TDesC8 &aDes);

Description

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

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

Parameters

const TDesC8 &aDes

An 8-bit modifiable pointer descriptor whose data is to be copied into this descriptor.

Return value

TPtr8 &

A reference to this 8-bit modifiable pointer descriptor.

Panic codes

USER

23, if the length of aDes is greater than the maximum length of this descriptor.


operator=(const TPtr8 &)

inline TPtr8& operator=(const TPtr8 &aPtr);

Description

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

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

Parameters

const TPtr8 &aPtr

An 8-bit modifiable pointer descriptor whose data is to be copied into this descriptor.

Return value

TPtr8 &

A reference to this 8-bit modifiable pointer descriptor.

Panic codes

USER

23, if the length of aDes is greater than the maximum length of this descriptor.


Set(TUint8 *,TInt,TInt)

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

Description

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

The length of the descriptor and its maximum length are set to the specified values.

Parameters

TUint8 *aBuf

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

TInt aLength

The length of the descriptor.

TInt aMaxLength

The maximum length of the descriptor.

Panic codes

USER

20, if aLength is negative or is greater than the maximum length of this descriptor.

USER

30, if aMaxLength is negative.


Set(const TPtr8 &)

inline void Set(const TPtr8 &aPtr);

Description

Sets the 8-bit modifiable pointer descriptor from an existing 8-bit modifiable pointer descriptor.

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

Parameters

const TPtr8 &aPtr

The source 8-bit modifiable pointer descriptor.

[Top]


Member data


iPtr

protected: TUint8 * iPtr;

Description