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

Side by Side Diff: xfa/src/fxbarcode/src/include/BC_HighLevelEncoder.h

Issue 842043002: Organize barcode codes into modules. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 11 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
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef _BC_HIGHLEVALENCODER_H_
8 #define _BC_HIGHLEVALENCODER_H_
9 class CBC_SymbolShapeHint;
10 class CBC_HighLevelEncoder;
11 #define ASCII_ENCODATION 0
12 #define C40_ENCODATION 1
13 #define TEXT_ENCODATION 2
14 #define X12_ENCODATION 3
15 #define EDIFACT_ENCODATION 4
16 #define BASE256_ENCODATION 5
17 class CBC_HighLevelEncoder : public CBC_SymbolShapeHint
18 {
19 public:
20 CBC_HighLevelEncoder();
21 virtual ~CBC_HighLevelEncoder();
22 CFX_ByteArray& getBytesForMessage(CFX_WideString msg);
23 static CFX_WideString encodeHighLevel(CFX_WideString msg, CFX_WideString ecL evel, FX_INT32 &e);
24 static CFX_WideString encodeHighLevel(CFX_WideString msg, CFX_WideString ecL evel, SymbolShapeHint shape, CBC_Dimension* minSize, CBC_Dimension* maxSize, FX_ INT32 &e);
25 static FX_INT32 lookAheadTest(CFX_WideString msg, FX_INT32 startpos, FX_INT3 2 currentMode);
26 static FX_BOOL isDigit(FX_WCHAR ch);
27 static FX_BOOL isExtendedASCII(FX_WCHAR ch);
28 static FX_INT32 determineConsecutiveDigitCount(CFX_WideString msg, FX_INT32 startpos);
29 static void illegalCharacter(FX_WCHAR c, FX_INT32 &e);
30
31 public:
32 static FX_WCHAR LATCH_TO_C40;
33 static FX_WCHAR LATCH_TO_BASE256;
34 static FX_WCHAR UPPER_SHIFT;
35 static FX_WCHAR LATCH_TO_ANSIX12;
36 static FX_WCHAR LATCH_TO_TEXT;
37 static FX_WCHAR LATCH_TO_EDIFACT;
38 static FX_WCHAR C40_UNLATCH;
39 static FX_WCHAR X12_UNLATCH;
40 private:
41 static FX_WCHAR PAD;
42 static FX_WCHAR MACRO_05;
43 static FX_WCHAR MACRO_06;
44 static const wchar_t* MACRO_05_HEADER;
45 static const wchar_t* MACRO_06_HEADER;
46 static const wchar_t MACRO_TRAILER;
47 CFX_ByteArray m_bytearray;
48 private:
49 static FX_WCHAR randomize253State(FX_WCHAR ch, FX_INT32 codewordPosition);
50 static FX_INT32 findMinimums(CFX_FloatArray &charCounts, CFX_Int32Array &int CharCounts, FX_INT32 min, CFX_ByteArray &mins);
51 static FX_INT32 getMinimumCount(CFX_ByteArray &mins);
52 static FX_BOOL isNativeC40(FX_WCHAR ch);
53 static FX_BOOL isNativeText(FX_WCHAR ch);
54 static FX_BOOL isNativeX12(FX_WCHAR ch);
55 static FX_BOOL isX12TermSep(FX_WCHAR ch);
56 static FX_BOOL isNativeEDIFACT(FX_WCHAR ch);
57 static FX_BOOL isSpecialB256(FX_WCHAR ch);
58
59 };
60 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxbarcode/src/include/BC_GlobalHistogramBinarizer.h ('k') | xfa/src/fxbarcode/src/include/BC_LuminanceSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698