OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
TextRecord.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #include "TextRecord.h"
13 
14 namespace ossimplugins
15 {
17 {
18 }
19 
21 {
22 }
23 
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 }
36 
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 }
78 
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 }
91 
93 {
95  _cont_flag = rhs._cont_flag;
98  _phyvol_id = rhs._phyvol_id;
99  _scene_id = rhs._scene_id;
100  _scene_loc = rhs._scene_loc;
102  return *this;
103 }
104 }
std::string _copyright_info
Copyright.
Definition: TextRecord.h:194
std::string _cont_flag
Continuation flag.
Definition: TextRecord.h:164
This class is able to read the Text record of the volume directory file.
Definition: TextRecord.h:26
std::string _product_create
Product creation info.
Definition: TextRecord.h:174
This class is the base class of all the record classes.
std::string _product_type
Product type specifier.
Definition: TextRecord.h:169
std::string _scene_id
Scene identifier.
Definition: TextRecord.h:184
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
TextRecord()
Constructor.
Definition: TextRecord.cpp:16
std::string _phyvol_id
Volume Description Record.
Definition: TextRecord.h:179
virtual ~TextRecord()
Destructor.
Definition: TextRecord.cpp:20
TextRecord & operator=(const TextRecord &rhs)
Copy operator.
Definition: TextRecord.cpp:92
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
std::string _scene_loc
Scene location.
Definition: TextRecord.h:189
std::string _ascii_flag
ASCII flag.
Definition: TextRecord.h:152