8 #ifndef UFO_UTILS_DATAEXTRACTOR_CONSTRAINEDRANGE_H_
9 #define UFO_UTILS_DATAEXTRACTOR_CONSTRAINEDRANGE_H_
35 assert(newBegin >=
begin_);
36 assert(newEnd <=
end_);
bool empty() const
Return true if the range is empty, false otherwise.
int end() const
Return the index of the element past the end of the range.
ConstrainedRange(int size=0)
Create an unconstrained range of size size.
void reset()
Remove any constraints, resetting the range to its original size.
int size() const
Return the range length.
void constrain(int newBegin, int newEnd)
Constrain the range.
int begin() const
Return the index of the first element in the range.