Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / BC_SymbolInfo.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_SYMBOLINFO_H_\r
8 #define _BC_SYMBOLINFO_H_\r
9 class CBC_SymbolShapeHint;\r
10 class CBC_Dimension;\r
11 class CBC_SymbolInfo;\r
12 class CBC_SymbolInfo : public CBC_SymbolShapeHint\r
13 {\r
14 public:\r
15     CBC_SymbolInfo(FX_BOOL rectangular, FX_INT32 dataCapacity, FX_INT32 errorCodewords,\r
16                    FX_INT32 matrixWidth, FX_INT32 matrixHeight, FX_INT32 dataRegions);\r
17     virtual ~CBC_SymbolInfo();\r
18     static void Initialize();\r
19     static void Finalize();\r
20     static void overrideSymbolSet(CBC_SymbolInfo* override);\r
21     static CBC_SymbolInfo* lookup(FX_INT32 dataCodewords, FX_INT32 &e);\r
22     static CBC_SymbolInfo* lookup(FX_INT32 dataCodewords, SymbolShapeHint shape, FX_INT32 &e);\r
23     static CBC_SymbolInfo* lookup(FX_INT32 dataCodewords, FX_BOOL allowRectangular, FX_BOOL fail, FX_INT32 &e);\r
24     static CBC_SymbolInfo* lookup(FX_INT32 dataCodewords, SymbolShapeHint shape, FX_BOOL fail, FX_INT32 &e);\r
25     static CBC_SymbolInfo* lookup(FX_INT32 dataCodewords, SymbolShapeHint shape, CBC_Dimension* minSize, CBC_Dimension* maxSize, FX_BOOL fail, FX_INT32 &e);\r
26     FX_INT32 getHorizontalDataRegions(FX_INT32 &e);\r
27     FX_INT32 getVerticalDataRegions(FX_INT32 &e);\r
28     FX_INT32 getSymbolDataWidth(FX_INT32 &e);\r
29     FX_INT32 getSymbolDataHeight(FX_INT32 &e);\r
30     FX_INT32 getSymbolWidth(FX_INT32 &e);\r
31     FX_INT32 getSymbolHeight(FX_INT32 &e);\r
32     FX_INT32 getCodewordCount();\r
33     FX_INT32 getInterleavedBlockCount();\r
34     FX_INT32 getDataLengthForInterleavedBlock(FX_INT32 index);\r
35     FX_INT32 getErrorLengthForInterleavedBlock(FX_INT32 index);\r
36     CFX_WideString toString(FX_INT32 &e);\r
37 public:\r
38     FX_INT32 m_dataCapacity;\r
39     FX_INT32 m_errorCodewords;\r
40     FX_INT32 m_matrixWidth;\r
41     FX_INT32 m_matrixHeight;\r
42     FX_INT32 m_rsBlockData;\r
43     FX_INT32 m_rsBlockError;\r
44     static CBC_SymbolInfo* m_PROD_SYMBOLS[30];\r
45 private:\r
46     static CBC_SymbolInfo* m_symbols[30];\r
47     FX_BOOL m_rectangular;\r
48     FX_INT32 m_dataRegions;\r
49 private:\r
50     CBC_SymbolInfo(FX_BOOL rectangular, FX_INT32 dataCapacity, FX_INT32 errorCodewords, FX_INT32 matrixWidth, FX_INT32 matrixHeight, FX_INT32 dataRegions,\r
51                    FX_INT32 rsBlockData, FX_INT32 rsBlockError);\r
52 };\r
53 #endif\r