| 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_PDF417_BC_PDF417HIGHLEVELENCODER_H_ | 7 #ifndef XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ |
| 8 #define XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ | 8 #define XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_basic.h" | 10 #include "core/fxcrt/fx_basic.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 static int32_t LATCH_TO_BYTE; | 32 static int32_t LATCH_TO_BYTE; |
| 33 static uint8_t TEXT_MIXED_RAW[]; | 33 static uint8_t TEXT_MIXED_RAW[]; |
| 34 static uint8_t TEXT_PUNCTUATION_RAW[]; | 34 static uint8_t TEXT_PUNCTUATION_RAW[]; |
| 35 static int32_t MIXED[128]; | 35 static int32_t MIXED[128]; |
| 36 static int32_t PUNCTUATION[128]; | 36 static int32_t PUNCTUATION[128]; |
| 37 static int32_t encodeText(CFX_WideString msg, | 37 static int32_t encodeText(CFX_WideString msg, |
| 38 int32_t startpos, | 38 int32_t startpos, |
| 39 int32_t count, | 39 int32_t count, |
| 40 CFX_WideString& sb, | 40 CFX_WideString& sb, |
| 41 int32_t initialSubmode); | 41 int32_t initialSubmode); |
| 42 static void encodeBinary(CFX_ByteArray* bytes, | 42 static void encodeBinary(CFX_ArrayTemplate<uint8_t>* bytes, |
| 43 int32_t startpos, | 43 int32_t startpos, |
| 44 int32_t count, | 44 int32_t count, |
| 45 int32_t startmode, | 45 int32_t startmode, |
| 46 CFX_WideString& sb); | 46 CFX_WideString& sb); |
| 47 static void encodeNumeric(CFX_WideString msg, | 47 static void encodeNumeric(CFX_WideString msg, |
| 48 int32_t startpos, | 48 int32_t startpos, |
| 49 int32_t count, | 49 int32_t count, |
| 50 CFX_WideString& sb); | 50 CFX_WideString& sb); |
| 51 static bool isDigit(FX_WCHAR ch); | 51 static bool isDigit(FX_WCHAR ch); |
| 52 static bool isAlphaUpper(FX_WCHAR ch); | 52 static bool isAlphaUpper(FX_WCHAR ch); |
| 53 static bool isAlphaLower(FX_WCHAR ch); | 53 static bool isAlphaLower(FX_WCHAR ch); |
| 54 static bool isMixed(FX_WCHAR ch); | 54 static bool isMixed(FX_WCHAR ch); |
| 55 static bool isPunctuation(FX_WCHAR ch); | 55 static bool isPunctuation(FX_WCHAR ch); |
| 56 static bool isText(FX_WCHAR ch); | 56 static bool isText(FX_WCHAR ch); |
| 57 static int32_t determineConsecutiveDigitCount(CFX_WideString msg, | 57 static int32_t determineConsecutiveDigitCount(CFX_WideString msg, |
| 58 int32_t startpos); | 58 int32_t startpos); |
| 59 static int32_t determineConsecutiveTextCount(CFX_WideString msg, | 59 static int32_t determineConsecutiveTextCount(CFX_WideString msg, |
| 60 int32_t startpos); | 60 int32_t startpos); |
| 61 static int32_t determineConsecutiveBinaryCount(CFX_WideString msg, | 61 static int32_t determineConsecutiveBinaryCount( |
| 62 CFX_ByteArray* bytes, | 62 CFX_WideString msg, |
| 63 int32_t startpos, | 63 CFX_ArrayTemplate<uint8_t>* bytes, |
| 64 int32_t& e); | 64 int32_t startpos, |
| 65 int32_t& e); |
| 65 | 66 |
| 66 friend class PDF417HighLevelEncoder_EncodeNumeric_Test; | 67 friend class PDF417HighLevelEncoder_EncodeNumeric_Test; |
| 67 friend class PDF417HighLevelEncoder_EncodeBinary_Test; | 68 friend class PDF417HighLevelEncoder_EncodeBinary_Test; |
| 68 friend class PDF417HighLevelEncoder_EncodeText_Test; | 69 friend class PDF417HighLevelEncoder_EncodeText_Test; |
| 69 friend class PDF417HighLevelEncoder_ConsecutiveDigitCount_Test; | 70 friend class PDF417HighLevelEncoder_ConsecutiveDigitCount_Test; |
| 70 friend class PDF417HighLevelEncoder_ConsecutiveTextCount_Test; | 71 friend class PDF417HighLevelEncoder_ConsecutiveTextCount_Test; |
| 71 friend class PDF417HighLevelEncoder_ConsecutiveBinaryCount_Test; | 72 friend class PDF417HighLevelEncoder_ConsecutiveBinaryCount_Test; |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 #endif // XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ | 75 #endif // XFA_FXBARCODE_PDF417_BC_PDF417HIGHLEVELENCODER_H_ |
| OLD | NEW |