summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-14 14:14:16 -0400
committerDan Sinclair <dsinclair@chromium.org>2016-03-14 14:14:16 -0400
commit1770c021cf998ff1b33855b1397f6ea8ff9f7cd7 (patch)
tree285e39abd4b5872d8cd632b9e331b0667fdc3eae /xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
parentf766ad219f66543654520f6a1955836f519e26d1 (diff)
downloadpdfium-1770c021cf998ff1b33855b1397f6ea8ff9f7cd7.tar.xz
Move xfa/src up to xfa/.
This CL moves the xfa/src files up to the xfa/ directory and fixes the includes, include guards, and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1803723002 .
Diffstat (limited to 'xfa/fxbarcode/datamatrix/BC_SymbolInfo.h')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_SymbolInfo.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
new file mode 100644
index 0000000000..8f7ed28da9
--- /dev/null
+++ b/xfa/fxbarcode/datamatrix/BC_SymbolInfo.h
@@ -0,0 +1,83 @@
+// 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 XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_
+#define XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_
+
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "xfa/fxbarcode/datamatrix/BC_SymbolShapeHint.h"
+
+class CBC_Dimension;
+
+class CBC_SymbolInfo : public CBC_SymbolShapeHint {
+ public:
+ CBC_SymbolInfo(FX_BOOL rectangular,
+ int32_t dataCapacity,
+ int32_t errorCodewords,
+ int32_t matrixWidth,
+ int32_t matrixHeight,
+ int32_t dataRegions);
+ virtual ~CBC_SymbolInfo();
+ static void Initialize();
+ static void Finalize();
+ static void overrideSymbolSet(CBC_SymbolInfo* override);
+ static CBC_SymbolInfo* lookup(int32_t dataCodewords, int32_t& e);
+ static CBC_SymbolInfo* lookup(int32_t dataCodewords,
+ SymbolShapeHint shape,
+ int32_t& e);
+ static CBC_SymbolInfo* lookup(int32_t dataCodewords,
+ FX_BOOL allowRectangular,
+ FX_BOOL fail,
+ int32_t& e);
+ static CBC_SymbolInfo* lookup(int32_t dataCodewords,
+ SymbolShapeHint shape,
+ FX_BOOL fail,
+ int32_t& e);
+ static CBC_SymbolInfo* lookup(int32_t dataCodewords,
+ SymbolShapeHint shape,
+ CBC_Dimension* minSize,
+ CBC_Dimension* maxSize,
+ FX_BOOL fail,
+ int32_t& e);
+ int32_t getHorizontalDataRegions(int32_t& e);
+ int32_t getVerticalDataRegions(int32_t& e);
+ int32_t getSymbolDataWidth(int32_t& e);
+ int32_t getSymbolDataHeight(int32_t& e);
+ int32_t getSymbolWidth(int32_t& e);
+ int32_t getSymbolHeight(int32_t& e);
+ int32_t getCodewordCount();
+ int32_t getInterleavedBlockCount();
+ int32_t getDataLengthForInterleavedBlock(int32_t index);
+ int32_t getErrorLengthForInterleavedBlock(int32_t index);
+ CFX_WideString toString(int32_t& e);
+
+ public:
+ int32_t m_dataCapacity;
+ int32_t m_errorCodewords;
+ int32_t m_matrixWidth;
+ int32_t m_matrixHeight;
+ int32_t m_rsBlockData;
+ int32_t m_rsBlockError;
+ static CBC_SymbolInfo* m_PROD_SYMBOLS[30];
+
+ private:
+ static CBC_SymbolInfo* m_symbols[30];
+ FX_BOOL m_rectangular;
+ int32_t m_dataRegions;
+
+ private:
+ CBC_SymbolInfo(FX_BOOL rectangular,
+ int32_t dataCapacity,
+ int32_t errorCodewords,
+ int32_t matrixWidth,
+ int32_t matrixHeight,
+ int32_t dataRegions,
+ int32_t rsBlockData,
+ int32_t rsBlockError);
+};
+
+#endif // XFA_FXBARCODE_DATAMATRIX_BC_SYMBOLINFO_H_