mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
add missing headers
This commit is contained in:
parent
24a5f9c654
commit
0cd476acbb
52
cpp/core/src/zxing/Binarizer.h
Normal file
52
cpp/core/src/zxing/Binarizer.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
#pragma once
|
||||
|
||||
/*
|
||||
* Binarizer.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/ResultPoint.h> // for ResultPoint
|
||||
#include "zxing/LuminanceSource.h" // for LuminanceSource
|
||||
#include <zxing/common/Counted.h> // for Ref, Counted
|
||||
#include "zxing/common/Error.hpp"
|
||||
|
||||
namespace pping {
|
||||
|
||||
class BitArray;
|
||||
class BitMatrix;
|
||||
class LuminanceSource;
|
||||
|
||||
class Binarizer : public Counted {
|
||||
private:
|
||||
Ref<LuminanceSource> source_;
|
||||
|
||||
public:
|
||||
Binarizer(Ref<LuminanceSource> source) noexcept;
|
||||
virtual ~Binarizer() = default;
|
||||
|
||||
virtual FallibleRef<BitArray > getBlackRow (int y, Ref<BitArray> row) const MB_NOEXCEPT_EXCEPT_BADALLOC = 0;
|
||||
virtual FallibleRef<BitMatrix> getBlackMatrix( ) const MB_NOEXCEPT_EXCEPT_BADALLOC = 0;
|
||||
|
||||
auto const & getLuminanceSource() const noexcept { return source_; }
|
||||
virtual Ref<Binarizer> createBinarizer(Ref<LuminanceSource> source) const MB_NOEXCEPT_EXCEPT_BADALLOC = 0;
|
||||
|
||||
int getWidth () const noexcept;
|
||||
int getHeight() const noexcept;
|
||||
|
||||
};
|
||||
|
||||
}
|
73
cpp/core/src/zxing/DecodeHints.h
Normal file
73
cpp/core/src/zxing/DecodeHints.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
#pragma once
|
||||
/*
|
||||
* DecodeHintType.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/common/Str.h> // for Str
|
||||
#include <zxing/Binarizer.h> // for Binarizer
|
||||
#include <zxing/BarcodeFormat.h> // for BarcodeFormat, BarcodeFormat::AZTEC_BARCODE, BarcodeFormat::CODE_128, BarcodeFormat::CODE_39, BarcodeFormat::Barcod...
|
||||
#include <zxing/ResultPointCallback.h> // for ResultPointCallback
|
||||
|
||||
#include "zxing/common/Counted.h" // for Ref
|
||||
|
||||
namespace pping {
|
||||
|
||||
typedef unsigned int DecodeHintType;
|
||||
|
||||
class DecodeHints {
|
||||
|
||||
private:
|
||||
|
||||
DecodeHintType hints;
|
||||
|
||||
Ref<ResultPointCallback> callback;
|
||||
|
||||
public:
|
||||
|
||||
static const DecodeHintType BARCODEFORMAT_QR_CODE_HINT = 1 << static_cast<int>(BarcodeFormat::QR_CODE);
|
||||
static const DecodeHintType BARCODEFORMAT_DATA_MATRIX_HINT = 1 << static_cast<int>(BarcodeFormat::DATA_MATRIX);
|
||||
static const DecodeHintType BARCODEFORMAT_UPC_E_HINT = 1 << static_cast<int>(BarcodeFormat::UPC_E);
|
||||
static const DecodeHintType BARCODEFORMAT_UPC_A_HINT = 1 << static_cast<int>(BarcodeFormat::UPC_A);
|
||||
static const DecodeHintType BARCODEFORMAT_EAN_8_HINT = 1 << static_cast<int>(BarcodeFormat::EAN_8);
|
||||
static const DecodeHintType BARCODEFORMAT_EAN_13_HINT = 1 << static_cast<int>(BarcodeFormat::EAN_13);
|
||||
static const DecodeHintType BARCODEFORMAT_CODE_128_HINT = 1 << static_cast<int>(BarcodeFormat::CODE_128);
|
||||
static const DecodeHintType BARCODEFORMAT_CODE_39_HINT = 1 << static_cast<int>(BarcodeFormat::CODE_39);
|
||||
static const DecodeHintType BARCODEFORMAT_ITF_HINT = 1 << static_cast<int>(BarcodeFormat::ITF);
|
||||
static const DecodeHintType BARCODEFORMAT_AZTEC_HINT = 1 << static_cast<int>(BarcodeFormat::AZTEC_BARCODE);
|
||||
static const DecodeHintType CHARACTER_SET = 1 << 30;
|
||||
static const DecodeHintType TRYHARDER_HINT = static_cast< DecodeHintType >( 1 << 31 );
|
||||
|
||||
static const DecodeHints PRODUCT_HINT;
|
||||
static const DecodeHints ONED_HINT;
|
||||
static const DecodeHints DEFAULT_HINT;
|
||||
|
||||
DecodeHints();
|
||||
DecodeHints(DecodeHintType init);
|
||||
|
||||
void addFormat(BarcodeFormat toadd) noexcept;
|
||||
bool containsFormat(BarcodeFormat tocheck) const noexcept;
|
||||
void setTryHarder(bool toset);
|
||||
bool getTryHarder() const;
|
||||
|
||||
void setResultPointCallback(Ref<ResultPointCallback> const&);
|
||||
Ref<ResultPointCallback> getResultPointCallback() const;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in a new issue