1 #ifndef ossimRpfCompressionSection_HEADER 2 #define ossimRpfCompressionSection_HEADER 1 3 4 #include <ossim/base/ossimConstants.h> 5 #include <ossim/base/ossimErrorContext.h> 6 #include <ossim/base/ossimIosFwd.h> 7 #include <vector> 8 9 class ossimRpfCompressionSectionSubheader; 10 11 struct ossimRpfCompressionOffsetTableData 12 { 13 friend std::ostream& operator<<( 14 std::ostream& out, const ossimRpfCompressionOffsetTableData& data); 15 ossimRpfCompressionOffsetTableData(); 16 ossimRpfCompressionOffsetTableData(const ossimRpfCompressionOffsetTableData& rhs); 17 ~ossimRpfCompressionOffsetTableData(); 18 const ossimRpfCompressionOffsetTableData& operator =(const ossimRpfCompressionOffsetTableData& rhs); 19 20 ossim_uint16 theTableId; 21 ossim_uint32 theNumberOfLookupValues; 22 ossim_uint16 theCompressionLookupValueBitLength; 23 ossim_uint16 theNumberOfValuesPerLookup; 24 ossim_uint8* theData; 25 }; 26 27 class ossimRpfCompressionSection 28 { 29 public: 30 friend std::ostream& operator << ( 31 std::ostream& out, const ossimRpfCompressionSection& data); 32 ossimRpfCompressionSection(); 33 virtual ~ossimRpfCompressionSection(); 34 ossimErrorCode parseStream(ossim::istream& in, 35 ossimByteOrder byteOrder); 36 void print(std::ostream& out)const; getTable()37 const std::vector<ossimRpfCompressionOffsetTableData>& getTable()const 38 { 39 return theTable; 40 } getSubheader()41 const ossimRpfCompressionSectionSubheader* getSubheader()const 42 { 43 return theSubheader; 44 } 45 private: 46 void clearTable(); 47 48 ossimRpfCompressionSectionSubheader* theSubheader; 49 50 ossim_uint32 theCompressionLookupOffsetTableOffset; 51 ossim_uint16 theCompressionLookupTableOffsetRecordLength; 52 53 std::vector<ossimRpfCompressionOffsetTableData> theTable; 54 }; 55 56 #endif 57