CContactIdArray Class Reference

class CContactIdArray : public CBase

Array of contact item IDs (TContactItemIds).

Instances of this class are used in several contact database functions, for instance CContactDatabase::DeleteContactsL().

Inherits from

Constructor & Destructor Documentation

CContactIdArray()

CContactIdArray()[private]

~CContactIdArray()

IMPORT_C~CContactIdArray()

Member Functions Documentation

AddL(TContactItemId)

IMPORT_C voidAddL(TContactItemIdaId)

Parameters

TContactItemId aId

CloneL(const CContactIdArray *)

voidCloneL(const CContactIdArray *aArray)[private]

Parameters

const CContactIdArray * aArray

ConstructL()

voidConstructL()[private]

Count()

TInt Count()const [inline]

Gets the number of contact IDs in the array.

The number of contact IDs in the array.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

Find(TContactItemId)

IMPORT_C TIntFind(TContactItemIdaId)const

Parameters

TContactItemId aId

InsertL(TInt, TContactItemId)

voidInsertL(TIntaIndex,
TContactItemIdaId
)[inline]

Inserts a contact ID into the array.

The index must be valid or a panic occurs.

The function may attempt to expand the array buffer. If there is insufficient memory available, the function leaves. The leave code is one of the system error codes. If the function leaves, the array is left in the state it was in before the call.

Parameters

TInt aIndexThe index at which to insert the contact ID.
TContactItemId aIdThe contact ID to insert.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Parameters

RReadStream & aStream

MoveL(TInt, TInt)

IMPORT_C voidMoveL(TIntaOldIndex,
TIntaNewIndex
)

Parameters

TInt aOldIndex
TInt aNewIndex

NewL()

IMPORT_C CContactIdArray *NewL()[static]

NewL(const CContactIdArray *)

IMPORT_C CContactIdArray *NewL(const CContactIdArray *aArray)[static]

Parameters

const CContactIdArray * aArray

NewLC()

IMPORT_C CContactIdArray *NewLC()[static]

NewLC(const CContactIdArray *)

IMPORT_C CContactIdArray *NewLC(const CContactIdArray *aArray)[static]

Parameters

const CContactIdArray * aArray

NewLC(RReadStream &)

CContactIdArray *NewLC(RReadStream &aStream)[static]

Parameters

RReadStream & aStream

Remove(TInt)

voidRemove(TIntaIndex)[inline]

Removes the indexed contact ID from the array.

The index value must not be negative and must not be greater than the number of elements in the array, otherwise the function raises a panic.

Parameters

TInt aIndexThe index of the contact ID to remove.

Remove(TInt, TInt)

voidRemove(TIntaIndex,
TIntaCount
)[inline]

Removes a block of contact IDs from the array.

This function raises a panic if any of the following are true:-

  • aCount is negative

  • aIndex is negative or is greater than the number of elements currently in the array

  • the sum of aIndex and aCount is greater than the number of elements currently in the array

Parameters

TInt aIndexThe index of the first contact ID to remove.
TInt aCountThe number of contiguous contact IDs to delete from the array. If this is not specified, a value of one is assumed.

Reset()

voidReset()[inline]

Removes all contact IDs from the array.

ReverseOrder()

IMPORT_C voidReverseOrder()

Sort()

voidSort()

operator[](TInt)

const TContactItemId &operator[](TIntaIndex)const [inline]

Gets the indexed TContactItemId.

A reference to a const element of the array.

Parameters

TInt aIndexThe position of the contact ID within the array, relative to zero. This must be non-negative and less than the number of objects in the array otherwise the operator raises a panic.

operator[](TInt)

TContactItemId &operator[](TIntaIndex)[inline]

Gets the indexed TContactItemId.

A reference to a non-const element of the array.

Parameters

TInt aIndexThe position of the contact ID within the array, relative to zero. This must be non-negative and less than the number of objects in the array otherwise the operator raises a panic.

Member Data Documentation

CArrayFixFlat< TContactItemId > * iIds

CArrayFixFlat< TContactItemId > *iIds[private]