blob: 0e12d7d95e4aa4b85a8014e2061c636977248977 [file] [log] [blame]
kumarashishg826308d2023-06-23 13:21:22 +00001// Copyright 2014 The PDFium Authors
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef FXBARCODE_QRCODE_BC_QRCODERMODE_H_
8#define FXBARCODE_QRCODE_BC_QRCODERMODE_H_
9
10#include <stdint.h>
11
12#include <vector>
13
Haibo Huang49cc9302020-04-27 16:14:24 -070014class CBC_QRCoderMode final {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070015 public:
Haibo Huang49cc9302020-04-27 16:14:24 -070016 ~CBC_QRCoderMode();
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070017
18 static void Initialize();
19 static void Finalize();
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070020
Haibo Huang49cc9302020-04-27 16:14:24 -070021 int32_t GetCharacterCountBits(int32_t number) const;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070022 int32_t GetBits() const;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070023
24 static CBC_QRCoderMode* sBYTE;
25 static CBC_QRCoderMode* sNUMERIC;
26 static CBC_QRCoderMode* sALPHANUMERIC;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070027
28 private:
Haibo Huang49cc9302020-04-27 16:14:24 -070029 CBC_QRCoderMode(std::vector<int32_t> charCountBits, int32_t bits);
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070030
31 std::vector<int32_t> m_characterCountBitsForVersions;
32 const int32_t m_bits;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070033};
34
35#endif // FXBARCODE_QRCODE_BC_QRCODERMODE_H_