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

#include <ossimRpfFrameFileIndexSectionSubheader.h>

Inheritance diagram for ossimRpfFrameFileIndexSectionSubheader:
ossimReferenced

Public Member Functions

 ossimRpfFrameFileIndexSectionSubheader ()
 default constructor More...
 
 ossimRpfFrameFileIndexSectionSubheader (const ossimRpfFrameFileIndexSectionSubheader &obj)
 copy constructor More...
 
const ossimRpfFrameFileIndexSectionSubheaderoperator= (const ossimRpfFrameFileIndexSectionSubheader &rhs)
 assignment operator More...
 
virtual ~ossimRpfFrameFileIndexSectionSubheader ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void writeStream (std::ostream &out)
 Write method. More...
 
std::ostream & print (std::ostream &out) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
ossim_uint32 getOffset () const
 
ossim_uint32 getNumberOfIndexRecords () const
 
ossim_uint16 getNumberOfPathnameRecords () const
 
ossim_uint16 getIndexRecordLength () const
 
void setNumberOfIndexRecords (ossim_uint32 count)
 
void setNumberOfPathnameRecords (ossim_uint16 count)
 
void setIndexRecordLength (ossim_uint16 length)
 
void clearFields ()
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Private Attributes

char m_highestSecurityClassification
 
ossim_uint32 m_indexTableOffset
 
ossim_uint32 m_numberOfIndexRecords
 
ossim_uint16 m_numberOfPathnameRecords
 
ossim_uint16 m_indexRecordLength
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimRpfFrameFileIndexSectionSubheader &data)
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 19 of file ossimRpfFrameFileIndexSectionSubheader.h.

Constructor & Destructor Documentation

◆ ossimRpfFrameFileIndexSectionSubheader() [1/2]

ossimRpfFrameFileIndexSectionSubheader::ossimRpfFrameFileIndexSectionSubheader ( )

◆ ossimRpfFrameFileIndexSectionSubheader() [2/2]

ossimRpfFrameFileIndexSectionSubheader::ossimRpfFrameFileIndexSectionSubheader ( const ossimRpfFrameFileIndexSectionSubheader obj)

◆ ~ossimRpfFrameFileIndexSectionSubheader()

ossimRpfFrameFileIndexSectionSubheader::~ossimRpfFrameFileIndexSectionSubheader ( )
virtual

Definition at line 63 of file ossimRpfFrameFileIndexSectionSubheader.cpp.

64 {
65 }

Member Function Documentation

◆ clearFields()

void ossimRpfFrameFileIndexSectionSubheader::clearFields ( )

◆ getIndexRecordLength()

ossim_uint16 ossimRpfFrameFileIndexSectionSubheader::getIndexRecordLength ( ) const

◆ getNumberOfIndexRecords()

ossim_uint32 ossimRpfFrameFileIndexSectionSubheader::getNumberOfIndexRecords ( ) const

◆ getNumberOfPathnameRecords()

ossim_uint16 ossimRpfFrameFileIndexSectionSubheader::getNumberOfPathnameRecords ( ) const

◆ getOffset()

ossim_uint32 ossimRpfFrameFileIndexSectionSubheader::getOffset ( ) const

◆ operator=()

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

◆ parseStream()

ossimErrorCode ossimRpfFrameFileIndexSectionSubheader::parseStream ( std::istream &  in,
ossimByteOrder  byteOrder 
)

Definition at line 67 of file ossimRpfFrameFileIndexSectionSubheader.cpp.

References ossim::byteOrder(), m_highestSecurityClassification, m_indexRecordLength, m_indexTableOffset, m_numberOfIndexRecords, m_numberOfPathnameRecords, ossimErrorCodes::OSSIM_ERROR, and ossimEndian::swap().

Referenced by ossimRpfHeader::getNewFrameFileIndexSectionSubheader().

69 {
70  if(in)
71  {
72  in.read((char*)&m_highestSecurityClassification, 1);
73  in.read((char*)&m_indexTableOffset, 4);
74  in.read((char*)&m_numberOfIndexRecords, 4);
75  in.read((char*)&m_numberOfPathnameRecords, 2);
76  in.read((char*)&m_indexRecordLength, 2);
77 
78  if( ossim::byteOrder() != byteOrder )
79  {
80  ossimEndian anEndian;
81  anEndian.swap(m_indexTableOffset);
82  anEndian.swap(m_numberOfIndexRecords);
84  anEndian.swap(m_indexRecordLength);
85  }
86  }
87  else
88  {
90  }
91 
92  if ( traceDebug() )
93  {
95  }
96 
98 }
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
std::ostream & print(std::ostream &out) const
print method that outputs a key/value type format adding prefix to keys.
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ print()

std::ostream & ossimRpfFrameFileIndexSectionSubheader::print ( std::ostream &  out) const

print method that outputs a key/value type format adding prefix to keys.

Parameters
outString to output to.
prefixThis will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:"
Returns
output stream.

Definition at line 128 of file ossimRpfFrameFileIndexSectionSubheader.cpp.

References m_highestSecurityClassification, m_indexRecordLength, m_indexTableOffset, m_numberOfIndexRecords, and m_numberOfPathnameRecords.

Referenced by operator<<().

129 {
130  out << "ossimRpfFrameFileIndexSectionSubheader DEBUG:"
131  << "\nHighestSecurityClassification: " << m_highestSecurityClassification
132  << "\nIndexTableOffset: " << m_indexTableOffset
133  << "\nNumberOfIndexRecords: " << m_numberOfIndexRecords
134  << "\nNumberOfPathnameRecords: " << m_numberOfPathnameRecords
135  << "\nIndexRecordLength: " << m_indexRecordLength
136  << std::endl;
137 
138  return out;
139 }

◆ setIndexRecordLength()

void ossimRpfFrameFileIndexSectionSubheader::setIndexRecordLength ( ossim_uint16  length)

◆ setNumberOfIndexRecords()

void ossimRpfFrameFileIndexSectionSubheader::setNumberOfIndexRecords ( ossim_uint32  count)

◆ setNumberOfPathnameRecords()

void ossimRpfFrameFileIndexSectionSubheader::setNumberOfPathnameRecords ( ossim_uint16  count)

◆ writeStream()

void ossimRpfFrameFileIndexSectionSubheader::writeStream ( std::ostream &  out)

Write method.

Note always writes out in big endian at this point.

Parameters
outStream to write to.

Definition at line 100 of file ossimRpfFrameFileIndexSectionSubheader.cpp.

References ossim::byteOrder(), m_highestSecurityClassification, m_indexRecordLength, m_indexTableOffset, m_numberOfIndexRecords, m_numberOfPathnameRecords, OSSIM_BIG_ENDIAN, and ossimEndian::swap().

101 {
103  {
104  // Swap to big endian.
105  ossimEndian anEndian;
106  anEndian.swap(m_indexTableOffset);
107  anEndian.swap(m_numberOfIndexRecords);
109  anEndian.swap(m_indexRecordLength);
110  }
111 
112  out.write((char*)&m_highestSecurityClassification, 1);
113  out.write((char*)&m_indexTableOffset, 4);
114  out.write((char*)&m_numberOfIndexRecords, 4);
115  out.write((char*)&m_numberOfPathnameRecords, 2);
116  out.write((char*)&m_indexRecordLength, 2);
117 
119  {
120  // Swap back to native byte order.
121  ossimEndian anEndian;
122  anEndian.swap(m_indexTableOffset);
123  anEndian.swap(m_numberOfIndexRecords);
125  anEndian.swap(m_indexRecordLength);
126  }
127 }
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimRpfFrameFileIndexSectionSubheader data 
)
friend

Definition at line 23 of file ossimRpfFrameFileIndexSectionSubheader.cpp.

24 {
25  return data.print(out);
26 }
std::ostream & print(std::ostream &out) const
print method that outputs a key/value type format adding prefix to keys.

Member Data Documentation

◆ m_highestSecurityClassification

char ossimRpfFrameFileIndexSectionSubheader::m_highestSecurityClassification
private

◆ m_indexRecordLength

ossim_uint16 ossimRpfFrameFileIndexSectionSubheader::m_indexRecordLength
private

◆ m_indexTableOffset

ossim_uint32 ossimRpfFrameFileIndexSectionSubheader::m_indexTableOffset
private

◆ m_numberOfIndexRecords

ossim_uint32 ossimRpfFrameFileIndexSectionSubheader::m_numberOfIndexRecords
private

◆ m_numberOfPathnameRecords

ossim_uint16 ossimRpfFrameFileIndexSectionSubheader::m_numberOfPathnameRecords
private

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