svn-gvsig-desktop / tags / extI18n-0.1.0-1045_8 / libraries / libjni-ecw / include / NCSJPCPLTMarker.h @ 40799
History | View | Annotate | Download (3.26 KB)
1 | 3538 | nacho | /********************************************************
|
---|---|---|---|
2 | ** Copyright 2002 Earth Resource Mapping Ltd.
|
||
3 | ** This document contains proprietary source code of
|
||
4 | ** Earth Resource Mapping Ltd, and can only be used under
|
||
5 | ** one of the three licenses as described in the
|
||
6 | ** license.txt file supplied with this distribution.
|
||
7 | ** See separate license.txt file for license details
|
||
8 | ** and conditions.
|
||
9 | **
|
||
10 | ** This software is covered by US patent #6,442,298,
|
||
11 | ** #6,102,897 and #6,633,688. Rights to use these patents
|
||
12 | ** is included in the license agreements.
|
||
13 | **
|
||
14 | ** FILE: $Archive: /NCS/Source/include/NCSJPCPLTMarker.h $
|
||
15 | ** CREATED: 19/12/2002 3:27:34 PM
|
||
16 | ** AUTHOR: Simon Cope
|
||
17 | ** PURPOSE: CNCSJPCPLTMarker class header
|
||
18 | ** EDITS: [xx] ddMmmyy NAME COMMENTS
|
||
19 | *******************************************************/
|
||
20 | |||
21 | #ifndef NCSJPCPLTMARKER_H
|
||
22 | #define NCSJPCPLTMARKER_H
|
||
23 | |||
24 | #include "NCSJPCMarker.h" |
||
25 | #include "NCSJPCPacketLengthType.h" |
||
26 | #include "NCSJPCNode.h" |
||
27 | |||
28 | /**
|
||
29 | * CNCSJPCPLTMarker class - the JPC PLT marker.
|
||
30 | *
|
||
31 | * @author Simon Cope
|
||
32 | * @version $Revision$ $Author$ $Date$
|
||
33 | */
|
||
34 | class NCSJPC_EXPORT_ALL CNCSJPCPLTMarker: public CNCSJPCMarker { |
||
35 | public:
|
||
36 | /** Index of this marker WRT other PLT markers */
|
||
37 | UINT8 m_nZplt; |
||
38 | |||
39 | /** Number of packet lengths in this marker */
|
||
40 | UINT16 m_nLengths; |
||
41 | /** Lengths in this PLT are cumulative */
|
||
42 | bool m_bCumulativeLengths;
|
||
43 | |||
44 | /** PLT's were dynamically generated */
|
||
45 | bool m_bDynamic;
|
||
46 | |||
47 | /** Length offsets when hashing index */
|
||
48 | UINT32 m_nFirstPacket; |
||
49 | UINT64 m_nHeaderLengthOffset; |
||
50 | UINT64 m_nDataLengthOffset; |
||
51 | |||
52 | /** Default constructor, initialises members */
|
||
53 | CNCSJPCPLTMarker(); |
||
54 | /** Virtual destructor */
|
||
55 | virtual ~CNCSJPCPLTMarker(); |
||
56 | |||
57 | /**
|
||
58 | * Parse the marker from the JPC codestream.
|
||
59 | * @param JPC CNCSJPC to use to parse file.
|
||
60 | * @param Stream IOStream to use to parse file.
|
||
61 | * @return CNCSError NCS_SUCCESS, or Error code on failure.
|
||
62 | */
|
||
63 | virtual CNCSError Parse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
||
64 | /**
|
||
65 | * UnParse the marker to the JPC codestream.
|
||
66 | * @param Stream IOStream to use to parse file.
|
||
67 | * @param JPC CNCSJPC to use to parse file.
|
||
68 | * @return CNCSError NCS_SUCCESS, or Error code on failure.
|
||
69 | */
|
||
70 | virtual CNCSError UnParse(class CNCSJPC &JPC, CNCSJPCIOStream &Stream); |
||
71 | /**
|
||
72 | * Parse the marker from the JPC codestream.
|
||
73 | * @param JPC CNCSJPC to use to parse file.
|
||
74 | * @param Stream IOStream to use to parse file.
|
||
75 | * @return CNCSError NCS_SUCCESS, or Error code on failure.
|
||
76 | */
|
||
77 | virtual bool ParseLength(class CNCSJPC &JPC, CNCSJPCIOStream &Stream, UINT16 iLength);
|
||
78 | |||
79 | /**
|
||
80 | * Assignment operator.
|
||
81 | * @param src Copy source.
|
||
82 | * @return void
|
||
83 | */
|
||
84 | void CNCSJPCPLTMarker::operator=( const class CNCSJPCPLTMarker& src ); |
||
85 | /**
|
||
86 | * Allocate the lengths array vector.
|
||
87 | */
|
||
88 | void AllocLengths(void); |
||
89 | /**
|
||
90 | * Free the lengths array vector.
|
||
91 | */
|
||
92 | void FreeLengths(void); |
||
93 | /**
|
||
94 | * Get a pointer to the lengths array vector.
|
||
95 | */
|
||
96 | std::vector<CNCSJPCPacketLengthType> *GetLengths(); |
||
97 | /**
|
||
98 | * Add a length to the lengths array.
|
||
99 | */
|
||
100 | void AddLength(CNCSJPCPacketLengthType &Len);
|
||
101 | |||
102 | protected:
|
||
103 | static CNCSJPCNode::CNCSJPCNodeTracker sm_Tracker;
|
||
104 | |||
105 | /** Packet length(s) for tile-part */
|
||
106 | std::vector<CNCSJPCPacketLengthType> *m_pLengths; |
||
107 | }; |
||
108 | |||
109 | #endif // !NCSJPCPLTMARKER_H |