This encapsulates the concept of a single bit. More...
#include <BenzeneBitset.hpp>
Public Member Functions | |
reference (benzene_bitset &__b, size_t __pos) | |
~reference () | |
reference & | operator= (bool __x) |
reference & | operator= (const reference &__j) |
bool | operator~ () const |
operator bool () const | |
reference & | flip () |
Private Member Functions | |
reference () | |
Private Attributes | |
_WordT * | _M_wp |
size_t | _M_bpos |
Friends | |
class | benzene_bitset |
This encapsulates the concept of a single bit.
An instance of this class is a proxy for an actual bit; this way the individual bit operations are done as faster word-size bitwise instructions.
Most users will never need to use this class directly; conversions to and from bool are automatic and should be transparent. Overloaded operators help to preserve the illusion.
(On a typical system, this "bit %reference" is 64 times the size of an actual bit. Ha.)
Definition at line 667 of file BenzeneBitset.hpp.
benzene_bitset< _Nb >::reference::reference | ( | ) | [private] |
benzene_bitset< _Nb >::reference::reference | ( | benzene_bitset & | __b, | |
size_t | __pos | |||
) | [inline] |
Definition at line 678 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, _Base_bitset< _Nw >::_M_getword(), benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_whichbit().
benzene_bitset< _Nb >::reference::~reference | ( | ) | [inline] |
Definition at line 684 of file BenzeneBitset.hpp.
reference& benzene_bitset< _Nb >::reference::flip | ( | ) | [inline] |
Definition at line 720 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_maskbit().
benzene_bitset< _Nb >::reference::operator bool | ( | ) | const [inline] |
Definition at line 715 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_maskbit().
reference& benzene_bitset< _Nb >::reference::operator= | ( | const reference & | __j | ) | [inline] |
Definition at line 700 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_maskbit().
reference& benzene_bitset< _Nb >::reference::operator= | ( | bool | __x | ) | [inline] |
Definition at line 689 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_maskbit().
bool benzene_bitset< _Nb >::reference::operator~ | ( | ) | const [inline] |
Definition at line 711 of file BenzeneBitset.hpp.
References benzene_bitset< _Nb >::reference::_M_bpos, benzene_bitset< _Nb >::reference::_M_wp, and _Base_bitset< _GLIBCXX_BITSET_WORDS(_Nb)>::_S_maskbit().
friend class benzene_bitset [friend] |
Definition at line 669 of file BenzeneBitset.hpp.
size_t benzene_bitset< _Nb >::reference::_M_bpos [private] |
Definition at line 672 of file BenzeneBitset.hpp.
Referenced by benzene_bitset< _Nb >::reference::flip(), benzene_bitset< _Nb >::reference::operator bool(), benzene_bitset< _Nb >::reference::operator=(), benzene_bitset< _Nb >::reference::operator~(), and benzene_bitset< _Nb >::reference::reference().
_WordT* benzene_bitset< _Nb >::reference::_M_wp [private] |
Definition at line 671 of file BenzeneBitset.hpp.
Referenced by benzene_bitset< _Nb >::reference::flip(), benzene_bitset< _Nb >::reference::operator bool(), benzene_bitset< _Nb >::reference::operator=(), benzene_bitset< _Nb >::reference::operator~(), and benzene_bitset< _Nb >::reference::reference().