Blender V5.0
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
BitInt * data () const
const IndexRangebit_range () const
MutableBitIterator begin () const
MutableBitIterator end () const
 operator BitSpan () const
void set_all ()
void set_all (const bool value)
void reset_all ()
void copy_from (const BitSpan other)
void copy_from (const BoundedBitSpan other)
void fill (const bool value)

Protected Attributes

BitInt * data_ = 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]

blender::bits::MutableBitSpan::MutableBitSpan ( BitInt * data,
const int64_t size )
inline

Definition at line 239 of file BLI_bit_span.hh.

◆ MutableBitSpan() [3/3]

blender::bits::MutableBitSpan::MutableBitSpan ( BitInt * data,
const IndexRange bit_range )
inline

Definition at line 241 of file BLI_bit_span.hh.

Member Function Documentation

◆ begin()

MutableBitIterator blender::bits::MutableBitSpan::begin ( ) const
inline

Definition at line 290 of file BLI_bit_span.hh.

◆ bit_range()

Definition at line 285 of file BLI_bit_span.hh.

◆ copy_from() [1/2]

Definition at line 66 of file bit_span.cc.

◆ copy_from() [2/2]

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

Definition at line 72 of file bit_span.cc.

◆ data()

BitInt * blender::bits::MutableBitSpan::data ( ) const
inline

Definition at line 280 of file BLI_bit_span.hh.

◆ end()

MutableBitIterator blender::bits::MutableBitSpan::end ( ) const
inline

Definition at line 295 of file BLI_bit_span.hh.

◆ 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.

◆ index_range()

Definition at line 253 of file BLI_bit_span.hh.

◆ is_empty()

Definition at line 248 of file BLI_bit_span.hh.

◆ operator BitSpan()

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

Definition at line 300 of file BLI_bit_span.hh.

◆ operator[]()

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

Definition at line 258 of file BLI_bit_span.hh.

◆ reset_all()

Sets all referenced bits to 0.

Definition at line 41 of file bit_span.cc.

◆ set_all() [1/2]

Sets all referenced bits to 1.

Definition at line 16 of file bit_span.cc.

◆ 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.

◆ size()

Definition at line 243 of file BLI_bit_span.hh.

◆ slice()

Definition at line 265 of file BLI_bit_span.hh.

◆ take_back()

Definition at line 275 of file BLI_bit_span.hh.

◆ take_front()

Definition at line 270 of file BLI_bit_span.hh.

Member Data Documentation

◆ bit_range_

Definition at line 234 of file BLI_bit_span.hh.

◆ data_

Definition at line 233 of file BLI_bit_span.hh.


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