Location:
e32base.h
Link against: euser.lib
TEMPLATE_SPECIALIZATION class CArrayPak<TAny>
: public CArrayPakBase
Supported from 5.0
A template specialisation base class for variable length, packed, arrays. The array buffer organisation is defined at construction.
The class is useful for constructing an array of variable 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 CArrayPak
:
AppendL()
, At()
, CArrayPak()
, ExtendL()
, ~CArrayPak()
Inherited from CArrayPakBase
:
Compress()
,
Count()
,
Delete()
,
Length()
,
Reset()
,
SortL()
Inherited from CBase
:
operator new()
CArrayPak(TBufRep aRep,TInt aGranularity);
Constructs a variable array with the specified granularity and buffer organisation.
Notes
No memory is allocated to the array buffer by this C++ constructor.
|
~CArrayPak()
The destructor is empty and is present only to cause the virtual function table to be defined in a unique module.
void AppendL(const TAny* aPtr,TInt aLength);
Appends the untyped element of the specified length onto the end of the array.
|
|
TAny* ExtendL(TInt aLength);
Expands the array by one element of the specified length at the end
of the array, i.e. at position CArrayPakBase::Count()
, and returns
a pointer to this new location.
As elements are untyped, no construction is possible and the content of the new location remains undefined.
|
|
const TAny* At(TInt anIndex) const;
TAny* At(TInt anIndex);
Returns a pointer to the untyped element located at the specified position within the array.
Two versions of the function are supplied. The compiler chooses the appropriate version based on the use made of the returned reference. If the returned reference is used in an expression where that reference can be modified, then the non-const version is chosen.
|
|