00001 /* 00002 * File: bitary.h 00003 * Summary: Bit array data type. 00004 * Created by: Robert Vollmert 00005 * 00006 * Just contains the operations required by los.cc 00007 * for the moment. 00008 */ 00009 00010 #ifndef BITARY_H 00011 #define BITARY_H 00012 00013 class bit_array 00014 { 00015 public: 00016 bit_array(unsigned long size = 0); 00017 ~bit_array(); 00018 00019 void reset(); 00020 00021 bool get(unsigned long index) const; 00022 void set(unsigned long index, bool value = true); 00023 00024 bit_array& operator |= (const bit_array& other); 00025 bit_array& operator &= (const bit_array& other); 00026 bit_array operator & (const bit_array& other) const; 00027 00028 protected: 00029 unsigned long size; 00030 int nwords; 00031 unsigned long *data; 00032 }; 00033 00034 #endif