| 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 XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | 7 #ifndef XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ |
| 8 #define XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | 8 #define XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_string.h" | 10 #include "core/fxcrt/fx_string.h" |
| 11 #include "core/fxcrt/fx_system.h" | 11 #include "core/fxcrt/fx_system.h" |
| 12 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" | 12 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" |
| 13 | 13 |
| 14 class CBC_Dimension; | 14 class CBC_Dimension; |
| 15 | 15 |
| 16 class CBC_SymbolInfo : public CBC_SymbolShapeHint { | 16 class CBC_SymbolInfo : public CBC_SymbolShapeHint { |
| 17 public: | 17 public: |
| 18 CBC_SymbolInfo(FX_BOOL rectangular, | 18 CBC_SymbolInfo(bool rectangular, |
| 19 int32_t dataCapacity, | 19 int32_t dataCapacity, |
| 20 int32_t errorCodewords, | 20 int32_t errorCodewords, |
| 21 int32_t matrixWidth, | 21 int32_t matrixWidth, |
| 22 int32_t matrixHeight, | 22 int32_t matrixHeight, |
| 23 int32_t dataRegions); | 23 int32_t dataRegions); |
| 24 ~CBC_SymbolInfo() override; | 24 ~CBC_SymbolInfo() override; |
| 25 | 25 |
| 26 static void Initialize(); | 26 static void Initialize(); |
| 27 static void Finalize(); | 27 static void Finalize(); |
| 28 static void overrideSymbolSet(CBC_SymbolInfo* override); | 28 static void overrideSymbolSet(CBC_SymbolInfo* override); |
| 29 static CBC_SymbolInfo* lookup(int32_t dataCodewords, int32_t& e); | 29 static CBC_SymbolInfo* lookup(int32_t dataCodewords, int32_t& e); |
| 30 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | 30 static CBC_SymbolInfo* lookup(int32_t dataCodewords, |
| 31 SymbolShapeHint shape, | 31 SymbolShapeHint shape, |
| 32 int32_t& e); | 32 int32_t& e); |
| 33 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | 33 static CBC_SymbolInfo* lookup(int32_t dataCodewords, |
| 34 FX_BOOL allowRectangular, | 34 bool allowRectangular, |
| 35 FX_BOOL fail, | 35 bool fail, |
| 36 int32_t& e); | 36 int32_t& e); |
| 37 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | 37 static CBC_SymbolInfo* lookup(int32_t dataCodewords, |
| 38 SymbolShapeHint shape, | 38 SymbolShapeHint shape, |
| 39 FX_BOOL fail, | 39 bool fail, |
| 40 int32_t& e); | 40 int32_t& e); |
| 41 static CBC_SymbolInfo* lookup(int32_t dataCodewords, | 41 static CBC_SymbolInfo* lookup(int32_t dataCodewords, |
| 42 SymbolShapeHint shape, | 42 SymbolShapeHint shape, |
| 43 CBC_Dimension* minSize, | 43 CBC_Dimension* minSize, |
| 44 CBC_Dimension* maxSize, | 44 CBC_Dimension* maxSize, |
| 45 FX_BOOL fail, | 45 bool fail, |
| 46 int32_t& e); | 46 int32_t& e); |
| 47 int32_t getHorizontalDataRegions(int32_t& e); | 47 int32_t getHorizontalDataRegions(int32_t& e); |
| 48 int32_t getVerticalDataRegions(int32_t& e); | 48 int32_t getVerticalDataRegions(int32_t& e); |
| 49 int32_t getSymbolDataWidth(int32_t& e); | 49 int32_t getSymbolDataWidth(int32_t& e); |
| 50 int32_t getSymbolDataHeight(int32_t& e); | 50 int32_t getSymbolDataHeight(int32_t& e); |
| 51 int32_t getSymbolWidth(int32_t& e); | 51 int32_t getSymbolWidth(int32_t& e); |
| 52 int32_t getSymbolHeight(int32_t& e); | 52 int32_t getSymbolHeight(int32_t& e); |
| 53 int32_t getCodewordCount(); | 53 int32_t getCodewordCount(); |
| 54 int32_t getInterleavedBlockCount(); | 54 int32_t getInterleavedBlockCount(); |
| 55 int32_t getDataLengthForInterleavedBlock(int32_t index); | 55 int32_t getDataLengthForInterleavedBlock(int32_t index); |
| 56 int32_t getErrorLengthForInterleavedBlock(int32_t index); | 56 int32_t getErrorLengthForInterleavedBlock(int32_t index); |
| 57 | 57 |
| 58 int32_t m_dataCapacity; | 58 int32_t m_dataCapacity; |
| 59 int32_t m_errorCodewords; | 59 int32_t m_errorCodewords; |
| 60 int32_t m_matrixWidth; | 60 int32_t m_matrixWidth; |
| 61 int32_t m_matrixHeight; | 61 int32_t m_matrixHeight; |
| 62 int32_t m_rsBlockData; | 62 int32_t m_rsBlockData; |
| 63 int32_t m_rsBlockError; | 63 int32_t m_rsBlockError; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 CBC_SymbolInfo(FX_BOOL rectangular, | 66 CBC_SymbolInfo(bool rectangular, |
| 67 int32_t dataCapacity, | 67 int32_t dataCapacity, |
| 68 int32_t errorCodewords, | 68 int32_t errorCodewords, |
| 69 int32_t matrixWidth, | 69 int32_t matrixWidth, |
| 70 int32_t matrixHeight, | 70 int32_t matrixHeight, |
| 71 int32_t dataRegions, | 71 int32_t dataRegions, |
| 72 int32_t rsBlockData, | 72 int32_t rsBlockData, |
| 73 int32_t rsBlockError); | 73 int32_t rsBlockError); |
| 74 | 74 |
| 75 FX_BOOL m_rectangular; | 75 bool m_rectangular; |
| 76 int32_t m_dataRegions; | 76 int32_t m_dataRegions; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ | 79 #endif // XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_ |
| OLD | NEW |