Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / BC_QRCoderVersion.cpp
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #include "barcode.h"\r
8 #include "include/utils.h"\r
9 #include "include/BC_QRCoderECB.h"\r
10 #include "include/BC_CommonBitMatrix.h"\r
11 #include "include/BC_QRCoderFormatInformation.h"\r
12 #include "include/BC_QRCoderErrorCorrectionLevel.h"\r
13 #include "include/BC_QRCoderBitVector.h"\r
14 #include "include/BC_QRCoderECBlocks.h"\r
15 #include "include/BC_QRCoderVersion.h"\r
16 const FX_INT32 CBC_QRCoderVersion::VERSION_DECODE_INFO[] = {\r
17     0x07C94, 0x085BC, 0x09A99, 0x0A4D3, 0x0BBF6,\r
18     0x0C762, 0x0D847, 0x0E60D, 0x0F928, 0x10B78,\r
19     0x1145D, 0x12A17, 0x13532, 0x149A6, 0x15683,\r
20     0x168C9, 0x177EC, 0x18EC4, 0x191E1, 0x1AFAB,\r
21     0x1B08E, 0x1CC1A, 0x1D33F, 0x1ED75, 0x1F250,\r
22     0x209D5, 0x216F0, 0x228BA, 0x2379F, 0x24B0B,\r
23     0x2542E, 0x26A64, 0x27541, 0x28C69\r
24 };\r
25 CFX_PtrArray *CBC_QRCoderVersion::VERSION = NULL;\r
26 void CBC_QRCoderVersion::Initialize()\r
27 {\r
28     VERSION = FX_NEW CFX_PtrArray();\r
29 }\r
30 void CBC_QRCoderVersion::Finalize()\r
31 {\r
32     for(FX_INT32 i = 0 ; i < VERSION->GetSize(); i++) {\r
33         CBC_QRCoderVersion* v = (CBC_QRCoderVersion*)(VERSION->GetAt(i));\r
34         delete v;\r
35     }\r
36     delete VERSION;\r
37 }\r
38 CBC_QRCoderVersion::CBC_QRCoderVersion(FX_INT32 versionNumber,\r
39                                        CBC_QRCoderECBlocks* ecBlocks1,\r
40                                        CBC_QRCoderECBlocks* ecBlocks2,\r
41                                        CBC_QRCoderECBlocks* ecBlocks3,\r
42                                        CBC_QRCoderECBlocks* ecBlocks4)\r
43 {\r
44     m_versionNumber = versionNumber;\r
45     m_ecBlocks.Add(ecBlocks1);\r
46     m_ecBlocks.Add(ecBlocks2);\r
47     m_ecBlocks.Add(ecBlocks3);\r
48     m_ecBlocks.Add(ecBlocks4);\r
49     FX_INT32 total = 0;\r
50     FX_INT32 ecCodeWords = ecBlocks1->GetECCodeWordsPerBlock();\r
51     CFX_PtrArray* ecbArray = ecBlocks1->GetECBlocks();\r
52     for(FX_INT32 i = 0; i < ecbArray->GetSize(); i++) {\r
53         CBC_QRCoderECB* ecBlock = (CBC_QRCoderECB*)((*ecbArray)[i]);\r
54         total += ecBlock->GetCount() * (ecBlock->GetDataCodeWords() + ecCodeWords);\r
55     }\r
56     m_totalCodeWords = total;\r
57     switch(versionNumber) {\r
58         case 1:\r
59             break;\r
60         case 2:\r
61             m_alignmentPatternCenters.Add(6);\r
62             m_alignmentPatternCenters.Add(18);\r
63             break;\r
64         case 3:\r
65             m_alignmentPatternCenters.Add(6);\r
66             m_alignmentPatternCenters.Add(22);\r
67             break;\r
68         case 4:\r
69             m_alignmentPatternCenters.Add(6);\r
70             m_alignmentPatternCenters.Add(26);\r
71             break;\r
72         case 5:\r
73             m_alignmentPatternCenters.Add(6);\r
74             m_alignmentPatternCenters.Add(30);\r
75             break;\r
76         case 6:\r
77             m_alignmentPatternCenters.Add(6);\r
78             m_alignmentPatternCenters.Add(34);\r
79             break;\r
80         case 7:\r
81             m_alignmentPatternCenters.Add(6);\r
82             m_alignmentPatternCenters.Add(22);\r
83             m_alignmentPatternCenters.Add(38);\r
84             break;\r
85         case 8:\r
86             m_alignmentPatternCenters.Add(6);\r
87             m_alignmentPatternCenters.Add(24);\r
88             m_alignmentPatternCenters.Add(42);\r
89             break;\r
90         case 9:\r
91             m_alignmentPatternCenters.Add(6);\r
92             m_alignmentPatternCenters.Add(26);\r
93             m_alignmentPatternCenters.Add(46);\r
94             break;\r
95         case 10:\r
96             m_alignmentPatternCenters.Add(6);\r
97             m_alignmentPatternCenters.Add(28);\r
98             m_alignmentPatternCenters.Add(50);\r
99             break;\r
100         case 11:\r
101             m_alignmentPatternCenters.Add(6);\r
102             m_alignmentPatternCenters.Add(30);\r
103             m_alignmentPatternCenters.Add(54);\r
104             break;\r
105         case 12:\r
106             m_alignmentPatternCenters.Add(6);\r
107             m_alignmentPatternCenters.Add(32);\r
108             m_alignmentPatternCenters.Add(58);\r
109             break;\r
110         case 13:\r
111             m_alignmentPatternCenters.Add(6);\r
112             m_alignmentPatternCenters.Add(34);\r
113             m_alignmentPatternCenters.Add(62);\r
114             break;\r
115         case 14:\r
116             m_alignmentPatternCenters.Add(6);\r
117             m_alignmentPatternCenters.Add(26);\r
118             m_alignmentPatternCenters.Add(46);\r
119             m_alignmentPatternCenters.Add(66);\r
120             break;\r
121         case 15:\r
122             m_alignmentPatternCenters.Add(6);\r
123             m_alignmentPatternCenters.Add(26);\r
124             m_alignmentPatternCenters.Add(48);\r
125             m_alignmentPatternCenters.Add(70);\r
126             break;\r
127         case 16:\r
128             m_alignmentPatternCenters.Add(6);\r
129             m_alignmentPatternCenters.Add(26);\r
130             m_alignmentPatternCenters.Add(50);\r
131             m_alignmentPatternCenters.Add(74);\r
132             break;\r
133         case 17:\r
134             m_alignmentPatternCenters.Add(6);\r
135             m_alignmentPatternCenters.Add(30);\r
136             m_alignmentPatternCenters.Add(54);\r
137             m_alignmentPatternCenters.Add(78);\r
138             break;\r
139         case 18:\r
140             m_alignmentPatternCenters.Add(6);\r
141             m_alignmentPatternCenters.Add(30);\r
142             m_alignmentPatternCenters.Add(56);\r
143             m_alignmentPatternCenters.Add(82);\r
144             break;\r
145         case 19:\r
146             m_alignmentPatternCenters.Add(6);\r
147             m_alignmentPatternCenters.Add(30);\r
148             m_alignmentPatternCenters.Add(58);\r
149             m_alignmentPatternCenters.Add(86);\r
150             break;\r
151         case 20:\r
152             m_alignmentPatternCenters.Add(6);\r
153             m_alignmentPatternCenters.Add(34);\r
154             m_alignmentPatternCenters.Add(62);\r
155             m_alignmentPatternCenters.Add(90);\r
156             break;\r
157         case 21:\r
158             m_alignmentPatternCenters.Add(6);\r
159             m_alignmentPatternCenters.Add(28);\r
160             m_alignmentPatternCenters.Add(50);\r
161             m_alignmentPatternCenters.Add(72);\r
162             m_alignmentPatternCenters.Add(94);\r
163             break;\r
164         case 22:\r
165             m_alignmentPatternCenters.Add(6);\r
166             m_alignmentPatternCenters.Add(26);\r
167             m_alignmentPatternCenters.Add(50);\r
168             m_alignmentPatternCenters.Add(74);\r
169             m_alignmentPatternCenters.Add(98);\r
170             break;\r
171         case 23:\r
172             m_alignmentPatternCenters.Add(6);\r
173             m_alignmentPatternCenters.Add(30);\r
174             m_alignmentPatternCenters.Add(54);\r
175             m_alignmentPatternCenters.Add(74);\r
176             m_alignmentPatternCenters.Add(102);\r
177             break;\r
178         case 24:\r
179             m_alignmentPatternCenters.Add(6);\r
180             m_alignmentPatternCenters.Add(28);\r
181             m_alignmentPatternCenters.Add(54);\r
182             m_alignmentPatternCenters.Add(80);\r
183             m_alignmentPatternCenters.Add(106);\r
184             break;\r
185         case 25:\r
186             m_alignmentPatternCenters.Add(6);\r
187             m_alignmentPatternCenters.Add(32);\r
188             m_alignmentPatternCenters.Add(58);\r
189             m_alignmentPatternCenters.Add(84);\r
190             m_alignmentPatternCenters.Add(110);\r
191             break;\r
192         case 26:\r
193             m_alignmentPatternCenters.Add(6);\r
194             m_alignmentPatternCenters.Add(30);\r
195             m_alignmentPatternCenters.Add(58);\r
196             m_alignmentPatternCenters.Add(86);\r
197             m_alignmentPatternCenters.Add(114);\r
198             break;\r
199         case 27:\r
200             m_alignmentPatternCenters.Add(6);\r
201             m_alignmentPatternCenters.Add(34);\r
202             m_alignmentPatternCenters.Add(62);\r
203             m_alignmentPatternCenters.Add(90);\r
204             m_alignmentPatternCenters.Add(118);\r
205             break;\r
206         case 28:\r
207             m_alignmentPatternCenters.Add(6);\r
208             m_alignmentPatternCenters.Add(26);\r
209             m_alignmentPatternCenters.Add(50);\r
210             m_alignmentPatternCenters.Add(74);\r
211             m_alignmentPatternCenters.Add(98);\r
212             m_alignmentPatternCenters.Add(122);\r
213             break;\r
214         case 29:\r
215             m_alignmentPatternCenters.Add(6);\r
216             m_alignmentPatternCenters.Add(30);\r
217             m_alignmentPatternCenters.Add(54);\r
218             m_alignmentPatternCenters.Add(78);\r
219             m_alignmentPatternCenters.Add(102);\r
220             m_alignmentPatternCenters.Add(126);\r
221             break;\r
222         case 30:\r
223             m_alignmentPatternCenters.Add(6);\r
224             m_alignmentPatternCenters.Add(26);\r
225             m_alignmentPatternCenters.Add(52);\r
226             m_alignmentPatternCenters.Add(78);\r
227             m_alignmentPatternCenters.Add(104);\r
228             m_alignmentPatternCenters.Add(130);\r
229             break;\r
230         case 31:\r
231             m_alignmentPatternCenters.Add(6);\r
232             m_alignmentPatternCenters.Add(30);\r
233             m_alignmentPatternCenters.Add(56);\r
234             m_alignmentPatternCenters.Add(82);\r
235             m_alignmentPatternCenters.Add(108);\r
236             m_alignmentPatternCenters.Add(134);\r
237             break;\r
238         case 32:\r
239             m_alignmentPatternCenters.Add(6);\r
240             m_alignmentPatternCenters.Add(34);\r
241             m_alignmentPatternCenters.Add(60);\r
242             m_alignmentPatternCenters.Add(86);\r
243             m_alignmentPatternCenters.Add(112);\r
244             m_alignmentPatternCenters.Add(138);\r
245             break;\r
246         case 33:\r
247             m_alignmentPatternCenters.Add(6);\r
248             m_alignmentPatternCenters.Add(30);\r
249             m_alignmentPatternCenters.Add(58);\r
250             m_alignmentPatternCenters.Add(86);\r
251             m_alignmentPatternCenters.Add(114);\r
252             m_alignmentPatternCenters.Add(142);\r
253             break;\r
254         case 34:\r
255             m_alignmentPatternCenters.Add(6);\r
256             m_alignmentPatternCenters.Add(34);\r
257             m_alignmentPatternCenters.Add(62);\r
258             m_alignmentPatternCenters.Add(90);\r
259             m_alignmentPatternCenters.Add(118);\r
260             m_alignmentPatternCenters.Add(146);\r
261             break;\r
262         case 35:\r
263             m_alignmentPatternCenters.Add(6);\r
264             m_alignmentPatternCenters.Add(30);\r
265             m_alignmentPatternCenters.Add(54);\r
266             m_alignmentPatternCenters.Add(78);\r
267             m_alignmentPatternCenters.Add(102);\r
268             m_alignmentPatternCenters.Add(126);\r
269             m_alignmentPatternCenters.Add(150);\r
270             break;\r
271         case 36:\r
272             m_alignmentPatternCenters.Add(6);\r
273             m_alignmentPatternCenters.Add(24);\r
274             m_alignmentPatternCenters.Add(50);\r
275             m_alignmentPatternCenters.Add(76);\r
276             m_alignmentPatternCenters.Add(102);\r
277             m_alignmentPatternCenters.Add(128);\r
278             m_alignmentPatternCenters.Add(154);\r
279             break;\r
280         case 37:\r
281             m_alignmentPatternCenters.Add(6);\r
282             m_alignmentPatternCenters.Add(28);\r
283             m_alignmentPatternCenters.Add(54);\r
284             m_alignmentPatternCenters.Add(80);\r
285             m_alignmentPatternCenters.Add(106);\r
286             m_alignmentPatternCenters.Add(132);\r
287             m_alignmentPatternCenters.Add(158);\r
288             break;\r
289         case 38:\r
290             m_alignmentPatternCenters.Add(6);\r
291             m_alignmentPatternCenters.Add(32);\r
292             m_alignmentPatternCenters.Add(58);\r
293             m_alignmentPatternCenters.Add(84);\r
294             m_alignmentPatternCenters.Add(110);\r
295             m_alignmentPatternCenters.Add(136);\r
296             m_alignmentPatternCenters.Add(162);\r
297             break;\r
298         case 39:\r
299             m_alignmentPatternCenters.Add(6);\r
300             m_alignmentPatternCenters.Add(26);\r
301             m_alignmentPatternCenters.Add(54);\r
302             m_alignmentPatternCenters.Add(82);\r
303             m_alignmentPatternCenters.Add(110);\r
304             m_alignmentPatternCenters.Add(138);\r
305             m_alignmentPatternCenters.Add(166);\r
306             break;\r
307         case 40:\r
308             m_alignmentPatternCenters.Add(6);\r
309             m_alignmentPatternCenters.Add(30);\r
310             m_alignmentPatternCenters.Add(58);\r
311             m_alignmentPatternCenters.Add(86);\r
312             m_alignmentPatternCenters.Add(114);\r
313             m_alignmentPatternCenters.Add(142);\r
314             m_alignmentPatternCenters.Add(170);\r
315             break;\r
316     }\r
317 }\r
318 CBC_QRCoderVersion::~CBC_QRCoderVersion()\r
319 {\r
320     if(m_ecBlocks.GetSize() != 0) {\r
321         FX_INT32 itBeg = 0;\r
322         FX_INT32 itEnd = m_ecBlocks.GetSize();\r
323         while(itBeg != itEnd) {\r
324             delete ( (CBC_QRCoderECBlocks*)(m_ecBlocks[itBeg]) );\r
325             itBeg++;\r
326         }\r
327     }\r
328 }\r
329 FX_INT32 CBC_QRCoderVersion::GetVersionNumber()\r
330 {\r
331     return m_versionNumber;\r
332 }\r
333 CFX_Int32Array* CBC_QRCoderVersion::GetAlignmentPatternCenters()\r
334 {\r
335     return &m_alignmentPatternCenters;\r
336 }\r
337 FX_INT32 CBC_QRCoderVersion::GetTotalCodeWords()\r
338 {\r
339     return m_totalCodeWords;\r
340 }\r
341 FX_INT32 CBC_QRCoderVersion::GetDimensionForVersion()\r
342 {\r
343     return 17 + 4 * m_versionNumber;\r
344 }\r
345 CBC_QRCoderECBlocks* CBC_QRCoderVersion::GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ecLevel)\r
346 {\r
347     return (CBC_QRCoderECBlocks*)m_ecBlocks[ecLevel->Ordinal()];\r
348 }\r
349 CBC_QRCoderVersion* CBC_QRCoderVersion::GetProvisionalVersionForDimension(FX_INT32 dimension, FX_INT32 &e)\r
350 {\r
351     if((dimension % 4) != 1) {\r
352         e = BCExceptionRead;\r
353         BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
354     }\r
355     CBC_QRCoderVersion* qcv = GetVersionForNumber((dimension - 17) >> 2, e);\r
356     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
357     return qcv;\r
358 }\r
359 CBC_QRCoderVersion* CBC_QRCoderVersion::DecodeVersionInformation(FX_INT32 versionBits, FX_INT32 &e)\r
360 {\r
361     FX_INT32 bestDifference = FXSYS_IntMax;\r
362     FX_INT32 bestVersion = 0;\r
363     for (FX_INT32 i = 0; i < 34; i++) {\r
364         FX_INT32 targetVersion = VERSION_DECODE_INFO[i];\r
365         if(targetVersion == versionBits) {\r
366             CBC_QRCoderVersion* qcv = GetVersionForNumber(i + 7, e);\r
367             BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
368             return qcv;\r
369         }\r
370         FX_INT32 bitsDifference = CBC_QRCoderFormatInformation::NumBitsDiffering(versionBits, targetVersion);\r
371         if(bitsDifference < bestDifference) {\r
372             bestVersion = i + 7;\r
373             bestDifference = bitsDifference;\r
374         }\r
375     }\r
376     if(bestDifference <= 3) {\r
377         CBC_QRCoderVersion* qcv = GetVersionForNumber(bestVersion, e);\r
378         BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
379         return qcv;\r
380     }\r
381     return NULL;\r
382 }\r
383 CBC_CommonBitMatrix* CBC_QRCoderVersion::BuildFunctionPattern(FX_INT32 &e)\r
384 {\r
385     FX_INT32 dimension = GetDimensionForVersion();\r
386     CBC_CommonBitMatrix* bitMatrix = FX_NEW CBC_CommonBitMatrix();\r
387     bitMatrix->Init(dimension);\r
388     bitMatrix->SetRegion(0, 0 , 9, 9, e);\r
389     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
390     bitMatrix->SetRegion(dimension - 8, 0, 8, 9, e);\r
391     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
392     bitMatrix->SetRegion(0, dimension - 8, 9, 8, e);\r
393     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
394     FX_INT32 max = m_alignmentPatternCenters.GetSize();\r
395     for (FX_INT32 x = 0; x < max; x++) {\r
396         FX_INT32 i = m_alignmentPatternCenters[x] - 2;\r
397         for (FX_INT32 y = 0; y < max; y++) {\r
398             if ((x == 0 && (y == 0 || y == max - 1)) || (x == max - 1 && y == 0)) {\r
399                 continue;\r
400             }\r
401             bitMatrix->SetRegion(m_alignmentPatternCenters[y] - 2, i, 5, 5, e);\r
402             BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
403         }\r
404     }\r
405     bitMatrix->SetRegion(6, 9, 1, dimension - 17, e);\r
406     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
407     bitMatrix->SetRegion(9, 6, dimension - 17, 1, e);\r
408     BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
409     if (m_versionNumber > 6) {\r
410         bitMatrix->SetRegion(dimension - 11, 0, 3, 6, e);\r
411         BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
412         bitMatrix->SetRegion(0, dimension - 11, 6, 3, e);\r
413         BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
414     }\r
415     return bitMatrix;\r
416 }\r
417 CBC_QRCoderVersion* CBC_QRCoderVersion::GetVersionForNumber(FX_INT32 versionNumber, FX_INT32 &e)\r
418 {\r
419     if(VERSION->GetSize() == 0) {\r
420         VERSION->Add(FX_NEW CBC_QRCoderVersion(1,\r
421                                                FX_NEW CBC_QRCoderECBlocks(7, FX_NEW CBC_QRCoderECB(1, 19)),\r
422                                                FX_NEW CBC_QRCoderECBlocks(10, FX_NEW CBC_QRCoderECB(1, 16)),\r
423                                                FX_NEW CBC_QRCoderECBlocks(13, FX_NEW CBC_QRCoderECB(1, 13)),\r
424                                                FX_NEW CBC_QRCoderECBlocks(17, FX_NEW CBC_QRCoderECB(1, 9))));\r
425         VERSION->Add(FX_NEW CBC_QRCoderVersion(2,\r
426                                                FX_NEW CBC_QRCoderECBlocks(10, FX_NEW CBC_QRCoderECB(1, 34)),\r
427                                                FX_NEW CBC_QRCoderECBlocks(16, FX_NEW CBC_QRCoderECB(1, 28)),\r
428                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(1, 22)),\r
429                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(1, 16))));\r
430         VERSION->Add(FX_NEW CBC_QRCoderVersion(3,\r
431                                                FX_NEW CBC_QRCoderECBlocks(15, FX_NEW CBC_QRCoderECB(1, 55)),\r
432                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(1, 44)),\r
433                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 17)),\r
434                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(2, 13))));\r
435         VERSION->Add(FX_NEW CBC_QRCoderVersion(4,\r
436                                                FX_NEW CBC_QRCoderECBlocks(20, FX_NEW CBC_QRCoderECB(1, 80)),\r
437                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 32)),\r
438                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(2, 24)),\r
439                                                FX_NEW CBC_QRCoderECBlocks(16, FX_NEW CBC_QRCoderECB(4, 9))));\r
440         VERSION->Add(FX_NEW CBC_QRCoderVersion(5,\r
441                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(1, 108)),\r
442                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(2, 43)),\r
443                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 15),\r
444                                                        FX_NEW CBC_QRCoderECB(2, 16)),\r
445                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(2, 11),\r
446                                                        FX_NEW CBC_QRCoderECB(2, 12))));\r
447         VERSION->Add(FX_NEW CBC_QRCoderVersion(6,\r
448                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 68)),\r
449                                                FX_NEW CBC_QRCoderECBlocks(16, FX_NEW CBC_QRCoderECB(4, 27)),\r
450                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(4, 19)),\r
451                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(4, 15))));\r
452         VERSION->Add(FX_NEW CBC_QRCoderVersion(7,\r
453                                                FX_NEW CBC_QRCoderECBlocks(20, FX_NEW CBC_QRCoderECB(2, 78)),\r
454                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(4, 31)),\r
455                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 14),\r
456                                                        FX_NEW CBC_QRCoderECB(4, 15)),\r
457                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(4, 13),\r
458                                                        FX_NEW CBC_QRCoderECB(1, 14))));\r
459         VERSION->Add(FX_NEW CBC_QRCoderVersion(8,\r
460                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(2, 97)),\r
461                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(2, 38),\r
462                                                        FX_NEW CBC_QRCoderECB(2, 39)),\r
463                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(4, 18),\r
464                                                        FX_NEW CBC_QRCoderECB(2, 19)),\r
465                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(4, 14),\r
466                                                        FX_NEW CBC_QRCoderECB(2, 15))));\r
467         VERSION->Add(FX_NEW CBC_QRCoderVersion(9,\r
468                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(2, 116)),\r
469                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(3, 36),\r
470                                                        FX_NEW CBC_QRCoderECB(2, 37)),\r
471                                                FX_NEW CBC_QRCoderECBlocks(20, FX_NEW CBC_QRCoderECB(4, 16),\r
472                                                        FX_NEW CBC_QRCoderECB(4, 17)),\r
473                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(4, 12),\r
474                                                        FX_NEW CBC_QRCoderECB(4, 13))));\r
475         VERSION->Add(FX_NEW CBC_QRCoderVersion(10,\r
476                                                FX_NEW CBC_QRCoderECBlocks(18, FX_NEW CBC_QRCoderECB(2, 68),\r
477                                                        FX_NEW CBC_QRCoderECB(2, 69)),\r
478                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(4, 43),\r
479                                                        FX_NEW CBC_QRCoderECB(1, 44)),\r
480                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(6, 19),\r
481                                                        FX_NEW CBC_QRCoderECB(2, 20)),\r
482                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(6, 15),\r
483                                                        FX_NEW CBC_QRCoderECB(2, 16))));\r
484         VERSION->Add(FX_NEW CBC_QRCoderVersion(11,\r
485                                                FX_NEW CBC_QRCoderECBlocks(20, FX_NEW CBC_QRCoderECB(4, 81)),\r
486                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(1, 50),\r
487                                                        FX_NEW CBC_QRCoderECB(4, 51)),\r
488                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(4, 22),\r
489                                                        FX_NEW CBC_QRCoderECB(4, 23)),\r
490                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(3, 12),\r
491                                                        FX_NEW CBC_QRCoderECB(8, 13))));\r
492         VERSION->Add(FX_NEW CBC_QRCoderVersion(12,\r
493                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(2, 92),\r
494                                                        FX_NEW CBC_QRCoderECB(2, 93)),\r
495                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(6, 36),\r
496                                                        FX_NEW CBC_QRCoderECB(2, 37)),\r
497                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(4, 20),\r
498                                                        FX_NEW CBC_QRCoderECB(6, 21)),\r
499                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(7, 14),\r
500                                                        FX_NEW CBC_QRCoderECB(4, 15))));\r
501         VERSION->Add(FX_NEW CBC_QRCoderVersion(13,\r
502                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(4, 107)),\r
503                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(8, 37),\r
504                                                        FX_NEW CBC_QRCoderECB(1, 38)),\r
505                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(8, 20),\r
506                                                        FX_NEW CBC_QRCoderECB(4, 21)),\r
507                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(12, 11),\r
508                                                        FX_NEW CBC_QRCoderECB(4, 12))));\r
509         VERSION->Add(FX_NEW CBC_QRCoderVersion(14,\r
510                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(3, 115),\r
511                                                        FX_NEW CBC_QRCoderECB(1, 116)),\r
512                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(4, 40),\r
513                                                        FX_NEW CBC_QRCoderECB(5, 41)),\r
514                                                FX_NEW CBC_QRCoderECBlocks(20, FX_NEW CBC_QRCoderECB(11, 16),\r
515                                                        FX_NEW CBC_QRCoderECB(5, 17)),\r
516                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(11, 12),\r
517                                                        FX_NEW CBC_QRCoderECB(5, 13))));\r
518         VERSION->Add(FX_NEW CBC_QRCoderVersion(15,\r
519                                                FX_NEW CBC_QRCoderECBlocks(22, FX_NEW CBC_QRCoderECB(5, 87),\r
520                                                        FX_NEW CBC_QRCoderECB(1, 88)),\r
521                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(5, 41),\r
522                                                        FX_NEW CBC_QRCoderECB(5, 42)),\r
523                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(5, 24),\r
524                                                        FX_NEW CBC_QRCoderECB(7, 25)),\r
525                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(11, 12),\r
526                                                        FX_NEW CBC_QRCoderECB(7, 13))));\r
527         VERSION->Add(FX_NEW CBC_QRCoderVersion(16,\r
528                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(5, 98),\r
529                                                        FX_NEW CBC_QRCoderECB(1, 99)),\r
530                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(7, 45),\r
531                                                        FX_NEW CBC_QRCoderECB(3, 46)),\r
532                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(15, 19),\r
533                                                        FX_NEW CBC_QRCoderECB(2, 20)),\r
534                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(3, 15),\r
535                                                        FX_NEW CBC_QRCoderECB(13, 16))));\r
536         VERSION->Add(FX_NEW CBC_QRCoderVersion(17,\r
537                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(1, 107),\r
538                                                        FX_NEW CBC_QRCoderECB(5, 108)),\r
539                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(10, 46),\r
540                                                        FX_NEW CBC_QRCoderECB(1, 47)),\r
541                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(1, 22),\r
542                                                        FX_NEW CBC_QRCoderECB(15, 23)),\r
543                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(2, 14),\r
544                                                        FX_NEW CBC_QRCoderECB(17, 15))));\r
545         VERSION->Add(FX_NEW CBC_QRCoderVersion(18,\r
546                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(5, 120),\r
547                                                        FX_NEW CBC_QRCoderECB(1, 121)),\r
548                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(9, 43),\r
549                                                        FX_NEW CBC_QRCoderECB(4, 44)),\r
550                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(17, 22),\r
551                                                        FX_NEW CBC_QRCoderECB(1, 23)),\r
552                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(2, 14),\r
553                                                        FX_NEW CBC_QRCoderECB(19, 15))));\r
554         VERSION->Add(FX_NEW CBC_QRCoderVersion(19,\r
555                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(3, 113),\r
556                                                        FX_NEW CBC_QRCoderECB(4, 114)),\r
557                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(3, 44),\r
558                                                        FX_NEW CBC_QRCoderECB(11, 45)),\r
559                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(17, 21),\r
560                                                        FX_NEW CBC_QRCoderECB(4, 22)),\r
561                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(9, 13),\r
562                                                        FX_NEW CBC_QRCoderECB(16, 14))));\r
563         VERSION->Add(FX_NEW CBC_QRCoderVersion(20,\r
564                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(3, 107),\r
565                                                        FX_NEW CBC_QRCoderECB(5, 108)),\r
566                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(3, 41),\r
567                                                        FX_NEW CBC_QRCoderECB(13, 42)),\r
568                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(15, 24),\r
569                                                        FX_NEW CBC_QRCoderECB(5, 25)),\r
570                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(15, 15),\r
571                                                        FX_NEW CBC_QRCoderECB(10, 16))));\r
572         VERSION->Add(FX_NEW CBC_QRCoderVersion(21,\r
573                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(4, 116),\r
574                                                        FX_NEW CBC_QRCoderECB(4, 117)),\r
575                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(17, 42)),\r
576                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(17, 22),\r
577                                                        FX_NEW CBC_QRCoderECB(6, 23)),\r
578                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(19, 16),\r
579                                                        FX_NEW CBC_QRCoderECB(6, 17))));\r
580         VERSION->Add(FX_NEW CBC_QRCoderVersion(22,\r
581                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(2, 111),\r
582                                                        FX_NEW CBC_QRCoderECB(7, 112)),\r
583                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(17, 46)),\r
584                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(7, 24),\r
585                                                        FX_NEW CBC_QRCoderECB(16, 25)),\r
586                                                FX_NEW CBC_QRCoderECBlocks(24, FX_NEW CBC_QRCoderECB(34, 13))));\r
587         VERSION->Add(FX_NEW CBC_QRCoderVersion(23,\r
588                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(4, 121),\r
589                                                        FX_NEW CBC_QRCoderECB(5, 122)),\r
590                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(4, 47),\r
591                                                        FX_NEW CBC_QRCoderECB(14, 48)),\r
592                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(11, 24),\r
593                                                        FX_NEW CBC_QRCoderECB(14, 25)),\r
594                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(16, 15),\r
595                                                        FX_NEW CBC_QRCoderECB(14, 16))));\r
596         VERSION->Add(FX_NEW CBC_QRCoderVersion(24,\r
597                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(6, 117),\r
598                                                        FX_NEW CBC_QRCoderECB(4, 118)),\r
599                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(6, 45),\r
600                                                        FX_NEW CBC_QRCoderECB(14, 46)),\r
601                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(11, 24),\r
602                                                        FX_NEW CBC_QRCoderECB(16, 25)),\r
603                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(30, 16),\r
604                                                        FX_NEW CBC_QRCoderECB(2, 17))));\r
605         VERSION->Add(FX_NEW CBC_QRCoderVersion(25,\r
606                                                FX_NEW CBC_QRCoderECBlocks(26, FX_NEW CBC_QRCoderECB(8, 106),\r
607                                                        FX_NEW CBC_QRCoderECB(4, 107)),\r
608                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(8, 47),\r
609                                                        FX_NEW CBC_QRCoderECB(13, 48)),\r
610                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(7, 24),\r
611                                                        FX_NEW CBC_QRCoderECB(22, 25)),\r
612                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(22, 15),\r
613                                                        FX_NEW CBC_QRCoderECB(13, 16))));\r
614         VERSION->Add(FX_NEW CBC_QRCoderVersion(26,\r
615                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(10, 114),\r
616                                                        FX_NEW CBC_QRCoderECB(2, 115)),\r
617                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(19, 46),\r
618                                                        FX_NEW CBC_QRCoderECB(4, 47)),\r
619                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(28, 22),\r
620                                                        FX_NEW CBC_QRCoderECB(6, 23)),\r
621                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(33, 16),\r
622                                                        FX_NEW CBC_QRCoderECB(4, 17))));\r
623         VERSION->Add(FX_NEW CBC_QRCoderVersion(27,\r
624                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(8, 122),\r
625                                                        FX_NEW CBC_QRCoderECB(4, 123)),\r
626                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(22, 45),\r
627                                                        FX_NEW CBC_QRCoderECB(3, 46)),\r
628                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(8, 23),\r
629                                                        FX_NEW CBC_QRCoderECB(26, 24)),\r
630                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(12, 15),\r
631                                                        FX_NEW CBC_QRCoderECB(28, 16))));\r
632         VERSION->Add(FX_NEW CBC_QRCoderVersion(28,\r
633                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(3, 117),\r
634                                                        FX_NEW CBC_QRCoderECB(10, 118)),\r
635                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(3, 45),\r
636                                                        FX_NEW CBC_QRCoderECB(23, 46)),\r
637                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(4, 24),\r
638                                                        FX_NEW CBC_QRCoderECB(31, 25)),\r
639                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(11, 15),\r
640                                                        FX_NEW CBC_QRCoderECB(31, 16))));\r
641         VERSION->Add(FX_NEW CBC_QRCoderVersion(29,\r
642                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(7, 116),\r
643                                                        FX_NEW CBC_QRCoderECB(7, 117)),\r
644                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(21, 45),\r
645                                                        FX_NEW CBC_QRCoderECB(7, 46)),\r
646                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(1, 23),\r
647                                                        FX_NEW CBC_QRCoderECB(37, 24)),\r
648                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(19, 15),\r
649                                                        FX_NEW CBC_QRCoderECB(26, 16))));\r
650         VERSION->Add(FX_NEW CBC_QRCoderVersion(30,\r
651                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(5, 115),\r
652                                                        FX_NEW CBC_QRCoderECB(10, 116)),\r
653                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(19, 47),\r
654                                                        FX_NEW CBC_QRCoderECB(10, 48)),\r
655                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(15, 24),\r
656                                                        FX_NEW CBC_QRCoderECB(25, 25)),\r
657                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(23, 15),\r
658                                                        FX_NEW CBC_QRCoderECB(25, 16))));\r
659         VERSION->Add(FX_NEW CBC_QRCoderVersion(31,\r
660                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(13, 115),\r
661                                                        FX_NEW CBC_QRCoderECB(3, 116)),\r
662                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(2, 46),\r
663                                                        FX_NEW CBC_QRCoderECB(29, 47)),\r
664                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(42, 24),\r
665                                                        FX_NEW CBC_QRCoderECB(1, 25)),\r
666                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(23, 15),\r
667                                                        FX_NEW CBC_QRCoderECB(28, 16))));\r
668         VERSION->Add(FX_NEW CBC_QRCoderVersion(32,\r
669                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(17, 115)),\r
670                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(10, 46),\r
671                                                        FX_NEW CBC_QRCoderECB(23, 47)),\r
672                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(10, 24),\r
673                                                        FX_NEW CBC_QRCoderECB(35, 25)),\r
674                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(19, 15),\r
675                                                        FX_NEW CBC_QRCoderECB(35, 16))));\r
676         VERSION->Add(FX_NEW CBC_QRCoderVersion(33,\r
677                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(17, 115),\r
678                                                        FX_NEW CBC_QRCoderECB(1, 116)),\r
679                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(14, 46),\r
680                                                        FX_NEW CBC_QRCoderECB(21, 47)),\r
681                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(29, 24),\r
682                                                        FX_NEW CBC_QRCoderECB(19, 25)),\r
683                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(11, 15),\r
684                                                        FX_NEW CBC_QRCoderECB(46, 16))));\r
685         VERSION->Add(FX_NEW CBC_QRCoderVersion(34,\r
686                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(13, 115),\r
687                                                        FX_NEW CBC_QRCoderECB(6, 116)),\r
688                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(14, 46),\r
689                                                        FX_NEW CBC_QRCoderECB(23, 47)),\r
690                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(44, 24),\r
691                                                        FX_NEW CBC_QRCoderECB(7, 25)),\r
692                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(59, 16),\r
693                                                        FX_NEW CBC_QRCoderECB(1, 17))));\r
694         VERSION->Add(FX_NEW CBC_QRCoderVersion(35,\r
695                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(12, 121),\r
696                                                        FX_NEW CBC_QRCoderECB(7, 122)),\r
697                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(12, 47),\r
698                                                        FX_NEW CBC_QRCoderECB(26, 48)),\r
699                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(39, 24),\r
700                                                        FX_NEW CBC_QRCoderECB(14, 25)),\r
701                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(22, 15),\r
702                                                        FX_NEW CBC_QRCoderECB(41, 16))));\r
703         VERSION->Add(FX_NEW CBC_QRCoderVersion(36,\r
704                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(6, 121),\r
705                                                        FX_NEW CBC_QRCoderECB(14, 122)),\r
706                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(6, 47),\r
707                                                        FX_NEW CBC_QRCoderECB(34, 48)),\r
708                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(46, 24),\r
709                                                        FX_NEW CBC_QRCoderECB(10, 25)),\r
710                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(2, 15),\r
711                                                        FX_NEW CBC_QRCoderECB(64, 16))));\r
712         VERSION->Add(FX_NEW CBC_QRCoderVersion(37,\r
713                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(17, 122),\r
714                                                        FX_NEW CBC_QRCoderECB(4, 123)),\r
715                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(29, 46),\r
716                                                        FX_NEW CBC_QRCoderECB(14, 47)),\r
717                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(49, 24),\r
718                                                        FX_NEW CBC_QRCoderECB(10, 25)),\r
719                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(24, 15),\r
720                                                        FX_NEW CBC_QRCoderECB(46, 16))));\r
721         VERSION->Add(FX_NEW CBC_QRCoderVersion(38,\r
722                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(4, 122),\r
723                                                        FX_NEW CBC_QRCoderECB(18, 123)),\r
724                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(13, 46),\r
725                                                        FX_NEW CBC_QRCoderECB(32, 47)),\r
726                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(48, 24),\r
727                                                        FX_NEW CBC_QRCoderECB(14, 25)),\r
728                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(42, 15),\r
729                                                        FX_NEW CBC_QRCoderECB(32, 16))));\r
730         VERSION->Add(FX_NEW CBC_QRCoderVersion(39,\r
731                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(20, 117),\r
732                                                        FX_NEW CBC_QRCoderECB(4, 118)),\r
733                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(40, 47),\r
734                                                        FX_NEW CBC_QRCoderECB(7, 48)),\r
735                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(43, 24),\r
736                                                        FX_NEW CBC_QRCoderECB(22, 25)),\r
737                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(10, 15),\r
738                                                        FX_NEW CBC_QRCoderECB(67, 16))));\r
739         VERSION->Add(FX_NEW CBC_QRCoderVersion(40,\r
740                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(19, 118),\r
741                                                        FX_NEW CBC_QRCoderECB(6, 119)),\r
742                                                FX_NEW CBC_QRCoderECBlocks(28, FX_NEW CBC_QRCoderECB(18, 47),\r
743                                                        FX_NEW CBC_QRCoderECB(31, 48)),\r
744                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(34, 24),\r
745                                                        FX_NEW CBC_QRCoderECB(34, 25)),\r
746                                                FX_NEW CBC_QRCoderECBlocks(30, FX_NEW CBC_QRCoderECB(20, 15),\r
747                                                        FX_NEW CBC_QRCoderECB(61, 16))));\r
748     }\r
749     if(versionNumber < 1 || versionNumber > 40) {\r
750         e = BCExceptionIllegalArgument;\r
751         BC_EXCEPTION_CHECK_ReturnValue(e, NULL);\r
752     }\r
753     return  (CBC_QRCoderVersion*)(*VERSION)[versionNumber - 1];\r
754 }\r
755 void CBC_QRCoderVersion::Destroy()\r
756 {\r
757     FX_INT32 i;\r
758     for(i = 0; i < VERSION->GetSize(); i++) {\r
759         delete ( (CBC_QRCoderVersion*)(*VERSION)[i] );\r
760     }\r
761 }\r