An interval of (signed) integers defined by a start and a size. More...
#include <IntRange.H>

Classes | |
| struct | gt0 |
| Unary predicate for greater than 0 (int values). More... | |
| struct | lt0 |
| Unary predicate for less than 0 (int values). More... | |
| struct | ge0 |
| Unary predicate for greater-equal 0 (int values). More... | |
| struct | le0 |
| Unary predicate for less-equal 0 (int values). More... | |
Public Types | |
| typedef IntType | value_type |
| Type of values the range contains. | |
| typedef IntType | size_type |
| The type that can represent the size of the range. | |
| using | const_iterator = IndexIterator<IntType> |
| Input iterator with const access. | |
| using | const_reverse_iterator = ReverseIndexIterator<IntType> |
| Reverse input iterator with const access. | |
Public Member Functions | |
| constexpr | IntRange () noexcept |
| Default construct an empty range (0,0). | |
| constexpr | IntRange (IntType len) noexcept |
| Construct a range with specified length, starting at zero (0,len). | |
| constexpr | IntRange (IntType beg, IntType len) noexcept |
| Construct a range from start/length, no checks. | |
| bool | empty () const noexcept |
| True if range is empty (zero-sized). | |
| bool | good () const noexcept |
| True if range has size greater than zero. | |
| IntType | size () const noexcept |
| The size of the range. | |
| IntType & | size () noexcept |
| Non-const access to size of the range. | |
| IntType | start () const noexcept |
| The (inclusive) lower value of the range. | |
| IntType & | start () noexcept |
| Non-const access to start of the range. | |
| IntType | min () const noexcept |
| The (inclusive) lower value of the range, same as start(), begin_value(). | |
| IntType | max () const noexcept |
| The (inclusive) upper value of the range, same as rbegin_value(). Ill-defined for an empty range. | |
| void | clear () noexcept |
| Reset to (0,0). | |
| void | reset () noexcept |
| Reset to (0,0). | |
| void | reset (IntType beg, IntType len) noexcept |
| Reset start and length, no checks. | |
| void | setStart (IntType i) noexcept |
| Set the start position, no checks. | |
| void | setSize (IntType n) noexcept |
| Change the size, no checks. Identical to resize(). | |
| void | resize (IntType n) noexcept |
| Change the size, no checks. Identical to setSize(). | |
| void | clampSize () noexcept |
| Enforce non-negative size. | |
| bool | contains (IntType value) const noexcept |
| True if the (global) value is within the range. | |
| bool | found (IntType val) const noexcept |
| True if the (global) value is within the range. | |
| const_iterator | at (IntType i) const |
| Return const_iterator to a position within the range, with bounds checking. | |
| constexpr IntType | operator[] (IntType i) const noexcept |
| Offset dereference, without bounds checking. | |
| bool | operator() (IntType i) const noexcept |
| True if the global value is located within the range. | |
| IntType | operator++ () noexcept |
| Increase the size by 1. | |
| IntType | operator++ (int) noexcept |
| IntType | operator+= (IntType n) noexcept |
| Increase the size by n. | |
| IntType | operator-- () noexcept |
| Decrease the size by 1, but never below 0. | |
| IntType | operator-- (int) noexcept |
| IntType | operator-= (IntType n) noexcept |
| Decrease the size by n, but never below 0. | |
| operator bool () const noexcept | |
| True if range has size greater than zero. Same as good(). | |
| IntType | begin_value () const noexcept |
| The value at the beginning of the range - same as min(), start(). | |
| IntType | end_value () const noexcept |
| The value 1 beyond the end of the range. | |
| IntType | rbegin_value () const noexcept |
| The max value of the range. | |
| IntType | rend_value () const noexcept |
| The value 1 before the begin of range. | |
| const_iterator | begin () const noexcept |
| A const_iterator set to the beginning of the range. | |
| const_iterator | cbegin () const noexcept |
| A const_iterator set to the beginning of the range. | |
| const_iterator | cend () const noexcept |
| A const_iterator set to 1 beyond the end of the range. | |
| const_iterator | end () const noexcept |
| A const_iterator set to 1 beyond the end of the range. | |
| const_reverse_iterator | rbegin () const noexcept |
| A const_reverse_iterator set to 1 before the end of range. | |
| const_reverse_iterator | crbegin () const noexcept |
| A const_reverse_iterator set to 1 before the end of range. | |
| const_reverse_iterator | rend () const noexcept |
| A const_reverse_iterator set to 1 before the begin of range. | |
| const_reverse_iterator | crend () const noexcept |
| A const_reverse_iterator set to 1 before the begin of range. | |
An interval of (signed) integers defined by a start and a size.
Definition at line 68 of file IntRange.H.
| typedef IntType value_type |
Type of values the range contains.
Definition at line 101 of file IntRange.H.
| typedef IntType size_type |
The type that can represent the size of the range.
Definition at line 106 of file IntRange.H.
| using const_iterator = IndexIterator<IntType> |
Input iterator with const access.
Definition at line 111 of file IntRange.H.
| using const_reverse_iterator = ReverseIndexIterator<IntType> |
Reverse input iterator with const access.
Definition at line 116 of file IntRange.H.
|
inlineconstexprnoexcept |
Default construct an empty range (0,0).
Definition at line 24 of file IntRangeI.H.
References Foam::noexcept.
|
inlineexplicitconstexprnoexcept |
Construct a range with specified length, starting at zero (0,len).
Definition at line 32 of file IntRangeI.H.
References Foam::noexcept.
|
inlineconstexprnoexcept |
Construct a range from start/length, no checks.
Definition at line 40 of file IntRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
True if range is empty (zero-sized).
Definition at line 198 of file IntRange.H.
Referenced by UPstream::localNode_parentProcs(), UPstream::newCommunicator(), Foam::BitOps::set(), bitSet::set(), ensightCells::sort(), ensightFaces::sort(), and bitSet::unset().

|
inlinenoexcept |
True if range has size greater than zero.
Definition at line 203 of file IntRange.H.
|
inlinenoexcept |
The size of the range.
Definition at line 208 of file IntRange.H.
Referenced by triSurfaceMesh::edgeTree(), UPstream::newCommunicator(), Foam::operator<(), Foam::operator==(), mapDistributeBase::receive(), SubList< T >::reset(), mapDistributeBase::send(), and decomposedBlockData::writeBlocks().

|
inlinenoexcept |
Non-const access to size of the range.
Definition at line 213 of file IntRange.H.
|
inlinenoexcept |
The (inclusive) lower value of the range.
Definition at line 218 of file IntRange.H.
Referenced by ensightFaces::classify(), UPstream::newCommunicator(), Foam::operator<(), Foam::operator==(), mapDistributeBase::receive(), SubList< T >::reset(), mapDistributeBase::send(), and decomposedBlockData::writeBlocks().

|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 223 of file IntRange.H.
|
inlinenoexcept |
The (inclusive) lower value of the range, same as start(), begin_value().
Definition at line 229 of file IntRange.H.
Referenced by decomposedBlockData::writeBlocks().

|
inlinenoexcept |
The (inclusive) upper value of the range, same as rbegin_value(). Ill-defined for an empty range.
Definition at line 235 of file IntRange.H.
Referenced by decomposedBlockData::writeBlocks().

|
inlinenoexcept |
|
inlinenoexcept |
Reset to (0,0).
Definition at line 99 of file IntRangeI.H.
References Foam::noexcept.
Referenced by UPstream::localNode_parentProcs(), labelRange::operator=(), and labelRange::reset().

|
inlinenoexcept |
Reset start and length, no checks.
Definition at line 107 of file IntRangeI.H.
|
inlinenoexcept |
Set the start position, no checks.
Definition at line 115 of file IntRangeI.H.
|
inlinenoexcept |
Change the size, no checks. Identical to resize().
Definition at line 122 of file IntRangeI.H.
References n.
|
inlinenoexcept |
Change the size, no checks. Identical to setSize().
Definition at line 129 of file IntRangeI.H.
References n.
|
inlinenoexcept |
|
inlinenoexcept |
True if the (global) value is within the range.
Definition at line 143 of file IntRangeI.H.
Referenced by IntRange< int >::found(), decomposedBlockData::gatherProcData(), UPstream::newCommunicator(), and IntRange< int >::operator()().

|
inlinenoexcept |
True if the (global) value is within the range.
Definition at line 286 of file IntRange.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 298 of file IntRange.H.
|
inlineconstexprnoexcept |
Offset dereference, without bounds checking.
Definition at line 154 of file IntRangeI.H.
|
inlinenoexcept |
True if the global value is located within the range.
Behaviour identical to contains() - usable as a predicate
Definition at line 310 of file IntRange.H.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 170 of file IntRangeI.H.
|
inlinenoexcept |
|
inlinenoexcept |
Decrease the size by 1, but never below 0.
Definition at line 178 of file IntRangeI.H.
|
inlinenoexcept |
Definition at line 187 of file IntRangeI.H.
|
inlinenoexcept |
Decrease the size by n, but never below 0.
Definition at line 206 of file IntRangeI.H.
References n.
|
inlineexplicitnoexcept |
True if range has size greater than zero. Same as good().
Definition at line 337 of file IntRange.H.
|
inlinenoexcept |
The value at the beginning of the range - same as min(), start().
Definition at line 61 of file IntRangeI.H.
References Foam::noexcept.
Referenced by IntRange< int >::begin(), IntRange< int >::cbegin(), bitSet::set(), and bitSet::unset().

|
inlinenoexcept |
The value 1 beyond the end of the range.
Definition at line 68 of file IntRangeI.H.
References Foam::noexcept.
Referenced by IntRange< int >::cend(), IntRange< int >::end(), Foam::BitOps::set(), bitSet::set(), and bitSet::unset().

|
inlinenoexcept |
The max value of the range.
Definition at line 75 of file IntRangeI.H.
References Foam::noexcept.
Referenced by IntRange< int >::crbegin(), and IntRange< int >::rbegin().

|
inlinenoexcept |
The value 1 before the begin of range.
Definition at line 82 of file IntRangeI.H.
References Foam::noexcept.
Referenced by IntRange< int >::crend(), and IntRange< int >::rend().

|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 368 of file IntRange.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 373 of file IntRange.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 378 of file IntRange.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 383 of file IntRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 392 of file IntRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 398 of file IntRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 403 of file IntRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 408 of file IntRange.H.