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

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

#include <bitset.hpp>

Collaboration diagram for mtcore::Bitset2D::BitsetAccess:

Public Member Functions

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

Public Attributes

std::tuple< size_t, size_t > pos
 
Bitset2Dbs
 

Detailed Description

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

Definition at line 598 of file bitset.hpp.

Member Function Documentation

◆ operator bool()

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

Definition at line 603 of file bitset.hpp.

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

◆ operator&=()

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

Definition at line 610 of file bitset.hpp.

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

◆ operator=()

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

Definition at line 609 of file bitset.hpp.

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

◆ operator^=()

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

Definition at line 612 of file bitset.hpp.

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

◆ operator|=()

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

Definition at line 611 of file bitset.hpp.

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

◆ set()

BitsetAccess & mtcore::Bitset2D::BitsetAccess::set ( const bool val)
inline

Definition at line 604 of file bitset.hpp.

604 {
605 bs.set(std::get<0>(pos), std::get<1>(pos), val);
606 return *this;
607 }
std::tuple< size_t, size_t > pos
Definition bitset.hpp:599
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val()

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

Definition at line 602 of file bitset.hpp.

602{ return bs.at(std::get<0>(pos), std::get<1>(pos)); }
Here is the caller graph for this function:

Member Data Documentation

◆ bs

Bitset2D& mtcore::Bitset2D::BitsetAccess::bs

Definition at line 600 of file bitset.hpp.

◆ pos

std::tuple<size_t, size_t> mtcore::Bitset2D::BitsetAccess::pos

Definition at line 599 of file bitset.hpp.


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