Blender V4.3
blender::bits::BitRef Class Reference

#include <BLI_bit_ref.hh>

Public Member Functions

 BitRef ()=default
 
 BitRef (const BitInt *data, const int64_t bit_index)
 
bool test () const
 
 operator bool () const
 

Friends

class MutableBitRef
 

Detailed Description

This is a read-only pointer to a specific bit. The value of the bit can be retrieved, but not changed.

Definition at line 85 of file BLI_bit_ref.hh.

Constructor & Destructor Documentation

◆ BitRef() [1/2]

blender::bits::BitRef::BitRef ( )
default

◆ BitRef() [2/2]

blender::bits::BitRef::BitRef ( const BitInt * data,
const int64_t bit_index )
inline

Reference a specific bit in an array. Note that #data does not have to point to the exact integer the bit is in.

Definition at line 101 of file BLI_bit_ref.hh.

References blender::bits::BitIndexMask, blender::bits::int_containing_bit(), and blender::bits::mask_single_bit().

Member Function Documentation

◆ operator bool()

blender::bits::BitRef::operator bool ( ) const
inline

Definition at line 117 of file BLI_bit_ref.hh.

References test().

◆ test()

bool blender::bits::BitRef::test ( ) const
inline

Return true when the bit is currently 1 and false otherwise.

Definition at line 110 of file BLI_bit_ref.hh.

Referenced by operator bool().

Friends And Related Symbol Documentation

◆ MutableBitRef

friend class MutableBitRef
friend

Definition at line 92 of file BLI_bit_ref.hh.


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