|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
An implementation base class for variable length arrays. More...
#include <e32base.h>
Public Member Functions | |
| IMPORT_C | ~CArrayVarBase () |
| Destructor. | |
| TInt | Count () const |
| Gets the number of elements held in the array. | |
| IMPORT_C TInt | Length (TInt anIndex) const |
| Gets the length of a specific element. | |
| IMPORT_C void | Compress () |
| Removes excess space from the array buffer. | |
| IMPORT_C void | Reset () |
| Deletes all elements from the array and frees the memory allocated to the array buffer. | |
| IMPORT_C TInt | Sort (TKeyArrayVar &aKey) |
| Sorts the elements of the array into key sequence. | |
| IMPORT_C TAny * | At (TInt anIndex) const |
| Return a pointer to the data in the array. | |
| IMPORT_C void | Delete (TInt anIndex) |
| Removes one element from the array. | |
| IMPORT_C void | Delete (TInt anIndex, TInt aCount) |
| Removes one or more contiguous elements from the array, starting at the specified position. | |
| IMPORT_C TAny * | ExpandL (TInt anIndex, TInt aLength) |
| Expand the array at anIndex. | |
| IMPORT_C TInt | Find (const TAny *aPtr, TKeyArrayVar &aKey, TInt &anIndex) const |
| Find using a sequential search. | |
| IMPORT_C TInt | FindIsq (const TAny *aPtr, TKeyArrayVar &aKey, TInt &anIndex) const |
| Find using a binary search. | |
| IMPORT_C void | InsertL (TInt anIndex, const TAny *aPtr, TInt aLength) |
| Insert a new record in the array. | |
| IMPORT_C TInt | InsertIsqL (const TAny *aPtr, TInt aLength, TKeyArrayVar &aKey) |
| Insert in sequence, no duplicates allowed. | |
| IMPORT_C TInt | InsertIsqAllowDuplicatesL (const TAny *aPtr, TInt aLength, TKeyArrayVar &aKey) |
| Insert in sequence, allow duplicates. | |
Public Member Functions inherited from CBase | |
| CBase () | |
| Default constructor. | |
| virtual IMPORT_C | ~CBase () |
| Virtual destructor. | |
| TAny * | operator new (TUint aSize, TAny *aBase) __NO_THROW |
| Initialises the object to binary zeroes. | |
| TAny * | operator new (TUint aSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TUint aExtraSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave, TUint aExtraSize) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
Protected Member Functions | |
| IMPORT_C | CArrayVarBase (TBufRep aRep, TInt aGranularity) |
| Constructor. | |
| IMPORT_C void | SetKey (TKeyArrayVar &aKey) const |
| Set the key data. | |
Protected Member Functions inherited from CBase | |
| virtual IMPORT_C TInt | Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1) |
| Extension function. | |
Static Protected Member Functions | |
| static IMPORT_C TInt | CountR (const CBase *aPtr) |
| Return the number of items in the array. | |
| static IMPORT_C const TAny * | AtR (const CBase *aPtr, TInt anIndex) |
| Return the address of an item in the array. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CBase | |
| static IMPORT_C void | Delete (CBase *aPtr) |
| Deletes the specified object. | |
An implementation base class for variable length arrays.
It provides implementation and public functions which are common to all variable length type arrays.
The class is always derived from and is never instantiated explicitly.
| IMPORT_C CArrayVarBase::~CArrayVarBase | ( | ) |
Destructor.
Frees all resources owned by the object, prior to its destruction.
(generated from Symbian Developer Library)
|
protected |
Constructor.
(generated from Original Symbian implementation)
| IMPORT_C TAny * CArrayVarBase::At | ( | TInt | anIndex | ) | const |
Return a pointer to the data in the array.
(generated from Original Symbian implementation)
|
staticprotected |
Return the address of an item in the array.
(generated from Original Symbian implementation)
| IMPORT_C void CArrayVarBase::Compress | ( | ) |
Removes excess space from the array buffer.
The effect is to reduce the memory allocated to the array buffer so that it is just sufficient to represent the array. This applies to both flat and segmented array buffers.
If the array is empty, then the memory allocated to the array buffer is freed.
(generated from Symbian Developer Library)
|
inline |
Gets the number of elements held in the array.
(generated from Symbian Developer Library)
|
staticprotected |
Return the number of items in the array.
(generated from Original Symbian implementation)
| IMPORT_C void CArrayVarBase::Delete | ( | TInt | anIndex | ) |
Removes one element from the array.
Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayVarBase::Compress() to return excess space to the heap.
| anIndex | The position within the array of the element to delete. The position is relative to zero. |
Panic condition: E32USER-CBase 21, if anIndex is negative or greater than the number of elements currently in the array.
(generated from Symbian Developer Library)
| IMPORT_C void CArrayVarBase::Delete | ( | TInt | anIndex, |
| TInt | aCount | ||
| ) |
Removes one or more contiguous elements from the array, starting at the specified position.
Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayVarBase::Compress() to return excess space to the heap.
| anIndex | The position within the array from where deletion of elements is to start. The position is relative to zero, i.e. zero implies that elements, starting with the first, are deleted from the array. |
| aCount | The number of elements to be deleted from the array. |
Panic condition: E32USER-CBase 21, if anIndex is negative or greater than or equal to the number of elements currently in the array.
Panic condition: E32USER-CBase 25, if aCount is negative.
Panic condition: E32USER-CBase 29, if the sum of anIndexPos and aCount is greater than the number of elements currently in the array.
(generated from Symbian Developer Library)
| IMPORT_C TAny * CArrayVarBase::ExpandL | ( | TInt | anIndex, |
| TInt | aLength | ||
| ) |
Expand the array at anIndex.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::Find | ( | const TAny * | aPtr, |
| TKeyArrayVar & | aKey, | ||
| TInt & | anIndex | ||
| ) | const |
Find using a sequential search.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::FindIsq | ( | const TAny * | aPtr, |
| TKeyArrayVar & | aKey, | ||
| TInt & | anIndex | ||
| ) | const |
Find using a binary search.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::InsertIsqAllowDuplicatesL | ( | const TAny * | aPtr, |
| TInt | aLength, | ||
| TKeyArrayVar & | aKey | ||
| ) |
Insert in sequence, allow duplicates.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::InsertIsqL | ( | const TAny * | aPtr, |
| TInt | aLength, | ||
| TKeyArrayVar & | aKey | ||
| ) |
Insert in sequence, no duplicates allowed.
(generated from Original Symbian implementation)
| IMPORT_C void CArrayVarBase::InsertL | ( | TInt | anIndex, |
| const TAny * | aPtr, | ||
| TInt | aLength | ||
| ) |
Insert a new record in the array.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::Length | ( | TInt | anIndex | ) | const |
Gets the length of a specific element.
| anIndex | The position of the element within the array. The position is relative to zero, (i.e. the first element in the array is at position 0). |
Panic condition: E32USER-CBase 21, if anIndex is negative or is greater than the number of elements currently in the array.
(generated from Symbian Developer Library)
| IMPORT_C void CArrayVarBase::Reset | ( | ) |
Deletes all elements from the array and frees the memory allocated to the array buffer.
As each element of a variable array is contained within its own heap cell, this function has the effect of freeing all such cells.
(generated from Symbian Developer Library)
|
protected |
Set the key data.
(generated from Original Symbian implementation)
| IMPORT_C TInt CArrayVarBase::Sort | ( | TKeyArrayVar & | aKey | ) |
Sorts the elements of the array into key sequence.
| aKey | The key object defining the properties of the key. |
(generated from Symbian Developer Library)