A set of labels defined by a start, a length and a stride. More...
#include <sliceRange.H>
Classes | |
| class | indexer |
| A value indexer, for iteration or generation. More... | |
| class | const_iterator |
| Bidirectional input iterator with const access. More... | |
| class | const_reverse_iterator |
| Bidirectional reverse input iterator with const access. More... | |
Public Types | |
| typedef label | value_type |
| Type of values the range contains. | |
| typedef label | size_type |
| The type that can represent the size of the range. | |
Public Member Functions | |
| constexpr | sliceRange () noexcept |
| Default construct an empty slice (0,0,0). | |
| constexpr | sliceRange (const label beg, const label len, const label stride) noexcept |
| Construct slice from start/size/stride, no checks. | |
| sliceRange (const FixedList< label, 3 > &coeffs) | |
| Construct slice from start/size/stride coefficients, enforce non-negative size and stride. | |
| bool | empty () const noexcept |
| True if range is empty (zero-sized). | |
| bool | good () const noexcept |
| True if range has size greater than zero. | |
| label | size () const noexcept |
| The size of the range. | |
| label & | size () noexcept |
| Non-const access to size of the range. | |
| label | start () const noexcept |
| The (inclusive) lower value of the range. | |
| label & | start () noexcept |
| Non-const access to start of the range. | |
| label | stride () const noexcept |
| The stride for the range. | |
| label & | stride () noexcept |
| Non-const access to the stride. | |
| label | min () const noexcept |
| The (inclusive) lower value of the range, same as start(). | |
| label | max () const noexcept |
| The (inclusive) upper value of the range. Ill-defined for an empty range. | |
| bool | equals (const sliceRange &b) const noexcept |
| Test equality of start/size/stride. | |
| int | compare (const sliceRange &b) const noexcept |
| Compare start/size/stride in that order. | |
| label | operator[] (const label i) const noexcept |
| Return element in the range, without bounds checking. | |
| operator bool () const noexcept | |
| True if range has size greater than zero. Same as good(). | |
| indexer | generator () const |
| Return a forward values generator. | |
| const_iterator | at (const label i) const |
| Return const_iterator to a position within the range, with bounds checking. | |
| 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. | |
A set of labels defined by a start, a length and a stride.
Definition at line 64 of file sliceRange.H.
| typedef label value_type |
Type of values the range contains.
Definition at line 91 of file sliceRange.H.
| typedef label size_type |
The type that can represent the size of the range.
Definition at line 96 of file sliceRange.H.
|
inlineconstexprnoexcept |
Default construct an empty slice (0,0,0).
Definition at line 23 of file sliceRangeI.H.
References Foam::noexcept.
Referenced by compare(), equals(), and sliceRange().

|
inlineconstexprnoexcept |
Construct slice from start/size/stride, no checks.
Definition at line 31 of file sliceRangeI.H.
References Foam::noexcept, and stride().

|
explicit |
Construct slice from start/size/stride coefficients, enforce non-negative size and stride.
References sliceRange().

|
inlinenoexcept |
True if range is empty (zero-sized).
Definition at line 143 of file sliceRange.H.
References empty(), and Foam::noexcept.
Referenced by empty().


|
inlinenoexcept |
True if range has size greater than zero.
Definition at line 148 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
|
inlinenoexcept |
Non-const access to size of the range.
Definition at line 158 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The (inclusive) lower value of the range.
Definition at line 163 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 168 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The stride for the range.
Definition at line 173 of file sliceRange.H.
References Foam::noexcept.
Referenced by sliceRange().

|
inlinenoexcept |
Non-const access to the stride.
Definition at line 178 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The (inclusive) lower value of the range, same as start().
Definition at line 184 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The (inclusive) upper value of the range. Ill-defined for an empty range.
Definition at line 190 of file sliceRange.H.
References Foam::noexcept.
|
inlinenoexcept |
Test equality of start/size/stride.
Definition at line 46 of file sliceRangeI.H.
References b, and sliceRange().
Referenced by Foam::operator!=(), and Foam::operator==().


|
inlinenoexcept |
Compare start/size/stride in that order.
Definition at line 62 of file sliceRangeI.H.
References b, and sliceRange().
Referenced by Foam::operator<(), Foam::operator<=(), Foam::operator>(), and Foam::operator>=().


|
inlinenoexcept |
Return element in the range, without bounds checking.
Definition at line 213 of file sliceRange.H.
|
inlineexplicitnoexcept |
True if range has size greater than zero. Same as good().
Definition at line 221 of file sliceRange.H.
References Foam::noexcept.
|
inline |
Return a forward values generator.
Definition at line 327 of file sliceRangeI.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 334 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 346 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 353 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 367 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 360 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 374 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 381 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 388 of file sliceRangeI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 395 of file sliceRangeI.H.
References Foam::noexcept.