Lines Matching refs:mStart
32 Range(uint32_t start, uint32_t end) : mStart(start), mEnd(end) {} in Range()
39 inline bool isValid() const { return mStart != NOWHERE && mEnd != NOWHERE; } in isValid()
41 inline uint32_t getStart() const { return mStart; } // inclusive in getStart()
42 inline void setStart(uint32_t start) { mStart = start; } // inclusive in setStart()
47 inline uint32_t getLength() const { return mEnd - mStart; } in getLength()
49 inline bool isEmpty() const { return mStart == mEnd; } in isEmpty()
51 inline uint32_t toRangeOffset(uint32_t globalPos) const { return globalPos - mStart; } in toRangeOffset()
52 inline uint32_t toGlobalOffset(uint32_t rangePos) const { return mStart + rangePos; } in toGlobalOffset()
56 return std::make_pair(Range(mStart, pos), Range(pos, mEnd)); in split()
60 return mStart <= other.mStart && other.mEnd <= mEnd; in contains()
69 inline bool contains(uint32_t pos) const { return mStart <= pos && pos < mEnd; } in contains()
73 return left.isValid() && right.isValid() && left.mStart < right.mEnd && in intersects()
74 right.mStart < left.mEnd; in intersects()
77 return Range(std::max(left.mStart, right.mStart), std::min(left.mEnd, right.mEnd)); in intersection()
83 return Range({std::min(left.mStart, right.mStart), std::max(left.mEnd, right.mEnd)}); in merge()
86 inline bool operator==(const Range& o) const { return mStart == o.mStart && mEnd == o.mEnd; }
90 inline Range operator+(int32_t shift) const { return Range(mStart + shift, mEnd + shift); }
92 inline Range operator-(int32_t shift) const { return Range(mStart - shift, mEnd - shift); }
112 inline RangeIterator begin() const { return RangeIterator(mStart); } in begin()
116 uint32_t mStart;