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() .
Public Member Functions | |
---|---|
~CContactIdArray () | |
IMPORT_C void | AddL ( TContactItemId ) |
TInt | Count () |
IMPORT_C void | ExternalizeL ( RWriteStream &) |
IMPORT_C TInt | Find ( TContactItemId ) |
void | InsertL ( TInt , TContactItemId ) |
IMPORT_C void | InternalizeL ( RReadStream &) |
IMPORT_C void | MoveL ( TInt , TInt ) |
IMPORT_C CContactIdArray * | NewL () |
IMPORT_C CContactIdArray * | NewL (const CContactIdArray *) |
IMPORT_C CContactIdArray * | NewLC () |
IMPORT_C CContactIdArray * | NewLC (const CContactIdArray *) |
CContactIdArray * | NewLC ( RReadStream &) |
void | Remove ( TInt ) |
void | Remove ( TInt , TInt ) |
void | Reset () |
IMPORT_C void | ReverseOrder () |
void | Sort () |
const TContactItemId & | operator[] ( TInt ) |
TContactItemId & | operator[] ( TInt ) |
Private Member Functions | |
---|---|
CContactIdArray () | |
void | CloneL (const CContactIdArray *) |
void | ConstructL () |
Private Attributes | |
---|---|
CArrayFixFlat < TContactItemId > * | iIds |
IMPORT_C | ~CContactIdArray | ( | ) |
The destructor frees all resources owned by the array, prior to its destruction.
IMPORT_C void | AddL | ( | TContactItemId | aId | ) |
Appends a contact ID to the array.
TContactItemId aId | The contact ID to append to the array. |
void | CloneL | ( | const CContactIdArray * | aArray | ) | [private] |
const CContactIdArray * aArray |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises a CContactIdArray object to a write stream. The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
RWriteStream & aStream | Stream to which the object should be externalised. |
IMPORT_C TInt | Find | ( | TContactItemId | aId | ) | const |
Finds the index of the specified contact ID within the array.
TContactItemId aId | The contact ID to find. |
void | InsertL | ( | TInt | aIndex, |
TContactItemId | aId | |||
) | [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.
TInt aIndex | The index at which to insert the contact ID. |
TContactItemId aId | The contact ID to insert. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises a CContactIdArray object from a read stream. The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class.
RReadStream & aStream | Stream from which the object should be internalised. |
IMPORT_C void | MoveL | ( | TInt | aOldIndex, |
TInt | aNewIndex | |||
) |
Moves a contact ID within the array.
Note: both indexes must be valid or a panic occurs.
IMPORT_C CContactIdArray * | NewL | ( | ) | [static] |
Allocates and constructs a new contact ID array.
IMPORT_C CContactIdArray * | NewL | ( | const CContactIdArray * | aArray | ) | [static] |
Allocates and constructs a new contact ID array and then copies the contents of aArray into it.
const CContactIdArray * aArray | Pointer to the contact ID array to copy. |
IMPORT_C CContactIdArray * | NewLC | ( | ) | [static] |
Allocates and constructs a new contact ID array.
The pointer to the object is left on the cleanup stack.
IMPORT_C CContactIdArray * | NewLC | ( | const CContactIdArray * | aArray | ) | [static] |
Allocates and constructs a new contact ID array and then copies the contents of aArray into it.
The pointer to the object is left on the cleanup stack.
const CContactIdArray * aArray | Pointer to the contact ID array to copy. |
CContactIdArray * | NewLC | ( | RReadStream & | aStream | ) | [static] |
Allocates and constructs a new contact ID array based on a RReadStream .
The pointer to the object is left on the cleanup stack.
RReadStream & aStream | RReadStream containing object to internalize. |
void | Remove | ( | TInt | aIndex | ) | [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.
TInt aIndex | The index of the contact ID to remove. |
void | Remove | ( | TInt | aIndex, |
TInt | aCount | |||
) | [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
const TContactItemId & | operator[] | ( | TInt | aIndex | ) | const [inline] |
Gets the indexed TContactItemId.
TInt aIndex | The 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. |
TContactItemId & | operator[] | ( | TInt | aIndex | ) | [inline] |
Gets the indexed TContactItemId.
TInt aIndex | The 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. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.