A range of indices.
More...
#include <ConstrainedRange.h>
|
| ConstrainedRange (int size=0) |
| Create an unconstrained range of size size . More...
|
|
int | begin () const |
| Return the index of the first element in the range. More...
|
|
int | end () const |
| Return the index of the element past the end of the range. More...
|
|
int | size () const |
| Return the range length. More...
|
|
bool | empty () const |
| Return true if the range is empty, false otherwise. More...
|
|
void | constrain (int newBegin, int newEnd) |
| Constrain the range. More...
|
|
void | reset () |
| Remove any constraints, resetting the range to its original size. More...
|
|
A range of indices.
Definition at line 16 of file ConstrainedRange.h.
◆ ConstrainedRange()
ufo::ConstrainedRange::ConstrainedRange |
( |
int |
size = 0 | ) |
|
|
inlineexplicit |
◆ begin()
int ufo::ConstrainedRange::begin |
( |
| ) |
const |
|
inline |
Return the index of the first element in the range.
Definition at line 24 of file ConstrainedRange.h.
◆ constrain()
void ufo::ConstrainedRange::constrain |
( |
int |
newBegin, |
|
|
int |
newEnd |
|
) |
| |
|
inline |
◆ empty()
bool ufo::ConstrainedRange::empty |
( |
| ) |
const |
|
inline |
Return true if the range is empty, false otherwise.
Definition at line 31 of file ConstrainedRange.h.
◆ end()
int ufo::ConstrainedRange::end |
( |
| ) |
const |
|
inline |
Return the index of the element past the end of the range.
Definition at line 26 of file ConstrainedRange.h.
◆ reset()
void ufo::ConstrainedRange::reset |
( |
| ) |
|
|
inline |
Remove any constraints, resetting the range to its original size.
Definition at line 42 of file ConstrainedRange.h.
◆ size()
int ufo::ConstrainedRange::size |
( |
| ) |
const |
|
inline |
◆ begin_
int ufo::ConstrainedRange::begin_ |
|
private |
◆ end_
int ufo::ConstrainedRange::end_ |
|
private |
◆ size_
int ufo::ConstrainedRange::size_ |
|
private |
The documentation for this class was generated from the following file: