4 #ifndef FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_
5 #define FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_
7 #include "flatbuffers/flatbuffers.h"
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
12 FLATBUFFERS_VERSION_MINOR == 5 &&
13 FLATBUFFERS_VERSION_REVISION == 26,
14 "Non-compatible flatbuffers version included");
16 #include "SimulatedGameMonteCarloEventSnapshot_generated.h"
17 #include "SimulatedGameUCTEventSnapshot_generated.h"
23 struct SimulatedGameIterationSnapshot;
24 struct SimulatedGameIterationSnapshotBuilder;
26 struct SimulatedGameIterationSnapshot FLATBUFFERS_FINAL_CLASS :
private ::flatbuffers::Table {
27 typedef SimulatedGameIterationSnapshotBuilder Builder;
28 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
31 VT_MONTECARLOSNAPSHOTS = 8,
34 uint32_t number()
const {
35 return GetField<uint32_t>(VT_NUMBER, 0);
37 const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>> *uctSnapshots()
const {
38 return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>> *>(VT_UCTSNAPSHOTS);
40 const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>> *monteCarloSnapshots()
const {
41 return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>> *>(VT_MONTECARLOSNAPSHOTS);
43 const ::flatbuffers::Vector<double> *scores()
const {
44 return GetPointer<const ::flatbuffers::Vector<double> *>(VT_SCORES);
46 bool Verify(::flatbuffers::Verifier &verifier)
const {
47 return VerifyTableStart(verifier) &&
48 VerifyField<uint32_t>(verifier, VT_NUMBER, 4) &&
49 VerifyOffset(verifier, VT_UCTSNAPSHOTS) &&
50 verifier.VerifyVector(uctSnapshots()) &&
51 verifier.VerifyVectorOfTables(uctSnapshots()) &&
52 VerifyOffset(verifier, VT_MONTECARLOSNAPSHOTS) &&
53 verifier.VerifyVector(monteCarloSnapshots()) &&
54 verifier.VerifyVectorOfTables(monteCarloSnapshots()) &&
55 VerifyOffset(verifier, VT_SCORES) &&
56 verifier.VerifyVector(scores()) &&
63 ::flatbuffers::FlatBufferBuilder &fbb_;
64 ::flatbuffers::uoffset_t start_;
65 void add_number(uint32_t number) {
66 fbb_.AddElement<uint32_t>(SimulatedGameIterationSnapshot::VT_NUMBER, number, 0);
68 void add_uctSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>>> uctSnapshots) {
69 fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_UCTSNAPSHOTS, uctSnapshots);
71 void add_monteCarloSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>>> monteCarloSnapshots) {
72 fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_MONTECARLOSNAPSHOTS, monteCarloSnapshots);
74 void add_scores(::flatbuffers::Offset<::flatbuffers::Vector<double>> scores) {
75 fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_SCORES, scores);
79 start_ = fbb_.StartTable();
81 ::flatbuffers::Offset<SimulatedGameIterationSnapshot> Finish() {
82 const auto end = fbb_.EndTable(start_);
83 auto o = ::flatbuffers::Offset<SimulatedGameIterationSnapshot>(end);
88 inline ::flatbuffers::Offset<SimulatedGameIterationSnapshot> CreateSimulatedGameIterationSnapshot(
89 ::flatbuffers::FlatBufferBuilder &_fbb,
91 ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>>> uctSnapshots = 0,
92 ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>>> monteCarloSnapshots = 0,
93 ::flatbuffers::Offset<::flatbuffers::Vector<double>> scores = 0) {
95 builder_.add_scores(scores);
96 builder_.add_monteCarloSnapshots(monteCarloSnapshots);
97 builder_.add_uctSnapshots(uctSnapshots);
98 builder_.add_number(number);
99 return builder_.Finish();
102 inline ::flatbuffers::Offset<SimulatedGameIterationSnapshot> CreateSimulatedGameIterationSnapshotDirect(
103 ::flatbuffers::FlatBufferBuilder &_fbb,
105 const std::vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>> *uctSnapshots =
nullptr,
106 const std::vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>> *monteCarloSnapshots =
nullptr,
107 const std::vector<double> *scores =
nullptr) {
108 auto uctSnapshots__ = uctSnapshots ? _fbb.CreateVector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>>(*uctSnapshots) : 0;
109 auto monteCarloSnapshots__ = monteCarloSnapshots ? _fbb.CreateVector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>>(*monteCarloSnapshots) : 0;
110 auto scores__ = scores ? _fbb.CreateVector<
double>(*scores) : 0;
111 return grail::data::generated::CreateSimulatedGameIterationSnapshot(
115 monteCarloSnapshots__,
119 inline const grail::data::generated::SimulatedGameIterationSnapshot *GetSimulatedGameIterationSnapshot(
const void *buf) {
120 return ::flatbuffers::GetRoot<grail::data::generated::SimulatedGameIterationSnapshot>(buf);
123 inline const grail::data::generated::SimulatedGameIterationSnapshot *GetSizePrefixedSimulatedGameIterationSnapshot(
const void *buf) {
124 return ::flatbuffers::GetSizePrefixedRoot<grail::data::generated::SimulatedGameIterationSnapshot>(buf);
127 inline bool VerifySimulatedGameIterationSnapshotBuffer(
128 ::flatbuffers::Verifier &verifier) {
129 return verifier.VerifyBuffer<grail::data::generated::SimulatedGameIterationSnapshot>(
nullptr);
132 inline bool VerifySizePrefixedSimulatedGameIterationSnapshotBuffer(
133 ::flatbuffers::Verifier &verifier) {
134 return verifier.VerifySizePrefixedBuffer<grail::data::generated::SimulatedGameIterationSnapshot>(
nullptr);
137 inline void FinishSimulatedGameIterationSnapshotBuffer(
138 ::flatbuffers::FlatBufferBuilder &fbb,
139 ::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot> root) {
143 inline void FinishSizePrefixedSimulatedGameIterationSnapshotBuffer(
144 ::flatbuffers::FlatBufferBuilder &fbb,
145 ::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot> root) {
146 fbb.FinishSizePrefixed(root);
153 #endif // FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_