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

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

#include <bitset.hpp>

Collaboration diagram for mtcore::Bitset::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
 
Bitsetbs
 

Detailed Description

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

Definition at line 132 of file bitset.hpp.

Member Function Documentation

◆ operator bool()

mtcore::Bitset::BitsetAccess::operator bool ( ) const
inlinenodiscard

Definition at line 136 of file bitset.hpp.

136{ return bs.at(pos); }

◆ operator&=()

BitsetAccess & mtcore::Bitset::BitsetAccess::operator&= ( const bool other)
inline

Definition at line 144 of file bitset.hpp.

144{ return set(val() & other); }
BitsetAccess & set(const bool newVal)
Definition bitset.hpp:138
Here is the call graph for this function:

◆ operator=()

BitsetAccess & mtcore::Bitset::BitsetAccess::operator= ( const bool val)
inline

Definition at line 143 of file bitset.hpp.

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

◆ operator^=()

BitsetAccess & mtcore::Bitset::BitsetAccess::operator^= ( const bool other)
inline

Definition at line 146 of file bitset.hpp.

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

◆ operator|=()

BitsetAccess & mtcore::Bitset::BitsetAccess::operator|= ( const bool other)
inline

Definition at line 145 of file bitset.hpp.

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

◆ set()

BitsetAccess & mtcore::Bitset::BitsetAccess::set ( const bool newVal)
inline

Definition at line 138 of file bitset.hpp.

138 {
139 bs.set(pos, newVal);
140 return *this;
141 }
Here is the caller graph for this function:

◆ val()

bool mtcore::Bitset::BitsetAccess::val ( ) const
inlinenodiscard

Definition at line 137 of file bitset.hpp.

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

Member Data Documentation

◆ bs

Bitset& mtcore::Bitset::BitsetAccess::bs

Definition at line 134 of file bitset.hpp.

◆ pos

size_t mtcore::Bitset::BitsetAccess::pos

Definition at line 133 of file bitset.hpp.


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