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_C40Encoder.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_C40ENCODER_H_
8#define FXBARCODE_DATAMATRIX_BC_C40ENCODER_H_
9
10#include "core/fxcrt/widestring.h"
11#include "fxbarcode/datamatrix/BC_Encoder.h"
12
14 public:
16 ~CBC_C40Encoder() override;
17
18 // CBC_Encoder
20 bool Encode(CBC_EncoderContext* context) override;
21
22 static void WriteNextTriplet(CBC_EncoderContext* context, WideString* buffer);
23
24 virtual bool HandleEOD(CBC_EncoderContext* context, WideString* buffer);
25
26 // Returns the number of characters appended to |sb|, or 0 on failure.
27 virtual int32_t EncodeChar(wchar_t c, WideString* sb);
28
29 private:
30 // Moves back by 1 position in |context| and adjusts |buffer| accordingly
31 // using |lastCharSize|. Returns the length of the current character in
32 // |context| after adjusting the position. If the character cannot be encoded,
33 // return -1.
34 int32_t BacktrackOneCharacter(CBC_EncoderContext* context,
35 WideString* buffer,
36 int32_t lastCharSize);
37};
38
39#endif // FXBARCODE_DATAMATRIX_BC_C40ENCODER_H_
static void WriteNextTriplet(CBC_EncoderContext *context, WideString *buffer)
virtual int32_t EncodeChar(wchar_t c, WideString *sb)
CBC_HighLevelEncoder::Encoding GetEncodingMode() override
virtual bool HandleEOD(CBC_EncoderContext *context, WideString *buffer)
bool Encode(CBC_EncoderContext *context) override
~CBC_C40Encoder() override
void writeCodewords(const WideString &codewords)
void writeCodeword(wchar_t codeword)
void SignalEncoderChange(CBC_HighLevelEncoder::Encoding encoding)
static const wchar_t C40_UNLATCH
WideString & operator+=(wchar_t ch)
CharType operator[](const size_t index) const
Definition widestring.h:146
bool FXSYS_IsDecimalDigit(wchar_t c)
bool FXSYS_IsUpperASCII(int32_t c)