Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Public Attributes
icl::utils::Range< Type > Struct Template Reference

class representing a range defined by min and max value More...

#include <Range.h>

Inheritance diagram for icl::utils::Range< Type >:
icl::utils::SteppingRange< Type >

List of all members.

Public Member Functions

virtual ~Range ()
 Range ()
 create an empty range (min = max = 0)
 Range (Type minVal, Type maxVal)
 create a special Range
Type getLength () const
 return max-min
template<class dstType >
const Range< dstType > castTo () const
 casts this range into another depth
virtual bool contains (Type value) const
 tests whether a given value is inside of this range
bool operator== (const Range< Type > &other) const
bool operator!= (const Range< Type > &other) const
void extend (const Type &t)
 extends the range so that the given value is within this range
void extend (const Range &r)
 extends the range so that the given range is within this range

Static Public Member Functions

static Range< Type > limits ()
 returns type range (using std::numeric_limits<Type>)
static Range< Type > inv_limits ()
 returns inverted limits range [numeric-limits.max,numeric-limits.min]
static Range< Type > from (const Type *begin, const Type *end)
 estimate range of given iterator range (using std::for_each)

Public Attributes

Type minVal
 minimum value of this range
Type maxVal
 maximum value of this range

Detailed Description

template<class Type>
struct icl::utils::Range< Type >

class representing a range defined by min and max value


Constructor & Destructor Documentation

template<class Type>
virtual icl::utils::Range< Type >::~Range ( ) [inline, virtual]
template<class Type>
icl::utils::Range< Type >::Range ( ) [inline]

create an empty range (min = max = 0)

template<class Type>
icl::utils::Range< Type >::Range ( Type  minVal,
Type  maxVal 
) [inline]

create a special Range


Member Function Documentation

template<class Type>
template<class dstType >
const Range<dstType> icl::utils::Range< Type >::castTo ( ) const [inline]

casts this range into another depth

Reimplemented in icl::utils::SteppingRange< Type >.

template<class Type>
virtual bool icl::utils::Range< Type >::contains ( Type  value) const [inline, virtual]

tests whether a given value is inside of this range

Reimplemented in icl::utils::SteppingRange< Type >.

template<class Type>
void icl::utils::Range< Type >::extend ( const Type &  t) [inline]

extends the range so that the given value is within this range

template<class Type>
void icl::utils::Range< Type >::extend ( const Range< Type > &  r) [inline]

extends the range so that the given range is within this range

template<class Type>
static Range<Type> icl::utils::Range< Type >::from ( const Type *  begin,
const Type *  end 
) [inline, static]

estimate range of given iterator range (using std::for_each)

template<class Type>
Type icl::utils::Range< Type >::getLength ( ) const [inline]

return max-min

template<class Type>
static Range<Type> icl::utils::Range< Type >::inv_limits ( ) [inline, static]

returns inverted limits range [numeric-limits.max,numeric-limits.min]

template<class Type>
static Range<Type> icl::utils::Range< Type >::limits ( ) [inline, static]

returns type range (using std::numeric_limits<Type>)

template<class Type>
bool icl::utils::Range< Type >::operator!= ( const Range< Type > &  other) const [inline]
template<class Type>
bool icl::utils::Range< Type >::operator== ( const Range< Type > &  other) const [inline]

Member Data Documentation

template<class Type>
Type icl::utils::Range< Type >::maxVal

maximum value of this range

template<class Type>
Type icl::utils::Range< Type >::minVal

minimum value of this range


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines