BitSet< TMaxBits > Class Template Reference

#include <BitSet.hpp>

Public Member Functions

 BitSet ()
 
BitSetset ()
 
BitSetset (size_t pos, bool val=true)
 
BitSetreset ()
 
BitSetreset (size_t pos)
 
BitSetflip ()
 
BitSetflip (size_t pos)
 
bool test (size_t pos) const
 
bool any () const
 
bool none () const
 
bool all () const
 

Private Member Functions

size_t count () const
 

Private Attributes

uint32_t bits
 

Detailed Description

template<size_t TMaxBits>
class BitSet< TMaxBits >

This is a replacement for the std::bitset class that is more portable. For classes that are saved via rexxc compilation that use FlagSets, the different compiler implementations of the bitset class so not interoperate well. This ensures we have a single data format for saved bitsets across all of the interpreters.

This is also simpler than the std bitset, limited to just 32 bits in the set and only implementing the operations required by the interpreter.

Definition at line 59 of file BitSet.hpp.

Constructor & Destructor Documentation

◆ BitSet()

template<size_t TMaxBits>
BitSet< TMaxBits >::BitSet ( )
inline

Definition at line 64 of file BitSet.hpp.

Member Function Documentation

◆ all()

template<size_t TMaxBits>
bool BitSet< TMaxBits >::all ( ) const
inline

Definition at line 144 of file BitSet.hpp.

References BitSet< TMaxBits >::count().

◆ any()

template<size_t TMaxBits>
bool BitSet< TMaxBits >::any ( ) const
inline

Definition at line 134 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

◆ count()

template<size_t TMaxBits>
size_t BitSet< TMaxBits >::count ( ) const
inlineprivate

Definition at line 151 of file BitSet.hpp.

References BitSet< TMaxBits >::test().

Referenced by BitSet< TMaxBits >::all().

◆ flip() [1/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::flip ( )
inline

Definition at line 101 of file BitSet.hpp.

◆ flip() [2/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::flip ( size_t  pos)
inline

Definition at line 111 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

◆ none()

template<size_t TMaxBits>
bool BitSet< TMaxBits >::none ( ) const
inline

Definition at line 139 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

◆ reset() [1/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::reset ( void  )
inline

Definition at line 90 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

◆ reset() [2/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::reset ( size_t  pos)
inline

Definition at line 96 of file BitSet.hpp.

References BitSet< TMaxBits >::set().

◆ set() [1/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::set ( )
inline

Definition at line 66 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

Referenced by BitSet< TMaxBits >::reset().

◆ set() [2/2]

template<size_t TMaxBits>
BitSet& BitSet< TMaxBits >::set ( size_t  pos,
bool  val = true 
)
inline

Definition at line 72 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

◆ test()

template<size_t TMaxBits>
bool BitSet< TMaxBits >::test ( size_t  pos) const
inline

Definition at line 121 of file BitSet.hpp.

References BitSet< TMaxBits >::bits.

Referenced by BitSet< TMaxBits >::count().

Member Data Documentation

◆ bits


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