Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

Bit Class Reference
[Miscellaneous]

Bit Class. More...

#include <bitVector.h>

List of all members.

Public Member Functions

Constructors and Destructors
 Bit () throw ()
 Default constructor.
 Bit (const Bit &bit) throw ()
 Copy constructor.
 Bit (BitVector *bitvector, Index index=0) throw (Exception::NullPointer)
 Detailed constructor.
 Bit (const BitVector *const bitvector, Index index=0) throw (Exception::NullPointer, Exception::IndexUnderflow, Exception::IndexOverflow)
 Detailed constructor.
virtual ~Bit () throw ()
 Destructor.
Converters
 operator bool () const throw (Exception::NullPointer)
 Casting operator from Bit to bool.
Bitoperator= (const Bit &bit) throw ()
 Assignment operator.
Bitoperator= (const bool bit) throw (Exception::NullPointer, IllegalOperation)
 Assignment operator.
virtual void clear () throw ()
 Clear method.
Predicates
bool operator== (const Bit &bit) const throw ()
 Equality operator.
bool operator== (bool bit) const throw (Exception::NullPointer)
 Equality operator.
bool operator!= (const Bit &bit) const throw ()
 Inequality operator.
bool operator!= (bool bit) const throw (Exception::NullPointer)
 Inequality operator.


Detailed Description

Bit Class.

This class represents a bit within a BitVector.

See also:
BitVector.


Constructor & Destructor Documentation

Bit::Bit BitVector bitvector,
Index  index = 0
throw (Exception::NullPointer)
 

Detailed constructor.

For use with nonconst bitvector. The bitvector can be resized by accessing bits out of the bitvectors range.

Exceptions:
NullPointer if bitvector is equal to 0

Bit::Bit const BitVector *const   bitvector,
Index  index = 0
throw (Exception::NullPointer, Exception::IndexUnderflow, Exception::IndexOverflow)
 

Detailed constructor.

For use with const bitvector.

Exceptions:
NullPointer if bitvector is equal to 0
IndexUnderflow if index is too small
IndexOverflow if index is greater than the size of bitvector


Member Function Documentation

Bit::operator bool  )  const throw (Exception::NullPointer)
 

Casting operator from Bit to bool.

bool Bit::operator!= bool  bit  )  const throw (Exception::NullPointer)
 

Inequality operator.

Test if this instance has not the given bool value

bool Bit::operator!= const Bit bit  )  const throw ()
 

Inequality operator.

Test if two instances point to different positions.

Bit& Bit::operator= const bool  bit  )  throw (Exception::NullPointer, IllegalOperation)
 

Assignment operator.

Assign a bool value to this instance. The bit in the bitvector is set to the given value.

Exceptions:
IllegalOperation if instance points to a const bitvector

Bit& Bit::operator= const Bit bit  )  throw ()
 

Assignment operator.

Assign the position from a Bit to this instance

bool Bit::operator== bool  bit  )  const throw (Exception::NullPointer)
 

Equality operator.

Test if this instance has the given bool value

bool Bit::operator== const Bit bit  )  const throw ()
 

Equality operator.

Test if two instances have the same position in a bitvector