|Xavax C++ Library||Class Index FAQ Overview|
operator(). Functors are used within the Xavax C++ Library as callbacks for generic algorithms and containers. For example, an ordered collection must have a means to determine if an element of type T is less than, equal to, or greater than a second element of type T. Therefore, containers that maintain an ordered collection require the user to provide a compare functor that compares two elements.
All standard functors in the Xavax C++ Library
are defined as template classes
so that type-safe containers can require functors
that operate on the specified type.
User functors should derive from one of the standard functor classes
which is a pure virtual function.
||Compare two elements of type T.|
||Traverse an element of a container.|
int operator()(const T* t1, const T* t2)
t1- the first element to compare.
t2- the second element to compare.
bool operator()(const T* t)
t- the element to traverse.
Copyright © 2003 Xavax Inc. -- All Rights Reserved