Range.h File Reference

#include "AbstractVisitor.h"
#include <cmath>

Include dependency graph for Range.h:

Go to the source code of this file.

Data Structures

struct  Bound< T >
struct  Range< T >
class  RangeChecker

Functions

template<typename T>
void swap (T &a, T &b)
template<typename T>
bool operator== (const Bound< T > &b1, const Bound< T > &b2)
template<typename T>
static bool is_in (const Bound< T > &b1, const Bound< T > &b2)
template<typename T>
static bool overlap (const Bound< T > &min, const Bound< T > &max)

Variables

static Bound< int > Empty


Function Documentation

template<typename T>
static bool is_in ( const Bound< T > &  b1,
const Bound< T > &  b2 
) [inline, static]

Definition at line 57 of file Range.h.

References Bound< T >::lower, and Bound< T >::upper.

00057                                                           {
00058     if (b1.lower >=b1.lower && b1.upper <= b2.upper)
00059         return true;
00060     return false;
00061 }

template<typename T>
bool operator== ( const Bound< T > &  b1,
const Bound< T > &  b2 
) [inline]

Definition at line 52 of file Range.h.

References Bound< T >::lower, and Bound< T >::upper.

00052                                                         {
00053     return b1.lower == b2.lower && b1.upper == b2.upper;
00054 }

template<typename T>
static bool overlap ( const Bound< T > &  min,
const Bound< T > &  max 
) [inline, static]

Definition at line 66 of file Range.h.

References Bound< T >::lower, and Bound< T >::upper.

00066                                                               {
00067     if (min.upper >= max.lower)
00068         return true;
00069     return false;
00070 }

template<typename T>
void swap ( T &  a,
T &  b 
) [inline]

Definition at line 25 of file Range.h.

00025                       {
00026     T c(b);
00027     b=a;
00028     a=c;
00029 }


Variable Documentation

Bound<int> Empty [static]

Definition at line 63 of file Range.h.


Generated on Wed Feb 27 20:31:22 2008 for php.ast.svn.src. by  doxygen 1.5.3