28 #ifndef CASA_BITVECTOR_H 29 #define CASA_BITVECTOR_H 32 #include <casacore/casa/aips.h> 33 #include <casacore/casa/Containers/Block.h> 34 #include <casacore/casa/Utilities/Assert.h> 35 #include <casacore/casa/iosfwd.h> 40 class BitVectorHelper;
207 void set (
Bool state);
269 operator Bool()
const;
309 : bitNumber_p (bitNumber),
329 inline BitVectorHelper::operator
Bool()
const ~BitVector()
Delete the bit vector.
void operator^=(const BitVector &that)
uInt size_p
Number of bits in the BitVector object.
BitVector operator &(const BitVector &that) const
Logical operations on whole bit vectors.
void putBit(uInt pos, Bool state)
Set a bit at the given position (0-relative) to the given state.
void operator &=(const BitVector &that)
Logical in-place operations on whole bit vectors.
const uInt WORDSIZE
The size of a unsigned Integer ( assumes 8-bit char )
const BitVectorHelper & operator=(const BitVectorHelper &that) const
Set the bit to the state of the bit in the other BitVector.
void copy(uInt thisStart, uInt length, const BitVector &that, uInt thatStart)
Copy length bits starting at thatStart in the other BitVector to this BitVector starting at thisStart...
Bool getBit(uInt pos) const
Get a bit at the given position (0-relative).
Bool toggleBit(uInt pos)
Toggle a bit at the given position (0-relative).
BitVector & operator=(const BitVector &that)
Assignment (copy semantics).
Bool operator[](uInt pos) const
Index operator to access the specified bit.
friend ostream & operator<<(ostream &, const BitVector &vector)
Write a representation of the bit vector (a list of zeros and ones enclosed in square parentheses) to...
void setBit(uInt pos)
Set a bit at the given position (0-relative).
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
#define DebugAssert(expr, exception)
BitVectorHelper(const BitVectorHelper &that)
Copy constructor has to be public.
uInt nbits() const
Return the number of bits in the bitvector.
bool Bool
Define the standard types used by Casacore.
friend class BitVectorHelper
BitVectorHelper is a helper class.
Bool operator==(const BitVector &that) const
Returns True if all bits are equal.
Base class for all Casacore library errors.
BitVector operator~() const
BitVector operator^(const BitVector &that) const
Block< uInt > bits_p
Pointer to the actual bit vector, stored as a contiguous sequence of one or more unsigned integers...
BitVector()
Create a bit vector of length 0.
void clearBit(uInt pos)
Clear a bit at the given position (0-relative).
void resize(uInt length, Bool state=False, Bool copy=True)
Resize the bit vector to the new length.
Helper class for BitVector.
BitVector * vecPtr_p
Pointer back to the original vector.
Bool operator!=(const BitVector &that) const
Returns True if a bit differs.
BitVector operator|(const BitVector &that) const
this file contains all the compiler specific defines
void operator|=(const BitVector &that)