|
||
class CArrayFixFlat< TAny > : public CArrayFix< TAny >;
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.
CBase
-
Base class for all classes to be instantiated on the heap.
CArrayFixBase
-
Base class for arrays of fixed length objects.
CArrayFix< TAny >
- A template specialisation base class for arrays of fixed length untyped objects.
CArrayFixFlat< TAny >
-
An array of fixed length untyped objects using a flat dynamic buffer.
Defined in CArrayFixFlat< TAny >
:
CArrayFixFlat(TInt,TInt)
Constructs a flat array of fixed length objects with the specified granularity t...SetReserveL(TInt)
Reserves space in the array buffer.Inherited from CArrayFix< TAny >
:
AppendL(const TAny *)
Appends the specified untyped element onto the end of the array.AppendL(const TAny *,TInt)
Appends one or more untyped elements onto the end of the array.At(TInt)
Gets a pointer to the untyped element located at the specified position within t...At(TInt)const
Gets a pointer to the untyped element located at the specified position within t...Back(TInt)
Gets a pointer to the beginning of a contiguous region.Back(TInt)const
Gets a pointer to the beginning of a contiguous region.End(TInt)
Gets a pointer to the first byte following the end of the contiguous region cont...End(TInt)const
Gets a pointer to the first byte following the end of the contiguous region cont...ExtendL()
Expands the array by the length of one element at the end of the array and retur...Inherited from CArrayFixBase
:
Compress()
Compresses the array.Count()const
Gets the number of elements held in the array.Delete(TInt)
Deletes a single element from the array at a specified position.Delete(TInt,TInt)
Deletes one or more contiguous elements from the array, starting at a specific p...Length()const
Gets the length of an element.Reset()
Deletes all elements from the array and frees the memory allocated to the array ...Sort(TKeyArrayFix &)
Sorts the elements of the array into key sequence.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...inline CArrayFixFlat(TInt aRecordLength, TInt aGranularity);
Constructs a flat array of fixed length objects with the specified granularity to contain elements of the specified length.
Note that no memory is allocated to the array buffer by this constructor.
|
|
|
inline 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()const
returns the same value both before and after a call to this function.
|
|