|
||
class RPointerArray< TAny > : private RPointerArrayBase;
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.
RPointerArrayBase
- No description.
RPointerArray< TAny >
-
Array of raw pointers.
Defined in RPointerArray< TAny >
:
Append(const TAny *)
Appends an pointer onto the array.AppendL(const TAny *)
Appends an pointer onto the array.Array()const
Constructs and returns a generic array.Close()
Closes the array and frees all memory allocated to it.Compress()
Compresses the array down to a minimum.Count()const
Gets the number of pointers in the array.Find(const TAny *)const
Finds the first pointer in the array which matches the specified pointer, using ...FindInAddressOrder(const TAny *)const
Finds the pointer in the array that matches the specified object pointer, using ...FindInAddressOrder(const TAny *,TInt &)const
Finds the pointer in the array that matches the specified object pointer, using ...FindInAddressOrderL(const TAny *)const
Finds the pointer in the array that matches the specified pointer, using a binar...FindInAddressOrderL(const TAny *,TInt &)const
Finds the pointer in the array that matches the specified pointer, using a binar...FindL(const TAny *)const
Finds the first pointer in the array which matches the specified pointer, using ...FindReverse(const TAny *)const
Finds the last pointer in the array which matches the specified pointer, using a...FindReverseL(const TAny *)const
Finds the last pointer in the array which matches the specified pointer, using a...GranularCompress()
Compresses the array down to a granular boundary.Insert(const TAny *,TInt)
Inserts an pointer into the array at the specified position.InsertInAddressOrder(const TAny *)
Inserts an pointer into the array in address order.InsertInAddressOrderAllowRepeats(const TAny *)
Inserts an pointer into the array in address order, allowing duplicates.InsertInAddressOrderAllowRepeatsL(const TAny *)
Inserts an pointer into the array in address order, allowing duplicates.InsertInAddressOrderL(const TAny *)
Inserts an pointer into the array in address order.InsertL(const TAny *,TInt)
Inserts an pointer into the array at the specified position.RPointerArray()
Default C++ constructor.RPointerArray(TAny **,TInt)
C++ constructor with a pointer to the first array entry in a pre-existing array,...RPointerArray(TInt)
C++ constructor with granularity.RPointerArray(TInt,TInt)
C++ constructor with minimum growth step and exponential growth factor.Remove(TInt)
Removes the pointer at the specified position from the array.Reset()
Empties the array.SortIntoAddressOrder()
Sorts the pointers within the array into address order. SpecificFindInAddressOrder(const TAny *,TInt &,TInt)const
Finds the pointer in the array that matches the specified pointer, using a binar...SpecificFindInAddressOrder(const TAny *,TInt)const
Finds the pointer in the array that matches the specified pointer, using a binar...SpecificFindInAddressOrderL(const TAny *,TInt &,TInt)const
Finds the pointer in the array that matches the specified pointer, using a binar...SpecificFindInAddressOrderL(const TAny *,TInt)const
Finds the pointer in the array that matches the specified pointer, using a binar...operator[](TInt)
Gets a reference to the pointer located at the specified position within the arr...operator[](TInt)const
Gets a reference to the pointer located at the specified position within the arr...inline RPointerArray();
Default C++ constructor.
This constructs an array object for an array of TAny pointers with default granularity, which is 8.
|
inline RPointerArray(TInt aGranularity);
C++ constructor with granularity.
This constructs an array object for an array of TAny pointers with the specified granularity.
|
|
|
inline RPointerArray(TInt aMinGrowBy, TInt aFactor);
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.
|
|
|
inline void Close();
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.
inline TInt Count() const;
Gets the number of pointers in the array.
|
inline TAny *const& operator[](TInt anIndex) const;
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.
|
|
|
inline TAny *& operator[](TInt anIndex);
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.
|
|
|
inline TInt Append(const TAny *anEntry);
Appends an pointer onto the array.
|
|
inline TInt Insert(const TAny *anEntry, TInt aPos);
Inserts an pointer into the array at the specified position.
|
|
|
inline void Remove(TInt anIndex);
Removes the pointer at the specified position from the array.
Note that the function does not delete the object whose pointer is removed.
|
|
inline void Compress();
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.
inline void Reset();
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.
inline TInt Find(const TAny *anEntry) const;
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.
|
|
inline TInt FindReverse(const TAny *anEntry) const;
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.
|
|
inline TInt FindInAddressOrder(const TAny *anEntry) const;
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.
|
|
inline 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.
The function assumes that pointers in the array are in address order.
|
|
inline TInt SpecificFindInAddressOrder(const TAny *anEntry, TInt aMode) const;
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.
|
|
inline 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.
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.
|
|
inline TInt InsertInAddressOrder(const TAny *anEntry);
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.
|
|
inline TInt InsertInAddressOrderAllowRepeats(const TAny *anEntry);
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.
|
|
inline void AppendL(const TAny *anEntry);
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.
|
inline void InsertL(const TAny *anEntry, TInt aPos);
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.
|
|
inline TInt FindL(const TAny *anEntry) const;
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.
|
|
|
inline TInt FindReverseL(const TAny *anEntry) const;
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.
|
|
|
inline TInt FindInAddressOrderL(const TAny *anEntry) const;
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.
|
|
|
inline void FindInAddressOrderL(const TAny *anEntry, TInt &anIndex) const;
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.
|
|
inline TInt SpecificFindInAddressOrderL(const TAny *anEntry, TInt aMode) const;
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.
|
|
|
inline 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.
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.
|
|
inline void InsertInAddressOrderL(const TAny *anEntry);
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.
|
inline void InsertInAddressOrderAllowRepeatsL(const TAny *anEntry);
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.
|
inline 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.
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.
|
|
|
inline void GranularCompress();
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.