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_ONED_BC_ONEDCODABARREADER_H_ | 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ |
8 #define XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ | 8 #define XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
11 #include "xfa/fxbarcode/oned/BC_OneDReader.h" | 11 #include "xfa/fxbarcode/oned/BC_OneDReader.h" |
12 | 12 |
13 class CBC_CommonBitArray; | 13 class CBC_CommonBitArray; |
14 class CBC_OneDReader; | 14 class CBC_OneDReader; |
15 | 15 |
16 class CBC_OnedCodaBarReader : public CBC_OneDReader { | 16 class CBC_OnedCodaBarReader : public CBC_OneDReader { |
17 public: | 17 public: |
18 CBC_OnedCodaBarReader(); | 18 CBC_OnedCodaBarReader(); |
19 virtual ~CBC_OnedCodaBarReader(); | 19 ~CBC_OnedCodaBarReader() override; |
| 20 |
| 21 // CBC_OneDReader |
20 CFX_ByteString DecodeRow(int32_t rowNumber, | 22 CFX_ByteString DecodeRow(int32_t rowNumber, |
21 CBC_CommonBitArray* row, | 23 CBC_CommonBitArray* row, |
22 int32_t hints, | 24 int32_t hints, |
23 int32_t& e); | 25 int32_t& e) override; |
| 26 |
24 CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e); | 27 CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e); |
25 FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key); | 28 FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key); |
26 FX_CHAR ToNarrowWidePattern(CFX_Int32Array* counter); | 29 FX_CHAR ToNarrowWidePattern(CFX_Int32Array* counter); |
27 | 30 |
28 static const FX_CHAR* ALPHABET_STRING; | 31 static const FX_CHAR* ALPHABET_STRING; |
29 static const int32_t CHARACTER_ENCODINGS[22]; | 32 static const int32_t CHARACTER_ENCODINGS[22]; |
30 | 33 |
31 private: | 34 private: |
32 static const int32_t minCharacterLength = 3; | 35 static const int32_t minCharacterLength = 3; |
33 static const FX_CHAR STARTEND_ENCODING[8]; | 36 static const FX_CHAR STARTEND_ENCODING[8]; |
34 }; | 37 }; |
35 | 38 |
36 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ | 39 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_ |
OLD | NEW |