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

#include <ossimRpfFrameFileIndexSubsection.h>

Inheritance diagram for ossimRpfFrameFileIndexSubsection:
ossimReferenced

Public Member Functions

 ossimRpfFrameFileIndexSubsection ()
 default constructor More...
 
 ossimRpfFrameFileIndexSubsection (const ossimRpfFrameFileIndexSubsection &obj)
 copy constructor More...
 
const ossimRpfFrameFileIndexSubsectionoperator= (const ossimRpfFrameFileIndexSubsection &rhs)
 assignment operator More...
 
virtual ~ossimRpfFrameFileIndexSubsection ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void writeStream (std::ostream &out)
 Write method. More...
 
void clearFields ()
 
std::ostream & print (std::ostream &out) const
 
void setNumberOfFileIndexRecords (ossim_uint32 numberOfIndexRecords)
 
void setNumberOfPathnames (ossim_uint32 numberOfPathnames)
 
const std::vector< ossimRpfFrameFileIndexRecord > & getIndexTable () const
 
const std::vector< ossimRpfPathnameRecord > & getPathnameTable () const
 
bool getFrameFileIndexRecordFromFile (const ossimFilename &file, ossimRpfFrameFileIndexRecord &record) const
 Gets the record matching file. More...
 
- 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

std::vector< ossimRpfFrameFileIndexRecordm_indexTable
 
std::vector< ossimRpfPathnameRecordm_pathnameTable
 

Friends

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

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file ossimRpfFrameFileIndexSubsection.h.

Constructor & Destructor Documentation

◆ ossimRpfFrameFileIndexSubsection() [1/2]

ossimRpfFrameFileIndexSubsection::ossimRpfFrameFileIndexSubsection ( )

default constructor

Definition at line 26 of file ossimRpfFrameFileIndexSubsection.cpp.

27  :
28  m_indexTable(0),
30 {
31 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ ossimRpfFrameFileIndexSubsection() [2/2]

ossimRpfFrameFileIndexSubsection::ossimRpfFrameFileIndexSubsection ( const ossimRpfFrameFileIndexSubsection obj)

copy constructor

Definition at line 33 of file ossimRpfFrameFileIndexSubsection.cpp.

35  :
38 {
39 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ ~ossimRpfFrameFileIndexSubsection()

ossimRpfFrameFileIndexSubsection::~ossimRpfFrameFileIndexSubsection ( )
virtual

Definition at line 52 of file ossimRpfFrameFileIndexSubsection.cpp.

53 {
54 }

Member Function Documentation

◆ clearFields()

void ossimRpfFrameFileIndexSubsection::clearFields ( )

Definition at line 102 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable, and m_pathnameTable.

103 {
104  m_indexTable.clear();
105  m_pathnameTable.clear();
106 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ getFrameFileIndexRecordFromFile()

bool ossimRpfFrameFileIndexSubsection::getFrameFileIndexRecordFromFile ( const ossimFilename file,
ossimRpfFrameFileIndexRecord record 
) const

Gets the record matching file.

Parameters
fileIn the form of: 003H1U1B.I21
recordThe record to initialize.
Returns
true if matching record found, false if not.

Definition at line 142 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable.

Referenced by ossimRpfToc::getCorespondingEntry().

144 {
145  bool result = false;
146  std::vector<ossimRpfFrameFileIndexRecord>::const_iterator i = m_indexTable.begin();
147  while ( i != m_indexTable.end() )
148  {
149  if ( (*i).getFilename() == file )
150  {
151  record = (*i);
152  result = true;
153  break;
154  }
155  ++i;
156  }
157  return result;
158 }
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ getIndexTable()

const std::vector< ossimRpfFrameFileIndexRecord > & ossimRpfFrameFileIndexSubsection::getIndexTable ( ) const

Definition at line 131 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable.

132 {
133  return m_indexTable;
134 }
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ getPathnameTable()

const std::vector< ossimRpfPathnameRecord > & ossimRpfFrameFileIndexSubsection::getPathnameTable ( ) const

Definition at line 137 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_pathnameTable.

138 {
139  return m_pathnameTable;
140 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable

◆ operator=()

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

assignment operator

Definition at line 41 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable, and m_pathnameTable.

43 {
44  if ( this != &rhs )
45  {
48  }
49  return *this;
50 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ parseStream()

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

Definition at line 56 of file ossimRpfFrameFileIndexSubsection.cpp.

References ossim::byteOrder(), m_indexTable, m_pathnameTable, ossimErrorCodes::OSSIM_ERROR, and ossimErrorCodes::OSSIM_OK.

Referenced by ossimRpfHeader::getNewFileIndexSubsection().

58 {
60 
61  if(in && (m_indexTable.size()>0))
62  {
63  ossim_uint32 index;
64  for(index = 0;
65  (index < m_indexTable.size()) && (result == ossimErrorCodes::OSSIM_OK);
66  ++index)
67  {
68  result = m_indexTable[index].parseStream(in, byteOrder);
69  }
70  for(index = 0;
71  (index < m_pathnameTable.size()) && (result ==ossimErrorCodes::OSSIM_OK);
72  ++index)
73  {
74  result = m_pathnameTable[index].parseStream(in, byteOrder);
75  }
76  }
77  else
78  {
80  }
81 
82  return result;
83 }
ossim_int32 ossimErrorCode
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable
unsigned int ossim_uint32

◆ print()

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

Definition at line 108 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable, and m_pathnameTable.

Referenced by operator<<().

109 {
110  copy(m_indexTable.begin(),
111  m_indexTable.end(),
112  std::ostream_iterator<ossimRpfFrameFileIndexRecord>(out, "\n"));
113  copy(m_pathnameTable.begin(),
114  m_pathnameTable.end(),
115  std::ostream_iterator<ossimRpfPathnameRecord>(out, "\n"));
116  return out;
117 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ setNumberOfFileIndexRecords()

void ossimRpfFrameFileIndexSubsection::setNumberOfFileIndexRecords ( ossim_uint32  numberOfIndexRecords)

Definition at line 119 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable.

Referenced by ossimRpfHeader::getNewFileIndexSubsection().

121 {
122  m_indexTable.resize(numberOfIndexRecords);
123 }
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

◆ setNumberOfPathnames()

void ossimRpfFrameFileIndexSubsection::setNumberOfPathnames ( ossim_uint32  numberOfPathnames)

Definition at line 125 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_pathnameTable.

Referenced by ossimRpfHeader::getNewFileIndexSubsection().

126 {
127  m_pathnameTable.resize(numberOfPathnames);
128 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable

◆ writeStream()

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

Write method.

Parameters
outStream to write to.

Definition at line 85 of file ossimRpfFrameFileIndexSubsection.cpp.

References m_indexTable, and m_pathnameTable.

86 {
87  std::vector<ossimRpfFrameFileIndexRecord>::iterator indexIter = m_indexTable.begin();
88  while ( indexIter != m_indexTable.end() )
89  {
90  (*indexIter).writeStream(out);
91  ++indexIter;
92  }
93 
94  std::vector<ossimRpfPathnameRecord>::iterator pathIter = m_pathnameTable.begin();
95  while ( pathIter != m_pathnameTable.end() )
96  {
97  (*pathIter).writeStream(out);
98  ++pathIter;
99  }
100 }
std::vector< ossimRpfPathnameRecord > m_pathnameTable
std::vector< ossimRpfFrameFileIndexRecord > m_indexTable

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 21 of file ossimRpfFrameFileIndexSubsection.cpp.

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

Member Data Documentation

◆ m_indexTable

std::vector<ossimRpfFrameFileIndexRecord> ossimRpfFrameFileIndexSubsection::m_indexTable
private

◆ m_pathnameTable

std::vector<ossimRpfPathnameRecord> ossimRpfFrameFileIndexSubsection::m_pathnameTable
private

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