|
Monero
|
#include <QrCode.hpp>
Public Types | |
| enum class | Ecc { LOW = 0 , MEDIUM , QUARTILE , HIGH } |
Public Member Functions | |
| QrCode (int ver, Ecc ecl, const std::vector< std::uint8_t > &dataCodewords, int msk) | |
| int | getVersion () const |
| int | getSize () const |
| Ecc | getErrorCorrectionLevel () const |
| int | getMask () const |
| bool | getModule (int x, int y) const |
| std::string | toSvgString (int border) const |
Static Public Member Functions | |
| static QrCode | encodeText (const char *text, Ecc ecl) |
| static QrCode | encodeBinary (const std::vector< std::uint8_t > &data, Ecc ecl) |
| static QrCode | encodeSegments (const std::vector< QrSegment > &segs, Ecc ecl, int minVersion=1, int maxVersion=40, int mask=-1, bool boostEcl=true) |
Static Public Attributes | |
| static constexpr int | MIN_VERSION = 1 |
| static constexpr int | MAX_VERSION = 40 |
Private Member Functions | |
| void | drawFunctionPatterns () |
| void | drawFormatBits (int msk) |
| void | drawVersion () |
| void | drawFinderPattern (int x, int y) |
| void | drawAlignmentPattern (int x, int y) |
| void | setFunctionModule (int x, int y, bool isBlack) |
| bool | module (int x, int y) const |
| std::vector< std::uint8_t > | addEccAndInterleave (const std::vector< std::uint8_t > &data) const |
| void | drawCodewords (const std::vector< std::uint8_t > &data) |
| void | applyMask (int msk) |
| long | getPenaltyScore () const |
| std::vector< int > | getAlignmentPatternPositions () const |
| int | finderPenaltyCountPatterns (const std::array< int, 7 > &runHistory) const |
| int | finderPenaltyTerminateAndCount (bool currentRunColor, int currentRunLength, std::array< int, 7 > &runHistory) const |
| void | finderPenaltyAddHistory (int currentRunLength, std::array< int, 7 > &runHistory) const |
Static Private Member Functions | |
| static int | getFormatBits (Ecc ecl) |
| static int | getNumRawDataModules (int ver) |
| static int | getNumDataCodewords (int ver, Ecc ecl) |
| static std::vector< std::uint8_t > | reedSolomonComputeDivisor (int degree) |
| static std::vector< std::uint8_t > | reedSolomonComputeRemainder (const std::vector< std::uint8_t > &data, const std::vector< std::uint8_t > &divisor) |
| static std::uint8_t | reedSolomonMultiply (std::uint8_t x, std::uint8_t y) |
| static bool | getBit (long x, int i) |
Private Attributes | |
| int | version |
| int | size |
| Ecc | errorCorrectionLevel |
| int | mask |
| std::vector< std::vector< bool > > | modules |
| std::vector< std::vector< bool > > | isFunction |
Static Private Attributes | |
| static const int | PENALTY_N1 = 3 |
| static const int | PENALTY_N2 = 3 |
| static const int | PENALTY_N3 = 40 |
| static const int | PENALTY_N4 = 10 |
| static const std::int8_t | ECC_CODEWORDS_PER_BLOCK [4][41] |
| static const std::int8_t | NUM_ERROR_CORRECTION_BLOCKS [4][41] |
|
strong |
| qrcodegen::QrCode::QrCode | ( | int | ver, |
| Ecc | ecl, | ||
| const std::vector< std::uint8_t > & | dataCodewords, | ||
| int | msk ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
| QrCode::Ecc qrcodegen::QrCode::getErrorCorrectionLevel | ( | ) | const |
|
staticprivate |
| int qrcodegen::QrCode::getMask | ( | ) | const |
| bool qrcodegen::QrCode::getModule | ( | int | x, |
| int | y ) const |
|
staticprivate |
|
staticprivate |
|
private |
| int qrcodegen::QrCode::getSize | ( | ) | const |
| int qrcodegen::QrCode::getVersion | ( | ) | const |
|
private |
|
staticprivate |
|
staticprivate |
|
private |
| std::string qrcodegen::QrCode::toSvgString | ( | int | border | ) | const |
|
private |
|
private |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |