#include <BLI_index_range.hh>
Definition at line 50 of file BLI_index_range.hh.
◆ IndexRange() [1/3]
| blender::IndexRange::IndexRange |
( |
| ) |
|
|
constexprdefault |
◆ IndexRange() [2/3]
| blender::IndexRange::IndexRange |
( |
int64_t | size | ) |
|
|
inlineexplicitconstexpr |
◆ IndexRange() [3/3]
| blender::IndexRange::IndexRange |
( |
const int64_t | start, |
|
|
const int64_t | size ) |
|
inlineconstexpr |
◆ after()
Create a new range starting at the end of the current one.
Definition at line 181 of file BLI_index_range.hh.
◆ before()
Create a new range that ends at the start of the current one.
Definition at line 190 of file BLI_index_range.hh.
◆ begin()
| Iterator blender::IndexRange::begin |
( |
| ) |
const |
|
inlineconstexpr |
◆ contains() [1/2]
| bool blender::IndexRange::contains |
( |
const IndexRange | range | ) |
const |
|
inlineconstexpr |
Returns true when all indices in the given range are also in the current range.
Definition at line 255 of file BLI_index_range.hh.
◆ contains() [2/2]
| bool blender::IndexRange::contains |
( |
int64_t | value | ) |
const |
|
inlineconstexpr |
Returns true when the range contains a certain number, otherwise false.
Definition at line 247 of file BLI_index_range.hh.
◆ drop_back()
Returns a new IndexRange with n elements removed from the end of the range. This invokes undefined behavior when n is negative.
Definition at line 313 of file BLI_index_range.hh.
◆ drop_front()
◆ end()
| Iterator blender::IndexRange::end |
( |
| ) |
const |
|
inlineconstexpr |
◆ first()
| int64_t blender::IndexRange::first |
( |
| ) |
const |
|
inlineconstexpr |
◆ from_begin_end()
◆ from_begin_end_inclusive()
◆ from_begin_size()
◆ from_end_size()
◆ from_single()
◆ index_range()
| IndexRange blender::IndexRange::index_range |
( |
| ) |
const |
|
inlineconstexpr |
◆ intersect()
Returns a new IndexRange that contains the intersection of the current one with the given range. Returns empty range if there are no overlapping indices. The returned range is always a valid slice of this range.
Definition at line 290 of file BLI_index_range.hh.
◆ is_empty()
| bool blender::IndexRange::is_empty |
( |
| ) |
const |
|
inlineconstexpr |
◆ last()
◆ one_after_last()
| int64_t blender::IndexRange::one_after_last |
( |
| ) |
const |
|
inlineconstexpr |
Get the element one after the end. The returned value is undefined when the range is empty.
Definition at line 231 of file BLI_index_range.hh.
◆ one_before_start()
| int64_t blender::IndexRange::one_before_start |
( |
| ) |
const |
|
inlineconstexpr |
Get the element one before the beginning. The returned value is undefined when the range is empty, and the range must start after zero already.
Definition at line 222 of file BLI_index_range.hh.
◆ operator[]()
◆ shift()
Move the range forward or backward within the larger array. The amount may be negative, but its absolute value cannot be greater than the existing start of the range.
Definition at line 346 of file BLI_index_range.hh.
◆ size()
| int64_t blender::IndexRange::size |
( |
| ) |
const |
|
inlineconstexpr |
◆ slice() [1/2]
◆ slice() [2/2]
Returns a new range, that contains a sub-interval of the current one.
Definition at line 272 of file BLI_index_range.hh.
◆ start()
| int64_t blender::IndexRange::start |
( |
| ) |
const |
|
inlineconstexpr |
◆ take_back()
Returns a new IndexRange that only contains the last n elements. This invokes undefined behavior when n is negative.
Definition at line 335 of file BLI_index_range.hh.
◆ take_front()
Returns a new IndexRange that only contains the first n elements. This invokes undefined behavior when n is negative.
Definition at line 324 of file BLI_index_range.hh.
◆ with_new_end()
Creates a new index range with the same beginning but a different end.
Definition at line 173 of file BLI_index_range.hh.
◆ operator!=
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | stream, |
|
|
IndexRange | range ) |
|
friend |
◆ operator==
Two ranges compare equal when they contain the same numbers.
Definition at line 140 of file BLI_index_range.hh.
The documentation for this class was generated from the following file: