#include "fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h"
#include <array>
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_string.h"
#include "third_party/bigint/BigIntegerLibrary.hh"
namespace {
constexpr int16_t kLatchToText = …;
constexpr int16_t kLatchToBytePadded = …;
constexpr int16_t kLatchToNumeric = …;
constexpr int16_t kShiftToByte = …;
constexpr int16_t kLatchToByte = …;
constexpr std::array<const int8_t, 128> kMixed = …;
constexpr std::array<const int8_t, 128> kPunctuation = …;
bool IsAlphaUpperOrSpace(wchar_t ch) { … }
bool IsAlphaLowerOrSpace(wchar_t ch) { … }
bool IsMixed(wchar_t ch) { … }
bool IsPunctuation(wchar_t ch) { … }
bool IsText(wchar_t ch) { … }
}
std::optional<WideString> CBC_PDF417HighLevelEncoder::EncodeHighLevel(
WideStringView msg) { … }
CBC_PDF417HighLevelEncoder::SubMode CBC_PDF417HighLevelEncoder::EncodeText(
const WideString& msg,
size_t startpos,
size_t count,
SubMode initialSubmode,
WideString* sb) { … }
void CBC_PDF417HighLevelEncoder::EncodeBinary(pdfium::span<const uint8_t> bytes,
size_t startpos,
size_t count,
EncodingMode startmode,
WideString* sb) { … }
void CBC_PDF417HighLevelEncoder::EncodeNumeric(const WideString& msg,
size_t startpos,
size_t count,
WideString* sb) { … }
size_t CBC_PDF417HighLevelEncoder::DetermineConsecutiveDigitCount(
WideString msg,
size_t startpos) { … }
size_t CBC_PDF417HighLevelEncoder::DetermineConsecutiveTextCount(
WideString msg,
size_t startpos) { … }
std::optional<size_t>
CBC_PDF417HighLevelEncoder::DetermineConsecutiveBinaryCount(
WideString msg,
pdfium::span<const uint8_t> bytes,
size_t startpos) { … }