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

CTBcompare.icc

Go to the documentation of this file.
00001 
00007 /*----------------------------------------------------------------------------*/
00008 /* C Tool Box: Designed and implemented by:                                   */
00009 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00010 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00011 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00012 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00013 /*------------------------------------------+---------------------------------*/
00014 
00029 template <class T>
00030 inline int CTBcompareOper<T>::operator()(const T& v1, const T& v2)
00031 {
00032   if (v1 == v2) return 0;
00033   return (v1 < v2) ? -1 : 1;
00034 }
00035 
00036 //------------------------------------------+-----------------------------------
00052 template <class T>
00053 inline int CTBcompareFunc<T>::operator()(const T& v1, const T& v2)
00054 {
00055   return v1.Compare(v2);
00056 }
00057 
00058 //------------------------------------------+-----------------------------------
00073 template <class T>
00074 inline int CTBcompareIndOper<T>::operator()(const T& v1, const T& v2)
00075 {
00076   if (*v1 == *v2) return 0;
00077   return (*v1 < *v2) ? -1 : 1;
00078 }
00079 
00080 //------------------------------------------+-----------------------------------
00096 template <class T>
00097 inline int CTBcompareIndFunc<T>::operator()(const T& v1, const T& v2)
00098 {
00099   return (*v1).Compare(*v2);
00100 }
00101 

Generated at Fri Oct 24 18:11:27 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001