class TLinearOrder |
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>.
Public Member Functions | |
---|---|
TLinearOrder(TInt(*)(const T &, const T &)) | |
operator TGeneralLinearOrder() |
Private Attributes | |
---|---|
TGeneralLinearOrder | iOrder |
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.
operator TGeneralLinearOrder | ( | ) | const [inline] |
Operator that gets the function that determines the order of two objects of a given class type.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.