Blender V4.3
blender::bits::BitVector< InlineBufferCapacity, Allocator > Class Template Reference

#include <BLI_bit_vector.hh>

Public Member Functions

 BitVector (Allocator allocator={}) noexcept
 
 BitVector (NoExceptConstructor, Allocator allocator={}) noexcept
 
 BitVector (const BoundedBitSpan span)
 
 BitVector (const BitVector &other)
 
 BitVector (BitVector &&other) noexcept
 
 BitVector (const int64_t size_in_bits, const bool value=false, Allocator allocator={})
 
 BitVector (const Span< bool > values, Allocator allocator={})
 
 ~BitVector ()
 
BitVectoroperator= (const BitVector &other)
 
BitVectoroperator= (BitVector &&other)
 
 operator BoundedBitSpan () const
 
 operator MutableBoundedBitSpan ()
 
int64_t size () const
 
int64_t capacity () const
 
bool is_empty () const
 
BitIntdata ()
 
const BitIntdata () const
 
BitRef operator[] (const int64_t index) const
 
MutableBitRef operator[] (const int64_t index)
 
IndexRange index_range () const
 
void append (const bool value)
 
BitIterator begin () const
 
BitIterator end () const
 
MutableBitIterator begin ()
 
MutableBitIterator end ()
 
void resize (const int64_t new_size_in_bits, const bool value=false)
 
void fill (const bool value)
 
void reserve (const int new_capacity_in_bits)
 
void clear ()
 
void clear_and_shrink ()
 

Detailed Description

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
class blender::bits::BitVector< InlineBufferCapacity, Allocator >

Definition at line 57 of file BLI_bit_vector.hh.

Constructor & Destructor Documentation

◆ BitVector() [1/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( Allocator allocator = {})
inlinenoexcept

Definition at line 87 of file BLI_bit_vector.hh.

◆ BitVector() [2/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( NoExceptConstructor ,
Allocator allocator = {} )
inlinenoexcept

Definition at line 95 of file BLI_bit_vector.hh.

◆ BitVector() [3/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( const BoundedBitSpan span)
inline

◆ BitVector() [4/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( const BitVector< InlineBufferCapacity, Allocator > & other)
inline

Definition at line 115 of file BLI_bit_vector.hh.

◆ BitVector() [5/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( BitVector< InlineBufferCapacity, Allocator > && other)
inlinenoexcept

Definition at line 120 of file BLI_bit_vector.hh.

References blender::uninitialized_copy_n().

◆ BitVector() [6/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( const int64_t size_in_bits,
const bool value = false,
Allocator allocator = {} )
inline

Create a new vector with the given size and fill it with #value.

Definition at line 150 of file BLI_bit_vector.hh.

◆ BitVector() [7/7]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector ( const Span< bool > values,
Allocator allocator = {} )
inlineexplicit

Create a bit vector based on an array of bools. Each byte of the input array maps to one bit.

Definition at line 159 of file BLI_bit_vector.hh.

◆ ~BitVector()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::~BitVector ( )
inline

Definition at line 166 of file BLI_bit_vector.hh.

Member Function Documentation

◆ append()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
void blender::bits::BitVector< InlineBufferCapacity, Allocator >::append ( const bool value)
inline

Add a new bit to the end of the vector.

Definition at line 252 of file BLI_bit_vector.hh.

References blender::bits::MutableBitRef::set().

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

◆ begin() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
MutableBitIterator blender::bits::BitVector< InlineBufferCapacity, Allocator >::begin ( )
inline

Definition at line 270 of file BLI_bit_vector.hh.

◆ begin() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitIterator blender::bits::BitVector< InlineBufferCapacity, Allocator >::begin ( ) const
inline

Definition at line 260 of file BLI_bit_vector.hh.

◆ capacity()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
int64_t blender::bits::BitVector< InlineBufferCapacity, Allocator >::capacity ( ) const
inline

Number of bits that can be stored before the BitVector has to grow.

Definition at line 204 of file BLI_bit_vector.hh.

Referenced by blender::index_mask::IndexMask::from_bools().

◆ clear()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
void blender::bits::BitVector< InlineBufferCapacity, Allocator >::clear ( )
inline

Reset the size of the vector to zero elements, but keep the same memory capacity to be refilled again.

Definition at line 319 of file BLI_bit_vector.hh.

Referenced by blender::ed::sculpt_paint::dynamic_topology_update().

◆ clear_and_shrink()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
void blender::bits::BitVector< InlineBufferCapacity, Allocator >::clear_and_shrink ( )
inline

◆ data() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitInt * blender::bits::BitVector< InlineBufferCapacity, Allocator >::data ( )
inline

◆ data() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
const BitInt * blender::bits::BitVector< InlineBufferCapacity, Allocator >::data ( ) const
inline

Definition at line 219 of file BLI_bit_vector.hh.

◆ end() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
MutableBitIterator blender::bits::BitVector< InlineBufferCapacity, Allocator >::end ( )
inline

Definition at line 275 of file BLI_bit_vector.hh.

◆ end() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitIterator blender::bits::BitVector< InlineBufferCapacity, Allocator >::end ( ) const
inline

Definition at line 265 of file BLI_bit_vector.hh.

◆ fill()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
void blender::bits::BitVector< InlineBufferCapacity, Allocator >::fill ( const bool value)
inline

◆ index_range()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
IndexRange blender::bits::BitVector< InlineBufferCapacity, Allocator >::index_range ( ) const
inline

Definition at line 244 of file BLI_bit_vector.hh.

Referenced by BKE_animsys_nla_remap_keyframe_values().

◆ is_empty()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
bool blender::bits::BitVector< InlineBufferCapacity, Allocator >::is_empty ( ) const
inline

◆ operator BoundedBitSpan()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator BoundedBitSpan ( ) const
inline

Definition at line 183 of file BLI_bit_vector.hh.

◆ operator MutableBoundedBitSpan()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator MutableBoundedBitSpan ( )
inline

Definition at line 188 of file BLI_bit_vector.hh.

◆ operator=() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitVector & blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator= ( BitVector< InlineBufferCapacity, Allocator > && other)
inline

Definition at line 178 of file BLI_bit_vector.hh.

References blender::move_assign_container().

◆ operator=() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitVector & blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator= ( const BitVector< InlineBufferCapacity, Allocator > & other)
inline

Definition at line 173 of file BLI_bit_vector.hh.

References blender::copy_assign_container().

◆ operator[]() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
MutableBitRef blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator[] ( const int64_t index)
inlinenodiscard

Get a mutable reference to a specific bit.

Definition at line 237 of file BLI_bit_vector.hh.

References BLI_assert.

◆ operator[]() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitRef blender::bits::BitVector< InlineBufferCapacity, Allocator >::operator[] ( const int64_t index) const
inlinenodiscard

Get a read-only reference to a specific bit.

Definition at line 227 of file BLI_bit_vector.hh.

References BLI_assert.

◆ reserve()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
void blender::bits::BitVector< InlineBufferCapacity, Allocator >::reserve ( const int new_capacity_in_bits)
inline

Make sure that the capacity of the vector is large enough to hold the given amount of bits. The actual size is not changed.

Definition at line 310 of file BLI_bit_vector.hh.

Referenced by blender::bits::BitVector< InlineBufferCapacity, Allocator >::resize().

◆ resize()

◆ size()


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