Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / BC_ReedSolomonGF256.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_REEDSOLOMONGF256_H_\r
8 #define _BC_REEDSOLOMONGF256_H_\r
9 class CBC_ReedSolomonGF256Poly;\r
10 class CBC_ReedSolomonGF256;\r
11 class CBC_ReedSolomonGF256 : public CFX_Object\r
12 {\r
13 public:\r
14     static void Initialize();\r
15     static void Finalize();\r
16     static CBC_ReedSolomonGF256 *QRCodeFild;\r
17     static CBC_ReedSolomonGF256 *DataMatrixField;\r
18     CBC_ReedSolomonGF256(FX_INT32 primitive);\r
19     virtual ~CBC_ReedSolomonGF256();\r
20     CBC_ReedSolomonGF256Poly* GetZero();\r
21     CBC_ReedSolomonGF256Poly* GetOne();\r
22     CBC_ReedSolomonGF256Poly* BuildMonomial(FX_INT32 degree, FX_INT32 coefficient, FX_INT32 &e);\r
23     static FX_INT32 AddOrSubtract(FX_INT32 a, FX_INT32 b);\r
24     FX_INT32 Exp(FX_INT32 a);\r
25     FX_INT32 Log(FX_INT32 a, FX_INT32 &e);\r
26     FX_INT32 Inverse(FX_INT32 a, FX_INT32 &e);\r
27     FX_INT32 Multiply(FX_INT32 a, FX_INT32 b);\r
28     virtual void Init();\r
29 private:\r
30     FX_INT32 m_expTable[256];\r
31     FX_INT32 m_logTable[256];\r
32     CBC_ReedSolomonGF256Poly *m_zero;\r
33     CBC_ReedSolomonGF256Poly *m_one;\r
34 };\r
35 #endif\r