OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimNitfDesInformation.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top level LICENSE.txt file.
5 //
6 // Author: Garrett Potts
7 //
8 // Description: Nitf support class
9 //
10 //********************************************************************
11 // $Id: ossimNitfDesInformation.h 22418 2013-09-26 15:01:12Z gpotts $
12 #ifndef ossimNitfDesInformation_HEADER
13 #define ossimNitfDesInformation_HEADER
14 
15 #include <ossim/base/ossimObject.h>
17 
18 class ossimString;
19 
21 {
22 
23 public:
24  enum{
25  DE_SIZE = 2,
26  DESID_SIZE = 25,
27  DESVER_SIZE = 2,
28  DECLAS_SIZE = 1,
29  DESCLSY_SIZE = 2,
30  DESCODE_SIZE = 11,
31  DESCTLH_SIZE = 2,
32  DESREL_SIZE = 20,
33  DESDCTP_SIZE = 2,
34  DESDCDT_SIZE = 8,
35  DESDCXM_SIZE = 4,
36  DESDG_SIZE = 1,
37  DESDGDT_SIZE = 8,
38  DESCLTX_SIZE = 43,
39  DESCATP_SIZE = 1,
40  DESCAUT_SIZE = 40,
41  DESCRSN_SIZE = 1,
42  DESSRDT_SIZE = 8,
43  DESCTLN_SIZE = 15,
44  DESOFLW_SIZE = 6,
45  DESITEM_SIZE = 3,
46  DESSHL_SIZE = 4
47  };
48 
50  virtual ~ossimNitfDesInformation();
51 
52  //virtual void parseStream(std::istream& in);
53  virtual void parseStream(std::istream &in, ossim_uint64 dataLength=0);
54  virtual void writeStream(std::ostream& out);
55 
56  void setDesName(const ossimString& desName);
57  void setDesLength(ossim_uint32 desLength);
58 
64  ossim_uint32 getTotalDesLength()const;
65 
70  ossim_uint32 getDesLength()const;
71  ossim_uint64 getDesOffset()const;
72  ossim_uint64 getDesDataOffset()const;
73 
74  ossimString getDesId()const;
75  virtual std::ostream& print(std::ostream& out, const std::string& prefix)const;
76  void clearFields();
77 
79  const ossimRefPtr<ossimNitfRegisteredDes> getDesData()const;
80  void setDesData(ossimRefPtr<ossimNitfRegisteredDes> desData);
81 
82  bool operator<(const ossimNitfDesInformation& rhs) const
83  {
84  return getTotalDesLength() < rhs.getTotalDesLength();
85  }
86 
87 private:
88 
89  char m_de[DE_SIZE+1];
90  char m_desid[DESID_SIZE+1];
91  char m_desver[DESVER_SIZE+1];
92  char m_declas[DECLAS_SIZE+1];
93  char m_desclsy[DESCLSY_SIZE+1];
94  char m_descode[DESCODE_SIZE+1];
95  char m_desctlh[DESCTLH_SIZE+1];
96  char m_desrel[DESREL_SIZE+1];
97  char m_desdctp[DESDCTP_SIZE+1];
98  char m_desdcdt[DESDCDT_SIZE+1];
99  char m_desdcxm[DESDCXM_SIZE+1];
100  char m_desdg[DESDG_SIZE+1];
101  char m_desdgdt[DESDGDT_SIZE+1];
102  char m_descltx[DESCLTX_SIZE+1];
103  char m_descatp[DESCATP_SIZE+1];
104  char m_descaut[DESCAUT_SIZE+1];
105  char m_descrsn[DESCRSN_SIZE+1];
106  char m_dessrdt[DESSRDT_SIZE+1];
107  char m_desctln[DESCTLN_SIZE+1];
108  char m_desoflw[DESOFLW_SIZE+1];
109  char m_desitem[DESITEM_SIZE+1];
110  char m_desshl[DESSHL_SIZE+1];
111 
118 
119 
127 
132 };
133 
134 #endif
#define OSSIMDLLEXPORT
ossim_uint64 m_desOffset
This will hold the offset to the start of the above information This is just a work variable...
bool operator<(const ossimNitfDesInformation &rhs) const
ossimRefPtr< ossimNitfRegisteredDes > m_desData
Used to hold the des data.
virtual std::ostream & print(std::ostream &out) const
Generic print method.
unsigned long long ossim_uint64
unsigned int ossim_uint32
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
ossim_uint64 m_desDataOffset
This will hold the start to the data.
ossim_uint32 getTotalDesLength() const
Length of the 5 byte des length the 6 byte des name and the data length.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23