summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2015-01-09 17:27:21 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2015-01-09 17:27:21 -0800
commita902979f7c6a39fbdd8e9fc1b2ce00553b655eeb (patch)
tree854a51dbf1577ee8493db769ba7c8ab07cc72140 /xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h
parent5f21e9ddd181fc344f8d6070351858f98a25547e (diff)
downloadpdfium-a902979f7c6a39fbdd8e9fc1b2ce00553b655eeb.tar.xz
Organize barcode codes into modules.
Previously all the files in barcode are lumped together. The naming of some files are inconsistent, leading to difficult understanding of the structure. Now files are grouped based on different barcode type like in zxing. This also matches what it looks like in other xfa folders. The file names in each folder could be further modified to be consistent. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/842043002
Diffstat (limited to 'xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h')
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h
new file mode 100644
index 0000000000..9c3401459b
--- /dev/null
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417DetectionResult.h
@@ -0,0 +1,48 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _BC_EDTECTIONRESULT_H_
+#define _BC_EDTECTIONRESULT_H_
+class CBC_BarcodeMetadata;
+class CBC_BoundingBox;
+class CBC_Codeword;
+class CBC_DetectionResultColumn;
+class CBC_DetectionResult;
+class CBC_DetectionResult : public CFX_Object
+{
+public:
+ CBC_DetectionResult(CBC_BarcodeMetadata* barcodeMetadata, CBC_BoundingBox* boundingBox);
+ virtual ~CBC_DetectionResult();
+ CFX_PtrArray& getDetectionResultColumns();
+ void setBoundingBox(CBC_BoundingBox* boundingBox);
+ CBC_BoundingBox* getBoundingBox();
+ void setDetectionResultColumn(FX_INT32 barcodeColumn, CBC_DetectionResultColumn* detectionResultColumn);
+ CBC_DetectionResultColumn* getDetectionResultColumn(FX_INT32 barcodeColumn);
+ CFX_ByteString toString();
+
+ FX_INT32 getBarcodeColumnCount();
+ FX_INT32 getBarcodeRowCount();
+ FX_INT32 getBarcodeECLevel();
+private:
+ static FX_INT32 ADJUST_ROW_NUMBER_SKIP;
+ CBC_BarcodeMetadata* m_barcodeMetadata;
+ CFX_PtrArray m_detectionResultColumns;
+ CBC_BoundingBox* m_boundingBox;
+ FX_INT32 m_barcodeColumnCount;
+private:
+ void adjustIndicatorColumnRowNumbers(CBC_DetectionResultColumn* detectionResultColumn);
+ FX_INT32 adjustRowNumbers();
+ FX_INT32 adjustRowNumbersByRow();
+ FX_INT32 adjustRowNumbersFromBothRI();
+ FX_INT32 adjustRowNumbersFromRRI();
+ FX_INT32 adjustRowNumbersFromLRI();
+ static FX_INT32 adjustRowNumberIfValid(FX_INT32 rowIndicatorRowNumber, FX_INT32 invalidRowCounts, CBC_Codeword* codeword);
+ void adjustRowNumbers(FX_INT32 barcodeColumn, FX_INT32 codewordsRow, CFX_PtrArray* codewords);
+ static FX_BOOL adjustRowNumber(CBC_Codeword* codeword, CBC_Codeword* otherCodeword);
+
+
+};
+#endif