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

#include <ossimRpfFrameFileIndexRecord.h>

Public Member Functions

 ossimRpfFrameFileIndexRecord ()
 default constructor More...
 
 ossimRpfFrameFileIndexRecord (const ossimRpfFrameFileIndexRecord &obj)
 copy constructor More...
 
const ossimRpfFrameFileIndexRecordoperator= (const ossimRpfFrameFileIndexRecord &rhs)
 assignment operator More...
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void writeStream (std::ostream &out)
 Write method. More...
 
void clearFields ()
 
std::ostream & print (std::ostream &out) const
 
ossim_uint16 getBoundaryRecNumber () const
 
ossim_uint16 getLocationRowNumber () const
 
ossim_uint16 getLocationColNumber () const
 
ossim_uint32 getPathnameRecordOffset () const
 
ossimFilename getFilename () const
 
void setBoundaryRecNumber (ossim_uint16 entry)
 Sets the zero based entry number. More...
 
void setPathnameRecordOffset (ossim_uint32 offset)
 

Private Attributes

ossim_uint16 m_boundaryRectRecordNumber
 
ossim_uint16 m_locationRowNumber
 
ossim_uint16 m_locationColumnNumber
 
ossim_uint32 m_pathnameRecordOffset
 
char m_filename [13]
 
char m_geographicLocation [7]
 
char m_securityClassification
 
char m_fileSecurityCountryCode [3]
 
char m_fileSecurityReleaseMarking [3]
 

Friends

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

Detailed Description

Definition at line 19 of file ossimRpfFrameFileIndexRecord.h.

Constructor & Destructor Documentation

◆ ossimRpfFrameFileIndexRecord() [1/2]

ossimRpfFrameFileIndexRecord::ossimRpfFrameFileIndexRecord ( )

◆ ossimRpfFrameFileIndexRecord() [2/2]

ossimRpfFrameFileIndexRecord::ossimRpfFrameFileIndexRecord ( const ossimRpfFrameFileIndexRecord obj)

copy constructor

Definition at line 35 of file ossimRpfFrameFileIndexRecord.cpp.

References m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, and m_geographicLocation.

36  :
42 {
43  memcpy(m_filename, obj.m_filename, 13);
47 }

Member Function Documentation

◆ clearFields()

void ossimRpfFrameFileIndexRecord::clearFields ( )

Definition at line 186 of file ossimRpfFrameFileIndexRecord.cpp.

References m_boundaryRectRecordNumber, m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, m_geographicLocation, m_locationColumnNumber, m_locationRowNumber, m_pathnameRecordOffset, and m_securityClassification.

Referenced by ossimRpfFrameFileIndexRecord(), and parseStream().

187 {
192  memset(m_filename, ' ', 12);
193  memset(m_geographicLocation, ' ', 6);
195  memset(m_fileSecurityCountryCode, ' ', 2);
196  memset(m_fileSecurityReleaseMarking, ' ', 2);
197 
198  m_filename[12] = '\0';
199  m_geographicLocation[6] = '\0';
200  m_fileSecurityCountryCode[2] = '\0';
202 }

◆ getBoundaryRecNumber()

ossim_uint16 ossimRpfFrameFileIndexRecord::getBoundaryRecNumber ( ) const

◆ getFilename()

ossimFilename ossimRpfFrameFileIndexRecord::getFilename ( ) const

Definition at line 171 of file ossimRpfFrameFileIndexRecord.cpp.

References m_filename.

◆ getLocationColNumber()

ossim_uint16 ossimRpfFrameFileIndexRecord::getLocationColNumber ( ) const

Definition at line 161 of file ossimRpfFrameFileIndexRecord.cpp.

References m_locationColumnNumber.

162 {
163  return m_locationColumnNumber;
164 }

◆ getLocationRowNumber()

ossim_uint16 ossimRpfFrameFileIndexRecord::getLocationRowNumber ( ) const

Definition at line 156 of file ossimRpfFrameFileIndexRecord.cpp.

References m_locationRowNumber.

157 {
158  return m_locationRowNumber;
159 }

◆ getPathnameRecordOffset()

ossim_uint32 ossimRpfFrameFileIndexRecord::getPathnameRecordOffset ( ) const

Definition at line 166 of file ossimRpfFrameFileIndexRecord.cpp.

References m_pathnameRecordOffset.

167 {
168  return m_pathnameRecordOffset;
169 }

◆ operator=()

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

assignment operator

Definition at line 49 of file ossimRpfFrameFileIndexRecord.cpp.

References m_boundaryRectRecordNumber, m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, m_geographicLocation, m_locationColumnNumber, m_locationRowNumber, m_pathnameRecordOffset, and m_securityClassification.

51 {
52  if ( this != &rhs )
53  {
59 
60  memcpy(m_filename, rhs.m_filename, 13);
64  }
65  return *this;
66 }

◆ parseStream()

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

Definition at line 68 of file ossimRpfFrameFileIndexRecord.cpp.

References ossim::byteOrder(), clearFields(), ossimEndian::getSystemEndianType(), m_boundaryRectRecordNumber, m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, m_geographicLocation, m_locationColumnNumber, m_locationRowNumber, m_pathnameRecordOffset, m_securityClassification, ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, and ossimEndian::swap().

70 {
71  if(in)
72  {
73  ossimEndian anEndian;
74 
75  clearFields();
76 
77  in.read((char*)&m_boundaryRectRecordNumber, 2);
78  in.read((char*)&m_locationRowNumber, 2);
79  in.read((char*)&m_locationColumnNumber, 2);
80  in.read((char*)&m_pathnameRecordOffset, 4);
81  in.read((char*)m_filename, 12);
82  in.read((char*)m_geographicLocation, 6);
83  in.read((char*)&m_securityClassification, 1);
84  in.read((char*)m_fileSecurityCountryCode, 2);
85  in.read((char*)m_fileSecurityReleaseMarking, 2);
86 
87  if(anEndian.getSystemEndianType() != byteOrder)
88  {
90  anEndian.swap(m_locationRowNumber);
91  anEndian.swap(m_locationColumnNumber);
92  anEndian.swap(m_pathnameRecordOffset);
93  }
94  }
95  else
96  {
98  }
99 
101 }
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

◆ print()

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

Definition at line 136 of file ossimRpfFrameFileIndexRecord.cpp.

References m_boundaryRectRecordNumber, m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, m_geographicLocation, m_locationColumnNumber, m_locationRowNumber, m_pathnameRecordOffset, and m_securityClassification.

Referenced by operator<<().

137 {
138  out << "BoundaryRectRecordNumber: " << m_boundaryRectRecordNumber
139  << "\nLocationRowNumber: " << m_locationRowNumber
140  << "\nLocationColumnNumber: " << m_locationColumnNumber
141  << "\nPathnameRecordOffset: " << m_pathnameRecordOffset
142  << "\nFilename: " << m_filename
143  << "\nGeographicLocation: " << m_geographicLocation
144  << "\nSecurityClassification: " << m_securityClassification
145  << "\nFileSecurityCountryCode: " << m_fileSecurityCountryCode
146  << "\nFileSecurityReleaseMarking: " << m_fileSecurityReleaseMarking
147  << std::endl;
148  return out;
149 }

◆ setBoundaryRecNumber()

void ossimRpfFrameFileIndexRecord::setBoundaryRecNumber ( ossim_uint16  entry)

Sets the zero based entry number.

Definition at line 176 of file ossimRpfFrameFileIndexRecord.cpp.

References m_boundaryRectRecordNumber.

177 {
179 }

◆ setPathnameRecordOffset()

void ossimRpfFrameFileIndexRecord::setPathnameRecordOffset ( ossim_uint32  offset)

Definition at line 181 of file ossimRpfFrameFileIndexRecord.cpp.

References m_pathnameRecordOffset.

182 {
183  m_pathnameRecordOffset = offset;
184 }

◆ writeStream()

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

Write method.

Parameters
outStream to write to.

Definition at line 103 of file ossimRpfFrameFileIndexRecord.cpp.

References ossimEndian::getSystemEndianType(), m_boundaryRectRecordNumber, m_filename, m_fileSecurityCountryCode, m_fileSecurityReleaseMarking, m_geographicLocation, m_locationColumnNumber, m_locationRowNumber, m_pathnameRecordOffset, m_securityClassification, OSSIM_BIG_ENDIAN, and ossimEndian::swap().

104 {
105  ossimEndian anEndian;
106 
107  if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
108  {
109  // Always write out big endian.
111  anEndian.swap(m_locationRowNumber);
112  anEndian.swap(m_locationColumnNumber);
113  anEndian.swap(m_pathnameRecordOffset);
114  }
115 
116  out.write((char*)&m_boundaryRectRecordNumber, 2);
117  out.write((char*)&m_locationRowNumber, 2);
118  out.write((char*)&m_locationColumnNumber, 2);
119  out.write((char*)&m_pathnameRecordOffset, 4);
120  out.write((char*)m_filename, 12);
121  out.write((char*)m_geographicLocation, 6);
122  out.write((char*)&m_securityClassification, 1);
123  out.write((char*)m_fileSecurityCountryCode, 2);
124  out.write((char*)m_fileSecurityReleaseMarking, 2);
125 
126  if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
127  {
128  // Swap back to native.
130  anEndian.swap(m_locationRowNumber);
131  anEndian.swap(m_locationColumnNumber);
132  anEndian.swap(m_pathnameRecordOffset);
133  }
134 }
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 20 of file ossimRpfFrameFileIndexRecord.cpp.

21 {
22  return data.print(out);
23 }
std::ostream & print(std::ostream &out) const

Member Data Documentation

◆ m_boundaryRectRecordNumber

ossim_uint16 ossimRpfFrameFileIndexRecord::m_boundaryRectRecordNumber
private

◆ m_filename

char ossimRpfFrameFileIndexRecord::m_filename[13]
private

This is a 12 byte asci field.

Definition at line 67 of file ossimRpfFrameFileIndexRecord.h.

Referenced by clearFields(), getFilename(), operator=(), ossimRpfFrameFileIndexRecord(), parseStream(), print(), and writeStream().

◆ m_fileSecurityCountryCode

char ossimRpfFrameFileIndexRecord::m_fileSecurityCountryCode[3]
private

is a 2 byte field.

Definition at line 79 of file ossimRpfFrameFileIndexRecord.h.

Referenced by clearFields(), operator=(), ossimRpfFrameFileIndexRecord(), parseStream(), print(), and writeStream().

◆ m_fileSecurityReleaseMarking

char ossimRpfFrameFileIndexRecord::m_fileSecurityReleaseMarking[3]
private

This is a 2 byte field.

Definition at line 84 of file ossimRpfFrameFileIndexRecord.h.

Referenced by clearFields(), operator=(), ossimRpfFrameFileIndexRecord(), parseStream(), print(), and writeStream().

◆ m_geographicLocation

char ossimRpfFrameFileIndexRecord::m_geographicLocation[7]
private

this is a 6 byte asci field.

Definition at line 72 of file ossimRpfFrameFileIndexRecord.h.

Referenced by clearFields(), operator=(), ossimRpfFrameFileIndexRecord(), parseStream(), print(), and writeStream().

◆ m_locationColumnNumber

ossim_uint16 ossimRpfFrameFileIndexRecord::m_locationColumnNumber
private

◆ m_locationRowNumber

ossim_uint16 ossimRpfFrameFileIndexRecord::m_locationRowNumber
private

◆ m_pathnameRecordOffset

ossim_uint32 ossimRpfFrameFileIndexRecord::m_pathnameRecordOffset
private

◆ m_securityClassification

char ossimRpfFrameFileIndexRecord::m_securityClassification
private

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