|
|
@ -138,13 +138,13 @@ class QrSegment final {
|
|
|
|
/*---- Instance fields ----*/
|
|
|
|
/*---- Instance fields ----*/
|
|
|
|
|
|
|
|
|
|
|
|
/* The mode indicator for this segment. */
|
|
|
|
/* The mode indicator for this segment. */
|
|
|
|
public: const Mode mode;
|
|
|
|
private: Mode mode;
|
|
|
|
|
|
|
|
|
|
|
|
/* The length of this segment's unencoded data, measured in characters. Always zero or positive. */
|
|
|
|
/* The length of this segment's unencoded data, measured in characters. Always zero or positive. */
|
|
|
|
public: const int numChars;
|
|
|
|
private: int numChars;
|
|
|
|
|
|
|
|
|
|
|
|
/* The data bits of this segment. */
|
|
|
|
/* The data bits of this segment. */
|
|
|
|
public: const std::vector<bool> data;
|
|
|
|
private: std::vector<bool> data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---- Constructor ----*/
|
|
|
|
/*---- Constructor ----*/
|
|
|
@ -161,6 +161,17 @@ class QrSegment final {
|
|
|
|
public: QrSegment(const Mode &md, int numCh, std::vector<bool> &&dt);
|
|
|
|
public: QrSegment(const Mode &md, int numCh, std::vector<bool> &&dt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*---- Methods ----*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: Mode getMode() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: int getNumChars() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: const std::vector<bool> &getData() const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Package-private helper function.
|
|
|
|
// Package-private helper function.
|
|
|
|
public: static int getTotalBits(const std::vector<QrSegment> &segs, int version);
|
|
|
|
public: static int getTotalBits(const std::vector<QrSegment> &segs, int version);
|
|
|
|
|
|
|
|
|
|
|
|