Min_Max.h File Reference

#include "ace/config-all.h"

Include dependency graph for Min_Max.h:

Include dependency graph

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

Included by dependency graph

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

Min_Max.h,v 4.7 2005/10/28 16:14:53 ossama Exp

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 77 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 76 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 78 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 53 of file Min_Max.h.

References ace_max().

Referenced by ACE_String_Base< CHAR >::append().

00054 {
00055   return ace_max (ace_max (t1, t2), t3);
00056 }

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

Definition at line 39 of file Min_Max.h.

Referenced by ace_max(), and ace_range().

00040 {
00041   return t1 > t2 ? t1 : t2;
00042 }

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

Definition at line 46 of file Min_Max.h.

References ace_min().

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

00047 {
00048   return ace_min (ace_min (t1, t2), t3);
00049 }

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

Definition at line 32 of file Min_Max.h.

Referenced by ace_min().

00033 {
00034   return t2 > t1 ? t1 : t2;
00035 }

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

Definition at line 60 of file Min_Max.h.

References ace_max(), and ace_min().

00061 {
00062   return ace_min (ace_max (min, val), max);
00063 }


Generated on Thu Nov 9 10:25:56 2006 for ACE by doxygen 1.3.6