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