csComparator< T1, T2 > Class Template Reference
A template providing various comparison and ordering functions. More...
Static Public Member Functions
|static int||Compare (T1 const &r1, T2 const &r2)|
|Compare two objects of the same type or different types (T1 and T2). |
template<typename T1, typename T2 = T1>
class csComparator< T1, T2 >
A template providing various comparison and ordering functions.
Member Function Documentation
template<typename T1 , typename T2 = T1>
|static int csComparator< T1, T2 >::Compare||(||T1 const &||r1,|
|T2 const &||r2|
Compare two objects of the same type or different types (T1 and T2).
r1 Reference to first object. r2 Reference to second object.
- Zero if the objects are equal; less-than-zero if the first object is less than the second; or greater-than-zero if the first object is greater than the second.
- Assumes the existence of T1::operator<(T2) and T2::operator<(T1). If T1 and T2 are the same type T, then only T::operator<(T) is assumed (naturally).
- This is the default comparison function used by csArray<> for searching and sorting if the client does not provide a custom function. It is also used by csSet<> when checking for object containment.
The documentation for this class was generated from the following file:
Generated for Crystal Space 2.0 by doxygen 1.6.1