CArrayFixBase Class Reference

#include <e32base.h>

class CArrayFixBase : public CBase

Inherits from

Public Member Functions
~CArrayFixBase()
IMPORT_C TAny *At(TInt)
IMPORT_C TAny *Back(TInt)
IMPORT_C voidCompress()
TInt Count()
IMPORT_C voidDelete(TInt)
IMPORT_C voidDelete(TInt, TInt)
IMPORT_C TAny *End(TInt)
IMPORT_C TAny *ExpandL(TInt)
IMPORT_C TIntFind(const TAny *, TKeyArrayFix &, TInt &)
IMPORT_C TIntFindIsq(const TAny *, TKeyArrayFix &, TInt &)
IMPORT_C TIntInsertIsqAllowDuplicatesL(const TAny *, TKeyArrayFix &)
IMPORT_C TIntInsertIsqL(const TAny *, TKeyArrayFix &)
IMPORT_C voidInsertL(TInt, const TAny *)
IMPORT_C voidInsertL(TInt, const TAny *, TInt)
TInt Length()
IMPORT_C voidReset()
IMPORT_C voidResizeL(TInt, const TAny *)
IMPORT_C TIntSort(TKeyArrayFix &)
Protected Member Functions
CArrayFixBase(TBufRep, TInt, TInt)
IMPORT_C const TAny *AtR(const CBase *, TInt)
IMPORT_C TIntCountR(const CBase *)
IMPORT_C voidInsertRepL(TInt, const TAny *, TInt)
IMPORT_C voidSetKey(TKeyArrayFix &)
IMPORT_C voidSetReserveFlatL(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Detailed Description

Base class for arrays of fixed length objects.

It provides implementation and public functions which are common to all arrays of this type.

The class is always derived from and is never instantiated explicitly.

Constructor & Destructor Documentation

CArrayFixBase ( TBufRep, TInt, TInt )

IMPORT_CCArrayFixBase(TBufRepaRep,
TIntaRecordLength,
TIntaGranularity
)[protected]

~CArrayFixBase ( )

IMPORT_C~CArrayFixBase()

Destructor.

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

Member Function Documentation

At ( TInt )

IMPORT_C TAny *At(TIntanIndex)const

AtR ( const CBase *, TInt )

IMPORT_C const TAny *AtR(const CBase *aPtr,
TIntanIndex
)[protected, static]

Back ( TInt )

IMPORT_C TAny *Back(TIntanIndex)const

Compress ( )

IMPORT_C voidCompress()

Compresses the array.

The function removes the excess space from the array buffer. The effect is to reduce the memory allocated to the array buffer so that it is just sufficient to contain the elements of the array. This applies to both flat and segmented array buffers.

If the array is empty, then the memory allocated to the array buffer is freed.

Count ( )

TInt Count()const [inline]

Gets the number of elements held in the array.

Returns: The number of array elements

CountR ( const CBase * )

IMPORT_C TIntCountR(const CBase *aPtr)[protected, static]

Delete ( TInt )

IMPORT_C voidDelete(TIntanIndex)

Deletes a single element from the array at a specified position.

Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayFixBase::Compress() to return excess space to the heap.

panic
E32USER-CBase 21, if anIndex is negative or is greater than or equal to the number of elements currently in the array.

See also: CArrayFixBase::Compress

ParameterDescription
anIndexThe position within the array at which to delete the element, This is a value relative to zero.

Delete ( TInt, TInt )

IMPORT_C voidDelete(TIntanIndex,
TIntaCount
)

Deletes one or more contiguous elements from the array, starting at a specific position.

Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayFixBase::Compress() to return excess space to the heap.

panic
E32USER-CBase 21, if anIndex is negative, or is greater than or equal to the number of elements currently in the array.
panic
E32USER-CBase 22, if aCount is negative.
panic
E32USER-CBase 29, if the sum of anIndex and aCount is greater than or equal to the number of elements currently in the array.
ParameterDescription
anIndexThe position within the array from where deletion of elements is to start. The position is relative to zero, i.e. zero implies that elements, starting with the first, are deleted from the array.
aCountThe number of contiguous elements to be deleted from the array.

End ( TInt )

IMPORT_C TAny *End(TIntanIndex)const

ExpandL ( TInt )

IMPORT_C TAny *ExpandL(TIntanIndex)

Find ( const TAny *, TKeyArrayFix &, TInt & )

IMPORT_C TIntFind(const TAny *aPtr,
TKeyArrayFix &aKey,
TInt &anIndex
)const

FindIsq ( const TAny *, TKeyArrayFix &, TInt & )

IMPORT_C TIntFindIsq(const TAny *aPtr,
TKeyArrayFix &aKey,
TInt &anIndex
)const

InsertIsqAllowDuplicatesL ( const TAny *, TKeyArrayFix & )

IMPORT_C TIntInsertIsqAllowDuplicatesL(const TAny *aPtr,
TKeyArrayFix &aKey
)

InsertIsqL ( const TAny *, TKeyArrayFix & )

IMPORT_C TIntInsertIsqL(const TAny *aPtr,
TKeyArrayFix &aKey
)

InsertL ( TInt, const TAny * )

IMPORT_C voidInsertL(TIntanIndex,
const TAny *aPtr
)

InsertL ( TInt, const TAny *, TInt )

IMPORT_C voidInsertL(TIntanIndex,
const TAny *aPtr,
TIntaCount
)

InsertRepL ( TInt, const TAny *, TInt )

IMPORT_C voidInsertRepL(TIntanIndex,
const TAny *aPtr,
TIntaReplicas
)[protected]

Length ( )

TInt Length()const [inline]

Gets the length of an element.

Returns: The length of an element of type class T.

Reset ( )

IMPORT_C voidReset()

Deletes all elements from the array and frees the memory allocated to the array buffer.

ResizeL ( TInt, const TAny * )

IMPORT_C voidResizeL(TIntaCount,
const TAny *aPtr
)

SetKey ( TKeyArrayFix & )

IMPORT_C voidSetKey(TKeyArrayFix &aKey)const [protected]

SetReserveFlatL ( TInt )

IMPORT_C voidSetReserveFlatL(TIntaCount)[protected]

Sort ( TKeyArrayFix & )

IMPORT_C TIntSort(TKeyArrayFix &aKey)

Sorts the elements of the array into key sequence.

ParameterDescription
aKeyThe key object defining the properties of the key.

Returns: KErrNone if the sort completes successfully. KErrGeneral if the stack overflows