Skip to content

Commit 88351ec

Browse files
committed
重构部分逻辑
1 parent 6a38b4b commit 88351ec

File tree

12 files changed

+356
-325
lines changed

12 files changed

+356
-325
lines changed

czxing/src/main/cpp/DataStruct.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//
2+
// Created by Devilsen on 2021/5/19.
3+
//
4+
5+
#ifndef CZXING_DATASTRUCT_H
6+
#define CZXING_DATASTRUCT_H
7+
8+
#include "config.h"
9+
10+
CZXING_BEGIN_NAMESPACE()
11+
12+
struct CodeRect {
13+
int x, y, width, height;
14+
CodeRect(int x, int y, int width, int height) : x(x), y(y), width(width), height(height){};
15+
};
16+
17+
enum CodeFormat {
18+
None = 0, ///< Used as a return value if no valid barcode has been detected
19+
Aztec = (1 << 0), ///< Aztec (2D)
20+
Codabar = (1 << 1), ///< Codabar (1D)
21+
Code39 = (1 << 2), ///< Code39 (1D)
22+
Code93 = (1 << 3), ///< Code93 (1D)
23+
Code128 = (1 << 4), ///< Code128 (1D)
24+
DataBar = (1 << 5), ///< GS1 DataBar, formerly known as RSS 14
25+
DataBarExpanded = (1 << 6), ///< GS1 DataBar Expanded, formerly known as RSS EXPANDED
26+
DataMatrix = (1 << 7), ///< DataMatrix (2D)
27+
EAN8 = (1 << 8), ///< EAN-8 (1D)
28+
EAN13 = (1 << 9), ///< EAN-13 (1D)
29+
ITF = (1 << 10), ///< ITF (Interleaved Two of Five) (1D)
30+
MaxiCode = (1 << 11), ///< MaxiCode (2D)
31+
PDF417 = (1 << 12), ///< PDF417 (1D) or (2D)
32+
QRCode = (1 << 13), ///< QR Code (2D)
33+
UPCA = (1 << 14), ///< UPC-A (1D)
34+
UPCE = (1 << 15), ///< UPC-E (1D)
35+
36+
OneDCodes = Codabar | Code39 | Code93 | Code128 | EAN8 | EAN13 | ITF | DataBar | DataBarExpanded | UPCA | UPCE,
37+
TwoDCodes = Aztec | DataMatrix | MaxiCode | PDF417 | QRCode,
38+
Any = OneDCodes | TwoDCodes,
39+
};
40+
41+
CZXING_END_NAMESPACE()
42+
43+
#endif //CZXING_DATASTRUCT_H

0 commit comments

Comments
 (0)