-
Notifications
You must be signed in to change notification settings - Fork 1
/
ioheader_generated.h
157 lines (138 loc) · 4.67 KB
/
ioheader_generated.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_IOHEADER_H_
#define FLATBUFFERS_GENERATED_IOHEADER_H_
#include "flatbuffers/flatbuffers.h"
struct IOHeader;
struct IOHeaderBuilder;
enum CompressionType {
CompressionType_NONE = 0,
CompressionType_LZ4 = 1,
CompressionType_LZ4_HIGH = 2,
CompressionType_ZSTD = 3,
CompressionType_ZSTD_HIGH = 4,
CompressionType_MIN = CompressionType_NONE,
CompressionType_MAX = CompressionType_ZSTD_HIGH
};
inline const CompressionType (&EnumValuesCompressionType())[5] {
static const CompressionType values[] = {
CompressionType_NONE,
CompressionType_LZ4,
CompressionType_LZ4_HIGH,
CompressionType_ZSTD,
CompressionType_ZSTD_HIGH
};
return values;
}
inline const char * const *EnumNamesCompressionType() {
static const char * const names[6] = {
"NONE",
"LZ4",
"LZ4_HIGH",
"ZSTD",
"ZSTD_HIGH",
nullptr
};
return names;
}
inline const char *EnumNameCompressionType(CompressionType e) {
if (flatbuffers::IsOutRange(e, CompressionType_NONE, CompressionType_ZSTD_HIGH)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesCompressionType()[index];
}
struct IOHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef IOHeaderBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_COMPRESSION = 4,
VT_DATATABLEPOSITION = 6,
VT_INFONODE = 8
};
CompressionType compression() const {
return static_cast<CompressionType>(GetField<int32_t>(VT_COMPRESSION, 0));
}
int64_t dataTablePosition() const {
return GetField<int64_t>(VT_DATATABLEPOSITION, -1LL);
}
const flatbuffers::String *infoNode() const {
return GetPointer<const flatbuffers::String *>(VT_INFONODE);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int32_t>(verifier, VT_COMPRESSION) &&
VerifyField<int64_t>(verifier, VT_DATATABLEPOSITION) &&
VerifyOffset(verifier, VT_INFONODE) &&
verifier.VerifyString(infoNode()) &&
verifier.EndTable();
}
};
struct IOHeaderBuilder {
typedef IOHeader Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_compression(CompressionType compression) {
fbb_.AddElement<int32_t>(IOHeader::VT_COMPRESSION, static_cast<int32_t>(compression), 0);
}
void add_dataTablePosition(int64_t dataTablePosition) {
fbb_.AddElement<int64_t>(IOHeader::VT_DATATABLEPOSITION, dataTablePosition, -1LL);
}
void add_infoNode(flatbuffers::Offset<flatbuffers::String> infoNode) {
fbb_.AddOffset(IOHeader::VT_INFONODE, infoNode);
}
explicit IOHeaderBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
IOHeaderBuilder &operator=(const IOHeaderBuilder &);
flatbuffers::Offset<IOHeader> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<IOHeader>(end);
return o;
}
};
inline flatbuffers::Offset<IOHeader> CreateIOHeader(
flatbuffers::FlatBufferBuilder &_fbb,
CompressionType compression = CompressionType_NONE,
int64_t dataTablePosition = -1LL,
flatbuffers::Offset<flatbuffers::String> infoNode = 0) {
IOHeaderBuilder builder_(_fbb);
builder_.add_dataTablePosition(dataTablePosition);
builder_.add_infoNode(infoNode);
builder_.add_compression(compression);
return builder_.Finish();
}
inline flatbuffers::Offset<IOHeader> CreateIOHeaderDirect(
flatbuffers::FlatBufferBuilder &_fbb,
CompressionType compression = CompressionType_NONE,
int64_t dataTablePosition = -1LL,
const char *infoNode = nullptr) {
auto infoNode__ = infoNode ? _fbb.CreateString(infoNode) : 0;
return CreateIOHeader(
_fbb,
compression,
dataTablePosition,
infoNode__);
}
inline const IOHeader *GetIOHeader(const void *buf) {
return flatbuffers::GetRoot<IOHeader>(buf);
}
inline const IOHeader *GetSizePrefixedIOHeader(const void *buf) {
return flatbuffers::GetSizePrefixedRoot<IOHeader>(buf);
}
inline bool VerifyIOHeaderBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<IOHeader>(nullptr);
}
inline bool VerifySizePrefixedIOHeaderBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<IOHeader>(nullptr);
}
inline void FinishIOHeaderBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<IOHeader> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedIOHeaderBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<IOHeader> root) {
fbb.FinishSizePrefixed(root);
}
#endif // FLATBUFFERS_GENERATED_IOHEADER_H_