Visual Computing Library
Loading...
Searching...
No Matches
vcl::BitProxy< T > Class Template Reference

The BitProxy class allows to access to a bool reference from a bit saved in a mask, and then allow assignment. More...

#include <vclib/space/core/bit_set/bit_proxy.h>

Public Member Functions

 BitProxy (T &mask, uint index)
 Constructs the BitProxy with the given mask and index.
 
 operator bool () const
 
void operator= (bool bit)
 
BitProxyoperator|= (bool bit)
 
BitProxyoperator&= (bool bit)
 
BitProxyoperator/= (bool bit)
 

Private Attributes

std::reference_wrapper< T > mMask
 
const uint mIndex
 

Detailed Description

template<std::integral T>
class vcl::BitProxy< T >

The BitProxy class allows to access to a bool reference from a bit saved in a mask, and then allow assignment.

Constructor & Destructor Documentation

◆ BitProxy()

template<std::integral T>
vcl::BitProxy< T >::BitProxy ( T &  mask,
uint  index 
)
inline

Constructs the BitProxy with the given mask and index.

Parameters
[in]maskthe mask containing the bit to access.
[in]indexthe index of the bit to access.

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