Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
RArray< T > Class Template Reference

A simple and efficient array of fixed length objects. More...

#include <e32cmn.h>

Inheritance diagram for RArray< T >:
RArrayBase

Public Member Functions

 RArray ()
 Default C++ constructor.
 
 RArray (TInt aGranularity)
 C++ constructor with granularity.
 
 RArray (TInt aGranularity, TInt aKeyOffset)
 C++ constructor with granularity and key offset.
 
 RArray (TInt aMinGrowBy, TInt aKeyOffset, TInt aFactor)
 C++ constructor with minimum growth step and exponential growth factor.
 
 RArray (TInt aEntrySize, T *aEntries, TInt aCount)
 C++ constructor with size of entry, a pointer to the first array entry in a pre-existing array, and the number of entries in that array.
 
void Close ()
 Closes the array and frees all memory allocated to the array.
 
void SetKeyOffset (TInt aKeyOffset)
 Sets the offset of the ordering key within each array entry.
 
TInt Count () const
 Gets the number of objects in the array.
 
const T & operator[] (TInt anIndex) const
 Gets a reference to an object located at a specified position within the array.
 
T & operator[] (TInt anIndex)
 Gets a reference to an object located at a specified position within the array.
 
TInt Append (const T &anEntry)
 Apends an object onto the array.
 
TInt Insert (const T &anEntry, TInt aPos)
 Inserts an object into the array at a specified position.
 
void Remove (TInt anIndex)
 Removes the object at a specified position from the array.
 
void Compress ()
 Compresses the array down to a minimum.
 
void Reset ()
 Empties the array, so that it is ready to be reused.
 
TInt Find (const T &anEntry) const
 Finds the first object in the array which matches the specified object using a sequential search.
 
TInt Find (const T &anEntry, TIdentityRelation< T > anIdentity) const
 Finds the first object in the array which matches the specified object using a sequential search and a matching algorithm.
 
template<class K >
TInt Find (const K &aKey, TBool(*apfnCompare)(const K *k, const T &t)) const
 Finds the first object in the array which matches aKey using the comparison algorithm provided by apfnCompare.
 
TInt FindReverse (const T &anEntry) const
 Finds the last object in the array which matches the specified object using a sequential search.
 
TInt FindReverse (const T &anEntry, TIdentityRelation< T > anIdentity) const
 Finds the last object in the array which matches the specified object using a sequential search and a matching algorithm.
 
template<class K >
TInt FindReverse (const K &aKey, TInt(*apfnMatch)(const K *k, const T &t)) const
 Finds the first object in the array which matches aKey using the comparison algorithm provided by apfnCompare.
 
TInt FindInSignedKeyOrder (const T &anEntry) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInUnsignedKeyOrder (const T &anEntry) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInOrder (const T &anEntry, TLinearOrder< T > anOrder) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
TInt FindInSignedKeyOrder (const T &anEntry, TInt &anIndex) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInUnsignedKeyOrder (const T &anEntry, TInt &anIndex) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInOrder (const T &anEntry, TInt &anIndex, TLinearOrder< T > anOrder) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
template<class K >
TInt FindInOrder (const K &aKey, TInt(*apfnCompare)(const K *k, const T &t)) const
 Finds the object in the array whose object matches the specified key, (Using the relationship defined within apfnCompare) using a binary search technique and an ordering algorithm.
 
TInt SpecificFindInSignedKeyOrder (const T &anEntry, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInUnsignedKeyOrder (const T &anEntry, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInOrder (const T &anEntry, TLinearOrder< T > anOrder, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
TInt SpecificFindInSignedKeyOrder (const T &anEntry, TInt &anIndex, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInUnsignedKeyOrder (const T &anEntry, TInt &anIndex, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInOrder (const T &anEntry, TInt &anIndex, TLinearOrder< T > anOrder, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique and a specified ordering algorithm.
 
TInt InsertInSignedKeyOrder (const T &anEntry)
 Inserts an object into the array in ascending signed key order.
 
TInt InsertInUnsignedKeyOrder (const T &anEntry)
 Inserts an object into the array in ascending unsigned key order.
 
TInt InsertInOrder (const T &anEntry, TLinearOrder< T > anOrder)
 Inserts an object of into the array in object order.
 
TInt InsertInSignedKeyOrderAllowRepeats (const T &anEntry)
 Inserts an object into the array in ascending signed key order, allowing duplicates.
 
TInt InsertInUnsignedKeyOrderAllowRepeats (const T &anEntry)
 Inserts an object into the array in ascending unsigned key order, allowing duplicates.
 
TInt InsertInOrderAllowRepeats (const T &anEntry, TLinearOrder< T > anOrder)
 Inserts an object into the array in object order, allowing duplicates.
 
void AppendL (const T &anEntry)
 Apends an object onto the array.
 
void InsertL (const T &anEntry, TInt aPos)
 Inserts an object into the array at a specified position.
 
TInt FindL (const T &anEntry) const
 Finds the first object in the array which matches the specified object using a sequential search.
 
TInt FindL (const T &anEntry, TIdentityRelation< T > anIdentity) const
 Finds the first object in the array which matches the specified object using a sequential search and a matching algorithm.
 
TInt FindReverseL (const T &anEntry) const
 Finds the last object in the array which matches the specified object using a sequential search.
 
TInt FindReverseL (const T &anEntry, TIdentityRelation< T > anIdentity) const
 Finds the last object in the array which matches the specified object using a sequential search and a matching algorithm.
 
TInt FindInSignedKeyOrderL (const T &anEntry) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInUnsignedKeyOrderL (const T &anEntry) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt FindInOrderL (const T &anEntry, TLinearOrder< T > anOrder) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
void FindInSignedKeyOrderL (const T &anEntry, TInt &anIndex) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
void FindInUnsignedKeyOrderL (const T &anEntry, TInt &anIndex) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
void FindInOrderL (const T &anEntry, TInt &anIndex, TLinearOrder< T > anOrder) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
TInt SpecificFindInSignedKeyOrderL (const T &anEntry, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInUnsignedKeyOrderL (const T &anEntry, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
TInt SpecificFindInOrderL (const T &anEntry, TLinearOrder< T > anOrder, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.
 
void SpecificFindInSignedKeyOrderL (const T &anEntry, TInt &anIndex, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
void SpecificFindInUnsignedKeyOrderL (const T &anEntry, TInt &anIndex, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique.
 
void SpecificFindInOrderL (const T &anEntry, TInt &anIndex, TLinearOrder< T > anOrder, TInt aMode) const
 Finds the object in the array which matches the specified object using a binary search technique and a specified ordering algorithm.
 
void InsertInSignedKeyOrderL (const T &anEntry)
 Inserts an object into the array in ascending signed key order.
 
void InsertInUnsignedKeyOrderL (const T &anEntry)
 Inserts an object into the array in ascending unsigned key order, not allowing duplicate entries.
 
void InsertInOrderL (const T &anEntry, TLinearOrder< T > anOrder)
 Inserts an object of into the array in object order.
 
void InsertInSignedKeyOrderAllowRepeatsL (const T &anEntry)
 Inserts an object into the array in ascending signed key order, allowing duplicates.
 
void InsertInUnsignedKeyOrderAllowRepeatsL (const T &anEntry)
 Inserts an object into the array in ascending unsigned key order, allowing duplicates.
 
void InsertInOrderAllowRepeatsL (const T &anEntry, TLinearOrder< T > anOrder)
 Inserts an object into the array in object order, allowing duplicates.
 
void GranularCompress ()
 Compresses the array down to a granular boundary.
 
TInt Reserve (TInt aCount)
 Reserves space for the specified number of elements.
 
void ReserveL (TInt aCount)
 Reserves space for the specified number of elements.
 
void SortSigned ()
 Sorts the objects within the array; the sort order is assumed to be in signed integer order.
 
void SortUnsigned ()
 Sorts the objects within the array; the sort order is assumed to be in unsigned integer order.
 
void Sort (TLinearOrder< T > anOrder)
 Sorts the objects within the array using the specified TLinearOrder.
 
TArray< T > Array () const
 Constructs and returns a generic array.
 

Detailed Description

template<class T>
class RArray< T >

A simple and efficient array of fixed length objects.

The elements of the array are instances of a class; this class is specified as the template parameter T.

The array offers standard array behaviour which includes insertion, appending and sorting of elements.

Note:

  1. where possible, this class should be used in preference to CArrayFixFlat<classT>.
  2. the derivation from RArrayBase is private.
  3. for performance reasons, RArray stores objects in the array as word (4 byte) aligned quantities. This means that some member functions do not work when RArray is instantiated for classes of less than 4 bytes in size, or when the class's alignment requirement is not 4. Be aware that it is possible to get an unhandled exception on hardware that enforces strict alignment.

    The affected functions are:

    3.1 the constructor: RArray(TInt, T*, TInt)

    3.2 Append(const T&)

    3.3 Insert(const T&, TInt)

    3.4 the [] operator, and then using the pointer to iterate through the array as you would with a C array.

API status
Published to all clients. Released API.

Definition at line 5927 of file e32cmn.h.

Constructor & Destructor Documentation

◆ RArray() [1/5]

template<class T >
RArray< T >::RArray ( )
inline

Default C++ constructor.

This constructs an array object for an array of type class T objects with default granularity and key offset value. The default granularity is 8 and the defaul key offset value is zero.

Panic condition: USER 129, if the size of class T is not positive or is not less than 640.

(generated from Symbian Developer Library)

◆ RArray() [2/5]

template<class T >
RArray< T >::RArray ( TInt  aGranularity)
inlineexplicit

C++ constructor with granularity.

This constructs an array object for an array of type class T objects with a specified granularity and default key offset value. The default key offset value is zero.

Parameters
aGranularityThe granularity of the array.

Panic condition: USER 129, if the size of class T is not positive or is not less than 640.

Panic condition: USER 127, if aGranularity is not positive or the product of this value and the size of class T is not less than 0x10000000.

(generated from Symbian Developer Library)

◆ RArray() [3/5]

template<class T >
RArray< T >::RArray ( TInt  aGranularity,
TInt  aKeyOffset 
)
inline

C++ constructor with granularity and key offset.

This constructs an array object for an array of type class T objects with a specified granularity and a specified key offset value.

Parameters
aGranularityThe granularity of the array.
aKeyOffsetThe key offset.

Panic condition: USER 129, if the size of class T is not positive or is not less than 640.

Panic condition: USER 127, if aGranularity is not positive or the product of this value and the size of class T is not less than 0x10000000.

Panic condition: USER 128, if aKeyOffset is not positive, or is not less than the size of class T, or is not a multiple of 4.

(generated from Symbian Developer Library)

◆ RArray() [4/5]

template<class T >
RArray< T >::RArray ( TInt  aMinGrowBy,
TInt  aKeyOffset,
TInt  aFactor 
)
inline

C++ constructor with minimum growth step and exponential growth factor.

This constructs an array object for an array of class T objects with the specified minimum growth step and exponential growth factor.

Parameters
aMinGrowByThe minimum growth step of the array. Must be between 1 and 65535 inclusive.
aKeyOffsetThe key offset.
aFactorThe 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 129, if the size of class T is not positive or is not less than 640.

Panic condition: USER 128, if aKeyOffset is negative, or is not less than the size of class T, or is not a multiple of 4.

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)

◆ RArray() [5/5]

template<class T >
RArray< T >::RArray ( TInt  aEntrySize,
T *  aEntries,
TInt  aCount 
)
inline

C++ constructor with size of entry, 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 class T objects owned by another RArray object. Ownership of the set of entries still resides with the original RArray object.

This array is assigned a default granularity and key offset value. The default granularity is 8 and the default key offset value is zero.

The purpose of constructing an array in this way is to allow sorting and finding operations to be done without further allocation of memory.

Parameters
aEntrySizeThe size of an entry in the existing array.
aEntriesA pointer to the first entry of type class T in the set of entries belonging to the existing array.
aCountThe number of entries in the existing array.

Panic condition: USER 129, if aEntrySize is not positive or is not less than 640.

Panic condition: USER 156, if aCount is not positive.

(generated from Symbian Developer Library)

Member Function Documentation

◆ Append()

template<class T >
TInt RArray< T >::Append ( const T &  anEntry)
inline

Apends an object onto the array.

Parameters
anEntryA reference to the object of type class T to be appended.

(generated from Symbian Developer Library)

◆ AppendL()

template<class T >
void RArray< T >::AppendL ( const T &  anEntry)
inline

Apends an object 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.

Parameters
anEntryA reference to the object of type class T to be appended.

(generated from Symbian Developer Library)

◆ Array()

template<class T >
TArray< T > RArray< T >::Array ( ) const
inline

Constructs and returns a generic array.

(generated from Symbian Developer Library)

◆ Close()

template<class T >
void RArray< T >::Close ( )
inline

Closes the array and frees all memory allocated to the array.

The function must be called before this array object is destroyed.

(generated from Symbian Developer Library)

◆ Compress()

template<class T >
void RArray< T >::Compress ( )
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 objects. Subsequently adding a new object to the array always results in a re-allocation of memory.

(generated from Symbian Developer Library)

◆ Count()

template<class T >
TInt RArray< T >::Count ( ) const
inline

Gets the number of objects in the array.

(generated from Symbian Developer Library)

◆ Find() [1/3]

template<class T >
template<class K >
TInt RArray< T >::Find ( const K &  aKey,
TBool(*)(const K *k, const T &t)  apfnCompare 
) const
inline

Finds the first object in the array which matches aKey using the comparison algorithm provided by apfnCompare.

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.

Parameters
aKeyThe key of type K to be compared with the elements of the array using apfnCompare.
apfnCompareA function defining the identity relation between the object in the array, and their keys of type K. The function returns true if k and t match based on this relationship.
Returns
The index of the first matching object within the array. KErrNotFound, if no suitable object can be found.

Definition at line 5948 of file e32cmn.h.

◆ Find() [2/3]

template<class T >
TInt RArray< T >::Find ( const T &  anEntry) const
inline

Finds the first object in the array which matches the specified object using a sequential search.

Matching is based on the comparison of a TInt value at the key offset position within the objects.

For classes which define their own equality operator (==), the alternative method Find(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.

(generated from Symbian Developer Library)

◆ Find() [3/3]

template<class T >
TInt RArray< T >::Find ( const T &  anEntry,
TIdentityRelation< T >  anIdentity 
) const
inline

Finds the first object in the array which matches the specified object using a sequential search and a matching algorithm.

The algorithm for determining whether two class T type objects match is provided by a function supplied by the caller.

Such a function need not be supplied if an equality operator (==) is defined for class T. In this case, default construction of anIdentity provides matching, as in the example below:

//Construct a TPoint and append to an RArray<TPoint>
TPoint p1(0, 0);
points.AppendL(p1);
//Find position of p1 in points using TIdentityRelation<TPoint> default construction
TInt r = points.Find(p1, TIdentityRelation<TPoint>());
A simple and efficient array of fixed length objects.
Definition e32cmn.h:5928
void AppendL(const T &anEntry)
Apends an object onto the array.
TInt Find(const T &anEntry) const
Finds the first object in the array which matches the specified object using a sequential search.
A templated class which packages a function that determines whether two objects of a given class type...
Definition e32cmn.h:5428
Stores a two-dimensional point in Cartesian co-ordinates.
Definition e32cmn.h:2285

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIdentityA package encapsulating the function which determines whether two class T type objects match.

(generated from Symbian Developer Library)

◆ FindInOrder() [1/3]

template<class T >
template<class K >
TInt RArray< T >::FindInOrder ( const K &  aKey,
TInt(*)(const K *k, const T &t)  apfnCompare 
) const
inline

Finds the object in the array whose object matches the specified key, (Using the relationship defined within apfnCompare) using a binary search technique and an ordering algorithm.

The function assumes that existing objects in the array are ordered so that the objects themselves are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T>.

Parameters
aKeyThe key of type K to be compared with the elements of the array using apfnCompare.
apfnCompareA function which defines the order that the array was sorted, where in it aKey (via the defined relationship) should fit, and if the key is present.
Returns
The index of the matching object within the array. KErrNotFound, if no suitable object can be found.

Definition at line 5992 of file e32cmn.h.

◆ FindInOrder() [2/3]

template<class T >
TInt RArray< T >::FindInOrder ( const T &  anEntry,
TInt &  anIndex,
TLinearOrder< T >  anOrder 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

The function assumes that existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T>.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains an index value. If the function returns KErrNone, this is the index of the matching object within the array. If the function returns KErrNotFound, 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.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ FindInOrder() [3/3]

template<class T >
TInt RArray< T >::FindInOrder ( const T &  anEntry,
TLinearOrder< T >  anOrder 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

The function assumes that existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T>.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ FindInOrderL() [1/2]

template<class T >
void RArray< T >::FindInOrderL ( const T &  anEntry,
TInt &  anIndex,
TLinearOrder< T >  anOrder 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

The function assumes that existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T>.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains the index value of the matching object within the array If the function leaves with KErrNotFound, 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.
anOrderA package encapsulating the function which determines the order of two class T objects.

Leave condition: KErrNotFound if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindInOrderL() [2/2]

template<class T >
TInt RArray< T >::FindInOrderL ( const T &  anEntry,
TLinearOrder< T >  anOrder 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

The function assumes that existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T>.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anOrderA package encapsulating the function which determines the order of two class T objects.

Leave condition: KErrNotFound if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindInSignedKeyOrder() [1/2]

template<class T >
TInt RArray< T >::FindInSignedKeyOrder ( const T &  anEntry) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in signed key order.

Parameters
anEntryA reference to an object of type class T to be used for matching.

(generated from Symbian Developer Library)

◆ FindInSignedKeyOrder() [2/2]

template<class T >
TInt RArray< T >::FindInSignedKeyOrder ( const T &  anEntry,
TInt &  anIndex 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in signed key order.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains an index value. If the function returns KErrNone, this is the index of the matching object within the array. If the function returns KErrNotFound, this is the index of the first element in the array whose key is bigger than the key of the element being sought. If there are no elements in the array with a bigger key, then the index value is the same as the total number of elements in the array.

(generated from Symbian Developer Library)

◆ FindInSignedKeyOrderL() [1/2]

template<class T >
TInt RArray< T >::FindInSignedKeyOrderL ( const T &  anEntry) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in signed key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindInSignedKeyOrderL() [2/2]

template<class T >
void RArray< T >::FindInSignedKeyOrderL ( const T &  anEntry,
TInt &  anIndex 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in signed key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains an index value of the matching object within the array. If the function leaves with KErrNotFound,this is the index of the first element in the array whose key is bigger than the key of the element being sought. If there are no elements in the array with a bigger key, then the index value is the same as the total number of elements in the array.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindInUnsignedKeyOrder() [1/2]

template<class T >
TInt RArray< T >::FindInUnsignedKeyOrder ( const T &  anEntry) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in unsigned key order.

Parameters
anEntryA reference to an object of type class T to be used for matching.

(generated from Symbian Developer Library)

◆ FindInUnsignedKeyOrder() [2/2]

template<class T >
TInt RArray< T >::FindInUnsignedKeyOrder ( const T &  anEntry,
TInt &  anIndex 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in unsigned key order.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains an index value. If the function returns KErrNone, this is the index of the matching object within the array. If the function returns KErrNotFound, this is the index of the first element in the array whose key is bigger than the key of the element being sought. If there are no elements in the array with a bigger key, then the index value is the same as the total number of elements in the array.

(generated from Symbian Developer Library)

◆ FindInUnsignedKeyOrderL() [1/2]

template<class T >
TInt RArray< T >::FindInUnsignedKeyOrderL ( const T &  anEntry) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in unsigned key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindInUnsignedKeyOrderL() [2/2]

template<class T >
void RArray< T >::FindInUnsignedKeyOrderL ( const T &  anEntry,
TInt &  anIndex 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The function assumes that existing objects within the array are in unsigned key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexOn return contains an index value of the matching object within the array. If the function leaves with KErrNotFound, this is the index of the first element in the array whose key is bigger than the key of the element being sought. If there are no elements in the array with a bigger key, then the index value is the same as the total number of elements in the array.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindL() [1/2]

template<class T >
TInt RArray< T >::FindL ( const T &  anEntry) const
inline

Finds the first object in the array which matches the specified object using a sequential search.

Matching is based on the comparison of a TInt value at the key offset position within the objects.

For classes which define their own equality operator (==), the alternative method FindL(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindL() [2/2]

template<class T >
TInt RArray< T >::FindL ( const T &  anEntry,
TIdentityRelation< T >  anIdentity 
) const
inline

Finds the first object in the array which matches the specified object using a sequential search and a matching algorithm.

The algorithm for determining whether two class T type objects match is provided by a function supplied by the caller.

Such a function need not be supplied if an equality operator (==) is defined for class T. In this case, default construction of anIdentity provides matching.

See Find(const T& anEntry, TIdentityRelation<T> anIdentity) for more details.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIdentityA package encapsulating the function which determines whether two class T type objects match.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindReverse() [1/3]

template<class T >
template<class K >
TInt RArray< T >::FindReverse ( const K &  aKey,
TInt(*)(const K *k, const T &t)  apfnMatch 
) const
inline

Finds the first object in the array which matches aKey using the comparison algorithm provided by apfnCompare.

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.

Parameters
aKeyThe key of type K to be compared with the elements of the array using apfnMatch.
apfnMatchA function defining the identity relation between the object in the array, and their keys of type K. The function returns true if k and t match based on this relationship.
Returns
The index of the first matching object within the array. KErrNotFound, if no suitable object can be found.

Definition at line 5968 of file e32cmn.h.

◆ FindReverse() [2/3]

template<class T >
TInt RArray< T >::FindReverse ( const T &  anEntry) const
inline

Finds the last object in the array which matches the specified object using a sequential search.

Matching is based on the comparison of a TInt value at the key offset position within the objects.

For classes which define their own equality operator (==), the alternative method FindReverse(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.

(generated from Symbian Developer Library)

◆ FindReverse() [3/3]

template<class T >
TInt RArray< T >::FindReverse ( const T &  anEntry,
TIdentityRelation< T >  anIdentity 
) const
inline

Finds the last object in the array which matches the specified object using a sequential search and a matching algorithm.

The algorithm for determining whether two class T type objects match is provided by a function supplied by the caller.

Such a function need not be supplied if an equality operator (==) is defined for class T. In this case, default construction of anIdentity provides matching.

See Find(const T& anEntry, TIdentityRelation<T> anIdentity) for more details.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIdentityA package encapsulating the function which determines whether two class T type objects match.

(generated from Symbian Developer Library)

◆ FindReverseL() [1/2]

template<class T >
TInt RArray< T >::FindReverseL ( const T &  anEntry) const
inline

Finds the last object in the array which matches the specified object using a sequential search.

Matching is based on the comparison of a TInt value at the key offset position within the objects.

For classes which define their own equality operator (==), the alternative method FindReverseL(const T& anEntry, TIdentityRelation<T> anIdentity) is recommended.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ FindReverseL() [2/2]

template<class T >
TInt RArray< T >::FindReverseL ( const T &  anEntry,
TIdentityRelation< T >  anIdentity 
) const
inline

Finds the last object in the array which matches the specified object using a sequential search and a matching algorithm.

The algorithm for determining whether two class T type objects match is provided by a function supplied by the caller.

Such a function need not be supplied if an equality operator (==) is defined for class T. In this case, default construction of anIdentity provides matching.

See Find(const T& anEntry, TIdentityRelation<T> anIdentity) for more details.

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.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIdentityA package encapsulating the function which determines whether two class T type objects match.

Leave condition: KErrNotFound, if no matching object can be found.

(generated from Symbian Developer Library)

◆ GranularCompress()

template<class T >
void RArray< T >::GranularCompress ( )
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 objects. Adding new objects to the array does not result in a re-allocation of memory until the the total number of objects reaches a multiple of the granularity.

(generated from Symbian Developer Library)

◆ Insert()

template<class T >
TInt RArray< T >::Insert ( const T &  anEntry,
TInt  aPos 
)
inline

Inserts an object into the array at a specified position.

Parameters
anEntryThe class T object to be inserted.
aPosThe position within the array where the object is to be inserted. The position is relative to zero, i.e. zero implies that an object is inserted at the beginning of the array.

Panic condition: USER 131, if aPos is negative or is greater than the number of objects currently in the array.

(generated from Symbian Developer Library)

◆ InsertInOrder()

template<class T >
TInt RArray< T >::InsertInOrder ( const T &  anEntry,
TLinearOrder< T >  anOrder 
)
inline

Inserts an object of into the array in object order.

The algorithm for determining the order of two class T type objects is provided by a function supplied by the caller.

No duplicate entries are permitted. The array remains unchanged following an attempt to insert a duplicate entry.

The function assumes that existing objects within the array are in object order.

Parameters
anEntryA reference to the object of type class T to be inserted.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ InsertInOrderAllowRepeats()

template<class T >
TInt RArray< T >::InsertInOrderAllowRepeats ( const T &  anEntry,
TLinearOrder< T >  anOrder 
)
inline

Inserts an object into the array in object order, allowing duplicates.

The algorithm for determining the order of two class T type objects is provided by a function supplied by the caller.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then anEntry is inserted after the last one.

The function assumes that existing objects within the array are in object order.

Parameters
anEntryA reference to the object of type class T to be inserted.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ InsertInOrderAllowRepeatsL()

template<class T >
void RArray< T >::InsertInOrderAllowRepeatsL ( const T &  anEntry,
TLinearOrder< T >  anOrder 
)
inline

Inserts an object into the array in object order, allowing duplicates.

The algorithm for determining the order of two class T type objects is provided by a function supplied by the caller.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then anEntry is inserted after the last one.

The function assumes that existing objects within the array are in object 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.

Parameters
anEntryA reference to the object of type class T to be inserted.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ InsertInOrderL()

template<class T >
void RArray< T >::InsertInOrderL ( const T &  anEntry,
TLinearOrder< T >  anOrder 
)
inline

Inserts an object of into the array in object order.

The algorithm for determining the order of two class T type objects is provided by a function supplied by the caller.

No duplicate entries are permitted.

The function assumes that existing objects within the array are in object order.

The function leaves with one of the system wide error codes, if the operation fails.

Note that the array remains unchanged following an attempt to insert a duplicate entry.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to the object of type class T to be inserted.
anOrderA package encapsulating the function which determines the order of two class T objects.

(generated from Symbian Developer Library)

◆ InsertInSignedKeyOrder()

template<class T >
TInt RArray< T >::InsertInSignedKeyOrder ( const T &  anEntry)
inline

Inserts an object into the array in ascending signed key order.

The order of two class T type objects is based on comparing a TInt value located at the key offset position within the class T object.

No duplicate entries are permitted. The array remains unchanged following an attempt to insert a duplicate entry.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInSignedKeyOrderAllowRepeats()

template<class T >
TInt RArray< T >::InsertInSignedKeyOrderAllowRepeats ( const T &  anEntry)
inline

Inserts an object into the array in ascending signed key order, allowing duplicates.

The order of two class T type objects is based on comparing a TInt value located at the key offset position within the class T object.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then any new duplicate object is inserted after the last one.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInSignedKeyOrderAllowRepeatsL()

template<class T >
void RArray< T >::InsertInSignedKeyOrderAllowRepeatsL ( const T &  anEntry)
inline

Inserts an object into the array in ascending signed key order, allowing duplicates.

The order of two class T type objects is based on comparing a TInt value located at the key offset position within the class T object.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then any new duplicate object is inserted after the last one.

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.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInSignedKeyOrderL()

template<class T >
void RArray< T >::InsertInSignedKeyOrderL ( const T &  anEntry)
inline

Inserts an object into the array in ascending signed key order.

The order of two class T type objects is based on comparing a TInt value located at the key offset position within the class T object.

No duplicate entries are permitted.

The function leaves with one of the system wide error codes, if the operation fails.

Note that the array remains unchanged following an attempt to insert a duplicate entry.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInUnsignedKeyOrder()

template<class T >
TInt RArray< T >::InsertInUnsignedKeyOrder ( const T &  anEntry)
inline

Inserts an object into the array in ascending unsigned key order.

The order of two class T type objects is based on comparing a TUint value located at the key offset position within the class T object.

No duplicate entries are permitted. The array remains unchanged following an attempt to insert a duplicate entry.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInUnsignedKeyOrderAllowRepeats()

template<class T >
TInt RArray< T >::InsertInUnsignedKeyOrderAllowRepeats ( const T &  anEntry)
inline

Inserts an object into the array in ascending unsigned key order, allowing duplicates.

The order of two class T type objects is based on comparing a TUint value located at the key offset position within the class T object.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then any new duplicate object is inserted after the last one.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInUnsignedKeyOrderAllowRepeatsL()

template<class T >
void RArray< T >::InsertInUnsignedKeyOrderAllowRepeatsL ( const T &  anEntry)
inline

Inserts an object into the array in ascending unsigned key order, allowing duplicates.

The order of two class T type objects is based on comparing a TUint value located at the key offset position within the class T object.

If anEntry is a duplicate of an existing object in the array, then the new object is inserted after the existing object. If more than one duplicate object already exists in the array, then any new duplicate object is inserted after the last one.

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.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertInUnsignedKeyOrderL()

template<class T >
void RArray< T >::InsertInUnsignedKeyOrderL ( const T &  anEntry)
inline

Inserts an object into the array in ascending unsigned key order, not allowing duplicate entries.

The order of two class T type objects is based on comparing a TUint value located at the key offset position within the class T object.

The function leaves with one of the system wide error codes, if the operation fails.

Note that the array remains unchanged following an attempt to insert a duplicate entry.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to the object of type class T to be inserted.

(generated from Symbian Developer Library)

◆ InsertL()

template<class T >
void RArray< T >::InsertL ( const T &  anEntry,
TInt  aPos 
)
inline

Inserts an object into the array at a 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.

Parameters
anEntryThe class T object to be inserted.
aPosThe position within the array where the object is to be inserted. The position is relative to zero, i.e. zero implies that an object is inserted at the beginning of the array.

Panic condition: USER 131, if aPos is negative or is greater than the number of objects currently in the array.

(generated from Symbian Developer Library)

◆ operator[]() [1/2]

template<class T >
T & RArray< T >::operator[] ( TInt  anIndex)
inline

Gets a reference to an object located at a specified position within the array.

The compiler chooses this function if the returned reference is used in an expression where the reference can be modified.

Parameters
anIndexThe position of the object within the array. The position is relative to zero, i.e. zero implies the object 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)

◆ operator[]() [2/2]

template<class T >
const T & RArray< T >::operator[] ( TInt  anIndex) const
inline

Gets a reference to an object located at a specified position within the array.

The compiler chooses this function if the returned reference is used in an expression where the reference cannot be modified.

Parameters
anIndexThe position of the object within the array. The position is relative to zero, i.e. zero implies the object 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)

◆ Remove()

template<class T >
void RArray< T >::Remove ( TInt  anIndex)
inline

Removes the object at a specified position from the array.

Parameters
anIndexThe position within the array from where the object is to be removed. The position is relative to zero, i.e. zero implies that an object 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)

◆ Reserve()

template<class T >
TInt RArray< T >::Reserve ( TInt  aCount)
inline

Reserves space for the specified number of elements.

After a call to this function, the memory allocated to the array is sufficient to hold the number of objects specified. Adding new objects to the array does not result in a re-allocation of memory until the the total number of objects exceeds the specified count.

Parameters
aCountThe number of objects for which space should be reserved

(generated from Symbian Developer Library)

◆ ReserveL()

template<class T >
void RArray< T >::ReserveL ( TInt  aCount)
inline

Reserves space for the specified number of elements.

After a call to this function, the memory allocated to the array is sufficient to hold the number of objects specified. Adding new objects to the array does not result in a re-allocation of memory until the the total number of objects exceeds the specified count.

Parameters
aCountThe number of objects for which space should be reserved

Leave condition: KErrNoMemory If the requested amount of memory could not be allocated

(generated from Symbian Developer Library)

◆ Reset()

template<class T >
void RArray< T >::Reset ( )
inline

Empties the array, so that it is ready to be reused.

The function 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.

(generated from Symbian Developer Library)

◆ SetKeyOffset()

template<class T >
void RArray< T >::SetKeyOffset ( TInt  aKeyOffset)
inline

Sets the offset of the ordering key within each array entry.

Parameters
aKeyOffsetThe key offset.

Panic condition: USER 128, if aKeyOffset is not positive, or is not less than the size of class T, or is not a multiple of 4.

(generated from Symbian Developer Library)

◆ Sort()

template<class T >
void RArray< T >::Sort ( TLinearOrder< T >  anOrder)
inline

Sorts the objects within the array using the specified TLinearOrder.

The sort order is determined by an algorithm supplied by the caller and packaged as a TLinerOrder<T>.

Parameters
anOrderA package encapsulating the function which determines the order of two class T type objects.

(generated from Symbian Developer Library)

◆ SortSigned()

template<class T >
void RArray< T >::SortSigned ( )
inline

Sorts the objects within the array; the sort order is assumed to be in signed integer order.

(generated from Symbian Developer Library)

◆ SortUnsigned()

template<class T >
void RArray< T >::SortUnsigned ( )
inline

Sorts the objects within the array; the sort order is assumed to be in unsigned integer order.

(generated from Symbian Developer Library)

◆ SpecificFindInOrder() [1/2]

template<class T >
TInt RArray< T >::SpecificFindInOrder ( const T &  anEntry,
TInt &  anIndex,
TLinearOrder< T >  anOrder,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and a specified ordering algorithm.

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 existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T> type.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
anOrderA package encapsulating the function which determines the order of two class T objects.
aModeSpecifies 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)

◆ SpecificFindInOrder() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInOrder ( const T &  anEntry,
TLinearOrder< T >  anOrder,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

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 existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T> type.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anOrderA package encapsulating the function which determines the order of two class T objects.
aModeSpecifies 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)

◆ SpecificFindInOrderL() [1/2]

template<class T >
void RArray< T >::SpecificFindInOrderL ( const T &  anEntry,
TInt &  anIndex,
TLinearOrder< T >  anOrder,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and a specified ordering algorithm.

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 existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T> type.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
anOrderA package encapsulating the function which determines the order of two class T objects.
aModeSpecifies 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)

◆ SpecificFindInOrderL() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInOrderL ( const T &  anEntry,
TLinearOrder< T >  anOrder,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique and an ordering algorithm.

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 existing objects within the array are in object order as determined by an algorithm supplied by the caller and packaged as a TLinearOrder<T> type.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anOrderA package encapsulating the function which determines the order of two class T objects.
aModeSpecifies 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)

◆ SpecificFindInSignedKeyOrder() [1/2]

template<class T >
TInt RArray< T >::SpecificFindInSignedKeyOrder ( const T &  anEntry,
TInt &  anIndex,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by a signed 32-bit word (the key) embedded in each array element. Where there is more than one matching element, finds the first, last or any matching element as specified specified by the value of aMode.

The function assumes that existing objects within the array are in signed key order.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
aModeSpecifies 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)

◆ SpecificFindInSignedKeyOrder() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInSignedKeyOrder ( const T &  anEntry,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by a signed 32-bit word (the key) embedded in each array element. In the case that there is more than one matching element, finds the first, last or any match as specified by the value of aMode.

The function assumes that existing objects within the array are in signed key order.

TArrayFindMode

Parameters
anEntryA reference to an object of type class T to be used for matching.
aModeSpecifies 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)

◆ SpecificFindInSignedKeyOrderL() [1/2]

template<class T >
void RArray< T >::SpecificFindInSignedKeyOrderL ( const T &  anEntry,
TInt &  anIndex,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by a signed 32-bit word (the key) embedded in each array element. In the case that there is more than one matching element, finds the first, last or any match as specified.

The function assumes that existing objects within the array are in signed key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
aModeSpecifies 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)

◆ SpecificFindInSignedKeyOrderL() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInSignedKeyOrderL ( const T &  anEntry,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by a signed 32-bit word (the key) embedded in each array element. In the case that there is more than one matching element, finds the first, last or any match as specified.

The function assumes that existing objects within the array are in signed key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
aModeSpecifies 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)

◆ SpecificFindInUnsignedKeyOrder() [1/2]

template<class T >
TInt RArray< T >::SpecificFindInUnsignedKeyOrder ( const T &  anEntry,
TInt &  anIndex,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by an unsigned 32-bit word (the key) embedded in each array element. Where there is more than one matching element, it finds the first, last or any matching element as specified by the value of aMode.

The function assumes that existing objects within the array are in unsigned key order.

TArrayFindMode

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
aModeSpecifies 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)

◆ SpecificFindInUnsignedKeyOrder() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInUnsignedKeyOrder ( const T &  anEntry,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by an unsigned 32-bit word (the key) embedded in each array element. Where there is more than one matching element, it finds the first, last or any matching element as specified by the value of aMode.

The function assumes that existing objects within the array are in unsigned key order.

TArrayFindMode

Parameters
anEntryA reference to an object of type class T to be used for matching.
aModeSpecifies 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)

◆ SpecificFindInUnsignedKeyOrderL() [1/2]

template<class T >
void RArray< T >::SpecificFindInUnsignedKeyOrderL ( const T &  anEntry,
TInt &  anIndex,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by an unsigned 32-bit word (the key) embedded in each array element. In the case that there is more than one matching element, finds the first, last or any match as specified.

The function assumes that existing objects within the array are in unsigned key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
anIndexA 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.
aModeSpecifies 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)

◆ SpecificFindInUnsignedKeyOrderL() [2/2]

template<class T >
TInt RArray< T >::SpecificFindInUnsignedKeyOrderL ( const T &  anEntry,
TInt  aMode 
) const
inline

Finds the object in the array which matches the specified object using a binary search technique.

The element ordering is determined by an unsigned 32-bit word (the key) embedded in each array element. In the case that there is more than one matching element, finds the first, last or any match as specified.

The function assumes that existing objects within the array are in unsigned key order.

NOTE: This function is NOT AVAILABLE to code running on the kernel side.

Parameters
anEntryA reference to an object of type class T to be used for matching.
aModeSpecifies 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)


The documentation for this class was generated from the following files: