TBTK
TBTK::ExtensiveBitRegister Class Reference

Public Member Functions

 ExtensiveBitRegister (unsigned int numBits)
 
 ExtensiveBitRegister (const ExtensiveBitRegister &extensiveBitRegister)
 
 ~ExtensiveBitRegister ()
 
const ExtensiveBitRegister operator| (const ExtensiveBitRegister &rhs) const
 
const ExtensiveBitRegister operator& (const ExtensiveBitRegister &rhs) const
 
const ExtensiveBitRegister operator^ (const ExtensiveBitRegister &rhs) const
 
const ExtensiveBitRegister operator+ (const ExtensiveBitRegister &rhs) const
 
const ExtensiveBitRegister operator- (const ExtensiveBitRegister &rhs) const
 
bool operator< (const ExtensiveBitRegister &rhs) const
 
bool operator> (const ExtensiveBitRegister &rhs) const
 
bool operator== (const ExtensiveBitRegister &rhs) const
 
void operator+= (const ExtensiveBitRegister &rhs)
 
void operator-= (const ExtensiveBitRegister &rhs)
 
const ExtensiveBitRegisteroperator++ ()
 
const ExtensiveBitRegister operator++ (int)
 
const ExtensiveBitRegisteroperator-- ()
 
const ExtensiveBitRegister operator-- (int)
 
void operator= (const ExtensiveBitRegister &rhs)
 
void operator= (const unsigned int rhs)
 
ExtensiveBitRegister operator<< (unsigned int rhs) const
 
ExtensiveBitRegister operator>> (unsigned int rhs) const
 
void setBit (unsigned int position, bool values)
 
bool getBit (unsigned int position) const
 
bool toBool () const
 
unsigned int toUnsignedInt () const
 
void clear ()
 
void print () const
 
unsigned int getNumBits () const
 
unsigned int getNumOneBits () const
 
bool getMostSignificantBit () const
 
void setMostSignificantBit ()
 
void clearMostSignificantBit ()
 
ExtensiveBitRegister cloneStructure () const
 

Constructor & Destructor Documentation

TBTK::ExtensiveBitRegister::ExtensiveBitRegister ( unsigned int  numBits)

Constructor.

TBTK::ExtensiveBitRegister::ExtensiveBitRegister ( const ExtensiveBitRegister extensiveBitRegister)

Copy constructor.

TBTK::ExtensiveBitRegister::~ExtensiveBitRegister ( )

Destructor.

Member Function Documentation

void TBTK::ExtensiveBitRegister::clear ( )
inline

Clear register.

void TBTK::ExtensiveBitRegister::clearMostSignificantBit ( )
inline

Set the most significant bit.

ExtensiveBitRegister TBTK::ExtensiveBitRegister::cloneStructure ( ) const
inline

Create a new ExtensiveBitRegister with the same strucutre.

bool TBTK::ExtensiveBitRegister::getBit ( unsigned int  position) const
inline

Get bit value.

bool TBTK::ExtensiveBitRegister::getMostSignificantBit ( ) const
inline

Return the most significant bit.

unsigned int TBTK::ExtensiveBitRegister::getNumBits ( ) const
inline

Return the number of bits in the register.

unsigned int TBTK::ExtensiveBitRegister::getNumOneBits ( ) const
inline

Returns the number of bits that are one.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator& ( const ExtensiveBitRegister rhs) const
inline

Bitwise and operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator+ ( const ExtensiveBitRegister rhs) const
inline

Addition operator.

const ExtensiveBitRegister & TBTK::ExtensiveBitRegister::operator++ ( )
inline

Increment operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator++ ( int  )
inline

Increment operator.

void TBTK::ExtensiveBitRegister::operator+= ( const ExtensiveBitRegister rhs)
inline

+= operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator- ( const ExtensiveBitRegister rhs) const
inline

Subtraction operator.

const ExtensiveBitRegister & TBTK::ExtensiveBitRegister::operator-- ( )
inline

Decrement operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator-- ( int  )
inline

Decrement operator.

void TBTK::ExtensiveBitRegister::operator-= ( const ExtensiveBitRegister rhs)
inline

-= operator.

bool TBTK::ExtensiveBitRegister::operator< ( const ExtensiveBitRegister rhs) const
inline

Less than operator.

ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator<< ( unsigned int  rhs) const
inline

Left bitshift operator.

void TBTK::ExtensiveBitRegister::operator= ( const ExtensiveBitRegister rhs)
inline

Assignment operator.

void TBTK::ExtensiveBitRegister::operator= ( const unsigned int  rhs)
inline

Assignment operator.

bool TBTK::ExtensiveBitRegister::operator== ( const ExtensiveBitRegister rhs) const
inline

Comparison operator.

bool TBTK::ExtensiveBitRegister::operator> ( const ExtensiveBitRegister rhs) const
inline

Greater than operator.

ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator>> ( unsigned int  rhs) const
inline

Right bitshift operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator^ ( const ExtensiveBitRegister rhs) const
inline

Bitwise xor operator.

const ExtensiveBitRegister TBTK::ExtensiveBitRegister::operator| ( const ExtensiveBitRegister rhs) const
inline

Bitwise or operator.

void TBTK::ExtensiveBitRegister::print ( ) const
inline

Print bit register.

void TBTK::ExtensiveBitRegister::setBit ( unsigned int  position,
bool  values 
)
inline

Set value of bit at a specific position.

void TBTK::ExtensiveBitRegister::setMostSignificantBit ( )
inline

Set the most significant bit.

bool TBTK::ExtensiveBitRegister::toBool ( ) const
inline

Returns a bool that is false if all bits are zero, and true otherwise.

unsigned int TBTK::ExtensiveBitRegister::toUnsignedInt ( ) const
inline

Returns an unsigned int containing the least significant bits in the register.


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