Image Component Library (ICL)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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 >

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

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 ( )
inlinevirtual
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

template<class Type>
virtual bool icl::utils::Range< Type >::contains ( Type  value) const
inlinevirtual

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 
)
inlinestatic

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 ( )
inlinestatic

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

template<class Type>
static Range<Type> icl::utils::Range< Type >::limits ( )
inlinestatic

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: