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

This class is able to read the Text record of the volume directory file. More...

#include <TextRecord.h>

Inheritance diagram for ossimplugins::TextRecord:
ossimplugins::RadarSatRecord

Public Member Functions

 TextRecord ()
 Constructor. More...
 
virtual ~TextRecord ()
 Destructor. More...
 
 TextRecord (const TextRecord &rhs)
 Copy constructor. More...
 
TextRecordoperator= (const TextRecord &rhs)
 Copy operator. More...
 
RadarSatRecordInstanciate ()
 This function is able to create a new instance of the class. More...
 
RadarSatRecordClone ()
 This function is able to create a new instance of the class initialised with the data of the calling instance. More...
 
void Read (std::istream &is)
 Reads the class data from a stream. More...
 
void Write (std::ostream &os)
 Writes the class to a stream. More...
 
std::string get_ascii_flag ()
 ASCII flag. More...
 
std::string get_cont_flag ()
 Continuation flag. More...
 
std::string get_product_type ()
 Product type specifier. More...
 
std::string get_product_create ()
 Product creation info. More...
 
std::string get_phyvol_id ()
 Volume Description Record. More...
 
std::string get_scene_id ()
 Scene identifier. More...
 
std::string get_scene_loc ()
 Scene location. More...
 
std::string get_copyright_info ()
 Copyright. More...
 
- Public Member Functions inherited from ossimplugins::RadarSatRecord
 RadarSatRecord (std::string mnemonic)
 Constructor. More...
 
virtual ~RadarSatRecord ()
 Destructor. More...
 
 RadarSatRecord (const RadarSatRecord &rhs)
 Copy constructor. More...
 
std::string get_mnemonic ()
 

Protected Attributes

std::string _ascii_flag
 ASCII flag. More...
 
std::string _cont_flag
 Continuation flag. More...
 
std::string _product_type
 Product type specifier. More...
 
std::string _product_create
 Product creation info. More...
 
std::string _phyvol_id
 Volume Description Record. More...
 
std::string _scene_id
 Scene identifier. More...
 
std::string _scene_loc
 Scene location. More...
 
std::string _copyright_info
 Copyright. More...
 
- Protected Attributes inherited from ossimplugins::RadarSatRecord
std::string _mnemonic
 

Friends

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

Detailed Description

This class is able to read the Text record of the volume directory file.

Definition at line 26 of file TextRecord.h.

Constructor & Destructor Documentation

◆ TextRecord() [1/2]

ossimplugins::TextRecord::TextRecord ( )

Constructor.

Definition at line 16 of file TextRecord.cpp.

Referenced by Clone(), and Instanciate().

16  : RadarSatRecord("text_rec")
17 {
18 }
RadarSatRecord(std::string mnemonic)
Constructor.

◆ ~TextRecord()

ossimplugins::TextRecord::~TextRecord ( )
virtual

Destructor.

Definition at line 20 of file TextRecord.cpp.

21 {
22 }

◆ TextRecord() [2/2]

ossimplugins::TextRecord::TextRecord ( const TextRecord rhs)

Copy constructor.

Definition at line 79 of file TextRecord.cpp.

79  :
80  RadarSatRecord(rhs),
81  _ascii_flag(rhs._ascii_flag),
82  _cont_flag(rhs._cont_flag),
83  _product_type(rhs._product_type),
84  _product_create(rhs._product_create),
85  _phyvol_id(rhs._phyvol_id),
86  _scene_id(rhs._scene_id),
87  _scene_loc(rhs._scene_loc),
88  _copyright_info(rhs._copyright_info)
89 {
90 }
std::string _copyright_info
Copyright.
Definition: TextRecord.h:194
std::string _cont_flag
Continuation flag.
Definition: TextRecord.h:164
std::string _product_create
Product creation info.
Definition: TextRecord.h:174
RadarSatRecord(std::string mnemonic)
Constructor.
std::string _product_type
Product type specifier.
Definition: TextRecord.h:169
std::string _scene_id
Scene identifier.
Definition: TextRecord.h:184
std::string _phyvol_id
Volume Description Record.
Definition: TextRecord.h:179
std::string _scene_loc
Scene location.
Definition: TextRecord.h:189
std::string _ascii_flag
ASCII flag.
Definition: TextRecord.h:152

Member Function Documentation

◆ Clone()

RadarSatRecord* ossimplugins::TextRecord::Clone ( )
inlinevirtual

This function is able to create a new instance of the class initialised with the data of the calling instance.

Implements ossimplugins::RadarSatRecord.

Definition at line 69 of file TextRecord.h.

References TextRecord().

70  {
71  return new TextRecord(*this);
72  };
TextRecord()
Constructor.
Definition: TextRecord.cpp:16

◆ get_ascii_flag()

std::string ossimplugins::TextRecord::get_ascii_flag ( )
inline

ASCII flag.

Definition at line 93 of file TextRecord.h.

References _ascii_flag.

94  {
95  return _ascii_flag;
96  };
std::string _ascii_flag
ASCII flag.
Definition: TextRecord.h:152

◆ get_cont_flag()

std::string ossimplugins::TextRecord::get_cont_flag ( )
inline

Continuation flag.

Definition at line 101 of file TextRecord.h.

References _cont_flag.

102  {
103  return _cont_flag;
104  };
std::string _cont_flag
Continuation flag.
Definition: TextRecord.h:164

◆ get_copyright_info()

std::string ossimplugins::TextRecord::get_copyright_info ( )
inline

Copyright.

Definition at line 149 of file TextRecord.h.

References _copyright_info.

150  {
151  return _copyright_info;
152  };
std::string _copyright_info
Copyright.
Definition: TextRecord.h:194

◆ get_phyvol_id()

std::string ossimplugins::TextRecord::get_phyvol_id ( )
inline

Volume Description Record.

Definition at line 125 of file TextRecord.h.

References _phyvol_id.

126  {
127  return _phyvol_id;
128  };
std::string _phyvol_id
Volume Description Record.
Definition: TextRecord.h:179

◆ get_product_create()

std::string ossimplugins::TextRecord::get_product_create ( )
inline

Product creation info.

Definition at line 117 of file TextRecord.h.

References _product_create.

118  {
119  return _product_create;
120  };
std::string _product_create
Product creation info.
Definition: TextRecord.h:174

◆ get_product_type()

std::string ossimplugins::TextRecord::get_product_type ( )
inline

Product type specifier.

Definition at line 109 of file TextRecord.h.

References _product_type.

110  {
111  return _product_type;
112  };
std::string _product_type
Product type specifier.
Definition: TextRecord.h:169

◆ get_scene_id()

std::string ossimplugins::TextRecord::get_scene_id ( )
inline

Scene identifier.

Definition at line 133 of file TextRecord.h.

References _scene_id.

134  {
135  return _scene_id;
136  };
std::string _scene_id
Scene identifier.
Definition: TextRecord.h:184

◆ get_scene_loc()

std::string ossimplugins::TextRecord::get_scene_loc ( )
inline

Scene location.

Definition at line 141 of file TextRecord.h.

References _scene_loc.

142  {
143  return _scene_loc;
144  };
std::string _scene_loc
Scene location.
Definition: TextRecord.h:189

◆ Instanciate()

RadarSatRecord* ossimplugins::TextRecord::Instanciate ( )
inlinevirtual

This function is able to create a new instance of the class.

Implements ossimplugins::RadarSatRecord.

Definition at line 61 of file TextRecord.h.

References TextRecord().

62  {
63  return new TextRecord();
64  };
TextRecord()
Constructor.
Definition: TextRecord.cpp:16

◆ operator=()

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

Copy operator.

Definition at line 92 of file TextRecord.cpp.

References _ascii_flag, _cont_flag, _copyright_info, _phyvol_id, _product_create, _product_type, _scene_id, and _scene_loc.

93 {
94  _ascii_flag = rhs._ascii_flag;
95  _cont_flag = rhs._cont_flag;
96  _product_type = rhs._product_type;
97  _product_create = rhs._product_create;
98  _phyvol_id = rhs._phyvol_id;
99  _scene_id = rhs._scene_id;
100  _scene_loc = rhs._scene_loc;
101  _copyright_info = rhs._copyright_info;
102  return *this;
103 }
std::string _copyright_info
Copyright.
Definition: TextRecord.h:194
std::string _cont_flag
Continuation flag.
Definition: TextRecord.h:164
std::string _product_create
Product creation info.
Definition: TextRecord.h:174
std::string _product_type
Product type specifier.
Definition: TextRecord.h:169
std::string _scene_id
Scene identifier.
Definition: TextRecord.h:184
std::string _phyvol_id
Volume Description Record.
Definition: TextRecord.h:179
std::string _scene_loc
Scene location.
Definition: TextRecord.h:189
std::string _ascii_flag
ASCII flag.
Definition: TextRecord.h:152

◆ Read()

void ossimplugins::TextRecord::Read ( std::istream &  is)
inlinevirtual

Reads the class data from a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 77 of file TextRecord.h.

78  {
79  is>>*this;
80  };

◆ Write()

void ossimplugins::TextRecord::Write ( std::ostream &  os)
inlinevirtual

Writes the class to a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 85 of file TextRecord.h.

86  {
87  os<<*this;
88  };

Friends And Related Function Documentation

◆ operator<<

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

This function writes the TextRecord in a stream.

Definition at line 24 of file TextRecord.cpp.

25 {
26  os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl;
27  os<<"cont_flag:"<<data._cont_flag.c_str()<<std::endl;
28  os<<"product_type:"<<data._product_type.c_str()<<std::endl;
29  os<<"product_create:"<<data._product_create.c_str()<<std::endl;
30  os<<"phyvol_id:"<<data._phyvol_id.c_str()<<std::endl;
31  os<<"scene_id:"<<data._scene_id.c_str()<<std::endl;
32  os<<"scene_loc:"<<data._scene_loc.c_str()<<std::endl;
33  os<<"copyright_info:"<<data._copyright_info.c_str()<<std::endl;
34  return os;
35 }

◆ operator>>

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

This function reads a TextRecord from a stream.

Definition at line 37 of file TextRecord.cpp.

38 {
39  char buf[349]; // 361-12
40  buf[348] = '\0';
41 
42  is.read(buf, 2);
43  buf[2] = '\0';
44  data._ascii_flag = buf;
45 
46  is.read(buf, 2);
47  buf[2] = '\0';
48  data._cont_flag = buf;
49 
50  is.read(buf, 40);
51  buf[40] = '\0';
52  data._product_type = buf;
53 
54  is.read(buf, 60);
55  buf[60] = '\0';
56  data._product_create = buf;
57 
58  is.read(buf, 40);
59  buf[40] = '\0';
60  data._phyvol_id = buf;
61 
62  is.read(buf, 40);
63  buf[40] = '\0';
64  data._scene_id = buf;
65 
66  is.read(buf, 40);
67  buf[40] = '\0';
68  data._scene_loc = buf;
69 
70  is.read(buf, 20);
71  buf[20] = '\0';
72  data._copyright_info = buf;
73 
74  is.read(buf, 104); // spare1
75 
76  return is;
77 }

Member Data Documentation

◆ _ascii_flag

std::string ossimplugins::TextRecord::_ascii_flag
protected

ASCII flag.

Definition at line 152 of file TextRecord.h.

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

◆ _cont_flag

std::string ossimplugins::TextRecord::_cont_flag
protected

Continuation flag.

Definition at line 164 of file TextRecord.h.

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

◆ _copyright_info

std::string ossimplugins::TextRecord::_copyright_info
protected

Copyright.

Definition at line 194 of file TextRecord.h.

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

◆ _phyvol_id

std::string ossimplugins::TextRecord::_phyvol_id
protected

Volume Description Record.

Definition at line 179 of file TextRecord.h.

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

◆ _product_create

std::string ossimplugins::TextRecord::_product_create
protected

Product creation info.

Definition at line 174 of file TextRecord.h.

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

◆ _product_type

std::string ossimplugins::TextRecord::_product_type
protected

Product type specifier.

Definition at line 169 of file TextRecord.h.

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

◆ _scene_id

std::string ossimplugins::TextRecord::_scene_id
protected

Scene identifier.

Definition at line 184 of file TextRecord.h.

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

◆ _scene_loc

std::string ossimplugins::TextRecord::_scene_loc
protected

Scene location.

Definition at line 189 of file TextRecord.h.

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


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