-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStruct.h
81 lines (70 loc) · 1.53 KB
/
Struct.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Created by sunshine on 18-7-17.
//
#ifndef INC_2018071603SHARE_MEM_ANALYSE_STRUCT_H
#define INC_2018071603SHARE_MEM_ANALYSE_STRUCT_H
#pragma pack(1)
//BEGIN report level
#define INFO 1
#define LEVEL 1
//END report level
enum DATATYPE {
_BLOCK = 0,//该类型直接跳过打印
_INT,//int
_CHAR,//char
_STRING,//char*(string)
_UINT8_T,
_UINT16_T,
_UINT32_T,
_UINT64_T,
_INT8_T,
_INT16_T,
_INT32_T,
_INT64_T,
_UNSIGNED_CHAR,
_SHORT,
_FLOAT,
_DOUBLE,
_CHAR_ARRAY,
};
struct StructType {
const char *typeName;
int size;
int type;
};
struct StructNode {
const char *name;
bool isLeaf; //是否为叶子节点
struct {
bool isArray;
int arrayIndex; //数组下标,非数组默认为0
int count; //数组总数
} arrayInfo;
int index; //地址起始位置
StructType *structTypeInfo;
std::vector<StructNode *> structNodeList;
StructNode *parentStructNode;
};
//回填链
struct StructChain {
StructNode *pStructNode;
StructChain *pNext;
};
struct QueryCondition {
std::vector<char *> columnNameList;
int basicType;
int index;
StructNode *structNode;
std::string op;
const char *value;
int queryId; //标记每一个查询的id,如果是数组,展开后id相同属于同一组
};
//打印节点
struct PrintNode {
const char *name;
int type;
int index; //打印起始位置
StructNode *structNode;
};
#pragma pack()
#endif //INC_2018071603SHARE_MEM_ANALYSE_STRUCT_H