7#ifndef FXBARCODE_QRCODE_BC_QRCODER_H_
8#define FXBARCODE_QRCODE_BC_QRCODER_H_
12#include "core/fxcrt/unowned_ptr.h"
15class CBC_CommonByteMatrix;
17class CBC_QRCoder
final {
45 void SetMatrix(std::unique_ptr<CBC_CommonByteMatrix> pMatrix);
49 int32_t m_version = -1;
50 int32_t m_matrixWidth = -1;
51 int32_t m_maskPattern = -1;
52 int32_t m_numTotalBytes = -1;
53 int32_t m_numDataBytes = -1;
54 int32_t m_numECBytes = -1;
55 int32_t m_numRSBlocks = -1;
56 std::unique_ptr<CBC_CommonByteMatrix> m_matrix;
void SetMatrixWidth(int32_t width)
int32_t GetNumRSBlocks() const
void SetMatrix(std::unique_ptr< CBC_CommonByteMatrix > pMatrix)
int32_t GetNumTotalBytes() const
void SetNumECBytes(int32_t value)
void SetECLevel(const CBC_QRCoderErrorCorrectionLevel *ecLevel)
void SetNumRSBlocks(int32_t block)
const CBC_QRCoderErrorCorrectionLevel * GetECLevel() const
int32_t GetMatrixWidth() const
int32_t GetNumDataBytes() const
static constexpr int32_t kNumMaskPatterns
void SetMaskPattern(int32_t pattern)
int32_t GetMaskPattern() const
void SetNumDataBytes(int32_t bytes)
void SetNumTotalBytes(int32_t value)
static bool IsValidMaskPattern(int32_t maskPattern)
std::unique_ptr< CBC_CommonByteMatrix > TakeMatrix()
int32_t GetVersion() const
void SetVersion(int32_t version)