Blender V4.3
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 217 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 225 of file BLI_bit_span.hh.

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

◆ MutableBitSpan() [3/3]

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

Definition at line 227 of file BLI_bit_span.hh.

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

Member Function Documentation

◆ begin()

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

Definition at line 276 of file BLI_bit_span.hh.

References bit_range_, and data_.

◆ bit_range()

const IndexRange & blender::bits::MutableBitSpan::bit_range ( ) const
inline

◆ 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()

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

Definition at line 281 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 312 of file BLI_bit_span.hh.

References set_all().

◆ index_range()

◆ is_empty()

bool blender::bits::MutableBitSpan::is_empty ( ) const
inline

Definition at line 234 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 286 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 244 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 301 of file BLI_bit_span.hh.

References reset_all(), and set_all().

◆ size()

◆ slice()

MutableBitSpan blender::bits::MutableBitSpan::slice ( const IndexRange range) const
inline

◆ take_back()

MutableBitSpan blender::bits::MutableBitSpan::take_back ( const int64_t n) const
inline

Definition at line 261 of file BLI_bit_span.hh.

References bit_range_, data_, and MutableBitSpan().

Referenced by BKE_mesh_mirror_apply_mirror_on_axis_for_modifier().

◆ take_front()

MutableBitSpan blender::bits::MutableBitSpan::take_front ( const int64_t n) const
inline

Definition at line 256 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: