Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <e32cmn.h>

Class TIdentityRelation

class TIdentityRelation;

Description

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

Members

Defined in TIdentityRelation:

See also:


Construction and destruction


TIdentityRelation(TBool(*)(const T &, const T &))

inline TIdentityRelation(TBool(*anIdentity)(const T &, const T &));

Description

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.

Parameters

TBool(*)(const T &, const T &) anIdentity

A pointer to a function that takes constant references to two class T objects and returns a TInt value.

[Top]


Member functions


operator TGeneralIdentityRelation()const

inline operator TGeneralIdentityRelation() const;

Description

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

Return value