BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | List of all members
BALL::Bit Class Reference

#include <BALL/DATATYPE/bitVector.h>

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
 

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

Detailed constructor. For use with const bitvector.

Exceptions
NullPointerif bitvector is equal to 0
IndexUnderflowif index is too small
IndexOverflowif 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!= ( const Bit bit) const

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

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

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

Exceptions
Exception::NullPointerif this bitvector is not correctly initialized
Bit& BALL::Bit::operator= ( const Bit bit)

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

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::IllegalOperationif instance points to a const bitvector
Exception::NullPointer
bool BALL::Bit::operator== ( const Bit bit) const

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

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

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

Exceptions
Exception::NullPointerif this bitvector is not correctly initialized