CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csOrdering< T1, T2 > Class Template Reference

A template providing various comparison and ordering functions. More...

#include <array.h>

List of all members.

Static Public Methods

int Compare (T1 const &r1, T2 const &r2)
 Compare two objects of the same type or different types (T1 and T2).


Detailed Description

template<class T1, class T2>
class csOrdering< T1, T2 >

A template providing various comparison and ordering functions.

Definition at line 39 of file array.h.


Member Function Documentation

template<class T1, class T2>
int csOrdering< T1, T2 >::Compare T1 const &    r1,
T2 const &    r2
[inline, static]
 

Compare two objects of the same type or different types (T1 and T2).

Parameters:
r1  Reference to first object.
r2  Reference to second object.
Returns:
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.
Remarks:
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 (of course). This is the default comparison function used by csArray for searching and sorting if the client does not provide a custom function.

Definition at line 55 of file array.h.

Referenced by csArray< csShaderVariable *, csRefArrayElementHandler< csShaderVariable * > >::DefaultCompare(), and csArrayCmp< T, K >::DefaultCompare().


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18