class TIdentityRelation |
A templated class which packages a function that determines whether two objects of a given class type match. During linear 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 TIdentityRelation<T> object is constructed and passed as a parameter to member functions of the array classes RArray<T> and RPointerArray<T>.
Public Member Functions | |
---|---|
TIdentityRelation() | |
TIdentityRelation(TBool(*)(const T &, const T &)) | |
operator TGeneralIdentityRelation() |
Private Member Functions | |
---|---|
TBool | EqualityOperatorCompare(const T &, const T &) |
Private Attributes | |
---|---|
TGeneralIdentityRelation | iIdentity |
TIdentityRelation | ( | ) | [inline] |
Constructs the object to use the equality operator (==) defined for class T to determine whether two class T type objects match.
TIdentityRelation | ( | TBool(*)(const T &, const T &) | anIdentity | ) | [inline] |
Constructs the object taking the specified function as an argument.
The specified function should implement an algorithm for determining whether two class T type objects match. It should return:
1. true, if the two objects match.
2. false, if the two objects do not match.
TBool | EqualityOperatorCompare | ( | const T & | aLeft, |
const T & | aRight | |||
) | [private, static, inline] |
Compares two objects of class T using the equality operator defined for class T.
operator TGeneralIdentityRelation | ( | ) | const [inline] |
Operator that gets the function that determines whether two objects of a given class type match.
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.