OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _BC_QRCODERVERSION_H_ | 7 #ifndef _BC_QRCODERVERSION_H_ |
8 #define _BC_QRCODERVERSION_H_ | 8 #define _BC_QRCODERVERSION_H_ |
9 class CBC_QRCoderECBlocks; | 9 class CBC_QRCoderECBlocks; |
10 class CBC_CommonBitMatrix; | 10 class CBC_CommonBitMatrix; |
11 class CBC_QRCoderErrorCorrectionLevel; | 11 class CBC_QRCoderErrorCorrectionLevel; |
12 class CBC_QRCoderVersion; | 12 class CBC_QRCoderVersion |
13 class CBC_QRCoderVersion : public CFX_Object | |
14 { | 13 { |
15 private: | 14 private: |
16 const static FX_INT32 VERSION_DECODE_INFO[34]; | 15 const static FX_INT32 VERSION_DECODE_INFO[34]; |
17 static CFX_PtrArray *VERSION; | 16 static CFX_PtrArray *VERSION; |
18 FX_INT32 m_versionNumber; | 17 FX_INT32 m_versionNumber; |
19 FX_INT32 m_totalCodeWords; | 18 FX_INT32 m_totalCodeWords; |
20 CFX_Int32Array m_alignmentPatternCenters; | 19 CFX_Int32Array m_alignmentPatternCenters; |
21 CFX_PtrArray m_ecBlocks; | 20 CFX_PtrArray m_ecBlocks; |
22 | 21 |
23 CBC_QRCoderVersion(); | 22 CBC_QRCoderVersion(); |
24 CBC_QRCoderVersion(FX_INT32 versionNumber, CBC_QRCoderECBlocks* ecBlocks1, C
BC_QRCoderECBlocks* ecBlocks2, | 23 CBC_QRCoderVersion(FX_INT32 versionNumber, CBC_QRCoderECBlocks* ecBlocks1, C
BC_QRCoderECBlocks* ecBlocks2, |
25 CBC_QRCoderECBlocks* ecBlocks3, CBC_QRCoderECBlocks* ecBl
ocks4); | 24 CBC_QRCoderECBlocks* ecBlocks3, CBC_QRCoderECBlocks* ecBl
ocks4); |
26 public: | 25 public: |
27 virtual ~CBC_QRCoderVersion(); | 26 virtual ~CBC_QRCoderVersion(); |
28 static void Initialize(); | 27 static void Initialize(); |
29 static void Finalize(); | 28 static void Finalize(); |
30 | 29 |
31 FX_INT32 GetVersionNumber(); | 30 FX_INT32 GetVersionNumber(); |
32 FX_INT32 GetTotalCodeWords(); | 31 FX_INT32 GetTotalCodeWords(); |
33 FX_INT32 GetDimensionForVersion(); | 32 FX_INT32 GetDimensionForVersion(); |
34 CBC_CommonBitMatrix *BuildFunctionPattern(FX_INT32 &e); | 33 CBC_CommonBitMatrix *BuildFunctionPattern(FX_INT32 &e); |
35 CFX_Int32Array* GetAlignmentPatternCenters(); | 34 CFX_Int32Array* GetAlignmentPatternCenters(); |
36 CBC_QRCoderECBlocks* GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ec
Level); | 35 CBC_QRCoderECBlocks* GetECBlocksForLevel(CBC_QRCoderErrorCorrectionLevel *ec
Level); |
37 static CBC_QRCoderVersion* GetVersionForNumber(FX_INT32 versionNumber, FX_IN
T32 &e); | 36 static CBC_QRCoderVersion* GetVersionForNumber(FX_INT32 versionNumber, FX_IN
T32 &e); |
38 static CBC_QRCoderVersion* GetProvisionalVersionForDimension(FX_INT32 dimens
ion, FX_INT32 &e); | 37 static CBC_QRCoderVersion* GetProvisionalVersionForDimension(FX_INT32 dimens
ion, FX_INT32 &e); |
39 static CBC_QRCoderVersion* DecodeVersionInformation(FX_INT32 versionBits, FX
_INT32 &e); | 38 static CBC_QRCoderVersion* DecodeVersionInformation(FX_INT32 versionBits, FX
_INT32 &e); |
40 static void Destroy(); | 39 static void Destroy(); |
41 }; | 40 }; |
42 #endif | 41 #endif |
OLD | NEW |