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_EncoderContext.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_ENCODERCONTEXT_H_
8#define FXBARCODE_DATAMATRIX_BC_ENCODERCONTEXT_H_
9
10#include "core/fxcrt/unowned_ptr.h"
11#include "core/fxcrt/widestring.h"
12#include "fxbarcode/datamatrix/BC_HighLevelEncoder.h"
13
14class CBC_SymbolInfo;
15
17 public:
18 explicit CBC_EncoderContext(const WideString& msg);
20
21 void setSkipAtEnd(int32_t count);
22 wchar_t getCurrentChar();
23 wchar_t getCurrent();
24 void writeCodewords(const WideString& codewords);
25 void writeCodeword(wchar_t codeword);
28 void ResetEncoderSignal();
29 bool hasMoreCharacters();
31 bool UpdateSymbolInfo();
32 bool UpdateSymbolInfo(size_t len);
33 void resetSymbolInfo();
34
36 return m_bHasCharactersOutsideISO88591Encoding;
37 }
38
39 WideString m_msg;
40 WideString m_codewords;
45
46 private:
47 size_t getTotalMessageCharCount();
48
49 bool m_bAllowRectangular = false; // Force square when false.
50 bool m_bHasCharactersOutsideISO88591Encoding = false;
51 size_t m_skipAtEnd = 0;
52};
53
54#endif // FXBARCODE_DATAMATRIX_BC_ENCODERCONTEXT_H_
bool Encode(CBC_EncoderContext *context) override
~CBC_ASCIIEncoder() override
CBC_HighLevelEncoder::Encoding GetEncodingMode() override
void writeCodewords(const WideString &codewords)
UnownedPtr< const CBC_SymbolInfo > m_symbolInfo
void writeCodeword(wchar_t codeword)
CBC_HighLevelEncoder::Encoding m_newEncoding
void setSkipAtEnd(int32_t count)
bool HasCharactersOutsideISO88591Encoding() const
bool UpdateSymbolInfo(size_t len)
void SignalEncoderChange(CBC_HighLevelEncoder::Encoding encoding)
CBC_EncoderContext(const WideString &msg)
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)