Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / BC_PDF417DetectionResult.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _BC_EDTECTIONRESULT_H_\r
8 #define _BC_EDTECTIONRESULT_H_\r
9 class CBC_BarcodeMetadata;\r
10 class CBC_BoundingBox;\r
11 class CBC_Codeword;\r
12 class CBC_DetectionResultColumn;\r
13 class CBC_DetectionResult;\r
14 class CBC_DetectionResult : public CFX_Object\r
15 {\r
16 public:\r
17     CBC_DetectionResult(CBC_BarcodeMetadata* barcodeMetadata, CBC_BoundingBox* boundingBox);\r
18     virtual ~CBC_DetectionResult();\r
19     CFX_PtrArray& getDetectionResultColumns();\r
20     void setBoundingBox(CBC_BoundingBox* boundingBox);\r
21     CBC_BoundingBox* getBoundingBox();\r
22     void setDetectionResultColumn(FX_INT32 barcodeColumn, CBC_DetectionResultColumn* detectionResultColumn);\r
23     CBC_DetectionResultColumn* getDetectionResultColumn(FX_INT32 barcodeColumn);\r
24     CFX_ByteString toString();\r
25 \r
26     FX_INT32 getBarcodeColumnCount();\r
27     FX_INT32 getBarcodeRowCount();\r
28     FX_INT32 getBarcodeECLevel();\r
29 private:\r
30     static FX_INT32 ADJUST_ROW_NUMBER_SKIP;\r
31     CBC_BarcodeMetadata* m_barcodeMetadata;\r
32     CFX_PtrArray m_detectionResultColumns;\r
33     CBC_BoundingBox* m_boundingBox;\r
34     FX_INT32 m_barcodeColumnCount;\r
35 private:\r
36     void adjustIndicatorColumnRowNumbers(CBC_DetectionResultColumn* detectionResultColumn);\r
37     FX_INT32 adjustRowNumbers();\r
38     FX_INT32 adjustRowNumbersByRow();\r
39     FX_INT32 adjustRowNumbersFromBothRI();\r
40     FX_INT32 adjustRowNumbersFromRRI();\r
41     FX_INT32 adjustRowNumbersFromLRI();\r
42     static FX_INT32 adjustRowNumberIfValid(FX_INT32 rowIndicatorRowNumber, FX_INT32 invalidRowCounts, CBC_Codeword* codeword);\r
43     void adjustRowNumbers(FX_INT32 barcodeColumn, FX_INT32 codewordsRow, CFX_PtrArray* codewords);\r
44     static FX_BOOL adjustRowNumber(CBC_Codeword* codeword, CBC_Codeword* otherCodeword);\r
45 \r
46 \r
47 };\r
48 #endif\r