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

This class is able to read a SRGR coefficients set record. More...

#include <SRGRCoefficientSetRecord.h>

Public Member Functions

 SRGRCoefficientSetRecord ()
 Constructor. More...
 
 ~SRGRCoefficientSetRecord ()
 Destructor. More...
 
 SRGRCoefficientSetRecord (const SRGRCoefficientSetRecord &rhs)
 Copy constructor. More...
 
SRGRCoefficientSetRecordoperator= (const SRGRCoefficientSetRecord &rhs)
 Copy operator. More...
 
std::string get_srgr_update ()
 SRGR update date/time. More...
 
double * get_srgr_coef ()
 
SRGR coefficients More...
 

Protected Attributes

std::string _srgr_update
 SRGR update date/time. More...
 
double _srgr_coef [6]
 
SRGR coefficients More...
 

Friends

std::ostream & operator<< (std::ostream &os, const SRGRCoefficientSetRecord &data)
 This function writes the SRGRCoefficientSetRecord in a stream. More...
 
std::istream & operator>> (std::istream &is, SRGRCoefficientSetRecord &data)
 This function reads a SRGRCoefficientSetRecord from a stream. More...
 

Detailed Description

This class is able to read a SRGR coefficients set record.

Definition at line 24 of file SRGRCoefficientSetRecord.h.

Constructor & Destructor Documentation

◆ SRGRCoefficientSetRecord() [1/2]

ossimplugins::SRGRCoefficientSetRecord::SRGRCoefficientSetRecord ( )

Constructor.

Definition at line 16 of file SRGRCoefficientSetRecord.cpp.

17 {
18 }

◆ ~SRGRCoefficientSetRecord()

ossimplugins::SRGRCoefficientSetRecord::~SRGRCoefficientSetRecord ( )

Destructor.

Definition at line 20 of file SRGRCoefficientSetRecord.cpp.

21 {
22 }

◆ SRGRCoefficientSetRecord() [2/2]

ossimplugins::SRGRCoefficientSetRecord::SRGRCoefficientSetRecord ( const SRGRCoefficientSetRecord rhs)

Copy constructor.

Definition at line 53 of file SRGRCoefficientSetRecord.cpp.

References _srgr_coef.

53  :
54  _srgr_update(rhs._srgr_update)
55 {
56  for (int i=0;i<6;i++)
57  {
58  _srgr_coef[i] = rhs._srgr_coef[i];
59  }
60 }
std::string _srgr_update
SRGR update date/time.

Member Function Documentation

◆ get_srgr_coef()

double* ossimplugins::SRGRCoefficientSetRecord::get_srgr_coef ( )
inline


SRGR coefficients

Definition at line 68 of file SRGRCoefficientSetRecord.h.

References _srgr_coef.

69  {
70  return _srgr_coef;
71  }

◆ get_srgr_update()

std::string ossimplugins::SRGRCoefficientSetRecord::get_srgr_update ( )
inline

SRGR update date/time.

Definition at line 60 of file SRGRCoefficientSetRecord.h.

References _srgr_update.

61  {
62  return _srgr_update;
63  }
std::string _srgr_update
SRGR update date/time.

◆ operator=()

SRGRCoefficientSetRecord & ossimplugins::SRGRCoefficientSetRecord::operator= ( const SRGRCoefficientSetRecord rhs)

Copy operator.

Definition at line 62 of file SRGRCoefficientSetRecord.cpp.

References _srgr_coef, and _srgr_update.

63 {
64  _srgr_update = rhs._srgr_update;
65  for (int i=0;i<6;i++)
66  {
67  _srgr_coef[i] = rhs._srgr_coef[i];
68  }
69  return *this;
70 }
std::string _srgr_update
SRGR update date/time.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const SRGRCoefficientSetRecord data 
)
friend

This function writes the SRGRCoefficientSetRecord in a stream.

Definition at line 24 of file SRGRCoefficientSetRecord.cpp.

25 {
26  os<<"srgr_update:"<<data._srgr_update.c_str()<<std::endl;
27  for (int i=0;i<6;i++)
28  {
29  os<<"srgr_coef["<<i<<"]:"<<data._srgr_coef[i]<<std::endl;
30  }
31 
32  return os;
33 }

◆ operator>>

std::istream& operator>> ( std::istream &  is,
SRGRCoefficientSetRecord data 
)
friend

This function reads a SRGRCoefficientSetRecord from a stream.

Definition at line 35 of file SRGRCoefficientSetRecord.cpp.

36 {
37  char buf[22];
38  buf[21] = '\0';
39 
40  is.read(buf,21);
41  buf[21] = '\0';
42  data._srgr_update = buf;
43 
44  for (int i=0;i<6;i++)
45  {
46  is.read(buf,16);
47  buf[16] = '\0';
48  data._srgr_coef[i] = atof(buf);
49  }
50  return is;
51 }

Member Data Documentation

◆ _srgr_coef

double ossimplugins::SRGRCoefficientSetRecord::_srgr_coef[6]
protected

◆ _srgr_update

std::string ossimplugins::SRGRCoefficientSetRecord::_srgr_update
protected

SRGR update date/time.

Definition at line 77 of file SRGRCoefficientSetRecord.h.

Referenced by get_srgr_update(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().


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