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

This class is the base class of all the Envisat ASAR record classes. More...

#include <EnvisatAsarRecord.h>

Inheritance diagram for ossimplugins::EnvisatAsarRecord:
ossimplugins::AntennaElevationPatterns ossimplugins::ChirpParameters ossimplugins::DopplerCentroidParameters ossimplugins::dsd ossimplugins::GeolocationGrid ossimplugins::MainProcessingParameters ossimplugins::mph ossimplugins::sph ossimplugins::SQ_ADSR ossimplugins::SRGRConversionParameters

Public Member Functions

 EnvisatAsarRecord (std::string mnemonic)
 Constructor. More...
 
virtual ~EnvisatAsarRecord ()
 Destructor. More...
 
 EnvisatAsarRecord (const EnvisatAsarRecord &rhs)
 Copy constructor. More...
 
virtual EnvisatAsarRecordInstanciate ()=0
 This function is able to create a new instance of the class. More...
 
virtual EnvisatAsarRecordClone ()=0
 This function is able to create a new instance of the class initialised with the data of the calling instance. More...
 
virtual void Read (std::istream &is)=0
 Reads the class data from a stream. More...
 
virtual void Write (std::ostream &os)=0
 Writes the class to a stream. More...
 
std::string get_mnemonic ()
 Returns the mnemonic of the record. More...
 

Protected Member Functions

template<typename T >
void SwitchEndian (T &value)
 This function switches the LSB value and the MSB value of the parameter. More...
 

Protected Attributes

std::string _mnemonic
 

Detailed Description

This class is the base class of all the Envisat ASAR record classes.

Definition at line 30 of file EnvisatAsarRecord.h.

Constructor & Destructor Documentation

◆ EnvisatAsarRecord() [1/2]

ossimplugins::EnvisatAsarRecord::EnvisatAsarRecord ( std::string  mnemonic)

Constructor.

Parameters
mnemonicName of the record

Definition at line 17 of file EnvisatAsarRecord.cpp.

17  :
18  _mnemonic(mnemonic)
19 {
20 }

◆ ~EnvisatAsarRecord()

ossimplugins::EnvisatAsarRecord::~EnvisatAsarRecord ( )
virtual

Destructor.

Definition at line 22 of file EnvisatAsarRecord.cpp.

23 {
24 }

◆ EnvisatAsarRecord() [2/2]

ossimplugins::EnvisatAsarRecord::EnvisatAsarRecord ( const EnvisatAsarRecord rhs)

Copy constructor.

Definition at line 26 of file EnvisatAsarRecord.cpp.

26  :
27  _mnemonic(rhs._mnemonic)
28 {
29 }

Member Function Documentation

◆ Clone()

virtual EnvisatAsarRecord* ossimplugins::EnvisatAsarRecord::Clone ( )
pure virtual

◆ get_mnemonic()

std::string ossimplugins::EnvisatAsarRecord::get_mnemonic ( )
inline

Returns the mnemonic of the record.

Definition at line 71 of file EnvisatAsarRecord.h.

References _mnemonic.

Referenced by ossimplugins::EnvisatAsarData::get_num_ds().

72  {
73  return _mnemonic;
74  };

◆ Instanciate()

virtual EnvisatAsarRecord* ossimplugins::EnvisatAsarRecord::Instanciate ( )
pure virtual

◆ Read()

virtual void ossimplugins::EnvisatAsarRecord::Read ( std::istream &  is)
pure virtual

◆ SwitchEndian()

template<typename T >
void ossimplugins::EnvisatAsarRecord::SwitchEndian ( T &  value)
inlineprotected

This function switches the LSB value and the MSB value of the parameter.

Definition at line 83 of file EnvisatAsarRecord.h.

References ossim::byteOrder(), and OSSIM_LITTLE_ENDIAN.

Referenced by ossimplugins::operator>>().

83  {
84 
85  char *buffer;
86  char *res;
87  int nb_octets = sizeof(T);
88 
90  buffer = (char* )malloc(nb_octets);
91  res = (char* )malloc(nb_octets);
92 
93  memcpy(buffer,&value,nb_octets);
94 
95  for (int i=0; i<nb_octets/2; i++) {
96  res[i] = buffer[nb_octets-1-i];
97  res[nb_octets-1-i] = buffer[i];
98  }
99  memcpy(&value,res,nb_octets);
100 
101  free(buffer);
102  free(res);
103  }
104  }
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54

◆ Write()

virtual void ossimplugins::EnvisatAsarRecord::Write ( std::ostream &  os)
pure virtual

Member Data Documentation

◆ _mnemonic

std::string ossimplugins::EnvisatAsarRecord::_mnemonic
protected

Definition at line 107 of file EnvisatAsarRecord.h.

Referenced by get_mnemonic().


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