00001 # ifndef BitInfo_h
00002 # define BitInfo_h BitInfo_h
00003
00004
00005
00006
00007
00008 # include "BitOverlay.h"
00009
00010 namespace Conjecture {
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class BitInfo : public BitOverlay {
00038 public:
00039
00040 BitInfo(BitOverlay::Layout layout);
00041
00042
00043 inline const BitOverlay::BitCount & largestRegion() const { return this->_largestRegion; }
00044 inline const unsigned short* regions() const { return this->_regions; }
00045 inline const BitOverlay::BitCount & regionCount() const { return this->_regionCount; }
00046 inline const BitOverlay::BitPos & firstLow() const { return this->_firstLow; }
00047 inline const BitOverlay::BitPos & firstHigh() const { return this->_firstHigh; }
00048
00049
00050 std::ostream& print(std::ostream& os = std::cout, const std::string& indent = "") const;
00051
00052
00053 static void Test(int argc = 0, const char* argv[] = NULL);
00054
00055 protected:
00056
00057 inline void largestRegionIs(const BitOverlay::BitCount & largestRegion) { this->_largestRegion = largestRegion; }
00058 inline void regionCountIs(const BitOverlay::BitCount & regionCount) { this->_regionCount = regionCount; }
00059 inline void firstLowIs(const BitOverlay::BitPos & firstLow) { this->_firstLow = firstLow; }
00060 inline void firstHighIs(const BitOverlay::BitPos & firstHigh) { this->_firstHigh = firstHigh; }
00061
00062
00063
00064 private:
00065
00066 inline BitOverlay::BitCount & largestRegionRef() { return this->_largestRegion; }
00067 inline unsigned short* regionsRef() { return this->_regions; }
00068 inline BitOverlay::BitCount & regionCountRef() { return this->_regionCount; }
00069 inline BitOverlay::BitPos & firstLowRef() { return this->_firstLow; }
00070 inline BitOverlay::BitPos & firstHighRef() { return this->_firstHigh; }
00071
00072
00073
00074
00075 BitOverlay::BitCount _largestRegion;
00076
00077
00078
00079
00080 unsigned short _regions[16];
00081 BitOverlay::BitCount _regionCount;
00082 BitOverlay::BitPos _firstLow;
00083 BitOverlay::BitPos _firstHigh;
00084 };
00085 }
00086
00087 # endif // BitInfo_h
00088