#include "fxbarcode/datamatrix/BC_HighLevelEncoder.h"
#include <algorithm>
#include <array>
#include <limits>
#include <memory>
#include <vector>
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_extension.h"
#include "fxbarcode/datamatrix/BC_ASCIIEncoder.h"
#include "fxbarcode/datamatrix/BC_Base256Encoder.h"
#include "fxbarcode/datamatrix/BC_C40Encoder.h"
#include "fxbarcode/datamatrix/BC_EdifactEncoder.h"
#include "fxbarcode/datamatrix/BC_Encoder.h"
#include "fxbarcode/datamatrix/BC_EncoderContext.h"
#include "fxbarcode/datamatrix/BC_SymbolInfo.h"
#include "fxbarcode/datamatrix/BC_TextEncoder.h"
#include "fxbarcode/datamatrix/BC_X12Encoder.h"
namespace {
const wchar_t kPad = …;
const wchar_t kMacro05 = …;
const wchar_t kMacro06 = …;
const wchar_t kMacro05Header[] = …;
const wchar_t kMacro06Header[] = …;
const wchar_t kMacroTrailer = …;
constexpr size_t kEncoderCount = …;
static_assert …;
wchar_t Randomize253State(wchar_t ch, int32_t codewordPosition) { … }
int32_t FindMinimums(const std::array<float, kEncoderCount>& charCounts,
std::array<int32_t, kEncoderCount>* intCharCounts,
std::array<uint8_t, kEncoderCount>* mins) { … }
int32_t GetMinimumCount(const std::array<uint8_t, kEncoderCount>& mins) { … }
bool IsNativeC40(wchar_t ch) { … }
bool IsNativeText(wchar_t ch) { … }
bool IsX12TermSep(wchar_t ch) { … }
bool IsNativeX12(wchar_t ch) { … }
bool IsNativeEDIFACT(wchar_t ch) { … }
size_t EncoderIndex(CBC_HighLevelEncoder::Encoding encoding) { … }
}
WideString CBC_HighLevelEncoder::EncodeHighLevel(const WideString& msg) { … }
CBC_HighLevelEncoder::Encoding CBC_HighLevelEncoder::LookAheadTest(
const WideString& msg,
size_t startpos,
CBC_HighLevelEncoder::Encoding currentMode) { … }
bool CBC_HighLevelEncoder::IsExtendedASCII(wchar_t ch) { … }