Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: badesca.h
Link against: bafl.lib

Class CPtrC16Array

CPtrC16Array

Support

Supported from 5.0

Description

An array of 16 bit non-modifiable pointer descriptors, TPtrC16, implemented using a flat buffer.

Derivation

CArrayFixA thin templated base class for arrays of fixed length objects
CArrayFixBaseBase class for arrays of fixed length objects
CArrayFixFlatArray of fixed length objects contained within a flat dynamic buffer
CBaseBase class for all classes to be instantiated on the heap
CPtrC16ArrayAn array of 16 bit non-modifiable pointer descriptors, TPtrC16, implemented using a flat buffer
MDesC16ArrayInterface class for 16 bit descriptor arrays

Defined in CPtrC16Array:
CPtrC16Array(), CopyL(), MdcaCount(), MdcaPoint(), operator=, ~CPtrC16Array()

Inherited from CArrayFix:
AppendL(), AppendL()Append, Array(), At(), Back(), End(), ExpandL(), ExtendL(), Find(), FindIsq(), InsertIsqAllowDuplicatesL(), InsertIsqL(), InsertL(), ResizeL(), operator[]

Inherited from CArrayFixBase:
Compress(), Count(), Delete(), Length(), Reset(), Sort()

Inherited from CArrayFixFlat:
SetReserveL()

Inherited from CBase:
operator new()


Construction and destruction


CPtrC16Array()

CPtrC16Array(TInt aGranularity);

Description

Constructs an array of 16 bit non-modifiable descriptors with the specified granularity. The length of all elements in the array buffer is the length of a TPtrC16 object.

No memory is allocated to the array buffer by constructor.

Parameters

TInt aGranularity

The granularity of the array. This value must be positive otherwise the constructor raises an E32USER-CBase 18 panic.


~CPtrC16Array()

~CPtrC16Array();

Description

Frees all resources owned by the object, prior to its destruction.

[Top]


Basic information


MdcaCount()

TInt MdcaCount() const;

Description

Returns the number of elements in the array. The function implements the pure virtual function MDesC16Array::MdcaCount().

Return value

TInt

The number of elements.

[Top]


Assignment


CopyL()

void CopyL(const MDesC16Array& aArray);

Description

Copies a descriptor array into this array, deleting any pre-existing elements.

The function constructs TPtrC16 elements for each descriptor element in the specified descriptor array.

Parameters

const MDesC16Array& aArray

A reference to any descriptor array which satisfies the protocol defined by this mixin class.


operator=

void operator=(const MDesC16Array& aArray);

Description

Copies a descriptor array into this array, deleting any pre-existing elements.

The function constructs TPtrC16 elements for each descriptor element in the specified descriptor array.

This operator behaves in the same ways as CPtrC16Array::CopyL().

Parameters

const MDesC16Array& aArray

A reference to any descriptor array which satisfies the protocol defined by this mixin class.

[Top]


Indexing into the array


MdcaPoint()

TPtrC16 MdcaPoint(TInt aIndex) const;

Description

Indexes into the descriptor array. The function implements the pure virtual function MDesC16Array::MdcaPoint().

Parameters

TInt aIndex

The position of the descriptor element within the array. The position is relative to zero; i.e. zero implies the first descriptor element in the array. This value must be non-negative and must be less than the number of elements currently in the array otherwise the operator raises a E32USER-CBase 21 panic.

Return value

TPtrC16

A non-modifiable pointer descriptor for the data represented by the element at position aIndex within the array.