-
Notifications
You must be signed in to change notification settings - Fork 2
/
local_meta_request_generated.h
153 lines (134 loc) · 6.26 KB
/
local_meta_request_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
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_LOCALMETAREQUEST_H_
#define FLATBUFFERS_GENERATED_LOCALMETAREQUEST_H_
#include "flatbuffers/flatbuffers.h"
struct Block;
struct BlockBuilder;
struct LocalMetaRequest;
struct LocalMetaRequestBuilder;
struct Block FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef BlockBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_KEY = 4, VT_OFFSET = 6 };
const flatbuffers::String *key() const {
return GetPointer<const flatbuffers::String *>(VT_KEY);
}
uint64_t offset() const { return GetField<uint64_t>(VT_OFFSET, 0); }
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_KEY) &&
verifier.VerifyString(key()) && VerifyField<uint64_t>(verifier, VT_OFFSET) &&
verifier.EndTable();
}
};
struct BlockBuilder {
typedef Block Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_key(flatbuffers::Offset<flatbuffers::String> key) {
fbb_.AddOffset(Block::VT_KEY, key);
}
void add_offset(uint64_t offset) { fbb_.AddElement<uint64_t>(Block::VT_OFFSET, offset, 0); }
explicit BlockBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Block> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Block>(end);
return o;
}
};
inline flatbuffers::Offset<Block> CreateBlock(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> key = 0,
uint64_t offset = 0) {
BlockBuilder builder_(_fbb);
builder_.add_offset(offset);
builder_.add_key(key);
return builder_.Finish();
}
inline flatbuffers::Offset<Block> CreateBlockDirect(flatbuffers::FlatBufferBuilder &_fbb,
const char *key = nullptr,
uint64_t offset = 0) {
auto key__ = key ? _fbb.CreateString(key) : 0;
return CreateBlock(_fbb, key__, offset);
}
struct LocalMetaRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef LocalMetaRequestBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_IPC_HANDLE = 4,
VT_BLOCK_SIZE = 6,
VT_BLOCKS = 8
};
const flatbuffers::Vector<uint8_t> *ipc_handle() const {
return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_IPC_HANDLE);
}
int32_t block_size() const { return GetField<int32_t>(VT_BLOCK_SIZE, 0); }
const flatbuffers::Vector<flatbuffers::Offset<Block>> *blocks() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Block>> *>(VT_BLOCKS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_IPC_HANDLE) &&
verifier.VerifyVector(ipc_handle()) &&
VerifyField<int32_t>(verifier, VT_BLOCK_SIZE) && VerifyOffset(verifier, VT_BLOCKS) &&
verifier.VerifyVector(blocks()) && verifier.VerifyVectorOfTables(blocks()) &&
verifier.EndTable();
}
};
struct LocalMetaRequestBuilder {
typedef LocalMetaRequest Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_ipc_handle(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> ipc_handle) {
fbb_.AddOffset(LocalMetaRequest::VT_IPC_HANDLE, ipc_handle);
}
void add_block_size(int32_t block_size) {
fbb_.AddElement<int32_t>(LocalMetaRequest::VT_BLOCK_SIZE, block_size, 0);
}
void add_blocks(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Block>>> blocks) {
fbb_.AddOffset(LocalMetaRequest::VT_BLOCKS, blocks);
}
explicit LocalMetaRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<LocalMetaRequest> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<LocalMetaRequest>(end);
return o;
}
};
inline flatbuffers::Offset<LocalMetaRequest> CreateLocalMetaRequest(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<uint8_t>> ipc_handle = 0, int32_t block_size = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Block>>> blocks = 0) {
LocalMetaRequestBuilder builder_(_fbb);
builder_.add_blocks(blocks);
builder_.add_block_size(block_size);
builder_.add_ipc_handle(ipc_handle);
return builder_.Finish();
}
inline flatbuffers::Offset<LocalMetaRequest> CreateLocalMetaRequestDirect(
flatbuffers::FlatBufferBuilder &_fbb, const std::vector<uint8_t> *ipc_handle = nullptr,
int32_t block_size = 0, const std::vector<flatbuffers::Offset<Block>> *blocks = nullptr) {
auto ipc_handle__ = ipc_handle ? _fbb.CreateVector<uint8_t>(*ipc_handle) : 0;
auto blocks__ = blocks ? _fbb.CreateVector<flatbuffers::Offset<Block>>(*blocks) : 0;
return CreateLocalMetaRequest(_fbb, ipc_handle__, block_size, blocks__);
}
inline const LocalMetaRequest *GetLocalMetaRequest(const void *buf) {
return flatbuffers::GetRoot<LocalMetaRequest>(buf);
}
inline const LocalMetaRequest *GetSizePrefixedLocalMetaRequest(const void *buf) {
return flatbuffers::GetSizePrefixedRoot<LocalMetaRequest>(buf);
}
inline bool VerifyLocalMetaRequestBuffer(flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<LocalMetaRequest>(nullptr);
}
inline bool VerifySizePrefixedLocalMetaRequestBuffer(flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<LocalMetaRequest>(nullptr);
}
inline void FinishLocalMetaRequestBuffer(flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<LocalMetaRequest> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedLocalMetaRequestBuffer(flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<LocalMetaRequest> root) {
fbb.FinishSizePrefixed(root);
}
#endif // FLATBUFFERS_GENERATED_LOCALMETAREQUEST_H_