|
1 /* |
|
2 * Copyright (c) 2003, 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Collection of structs used to gather the various |
|
15 * marker related information in the JP2 image file. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "JP2KMarker.h" |
|
22 |
|
23 // EXTERNAL DATA STRUCTURES |
|
24 |
|
25 // EXTERNAL FUNCTION PROTOTYPES |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // LOCAL CONSTANTS AND MACROS |
|
32 |
|
33 // MODULE DATA STRUCTURES |
|
34 |
|
35 // LOCAL FUNCTION PROTOTYPES |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 |
|
39 |
|
40 // ============================ MEMBER FUNCTIONS =============================== |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // TSizMarker::TSizMarker |
|
44 // C++ default constructor can NOT contain any code, that |
|
45 // might leave. |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 TSizMarker::TSizMarker() : |
|
49 iXsiz(1), |
|
50 iYsiz(1), |
|
51 iXOsiz(0), |
|
52 iYOsiz(0), |
|
53 iXTsiz(1), |
|
54 iYTsiz(1), |
|
55 iXTOsiz(0), |
|
56 iYTOsiz(0), |
|
57 iRsiz(0), |
|
58 iCsiz(1), |
|
59 iSsiz(3), |
|
60 iXRsiz(3), |
|
61 iYRsiz(3) |
|
62 { |
|
63 } |
|
64 |
|
65 // Destructor |
|
66 TSizMarker::~TSizMarker() |
|
67 { |
|
68 iSsiz.Close(); |
|
69 iXRsiz.Close(); |
|
70 iYRsiz.Close(); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // TCODMarker::TCODMarker |
|
75 // C++ default constructor can NOT contain any code, that |
|
76 // might leave. |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TCODMarker::TCODMarker() : |
|
80 iScod(0), |
|
81 iProgressionOrder(0), |
|
82 iColorTransformation(0), |
|
83 iNumOfLevels(0), |
|
84 iCodeBlockStyle(0), |
|
85 iWaveletTransformation(0), |
|
86 iNumOfLayers(1), |
|
87 iCodeBlockSiz(32,32), |
|
88 iPrecinctSiz(0) |
|
89 { |
|
90 } |
|
91 |
|
92 // Destructor |
|
93 TCODMarker::~TCODMarker() |
|
94 { |
|
95 delete iPrecinctSiz; |
|
96 iPrecinctSiz = 0; |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // TCOCMarker::TCOCMarker |
|
101 // C++ default constructor can NOT contain any code, that |
|
102 // might leave. |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 TCOCMarker::TCOCMarker() : |
|
106 iCcoc(0), |
|
107 iScoc(0), |
|
108 iNumOfLevels(0), |
|
109 iCodeBlockStyle(0), |
|
110 iWaveletTransformation(0), |
|
111 iCodeBlockSiz(32,32), |
|
112 iPrecinctSiz(0) |
|
113 { |
|
114 } |
|
115 |
|
116 // Destructor |
|
117 TCOCMarker::~TCOCMarker() |
|
118 { |
|
119 delete iPrecinctSiz; |
|
120 iPrecinctSiz = 0; |
|
121 } |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // TQCDMarker::TQCDMarker |
|
125 // C++ default constructor can NOT contain any code, that |
|
126 // might leave. |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 TQCDMarker::TQCDMarker(): |
|
130 iSqcd(0), |
|
131 iExponent(0), |
|
132 iMantissa(0) |
|
133 { |
|
134 } |
|
135 |
|
136 // Destructor |
|
137 TQCDMarker::~TQCDMarker() |
|
138 { |
|
139 delete iExponent; |
|
140 iExponent = 0; |
|
141 delete iMantissa; |
|
142 iMantissa = 0; |
|
143 } |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // TQCCMarker::TQCCMarker |
|
147 // C++ default constructor can NOT contain any code, that |
|
148 // might leave. |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 TQCCMarker::TQCCMarker() : |
|
152 iCqcc(0), |
|
153 iSqcc(0), |
|
154 iExponent(0), |
|
155 iMantissa(0) |
|
156 { |
|
157 } |
|
158 |
|
159 // Destructor |
|
160 TQCCMarker::~TQCCMarker() |
|
161 { |
|
162 delete iExponent; |
|
163 iExponent = 0; |
|
164 delete iMantissa; |
|
165 iMantissa = 0; |
|
166 } |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // TPOCMarker::TPOCMarker |
|
170 // C++ default constructor can NOT contain any code, that |
|
171 // might leave. |
|
172 // ----------------------------------------------------------------------------- |
|
173 // |
|
174 TPOCMarker::TPOCMarker(): |
|
175 iRSpoc(1), |
|
176 iCSpoc(1), |
|
177 iLYEpoc(1), |
|
178 iREpoc(1), |
|
179 iCEpoc(1), |
|
180 iPpoc(1) |
|
181 { |
|
182 } |
|
183 |
|
184 // Destructor |
|
185 TPOCMarker::~TPOCMarker() |
|
186 { |
|
187 iRSpoc.Close(); |
|
188 iCSpoc.Close(); |
|
189 iLYEpoc.Close(); |
|
190 iREpoc.Close(); |
|
191 iCEpoc.Close(); |
|
192 iPpoc.Close(); |
|
193 } |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // TPPMMarker::TPPMMarker |
|
197 // C++ default constructor can NOT contain any code, that |
|
198 // might leave. |
|
199 // ----------------------------------------------------------------------------- |
|
200 // |
|
201 TPPMMarker::TPPMMarker(): |
|
202 iZppm(0), |
|
203 iRemainder(0), |
|
204 iNppm(1), |
|
205 iIppm(0) |
|
206 { |
|
207 } |
|
208 |
|
209 // Destructor |
|
210 TPPMMarker::~TPPMMarker() |
|
211 { |
|
212 delete iIppm; |
|
213 iIppm = 0; |
|
214 } |
|
215 |
|
216 // ----------------------------------------------------------------------------- |
|
217 // TTLMMarker::TTLMMarker |
|
218 // C++ default constructor can NOT contain any code, that |
|
219 // might leave. |
|
220 // ----------------------------------------------------------------------------- |
|
221 // |
|
222 TTLMMarker::TTLMMarker() : |
|
223 iZtlm(0), |
|
224 iStlm(0), |
|
225 iTtlm(1), |
|
226 iPtlm(1) |
|
227 { |
|
228 } |
|
229 |
|
230 // Destructor |
|
231 TTLMMarker::~TTLMMarker() |
|
232 { |
|
233 iTtlm.Close(); |
|
234 iPtlm.Close(); |
|
235 } |
|
236 |
|
237 // ----------------------------------------------------------------------------- |
|
238 // TPLMMarker::TPLMMarker |
|
239 // C++ default constructor can NOT contain any code, that |
|
240 // might leave. |
|
241 // ----------------------------------------------------------------------------- |
|
242 // |
|
243 TPLMMarker::TPLMMarker() : |
|
244 iZplm(0), |
|
245 iNplm(1), |
|
246 iIplm(0) |
|
247 { |
|
248 } |
|
249 |
|
250 // Destructor |
|
251 TPLMMarker::~TPLMMarker() |
|
252 { |
|
253 delete iIplm; |
|
254 iIplm = 0; |
|
255 } |
|
256 |
|
257 // ----------------------------------------------------------------------------- |
|
258 // TPPTMarker::TPPTMarker |
|
259 // C++ default constructor can NOT contain any code, that |
|
260 // might leave. |
|
261 // ----------------------------------------------------------------------------- |
|
262 // |
|
263 TPPTMarker::TPPTMarker(): |
|
264 iZppt(0), |
|
265 iIppt(0) |
|
266 { |
|
267 } |
|
268 |
|
269 // Destructor |
|
270 TPPTMarker::~TPPTMarker() |
|
271 { |
|
272 delete iIppt; |
|
273 iIppt = 0; |
|
274 } |
|
275 |
|
276 // ----------------------------------------------------------------------------- |
|
277 // TPLTMarker::TPLTMarker |
|
278 // C++ default constructor can NOT contain any code, that |
|
279 // might leave. |
|
280 // ----------------------------------------------------------------------------- |
|
281 // |
|
282 TPLTMarker::TPLTMarker() : |
|
283 iZplt(0), |
|
284 iIplt(1) |
|
285 { |
|
286 } |
|
287 |
|
288 // Destructor |
|
289 TPLTMarker::~TPLTMarker() |
|
290 { |
|
291 iIplt.Close(); |
|
292 } |
|
293 |
|
294 // ----------------------------------------------------------------------------- |
|
295 // TCRGMarker::TCRGMarker |
|
296 // C++ default constructor can NOT contain any code, that |
|
297 // might leave. |
|
298 // ----------------------------------------------------------------------------- |
|
299 // |
|
300 TCRGMarker::TCRGMarker() : |
|
301 iXYcrg(1) |
|
302 { |
|
303 } |
|
304 |
|
305 // Destructor |
|
306 TCRGMarker::~TCRGMarker() |
|
307 { |
|
308 iXYcrg.Close(); |
|
309 } |
|
310 |
|
311 // ----------------------------------------------------------------------------- |
|
312 // TCOMMarker::TCOMMarker |
|
313 // C++ default constructor can NOT contain any code, that |
|
314 // might leave. |
|
315 // ----------------------------------------------------------------------------- |
|
316 // |
|
317 TCOMMarker::TCOMMarker() : |
|
318 iRemainder(0), |
|
319 iRcom(0), |
|
320 iCcom(0) |
|
321 { |
|
322 } |
|
323 |
|
324 // Destructor |
|
325 TCOMMarker::~TCOMMarker() |
|
326 { |
|
327 delete iCcom; |
|
328 iCcom = 0; |
|
329 } |
|
330 |
|
331 // ----------------------------------------------------------------------------- |
|
332 // TMainMarker::TMainMarker |
|
333 // C++ default constructor can NOT contain any code, that |
|
334 // might leave. |
|
335 // ----------------------------------------------------------------------------- |
|
336 // |
|
337 TMainMarker::TMainMarker(): |
|
338 iCod(), |
|
339 iQcd(), |
|
340 iCoc(3), |
|
341 iQcc(3), |
|
342 iRgn(1), |
|
343 iPoc(0), |
|
344 iPpm(1), |
|
345 iTlm(1), |
|
346 iPlm(1), |
|
347 iCrg(0), |
|
348 iCom(1) |
|
349 { |
|
350 } |
|
351 |
|
352 // Destructor |
|
353 TMainMarker::~TMainMarker() |
|
354 { |
|
355 iCoc.ResetAndDestroy(); |
|
356 iQcc.ResetAndDestroy(); |
|
357 iRgn.ResetAndDestroy(); |
|
358 |
|
359 delete iPoc; |
|
360 iPoc = 0; |
|
361 |
|
362 iPpm.ResetAndDestroy(); |
|
363 iTlm.ResetAndDestroy(); |
|
364 iPlm.ResetAndDestroy(); |
|
365 |
|
366 delete iCrg; |
|
367 iCrg = 0; |
|
368 |
|
369 iCom.ResetAndDestroy(); |
|
370 } |
|
371 |
|
372 // ----------------------------------------------------------------------------- |
|
373 // TTileMarker::TTileMarker |
|
374 // C++ default constructor can NOT contain any code, that |
|
375 // might leave. |
|
376 // ----------------------------------------------------------------------------- |
|
377 // |
|
378 TTileMarker::TTileMarker(): |
|
379 iCod(0), |
|
380 iQcd(0), |
|
381 iCoc(3), |
|
382 iQcc(3), |
|
383 iRgn(1), |
|
384 iPoc(0), |
|
385 iPpt(1), |
|
386 iPlt(1), |
|
387 iCom(1) |
|
388 { |
|
389 } |
|
390 |
|
391 // Destructor |
|
392 TTileMarker::~TTileMarker() |
|
393 { |
|
394 delete iCod; |
|
395 iCod = 0; |
|
396 |
|
397 delete iQcd; |
|
398 iQcd = 0; |
|
399 |
|
400 iCoc.ResetAndDestroy(); |
|
401 iQcc.ResetAndDestroy(); |
|
402 iRgn.ResetAndDestroy(); |
|
403 |
|
404 delete iPoc; |
|
405 iPoc =0; |
|
406 |
|
407 iPpt.ResetAndDestroy(); |
|
408 iPlt.ResetAndDestroy(); |
|
409 iCom.ResetAndDestroy(); |
|
410 } |