14d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann// Copyright 2014 PDFium Authors. All rights reserved. 24d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann// Use of this source code is governed by a BSD-style license that can be 34d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann// found in the LICENSE file. 44d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 54d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 64d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 74d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann#ifndef XFA_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ 84d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann#define XFA_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ 94d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 104d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann#include "core/fxcrt/fx_string.h" 114d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 124d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmannclass CBC_QRCoderErrorCorrectionLevel { 134d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann public: 144d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static CBC_QRCoderErrorCorrectionLevel* L; 154d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static CBC_QRCoderErrorCorrectionLevel* M; 164d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static CBC_QRCoderErrorCorrectionLevel* Q; 174d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static CBC_QRCoderErrorCorrectionLevel* H; 184d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 194d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static void Initialize(); 204d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static void Finalize(); 214d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static void Destroy(); 224d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann static CBC_QRCoderErrorCorrectionLevel* ForBits(int32_t bits); 234d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 244d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann ~CBC_QRCoderErrorCorrectionLevel(); 254d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 264d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann int32_t Ordinal() const { return m_ordinal; } 274d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann int32_t GetBits() const { return m_bits; } 284d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann CFX_ByteString GetName() const { return m_name; } 294d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 304d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann private: 314d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann CBC_QRCoderErrorCorrectionLevel(int32_t ordinal, 324d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann int32_t bits, 334d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann const FX_CHAR* name); 344d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann CBC_QRCoderErrorCorrectionLevel(); 354d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 364d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann int32_t m_ordinal; 374d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann int32_t m_bits; 384d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann CFX_ByteString m_name; 394d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann}; 404d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann 414d3acf4ec42bf6e838f9060103aff98fbf170794Philip P. Moltmann#endif // XFA_FXBARCODE_QRCODE_BC_QRCODERERRORCORRECTIONLEVEL_H_ 42