Result.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
  2. /*
  3. * Result.cpp
  4. * zxing
  5. *
  6. * Created by Christian Brunschen on 13/05/2008.
  7. * Copyright 2008 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/Result.h>
  22. using zxing::Result;
  23. using zxing::Ref;
  24. using zxing::ArrayRef;
  25. using zxing::String;
  26. using zxing::ResultPoint;
  27. // VC++
  28. using zxing::BarcodeFormat;
  29. Result::Result(Ref<String> text,
  30. ArrayRef<char> rawBytes,
  31. ArrayRef< Ref<ResultPoint> > resultPoints,
  32. BarcodeFormat format) :
  33. text_(text), rawBytes_(rawBytes), resultPoints_(resultPoints), format_(format) {
  34. }
  35. Result::~Result() {
  36. }
  37. Ref<String> Result::getText() {
  38. return text_;
  39. }
  40. ArrayRef<char> Result::getRawBytes() {
  41. return rawBytes_;
  42. }
  43. ArrayRef< Ref<ResultPoint> > const& Result::getResultPoints() const {
  44. return resultPoints_;
  45. }
  46. ArrayRef< Ref<ResultPoint> >& Result::getResultPoints() {
  47. return resultPoints_;
  48. }
  49. zxing::BarcodeFormat Result::getBarcodeFormat() const {
  50. return format_;
  51. }