21 #ifndef _GLIBCXX_ALGORITHM
35 : start_pos(From<0 ? 0 : From)
37 if (to<0) end_pos = -2;
69 int size()
const {
return end_pos-start_pos+1; }
71 bool is_whole()
const {
return start_pos == 0 && end_pos<0; }
80 bool operator == (
const PosRange& other)
const {
return start_pos == other.start_pos && end_pos == other.end_pos; }
95 void dump(FILE *out)
const {
96 fprintf(out,
"[%i..%i]", start_pos, end_pos);
124 bool is_limited()
const {
168 #error pos_range.h included twice
169 #endif // POS_RANGE_H
static PosRange from(int pos)
PosRange intersection(PosRange r1, PosRange r2)
bool operator==(const PosRange &other) const
ExplicitRange(const PosRange &limRange)
ExplicitRange(const PosRange &range, int maxlen)
static PosRange prior(int pos)
static HelixNrInfo * start
bool contains(int pos) const
DECLARE_ASSIGNMENT_OPERATOR(ExplicitRange)
ExplicitRange(int start_, int end_)
static PosRange after(int pos)
bool is_unlimited() const
ExplicitRange(const ExplicitRange &limRange)
bool operator!=(const PosRange &other) const
static PosRange till(int pos)
char * dup_corresponding_part(const char *source, size_t source_len) const
PosRange(int From, int to)
void copy_corresponding_part(char *dest, const char *source, size_t source_len) const