Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: e32des16.h
Link against: euser.lib

Class TPtr16

class TPtr16 : public TDes16;

Description

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

Derivation

Members

Defined in TPtr16:
Set(), Set(), TPtr16(), TPtr16(), iPtr, operator=(), operator=(), operator=()

Inherited from TDes16:
Append(), AppendFill(), AppendFormat(), AppendFormatList(), AppendJustify(), AppendNum(), AppendNumFixedWidth(), AppendNumFixedWidthUC(), AppendNumUC(), Capitalize(), Collapse(), Collate(), Copy(), CopyC(), CopyCP(), CopyF(), CopyLC(), CopyUC(), Delete(), Fill(), FillZ(), Fold(), Format(), FormatList(), Insert(), Justify(), LeftTPtr(), LowerCase(), MaxLength(), MaxSize(), MidTPtr(), Num(), NumFixedWidth(), NumFixedWidthUC(), NumUC(), PtrZ(), Repeat(), Replace(), RightTPtr(), SetLength(), SetMax(), Swap(), Trim(), TrimAll(), TrimLeft(), TrimRight(), UpperCase(), WPtr(), Zero(), ZeroTerminate(), __DECLARE_TEST, iMaxLength, operator+=(), operator[]()

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

See also:


Construction and destruction


TPtr16()

IMPORT_C TPtr16(TUint16 *aBuf, TInt aMaxLength);

Description

Constructs the 16-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

TUint16 *aBuf

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

TInt aMaxLength

The maximum length of the descriptor.

Panic codes

USER

18 if aMaxLength is negative.


TPtr16()

IMPORT_C TPtr16(TUint16 *aBuf, TInt aLength, TInt aMaxLength);

Description

Constructs the 16-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

TUint16 *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

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

USER

18 if aMaxLength is negative.

[Top]


Member functions


operator=()

inline TPtr16 &operator=(const TUint16 *aString);

Description

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

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

Parameters

const TUint16 *aString

A pointer to a zero-terminated string.

Return value

TPtr16 &

A reference to this 16-bit modifiable pointer descriptor.

Panic codes

USER

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


operator=()

inline TPtr16 &operator=(const TDesC16 &aDes);

Description

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

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

Parameters

const TDesC16 &aDes

A 16-bit non-modifiable descriptor whose data is to be copied into this descriptor.

Return value

TPtr16 &

A reference to this 16-bit modifiable pointer descriptor.

Panic codes

USER

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


operator=()

inline TPtr16 &operator=(const TPtr16 &aDes);

Description

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

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

Parameters

const TPtr16 &aDes

A 16-bit modifiable pointer descriptor whose data is to be copied into this descriptor.

Return value

TPtr16 &

A reference to this 16-bit modifiable pointer descriptor.

Panic codes

USER

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


Set()

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

Description

Sets the 16-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

TUint16 *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

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

USER

18, if aMaxLength is negative.


Set()

inline void Set(const TPtr16 &aPtr);

Description

Sets the 16-bit modifiable pointer descriptor from an existing 16-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 TPtr16 &aPtr

The source 16-bit modifiable pointer descriptor.

[Top]


Member data


iPtr

protected: TUint16 * iPtr;

Description