Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_DATAMATRIXVERSION_H_ 7 #ifndef _BC_DATAMATRIXVERSION_H_
8 #define _BC_DATAMATRIXVERSION_H_ 8 #define _BC_DATAMATRIXVERSION_H_
9 class ECBlocks; 9 class ECBlocks;
10 class CBC_DataMatrixVersion; 10 class CBC_DataMatrixVersion;
11 class ECB 11 class ECB
12 { 12 {
13 public: 13 public:
14 ECB(FX_INT32 count, FX_INT32 dataCodewords) 14 ECB(int32_t count, int32_t dataCodewords)
15 { 15 {
16 m_count = count; 16 m_count = count;
17 m_dataCodewords = dataCodewords; 17 m_dataCodewords = dataCodewords;
18 } 18 }
19 19
20 FX_INT32 GetCount() 20 int32_t GetCount()
21 { 21 {
22 return m_count; 22 return m_count;
23 } 23 }
24 24
25 FX_INT32 GetDataCodewords() 25 int32_t GetDataCodewords()
26 { 26 {
27 return m_dataCodewords; 27 return m_dataCodewords;
28 } 28 }
29 private: 29 private:
30 FX_INT32 m_count; 30 int32_t m_count;
31 FX_INT32 m_dataCodewords; 31 int32_t m_dataCodewords;
32 }; 32 };
33 class ECBlocks 33 class ECBlocks
34 { 34 {
35 public: 35 public:
36 ECBlocks(FX_INT32 ecCodewords, ECB *ecBlocks) 36 ECBlocks(int32_t ecCodewords, ECB *ecBlocks)
37 { 37 {
38 m_ecCodewords = ecCodewords; 38 m_ecCodewords = ecCodewords;
39 m_ecBlocks.Add(ecBlocks); 39 m_ecBlocks.Add(ecBlocks);
40 } 40 }
41 41
42 ECBlocks(FX_INT32 ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2) 42 ECBlocks(int32_t ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2)
43 { 43 {
44 m_ecCodewords = ecCodewords; 44 m_ecCodewords = ecCodewords;
45 m_ecBlocks.Add(ecBlocks1); 45 m_ecBlocks.Add(ecBlocks1);
46 m_ecBlocks.Add(ecBlocks2); 46 m_ecBlocks.Add(ecBlocks2);
47 } 47 }
48 ~ECBlocks() 48 ~ECBlocks()
49 { 49 {
50 for(FX_INT32 i = 0; i < m_ecBlocks.GetSize(); i++) { 50 for(int32_t i = 0; i < m_ecBlocks.GetSize(); i++) {
51 delete (ECB*)m_ecBlocks[i]; 51 delete (ECB*)m_ecBlocks[i];
52 } 52 }
53 m_ecBlocks.RemoveAll(); 53 m_ecBlocks.RemoveAll();
54 } 54 }
55 55
56 FX_INT32 GetECCodewords() 56 int32_t GetECCodewords()
57 { 57 {
58 return m_ecCodewords; 58 return m_ecCodewords;
59 } 59 }
60 60
61 const CFX_PtrArray &GetECBlocks() 61 const CFX_PtrArray &GetECBlocks()
62 { 62 {
63 return m_ecBlocks; 63 return m_ecBlocks;
64 } 64 }
65 private: 65 private:
66 FX_INT32 m_ecCodewords; 66 int32_t m_ecCodewords;
67 CFX_PtrArray m_ecBlocks; 67 CFX_PtrArray m_ecBlocks;
68 }; 68 };
69 class CBC_DataMatrixVersion 69 class CBC_DataMatrixVersion
70 { 70 {
71 public: 71 public:
72 CBC_DataMatrixVersion(FX_INT32 versionNumber, 72 CBC_DataMatrixVersion(int32_t versionNumber,
73 FX_INT32 symbolSizeRows, 73 int32_t symbolSizeRows,
74 FX_INT32 symbolSizeColumns, 74 int32_t symbolSizeColumns,
75 FX_INT32 dataRegionSizeRows, 75 int32_t dataRegionSizeRows,
76 FX_INT32 dataRegionSizeColumns, 76 int32_t dataRegionSizeColumns,
77 ECBlocks *ecBlocks); 77 ECBlocks *ecBlocks);
78 virtual ~CBC_DataMatrixVersion(); 78 virtual ~CBC_DataMatrixVersion();
79 static void Initialize(); 79 static void Initialize();
80 static void Finalize(); 80 static void Finalize();
81 FX_INT32 GetVersionNumber(); 81 int32_t GetVersionNumber();
82 FX_INT32 GetSymbolSizeRows(); 82 int32_t GetSymbolSizeRows();
83 FX_INT32 GetSymbolSizeColumns(); 83 int32_t GetSymbolSizeColumns();
84 FX_INT32 GetDataRegionSizeRows(); 84 int32_t GetDataRegionSizeRows();
85 FX_INT32 GetDataRegionSizeColumns(); 85 int32_t GetDataRegionSizeColumns();
86 FX_INT32 GetTotalCodewords(); 86 int32_t GetTotalCodewords();
87 ECBlocks *GetECBlocks(); 87 ECBlocks *GetECBlocks();
88 static CBC_DataMatrixVersion *GetVersionForDimensions(FX_INT32 numRows, FX_I NT32 numColumns, FX_INT32 &e); 88 static CBC_DataMatrixVersion *GetVersionForDimensions(int32_t numRows, int32 _t numColumns, int32_t &e);
89 static void ReleaseAll(); 89 static void ReleaseAll();
90 private: 90 private:
91 FX_INT32 m_versionNumber; 91 int32_t m_versionNumber;
92 FX_INT32 m_symbolSizeRows; 92 int32_t m_symbolSizeRows;
93 FX_INT32 m_symbolSizeColumns; 93 int32_t m_symbolSizeColumns;
94 FX_INT32 m_dataRegionSizeRows; 94 int32_t m_dataRegionSizeRows;
95 FX_INT32 m_dataRegionSizeColumns; 95 int32_t m_dataRegionSizeColumns;
96 ECBlocks *m_ecBlocks; 96 ECBlocks *m_ecBlocks;
97 FX_INT32 m_totalCodewords; 97 int32_t m_totalCodewords;
98 static CFX_PtrArray* VERSIONS; 98 static CFX_PtrArray* VERSIONS;
99 }; 99 };
100 #endif 100 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.cpp ('k') | xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698