Blender V5.0
blender::bits::MutableBitSpan Class Reference

#include <BLI_bit_span.hh>

Inherited by blender::bits::MutableBoundedBitSpan.

Public Member Functions

 MutableBitSpan ()=default
 MutableBitSpan (BitInt *data, const int64_t size)
 MutableBitSpan (BitInt *data, const IndexRange bit_range)
int64_t size () const
bool is_empty () const
IndexRange index_range () const
MutableBitRef operator[] (const int64_t index) const
MutableBitSpan slice (const IndexRange range) const
MutableBitSpan take_front (const int64_t n) const
MutableBitSpan take_back (const int64_t n) const
BitIntdata () const
const IndexRangebit_range () const
MutableBitIterator begin () const
MutableBitIterator end () const
 operator BitSpan () const
void set_all ()
void reset_all ()
void copy_from (const BitSpan other)
void copy_from (const BoundedBitSpan other)
void set_all (const bool value)
void fill (const bool value)

Protected Attributes

BitIntdata_ = nullptr
IndexRange bit_range_ = {0, 0}

Detailed Description

Same as BitSpan, but also allows modifying the referenced bits.

Definition at line 231 of file BLI_bit_span.hh.

Constructor & Destructor Documentation

◆ MutableBitSpan() [1/3]

◆ MutableBitSpan() [2/3]

Definition at line 239 of file BLI_bit_span.hh.

References bit_range_, data(), data_, and size().

◆ MutableBitSpan() [3/3]

Definition at line 241 of file BLI_bit_span.hh.

References bit_range(), bit_range_, data(), and data_.

Member Function Documentation

◆ begin()

Definition at line 290 of file BLI_bit_span.hh.

References bit_range_, and data_.

◆ bit_range()

◆ copy_from() [1/2]

void blender::bits::MutableBitSpan::copy_from ( const BitSpan other)

◆ copy_from() [2/2]

void blender::bits::MutableBitSpan::copy_from ( const BoundedBitSpan other)

◆ data()

◆ end()

Definition at line 295 of file BLI_bit_span.hh.

References bit_range_, and data_.

◆ fill()

void blender::bits::MutableBitSpan::fill ( const bool value)
inline

Same as set_all to mirror MutableSpan.

Definition at line 326 of file BLI_bit_span.hh.

References set_all().

◆ index_range()

◆ is_empty()

Definition at line 248 of file BLI_bit_span.hh.

References bit_range_.

Referenced by blender::bits::tests::TEST().

◆ operator BitSpan()

blender::bits::MutableBitSpan::operator BitSpan ( ) const
inline

Definition at line 300 of file BLI_bit_span.hh.

References bit_range_, and data_.

◆ operator[]()

MutableBitRef blender::bits::MutableBitSpan::operator[] ( const int64_t index) const
inline

Definition at line 258 of file BLI_bit_span.hh.

References bit_range_, BLI_assert, and data_.

◆ reset_all()

◆ set_all() [1/2]

◆ set_all() [2/2]

void blender::bits::MutableBitSpan::set_all ( const bool value)
inline

Sets all referenced bits to either 0 or 1.

Definition at line 315 of file BLI_bit_span.hh.

References reset_all(), and set_all().

◆ size()

◆ slice()

◆ take_back()

◆ take_front()

Definition at line 270 of file BLI_bit_span.hh.

References bit_range_, data_, and MutableBitSpan().

Member Data Documentation

◆ bit_range_

◆ data_


The documentation for this class was generated from the following files: