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]

blender::bits::MutableBitSpan::MutableBitSpan ( )
default

◆ MutableBitSpan() [2/3]

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

Definition at line 225 of file BLI_bit_span.hh.

◆ MutableBitSpan() [3/3]

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

Definition at line 227 of file BLI_bit_span.hh.

Member Function Documentation

◆ begin()

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

Definition at line 276 of file BLI_bit_span.hh.

References bit_range_, data_, and blender::IndexRange::start().

◆ bit_range()

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

Definition at line 271 of file BLI_bit_span.hh.

References bit_range_.

Referenced by blender::bits::or_bools_into_bits(), and blender::bits::tests::TEST().

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

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

◆ end()

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

Definition at line 281 of file BLI_bit_span.hh.

References bit_range_, data_, and blender::IndexRange::one_after_last().

◆ fill()

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

◆ index_range()

IndexRange blender::bits::MutableBitSpan::index_range ( ) const
inline

◆ is_empty()

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

Definition at line 234 of file BLI_bit_span.hh.

References bit_range_, and blender::IndexRange::is_empty().

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

◆ 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

◆ 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 blender::IndexRange::take_front().

Member Data Documentation

◆ bit_range_

◆ data_


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