Location:
e32base.h
Link against: euser.lib
CArrayFixFlat<class T>
Supported from 5.0
Array of fixed length objects contained within a flat dynamic
buffer. The elements of the array are instances of the template class
T
.
The flat dynamic buffer is an instance of a
CBufFlat
.
The elements can be T
or R
type objects
and must have an accessible default constructor.
Notes:
Where possible, use the RArray<class T>
class as
this is more efficient.
|
Defined in CArrayFixFlat
:
CArrayFixFlat()
, SetReserveL()
Inherited from CArrayFix
:
AppendL()
,
AppendL()Append
,
Array()
,
At()
,
Back()
,
End()
,
ExpandL()
,
ExtendL()
,
Find()
,
FindIsq()
,
InsertIsqAllowDuplicatesL()
,
InsertIsqL()
,
InsertL()
,
ResizeL()
,
operator[]
Inherited from CArrayFixBase
:
Compress()
,
Count()
,
Delete()
,
Length()
,
Reset()
,
Sort()
Inherited from CBase
:
operator new()
CArrayFixFlat(TInt aGranularity);
Constructs a flat array of fixed length objects with the specified granularity.
The length of all array elements is the length of the class passed as the template parameter. The length must be non-zero. A class whose length is zero causes the constructor to raise an E32USER-CBase 17 panic.
Notes
No memory is allocated to the array buffer by this constructor.
|
void SetReserveL(TInt aCount);
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 number specified in this function.
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
CArrayFixFlat::SetReserveL()
.
|
|