atlas  0.6
Classes | Public Types | Public Member Functions | Private Types | List of all members
atlas::bitset::BitSet< n > Class Template Reference

Set of n bits. More...

#include <Atlas.h>

Inheritance diagram for atlas::bitset::BitSet< n >:
Inheritance graph
[legend]
Collaboration diagram for atlas::bitset::BitSet< n >:
Collaboration graph
[legend]

Classes

struct  iterator
 

Public Types

typedef iterator const_iterator
 

Public Member Functions

 BitSet ()
 
 BitSet (unsigned long b)
 
template<typename I >
 BitSet (const std::vector< I > &v)
 
template<size_t m>
 BitSet (const BitSet< m > &b)
 Copy from other size BitSets, only to be used with |m<n|. More...
 
iterator begin () const
 
iterator end () const
 
BitSetoperator^= (const BitSet &b)
 
BitSetoperator|= (const BitSet &b)
 
BitSetoperator&= (const BitSet &b)
 
BitSetoperator<<= (unsigned int c)
 
BitSetoperator>>= (unsigned int c)
 
BitSetandnot (const BitSet &b)
 
BitSetflip (unsigned int j)
 
BitSetreset ()
 
BitSetreset (unsigned int j)
 
BitSetset (unsigned int j)
 
BitSetset (unsigned int j, bool b)
 
BitSetfill (unsigned int limit)
 
BitSetcomplement (unsigned int limit)
 
BitSettruncate (unsigned int m)
 
BitSetslice (const BitSet &c)
 
BitSetunslice (const BitSet &c)
 
void swap (BitSet &source)
 
bool operator[] (unsigned int j) const
 
BitSet operator& (const BitSet &b) const
 
BitSet operator| (const BitSet &b) const
 
BitSet operator^ (const BitSet &b) const
 
BitSet operator- (const BitSet &b) const
 
bool dot (BitSet b) const
 

Private Types

typedef BitSetBase< BaseSize< n >::value > Base
 

Detailed Description

template<size_t n>
class atlas::bitset::BitSet< n >

Set of n bits.

The first typedef defines Base to be BitSetBase<m>. Consequently function references of the form Base::contains refer to BitSetBase<m>::contains. [DV doesn't know whether this could have been avoided by replacing ":private BitSetBase" by ":public BitSetBase" in the template for BitSet, and just invoking the (public) member functions of the base class directly. MvL thinks that that would be possible; this depends on the fact (also used in the actual implementation below) that the argument of 'contains' is implicitly converted to its base class BitSetBase<m> because the method of the base class requires this. However, this would expose all public methods of BitSetBase to users of BitSet, which is not desired. This could however be remedied by making protected rather than public the methods of BitSetBase that are only for internal use by BitSet implementations.]

Member Typedef Documentation

template<size_t n>
typedef BitSetBase<BaseSize<n>::value> atlas::bitset::BitSet< n >::Base
private
template<size_t n>
typedef iterator atlas::bitset::BitSet< n >::const_iterator

Constructor & Destructor Documentation

template<size_t n>
atlas::bitset::BitSet< n >::BitSet ( )
inline
template<size_t n>
atlas::bitset::BitSet< n >::BitSet ( unsigned long  b)
inlineexplicit
template<size_t n>
template<typename I >
atlas::bitset::BitSet< n >::BitSet ( const std::vector< I > &  v)
explicit
template<size_t n>
template<size_t m>
atlas::bitset::BitSet< n >::BitSet ( const BitSet< m > &  b)
inline

Copy from other size BitSets, only to be used with |m<n|.

Member Function Documentation

template<size_t n>
BitSet& atlas::bitset::BitSet< n >::andnot ( const BitSet< n > &  b)
inline
template<size_t n>
iterator atlas::bitset::BitSet< n >::begin ( ) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::complement ( unsigned int  limit)
inline
template<size_t n>
bool atlas::bitset::BitSet< n >::dot ( BitSet< n b) const
inline
template<size_t n>
iterator atlas::bitset::BitSet< n >::end ( ) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::fill ( unsigned int  limit)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::flip ( unsigned int  j)
inline
template<size_t n>
BitSet atlas::bitset::BitSet< n >::operator& ( const BitSet< n > &  b) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::operator&= ( const BitSet< n > &  b)
inline
template<size_t n>
BitSet atlas::bitset::BitSet< n >::operator- ( const BitSet< n > &  b) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::operator<<= ( unsigned int  c)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::operator>>= ( unsigned int  c)
inline
template<size_t n>
bool atlas::bitset::BitSet< n >::operator[] ( unsigned int  j) const
inline
template<size_t n>
BitSet atlas::bitset::BitSet< n >::operator^ ( const BitSet< n > &  b) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::operator^= ( const BitSet< n > &  b)
inline
template<size_t n>
BitSet atlas::bitset::BitSet< n >::operator| ( const BitSet< n > &  b) const
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::operator|= ( const BitSet< n > &  b)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::reset ( )
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::reset ( unsigned int  j)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::set ( unsigned int  j)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::set ( unsigned int  j,
bool  b 
)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::slice ( const BitSet< n > &  c)
inline
template<size_t n>
void atlas::bitset::BitSet< n >::swap ( BitSet< n > &  source)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::truncate ( unsigned int  m)
inline
template<size_t n>
BitSet& atlas::bitset::BitSet< n >::unslice ( const BitSet< n > &  c)
inline

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