MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
TREData.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2010 LizardTech, Inc, 1008 Western Avenue, //
4 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11 
12 #ifndef TREData_H
13 #define TREData_H
14 
15 // lt_lib_base
16 #include "lt_base.h"
17 
18 // lt_lib_io
19 #include "lt_ioStreamInf.h"
20 
21 #include <string.h>
22 #include <stdio.h>
23 
25 namespace Nitf {
26 
27 
33 class TREData
34 {
35 public:
36  // not for public use
37  TREData();
38 
39  // not for public use
40  TREData(const TREData* tre);
41 
51  TREData(const char* tag, int dataLength, const lt_uint8* data);
52 
53  // not for public use
54  ~TREData();
55 
56  // not for public use
57  lt_uint8* serialize(lt_uint8* p) const;
58 
59  // not for public use
60  LT_STATUS serialize(LTIOStreamInf& stream) const;
61 
65  const char* getTag() const;
66 
70  lt_uint32 getDataLength() const;
71 
75  const lt_uint8* getData() const;
76 
77 private:
78  void set(const char* t, int l, const lt_uint8* d);
79 
80  char* m_tag; // 6 chars only
81  int m_length; // length of data array only; serialized as "%05d"
82  lt_uint8* m_data;
83 
84  TREData(TREData&);
85  TREData& operator=(const TREData&);
86 };
87 
88 
89 }
91 
92 #endif // TREData_H
lt_uint32 getDataLength() const
returns the length in bytes of the data payload
#define LT_BEGIN_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:96
const char * getTag() const
returns the tag name (a 6-char array)
Abstract definition of a stream.
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
Include file for all LizardTech sources.
const lt_uint8 * getData() const
returns the data payload
#define LT_END_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:97
representation of a single TRE in a NITF file
Definition: TREData.h:33
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
lt_uint8 * serialize(lt_uint8 *p) const
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39

LizardTech