Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DecodeHints.h
00001 // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 00002 #ifndef __DECODEHINTS_H_ 00003 #define __DECODEHINTS_H_ 00004 /* 00005 * DecodeHintType.h 00006 * zxing 00007 * 00008 * Copyright 2010 ZXing authors All rights reserved. 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #include <zxing/BarcodeFormat.h> 00024 #include <zxing/ResultPointCallback.h> 00025 00026 namespace zxing { 00027 00028 typedef unsigned int DecodeHintType; 00029 class DecodeHints; 00030 DecodeHints operator | (DecodeHints const&, DecodeHints const&); 00031 00032 class DecodeHints { 00033 private: 00034 DecodeHintType hints; 00035 Ref<ResultPointCallback> callback; 00036 00037 public: 00038 static const DecodeHintType AZTEC_HINT = 1 << BarcodeFormat::AZTEC; 00039 static const DecodeHintType CODABAR_HINT = 1 << BarcodeFormat::CODABAR; 00040 static const DecodeHintType CODE_39_HINT = 1 << BarcodeFormat::CODE_39; 00041 static const DecodeHintType CODE_93_HINT = 1 << BarcodeFormat::CODE_93; 00042 static const DecodeHintType CODE_128_HINT = 1 << BarcodeFormat::CODE_128; 00043 static const DecodeHintType DATA_MATRIX_HINT = 1 << BarcodeFormat::DATA_MATRIX; 00044 static const DecodeHintType EAN_8_HINT = 1 << BarcodeFormat::EAN_8; 00045 static const DecodeHintType EAN_13_HINT = 1 << BarcodeFormat::EAN_13; 00046 static const DecodeHintType ITF_HINT = 1 << BarcodeFormat::ITF; 00047 static const DecodeHintType MAXICODE_HINT = 1 << BarcodeFormat::MAXICODE; 00048 static const DecodeHintType PDF_417_HINT = 1 << BarcodeFormat::PDF_417; 00049 static const DecodeHintType QR_CODE_HINT = 1 << BarcodeFormat::QR_CODE; 00050 static const DecodeHintType RSS_14_HINT = 1 << BarcodeFormat::RSS_14; 00051 static const DecodeHintType RSS_EXPANDED_HINT = 1 << BarcodeFormat::RSS_EXPANDED; 00052 static const DecodeHintType UPC_A_HINT = 1 << BarcodeFormat::UPC_A; 00053 static const DecodeHintType UPC_E_HINT = 1 << BarcodeFormat::UPC_E; 00054 static const DecodeHintType UPC_EAN_EXTENSION_HINT = 1 << BarcodeFormat::UPC_EAN_EXTENSION; 00055 00056 #if defined(__ICCARM__) // 00057 static const DecodeHintType TRYHARDER_HINT = 0x80000000; 00058 #else 00059 static const DecodeHintType TRYHARDER_HINT = 1 << 31; 00060 #endif // 00061 static const DecodeHintType CHARACTER_SET = 1 << 30; 00062 // static const DecodeHintType ALLOWED_LENGTHS = 1 << 29; 00063 // static const DecodeHintType ASSUME_CODE_39_CHECK_DIGIT = 1 << 28; 00064 static const DecodeHintType ASSUME_GS1 = 1 << 27; 00065 // static const DecodeHintType NEED_RESULT_POINT_CALLBACK = 1 << 26; 00066 00067 static const DecodeHints PRODUCT_HINT; 00068 static const DecodeHints ONED_HINT; 00069 static const DecodeHints DEFAULT_HINT; 00070 00071 DecodeHints(); 00072 DecodeHints(DecodeHintType init); 00073 00074 void addFormat(BarcodeFormat toadd); 00075 bool containsFormat(BarcodeFormat tocheck) const; 00076 bool isEmpty() const {return (hints==0);} 00077 void clear() {hints=0;} 00078 void setTryHarder(bool toset); 00079 bool getTryHarder() const; 00080 00081 void setResultPointCallback(Ref<ResultPointCallback> const&); 00082 Ref<ResultPointCallback> getResultPointCallback() const; 00083 00084 friend DecodeHints operator | (DecodeHints const&, DecodeHints const&); 00085 }; 00086 00087 } 00088 00089 #endif
Generated on Wed Jul 13 2022 20:52:13 by
