Main Page   Reference Manual   Compound List   File List  

libecc::bitset_base< n > Struct Template Reference

Base class of libecc::bitset. More...

#include <libecc/bitset.h>

Inheritance diagram for libecc::bitset_base< n >:

Inheritance graph
[legend]
List of all members.

Static Public Attributes

unsigned int const  number_of_bits
 The number of bits in the bitset.

unsigned int const  digits
 The minimum number of digits needed to store n bits.

bitset_digit_t const  valid_bits
 A mask marking the valid bits in the most significant digit.

bool const  has_excess_bits
 True when not all bits in the most significant digit are valid.


Protected Attributes

bitset_digit_t vector [digits]
 The actual bits, stored as an array of digits number of "digits" of type libecc::bitset_digit_t.


Detailed Description

template<unsigned int n>
struct libecc::bitset_base< n >

Base class of libecc::bitset.

This class is for internal use only. It contains the actual data, an array of bitset_digit_t , the meaning of which is determined by the derived classes; direct access of the data is therefore useless and prohibited (vector is protected).


Member Data Documentation

template<unsigned int n>
unsigned int const libecc::bitset_base< n >::digits [static]
 

The minimum number of digits needed to store n bits.

template<unsigned int n>
bool const libecc::bitset_base< n >::has_excess_bits [static]
 

True when not all bits in the most significant digit are valid.

template<unsigned int n>
unsigned int const libecc::bitset_base< n >::number_of_bits [static]
 

The number of bits in the bitset.

This constant is simply equal to n.

template<unsigned int n>
bitset_digit_t const libecc::bitset_base< n >::valid_bits [static]
 

A mask marking the valid bits in the most significant digit.

template<unsigned int n>
bitset_digit_t libecc::bitset_base< n >::vector[digits] [protected]
 

The actual bits, stored as an array of digits number of "digits" of type libecc::bitset_digit_t.

The first digit is the least significant digit: printing is done from high index to low index. The bits in the array can represent the actual bits or the inverted bits of the bitset, depending on the type of the derived class.

Copyright © 2002-2004 Carlo Wood.  All rights reserved.