OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
AlosPalsarRecordHeader.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 // "Copyright Centre for Remote Imaging, Sensing and Processing"
5 //
6 // License: LGPL
7 //
8 // See LICENSE.txt file in the top level directory for more details.
9 //
10 //----------------------------------------------------------------------------
11 // $Id$
12 
13 #ifndef AlosPalsarRecordHeader_h
14 #define AlosPalsarRecordHeader_h
15 
16 #include<iostream>
17 #include<cstring>
18 
19 namespace ossimplugins
20 {
21 
27 {
28 public:
33 
38 
43 
52 
57 
61  unsigned int get_rec_seq()
62  {
63  return _rec_seq;
64  };
65 
69  unsigned char get_rec_sub1()
70  {
71  return _rec_sub1;
72  };
73 
77  unsigned char get_rec_type()
78  {
79  return _rec_type;
80  };
81 
85  unsigned char get_rec_sub2()
86  {
87  return _rec_sub2;
88  };
89 
93  unsigned char get_rec_sub3()
94  {
95  return _rec_sub3;
96  };
97 
101  unsigned int get_length()
102  {
103  return _length;
104  };
105 protected:
106 
110  void SwitchEndian(unsigned int& value);
111 
115  unsigned int _rec_seq;
119  unsigned char _rec_sub1;
123  unsigned char _rec_type;
127  unsigned char _rec_sub2;
131  unsigned char _rec_sub3;
135  unsigned int _length;
136 private:
137 
138 
139 };
140 }
141 #endif
unsigned char get_rec_sub2()
Second record sub-type code.
unsigned int get_length()
Length of this record (in bytes)
unsigned char _rec_sub1
First record sub-type code.
This class is able to read a record header.
unsigned char _rec_sub2
Second record sub-type code.
friend std::ostream & operator<<(std::ostream &os, const AlosPalsarRecordHeader &data)
This function write the RecordHeader in a stream.
void SwitchEndian(unsigned int &value)
This function switch the LSB value and the MSB value of the parameter.
unsigned char _rec_sub3
Third record sub-type code.
unsigned int _length
Length of this record (in bytes)
unsigned char get_rec_sub1()
First record sub-type code.
friend std::istream & operator>>(std::istream &is, AlosPalsarRecordHeader &data)
This function read a RecordHeader from a stream.
unsigned int get_rec_seq()
Record sequence number.
unsigned char get_rec_type()
Record type code.
AlosPalsarRecordHeader & operator=(const AlosPalsarRecordHeader &rhs)
Copy operator.
unsigned int _rec_seq
Record sequence number.
unsigned char _rec_type
Record type code.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
unsigned char get_rec_sub3()
Third record sub-type code.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23