📄 bars2sym.h
字号:
//
// CBars2Sym
// Abstract interface for bar code decoders
//
// Copyright (C) 2006 by Jon A. Webb
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#ifndef Bars2Sym_h
#define Bars2Sym_h
#include "Image.h"
#include <e32cons.h>
#include <e32math.h>
#include <e32std.h>
namespace Barcode
{
class CBars2Sym: public CBase
{
// Lifecycle
public:
virtual ~CBars2Sym(void);
protected:
// Constructor
CBars2Sym();
// Operations
public:
// DecodeL
// Turns an a barcode image into the code according to the
// implemented symbology.
// Returns true if the bar widths appear to be a valid bar code according
// to this symbology, false if not.
// pCode will be set to an array of the decoded characters iff
// the code appears to be valid.
//
// Input
// a rectified and equalized image in which the barcode is presumed to lie.
// rectangle is the rectangle that contains the barcode. Its width
// must be a multiple of BarcodeWidth.
// Output
// pCode is a string giving the decoded bar code.
typedef TBuf<255> CodeType;
virtual bool DecodeL(
Core::CImage image,
CodeType*& pCode,
TInt32 &goodness) = 0;
// Accessors
public:
// returns the width of the barcode image
virtual int BarcodeWidth() const = 0;
// Returns a short name for this decoder.
virtual const TDesC& Name() const = 0;
protected:
};
};
#endif // Bars2Sym_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -