53 template<
class T>
struct MinMaxFunctor{
56 inline void operator()(
const T &x){
72 return Range<Type>((std::numeric_limits<Type>::min)(),(std::numeric_limits<Type>::max)());
77 return Range<Type>((std::numeric_limits<Type>::max)(),(std::numeric_limits<Type>::min)());
84 std::for_each(begin,end,MinMaxFunctor<Type>(&r));
98 template<
class dstType>
129 #define ICL_INSTANTIATE_DEPTH(D) typedef Range<icl##D> Range##D; 131 #undef ICL_INSTANTIATE_DEPTH 137 std::ostream &
operator<<(std::ostream &s,
const Range <T> &range);
141 std::istream &
operator>>(std::istream &s, Range <T> &range);
class representing a range defined by min and max value
Definition: Range.h:49
Type maxVal
maximum value of this range
Definition: Range.h:92
undocument this line if you encounter any issues!
Definition: Any.h:37
#define ICL_INSTANTIATE_ALL_DEPTHS
Definition: Macros.h:175
#define ICLUtils_API
this macros are important for creating dll's
Definition: CompatMacros.h:171
Range(Type minVal, Type maxVal)
create a special Range
Definition: Range.h:68
bool operator==(const Range< Type > &other) const
Definition: Range.h:107
static Range< Type > inv_limits()
returns inverted limits range [numeric-limits.max,numeric-limits.min]
Definition: Range.h:76
Type minVal
minimum value of this range
Definition: Range.h:89
virtual ~Range()
Definition: Range.h:63
ICLUtils_API std::ostream & operator<<(std::ostream &s, const ConfigFile &cf)
Default ostream operator to put a ConfigFile into a stream.
static Range< Type > from(const Type *begin, const Type *end)
estimate range of given iterator range (using std::for_each)
Definition: Range.h:81
virtual bool contains(Type value) const
tests whether a given value is inside of this range
Definition: Range.h:104
ICLUtils_API std::istream & operator>>(std::istream &s, Point &p)
istream operator
Type getLength() const
return max-min
Definition: Range.h:95
void extend(const Type &t)
extends the range so that the given value is within this range
Definition: Range.h:117
static Range< Type > limits()
returns type range (using std::numeric_limits<Type>)
Definition: Range.h:71
Range()
create an empty range (min = max = 0)
Definition: Range.h:65
const Range< dstType > castTo() const
casts this range into another depth
Definition: Range.h:99
bool operator!=(const Range< Type > &other) const
Definition: Range.h:112
void extend(const Range &r)
extends the range so that the given range is within this range
Definition: Range.h:123