Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: e32des16.h
Link against: euser.lib

Class TPtrC16

TPtrC16

Support

Supported from 5.0

Description

16 bit non-modifiable pointer descriptor.

This is a descriptor class intended for instantiation and encapsulates a pointer to the 16 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

TDesC16Abstract base class for 16 bit descriptors
TPtrC1616 bit non-modifiable pointer descriptor

Defined in TPtrC16:
Set(), TPtrC16()

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

See also:


Construction


TPtrC16()

TPtrC16();

Description

Constructs an empty 16 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:


TPtrC16()

TPtrC16(const TPtrC16& aDes);

Description

Constructs the 16 bit non-modifiable pointer descriptor from an existing non-modifiable pointer descriptor.

It is set to point to the same data and is given the same length as the source non-modifiable pointer descriptor.

Parameters

const TPtrC16& aDes

The source 16 bit non-modifiable pointer descriptor.


TPtrC16()

TPtrC16(const TDesC16& aDes);

Description

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

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

Parameters

const TDesC16& aDes

A reference to a 16 bit non-modifiable descriptor.


TPtrC16()

TPtrC16(const TUint16* aString);

Description

Constructs the 16 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 TUint16* aString

A pointer to a zero terminated string.


TPtrC16()

TPtrC16(const TUint16* aBuf,TInt aLength);

Description

Constructs the 16 bit non-modifiable pointer descriptor to point to the the specified location in memory, whether in RAM or ROM. The length of the descriptor is set to the specified length.

Parameters

const TUint16* 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 otherwise the constructor raises a USER 17 panic.

[Top]


Setting the descriptor


Set()

void Set(const TDesC16& aDes);

Description

Sets the 16 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 TDesC16& aDes

A reference to a 16 bit non-modifiable descriptor


Set()

void Set(const TUint16* aBuf,TInt aLength);

Description

Sets the 16 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 TUint16* 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 otherwise the constructor raises a USER 17 panic.