Location:
e32base.h
Link against: euser.lib
CArrayFixFlat<TAny>
Supported from 5.0
An array of fixed length untyped objects using a flat dynamic
buffer. The array elements are contained within a CBufFlat
.
The class is useful for constructing an array of fixed length buffers, where the length is decided at run time.
This class is also useful as a data member of a base class in a thin template class/base class pair where the type of the array element is not known until the owning thin template class is instantiated.
|
Defined in CArrayFixFlat
:
CArrayFixFlat()
, SetReserveL()
, ~CArrayFixFlat()
Inherited from CArrayFix<TAny>
:
AppendL()
,
AppendL()Append
,
At()
,
Back()
,
End()
,
ExtendL()
Inherited from CArrayFixBase
:
Compress()
,
Count()
,
Delete()
,
Length()
,
Reset()
,
Sort()
Inherited from CBase
:
operator new()
CArrayFixFlat(TInt aRecordLength,TInt aGranularity);
Constructs a flat array of fixed length objects with the specified granularity to contain elements of the specified length.
Notes
No memory is allocated to the array buffer by this C++ constructor.
|
~CArrayFixFlat()
The destructor is empty and is present only to cause the virtual function table to be defined in a unique module.
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 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.
|
|