#include <BitArray.h>
Public Member Functions | |
refToBit & | flip () |
operator int () const | |
refToBit & | operator= (const refToBit &rtb) |
refToBit & | operator= (const int val) |
int | operator~ () const |
refToBit (BitArray &b, int pos) | |
refToBit () | |
~refToBit () | |
Private Attributes | |
int | _pos |
unsigned * | _word |
Friends | |
class | BitArray |
Definition at line 37 of file BitArray.h.
BitArray< N >::refToBit::refToBit | ( | ) | [inline] |
Definition at line 43 of file BitArray.h.
{}
Definition at line 44 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, BitArray< N >::getPosInWord(), and BitArray< N >::getWord().
BitArray< N >::refToBit::~refToBit | ( | ) | [inline] |
Definition at line 48 of file BitArray.h.
{}
Definition at line 72 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, and BitArray< N >::getPosMask().
{ *_word^=getPosMask(_pos); return *this; }
BitArray< N >::refToBit::operator int | ( | ) | const [inline] |
Definition at line 70 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, and BitArray< N >::getPosMask().
{ return ((*_word)&getPosMask(_pos))!=0; }
Definition at line 59 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, and BitArray< N >::getPosMask().
{ if( (*(rtb._word) & getPosMask(rtb._pos)) ) { *_word |= getPosMask(_pos); } else { *_word &= ~getPosMask(_pos); } return *this; }
Definition at line 50 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, and BitArray< N >::getPosMask().
{ if(val) { *_word |= getPosMask(_pos); } else { *_word &= ~(getPosMask(_pos)); } return *this; }
int BitArray< N >::refToBit::operator~ | ( | ) | const [inline] |
Definition at line 68 of file BitArray.h.
References BitArray< N >::refToBit::_pos, BitArray< N >::refToBit::_word, and BitArray< N >::getPosMask().
{ return ((*_word)&getPosMask(_pos))==0; }
friend class BitArray [friend] |
Definition at line 38 of file BitArray.h.
int BitArray< N >::refToBit::_pos [private] |
Definition at line 79 of file BitArray.h.
Referenced by BitArray< N >::refToBit::flip(), BitArray< N >::refToBit::operator int(), BitArray< N >::refToBit::operator=(), BitArray< N >::refToBit::operator~(), and BitArray< N >::refToBit::refToBit().
unsigned* BitArray< N >::refToBit::_word [private] |
Definition at line 78 of file BitArray.h.
Referenced by BitArray< N >::refToBit::flip(), BitArray< N >::refToBit::operator int(), BitArray< N >::refToBit::operator=(), BitArray< N >::refToBit::operator~(), and BitArray< N >::refToBit::refToBit().