BitMagic-C++
Public Member Functions
bm::bvector< Alloc >::reference Class Reference

Class reference implements an object for bit assignment. More...

#include <bm.h>

Public Member Functions

 reference (bvector< Alloc > &bv, size_type position) BMNOEXCEPT
 
 reference (const reference &ref) BMNOEXCEPT
 
 operator bool () const BMNOEXCEPT
 
const referenceoperator= (const reference &ref) const
 
const referenceoperator= (bool value) const BMNOEXCEPT
 
bool operator== (const reference &ref) const BMNOEXCEPT
 
const referenceoperator&= (bool value) const
  More...
 
const referenceoperator|= (bool value) const
  More...
 
const referenceoperator^= (bool value) const
  More...
 
bool operator! () const BMNOEXCEPT
  More...
 
bool operator~ () const BMNOEXCEPT
  More...
 
referenceflip ()
  More...
 

Detailed Description

template<class Alloc>
class bm::bvector< Alloc >::reference

Class reference implements an object for bit assignment.

Since C++ does not provide with build-in bit type supporting l-value operations we have to emulate it.

Definition at line 147 of file bm.h.

Member Function Documentation

◆ flip()

template<class Alloc >
reference& bm::bvector< Alloc >::reference::flip ( )
inline

Negates the bit value

Definition at line 221 of file bm.h.

◆ operator!()

template<class Alloc >
bool bm::bvector< Alloc >::reference::operator! ( ) const
inline

Logical Not operator

Definition at line 209 of file bm.h.

◆ operator&=()

template<class Alloc >
const reference& bm::bvector< Alloc >::reference::operator&= ( bool  value) const
inline

Bitwise AND. Performs operation: bit = bit AND value

Definition at line 185 of file bm.h.

◆ operator^=()

template<class Alloc >
const reference& bm::bvector< Alloc >::reference::operator^= ( bool  value) const
inline

Bitwise exclusive-OR (XOR). Performs operation: bit = bit XOR value

Definition at line 202 of file bm.h.

◆ operator|=()

template<class Alloc >
const reference& bm::bvector< Alloc >::reference::operator|= ( bool  value) const
inline

Bitwise OR. Performs operation: bit = bit OR value

Definition at line 192 of file bm.h.

◆ operator~()

template<class Alloc >
bool bm::bvector< Alloc >::reference::operator~ ( ) const
inline

Bit Not operator

Definition at line 215 of file bm.h.


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