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

#include <ossimRpfBoundaryRectTable.h>

Inheritance diagram for ossimRpfBoundaryRectTable:
ossimReferenced

Public Member Functions

 ossimRpfBoundaryRectTable (ossim_uint32 numberOfEntries=0)
 default constructor More...
 
 ossimRpfBoundaryRectTable (const ossimRpfBoundaryRectTable &obj)
 copy constructor More...
 
const ossimRpfBoundaryRectTableoperator= (const ossimRpfBoundaryRectTable &rhs)
 assignment operator More...
 
virtual ~ossimRpfBoundaryRectTable ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void writeStream (std::ostream &out)
 Write method. More...
 
void setNumberOfEntries (ossim_uint32 numberOfEntries)
 
ossim_uint32 getNumberOfEntries () const
 
bool getEntry (ossim_uint32 entry, ossimRpfBoundaryRectRecord &record) const
 Gets record for entry. More...
 
std::ostream & print (std::ostream &out) const
 
- 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< ossimRpfBoundaryRectRecordm_table
 

Friends

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

Additional Inherited Members

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

Detailed Description

Definition at line 22 of file ossimRpfBoundaryRectTable.h.

Constructor & Destructor Documentation

◆ ossimRpfBoundaryRectTable() [1/2]

ossimRpfBoundaryRectTable::ossimRpfBoundaryRectTable ( ossim_uint32  numberOfEntries = 0)

default constructor

Definition at line 25 of file ossimRpfBoundaryRectTable.cpp.

26  :
27  m_table(numberOfEntries)
28 {
29 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ ossimRpfBoundaryRectTable() [2/2]

ossimRpfBoundaryRectTable::ossimRpfBoundaryRectTable ( const ossimRpfBoundaryRectTable obj)

copy constructor

Definition at line 31 of file ossimRpfBoundaryRectTable.cpp.

32  :
33  m_table(obj.m_table)
34 {
35 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ ~ossimRpfBoundaryRectTable()

ossimRpfBoundaryRectTable::~ossimRpfBoundaryRectTable ( )
virtual

Definition at line 47 of file ossimRpfBoundaryRectTable.cpp.

48 {}

Member Function Documentation

◆ getEntry()

bool ossimRpfBoundaryRectTable::getEntry ( ossim_uint32  entry,
ossimRpfBoundaryRectRecord record 
) const

Gets record for entry.

Parameters
entryZero base entry to get.
recordRecord to initialize.
Returns
true on success, false if entry doesn't exist.

Definition at line 91 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

93 {
94  bool result = true;
95  if ( entry < m_table.size() )
96  {
97  record = m_table[entry];
98  }
99  else
100  {
101  result = false;
102  }
103  return result;
104 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ getNumberOfEntries()

ossim_uint32 ossimRpfBoundaryRectTable::getNumberOfEntries ( ) const

Definition at line 86 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

87 {
88  return static_cast<ossim_uint32>(m_table.size());
89 }
std::vector< ossimRpfBoundaryRectRecord > m_table
unsigned int ossim_uint32

◆ operator=()

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

assignment operator

Definition at line 37 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

39 {
40  if ( this != &rhs )
41  {
42  m_table = rhs.m_table;
43  }
44  return *this;
45 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ parseStream()

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

Definition at line 50 of file ossimRpfBoundaryRectTable.cpp.

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

Referenced by ossimRpfHeader::getNewBoundaryRectTable().

52 {
53  if(in)
54  {
55  std::vector<ossimRpfBoundaryRectRecord>::iterator entry = m_table.begin();
56 
57  while(entry != m_table.end())
58  {
59  (*entry).parseStream(in, byteOrder);
60  ++entry;
61  }
62  }
63  else
64  {
66  }
67 
69 }
static const ossimErrorCode OSSIM_OK
std::vector< ossimRpfBoundaryRectRecord > m_table
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR

◆ print()

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

Definition at line 106 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

Referenced by operator<<().

107 {
108  std::copy(m_table.begin(), m_table.end(),
109  std::ostream_iterator<ossimRpfBoundaryRectRecord>(out, "\n"));
110  return out;
111 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ setNumberOfEntries()

void ossimRpfBoundaryRectTable::setNumberOfEntries ( ossim_uint32  numberOfEntries)

Definition at line 81 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

Referenced by ossimRpfHeader::getNewBoundaryRectTable().

82 {
83  m_table.resize(numberOfEntries);
84 }
std::vector< ossimRpfBoundaryRectRecord > m_table

◆ writeStream()

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

Write method.

Parameters
outStream to write to.

Definition at line 71 of file ossimRpfBoundaryRectTable.cpp.

References m_table.

72 {
73  std::vector<ossimRpfBoundaryRectRecord>::iterator entry = m_table.begin();
74  while ( entry != m_table.end() )
75  {
76  (*entry).writeStream(out);
77  ++entry;
78  }
79 }
std::vector< ossimRpfBoundaryRectRecord > m_table

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 20 of file ossimRpfBoundaryRectTable.cpp.

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

Member Data Documentation

◆ m_table

std::vector<ossimRpfBoundaryRectRecord> ossimRpfBoundaryRectTable::m_table
private

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