OpenEnroth 80998af
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
 
constexpr size_t size () const
 
constexpr void fill (bool value)
 
constexpr void set ()
 
constexpr void reset ()
 
constexpr void reset (key_type index)
 
constexpr void set (key_type index, bool value=true)
 
constexpr bool test (key_type index) const
 
constexpr auto operator[] (key_type index)
 
constexpr 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

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

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>
constexpr void IndexedBitset< FirstIndex, LastIndex >::fill ( bool  value)
inlineconstexpr

◆ indices()

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ reset() [1/2]

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

◆ reset() [2/2]

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

◆ set() [1/2]

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

◆ set() [2/2]

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

◆ size()

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

◆ test()

template<auto FirstIndex, auto LastIndex>
constexpr bool IndexedBitset< FirstIndex, LastIndex >::test ( key_type  index) const
inlineconstexpr

Friends And Related Function Documentation

◆ operator==

template<auto FirstIndex, auto LastIndex>
constexpr 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: