OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _BC_PDF417ECMODULUSGF_H_ | 7 #ifndef _BC_PDF417ECMODULUSGF_H_ |
8 #define _BC_PDF417ECMODULUSGF_H_ | 8 #define _BC_PDF417ECMODULUSGF_H_ |
9 class CBC_PDF417ECModulusPoly; | 9 class CBC_PDF417ECModulusPoly; |
10 class CBC_PDF417Common; | 10 class CBC_PDF417Common; |
11 class CBC_PDF417ECModulusGF; | 11 class CBC_PDF417ECModulusGF |
12 class CBC_PDF417ECModulusGF : public CFX_Object | |
13 { | 12 { |
14 public: | 13 public: |
15 CBC_PDF417ECModulusGF(FX_INT32 modulus, FX_INT32 generator, FX_INT32 &e); | 14 CBC_PDF417ECModulusGF(FX_INT32 modulus, FX_INT32 generator, FX_INT32 &e); |
16 virtual ~CBC_PDF417ECModulusGF(); | 15 virtual ~CBC_PDF417ECModulusGF(); |
17 static void Initialize(FX_INT32 &e); | 16 static void Initialize(FX_INT32 &e); |
18 static void Finalize(); | 17 static void Finalize(); |
19 CBC_PDF417ECModulusPoly* getZero(); | 18 CBC_PDF417ECModulusPoly* getZero(); |
20 CBC_PDF417ECModulusPoly* getOne(); | 19 CBC_PDF417ECModulusPoly* getOne(); |
21 CBC_PDF417ECModulusPoly* buildMonomial(FX_INT32 degree, FX_INT32 coefficient
, FX_INT32 &e); | 20 CBC_PDF417ECModulusPoly* buildMonomial(FX_INT32 degree, FX_INT32 coefficient
, FX_INT32 &e); |
22 FX_INT32 add(FX_INT32 a, FX_INT32 b); | 21 FX_INT32 add(FX_INT32 a, FX_INT32 b); |
23 FX_INT32 subtract(FX_INT32 a, FX_INT32 b); | 22 FX_INT32 subtract(FX_INT32 a, FX_INT32 b); |
24 FX_INT32 exp(FX_INT32 a); | 23 FX_INT32 exp(FX_INT32 a); |
25 FX_INT32 log(FX_INT32 a, FX_INT32 &e); | 24 FX_INT32 log(FX_INT32 a, FX_INT32 &e); |
26 FX_INT32 inverse(FX_INT32 a, FX_INT32 &e); | 25 FX_INT32 inverse(FX_INT32 a, FX_INT32 &e); |
27 FX_INT32 multiply(FX_INT32 a, FX_INT32 b); | 26 FX_INT32 multiply(FX_INT32 a, FX_INT32 b); |
28 FX_INT32 getSize(); | 27 FX_INT32 getSize(); |
29 static CBC_PDF417ECModulusGF* PDF417_GF; | 28 static CBC_PDF417ECModulusGF* PDF417_GF; |
30 private: | 29 private: |
31 CFX_Int32Array m_expTable; | 30 CFX_Int32Array m_expTable; |
32 CFX_Int32Array m_logTable; | 31 CFX_Int32Array m_logTable; |
33 CBC_PDF417ECModulusPoly* m_zero; | 32 CBC_PDF417ECModulusPoly* m_zero; |
34 CBC_PDF417ECModulusPoly* m_one; | 33 CBC_PDF417ECModulusPoly* m_one; |
35 FX_INT32 m_modulus; | 34 FX_INT32 m_modulus; |
36 }; | 35 }; |
37 #endif | 36 #endif |
OLD | NEW |