A proxy class that acts as a const reference to a single bitset in a BitSetVector. More...
#include <dune/common/bitsetvector.hh>
Public Types | |
typedef std::bitset< block_size > | bitset |
typedef std::vector< bool, Alloc >::const_reference | reference |
typedef std::vector< bool, Alloc >::const_reference | const_reference |
typedef size_t | size_type |
Public Member Functions | |
bitset | operator<< (size_type n) const |
Returns a copy of *this shifted left by n bits. | |
bitset | operator>> (size_type n) const |
Returns a copy of *this shifted right by n bits. | |
bitset | operator~ () const |
Returns a copy of *this with all of its bits flipped. | |
size_type | size () const |
Returns block_size. | |
size_type | count () const |
Returns the number of bits that are set. | |
bool | any () const |
Returns true if any bits are set. | |
bool | none () const |
Returns true if no bits are set. | |
bool | test (size_type n) const |
Returns true if bit n is set. | |
const_reference | operator[] (size_type i) const |
operator bitset () const | |
cast to bitset | |
bool | operator== (const bitset &bs) const |
Equality of reference and std::bitset. | |
bool | operator== (const BitSetVectorConstReference &bs) const |
Equality of reference and other reference. | |
bool | operator!= (const bitset &bs) const |
Inequality of reference and std::bitset. | |
bool | operator!= (const BitSetVectorConstReference &bs) const |
Inequality of reference and other reference. | |
Protected Types | |
typedef Dune::BitSetVector < block_size, Alloc > | BitSetVector |
Protected Member Functions | |
BitSetVectorConstReference (const BitSetVector &blockBitField, int block_number) | |
BitSetVectorConstReference & | operator= (const BitSetVectorConstReference &b) |
hide assignment operator | |
const_reference | getBit (size_type i) const |
template<class BS > | |
bool | equals (const BS &bs) const |
Protected Attributes | |
const BitSetVector & | blockBitField |
int | block_number |
Friends | |
class | Dune::BitSetVector< block_size, Alloc > |
class | BitSetVectorReference< block_size, Alloc > |
std::ostream & | operator<< (std::ostream &s, const BitSetVectorConstReference &v) |
A proxy class that acts as a const reference to a single bitset in a BitSetVector.
It contains a conversion to std::bitset and most of the interface of const std::bitset.
typedef std::bitset<block_size> Dune::BitSetVectorConstReference< block_size, Alloc >::bitset |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
typedef Dune::BitSetVector<block_size, Alloc> Dune::BitSetVectorConstReference< block_size, Alloc >::BitSetVector [protected] |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
typedef std::vector<bool, Alloc>::const_reference Dune::BitSetVectorConstReference< block_size, Alloc >::const_reference |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
typedef std::vector<bool, Alloc>::const_reference Dune::BitSetVectorConstReference< block_size, Alloc >::reference |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
typedef size_t Dune::BitSetVectorConstReference< block_size, Alloc >::size_type |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
Dune::BitSetVectorConstReference< block_size, Alloc >::BitSetVectorConstReference | ( | const BitSetVector & | blockBitField, | |
int | block_number | |||
) | [inline, protected] |
bool Dune::BitSetVectorConstReference< block_size, Alloc >::any | ( | ) | const [inline] |
Returns true if any bits are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::count().
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::none().
size_type Dune::BitSetVectorConstReference< block_size, Alloc >::count | ( | ) | const [inline] |
Returns the number of bits that are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::any().
bool Dune::BitSetVectorConstReference< block_size, Alloc >::equals | ( | const BS & | bs | ) | const [inline, protected] |
const_reference Dune::BitSetVectorConstReference< block_size, Alloc >::getBit | ( | size_type | i | ) | const [inline, protected] |
References Dune::BitSetVectorConstReference< block_size, Alloc >::block_number, and Dune::BitSetVectorConstReference< block_size, Alloc >::blockBitField.
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::count(), Dune::BitSetVectorConstReference< block_size, Alloc >::equals(), Dune::BitSetVectorConstReference< block_size, Alloc >::operator[](), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
bool Dune::BitSetVectorConstReference< block_size, Alloc >::none | ( | ) | const [inline] |
Returns true if no bits are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::any().
Dune::BitSetVectorConstReference< block_size, Alloc >::operator bitset | ( | ) | const [inline] |
bool Dune::BitSetVectorConstReference< block_size, Alloc >::operator!= | ( | const BitSetVectorConstReference< block_size, Alloc > & | bs | ) | const [inline] |
Inequality of reference and other reference.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
bool Dune::BitSetVectorConstReference< block_size, Alloc >::operator!= | ( | const bitset & | bs | ) | const [inline] |
Inequality of reference and std::bitset.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
bitset Dune::BitSetVectorConstReference< block_size, Alloc >::operator<< | ( | size_type | n | ) | const [inline] |
Returns a copy of *this shifted left by n bits.
BitSetVectorConstReference& Dune::BitSetVectorConstReference< block_size, Alloc >::operator= | ( | const BitSetVectorConstReference< block_size, Alloc > & | b | ) | [protected] |
hide assignment operator
bool Dune::BitSetVectorConstReference< block_size, Alloc >::operator== | ( | const BitSetVectorConstReference< block_size, Alloc > & | bs | ) | const [inline] |
Equality of reference and other reference.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
bool Dune::BitSetVectorConstReference< block_size, Alloc >::operator== | ( | const bitset & | bs | ) | const [inline] |
Equality of reference and std::bitset.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
bitset Dune::BitSetVectorConstReference< block_size, Alloc >::operator>> | ( | size_type | n | ) | const [inline] |
Returns a copy of *this shifted right by n bits.
const_reference Dune::BitSetVectorConstReference< block_size, Alloc >::operator[] | ( | size_type | i | ) | const [inline] |
bitset Dune::BitSetVectorConstReference< block_size, Alloc >::operator~ | ( | ) | const [inline] |
Returns a copy of *this with all of its bits flipped.
size_type Dune::BitSetVectorConstReference< block_size, Alloc >::size | ( | ) | const [inline] |
Returns block_size.
bool Dune::BitSetVectorConstReference< block_size, Alloc >::test | ( | size_type | n | ) | const [inline] |
Returns true if bit n is set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
Referenced by Dune::BitSetVectorReference< block_size, Alloc >::operator&=(), Dune::BitSetVectorReference< block_size, Alloc >::operator<<=(), Dune::BitSetVectorReference< block_size, Alloc >::operator=(), Dune::BitSetVectorReference< block_size, Alloc >::operator>>=(), Dune::BitSetVectorReference< block_size, Alloc >::operator^=(), and Dune::BitSetVectorReference< block_size, Alloc >::operator|=().
friend class BitSetVectorReference< block_size, Alloc > [friend] |
friend class Dune::BitSetVector< block_size, Alloc > [friend] |
Reimplemented in Dune::BitSetVectorReference< block_size, Alloc >.
std::ostream& operator<< | ( | std::ostream & | s, | |
const BitSetVectorConstReference< block_size, Alloc > & | v | |||
) | [friend] |
missing operators:
int Dune::BitSetVectorConstReference< block_size, Alloc >::block_number [protected] |
const BitSetVector& Dune::BitSetVectorConstReference< block_size, Alloc >::blockBitField [protected] |