OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_SRC_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | |
8 #define XFA_SRC_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | |
9 | |
10 #include "core/include/fxcrt/fx_string.h" | |
11 #include "core/include/fxcrt/fx_system.h" | |
12 #include "xfa/src/fxbarcode/datamatrix/BC_SymbolShapeHint.h" | |
13 | |
14 class CBC_Dimension; | |
15 | |
16 class CBC_SymbolInfo : public CBC_SymbolShapeHint { | |
17 public: | |
18 CBC_SymbolInfo(FX_BOOL rectangular, | |
19 int32_t dataCapacity, | |
20 int32_t errorCodewords, | |
21 int32_t matrixWidth, | |
22 int32_t matrixHeight, | |
23 int32_t dataRegions); | |
24 virtual ~CBC_SymbolInfo(); | |
25 static void Initialize(); | |
26 static void Finalize(); | |
27 static void overrideSymbolSet(CBC_SymbolInfo* override); | |
28 static CBC_SymbolInfo* lookup(int32_t dataCodewords, int32_t& e); | |
29 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | |
30 SymbolShapeHint shape, | |
31 int32_t& e); | |
32 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | |
33 FX_BOOL allowRectangular, | |
34 FX_BOOL fail, | |
35 int32_t& e); | |
36 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | |
37 SymbolShapeHint shape, | |
38 FX_BOOL fail, | |
39 int32_t& e); | |
40 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | |
41 SymbolShapeHint shape, | |
42 CBC_Dimension* minSize, | |
43 CBC_Dimension* maxSize, | |
44 FX_BOOL fail, | |
45 int32_t& e); | |
46 int32_t getHorizontalDataRegions(int32_t& e); | |
47 int32_t getVerticalDataRegions(int32_t& e); | |
48 int32_t getSymbolDataWidth(int32_t& e); | |
49 int32_t getSymbolDataHeight(int32_t& e); | |
50 int32_t getSymbolWidth(int32_t& e); | |
51 int32_t getSymbolHeight(int32_t& e); | |
52 int32_t getCodewordCount(); | |
53 int32_t getInterleavedBlockCount(); | |
54 int32_t getDataLengthForInterleavedBlock(int32_t index); | |
55 int32_t getErrorLengthForInterleavedBlock(int32_t index); | |
56 CFX_WideString toString(int32_t& e); | |
57 | |
58 public: | |
59 int32_t m_dataCapacity; | |
60 int32_t m_errorCodewords; | |
61 int32_t m_matrixWidth; | |
62 int32_t m_matrixHeight; | |
63 int32_t m_rsBlockData; | |
64 int32_t m_rsBlockError; | |
65 static CBC_SymbolInfo* m_PROD_SYMBOLS[30]; | |
66 | |
67 private: | |
68 static CBC_SymbolInfo* m_symbols[30]; | |
69 FX_BOOL m_rectangular; | |
70 int32_t m_dataRegions; | |
71 | |
72 private: | |
73 CBC_SymbolInfo(FX_BOOL rectangular, | |
74 int32_t dataCapacity, | |
75 int32_t errorCodewords, | |
76 int32_t matrixWidth, | |
77 int32_t matrixHeight, | |
78 int32_t dataRegions, | |
79 int32_t rsBlockData, | |
80 int32_t rsBlockError); | |
81 }; | |
82 | |
83 #endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | |
OLD | NEW |