OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Public Attributes | List of all members
ossimNitfVqCompressionOffsetTableData Class Reference

#include <ossimNitfVqCompressionHeader.h>

Public Member Functions

 ossimNitfVqCompressionOffsetTableData ()
 
 ossimNitfVqCompressionOffsetTableData (const ossimNitfVqCompressionOffsetTableData &rhs)
 
 ~ossimNitfVqCompressionOffsetTableData ()
 
const ossimNitfVqCompressionOffsetTableDataoperator= (const ossimNitfVqCompressionOffsetTableData &rhs)
 
ossim_uint32 getDataLengthInBytes () const
 
void clearFields ()
 
void parseStream (std::istream &in)
 

Public Attributes

ossim_uint16 theTableId
 
ossim_uint32 theNumberOfCompressionLookupRecords
 
ossim_uint16 theNumberOfValuesPerCompressionLookup
 
ossim_uint16 theCompressionLookupValueBitLength
 
ossim_uint32 theCompressionLookupTableOffset
 
ossim_uint8theData
 

Detailed Description

Definition at line 17 of file ossimNitfVqCompressionHeader.h.

Constructor & Destructor Documentation

◆ ossimNitfVqCompressionOffsetTableData() [1/2]

ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData ( )

◆ ossimNitfVqCompressionOffsetTableData() [2/2]

ossimNitfVqCompressionOffsetTableData::ossimNitfVqCompressionOffsetTableData ( const ossimNitfVqCompressionOffsetTableData rhs)

Definition at line 44 of file ossimNitfVqCompressionHeader.cpp.

References size, theCompressionLookupValueBitLength, theData, theNumberOfCompressionLookupRecords, and theNumberOfValuesPerCompressionLookup.

45  :theTableId(rhs.theTableId),
50  theData(NULL)
51 
52 {
56  if(size > 0)
57  {
58  theData = new unsigned char[size];
59  if(rhs.theData)
60  {
61  memcpy(theData, rhs.theData, size);
62  }
63  }
64 }
yy_size_t size
unsigned int ossim_uint32

◆ ~ossimNitfVqCompressionOffsetTableData()

ossimNitfVqCompressionOffsetTableData::~ossimNitfVqCompressionOffsetTableData ( )

Definition at line 66 of file ossimNitfVqCompressionHeader.cpp.

References theData.

67 {
68  if(theData)
69  {
70  delete [] theData;
71  theData = NULL;
72  }
73 }

Member Function Documentation

◆ clearFields()

void ossimNitfVqCompressionOffsetTableData::clearFields ( )

Definition at line 133 of file ossimNitfVqCompressionHeader.cpp.

References theCompressionLookupTableOffset, theCompressionLookupValueBitLength, theData, theNumberOfCompressionLookupRecords, theNumberOfValuesPerCompressionLookup, and theTableId.

Referenced by ossimNitfVqCompressionOffsetTableData().

◆ getDataLengthInBytes()

ossim_uint32 ossimNitfVqCompressionOffsetTableData::getDataLengthInBytes ( ) const

◆ operator=()

const ossimNitfVqCompressionOffsetTableData & ossimNitfVqCompressionOffsetTableData::operator= ( const ossimNitfVqCompressionOffsetTableData rhs)

Definition at line 75 of file ossimNitfVqCompressionHeader.cpp.

References size, theCompressionLookupTableOffset, theCompressionLookupValueBitLength, theData, theNumberOfCompressionLookupRecords, theNumberOfValuesPerCompressionLookup, and theTableId.

76 {
77  if(this != &rhs)
78  {
79  if(theData)
80  {
81  delete [] theData;
82  theData = NULL;
83  }
84 
85  theTableId = rhs.theTableId;
90 
91  if(rhs.theData)
92  {
96  if(size > 0)
97  {
98  theData = new unsigned char[size];
99  memcpy(theData, rhs.theData, size);
100  }
101  }
102  }
103 
104  return *this;
105 
106 }
yy_size_t size
unsigned int ossim_uint32

◆ parseStream()

void ossimNitfVqCompressionOffsetTableData::parseStream ( std::istream &  in)

Definition at line 114 of file ossimNitfVqCompressionHeader.cpp.

References ossimEndian::getSystemEndianType(), OSSIM_LITTLE_ENDIAN, ossimEndian::swap(), theCompressionLookupTableOffset, theCompressionLookupValueBitLength, theNumberOfCompressionLookupRecords, theNumberOfValuesPerCompressionLookup, and theTableId.

115 {
116  ossimEndian endian;
117  in.read((char*)(&theTableId), 2);
118  in.read((char*)(&theNumberOfCompressionLookupRecords),4);
119  in.read((char*)(&theNumberOfValuesPerCompressionLookup), 2);
120  in.read((char*)(&theCompressionLookupValueBitLength),2);
121  in.read((char*)(&theCompressionLookupTableOffset), 4);
122 
124  {
125  endian.swap(theTableId);
130  }
131 }
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Member Data Documentation

◆ theCompressionLookupTableOffset

ossim_uint32 ossimNitfVqCompressionOffsetTableData::theCompressionLookupTableOffset

Definition at line 33 of file ossimNitfVqCompressionHeader.h.

Referenced by clearFields(), operator=(), and parseStream().

◆ theCompressionLookupValueBitLength

ossim_uint16 ossimNitfVqCompressionOffsetTableData::theCompressionLookupValueBitLength

◆ theData

ossim_uint8* ossimNitfVqCompressionOffsetTableData::theData

◆ theNumberOfCompressionLookupRecords

ossim_uint32 ossimNitfVqCompressionOffsetTableData::theNumberOfCompressionLookupRecords

◆ theNumberOfValuesPerCompressionLookup

ossim_uint16 ossimNitfVqCompressionOffsetTableData::theNumberOfValuesPerCompressionLookup

◆ theTableId

ossim_uint16 ossimNitfVqCompressionOffsetTableData::theTableId

Definition at line 29 of file ossimNitfVqCompressionHeader.h.

Referenced by clearFields(), operator=(), and parseStream().


The documentation for this class was generated from the following files: