47 range(
const infinint & low,
const infinint & high) { parts.push_back(segment(low, high)); };
48 range(
const range & ref) =
default;
49 range(range && ref)
noexcept =
default;
50 range & operator = (
const range & ref) =
default;
51 range & operator = (range && ref)
noexcept =
default;
54 void operator += (
const range & ref);
55 range operator + (
const range & ref)
const { range ret = *
this; ret += ref;
return ret; };
56 std::string display()
const;
64 void reset_read()
const { read_cursor = parts.begin(); };
74 void clear() { parts.clear(); };
82 const infinint & get_low()
const {
return low; };
83 const infinint & get_high()
const {
return high; };
85 bool overlaps_with(
const segment & ref)
const {
return !(ref < *
this) && !(ref > *
this); };
86 void merge_with(
const segment & ref);
89 bool operator < (
const segment & ref)
const {
return high + 1 < ref.low; };
90 bool operator > (
const segment & ref)
const {
return ref < *
this; };
91 bool operator == (
const segment & ref)
const {
return ref.high == high && ref.low == low; };
92 bool operator != (
const segment & ref)
const {
return ! (*
this == ref); };
95 bool operator <= (
const segment & ref)
const {
return ref.low < low && low <= ref.high + 1 && ref.high < high; };
96 bool operator >= (
const segment &ref)
const {
return ref <= *
this; };
97 bool contains(
const segment & ref)
const {
return low <= ref.low && ref.high <= high; };
99 std::string display()
const;
105 std::list<segment> parts;
106 mutable std::list<segment>::const_iterator read_cursor;
the arbitrary large positive integer class
void reset_read() const
provides a way to read range contents segment by segment
bool read_next_segment(infinint &low, infinint &high) const
read the next available segment
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols
switch module to limitint (32 ou 64 bits integers) or infinint