📄 bars2sym2of5.h
字号:
//
// Given an array of edge positions and strengths compute a string
// representing the bar code widths corresponding to those edge
// positions.
//
// 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 Bars2Sym2of5_h
#define Bars2Sym2of5_h
#include "Bars2Sym.h"
#include <e32cons.h>
#include <e32math.h>
class CBars2Sym2of5: public CBars2Sym
{
// Lifecycle
public:
IMPORT_C static CBars2Sym2of5* NewL(bool allowSkipped);
~CBars2Sym2of5(void);
private:
// Constructor
CBars2Sym2of5(bool allowSkipped);
// Operations
public:
// FindBarsL
// Given an array of bar widths (one byte per bar) decode the
// bar widths according to interlaced 2 of 5 and return the decoded
// string, or false if the bars don't appear to be an interlaced 2
// of 5 code.
//
// Input
// pBars is an array of bar widths
// Output
// pCode is the decoded string
IMPORT_C bool DecodeL(
CArrayFix<char>* pBars,
CodeType*& pCode);
private:
bool Code2Digit(int code, TChar& digit) const;
// Accessors
public:
const TDesC& Name() const;
private:
// Attributes
char iLookup[32];
};
#endif // Bars2Sym2of5_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -