atlas  0.6
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
atlas::bitset::BitSetBase< 2 > Class Template Reference

Base for a non-empty BitSet that fits in two words but not one. More...

#include <bitset.h>

Classes

class  iterator
 

Public Member Functions

bool operator== (const BitSetBase< 2 > &b) const
 
bool operator!= (const BitSetBase< 2 > &b) const
 
bool operator< (const BitSetBase< 2 > &b) const
 
bool any () const
 
bool none () const
 
bool any (const BitSetBase< 2 > &b) const
 
bool contains (const BitSetBase< 2 > &b) const
 
unsigned int count () const
 
unsigned int firstBit () const
 
unsigned int lastBit () const
 
bool test (unsigned int j) const
 
unsigned int position (unsigned int j) const
 
bool scalarProduct (const BitSetBase< 2 > &b) const
 
unsigned long to_ulong () const
 
unsigned long to_ulong (unsigned int n) const
 
iterator begin () const
 
void operator^= (const BitSetBase< 2 > &b)
 
void operator|= (const BitSetBase< 2 > &b)
 
void operator&= (const BitSetBase< 2 > &b)
 
void operator<<= (unsigned int c)
 
void operator>>= (unsigned int c)
 
void andnot (const BitSetBase< 2 > &b)
 
void flip (unsigned int j)
 
void reset ()
 
void reset (unsigned int j)
 
void set (unsigned int j)
 
void fill (unsigned int limit)
 
void complement (unsigned int limit)
 
void truncate (unsigned int limit)
 
void slice (const BitSetBase< 2 > &c)
 
void unslice (const BitSetBase< 2 > &c)
 
void swap (BitSetBase< 2 > &source)
 

Protected Member Functions

 BitSetBase ()
 
 BitSetBase (unsigned long b)
 Constructor initializing first word to b and second word to 0. More...
 
template<size_t m>
 BitSetBase (const BitSet< m > &b)
 

Private Attributes

unsigned long d_bits0
 
unsigned long d_bits1
 

Detailed Description

template<>
class atlas::bitset::BitSetBase< 2 >

Base for a non-empty BitSet that fits in two words but not one.

The BitSet class BitSet<n>, for n between machine word length + 1 and twice machine word length, is a derived class of BitSetBase<2>. Should not be instantiated on a 32 bit machine with RANK_MAX=16.

Constructor & Destructor Documentation

atlas::bitset::BitSetBase< 2 >::BitSetBase ( )
inlineprotected
atlas::bitset::BitSetBase< 2 >::BitSetBase ( unsigned long  b)
inlineexplicitprotected

Constructor initializing first word to b and second word to 0.

[added by DV to let the software compile with RANK_MAX equal to the machine word size.]

The class BitSet assumes that BitSetBase has a constructor with argument an unsigned long. This is slightly sloppy coding, since BitSetBase<2> is most naturally constructed using two unsigned longs. However such a constructor will never be called from |BitSet|, so it would be useless. In fact it seems that the current software never needs to construct from an explicit value a |BitSet| that needs more than a single |unsigned long|, even if one should set |constants::RankMax == constants::longBits|; while for instance |gradings::Status::set(size_t,Value)| constructs a |bitsetTwoRankFlags| from an |unsigned long|, the latter is in fact only 2 bits wide, which value is shifted in place after construction by |bitset::TwoRankFlags::operator<<=|.

template<size_t m>
atlas::bitset::BitSetBase< 2 >::BitSetBase ( const BitSet< m > &  b)
inlineexplicitprotected

Member Function Documentation

void atlas::bitset::BitSetBase< 2 >::andnot ( const BitSetBase< 2 > &  b)
bool atlas::bitset::BitSetBase< 2 >::any ( ) const
inline
bool atlas::bitset::BitSetBase< 2 >::any ( const BitSetBase< 2 > &  b) const
inline
BitSetBase< 2 >::iterator atlas::bitset::BitSetBase< 2 >::begin ( ) const
void atlas::bitset::BitSetBase< 2 >::complement ( unsigned int  limit)
bool atlas::bitset::BitSetBase< 2 >::contains ( const BitSetBase< 2 > &  b) const
inline
unsigned int atlas::bitset::BitSetBase< 2 >::count ( ) const
inline
void atlas::bitset::BitSetBase< 2 >::fill ( unsigned int  limit)
unsigned int atlas::bitset::BitSetBase< 2 >::firstBit ( ) const
void atlas::bitset::BitSetBase< 2 >::flip ( unsigned int  j)
unsigned int atlas::bitset::BitSetBase< 2 >::lastBit ( ) const
bool atlas::bitset::BitSetBase< 2 >::none ( ) const
inline
bool atlas::bitset::BitSetBase< 2 >::operator!= ( const BitSetBase< 2 > &  b) const
inline
void atlas::bitset::BitSetBase< 2 >::operator&= ( const BitSetBase< 2 > &  b)
bool atlas::bitset::BitSetBase< 2 >::operator< ( const BitSetBase< 2 > &  b) const
inline
void atlas::bitset::BitSetBase< 2 >::operator<<= ( unsigned int  c)
bool atlas::bitset::BitSetBase< 2 >::operator== ( const BitSetBase< 2 > &  b) const
inline
void atlas::bitset::BitSetBase< 2 >::operator>>= ( unsigned int  c)
void atlas::bitset::BitSetBase< 2 >::operator^= ( const BitSetBase< 2 > &  b)
void atlas::bitset::BitSetBase< 2 >::operator|= ( const BitSetBase< 2 > &  b)
unsigned int atlas::bitset::BitSetBase< 2 >::position ( unsigned int  j) const
void atlas::bitset::BitSetBase< 2 >::reset ( )
inline
void atlas::bitset::BitSetBase< 2 >::reset ( unsigned int  j)
bool atlas::bitset::BitSetBase< 2 >::scalarProduct ( const BitSetBase< 2 > &  b) const
void atlas::bitset::BitSetBase< 2 >::set ( unsigned int  j)
void atlas::bitset::BitSetBase< 2 >::slice ( const BitSetBase< 2 > &  c)
void atlas::bitset::BitSetBase< 2 >::swap ( BitSetBase< 2 > &  source)
bool atlas::bitset::BitSetBase< 2 >::test ( unsigned int  j) const
unsigned long atlas::bitset::BitSetBase< 2 >::to_ulong ( ) const
inline
unsigned long atlas::bitset::BitSetBase< 2 >::to_ulong ( unsigned int  n) const
inline
void atlas::bitset::BitSetBase< 2 >::truncate ( unsigned int  limit)
void atlas::bitset::BitSetBase< 2 >::unslice ( const BitSetBase< 2 > &  c)

Member Data Documentation

unsigned long atlas::bitset::BitSetBase< 2 >::d_bits0
private
unsigned long atlas::bitset::BitSetBase< 2 >::d_bits1
private

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