awUtil.BitField64 Class Reference


Detailed Description

awUtil.BitField64 acts as an array of booleans with the maximum size of 64.

Note that we do not need to export this class as it is completelly inlined. If you add non-inline methods, you will need to export it.

#include <classaw_util_1_1_bit_field64.h>

List of all members.

Public Member Functions

  __init__ ()
  The default constructor.
  __init__ (uint64_t)
  Create with the bits as in the given 64-bit integer.
  __del__ ()
  __init__ (BitField64)
  Copy constructor.
BitField64  operator= (BitField64)
  Assignment operator.
int  maxAvailableBits ()
  Just a convenience, mostly for unit testing.
  resetAll ()
  Set all the bits to false.
  setAll ()
  Set all the bits to true.
BitRef64  operator[] (int)
  Index operator that returns a reference appropriate for LHS usage.
bool  operator[] (int)
  Constant version of the index operator behaving as testBit(i).
bool  operator== (BitField64)
  Equals operator needs to compare the 64-bit integers.
bool  operator!= (BitField64)
  Not-equals operator needs to compare the 64-bit integers.
BitField64  setBit (int, bool)
  Set the specified bit to the specified value.
bool  testBit (int)
  Return true if the bit is set, false otherwise.
bool  anySet ()
  Return true if any of the bits are set to true, false otherwise.
bool  allSet ()
  Return true iff all the bits are set to true.
BitField64  operator~ ()
  Make a copy and return it.
BitField64  operator^ (BitField64 mask)
  Return a copy that is a result of the ^ operation on the bits.
BitField64  operator& (BitField64 mask)
  Return a copy that is a result of the & operation on the bits.
BitField64  operator| (BitField64 mask)
  Return a copy that is a result of the | operation on the bits.
BitField64  operator^= (BitField64 mask)
  Update the bits by exclusive or-ing them with the mask bits.
BitField64  operator&= (BitField64 mask)
  Update the bits by and-ing them with the mask bits.
BitField64  operator|= (BitField64 mask)
  Update the bits by or-ing them with the mask bits.

Member Function Documentation

awUtil.BitField64.__init__ ( )

The default constructor.

All bits set to false.

awUtil.BitField64.__init__ ( uint64_t  )

Create with the bits as in the given 64-bit integer.

awUtil.BitField64.__del__ ( )
awUtil.BitField64.__init__ ( BitField64  )

Copy constructor.

BitField64 awUtil.BitField64.operator= ( BitField64  )

Assignment operator.

int awUtil.BitField64.maxAvailableBits ( )

Just a convenience, mostly for unit testing.

The number of bits is already encoded in the name.

awUtil.BitField64.resetAll ( )

Set all the bits to false.

awUtil.BitField64.setAll ( )

Set all the bits to true.

BitRef64 awUtil.BitField64.operator[] ( int  )

Index operator that returns a reference appropriate for LHS usage.

This is why you can do "bits[8] = true;" or something like that.

bool awUtil.BitField64.operator[] ( int  )

Constant version of the index operator behaving as testBit(i).

bool awUtil.BitField64.operator== ( BitField64  )

Equals operator needs to compare the 64-bit integers.

bool awUtil.BitField64.operator!= ( BitField64  )

Not-equals operator needs to compare the 64-bit integers.

BitField64 awUtil.BitField64.setBit ( int  ,
bool   
)

Set the specified bit to the specified value.

Make sure that the bit argument is in [0,64) range or bad things happen.

bool awUtil.BitField64.testBit ( int  )

Return true if the bit is set, false otherwise.

Make sure that the argument is in [0,64) range or bad things happen.

bool awUtil.BitField64.anySet ( )

Return true if any of the bits are set to true, false otherwise.

bool awUtil.BitField64.allSet ( )

Return true iff all the bits are set to true.

BitField64 awUtil.BitField64.operator~ ( )

Make a copy and return it.

The bits in the copy are reversed.

BitField64 awUtil.BitField64.operator^ ( BitField64  mask )

Return a copy that is a result of the ^ operation on the bits.

BitField64 awUtil.BitField64.operator& ( BitField64  mask )

Return a copy that is a result of the & operation on the bits.

BitField64 awUtil.BitField64.operator| ( BitField64  mask )

Return a copy that is a result of the | operation on the bits.

BitField64 awUtil.BitField64.operator^= ( BitField64  mask )

Update the bits by exclusive or-ing them with the mask bits.

BitField64 awUtil.BitField64.operator&= ( BitField64  mask )

Update the bits by and-ing them with the mask bits.

BitField64 awUtil.BitField64.operator|= ( BitField64  mask )

Update the bits by or-ing them with the mask bits.


awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64
awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64 awUtil.BitField64