Min_Max.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ACE_MIN(a, b)   ace_min((a),(b))
#define ACE_MAX(a, b)   ace_max((a),(b))
#define ACE_RANGE(a, b, c)   ace_range((a),(b),(c))

Functions

template<class T>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
const T & 
ace_min (const T &t1, const T &t2)
template<class T>
const T & ace_max (const T &t1, const T &t2)
template<class T>
const T & ace_min (const T &t1, const T &t2, const T &t3)
template<class T>
const T & ace_max (const T &t1, const T &t2, const T &t3)
template<class T>
const T & ace_range (const T &min, const T &max, const T &val)


Detailed Description

Id
Min_Max.h 80826 2008-03-04 14:51:23Z wotte

Define an appropriate set of min()/max() functions using templates.

Author:
Derek Dominish <Derek.Dominish@Australia.Boeing.com>

Definition in file Min_Max.h.


Define Documentation

#define ACE_MAX ( a,
 )     ace_max((a),(b))

Definition at line 66 of file Min_Max.h.

Referenced by ACE_Handler_Caching_Utility< KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES >::clear_cache(), ACE_Refcounted_Recyclable_Handler_Caching_Utility< KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES >::clear_cache(), ACE_Recyclable_Handler_Caching_Utility< KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES >::clear_cache(), ACE_Pair_Caching_Utility< KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES >::clear_cache(), and ACE_OS::thr_create().

#define ACE_MIN ( a,
 )     ace_min((a),(b))

Definition at line 65 of file Min_Max.h.

Referenced by ACE_FIFO_Recv_Msg::recv(), and ACE_OS::thr_create().

#define ACE_RANGE ( a,
b,
 )     ace_range((a),(b),(c))

Definition at line 67 of file Min_Max.h.


Function Documentation

template<class T>
const T& ace_max ( const T &  t1,
const T &  t2,
const T &  t3 
) [inline]

Definition at line 51 of file Min_Max.h.

References ace_max().

00052 {
00053   return ace_max (ace_max (t1, t2), t3);
00054 }

template<class T>
const T& ace_max ( const T &  t1,
const T &  t2 
) [inline]

Definition at line 37 of file Min_Max.h.

Referenced by ace_max(), and ace_range().

00038 {
00039   return t1 > t2 ? t1 : t2;
00040 }

template<class T>
const T& ace_min ( const T &  t1,
const T &  t2,
const T &  t3 
) [inline]

Definition at line 44 of file Min_Max.h.

References ace_min().

00045 {
00046   return ace_min (ace_min (t1, t2), t3);
00047 }

template<class T>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL const T& ace_min ( const T &  t1,
const T &  t2 
) [inline]

Definition at line 30 of file Min_Max.h.

Referenced by ace_min(), ace_range(), and ACE_String_Base< CHAR >::compare().

00031 {
00032   return t2 > t1 ? t1 : t2;
00033 }

template<class T>
const T& ace_range ( const T &  min,
const T &  max,
const T &  val 
) [inline]

Definition at line 58 of file Min_Max.h.

References ace_max(), and ace_min().

00059 {
00060   return ace_min (ace_max (min, val), max);
00061 }


Generated on Tue Feb 2 17:23:33 2010 for ACE by  doxygen 1.4.7