|
Blender
V2.93
|
#include <BLI_index_range.hh>
Classes | |
| class | Iterator |
Public Member Functions | |
| constexpr | IndexRange ()=default |
| constexpr | IndexRange (int64_t size) |
| constexpr | IndexRange (int64_t start, int64_t size) |
| constexpr Iterator | begin () const |
| constexpr Iterator | end () const |
| constexpr int64_t | operator[] (int64_t index) const |
| constexpr int64_t | size () const |
| constexpr IndexRange | after (int64_t n) const |
| constexpr IndexRange | before (int64_t n) const |
| constexpr int64_t | first () const |
| constexpr int64_t | last () const |
| constexpr int64_t | one_after_last () const |
| constexpr int64_t | start () const |
| constexpr bool | contains (int64_t value) const |
| constexpr IndexRange | slice (int64_t start, int64_t size) const |
| constexpr IndexRange | slice (IndexRange range) const |
| Span< int64_t > | as_span () const |
Friends | |
| constexpr friend bool | operator== (IndexRange a, IndexRange b) |
| std::ostream & | operator<< (std::ostream &stream, IndexRange range) |
Definition at line 65 of file BLI_index_range.hh.
|
constexprdefault |
|
inlineexplicitconstexpr |
Definition at line 73 of file BLI_index_range.hh.
References BLI_assert, and size().
Definition at line 78 of file BLI_index_range.hh.
References BLI_assert, size(), and start().
|
inlineconstexpr |
Create a new range starting at the end of the current one.
Definition at line 168 of file BLI_index_range.hh.
References BLI_assert, and IndexRange().
Referenced by blender::tests::TEST().
Get read-only access to a memory buffer that contains the range as actual numbers.
Definition at line 32 of file BLI_index_range.cc.
References blender::arrays, blender::current_array, blender::current_array_mutex, blender::current_array_size, and power_of_2_max_u().
Referenced by spreadsheet_main_region_draw(), and blender::tests::TEST().
|
inlineconstexpr |
Create a new range that ends at the start of the current one.
Definition at line 177 of file BLI_index_range.hh.
References BLI_assert, and IndexRange().
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Definition at line 129 of file BLI_index_range.hh.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Returns true when the range contains a certain number, otherwise false.
Definition at line 222 of file BLI_index_range.hh.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Definition at line 134 of file BLI_index_range.hh.
|
inlineconstexpr |
Get the first element in the range. Asserts when the range is empty.
Definition at line 187 of file BLI_index_range.hh.
References BLI_assert, and size().
Referenced by blender::parallel_for(), and blender::tests::TEST().
|
inlineconstexpr |
Get the last element in the range. Asserts when the range is empty.
Definition at line 197 of file BLI_index_range.hh.
References BLI_assert, and size().
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Get the element one after the end. The returned value is undefined when the range is empty.
Definition at line 206 of file BLI_index_range.hh.
Referenced by blender::parallel_for(), and blender::tests::TEST().
Access an element in the range.
Definition at line 142 of file BLI_index_range.hh.
References BLI_assert, and size().
|
inlineconstexpr |
Get the amount of numbers in the range.
Definition at line 160 of file BLI_index_range.hh.
Referenced by blender::fn::mf_network_optimization::add_constant_folded_sockets(), first(), IndexRange(), last(), operator[](), blender::parallel_for(), blender::Span< T >::slice(), slice(), and blender::tests::TEST().
|
inlineconstexpr |
Definition at line 238 of file BLI_index_range.hh.
|
inlineconstexpr |
Returns a new range, that contains a sub-interval of the current one.
Definition at line 230 of file BLI_index_range.hh.
References BLI_assert, IndexRange(), size(), and start().
Referenced by slice(), and blender::tests::TEST().
|
inlineconstexpr |
Get the first element in the range. The returned value is undefined when the range is empty.
Definition at line 214 of file BLI_index_range.hh.
Referenced by IndexRange(), blender::Span< T >::slice(), slice(), and blender::tests::TEST().
|
friend |
Definition at line 248 of file BLI_index_range.hh.
|
friend |
Two ranges compare equal when they contain the same numbers.
Definition at line 152 of file BLI_index_range.hh.