BALL::Bit Class Reference
[Miscellaneous]

#include <BALL/DATATYPE/bitVector.h>

List of all members.

Classes

class  IllegalOperation

Public Member Functions

Constructors and Destructors

 Bit ()
 Bit (const Bit &bit)
 Bit (BitVector *bitvector, Index index=0)
 Bit (const BitVector *const bitvector, Index index=0)
virtual ~Bit ()
Converters

 operator bool () const

Bitoperator= (const Bit &bit)
Bitoperator= (const bool bit)
virtual void clear ()
Predicates

bool operator== (const Bit &bit) const
bool operator== (bool bit) const
bool operator!= (const Bit &bit) const
bool operator!= (bool bit) const

Private Attributes

BitVectorbitvector_
Index index_
bool bitvector_muteable_

Detailed Description

Bit Class. This class represents a bit within a BitVector.

See also:
BitVector.

Definition at line 42 of file bitVector.h.


Constructor & Destructor Documentation

BALL::Bit::Bit (  ) 

Default constructor

BALL::Bit::Bit ( const Bit bit  ) 

Copy constructor

BALL::Bit::Bit ( BitVector bitvector,
Index  index = 0 
)

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
BALL::Bit::Bit ( const BitVector *const   bitvector,
Index  index = 0 
)

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
virtual BALL::Bit::~Bit (  )  [virtual]

Destructor


Member Function Documentation

virtual void BALL::Bit::clear (  )  [virtual]

Clear method

BALL::Bit::operator bool (  )  const

Casting operator from Bit to bool.

Exceptions:
NullPointer 
bool BALL::Bit::operator!= ( bool  bit  )  const

Inequality operator. Test if this instance has not the given bool value

Exceptions:
Exception::NullPointer if this bitvector is not correctly initialized
bool BALL::Bit::operator!= ( const Bit bit  )  const

Inequality operator. Test if two instances point to different positions.

Bit& BALL::Bit::operator= ( const bool  bit  ) 

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

Exceptions:
Exception::IllegalOperation if instance points to a const bitvector
Exception::NullPointer 
Bit& BALL::Bit::operator= ( const Bit bit  ) 

Assignment Assignment operator. Assign the position from a Bit to this instance

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

Equality operator. Test if this instance has the given bool value

Exceptions:
Exception::NullPointer if this bitvector is not correctly initialized
bool BALL::Bit::operator== ( const Bit bit  )  const

Equality operator. Test if two instances have the same position in a bitvector


Member Data Documentation

Definition at line 161 of file bitVector.h.

Definition at line 163 of file bitVector.h.

Definition at line 162 of file bitVector.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3