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);
126 virtual
void clear();
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);
283 void setSize(
Size size,
bool keep = true);
293 Size countValue(
bool value) const;
319 bool operator [] (
Index index) const;
330 void setBit(
Index index,
bool value = true);
368 void fill(
bool value = true,
Index first = 0 ,
Index last = -1);
384 void setUnsignedChar(
unsigned char bit_pattern);
390 unsigned char getUnsignedChar() const;
395 void setUnsignedShort(
unsigned short bit_pattern);
400 unsigned short getUnsignedShort() const;
405 void setUnsignedInt(
unsigned int bit_pattern);
410 unsigned int getUnsignedInt() const;
415 void setUnsignedLong(
unsigned long bit_pattern);
420 unsigned long getUnsignedLong() const;
504 bool isAnyBit(
bool value,
Index first = 0,
Index last = -1) const;
513 bool isEveryBit(
bool value,
Index first = 0,
Index last = -1) const;
522 bool isValid() const;
543 virtual
void read(
std::istream& s);
547 virtual
void write(
std::ostream& s) const;
568 void validateIndex_(
Index& index) const;
593# ifndef BALL_NO_INLINE_FUNCTIONS
594# include <BALL/DATATYPE/bitVector.iC>
#define BALL_CREATE(name)
IllegalOperation(const char *file, int line)
std::vector< BlockType > VectorType