Blender V5.0
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 84 of file BLI_bit_ref.hh.

Constructor & Destructor Documentation

◆ BitRef() [1/2]

◆ 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 100 of file BLI_bit_ref.hh.

References blender::bits::BitIndexMask, data, 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 116 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 109 of file BLI_bit_ref.hh.

Referenced by operator bool().

◆ MutableBitRef

friend class MutableBitRef
friend

Definition at line 91 of file BLI_bit_ref.hh.

References MutableBitRef.

Referenced by MutableBitRef.


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