Sha256: 553b9dfb1088cf0e2dbdca3679dae90463b490cd67205165c710a1c21194cf47

Contents?: true

Size: 1.67 KB

Versions: 5

Compression:

Stored size: 1.67 KB

Contents

#ifndef __FORMAT_INFORMATION_H__
#define __FORMAT_INFORMATION_H__

/*
 *  FormatInformation.h
 *  zxing
 *
 *  Copyright 2010 ZXing authors All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <zxing/qrcode/ErrorCorrectionLevel.h>
#include <zxing/common/Counted.h>
#include <iostream>

namespace zxing {
namespace qrcode {

class FormatInformation : public Counted {
private:
  static int FORMAT_INFO_MASK_QR;
  static int FORMAT_INFO_DECODE_LOOKUP[][2];
  static int N_FORMAT_INFO_DECODE_LOOKUPS;
  static int BITS_SET_IN_HALF_BYTE[];

  ErrorCorrectionLevel &errorCorrectionLevel_;
  unsigned char dataMask_;

  FormatInformation(int formatInfo);

public:
  static int numBitsDiffering(unsigned int a, unsigned int b);
  static Ref<FormatInformation> decodeFormatInformation(int rawFormatInfo);
  static Ref<FormatInformation> doDecodeFormatInformation(int rawFormatInfo);
  ErrorCorrectionLevel &getErrorCorrectionLevel();
  unsigned char getDataMask();
  friend bool operator==(const FormatInformation &a, const FormatInformation &b);
  friend std::ostream& operator<<(std::ostream& out, const FormatInformation& fi);
};
}
}

#endif // __FORMAT_INFORMATION_H__

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qrscanner-0.4.1 ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h
qrscanner-0.4 ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h
qrscanner-0.3.1 ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h
qrscanner-0.2 ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h
qrscanner-0.1 ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h