CVB++ 14.0
read_result_qr.hpp
1#pragma once
2
3#include "read_result_2d.hpp"
4#include "grade_result_qr.hpp"
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9
10 namespace Barcode
11 {
13
17 : public ReadResult2D
18 {
19 public:
21
24 ReadResultQr(CExports::CVC_BC_INFO& handle)
25 : ReadResult2D(handle)
26 , gradeResult_(nullptr)
27 {
28 }
29
31
35 int Contrast() const
36 {
37 return static_cast<int>(handle_.contrast);
38 }
39
41
46 {
47 return static_cast<EccLevelQr>(handle_.ecc_level);
48 }
49
51
55 int FormatMiniQr() const
56 {
57 auto tmpFormat = static_cast<int>(handle_.format);
58 return (tmpFormat > 40) ? tmpFormat - 40 : 0;
59 }
60
62
66 int FormatStandardQr() const
67 {
68 auto tmpFormat = static_cast<int>(handle_.format);
69 return (tmpFormat <= 40) ? tmpFormat : 0;
70 }
71
73
78 {
79 return gradeResult_;
80 }
81
83
88 {
89 return static_cast<QrMasking>(handle_.number_system);
90 }
91
92 protected:
93 GradeResultQrPtr gradeResult_;
94
95 friend class Reader;
96 };
97
98 using ReadResultQrPtr = std::shared_ptr<ReadResultQr>;
99 }
100
101 CVB_END_INLINE_NS
102}
Derived from ReadResult2D and gives specific access to Qr results.
Definition: read_result_qr.hpp:18
GradeResultQrPtr GradeResult() const
QR grading result.
Definition: read_result_qr.hpp:77
int FormatMiniQr() const
Format of the Mini QR code (if applicable).
Definition: read_result_qr.hpp:55
QrMasking Masking() const
Masking mode of the QR code.
Definition: read_result_qr.hpp:87
int Contrast() const
The contrast element contains the minimal contrast in the code.
Definition: read_result_qr.hpp:35
ReadResultQr(CExports::CVC_BC_INFO &handle)
Constructor to initialize object from info struct.
Definition: read_result_qr.hpp:24
int FormatStandardQr() const
Format of the Standard QR code (if applicable).
Definition: read_result_qr.hpp:66
EccLevelQr EccLevel() const
ECC level of the code.
Definition: read_result_qr.hpp:45
The key class for reading barcodes.
Definition: reader.hpp:32
Object contains information about a decoded barcode.
Definition: read_result_2d.hpp:20
QrMasking
Masking modes of QR codes.
Definition: barcode.hpp:498
EccLevelQr
ECC levels as used by QR codes.
Definition: barcode.hpp:472
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24