RANGE< _CT > Class Template Reference

Template for storing numeric range. More...

#include <mi32/range.h>

Inheritance diagram for RANGE< _CT >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

bool Contains (const RANGE &rhs) const
bool Contains (_CT value) const
void Expand (_CT value)
void Extend (const RANGE &rhs)
void Extend (_CT minval, _CT maxval)
void Extend (_CT value)
_CT GetCenter () const
_CT GetMaximum () const
_CT GetMinimum () const
_CT GetSize () const
void Intersect (const RANGE &rhs)
bool IsValid () const
_CT Limit (_CT value) const
bool operator!= (const RANGE &rhs) const
bool operator== (const RANGE &rhs) const
bool Overlaps (const RANGE &rhs) const
 RANGE (_CT value)
 RANGE (_CT minval, _CT maxval)
 RANGE ()
void Set (_CT minval, _CT maxval)
void SetInvalid ()
void SetMaximum (_CT val)
void SetMinimum (_CT val)

Detailed Description

template<class _CT>
class RANGE< _CT >

Template for storing numeric range.

Designed to work with signed integer and floating-point data types, unsigned types are not supported.

Definition at line 56 of file range.h.


Constructor & Destructor Documentation

template<class _CT>
RANGE< _CT >::RANGE  )  [inline]
 

Default constructor, initialize to invalid (empty) range.

Definition at line 60 of file range.h.

template<class _CT>
RANGE< _CT >::RANGE _CT  minval,
_CT  maxval
[inline]
 

Construct range with specified minimum and maximum values.

Definition at line 66 of file range.h.

template<class _CT>
RANGE< _CT >::RANGE _CT  value  )  [inline, explicit]
 

Construct range to include only specified value.

Definition at line 73 of file range.h.


Member Function Documentation

template<class _CT>
bool RANGE< _CT >::Contains const RANGE< _CT > &  rhs  )  const [inline]
 

Determine if range containes specified range.

Definition at line 100 of file range.h.

template<class _CT>
bool RANGE< _CT >::Contains _CT  value  )  const [inline]
 

Determine if range contains specified value.

Definition at line 93 of file range.h.

template<class _CT>
void RANGE< _CT >::Expand _CT  value  )  [inline]
 

Expand range by specified amount.

Definition at line 107 of file range.h.

template<class _CT>
void RANGE< _CT >::Extend const RANGE< _CT > &  rhs  )  [inline]
 

Extend range to include specified range.

Definition at line 135 of file range.h.

template<class _CT>
void RANGE< _CT >::Extend _CT  minval,
_CT  maxval
[inline]
 

Extend range to include specified range.

Definition at line 125 of file range.h.

template<class _CT>
void RANGE< _CT >::Extend _CT  value  )  [inline]
 

Extend range to include specified value.

Definition at line 116 of file range.h.

template<class _CT>
_CT RANGE< _CT >::GetCenter  )  const [inline]
 

Get center of range.

Definition at line 144 of file range.h.

template<class _CT>
_CT RANGE< _CT >::GetMaximum  )  const [inline]
 

Get maximum value in range.

Definition at line 150 of file range.h.

template<class _CT>
_CT RANGE< _CT >::GetMinimum  )  const [inline]
 

Get minimum value in range.

Definition at line 156 of file range.h.

template<class _CT>
_CT RANGE< _CT >::GetSize  )  const [inline]
 

Get 'size' of range.

Definition at line 162 of file range.h.

template<class _CT>
void RANGE< _CT >::Intersect const RANGE< _CT > &  rhs  )  [inline]
 

Intersect range with another range.

Definition at line 166 of file range.h.

template<class _CT>
bool RANGE< _CT >::IsValid  )  const [inline]
 

Determine if range is valid.

Definition at line 180 of file range.h.

template<class _CT>
_CT RANGE< _CT >::Limit _CT  value  )  const [inline]
 

Limit the value based on the current range Can be used to replace the bound() macro.

Returns:
Limit'ed value based on the range

Definition at line 188 of file range.h.

template<class _CT>
bool RANGE< _CT >::operator!= const RANGE< _CT > &  rhs  )  const [inline]
 

Inequality operator.

Definition at line 86 of file range.h.

template<class _CT>
bool RANGE< _CT >::operator== const RANGE< _CT > &  rhs  )  const [inline]
 

Equality operator.

Definition at line 79 of file range.h.

template<class _CT>
bool RANGE< _CT >::Overlaps const RANGE< _CT > &  rhs  )  const [inline]
 

Determine if range overlaps another range.

Definition at line 195 of file range.h.

template<class _CT>
void RANGE< _CT >::Set _CT  minval,
_CT  maxval
[inline]
 

Set minimum and maximum values.

Definition at line 210 of file range.h.

template<class _CT>
void RANGE< _CT >::SetInvalid  )  [inline]
 

Set range to be "invalid" (empty).

Definition at line 202 of file range.h.

template<class _CT>
void RANGE< _CT >::SetMaximum _CT  val  )  [inline]
 

Set maximum value.

Definition at line 216 of file range.h.

template<class _CT>
void RANGE< _CT >::SetMinimum _CT  val  )  [inline]
 

Set minimum value.

Definition at line 221 of file range.h.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:20:10 2004 for TNTsdk by  doxygen 1.3.8-20040913