5#ifndef BALL_DATATYPE_BITVECTOR_H
6#define BALL_DATATYPE_BITVECTOR_H
12#ifndef BALL_CONCEPT_PERSISTENCEMANAGER_H
16#ifndef BALL_COMMON_EXCEPTION_H
23#define BALL_BLOCK_BITS 8
24#define BALL_BLOCK_MASK (BALL_BLOCK_BITS - 1)
25#define BALL_BLOCK_SHIFT 3
26#define BALL_BLOCK_ALL_BITS_SET 0xFF
27#define BALL_BLOCK_ALL_BITS_CLEARED 0x00
30#define BALL_BLOCK_SIZE(bits) (Size)(((bits) + BALL_BLOCK_BITS - 1) >> BALL_BLOCK_SHIFT)
104 operator
bool() const;
122 Bit& operator = (const
bool bit);
136 bool operator == (const
Bit& bit) const;
142 bool operator == (
bool bit) const;
147 bool operator != (const
Bit& bit) const;
153 bool operator != (
bool bit) const;
163 bool bitvector_muteable_;
245 void set(const
char* bit_string);
319 bool operator [] (
Index index) const;
593# ifndef BALL_NO_INLINE_FUNCTIONS
594# include <BALL/DATATYPE/bitVector.iC>
unsigned short getUnsignedShort() const
void toggle(Index first=0, Index last=-1)
void validateIndex_(Index &index)
void bitwiseXor(const BitVector &bit_vector)
bool isEveryBit(bool value, Index first=0, Index last=-1) const
void setBit(Index index, bool value=true)
void setUnsignedChar(unsigned char bit_pattern)
void fill(bool value=true, Index first=0, Index last=-1)
void bitwiseAnd(const BitVector &bit_vector)
unsigned long getUnsignedLong() const
void setUnsignedInt(unsigned int bit_pattern)
void get(BitVector &bitvector) const
void set(const BitVector &bit_vector)
std::vector< BlockType > VectorType
void setUnsignedLong(unsigned long bit_pattern)
Size countValue(bool value) const
void setUnsignedShort(unsigned short bit_pattern)
virtual void read(std::istream &s)
void toggleBit(Index index)
static const Size CharBits
unsigned char getUnsignedChar() const
virtual void write(std::ostream &s) const
static const Size BlockSize
bool isAnyBit(bool value, Index first=0, Index last=-1) const
void bitwiseOr(const BitVector &bit_vector)
void setSize(Size size, bool keep=true)
unsigned int getUnsignedInt() const
void validateRange_(Index &first, Index &last) const
IllegalOperation(const char *file, int line)
#define BALL_CREATE(name)