OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ErsSarRecordHeader.h
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 #ifndef ErsSarRecordHeader_h
13 #define ErsSarRecordHeader_h
14 
15 #include<iostream>
16 #include<cstring>
17 
18 namespace ossimplugins
19 {
20 
27 {
28 public:
33 
37  virtual ~ErsSarRecordHeader();
38 
43 
51  friend std::ostream& operator<<(std::ostream& os, const ErsSarRecordHeader& data);
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 
142 #endif
unsigned char get_rec_sub2()
Second record sub-type code.
unsigned char _rec_type
Record type code.
unsigned int _rec_seq
Record sequence number.
unsigned char get_rec_sub1()
First record sub-type code.
unsigned int _length
Length of this record (in bytes)
virtual ~ErsSarRecordHeader()
Destructor.
ErsSarRecordHeader & operator=(const ErsSarRecordHeader &rhs)
Copy operator.
This class is able to read a record header.
unsigned char _rec_sub1
First record sub-type code.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
unsigned char _rec_sub3
Third record sub-type code.
unsigned int get_length()
Length of this record (in bytes)
friend std::istream & operator>>(std::istream &is, ErsSarRecordHeader &data)
This function read a RecordHeader from a stream.
unsigned char _rec_sub2
Second record sub-type code.
unsigned int get_rec_seq()
Record sequence number.
unsigned char get_rec_type()
Record type code.
unsigned char get_rec_sub3()
Third record sub-type code.
friend std::ostream & operator<<(std::ostream &os, const ErsSarRecordHeader &data)
This function write the RecordHeader in a stream.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
void SwitchEndian(unsigned int &value)
This function switch the LSB value and the MSB value of the parameter.