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

This class is able to read the SAR leader file descriptor record of the leader file. More...

#include <FilePointerRecord.h>

Inheritance diagram for ossimplugins::FilePointerRecord:
ossimplugins::RadarSatRecord

Public Member Functions

 FilePointerRecord ()
 Constructor. More...
 
virtual ~FilePointerRecord ()
 Destructor. More...
 
 FilePointerRecord (const FilePointerRecord &rhs)
 Copy constructor. More...
 
FilePointerRecordoperator= (const FilePointerRecord &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...
 
int get_file_num ()
 Referenced file number. More...
 
std::string get_file_name ()
 Referenced file name. More...
 
std::string get_file_class ()
 Referenced file class. More...
 
std::string get_file_code ()
 Referenced file class code. More...
 
std::string get_data_type ()
 Referenced file data type. More...
 
std::string get_data_code ()
 Referenced file data type code. More...
 
int get_nrec ()
 Referenced file record count. More...
 
int get_first_len ()
 First record length, bytes. More...
 
int get_max_len ()
 Maximum record length, bytes. More...
 
std::string get_len_type ()
 Record length type. More...
 
std::string get_len_code ()
 Record length type code. More...
 
int get_first_phyvol ()
 First physical volume. More...
 
int get_last_phyvol ()
 Last physical volume. More...
 
int get_first_rec ()
 First physical volume record. More...
 
int get_last_rec ()
 Last physical volume record. 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...
 
int _file_num
 Referenced file number. More...
 
std::string _file_name
 Referenced file name. More...
 
std::string _file_class
 Referenced file class. More...
 
std::string _file_code
 Referenced file class code. More...
 
std::string _data_type
 Referenced file data type. More...
 
std::string _data_code
 Referenced file data type code. More...
 
int _nrec
 Referenced file record count. More...
 
int _first_len
 First record length, bytes. More...
 
int _max_len
 Maximum record length, bytes. More...
 
std::string _len_type
 Record length type. More...
 
std::string _len_code
 Record length type code. More...
 
int _first_phyvol
 First physical volume. More...
 
int _last_phyvol
 Last physical volume. More...
 
int _first_rec
 First physical volume record. More...
 
int _last_rec
 Last physical volume record. More...
 
- Protected Attributes inherited from ossimplugins::RadarSatRecord
std::string _mnemonic
 

Friends

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

Detailed Description

This class is able to read the SAR leader file descriptor record of the leader file.

Definition at line 26 of file FilePointerRecord.h.

Constructor & Destructor Documentation

◆ FilePointerRecord() [1/2]

ossimplugins::FilePointerRecord::FilePointerRecord ( )

Constructor.

Definition at line 16 of file FilePointerRecord.cpp.

Referenced by Clone(), and Instanciate().

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

◆ ~FilePointerRecord()

ossimplugins::FilePointerRecord::~FilePointerRecord ( )
virtual

Destructor.

Definition at line 20 of file FilePointerRecord.cpp.

21 {
22 }

◆ FilePointerRecord() [2/2]

ossimplugins::FilePointerRecord::FilePointerRecord ( const FilePointerRecord rhs)

Copy constructor.

Definition at line 122 of file FilePointerRecord.cpp.

122  :
123  RadarSatRecord(rhs),
124  _ascii_flag(rhs._ascii_flag),
125  _file_num(rhs._file_num),
126  _file_name(rhs._file_name),
127  _file_class(rhs._file_class),
128  _file_code(rhs._file_code),
129  _data_type(rhs._data_type),
130  _data_code(rhs._data_code),
131  _nrec(rhs._nrec),
132  _first_len(rhs._first_len),
133  _max_len(rhs._max_len),
134  _len_type(rhs._len_type),
135  _len_code(rhs._len_code),
136  _first_phyvol(rhs._first_phyvol),
137  _last_phyvol(rhs._last_phyvol),
138  _first_rec(rhs._first_rec),
139  _last_rec(rhs._last_rec)
140 {
141 }
std::string _len_type
Record length type.
std::string _data_code
Referenced file data type code.
std::string _file_name
Referenced file name.
int _last_rec
Last physical volume record.
std::string _len_code
Record length type code.
int _file_num
Referenced file number.
RadarSatRecord(std::string mnemonic)
Constructor.
std::string _ascii_flag
ASCII flag.
std::string _file_class
Referenced file class.
int _first_rec
First physical volume record.
std::string _file_code
Referenced file class code.
int _max_len
Maximum record length, bytes.
int _nrec
Referenced file record count.
int _first_len
First record length, bytes.
int _first_phyvol
First physical volume.
int _last_phyvol
Last physical volume.
std::string _data_type
Referenced file data type.

Member Function Documentation

◆ Clone()

RadarSatRecord* ossimplugins::FilePointerRecord::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 FilePointerRecord.h.

References FilePointerRecord().

70  {
71  return new FilePointerRecord(*this);
72  };

◆ get_ascii_flag()

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

ASCII flag.

Definition at line 93 of file FilePointerRecord.h.

References _ascii_flag.

94  {
95  return _ascii_flag;
96  };
std::string _ascii_flag
ASCII flag.

◆ get_data_code()

std::string ossimplugins::FilePointerRecord::get_data_code ( )
inline

Referenced file data type code.

Definition at line 141 of file FilePointerRecord.h.

References _data_code.

142  {
143  return _data_code;
144  };
std::string _data_code
Referenced file data type code.

◆ get_data_type()

std::string ossimplugins::FilePointerRecord::get_data_type ( )
inline

Referenced file data type.

Definition at line 133 of file FilePointerRecord.h.

References _data_type.

134  {
135  return _data_type;
136  };
std::string _data_type
Referenced file data type.

◆ get_file_class()

std::string ossimplugins::FilePointerRecord::get_file_class ( )
inline

Referenced file class.

Definition at line 117 of file FilePointerRecord.h.

References _file_class.

118  {
119  return _file_class;
120  };
std::string _file_class
Referenced file class.

◆ get_file_code()

std::string ossimplugins::FilePointerRecord::get_file_code ( )
inline

Referenced file class code.

Definition at line 125 of file FilePointerRecord.h.

References _file_code.

126  {
127  return _file_code;
128  };
std::string _file_code
Referenced file class code.

◆ get_file_name()

std::string ossimplugins::FilePointerRecord::get_file_name ( )
inline

Referenced file name.

Definition at line 109 of file FilePointerRecord.h.

References _file_name.

110  {
111  return _file_name;
112  };
std::string _file_name
Referenced file name.

◆ get_file_num()

int ossimplugins::FilePointerRecord::get_file_num ( )
inline

Referenced file number.

Definition at line 101 of file FilePointerRecord.h.

References _file_num.

102  {
103  return _file_num;
104  };
int _file_num
Referenced file number.

◆ get_first_len()

int ossimplugins::FilePointerRecord::get_first_len ( )
inline

First record length, bytes.

Definition at line 157 of file FilePointerRecord.h.

References _first_len.

158  {
159  return _first_len;
160  };
int _first_len
First record length, bytes.

◆ get_first_phyvol()

int ossimplugins::FilePointerRecord::get_first_phyvol ( )
inline

First physical volume.

Definition at line 189 of file FilePointerRecord.h.

References _first_phyvol.

190  {
191  return _first_phyvol;
192  };
int _first_phyvol
First physical volume.

◆ get_first_rec()

int ossimplugins::FilePointerRecord::get_first_rec ( )
inline

First physical volume record.

Definition at line 205 of file FilePointerRecord.h.

References _first_rec.

206  {
207  return _first_rec;
208  };
int _first_rec
First physical volume record.

◆ get_last_phyvol()

int ossimplugins::FilePointerRecord::get_last_phyvol ( )
inline

Last physical volume.

Definition at line 197 of file FilePointerRecord.h.

References _last_phyvol.

198  {
199  return _last_phyvol;
200  };
int _last_phyvol
Last physical volume.

◆ get_last_rec()

int ossimplugins::FilePointerRecord::get_last_rec ( )
inline

Last physical volume record.

Definition at line 213 of file FilePointerRecord.h.

References _last_rec.

214  {
215  return _last_rec;
216  };
int _last_rec
Last physical volume record.

◆ get_len_code()

std::string ossimplugins::FilePointerRecord::get_len_code ( )
inline

Record length type code.

Definition at line 181 of file FilePointerRecord.h.

References _len_code.

182  {
183  return _len_code;
184  };
std::string _len_code
Record length type code.

◆ get_len_type()

std::string ossimplugins::FilePointerRecord::get_len_type ( )
inline

Record length type.

Definition at line 173 of file FilePointerRecord.h.

References _len_type.

174  {
175  return _len_type;
176  };
std::string _len_type
Record length type.

◆ get_max_len()

int ossimplugins::FilePointerRecord::get_max_len ( )
inline

Maximum record length, bytes.

Definition at line 165 of file FilePointerRecord.h.

References _max_len.

166  {
167  return _max_len;
168  };
int _max_len
Maximum record length, bytes.

◆ get_nrec()

int ossimplugins::FilePointerRecord::get_nrec ( )
inline

Referenced file record count.

Definition at line 149 of file FilePointerRecord.h.

References _nrec.

150  {
151  return _nrec;
152  };
int _nrec
Referenced file record count.

◆ Instanciate()

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

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

Implements ossimplugins::RadarSatRecord.

Definition at line 61 of file FilePointerRecord.h.

References FilePointerRecord().

62  {
63  return new FilePointerRecord();
64  };

◆ operator=()

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

Copy operator.

Definition at line 143 of file FilePointerRecord.cpp.

References _ascii_flag, _data_code, _data_type, _file_class, _file_code, _file_name, _file_num, _first_len, _first_phyvol, _first_rec, _last_phyvol, _last_rec, _len_code, _len_type, _max_len, and _nrec.

144 {
145  _ascii_flag = rhs._ascii_flag;
146  _file_num = rhs._file_num;
147  _file_name = rhs._file_name;
148  _file_class = rhs._file_class;
149  _file_code = rhs._file_code;
150  _data_type = rhs._data_type;
151  _data_code = rhs._data_code;
152  _nrec = rhs._nrec;
153  _first_len = rhs._first_len;
154  _max_len = rhs._max_len;
155  _len_type = rhs._len_type;
156  _len_code = rhs._len_code;
157  _first_phyvol = rhs._first_phyvol;
158  _last_phyvol = rhs._last_phyvol;
159  _first_rec = rhs._first_rec;
160  _last_rec = rhs._last_rec;
161  return *this;
162 }
std::string _len_type
Record length type.
std::string _data_code
Referenced file data type code.
std::string _file_name
Referenced file name.
int _last_rec
Last physical volume record.
std::string _len_code
Record length type code.
int _file_num
Referenced file number.
std::string _ascii_flag
ASCII flag.
std::string _file_class
Referenced file class.
int _first_rec
First physical volume record.
std::string _file_code
Referenced file class code.
int _max_len
Maximum record length, bytes.
int _nrec
Referenced file record count.
int _first_len
First record length, bytes.
int _first_phyvol
First physical volume.
int _last_phyvol
Last physical volume.
std::string _data_type
Referenced file data type.

◆ Read()

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

Reads the class data from a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 77 of file FilePointerRecord.h.

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

◆ Write()

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

Writes the class to a stream.

Implements ossimplugins::RadarSatRecord.

Definition at line 85 of file FilePointerRecord.h.

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

Friends And Related Function Documentation

◆ operator<<

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

This function writes the FilePointerRecord in a stream.

Definition at line 24 of file FilePointerRecord.cpp.

25 {
26  os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl;
27  os<<"file_num:"<<data._file_num<<std::endl;
28  os<<"file_name:"<<data._file_name.c_str()<<std::endl;
29  os<<"file_class:"<<data._file_class.c_str()<<std::endl;
30  os<<"file_code:"<<data._file_code.c_str()<<std::endl;
31  os<<"data_type:"<<data._data_type.c_str()<<std::endl;
32  os<<"data_code:"<<data._data_code.c_str()<<std::endl;
33  os<<"nrec:"<<data._nrec<<std::endl;
34  os<<"first_len:"<<data._first_len<<std::endl;
35  os<<"max_len:"<<data._max_len<<std::endl;
36  os<<"len_type:"<<data._len_type.c_str()<<std::endl;
37  os<<"len_code:"<<data._len_code.c_str()<<std::endl;
38  os<<"first_phyvol:"<<data._first_phyvol<<std::endl;
39  os<<"last_phyvol:"<<data._last_phyvol<<std::endl;
40  os<<"first_rec:"<<data._first_rec<<std::endl;
41  os<<"last_rec:"<<data._last_rec<<std::endl;
42  return os;
43 }

◆ operator>>

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

This function reads a FilePointerRecord from a stream.

Definition at line 45 of file FilePointerRecord.cpp.

46 {
47  char buf[349]; // 361-12 (size of header)
48  buf[348] = '\0';
49 
50  is.read(buf, 2);
51  buf[2] = '\0';
52  data._ascii_flag = buf;
53 
54  is.read(buf, 2); // spare1
55 
56  is.read(buf, 4);
57  buf[4] = '\0';
58  data._file_num = atoi(buf);
59 
60  is.read(buf, 16);
61  buf[16] = '\0';
62  data._file_name = buf;
63 
64  is.read(buf, 28);
65  buf[28] = '\0';
66  data._file_class = buf;
67 
68  is.read(buf, 4);
69  buf[4] = '\0';
70  data._file_code = buf;
71 
72  is.read(buf, 28);
73  buf[28] = '\0';
74  data._data_type = buf;
75 
76  is.read(buf, 4);
77  buf[4] = '\0';
78  data._data_code = buf;
79 
80  is.read(buf, 8);
81  buf[8] = '\0';
82  data._nrec = atoi(buf);
83 
84  is.read(buf, 8);
85  buf[8] = '\0';
86  data._first_len = atoi(buf);
87 
88  is.read(buf, 8);
89  buf[8] = '\0';
90  data._max_len = atoi(buf);
91 
92  is.read(buf, 12);
93  buf[12] = '\0';
94  data._len_type = buf;
95 
96  is.read(buf, 4);
97  buf[4] = '\0';
98  data._len_code = buf;
99 
100  is.read(buf, 2);
101  buf[2] = '\0';
102  data._first_phyvol = atoi(buf);
103 
104  is.read(buf, 2);
105  buf[2] = '\0';
106  data._last_phyvol = atoi(buf);
107 
108  is.read(buf, 8);
109  buf[8] = '\0';
110  data._first_rec = atoi(buf);
111 
112  is.read(buf, 8);
113  buf[8] = '\0';
114  data._last_rec = atoi(buf);
115 
116  is.read(buf, 100); // spare2
117 
118  is.read(buf, 100); // spare3
119  return is;
120 }

Member Data Documentation

◆ _ascii_flag

std::string ossimplugins::FilePointerRecord::_ascii_flag
protected

ASCII flag.

Definition at line 216 of file FilePointerRecord.h.

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

◆ _data_code

std::string ossimplugins::FilePointerRecord::_data_code
protected

Referenced file data type code.

Definition at line 252 of file FilePointerRecord.h.

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

◆ _data_type

std::string ossimplugins::FilePointerRecord::_data_type
protected

Referenced file data type.

Definition at line 247 of file FilePointerRecord.h.

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

◆ _file_class

std::string ossimplugins::FilePointerRecord::_file_class
protected

Referenced file class.

Definition at line 237 of file FilePointerRecord.h.

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

◆ _file_code

std::string ossimplugins::FilePointerRecord::_file_code
protected

Referenced file class code.

Definition at line 242 of file FilePointerRecord.h.

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

◆ _file_name

std::string ossimplugins::FilePointerRecord::_file_name
protected

Referenced file name.

Definition at line 232 of file FilePointerRecord.h.

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

◆ _file_num

int ossimplugins::FilePointerRecord::_file_num
protected

Referenced file number.

Definition at line 227 of file FilePointerRecord.h.

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

◆ _first_len

int ossimplugins::FilePointerRecord::_first_len
protected

First record length, bytes.

Definition at line 262 of file FilePointerRecord.h.

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

◆ _first_phyvol

int ossimplugins::FilePointerRecord::_first_phyvol
protected

First physical volume.

Definition at line 282 of file FilePointerRecord.h.

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

◆ _first_rec

int ossimplugins::FilePointerRecord::_first_rec
protected

First physical volume record.

Definition at line 292 of file FilePointerRecord.h.

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

◆ _last_phyvol

int ossimplugins::FilePointerRecord::_last_phyvol
protected

Last physical volume.

Definition at line 287 of file FilePointerRecord.h.

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

◆ _last_rec

int ossimplugins::FilePointerRecord::_last_rec
protected

Last physical volume record.

Definition at line 297 of file FilePointerRecord.h.

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

◆ _len_code

std::string ossimplugins::FilePointerRecord::_len_code
protected

Record length type code.

Definition at line 277 of file FilePointerRecord.h.

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

◆ _len_type

std::string ossimplugins::FilePointerRecord::_len_type
protected

Record length type.

Definition at line 272 of file FilePointerRecord.h.

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

◆ _max_len

int ossimplugins::FilePointerRecord::_max_len
protected

Maximum record length, bytes.

Definition at line 267 of file FilePointerRecord.h.

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

◆ _nrec

int ossimplugins::FilePointerRecord::_nrec
protected

Referenced file record count.

Definition at line 257 of file FilePointerRecord.h.

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


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