glbarcode++
 
Loading...
Searching...
No Matches
BarcodeUpcBase.hpp
Go to the documentation of this file.
1// BarcodeUpcBase.hpp
2//
3// Copyright (C) 2013-2026 Jaye Evins <evins@snaught.com>
4//
5// This file is part of glbarcode++.
6//
7// glbarcode++ is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// glbarcode++ is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU Lesser General Public License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public License
18// along with glbarcode++. If not, see <http://www.gnu.org/licenses/>.
19//
20
21#ifndef glbarcode_BarcodeUpcBase_hpp
22#define glbarcode_BarcodeUpcBase_hpp
23
24
25#include "Barcode1dBase.hpp"
26
27
28namespace glbarcode
29{
30
37 {
38 protected:
39 virtual bool validateDigits( int nDigits ) = 0;
40
41 virtual void vectorizeText( const std::string& displayText,
42 double size1,
43 double size2,
44 double x1Left,
45 double x1Right,
46 double y1,
47 double x2Left,
48 double x2Right,
49 double y2 ) = 0;
50
51 private:
52 bool validate( const std::string& rawData ) override;
53
54 std::string encode( const std::string& cookedData ) override;
55
56 std::string prepareText( const std::string& rawData ) override;
57
58 void vectorize( const std::string& codedData,
59 const std::string& displayText,
60 const std::string& cookedData,
61 double& w,
62 double& h ) override;
63
64
65 protected:
68
69
70 private:
71 int mCheckDigitVal;
72
73 };
74
75}
76
77
78#endif // glbarcode_BarcodeUpcBase_hpp
Definition Barcode1dBase.hpp:44
Definition BarcodeUpcBase.hpp:37
virtual void vectorizeText(const std::string &displayText, double size1, double size2, double x1Left, double x1Right, double y1, double x2Left, double x2Right, double y2)=0
int mEndBarsModules
Definition BarcodeUpcBase.hpp:66
virtual bool validateDigits(int nDigits)=0
int mFirstDigitVal
Definition BarcodeUpcBase.hpp:67
Definition Barcode.hpp:38