MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
mtcore::BitsetFixed< NumBits >::BitsetAccess Struct Reference

Helper for accessing a bitset position (including for setting bits) More...

#include <bitset.hpp>

Collaboration diagram for mtcore::BitsetFixed< NumBits >::BitsetAccess:

Public Member Functions

 operator bool () const
 
bool val () const
 
BitsetAccessset (const bool newVal)
 
BitsetAccessoperator= (const bool val)
 
BitsetAccessoperator&= (const bool other)
 
BitsetAccessoperator|= (const bool other)
 
BitsetAccessoperator^= (const bool other)
 

Public Attributes

size_t pos
 
BitsetFixedbs
 

Detailed Description

template<size_t NumBits = 64>
struct mtcore::BitsetFixed< NumBits >::BitsetAccess

Helper for accessing a bitset position (including for setting bits)

Definition at line 867 of file bitset.hpp.

Member Function Documentation

◆ operator bool()

template<size_t NumBits = 64>
mtcore::BitsetFixed< NumBits >::BitsetAccess::operator bool ( ) const
inlinenodiscard

Definition at line 871 of file bitset.hpp.

871{ return bs.at(pos); }

◆ operator&=()

template<size_t NumBits = 64>
BitsetAccess & mtcore::BitsetFixed< NumBits >::BitsetAccess::operator&= ( const bool other)
inline

Definition at line 879 of file bitset.hpp.

879{ return set(val() & other); }
BitsetAccess & set(const bool newVal)
Definition bitset.hpp:873
Represents a bitset with dynamically allocated memory (using an mtcore allocator) Allows operating on...
Definition bitset.hpp:826
Here is the call graph for this function:

◆ operator=()

template<size_t NumBits = 64>
BitsetAccess & mtcore::BitsetFixed< NumBits >::BitsetAccess::operator= ( const bool val)
inline

Definition at line 878 of file bitset.hpp.

878{ return set(val); }
Here is the call graph for this function:

◆ operator^=()

template<size_t NumBits = 64>
BitsetAccess & mtcore::BitsetFixed< NumBits >::BitsetAccess::operator^= ( const bool other)
inline

Definition at line 881 of file bitset.hpp.

881{ return set(val() ^ other); }
Here is the call graph for this function:

◆ operator|=()

template<size_t NumBits = 64>
BitsetAccess & mtcore::BitsetFixed< NumBits >::BitsetAccess::operator|= ( const bool other)
inline

Definition at line 880 of file bitset.hpp.

880{ return set(val() | other); }
Here is the call graph for this function:

◆ set()

template<size_t NumBits = 64>
BitsetAccess & mtcore::BitsetFixed< NumBits >::BitsetAccess::set ( const bool newVal)
inline

Definition at line 873 of file bitset.hpp.

873 {
874 bs.set(pos, newVal);
875 return *this;
876 }
Here is the caller graph for this function:

◆ val()

template<size_t NumBits = 64>
bool mtcore::BitsetFixed< NumBits >::BitsetAccess::val ( ) const
inlinenodiscard

Definition at line 872 of file bitset.hpp.

872{ return bs.at(pos); }
Here is the caller graph for this function:

Member Data Documentation

◆ bs

template<size_t NumBits = 64>
BitsetFixed& mtcore::BitsetFixed< NumBits >::BitsetAccess::bs

Definition at line 869 of file bitset.hpp.

◆ pos

template<size_t NumBits = 64>
size_t mtcore::BitsetFixed< NumBits >::BitsetAccess::pos

Definition at line 868 of file bitset.hpp.


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