OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
IndexedBitset< FirstIndex, LastIndex > Class Template Reference

#include <IndexedBitset.h>

Public Types

using key_type = decltype(FirstIndex)
 

Public Member Functions

constexpr Segment< key_typeindices () const
 
size_t size () const
 
void fill (bool value)
 
void set ()
 
void reset ()
 
void reset (key_type index)
 
void set (key_type index, bool value=true)
 
bool test (key_type index)
 
auto operator[] (key_type index)
 
auto operator[] (key_type index) const
 

Static Public Attributes

static constexpr size_t SIZE = static_cast<ptrdiff_t>(LastIndex) - static_cast<ptrdiff_t>(FirstIndex) + 1
 

Private Member Functions

void checkIndex (key_type index) const
 

Private Attributes

std::bitset< SIZE_bitset
 

Friends

bool operator== (const IndexedBitset &l, const IndexedBitset &r)
 

Member Typedef Documentation

◆ key_type

template<auto FirstIndex, auto LastIndex>
using IndexedBitset< FirstIndex, LastIndex >::key_type = decltype(FirstIndex)

Member Function Documentation

◆ checkIndex()

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::checkIndex ( key_type  index) const
inlineprivate

◆ fill()

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::fill ( bool  value)
inline

◆ indices()

template<auto FirstIndex, auto LastIndex>
constexpr Segment< key_type > IndexedBitset< FirstIndex, LastIndex >::indices ( ) const
inlineconstexpr

◆ operator[]() [1/2]

template<auto FirstIndex, auto LastIndex>
auto IndexedBitset< FirstIndex, LastIndex >::operator[] ( key_type  index)
inline

◆ operator[]() [2/2]

template<auto FirstIndex, auto LastIndex>
auto IndexedBitset< FirstIndex, LastIndex >::operator[] ( key_type  index) const
inline

◆ reset() [1/2]

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::reset ( )
inline

◆ reset() [2/2]

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::reset ( key_type  index)
inline

◆ set() [1/2]

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::set ( )
inline

◆ set() [2/2]

template<auto FirstIndex, auto LastIndex>
void IndexedBitset< FirstIndex, LastIndex >::set ( key_type  index,
bool  value = true 
)
inline

◆ size()

template<auto FirstIndex, auto LastIndex>
size_t IndexedBitset< FirstIndex, LastIndex >::size ( ) const
inline

◆ test()

template<auto FirstIndex, auto LastIndex>
bool IndexedBitset< FirstIndex, LastIndex >::test ( key_type  index)
inline

Friends And Related Function Documentation

◆ operator==

template<auto FirstIndex, auto LastIndex>
bool operator== ( const IndexedBitset< FirstIndex, LastIndex > &  l,
const IndexedBitset< FirstIndex, LastIndex > &  r 
)
friend

Member Data Documentation

◆ _bitset

template<auto FirstIndex, auto LastIndex>
std::bitset<SIZE> IndexedBitset< FirstIndex, LastIndex >::_bitset
private

◆ SIZE

template<auto FirstIndex, auto LastIndex>
constexpr size_t IndexedBitset< FirstIndex, LastIndex >::SIZE = static_cast<ptrdiff_t>(LastIndex) - static_cast<ptrdiff_t>(FirstIndex) + 1
staticconstexpr

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