root / trunk / libraries / libjni-ecwcompress / include / NCSJP2Box.h @ 1429
History | View | Annotate | Download (3.3 KB)
1 |
/********************************************************
|
---|---|
2 |
** Copyright 2002 Earth Resource Mapping Pty Ltd.
|
3 |
** This document contains unpublished source code of
|
4 |
** Earth Resource Mapping Pty Ltd. This notice does
|
5 |
** not indicate any intention to publish the source
|
6 |
** code contained herein.
|
7 |
**
|
8 |
** FILE: $Archive: /NCS/Source/include/NCSJP2Box.h $
|
9 |
** CREATED: 28/11/2002 3:27:34 PM
|
10 |
** AUTHOR: Simon Cope
|
11 |
** PURPOSE: CNCSJP2Box class header
|
12 |
** EDITS: [xx] ddMmmyy NAME COMMENTS
|
13 |
*******************************************************/
|
14 |
|
15 |
#ifndef NCSJP2BOX_H
|
16 |
#define NCSJP2BOX_H
|
17 |
|
18 |
|
19 |
// Our own 64bit IOSTREAM class
|
20 |
#ifndef NCSJPCIOSTREAM_H
|
21 |
#include "NCSJPCIOStream.h" |
22 |
#endif // NCSJPCIOSTREAM_H |
23 |
|
24 |
// STD list template
|
25 |
#include <list> |
26 |
|
27 |
|
28 |
|
29 |
/**
|
30 |
* CNCSJP2Box class - the basic JP2 file box.
|
31 |
*
|
32 |
* @author Simon Cope
|
33 |
* @version $Revision: 1429 $ $Author: igbrotru $ $Date: 2005-02-10 13:49:04 +0100 (Thu, 10 Feb 2005) $
|
34 |
*/
|
35 |
class NCSJPC_EXPORT_ALL CNCSJP2Box { |
36 |
public:
|
37 |
/** A list of boxes. */
|
38 |
typedef std::vector<CNCSJP2Box *> CNCSJP2BoxList;
|
39 |
|
40 |
/** Absolute file Offset to the Box in bytes */
|
41 |
UINT64 m_nBoxOffset; |
42 |
/** Length of this box in bytes. */
|
43 |
UINT64 m_nXLBox; |
44 |
/** Type of box, 4 char code stored in a UINT32. */
|
45 |
UINT32 m_nTBox; |
46 |
/** Absolute file Offset to the DBox in bytes */
|
47 |
UINT64 m_nDBoxOffset; |
48 |
/** Length of box data in bytes */
|
49 |
UINT64 m_nLDBox; |
50 |
/** We have parsed this box */
|
51 |
bool m_bHaveBox;
|
52 |
/** This box is valid */
|
53 |
bool m_bValid;
|
54 |
/** Is a superbox */
|
55 |
bool m_bIsSuperBox;
|
56 |
/** Box(es) that must preceed this one in the file */
|
57 |
CNCSJP2BoxList m_Prev; |
58 |
/** Box(es) that must proceed this one in the file */
|
59 |
CNCSJP2BoxList m_Next; |
60 |
|
61 |
|
62 |
/** Default constructor for a box. Initialises members */
|
63 |
CNCSJP2Box(); |
64 |
/** Copy constructor for a box. Initialises members */
|
65 |
CNCSJP2Box(const CNCSJP2Box &s);
|
66 |
/** Virtual destructor for a box. Releases members */
|
67 |
virtual ~CNCSJP2Box(); |
68 |
|
69 |
/**
|
70 |
* Set which Box(es) preceed this one in the file
|
71 |
* @param pFirst NULL terminated varargs list of boxes that must preceed this one
|
72 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
73 |
*/
|
74 |
virtual CNCSError SetPrevBoxes(CNCSJP2Box *pFirst, ...); |
75 |
/**
|
76 |
* Set which Box(es) proceed this one in the file
|
77 |
* @param pFirst NULL terminated varargs list of boxes that must proceed this one
|
78 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
79 |
*/
|
80 |
virtual CNCSError SetNextBoxes(CNCSJP2Box *pFirst, ...); |
81 |
|
82 |
virtual void UpdateXLBox(void); |
83 |
/**
|
84 |
* Parse the base box from the JP2 file.
|
85 |
* @param JP2File JP2 file being parsed
|
86 |
* @param Stream IOStream to use to parse file.
|
87 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
88 |
*/
|
89 |
virtual CNCSError Parse(class CNCSJP2File &JP2File, CNCSJPCIOStream &Stream); |
90 |
/**
|
91 |
* UnParse the box to the JP2 file.
|
92 |
* @param JP2File JP2 file being parsed
|
93 |
* @param Stream IOStream to use to parse file.
|
94 |
* @return CNCSError NCS_SUCCESS, or Error code on failure.
|
95 |
*/
|
96 |
virtual CNCSError UnParse(class CNCSJP2File &JP2File, CNCSJPCIOStream &Stream); |
97 |
|
98 |
CNCSJP2Box& operator=(const CNCSJP2Box& s) {
|
99 |
m_nBoxOffset = s.m_nBoxOffset; |
100 |
m_nXLBox = s.m_nXLBox; |
101 |
m_nTBox = s.m_nTBox; |
102 |
m_nDBoxOffset = s.m_nDBoxOffset; |
103 |
m_nLDBox = s.m_nLDBox; |
104 |
m_bHaveBox = s.m_bHaveBox; |
105 |
m_bValid = s.m_bValid; |
106 |
return(*this);
|
107 |
}; |
108 |
}; |
109 |
|
110 |
#endif // !NCSJP2BOX_H |