|
Blender V5.0
|
#include <BLI_bit_span.hh>
Inherited by blender::bits::BoundedBitSpan.
Public Member Functions | |
| BitSpan ()=default | |
| BitSpan (const BitInt *data, const int64_t size_in_bits) | |
| BitSpan (const BitInt *data, const IndexRange bit_range) | |
| int64_t | size () const |
| bool | is_empty () const |
| IndexRange | index_range () const |
| BitRef | operator[] (const int64_t index) const |
| BitSpan | slice (const IndexRange range) const |
| BitSpan | take_front (const int64_t n) const |
| BitSpan | take_back (const int64_t n) const |
| BitSpan | drop_front (const int64_t n) const |
| BitSpan | drop_back (const int64_t n) const |
| const BitInt * | data () const |
| const IndexRange & | bit_range () const |
| BitIterator | begin () const |
| BitIterator | end () const |
Protected Attributes | |
| const BitInt * | data_ = nullptr |
| IndexRange | bit_range_ = {0, 0} |
Similar to Span, but references a range of bits instead of normal C++ types (which must be at least one byte large). Use MutableBitSpan if the values are supposed to be modified.
The beginning and end of a BitSpan does not have to be at byte/int boundaries. It can start and end at any bit.
Definition at line 72 of file BLI_bit_span.hh.
|
default |
Construct an empty span.
Definition at line 84 of file BLI_bit_span.hh.
|
inline |
Definition at line 88 of file BLI_bit_span.hh.
|
inline |
Definition at line 148 of file BLI_bit_span.hh.
|
inline |
Definition at line 143 of file BLI_bit_span.hh.
|
inline |
Definition at line 138 of file BLI_bit_span.hh.
Definition at line 133 of file BLI_bit_span.hh.
Definition at line 128 of file BLI_bit_span.hh.
|
inline |
Definition at line 153 of file BLI_bit_span.hh.
|
inline |
Definition at line 101 of file BLI_bit_span.hh.
|
inline |
Definition at line 96 of file BLI_bit_span.hh.
Definition at line 106 of file BLI_bit_span.hh.
|
inline |
Number of bits referenced by the span.
Definition at line 91 of file BLI_bit_span.hh.
|
inlinenodiscard |
Definition at line 113 of file BLI_bit_span.hh.
Definition at line 123 of file BLI_bit_span.hh.
Definition at line 118 of file BLI_bit_span.hh.
|
protected |
The range of referenced bits.
Definition at line 78 of file BLI_bit_span.hh.
Base pointer to the integers containing the bits. The actual bit span might start at a much higher address when bit_range_.start() is large.
Definition at line 76 of file BLI_bit_span.hh.