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_HIGHLEVELENCODER_H_ | 7 #ifndef XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ |
8 #define XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ | 8 #define XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ |
9 | 9 |
10 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" | 10 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 int32_t& e); | 27 int32_t& e); |
28 static CFX_WideString encodeHighLevel(CFX_WideString msg, | 28 static CFX_WideString encodeHighLevel(CFX_WideString msg, |
29 CFX_WideString ecLevel, | 29 CFX_WideString ecLevel, |
30 SymbolShapeHint shape, | 30 SymbolShapeHint shape, |
31 CBC_Dimension* minSize, | 31 CBC_Dimension* minSize, |
32 CBC_Dimension* maxSize, | 32 CBC_Dimension* maxSize, |
33 int32_t& e); | 33 int32_t& e); |
34 static int32_t lookAheadTest(CFX_WideString msg, | 34 static int32_t lookAheadTest(CFX_WideString msg, |
35 int32_t startpos, | 35 int32_t startpos, |
36 int32_t currentMode); | 36 int32_t currentMode); |
37 static FX_BOOL isDigit(FX_WCHAR ch); | 37 static bool isDigit(FX_WCHAR ch); |
38 static FX_BOOL isExtendedASCII(FX_WCHAR ch); | 38 static bool isExtendedASCII(FX_WCHAR ch); |
39 static int32_t determineConsecutiveDigitCount(CFX_WideString msg, | 39 static int32_t determineConsecutiveDigitCount(CFX_WideString msg, |
40 int32_t startpos); | 40 int32_t startpos); |
41 static void illegalCharacter(FX_WCHAR c, int32_t& e); | 41 static void illegalCharacter(FX_WCHAR c, int32_t& e); |
42 | 42 |
43 public: | 43 public: |
44 static FX_WCHAR LATCH_TO_C40; | 44 static FX_WCHAR LATCH_TO_C40; |
45 static FX_WCHAR LATCH_TO_BASE256; | 45 static FX_WCHAR LATCH_TO_BASE256; |
46 static FX_WCHAR UPPER_SHIFT; | 46 static FX_WCHAR UPPER_SHIFT; |
47 static FX_WCHAR LATCH_TO_ANSIX12; | 47 static FX_WCHAR LATCH_TO_ANSIX12; |
48 static FX_WCHAR LATCH_TO_TEXT; | 48 static FX_WCHAR LATCH_TO_TEXT; |
(...skipping 10 matching lines...) Expand all Loading... |
59 static const wchar_t MACRO_TRAILER; | 59 static const wchar_t MACRO_TRAILER; |
60 CFX_ByteArray m_bytearray; | 60 CFX_ByteArray m_bytearray; |
61 | 61 |
62 private: | 62 private: |
63 static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition); | 63 static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition); |
64 static int32_t findMinimums(CFX_FloatArray& charCounts, | 64 static int32_t findMinimums(CFX_FloatArray& charCounts, |
65 CFX_Int32Array& intCharCounts, | 65 CFX_Int32Array& intCharCounts, |
66 int32_t min, | 66 int32_t min, |
67 CFX_ByteArray& mins); | 67 CFX_ByteArray& mins); |
68 static int32_t getMinimumCount(CFX_ByteArray& mins); | 68 static int32_t getMinimumCount(CFX_ByteArray& mins); |
69 static FX_BOOL isNativeC40(FX_WCHAR ch); | 69 static bool isNativeC40(FX_WCHAR ch); |
70 static FX_BOOL isNativeText(FX_WCHAR ch); | 70 static bool isNativeText(FX_WCHAR ch); |
71 static FX_BOOL isNativeX12(FX_WCHAR ch); | 71 static bool isNativeX12(FX_WCHAR ch); |
72 static FX_BOOL isX12TermSep(FX_WCHAR ch); | 72 static bool isX12TermSep(FX_WCHAR ch); |
73 static FX_BOOL isNativeEDIFACT(FX_WCHAR ch); | 73 static bool isNativeEDIFACT(FX_WCHAR ch); |
74 static FX_BOOL isSpecialB256(FX_WCHAR ch); | 74 static bool isSpecialB256(FX_WCHAR ch); |
75 }; | 75 }; |
76 | 76 |
77 #endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ | 77 #endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ |
OLD | NEW |