Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxbarcode / src / include / BC_ReedSolomonGF256Poly.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_READSOLOMONGF256POLY_H_\r
8 #define _BC_READSOLOMONGF256POLY_H_\r
9 class CBC_ReedSolomonGF256;\r
10 class CBC_ReedSolomonGF256Poly;\r
11 class CBC_ReedSolomonGF256Poly : public CFX_Object\r
12 {\r
13 public:\r
14     CBC_ReedSolomonGF256Poly(CBC_ReedSolomonGF256* field, FX_INT32 coefficients);\r
15     CBC_ReedSolomonGF256Poly();\r
16     virtual ~CBC_ReedSolomonGF256Poly();\r
17     FX_INT32 GetCoefficients(FX_INT32 degree);\r
18     CFX_Int32Array* GetCoefficients();\r
19     FX_INT32            GetDegree();\r
20     FX_BOOL                     IsZero();\r
21     FX_INT32            EvaluateAt(FX_INT32 a);\r
22     CBC_ReedSolomonGF256Poly* AddOrSubtract(CBC_ReedSolomonGF256Poly* other, FX_INT32 &e);\r
23     CBC_ReedSolomonGF256Poly* Multiply(CBC_ReedSolomonGF256Poly* other, FX_INT32 &e);\r
24     CBC_ReedSolomonGF256Poly* Multiply(FX_INT32 scalar, FX_INT32 &e);\r
25     CBC_ReedSolomonGF256Poly* MultiplyByMonomial(FX_INT32 degree, FX_INT32 coefficient, FX_INT32 &e);\r
26     CFX_PtrArray* Divide(CBC_ReedSolomonGF256Poly *other, FX_INT32 &e);\r
27     CBC_ReedSolomonGF256Poly* Clone(FX_INT32 &e);\r
28     virtual void Init(CBC_ReedSolomonGF256* field, CFX_Int32Array* coefficients, FX_INT32 &e);\r
29 private:\r
30     CBC_ReedSolomonGF256* m_field;\r
31     CFX_Int32Array m_coefficients;\r
32 };\r
33 #endif\r