Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
SimulatedGameIterationSnapshot_generated.h
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_
5 #define FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 // Ensure the included flatbuffers.h is the same version as when this file was
10 // generated, otherwise it may not be compatible.
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
12  FLATBUFFERS_VERSION_MINOR == 5 &&
13  FLATBUFFERS_VERSION_REVISION == 26,
14  "Non-compatible flatbuffers version included");
15 
16 #include "SimulatedGameMonteCarloEventSnapshot_generated.h"
17 #include "SimulatedGameUCTEventSnapshot_generated.h"
18 
19 namespace grail {
20 namespace data {
21 namespace generated {
22 
23 struct SimulatedGameIterationSnapshot;
24 struct SimulatedGameIterationSnapshotBuilder;
25 
26 struct SimulatedGameIterationSnapshot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
27  typedef SimulatedGameIterationSnapshotBuilder Builder;
28  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
29  VT_NUMBER = 4,
30  VT_UCTSNAPSHOTS = 6,
31  VT_MONTECARLOSNAPSHOTS = 8,
32  VT_SCORES = 10
33  };
34  uint32_t number() const {
35  return GetField<uint32_t>(VT_NUMBER, 0);
36  }
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);
39  }
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);
42  }
43  const ::flatbuffers::Vector<double> *scores() const {
44  return GetPointer<const ::flatbuffers::Vector<double> *>(VT_SCORES);
45  }
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()) &&
57  verifier.EndTable();
58  }
59 };
60 
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);
67  }
68  void add_uctSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUCTEventSnapshot>>> uctSnapshots) {
69  fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_UCTSNAPSHOTS, uctSnapshots);
70  }
71  void add_monteCarloSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameMonteCarloEventSnapshot>>> monteCarloSnapshots) {
72  fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_MONTECARLOSNAPSHOTS, monteCarloSnapshots);
73  }
74  void add_scores(::flatbuffers::Offset<::flatbuffers::Vector<double>> scores) {
75  fbb_.AddOffset(SimulatedGameIterationSnapshot::VT_SCORES, scores);
76  }
77  explicit SimulatedGameIterationSnapshotBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
78  : fbb_(_fbb) {
79  start_ = fbb_.StartTable();
80  }
81  ::flatbuffers::Offset<SimulatedGameIterationSnapshot> Finish() {
82  const auto end = fbb_.EndTable(start_);
83  auto o = ::flatbuffers::Offset<SimulatedGameIterationSnapshot>(end);
84  return o;
85  }
86 };
87 
88 inline ::flatbuffers::Offset<SimulatedGameIterationSnapshot> CreateSimulatedGameIterationSnapshot(
89  ::flatbuffers::FlatBufferBuilder &_fbb,
90  uint32_t number = 0,
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();
100 }
101 
102 inline ::flatbuffers::Offset<SimulatedGameIterationSnapshot> CreateSimulatedGameIterationSnapshotDirect(
103  ::flatbuffers::FlatBufferBuilder &_fbb,
104  uint32_t number = 0,
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(
112  _fbb,
113  number,
114  uctSnapshots__,
115  monteCarloSnapshots__,
116  scores__);
117 }
118 
119 inline const grail::data::generated::SimulatedGameIterationSnapshot *GetSimulatedGameIterationSnapshot(const void *buf) {
120  return ::flatbuffers::GetRoot<grail::data::generated::SimulatedGameIterationSnapshot>(buf);
121 }
122 
123 inline const grail::data::generated::SimulatedGameIterationSnapshot *GetSizePrefixedSimulatedGameIterationSnapshot(const void *buf) {
124  return ::flatbuffers::GetSizePrefixedRoot<grail::data::generated::SimulatedGameIterationSnapshot>(buf);
125 }
126 
127 inline bool VerifySimulatedGameIterationSnapshotBuffer(
128  ::flatbuffers::Verifier &verifier) {
129  return verifier.VerifyBuffer<grail::data::generated::SimulatedGameIterationSnapshot>(nullptr);
130 }
131 
132 inline bool VerifySizePrefixedSimulatedGameIterationSnapshotBuffer(
133  ::flatbuffers::Verifier &verifier) {
134  return verifier.VerifySizePrefixedBuffer<grail::data::generated::SimulatedGameIterationSnapshot>(nullptr);
135 }
136 
137 inline void FinishSimulatedGameIterationSnapshotBuffer(
138  ::flatbuffers::FlatBufferBuilder &fbb,
139  ::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot> root) {
140  fbb.Finish(root);
141 }
142 
143 inline void FinishSizePrefixedSimulatedGameIterationSnapshotBuffer(
144  ::flatbuffers::FlatBufferBuilder &fbb,
145  ::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot> root) {
146  fbb.FinishSizePrefixed(root);
147 }
148 
149 } // namespace generated
150 } // namespace data
151 } // namespace grail
152 
153 #endif // FLATBUFFERS_GENERATED_SIMULATEDGAMEITERATIONSNAPSHOT_GRAIL_DATA_GENERATED_H_
grail::data::generated::SimulatedGameIterationSnapshotBuilder
Definition: SimulatedGameIterationSnapshot_generated.h:61
grail::data::SimulatedGameIterationSnapshot
Definition: SimulatedGamesSnapshots.h:106