58 inline bool isValid()
const override;
88 QRCodeBase(CT_STANDARD, std::move(data), encodingMode, errorCorrectionCapacity, std::move(modules), version)
115 if (version_ < MIN_VERSION || version_ >
MAX_VERSION)
122 ocean_assert(
false &&
"This should never happen!");
Base class for QR code implementations.
Definition: QRCodeBase.h:32
CodeType codeType_
The variant of this QR code.
Definition: QRCodeBase.h:246
std::vector< uint8_t > data_
The plain data.
Definition: QRCodeBase.h:249
ErrorCorrectionCapacity errorCorrectionCapacity_
The error correction capacity that was used to generated this QR code.
Definition: QRCodeBase.h:255
const std::vector< uint8_t > & modules() const
Returns the modules of this QR code The modules are stored in a vector and will have modulesPerSide()...
Definition: QRCodeBase.h:290
std::vector< uint8_t > modules_
The modules of the QR code that store the data.
Definition: QRCodeBase.h:258
@ CT_STANDARD
Indicates a standard QR codes.
Definition: QRCodeBase.h:43
unsigned int version() const
Returns the version of the QR code.
Definition: QRCodeBase.h:305
const std::vector< uint8_t > & data() const
Returns a constant reference to the plain data of the QR code.
Definition: QRCodeBase.h:280
EncodingMode
Definition of encoding modes.
Definition: QRCodeBase.h:72
@ EM_INVALID_ENCODING_MODE
Indicator for an invalid encoding mode.
Definition: QRCodeBase.h:92
ErrorCorrectionCapacity
Enumeration of the levels of error correction The value of the enums correspond to the standard-defin...
Definition: QRCodeBase.h:53
@ ECC_INVALID
Indicator for an invalid error correction capacity.
Definition: QRCodeBase.h:65
@ ECC_DETECTION_ONLY
Indicates that the capacity is limited to error detection only (used only by Micro QR Code version M1...
Definition: QRCodeBase.h:63
ErrorCorrectionCapacity errorCorrectionCapacity() const
Returns the error correction capacity of the QR code.
Definition: QRCodeBase.h:300
EncodingMode encodingMode_
The encoding mode that was used to generate this QR code.
Definition: QRCodeBase.h:252
EncodingMode encodingMode() const
Returns the encoding mode of the QR code.
Definition: QRCodeBase.h:295
Definition of a QR code decoder.
Definition: QRCodeDecoder.h:31
This class implements an encoder and decoder for QR codes.
Definition: QRCodeEncoder.h:37
Definition of a QR code.
Definition: QRCode.h:35
static constexpr unsigned int MIN_VERSION
Indicates the smallest valid version number of QR codes.
Definition: QRCode.h:42
static constexpr unsigned int MAX_VERSION
Indicates the largest valid version number of QR codes.
Definition: QRCode.h:45
unsigned int modulesPerSide() const override
Returns the number of modules per side of the QR code.
Definition: QRCode.h:129
bool isValid() const override
Returns whether this is a valid QR code instance.
Definition: QRCode.h:93
QRCode()=default
Creates an invalid QR code instance.
std::vector< QRCode > QRCodes
Definition of a vector of QR codes.
Definition: QRCode.h:25
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15