OverSim
OverlayKeyBit Class Reference

An auxiliary class for single bits in OverlayKey. More...

#include <OverlayKey.h>

Public Member Functions

 OverlayKeyBit (bool value, uint32_t pos, OverlayKey *key)
 operator bool ()
 Converts to a boolean value.
OverlayKeyBitoperator= (const OverlayKeyBit &value)
OverlayKeyBitoperator= (bool value)
 Sets the corresponding bit to a boolean value.
OverlayKeyBitoperator^= (bool value)

Private Attributes

bool bit
uint32_t pos
OverlayKeykey

Detailed Description

An auxiliary class for single bits in OverlayKey.

Allows statements like "key[n] = true"

Definition at line 527 of file OverlayKey.h.

Constructor & Destructor Documentation

OverlayKeyBit::OverlayKeyBit ( bool  value,
uint32_t  pos,
OverlayKey key 
)
inline

Definition at line 531 of file OverlayKey.h.

: bit(value), pos(pos), key(key)
{};

Member Function Documentation

OverlayKeyBit::operator bool ( )
inline

Converts to a boolean value.

Definition at line 536 of file OverlayKey.h.

{
return bit;
};
OverlayKeyBit& OverlayKeyBit::operator= ( const OverlayKeyBit value)
inline

Definition at line 541 of file OverlayKey.h.

{
key->setBit(pos, value.bit);
return *this;
};
OverlayKeyBit& OverlayKeyBit::operator= ( bool  value)
inline

Sets the corresponding bit to a boolean value.

Parameters
valuevalue to set to

Definition at line 550 of file OverlayKey.h.

{
key->setBit(pos, value);
return *this;
};
OverlayKeyBit& OverlayKeyBit::operator^= ( bool  value)
inline

Definition at line 556 of file OverlayKey.h.

{
key->setBit(pos, (*key)[pos] ^ value);
return *this;
};

Member Data Documentation

bool OverlayKeyBit::bit
private

Definition at line 560 of file OverlayKey.h.

Referenced by operator bool(), and operator=().

OverlayKey* OverlayKeyBit::key
private

Definition at line 566 of file OverlayKey.h.

Referenced by operator=(), and operator^=().

uint32_t OverlayKeyBit::pos
private

Definition at line 565 of file OverlayKey.h.

Referenced by operator=(), and operator^=().


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