1 // Copyright 2014 The PDFium Authors 2 // 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 14 class CBC_QRCoderMode final { 15 public: 16 ~CBC_QRCoderMode(); 17 18 static void Initialize(); 19 static void Finalize(); 20 21 int32_t GetCharacterCountBits(int32_t number) const; 22 int32_t GetBits() const; 23 24 static CBC_QRCoderMode* sBYTE; 25 static CBC_QRCoderMode* sNUMERIC; 26 static CBC_QRCoderMode* sALPHANUMERIC; 27 28 private: 29 CBC_QRCoderMode(std::vector<int32_t> charCountBits, int32_t bits); 30 31 std::vector<int32_t> m_characterCountBitsForVersions; 32 const int32_t m_bits; 33 }; 34 35 #endif // FXBARCODE_QRCODE_BC_QRCODERMODE_H_ 36