OverlayKeyBit Class Reference

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

#include <OverlayKey.h>

List of all members.

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.

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


Member Function Documentation

OverlayKeyBit::operator bool (  )  [inline]

Converts to a boolean value.

Definition at line 536 of file OverlayKey.h.

00537     {
00538         return bit;
00539     };

OverlayKeyBit& OverlayKeyBit::operator= ( bool  value  )  [inline]

Sets the corresponding bit to a boolean value.

Parameters:
value value to set to

Definition at line 550 of file OverlayKey.h.

00551     {
00552         key->setBit(pos, value);
00553         return *this;
00554     };

OverlayKeyBit& OverlayKeyBit::operator= ( const OverlayKeyBit value  )  [inline]

Definition at line 541 of file OverlayKey.h.

00542     {
00543         key->setBit(pos, value.bit);
00544         return *this;
00545     };

OverlayKeyBit& OverlayKeyBit::operator^= ( bool  value  )  [inline]

Definition at line 556 of file OverlayKey.h.

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


Member Data Documentation

bool OverlayKeyBit::bit [private]

Definition at line 560 of file OverlayKey.h.

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

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:
Generated on Wed May 26 16:21:18 2010 for OverSim by  doxygen 1.6.3