Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: BADESCA.H
Link against: bafl.lib

Class CPtrC8Array

class CPtrC8Array : public CArrayFixFlat< TPtrC8 >, public MDesC8Array;

Description

Array of 8 bit non-modifiable pointer descriptors, TPtrC8, implemented using a flat buffer. "bafl.lib"

Derivation

Members

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


Construction and destruction


CPtrC8Array()

IMPORT_C CPtrC8Array(TInt aGranularity);

Description

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

No memory is allocated to the array buffer by this constructor.

Parameters

TInt aGranularity

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


~CPtrC8Array()

IMPORT_C ~CPtrC8Array();

Description

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

[Top]


Member functions


CopyL()

IMPORT_C void CopyL(const MDesC8Array &aArray);

Description

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

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

Parameters

const MDesC8Array &aArray

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


operator=()

inline void operator=(const MDesC8Array &aArray);

Description

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

The function constructs TPtrC8 elements for each descriptor element in the specified descriptor array. This operator behaves in the same ways as CPtrC8Array::CopyL().

Parameters

const MDesC8Array &aArray


MdcaCount()

virtual IMPORT_C TInt MdcaCount() const;

Description

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

Return value

TInt

The number of elements.


MdcaPoint()

virtual IMPORT_C TPtrC8 MdcaPoint(TInt aIndex) const;

Description

Indexes into the descriptor array. The function implements the pure virtual function MDesC8Array::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

TPtrC8

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