15 #ifndef DCNUMERICRANGE_H
16 #define DCNUMERICRANGE_H
19 #include "hashGenerator.h"
34 INLINE DCNumericRange(Number min, Number max);
35 INLINE DCNumericRange(
const DCNumericRange ©);
36 INLINE
void operator = (
const DCNumericRange ©);
39 INLINE
void validate(Number num,
bool &range_error)
const;
46 void output(ostream &out, Number divisor = 1)
const;
47 void output_char(ostream &out, Number divisor = 1)
const;
55 INLINE Number
get_min(
int n)
const;
56 INLINE Number
get_max(
int n)
const;
61 INLINE
bool operator < (
const MinMax &other)
const;
66 INLINE
void output_minmax(ostream &out, Number divisor,
const MinMax &range)
const;
67 INLINE
void output_minmax_char(ostream &out,
const MinMax &range)
const;
73 #include "dcNumericRange.I"
void output_char(ostream &out, Number divisor=1) const
Outputs the range, formatting the numeric values as quoted ASCII characters.
bool add_range(Number min, Number max)
Adds a new minmax to the list of ranges.
bool is_empty() const
Returns true if the range contains no elements (and thus allows all numbers), false if it contains at...
Represents a range of legal integer or floating-point values.
This is our own Panda specialization on the default STL vector.
Number get_min(int n) const
Returns the minimum value defined by the nth component.
This class generates an arbitrary hash number from a sequence of ints.
void validate(Number num, bool &range_error) const
Convenience function to validate the indicated number.
Number get_max(int n) const
Returns the maximum value defined by the nth component.
bool is_in_range(Number num) const
Returns true if the indicated number is within the specified range, false otherwise.
Number get_one_value() const
If has_one_value() returns true, this returns the one legal value accepted by the numeric range...
bool has_one_value() const
Returns true if the numeric range specifies exactly one legal value, false if multiple values are leg...
int get_num_ranges() const
Returns the number of minmax components in the range description.