| 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 <vector> |
| 11 |
| 10 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" | 12 #include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h" |
| 11 | 13 |
| 12 #define ASCII_ENCODATION 0 | 14 #define ASCII_ENCODATION 0 |
| 13 #define C40_ENCODATION 1 | 15 #define C40_ENCODATION 1 |
| 14 #define TEXT_ENCODATION 2 | 16 #define TEXT_ENCODATION 2 |
| 15 #define X12_ENCODATION 3 | 17 #define X12_ENCODATION 3 |
| 16 #define EDIFACT_ENCODATION 4 | 18 #define EDIFACT_ENCODATION 4 |
| 17 #define BASE256_ENCODATION 5 | 19 #define BASE256_ENCODATION 5 |
| 18 | 20 |
| 19 class CBC_HighLevelEncoder : public CBC_SymbolShapeHint { | 21 class CBC_HighLevelEncoder : public CBC_SymbolShapeHint { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 static FX_WCHAR PAD; | 56 static FX_WCHAR PAD; |
| 55 static FX_WCHAR MACRO_05; | 57 static FX_WCHAR MACRO_05; |
| 56 static FX_WCHAR MACRO_06; | 58 static FX_WCHAR MACRO_06; |
| 57 static const wchar_t* MACRO_05_HEADER; | 59 static const wchar_t* MACRO_05_HEADER; |
| 58 static const wchar_t* MACRO_06_HEADER; | 60 static const wchar_t* MACRO_06_HEADER; |
| 59 static const wchar_t MACRO_TRAILER; | 61 static const wchar_t MACRO_TRAILER; |
| 60 CFX_ByteArray m_bytearray; | 62 CFX_ByteArray m_bytearray; |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition); | 65 static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition); |
| 64 static int32_t findMinimums(CFX_FloatArray& charCounts, | 66 static int32_t findMinimums(std::vector<FX_FLOAT>& charCounts, |
| 65 CFX_Int32Array& intCharCounts, | 67 CFX_Int32Array& intCharCounts, |
| 66 int32_t min, | 68 int32_t min, |
| 67 CFX_ByteArray& mins); | 69 CFX_ByteArray& mins); |
| 68 static int32_t getMinimumCount(CFX_ByteArray& mins); | 70 static int32_t getMinimumCount(CFX_ByteArray& mins); |
| 69 static bool isNativeC40(FX_WCHAR ch); | 71 static bool isNativeC40(FX_WCHAR ch); |
| 70 static bool isNativeText(FX_WCHAR ch); | 72 static bool isNativeText(FX_WCHAR ch); |
| 71 static bool isNativeX12(FX_WCHAR ch); | 73 static bool isNativeX12(FX_WCHAR ch); |
| 72 static bool isX12TermSep(FX_WCHAR ch); | 74 static bool isX12TermSep(FX_WCHAR ch); |
| 73 static bool isNativeEDIFACT(FX_WCHAR ch); | 75 static bool isNativeEDIFACT(FX_WCHAR ch); |
| 74 static bool isSpecialB256(FX_WCHAR ch); | 76 static bool isSpecialB256(FX_WCHAR ch); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 #endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ | 79 #endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_ |
| OLD | NEW |