CArrayPtrFlat Class Reference

class CArrayPtrFlat : public CArrayPtr

Array of pointers to objects implemented using a flat dynamic buffer.

The elements of the array are pointers to instances of the template class T and are contained within a CBufFlat.

This type of array has the full behaviour of flat arrays but, in addition, the CArrayPtr<class T>::ResetAndDestroy() function offers a way of destroying all of the objects whose pointers form the elements of the array, before resetting the array.

Note that where possible, use the RPointerArray<class T> class as this is more efficient.

CBufFlat CArrayPtr::ResetAndDestroy RPointerArray

Public Member Functions
CArrayPtrFlat(TInt)
voidSetReserveL(TInt)
Inherited Functions
CArrayFix< T * >::AppendL(const T *&)
CArrayFix< T * >::AppendL(const T *&,TInt)
CArrayFix< T * >::AppendL(const T **,TInt)
CArrayFix< T * >::Array()const
CArrayFix< T * >::At(TInt)
CArrayFix< T * >::At(TInt)const
CArrayFix< T * >::Back(TInt)
CArrayFix< T * >::Back(TInt)const
CArrayFix< T * >::CArrayFix(TBufRep,TInt)
CArrayFix< T * >::End(TInt)
CArrayFix< T * >::End(TInt)const
CArrayFix< T * >::ExpandL(TInt)
CArrayFix< T * >::ExtendL()
CArrayFix< T * >::Find(const T *&,TKeyArrayFix &,TInt &)const
CArrayFix< T * >::FindIsq(const T *&,TKeyArrayFix &,TInt &)const
CArrayFix< T * >::InsertIsqAllowDuplicatesL(const T *&,TKeyArrayFix &)
CArrayFix< T * >::InsertIsqL(const T *&,TKeyArrayFix &)
CArrayFix< T * >::InsertL(TInt,const T *&)
CArrayFix< T * >::InsertL(TInt,const T *&,TInt)
CArrayFix< T * >::InsertL(TInt,const T **,TInt)
CArrayFix< T * >::ResizeL(TInt)
CArrayFix< T * >::ResizeL(TInt,const T *&)
CArrayFix< T * >::operator[](TInt)
CArrayFix< T * >::operator[](TInt)const
CArrayFixBase::AtR(const CBase *,TInt)
CArrayFixBase::CArrayFixBase(TBufRep,TInt,TInt)
CArrayFixBase::Compress()
CArrayFixBase::Count()const
CArrayFixBase::CountR(const CBase *)
CArrayFixBase::Delete(TInt)
CArrayFixBase::Delete(TInt,TInt)
CArrayFixBase::Find(const TAny *,TKeyArrayFix &,TInt &)const
CArrayFixBase::FindIsq(const TAny *,TKeyArrayFix &,TInt &)const
CArrayFixBase::InsertIsqAllowDuplicatesL(const TAny *,TKeyArrayFix &)
CArrayFixBase::InsertIsqL(const TAny *,TKeyArrayFix &)
CArrayFixBase::InsertL(TInt,const TAny *)
CArrayFixBase::InsertL(TInt,const TAny *,TInt)
CArrayFixBase::InsertRepL(TInt,const TAny *,TInt)
CArrayFixBase::Length()const
CArrayFixBase::Reset()
CArrayFixBase::ResizeL(TInt,const TAny *)
CArrayFixBase::SetKey(TKeyArrayFix &)const
CArrayFixBase::SetReserveFlatL(TInt)
CArrayFixBase::Sort(TKeyArrayFix &)
CArrayFixBase::~CArrayFixBase()
CArrayPtr::CArrayPtr(TBufRep,TInt)
CArrayPtr::ResetAndDestroy()
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()

Constructor & Destructor Documentation

CArrayPtrFlat(TInt)

CArrayPtrFlat(TIntaGranularity)[inline, explicit]

Constructs a flat array of pointers with specified granularity.

Note that no memory is allocated to the array buffer by this constructor.

panic
E32USER-CBase 18, if aGranularity is not positive.

Parameters

TInt aGranularityThe granularity of the array.

Member Functions Documentation

SetReserveL(TInt)

voidSetReserveL(TIntaCount)[inline]

Reserves space in the array buffer.

If necessary, the array buffer is allocated or re-allocated so that it can accommodate the specified number of elements.

After a successful call to this function, elements can be added to the array and the process is guaranteed not to fail for lack of memory - provided the total number of elements does not exceed the specified number.

This function does not increase the number of elements in the array; i.e. the member function CArrayFixBase::Count() returns the same value both before and after a call to this function.

panic
E32USER-CBase 27, if aCount is less than the current number of elements in the array.

Parameters

TInt aCountThe total number of elements for which space is to be reserved.