|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Array of raw pointers. More...
#include <e32cmn.h>
Public Member Functions | |
| RPointerArray () | |
| Default C++ constructor. | |
| RPointerArray (TInt aGranularity) | |
| C++ constructor with granularity. | |
| RPointerArray (TInt aMinGrowBy, TInt aFactor) | |
| C++ constructor with minimum growth step and exponential growth factor. | |
| void | Close () |
| Closes the array and frees all memory allocated to it. | |
| TInt | Count () const |
| Gets the number of pointers in the array. | |
| TAny *const & | operator[] (TInt anIndex) const |
| Gets a reference to the pointer located at the specified position within the array. | |
| TAny *& | operator[] (TInt anIndex) |
| Gets a reference to the pointer located at the specified position within the array. | |
| TInt | Append (const TAny *anEntry) |
| Appends an pointer onto the array. | |
| TInt | Insert (const TAny *anEntry, TInt aPos) |
| Inserts an pointer into the array at the specified position. | |
| void | Remove (TInt anIndex) |
| Removes the pointer at the specified position from the array. | |
| void | Compress () |
| Compresses the array down to a minimum. | |
| void | Reset () |
| Empties the array. | |
| TInt | Find (const TAny *anEntry) const |
| Finds the first pointer in the array which matches the specified pointer, using a sequential search. | |
| TInt | FindReverse (const TAny *anEntry) const |
| Finds the last pointer in the array which matches the specified pointer, using a sequential search. | |
| TInt | FindInAddressOrder (const TAny *anEntry) const |
| Finds the pointer in the array that matches the specified object pointer, using a binary search technique. | |
| TInt | FindInAddressOrder (const TAny *anEntry, TInt &anIndex) const |
| Finds the pointer in the array that matches the specified object pointer, using a binary search technique. | |
| TInt | SpecificFindInAddressOrder (const TAny *anEntry, TInt aMode) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| TInt | SpecificFindInAddressOrder (const TAny *anEntry, TInt &anIndex, TInt aMode) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| TInt | InsertInAddressOrder (const TAny *anEntry) |
| Inserts an pointer into the array in address order. | |
| TInt | InsertInAddressOrderAllowRepeats (const TAny *anEntry) |
| Inserts an pointer into the array in address order, allowing duplicates. | |
| void | AppendL (const TAny *anEntry) |
| Appends an pointer onto the array. | |
| void | InsertL (const TAny *anEntry, TInt aPos) |
| Inserts an pointer into the array at the specified position. | |
| TInt | FindL (const TAny *anEntry) const |
| Finds the first pointer in the array which matches the specified pointer, using a sequential search. | |
| TInt | FindReverseL (const TAny *anEntry) const |
| Finds the last pointer in the array which matches the specified pointer, using a sequential search. | |
| TInt | FindInAddressOrderL (const TAny *anEntry) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| void | FindInAddressOrderL (const TAny *anEntry, TInt &anIndex) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| TInt | SpecificFindInAddressOrderL (const TAny *anEntry, TInt aMode) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| void | SpecificFindInAddressOrderL (const TAny *anEntry, TInt &anIndex, TInt aMode) const |
| Finds the pointer in the array that matches the specified pointer, using a binary search technique. | |
| void | InsertInAddressOrderL (const TAny *anEntry) |
| Inserts an pointer into the array in address order. | |
| void | InsertInAddressOrderAllowRepeatsL (const TAny *anEntry) |
| Inserts an pointer into the array in address order, allowing duplicates. | |
| RPointerArray (TAny **aEntries, TInt aCount) | |
| C++ constructor with a pointer to the first array entry in a pre-existing array, and the number of entries in that array. | |
| void | GranularCompress () |
| Compresses the array down to a granular boundary. | |
| void | SortIntoAddressOrder () |
| Sorts the pointers within the array into address order. | |
| TArray< TAny * > | Array () const |
| Constructs and returns a generic array. | |
Array of raw pointers.
The array is a simple and efficient specialized array of TAny pointers offering standard array behaviour.
The derivation from RPointerArrayBase is private.
|
inline |
Default C++ constructor.
This constructs an array object for an array of TAny pointers with default granularity, which is 8.
(generated from Symbian Developer Library)
|
inlineexplicit |
C++ constructor with granularity.
This constructs an array object for an array of TAny pointers with the specified granularity.
| aGranularity | The granularity of the array. |
Panic condition: USER 127, if aGranularity is not positive, or greater than or equal to 0x10000000.
(generated from Symbian Developer Library)
|
inline |
C++ constructor with minimum growth step and exponential growth factor.
This constructs an array object for an array of TAny pointers with the specified minimum growth step and exponential growth factor.
| aMinGrowBy | The minimum growth step of the array. Must be between 1 and 65535 inclusive. |
| aFactor | The factor by which the array grows, multiplied by 256. For example 512 specifies a factor of 2. Must be between 257 and 32767 inclusive. |
Panic condition: USER 192, if aMinGrowBy<=0 or aMinGrowBy>65535.
Panic condition: USER 193, if aFactor<=257 or aFactor>32767.
(generated from Symbian Developer Library)
|
inline |
C++ constructor with a pointer to the first array entry in a pre-existing array, and the number of entries in that array.
This constructor takes a pointer to a pre-existing set of entries of type TAny*, which is owned by another RPointerArray object. Ownership of the set of entries still resides with the original RPointerArray object.
| aEntries | A pointer to the first entry of type TAny* in the set of entries belonging to the existing array. |
| aCount | The number of entries in the existing array. The granularity of this array is set to this value. |
Panic condition: USER 156, if aCount is not positive.
(generated from Symbian Developer Library)
|
inline |
Appends an pointer onto the array.
| anEntry | The pointer to be appended. |
(generated from Symbian Developer Library)
|
inline |
Appends an pointer onto the array.
The function leaves with one of the system wide error codes, if the operation fails.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be appended. |
(generated from Symbian Developer Library)
|
inline |
|
inline |
Closes the array and frees all memory allocated to it.
The function must be called before this array object goes out of scope.
Note that the function does not delete the objects whose pointers are contained in the array.
(generated from Symbian Developer Library)
|
inline |
Compresses the array down to a minimum.
After a call to this function, the memory allocated to the array is just sufficient for its contained pointers. Subsequently adding a new pointer to the array always results in a re-allocation of memory.
(generated from Symbian Developer Library)
|
inline |
Gets the number of pointers in the array.
(generated from Symbian Developer Library)
|
inline |
Finds the first pointer in the array which matches the specified pointer, using a sequential search.
Matching is based on the comparison of pointers.
The find operation always starts at the low index end of the array. There is no assumption about the order of objects in the array.
| anEntry | The pointer to be found. |
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified object pointer, using a binary search technique.
The function assumes that pointers in the array are in address order.
| anEntry | The pointer to be found. |
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified object pointer, using a binary search technique.
The function assumes that pointers in the array are in address order.
| anEntry | The pointer to be found. |
| anIndex | A TInt supplied by the caller. On return, contains an index value: If the function returns KErrNone, this is the index of the matching pointer within the array. If the function returns KErrNotFound, this is the index of the last pointer within the array which logically precedes anEntry. |
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
The function assumes that pointers in the array are in address order.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
Leave condition: KErrNotFound, if no suitable pointer can be found.
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
The function assumes that pointers in the array are in address order.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
| anIndex | A reference to a TInt into which the function puts an index value: If the function does not leave, this is the index of the matching pointer within the array. If the function leaves with KErrNotFound, this is the index of the last pointer within the array which logically precedes anEntry. |
Leave condition: KErrNotFound, if no suitable pointer can be found.
(generated from Symbian Developer Library)
|
inline |
Finds the first pointer in the array which matches the specified pointer, using a sequential search.
Matching is based on the comparison of pointers.
The find operation always starts at the low index end of the array. There is no assumption about the order of objects in the array.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
Leave condition: KErrNotFound, if no matching pointer can be found.
(generated from Symbian Developer Library)
|
inline |
Finds the last pointer in the array which matches the specified pointer, using a sequential search.
Matching is based on the comparison of pointers.
The find operation always starts at the high index end of the array. There is no assumption about the order of objects in the array.
| anEntry | The pointer to be found. |
(generated from Symbian Developer Library)
|
inline |
Finds the last pointer in the array which matches the specified pointer, using a sequential search.
Matching is based on the comparison of pointers.
The find operation always starts at the high index end of the array. There is no assumption about the order of objects in the array.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
Leave condition: KErrNotFound, if no matching pointer can be found.
(generated from Symbian Developer Library)
|
inline |
Compresses the array down to a granular boundary.
After a call to this function, the memory allocated to the array is sufficient for its contained pointers. Adding new pointers to the array does not result in a re-allocation of memory until the the total number of pointers reaches a multiple of the granularity.
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array at the specified position.
| anEntry | The pointer to be inserted. |
| aPos | The position within the array where the pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. |
Panic condition: USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array in address order.
No duplicate entries are permitted. The array remains unchanged following an attempt to insert a duplicate entry.
The function assumes that existing pointers within the array are in address order.
| anEntry | The pointer to be inserted. |
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array in address order, allowing duplicates.
If the new pointer is a duplicate of an existing pointer in the array, then the new pointer is inserted after the existing one. If more than one duplicate pointer already exists in the array, then any new duplicate pointer is inserted after the last one.
The function assumes that existing pointers within the array are in address order.
| anEntry | The pointer to be inserted. |
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array in address order, allowing duplicates.
If the new pointer is a duplicate of an existing pointer in the array, then the new pointer is inserted after the existing one. If more than one duplicate pointer already exists in the array, then any new duplicate pointer is inserted after the last one.
The function assumes that existing pointers within the array are in address order.
The function leaves with one of the system wide error codes, if the operation fails.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be inserted. |
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array in address order.
No duplicate entries are permitted. The function assumes that existing pointers within the array are in address order.
The function leaves with one of the system wide error codes, if the operation fails.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be inserted. |
(generated from Symbian Developer Library)
|
inline |
Inserts an pointer into the array at the specified position.
The function leaves with one of the system wide error codes, if the operation fails.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be inserted. |
| aPos | The position within the array where the pointer is to be inserted. The position is relative to zero, i.e. zero implies that a pointer is inserted at the beginning of the array. |
Panic condition: USER 131, if aPos is negative, or is greater than the number of object pointers currently in the array.
(generated from Symbian Developer Library)
|
inline |
Gets a reference to the pointer located at the specified position within the array.
The compiler chooses this option if the returned reference is used in an expression where the reference can be modified.
| anIndex | The position of the pointer within the array. The position is relative to zero, i.e. zero implies the object pointer at the beginning of the array. |
Panic condition: USER 130, if anIndex is negative, or is greater than the number of objects currently in the array.
(generated from Symbian Developer Library)
|
inline |
Gets a reference to the pointer located at the specified position within the array.
The compiler chooses this option if the returned reference is used in an expression where the reference cannot be modified.
| anIndex | The position of the pointer within the array. The position is relative to zero, i.e. zero implies the object pointer at the beginning of the array. |
Panic condition: USER 130, if anIndex is negative, or is greater than the number of objects currently in the array.
(generated from Symbian Developer Library)
|
inline |
Removes the pointer at the specified position from the array.
Note that the function does not delete the object whose pointer is removed.
| anIndex | The position within the array from where the pointer is to be removed. The position is relative to zero, i.e. zero implies that a pointer at the beginning of the array is to be removed. |
Panic condition: USER 130, if anIndex is negative, or is greater than the number of objects currently in the array.
(generated from Symbian Developer Library)
|
inline |
Empties the array.
It frees all memory allocated to the array and resets the internal state so that it is ready to be reused.
This array object can be allowed to go out of scope after a call to this function.
Note that the function does not delete the objects whose pointers are contained in the array.
(generated from Symbian Developer Library)
|
inline |
Sorts the pointers within the array into address order.
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
Where there is more than one matching element, it finds the first, the last or any matching element as specified by the value of aMode.
The function assumes that pointers in the array are in address order.
TArrayFindMode
| anEntry | The pointer to be found. |
| anIndex | A TInt type supplied by the caller. On return, it contains an index value depending on whether a match is found and on the value of aMode. If there is no matching element in the array, then this is the index of the first element in the array that is bigger than the element being searched for - if no elements in the array are bigger, then the index value is the same as the total number of elements in the array. If there is a matching element, then what the index refers to depends on the value of aMode: if this is EArrayFindMode_First, then the index refers to the first matching element; if this is EArrayFindMode_Any, then the index can refer to any of the matching elements; if this is EArrayFindMode_Last, then the index refers to first element that follows the last matching element - if the last matching element is also the last element of the array, then the index value is the same as the total number of elements in the array. |
| aMode | Specifies whether to find the first match, the last match or any match, as defined by one of the TArrayFindMode enum values. |
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
Where there is more than one matching element, it finds the first, the last or any matching element as specified by the value of aMode.
The function assumes that pointers in the array are in address order.
TArrayFindMode
| anEntry | The pointer to be found. |
| aMode | Specifies whether to find the first match, the last match or any match, as defined by one of the TArrayFindMode enum values. |
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
Where there is more than one matching element, it finds the first, the last or any matching element as specified by the value of aMode.
The function assumes that pointers in the array are in address order.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
| anIndex | A TInt type supplied by the caller. On return, it contains an index value depending on whether a match is found and on the value of aMode. If there is no matching element in the array, then this is the index of the first element in the array that is bigger than the element being searched for - if no elements in the array are bigger, then the index value is the same as the total number of elements in the array. If there is a matching element, then what the index refers to depends on the value of aMode: if this is EArrayFindMode_First, then the index refers to the first matching element; if this is EArrayFindMode_Any, then the index can refer to any of the matching elements; if this is EArrayFindMode_Last, then the index refers to first element that follows the last matching element - if the last matching element is also the last element of the array, then the index value is the same as the total number of elements in the array. |
| aMode | Specifies whether to find the first match, the last match or any match, as defined by one of the TArrayFindMode enum values. |
Leave condition: KErrNotFound, if no suitable pointer can be found.
(generated from Symbian Developer Library)
|
inline |
Finds the pointer in the array that matches the specified pointer, using a binary search technique.
Where there is more than one matching element, it finds the first, the last or any matching element as specified by the value of aMode.
The function assumes that pointers in the array are in address order.
NOTE: This function is NOT AVAILABLE to code running on the kernel side.
| anEntry | The pointer to be found. |
| aMode | Specifies whether to find the first match, the last match or any match, as defined by one of the TArrayFindMode enum values. |
Leave condition: KErrNotFound if no matching entry exists.
(generated from Symbian Developer Library)