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

A templated class which packages a function that determines the order of two objects of a given class type. More...

#include <e32cmn.h>

Public Member Functions

 TLinearOrder (TInt(*anOrder)(const T &, const T &))
 Constructs the object taking the specified function as an argument.
 
 operator TGeneralLinearOrder () const
 Operator that gets the function that determines the order of two objects of a given class type.
 

Detailed Description

template<class T>
class TLinearOrder< T >

A templated class which packages a function that determines the order of two objects of a given class type.

During binary search operations the search term is always passed as the first argument and the second argument is an element of the array being searched.

A TLinearOrder<T> object is constructed and passed as a parameter to member functions of the array classes RArray<T> and RPointerArray<T>.

See also
RArray
RPointerArray
API status
Published to all clients. Released API.

Definition at line 5488 of file e32cmn.h.

Constructor & Destructor Documentation

◆ TLinearOrder()

template<class T >
TLinearOrder< T >::TLinearOrder ( TInt(*)(const T &, const T &)  anOrder)
inline

Constructs the object taking the specified function as an argument.

The specified function should implement an algorithm that determines the order of two class T type objects. It should return:

  1. zero, if the two objects are equal.
  2. a negative value, if the first object is less than the second.
  3. a positive value, if the first object is greater than the second.
Parameters
anOrderA pointer to a function that takes constant references to two class T objects and returns a TInt value.

(generated from Symbian Developer Library)

Member Function Documentation

◆ operator TGeneralLinearOrder()

template<class T >
TLinearOrder< T >::operator TGeneralLinearOrder ( ) const
inline

Operator that gets the function that determines the order of two objects of a given class type.

(generated from Symbian Developer Library)


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