CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

BitArray< N >::refToBit Class Reference

#include <BitArray.h>

List of all members.

Public Member Functions

refToBitflip ()
 operator int () const
refToBitoperator= (const refToBit &rtb)
refToBitoperator= (const int val)
int operator~ () const
 refToBit (BitArray &b, int pos)
 refToBit ()
 ~refToBit ()

Private Attributes

int _pos
unsigned * _word

Friends

class BitArray

Detailed Description

template<int N>
class BitArray< N >::refToBit

Definition at line 37 of file BitArray.h.


Constructor & Destructor Documentation

template<int N>
BitArray< N >::refToBit::refToBit ( ) [inline]

Definition at line 43 of file BitArray.h.

{}
template<int N>
BitArray< N >::refToBit::refToBit ( BitArray b,
int  pos 
) [inline]
template<int N>
BitArray< N >::refToBit::~refToBit ( ) [inline]

Definition at line 48 of file BitArray.h.

{}

Member Function Documentation

template<int N>
refToBit& BitArray< N >::refToBit::flip ( ) [inline]
template<int N>
BitArray< N >::refToBit::operator int ( ) const [inline]
template<int N>
refToBit& BitArray< N >::refToBit::operator= ( const refToBit rtb) [inline]

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;
    }
template<int N>
refToBit& BitArray< N >::refToBit::operator= ( const int  val) [inline]

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;
    }
template<int N>
int BitArray< N >::refToBit::operator~ ( ) const [inline]

Friends And Related Function Documentation

template<int N>
friend class BitArray [friend]

Definition at line 38 of file BitArray.h.


Member Data Documentation

template<int N>
int BitArray< N >::refToBit::_pos [private]
template<int N>
unsigned* BitArray< N >::refToBit::_word [private]