53 range_(endLabelRange_),
61 index_(range_.
empty() ? -1 : 0)
65 inline bool Foam::labelRange::const_iterator::operator==
70 return (this->index_ == iter.index_);
74 inline bool Foam::labelRange::const_iterator::operator!=
85 return range_[index_];
91 return range_[index_];
98 if (++index_ >= range_.size())
169 return start_ + size_ - 1;
175 return value >= this->
first() && value <= this->
last();
195 return start_ == rhs.start_ && size_ == rhs.size_;
const_iterator()
Construct null - equivalent to an 'end' position.
const_iterator & operator++()
const const_iterator & end() const
const_iterator set to beyond the end of the range
label size() const
Return the effective size of the range.
bool contains(const label) const
Return true if the value is within the range.
bool operator==(const labelRange &) const
const_iterator cbegin() const
const_iterator set to the beginning of the range
bool empty() const
Is the range empty?
label first() const
The (inclusive) lower value of the range.
const_iterator begin() const
const_iterator set to the beginning of the range
bool operator<(const labelRange &rhs) const
Comparison function for sorting, compares the start.
label last() const
The (inclusive) upper value of the range.
label operator[](const label) const
Return element in range, no bounds checking.
void clear()
Reset to zero size.
labelRange()
Construct an empty range.
bool operator!=(const labelRange &) const
const const_iterator & cend() const
const_iterator set to beyond the end of the range
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.