Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
BC_HighLevelEncoder.h
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
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 FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
8#define FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
9
10#include "core/fxcrt/widestring.h"
11
13 public:
14 enum class Encoding : int8_t {
15 UNKNOWN = -1,
16 ASCII = 0,
17 C40,
18 TEXT,
19 X12,
20 EDIFACT,
21 BASE256,
22 LAST = BASE256,
23 };
24
27
28 // Returns an empty string on failure.
29 static WideString EncodeHighLevel(const WideString& msg);
30
31 static Encoding LookAheadTest(const WideString& msg,
32 size_t startpos,
33 Encoding currentMode);
34 static bool IsExtendedASCII(wchar_t ch);
35
36 static const wchar_t LATCH_TO_C40 = 230;
37 static const wchar_t LATCH_TO_BASE256 = 231;
38 static const wchar_t UPPER_SHIFT = 235;
39 static const wchar_t LATCH_TO_ANSIX12 = 238;
40 static const wchar_t LATCH_TO_TEXT = 239;
41 static const wchar_t LATCH_TO_EDIFACT = 240;
42 static const wchar_t C40_UNLATCH = 254;
43 static const wchar_t X12_UNLATCH = 254;
44};
45
46#endif // FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
bool Encode(CBC_EncoderContext *context) override
~CBC_ASCIIEncoder() override
CBC_HighLevelEncoder::Encoding GetEncodingMode() override
void writeCodeword(wchar_t codeword)
void SignalEncoderChange(CBC_HighLevelEncoder::Encoding encoding)
virtual bool Encode(CBC_EncoderContext *context)=0
virtual CBC_HighLevelEncoder::Encoding GetEncodingMode()=0
virtual ~CBC_Encoder()
static const wchar_t LATCH_TO_TEXT
static const wchar_t LATCH_TO_ANSIX12
static const wchar_t LATCH_TO_BASE256
static bool IsExtendedASCII(wchar_t ch)
static const wchar_t C40_UNLATCH
static WideString EncodeHighLevel(const WideString &msg)
static const wchar_t LATCH_TO_C40
static const wchar_t UPPER_SHIFT
CBC_HighLevelEncoder()=delete
static const wchar_t LATCH_TO_EDIFACT
static Encoding LookAheadTest(const WideString &msg, size_t startpos, Encoding currentMode)
~CBC_HighLevelEncoder()=delete
static const wchar_t X12_UNLATCH
const wchar_t * c_str() const
Definition widestring.h:81
bool FXSYS_IsDecimalDigit(wchar_t c)