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_ONEDUPCAREADER_H_ | 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ |
8 #define XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ | 8 #define XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
12 #include "xfa/fxbarcode/oned/BC_OneDimReader.h" | 12 #include "xfa/fxbarcode/oned/BC_OneDimReader.h" |
13 | 13 |
14 class CBC_BinaryBitmap; | 14 class CBC_BinaryBitmap; |
15 class CBC_CommonBitArray; | 15 class CBC_CommonBitArray; |
16 class CBC_OnedEAN13Reader; | 16 class CBC_OnedEAN13Reader; |
17 | 17 |
18 class CBC_OnedUPCAReader : public CBC_OneDimReader { | 18 class CBC_OnedUPCAReader : public CBC_OneDimReader { |
19 public: | 19 public: |
20 CBC_OnedUPCAReader(); | 20 CBC_OnedUPCAReader(); |
21 virtual ~CBC_OnedUPCAReader(); | 21 ~CBC_OnedUPCAReader() override; |
22 | 22 |
23 virtual void Init(); | 23 virtual void Init(); |
24 | 24 |
| 25 // CBC_OneDimReader |
25 CFX_ByteString DecodeRow(int32_t rowNumber, | 26 CFX_ByteString DecodeRow(int32_t rowNumber, |
26 CBC_CommonBitArray* row, | 27 CBC_CommonBitArray* row, |
27 int32_t hints, | 28 int32_t hints, |
28 int32_t& e); | 29 int32_t& e) override; |
29 CFX_ByteString DecodeRow(int32_t rowNumber, | 30 CFX_ByteString DecodeRow(int32_t rowNumber, |
30 CBC_CommonBitArray* row, | 31 CBC_CommonBitArray* row, |
31 CFX_Int32Array* startGuardRange, | 32 CFX_Int32Array* startGuardRange, |
32 int32_t hints, | 33 int32_t hints, |
33 int32_t& e); | 34 int32_t& e) override; |
34 CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e); | 35 |
35 CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e); | 36 // CBC_OneDReader |
| 37 CFX_ByteString Decode(CBC_BinaryBitmap* image, int32_t& e) override; |
| 38 CFX_ByteString Decode(CBC_BinaryBitmap* image, |
| 39 int32_t hints, |
| 40 int32_t& e) override; |
36 | 41 |
37 protected: | 42 protected: |
38 int32_t DecodeMiddle(CBC_CommonBitArray* row, | 43 int32_t DecodeMiddle(CBC_CommonBitArray* row, |
39 CFX_Int32Array* startRange, | 44 CFX_Int32Array* startRange, |
40 CFX_ByteString& resultString, | 45 CFX_ByteString& resultString, |
41 int32_t& e); | 46 int32_t& e) override; |
42 CFX_ByteString MaybeReturnResult(CFX_ByteString& result, int32_t& e); | 47 CFX_ByteString MaybeReturnResult(CFX_ByteString& result, int32_t& e); |
43 | 48 |
44 private: | 49 private: |
45 CBC_OnedEAN13Reader* m_ean13Reader; | 50 CBC_OnedEAN13Reader* m_ean13Reader; |
46 }; | 51 }; |
47 | 52 |
48 #endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ | 53 #endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAREADER_H_ |
OLD | NEW |