-
Notifications
You must be signed in to change notification settings - Fork 201
/
model_generated.h
76 lines (62 loc) · 3.1 KB
/
model_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
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_MODEL_WORD2VEC_H_
#define FLATBUFFERS_GENERATED_MODEL_WORD2VEC_H_
#include "flatbuffers/flatbuffers.h"
namespace word2vec {
struct Word;
struct Dict;
struct Word : private flatbuffers::Table {
const flatbuffers::String *name() const { return GetPointer<const flatbuffers::String *>(4); }
const flatbuffers::Vector<float> *feature() const { return GetPointer<const flatbuffers::Vector<float> *>(6); }
bool Verify(const flatbuffers::Verifier &verifier) const {
return VerifyTable(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* name */) &&
verifier.Verify(name()) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 6 /* feature */) &&
verifier.Verify(feature());
}
};
struct WordBuilder {
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_name(flatbuffers::Offset<flatbuffers::String> name) { fbb_.AddOffset(4, name); }
void add_feature(flatbuffers::Offset<flatbuffers::Vector<float>> feature) { fbb_.AddOffset(6, feature); }
WordBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
WordBuilder &operator=(const WordBuilder &);
flatbuffers::Offset<Word> Finish() { return flatbuffers::Offset<Word>(fbb_.EndTable(start_, 2)); }
};
inline flatbuffers::Offset<Word> CreateWord(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> name = 0,
flatbuffers::Offset<flatbuffers::Vector<float>> feature = 0) {
WordBuilder builder_(_fbb);
builder_.add_feature(feature);
builder_.add_name(name);
return builder_.Finish();
}
struct Dict : private flatbuffers::Table {
const flatbuffers::Vector<flatbuffers::Offset<Word>> *words() const { return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Word>> *>(4); }
bool Verify(const flatbuffers::Verifier &verifier) const {
return VerifyTable(verifier) &&
VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* words */) &&
verifier.Verify(words()) &&
verifier.VerifyVectorOfTables(words());
}
};
struct DictBuilder {
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_words(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Word>>> words) { fbb_.AddOffset(4, words); }
DictBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
DictBuilder &operator=(const DictBuilder &);
flatbuffers::Offset<Dict> Finish() { return flatbuffers::Offset<Dict>(fbb_.EndTable(start_, 1)); }
};
inline flatbuffers::Offset<Dict> CreateDict(flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Word>>> words = 0) {
DictBuilder builder_(_fbb);
builder_.add_words(words);
return builder_.Finish();
}
inline const Dict *GetDict(const void *buf) { return flatbuffers::GetRoot<Dict>(buf); }
inline bool VerifyDictBuffer(const flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer<Dict>(); }
}; // namespace word2vec
#endif // FLATBUFFERS_GENERATED_MODEL_WORD2VEC_H_