An interval of (signed) integers defined by a start and a size. More...
Classes | |
class | const_iterator |
Random-access input iterator with const access. More... | |
class | const_reverse_iterator |
Random-access reverse input iterator with const access. More... | |
struct | ge0 |
Unary predicate for greater-equal 0 (int values) More... | |
struct | gt0 |
Unary predicate for greater than 0 (int values) More... | |
struct | le0 |
Unary predicate for less-equal 0 (int values) More... | |
struct | lt0 |
Unary predicate for less than 0 (int values) More... | |
Public Types | |
typedef IntType | value_type |
Type of values the range contains. More... | |
typedef IntType | size_type |
The type that can represent the size of the range. More... | |
Public Member Functions | |
constexpr | IntRange () noexcept |
Default construct an empty range (0,0) More... | |
constexpr | IntRange (const IntType len) noexcept |
Construct a range with specified length, starting at zero (0,len) More... | |
constexpr | IntRange (const IntType beg, const IntType len) noexcept |
Construct a range from start/length, no checks. More... | |
IntType | start () const noexcept |
The (inclusive) lower value of the range. More... | |
IntType | size () const noexcept |
The size of the range. More... | |
IntType & | start () noexcept |
Non-const access to start of the range. More... | |
IntType & | size () noexcept |
Non-const access to size of the range. More... | |
bool | empty () const noexcept |
True if range is empty (zero-sized) More... | |
IntType | first () const noexcept |
The (inclusive) lower value of the range. Same as start() More... | |
IntType | last () const noexcept |
The (inclusive) upper value of the range. More... | |
void | clear () noexcept |
Reset to zero start and zero size. More... | |
void | reset (const IntType beg, const IntType len) noexcept |
Reset start and length, no checks. More... | |
void | setStart (const IntType i) noexcept |
Set the start position, no checks. More... | |
void | setSize (const IntType n) noexcept |
Change the size, no checks. Identical to resize() More... | |
void | resize (const IntType n) noexcept |
Change the size, no checks. Identical to setSize() More... | |
void | clampSize () noexcept |
Enforce non-negative size. More... | |
bool | found (const IntType value) const noexcept |
True if the (global) value is located within the range. More... | |
constexpr IntType | operator[] (const IntType i) const noexcept |
Offset dereference, without bounds checking. More... | |
bool | operator() (const IntType value) const noexcept |
True if the global value is located within the range. More... | |
IntType | operator++ () noexcept |
Increase the size by 1. More... | |
IntType | operator++ (int) noexcept |
IntType | operator+= (const IntType n) noexcept |
Increase the size by n. More... | |
IntType | operator-- () noexcept |
Decrease the size by 1, but never below 0. More... | |
IntType | operator-- (int) noexcept |
IntType | operator-= (const IntType n) noexcept |
Decrease the size by n, but never below 0. More... | |
operator bool () const noexcept | |
True if range is non-empty. More... | |
const_iterator | at (const IntType i) const |
const_iterator | begin () const noexcept |
A const_iterator set to the beginning of the range. More... | |
const_iterator | cbegin () const noexcept |
A const_iterator set to the beginning of the range. More... | |
const_iterator | cend () const noexcept |
A const_iterator set to 1 beyond the end of the range. More... | |
const_iterator | end () const noexcept |
A const_iterator set to 1 beyond the end of the range. More... | |
const_reverse_iterator | rbegin () const noexcept |
A const_reverse_iterator set to 1 before the end of range. More... | |
const_reverse_iterator | crbegin () const noexcept |
A const_reverse_iterator set to 1 before the end of range. More... | |
const_reverse_iterator | rend () const noexcept |
A const_reverse_iterator set to 1 before the begin of range. More... | |
const_reverse_iterator | crend () const noexcept |
A const_reverse_iterator set to 1 before the begin of range. More... | |
Protected Member Functions | |
IntType | rend_value () const noexcept |
The value 1 before the start of the range. More... | |
IntType | end_value () const noexcept |
The value 1 beyond the end of the range. More... | |
An interval of (signed) integers defined by a start and a size.
Definition at line 63 of file IntRange.H.
typedef IntType value_type |
Type of values the range contains.
Definition at line 94 of file IntRange.H.
typedef IntType size_type |
The type that can represent the size of the range.
Definition at line 97 of file IntRange.H.
|
inlineconstexprnoexcept |
Default construct an empty range (0,0)
Definition at line 31 of file IntRangeI.H.
|
inlineexplicitconstexprnoexcept |
Construct a range with specified length, starting at zero (0,len)
Definition at line 39 of file IntRangeI.H.
References Foam::noexcept.
|
inlineconstexprnoexcept |
Construct a range from start/length, no checks.
Definition at line 50 of file IntRangeI.H.
References Foam::noexcept.
|
inlineprotectednoexcept |
The value 1 before the start of the range.
Corresponds to the value of the rend() iterator
Definition at line 457 of file IntRangeI.H.
Referenced by labelRange::before().
|
inlineprotectednoexcept |
The value 1 beyond the end of the range.
Corresponds to the value of the end() iterator
Definition at line 464 of file IntRangeI.H.
Referenced by labelRange::after().
|
inlinenoexcept |
The (inclusive) lower value of the range.
Definition at line 408 of file IntRangeI.H.
Referenced by ensightFaces::classify(), bitSet::set(), and bitSet::unset().
|
inlinenoexcept |
The size of the range.
Definition at line 415 of file IntRangeI.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 422 of file IntRangeI.H.
|
inlinenoexcept |
Non-const access to size of the range.
Definition at line 429 of file IntRangeI.H.
|
inlinenoexcept |
True if range is empty (zero-sized)
Definition at line 436 of file IntRangeI.H.
Referenced by bitSet::set(), Foam::BitOps::set(), ensightCells::sort(), ensightFaces::sort(), and bitSet::unset().
|
inlinenoexcept |
The (inclusive) lower value of the range. Same as start()
Definition at line 443 of file IntRangeI.H.
Referenced by Foam::operator<(), Foam::operator==(), labelRanges::remove(), bitSet::set(), and bitSet::unset().
|
inlinenoexcept |
The (inclusive) upper value of the range.
Definition at line 450 of file IntRangeI.H.
Referenced by labelRanges::remove().
|
inlinenoexcept |
Reset to zero start and zero size.
Definition at line 471 of file IntRangeI.H.
Referenced by labelRanges::add().
|
inlinenoexcept |
Reset start and length, no checks.
Definition at line 478 of file IntRangeI.H.
|
inlinenoexcept |
Set the start position, no checks.
Definition at line 490 of file IntRangeI.H.
|
inlinenoexcept |
Change the size, no checks. Identical to resize()
Definition at line 497 of file IntRangeI.H.
References n.
|
inlinenoexcept |
Change the size, no checks. Identical to setSize()
Definition at line 504 of file IntRangeI.H.
References n.
|
inlinenoexcept |
Enforce non-negative size.
Definition at line 511 of file IntRangeI.H.
Referenced by labelRange::join(), IntRange< IntType >::operator--(), IntRange< IntType >::operator-=(), and labelRanges::remove().
|
inlinenoexcept |
True if the (global) value is located within the range.
Definition at line 518 of file IntRangeI.H.
|
inlineconstexprnoexcept |
Offset dereference, without bounds checking.
Definition at line 530 of file IntRangeI.H.
|
inlinenoexcept |
True if the global value is located within the range.
Behaviour identical to found() - usable as a predicate
Definition at line 538 of file IntRangeI.H.
References found.
|
inlinenoexcept |
Increase the size by 1.
Definition at line 546 of file IntRangeI.H.
|
inlinenoexcept |
Definition at line 554 of file IntRangeI.H.
|
inlinenoexcept |
|
inlinenoexcept |
Decrease the size by 1, but never below 0.
Definition at line 562 of file IntRangeI.H.
References IntRange< IntType >::clampSize().
|
inlinenoexcept |
Definition at line 572 of file IntRangeI.H.
References IntRange< IntType >::clampSize().
|
inlinenoexcept |
Decrease the size by n, but never below 0.
Definition at line 592 of file IntRangeI.H.
References IntRange< IntType >::clampSize(), and n.
|
inlineexplicitnoexcept |
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 335 of file IntRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 343 of file IntRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 351 of file IntRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 367 of file IntRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 359 of file IntRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 375 of file IntRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 383 of file IntRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 391 of file IntRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 399 of file IntRangeI.H.