BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::Bitset< N > Class Template Reference

Compile-time fixed-size bitset. More...

#include <cl_Bitset.hpp>

Public Member Functions

 Bitset ()=default
 trivial constructor
 Bitset (const Bitset< N > &aBitset)
 copy constructor
 Bitset (Bitset< N > &&aBitset)
 move constructor
 ~Bitset ()=default
 tivial destructor
index_t size () const
 the size of the bitset
void set (const index_t aIndex)
 set a bit to true
void reset (const index_t aIndex)
 set a bit to false
void reset ()
 set all bits to false
void flip (const index_t aIndex)
 invert a bit
bool test (const index_t aIndex) const
 test if a bit is set
index_t count () const
 count the number of true bits
std::bitset< N > & data ()
 expose data container
const std::bitset< N > & data () const
 expose data container (const)
Bitset< N > & operator= (const Bitset< N > &aBitset)
 copy assignment operator
Bitset< N > & operator= (Bitset< N > &&aBitset)
 move assignment operator
bool operator== (const Bitset< N > &aBitset) const
 equality operator
bool operator!= (const Bitset< N > &aBitset) const
 inequality operator

Detailed Description

template<index_t N>
class belfem::Bitset< N >

Compile-time fixed-size bitset.

See also
BELFEM Container Classes - Usage Guide

Constructor & Destructor Documentation

◆ Bitset() [1/3]

template<index_t N>
belfem::Bitset< N >::Bitset ( )
default

trivial constructor

◆ Bitset() [2/3]

template<index_t N>
belfem::Bitset< N >::Bitset ( const Bitset< N > & aBitset)
inline

copy constructor

◆ Bitset() [3/3]

template<index_t N>
belfem::Bitset< N >::Bitset ( Bitset< N > && aBitset)
inline

move constructor

◆ ~Bitset()

template<index_t N>
belfem::Bitset< N >::~Bitset ( )
default

tivial destructor

Member Function Documentation

◆ count()

template<index_t N>
index_t belfem::Bitset< N >::count ( ) const
inline

count the number of true bits

◆ data() [1/2]

template<index_t N>
std::bitset< N > & belfem::Bitset< N >::data ( )
inline

expose data container

◆ data() [2/2]

template<index_t N>
const std::bitset< N > & belfem::Bitset< N >::data ( ) const
inline

expose data container (const)

◆ flip()

template<index_t N>
void belfem::Bitset< N >::flip ( const index_t aIndex)
inline

invert a bit

◆ operator!=()

template<index_t N>
bool belfem::Bitset< N >::operator!= ( const Bitset< N > & aBitset) const
inline

inequality operator

◆ operator=() [1/2]

template<index_t N>
Bitset< N > & belfem::Bitset< N >::operator= ( Bitset< N > && aBitset)
inline

move assignment operator

◆ operator=() [2/2]

template<index_t N>
Bitset< N > & belfem::Bitset< N >::operator= ( const Bitset< N > & aBitset)
inline

copy assignment operator

◆ operator==()

template<index_t N>
bool belfem::Bitset< N >::operator== ( const Bitset< N > & aBitset) const
inline

equality operator

◆ reset() [1/2]

template<index_t N>
void belfem::Bitset< N >::reset ( )
inline

set all bits to false

◆ reset() [2/2]

template<index_t N>
void belfem::Bitset< N >::reset ( const index_t aIndex)
inline

set a bit to false

◆ set()

template<index_t N>
void belfem::Bitset< N >::set ( const index_t aIndex)
inline

set a bit to true

◆ size()

template<index_t N>
index_t belfem::Bitset< N >::size ( ) const
inline

the size of the bitset

◆ test()

template<index_t N>
bool belfem::Bitset< N >::test ( const index_t aIndex) const
inline

test if a bit is set


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