Decoder.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __DECODER_H__
  2. #define __DECODER_H__
  3. /*
  4. * Decoder.h
  5. * zxing
  6. *
  7. * Copyright 2010 ZXing authors All rights reserved.
  8. *
  9. * Licensed under the Apache License, Version 2.0 (the "License");
  10. * you may not use this file except in compliance with the License.
  11. * You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing, software
  16. * distributed under the License is distributed on an "AS IS" BASIS,
  17. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. * See the License for the specific language governing permissions and
  19. * limitations under the License.
  20. */
  21. #include <zxing/common/reedsolomon/ReedSolomonDecoder.h>
  22. #include <zxing/common/Counted.h>
  23. #include <zxing/common/Array.h>
  24. #include <zxing/common/DecoderResult.h>
  25. #include <zxing/common/BitMatrix.h>
  26. namespace zxing {
  27. namespace qrcode {
  28. class Decoder {
  29. private:
  30. ReedSolomonDecoder rsDecoder_;
  31. void correctErrors(ArrayRef<char> bytes, int numDataCodewords);
  32. public:
  33. Decoder();
  34. Ref<DecoderResult> decode(Ref<BitMatrix> bits);
  35. };
  36. }
  37. }
  38. #endif // __DECODER_H__