Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
SimulatedGameReasonerSnapshot_generated.h
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_GRAIL_DATA_GENERATED_H_
5 #define FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_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 "SimulatedGameIterationSnapshot_generated.h"
17 #include "SimulatedGameUnitSnapshot_generated.h"
18 
19 namespace grail {
20 namespace data {
21 namespace generated {
22 
23 struct SimulatedGameReasonerSnapshot;
24 struct SimulatedGameReasonerSnapshotBuilder;
25 
26 struct SimulatedGameReasonerSnapshot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
27  typedef SimulatedGameReasonerSnapshotBuilder Builder;
28  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
29  VT_UNITSNAPSHOTS = 4,
30  VT_ITERATIONSNAPSHOTS = 6,
31  VT_ABSOLUTETIME = 8,
32  VT_RELATIVETIME = 10,
33  VT_ENTITYID = 12
34  };
35  const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>> *unitSnapshots() const {
36  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>> *>(VT_UNITSNAPSHOTS);
37  }
38  const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>> *iterationSnapshots() const {
39  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>> *>(VT_ITERATIONSNAPSHOTS);
40  }
41  float absoluteTime() const {
42  return GetField<float>(VT_ABSOLUTETIME, 0.0f);
43  }
44  float relativeTime() const {
45  return GetField<float>(VT_RELATIVETIME, 0.0f);
46  }
47  uint32_t entityId() const {
48  return GetField<uint32_t>(VT_ENTITYID, 0);
49  }
50  bool Verify(::flatbuffers::Verifier &verifier) const {
51  return VerifyTableStart(verifier) &&
52  VerifyOffset(verifier, VT_UNITSNAPSHOTS) &&
53  verifier.VerifyVector(unitSnapshots()) &&
54  verifier.VerifyVectorOfTables(unitSnapshots()) &&
55  VerifyOffset(verifier, VT_ITERATIONSNAPSHOTS) &&
56  verifier.VerifyVector(iterationSnapshots()) &&
57  verifier.VerifyVectorOfTables(iterationSnapshots()) &&
58  VerifyField<float>(verifier, VT_ABSOLUTETIME, 4) &&
59  VerifyField<float>(verifier, VT_RELATIVETIME, 4) &&
60  VerifyField<uint32_t>(verifier, VT_ENTITYID, 4) &&
61  verifier.EndTable();
62  }
63 };
64 
67  ::flatbuffers::FlatBufferBuilder &fbb_;
68  ::flatbuffers::uoffset_t start_;
69  void add_unitSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>>> unitSnapshots) {
70  fbb_.AddOffset(SimulatedGameReasonerSnapshot::VT_UNITSNAPSHOTS, unitSnapshots);
71  }
72  void add_iterationSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>>> iterationSnapshots) {
73  fbb_.AddOffset(SimulatedGameReasonerSnapshot::VT_ITERATIONSNAPSHOTS, iterationSnapshots);
74  }
75  void add_absoluteTime(float absoluteTime) {
76  fbb_.AddElement<float>(SimulatedGameReasonerSnapshot::VT_ABSOLUTETIME, absoluteTime, 0.0f);
77  }
78  void add_relativeTime(float relativeTime) {
79  fbb_.AddElement<float>(SimulatedGameReasonerSnapshot::VT_RELATIVETIME, relativeTime, 0.0f);
80  }
81  void add_entityId(uint32_t entityId) {
82  fbb_.AddElement<uint32_t>(SimulatedGameReasonerSnapshot::VT_ENTITYID, entityId, 0);
83  }
84  explicit SimulatedGameReasonerSnapshotBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
85  : fbb_(_fbb) {
86  start_ = fbb_.StartTable();
87  }
88  ::flatbuffers::Offset<SimulatedGameReasonerSnapshot> Finish() {
89  const auto end = fbb_.EndTable(start_);
90  auto o = ::flatbuffers::Offset<SimulatedGameReasonerSnapshot>(end);
91  return o;
92  }
93 };
94 
95 inline ::flatbuffers::Offset<SimulatedGameReasonerSnapshot> CreateSimulatedGameReasonerSnapshot(
96  ::flatbuffers::FlatBufferBuilder &_fbb,
97  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>>> unitSnapshots = 0,
98  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>>> iterationSnapshots = 0,
99  float absoluteTime = 0.0f,
100  float relativeTime = 0.0f,
101  uint32_t entityId = 0) {
103  builder_.add_entityId(entityId);
104  builder_.add_relativeTime(relativeTime);
105  builder_.add_absoluteTime(absoluteTime);
106  builder_.add_iterationSnapshots(iterationSnapshots);
107  builder_.add_unitSnapshots(unitSnapshots);
108  return builder_.Finish();
109 }
110 
111 inline ::flatbuffers::Offset<SimulatedGameReasonerSnapshot> CreateSimulatedGameReasonerSnapshotDirect(
112  ::flatbuffers::FlatBufferBuilder &_fbb,
113  const std::vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>> *unitSnapshots = nullptr,
114  const std::vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>> *iterationSnapshots = nullptr,
115  float absoluteTime = 0.0f,
116  float relativeTime = 0.0f,
117  uint32_t entityId = 0) {
118  auto unitSnapshots__ = unitSnapshots ? _fbb.CreateVector<::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot>>(*unitSnapshots) : 0;
119  auto iterationSnapshots__ = iterationSnapshots ? _fbb.CreateVector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>>(*iterationSnapshots) : 0;
120  return grail::data::generated::CreateSimulatedGameReasonerSnapshot(
121  _fbb,
122  unitSnapshots__,
123  iterationSnapshots__,
124  absoluteTime,
125  relativeTime,
126  entityId);
127 }
128 
129 inline const grail::data::generated::SimulatedGameReasonerSnapshot *GetSimulatedGameReasonerSnapshot(const void *buf) {
130  return ::flatbuffers::GetRoot<grail::data::generated::SimulatedGameReasonerSnapshot>(buf);
131 }
132 
133 inline const grail::data::generated::SimulatedGameReasonerSnapshot *GetSizePrefixedSimulatedGameReasonerSnapshot(const void *buf) {
134  return ::flatbuffers::GetSizePrefixedRoot<grail::data::generated::SimulatedGameReasonerSnapshot>(buf);
135 }
136 
137 inline bool VerifySimulatedGameReasonerSnapshotBuffer(
138  ::flatbuffers::Verifier &verifier) {
139  return verifier.VerifyBuffer<grail::data::generated::SimulatedGameReasonerSnapshot>(nullptr);
140 }
141 
142 inline bool VerifySizePrefixedSimulatedGameReasonerSnapshotBuffer(
143  ::flatbuffers::Verifier &verifier) {
144  return verifier.VerifySizePrefixedBuffer<grail::data::generated::SimulatedGameReasonerSnapshot>(nullptr);
145 }
146 
147 inline void FinishSimulatedGameReasonerSnapshotBuffer(
148  ::flatbuffers::FlatBufferBuilder &fbb,
149  ::flatbuffers::Offset<grail::data::generated::SimulatedGameReasonerSnapshot> root) {
150  fbb.Finish(root);
151 }
152 
153 inline void FinishSizePrefixedSimulatedGameReasonerSnapshotBuffer(
154  ::flatbuffers::FlatBufferBuilder &fbb,
155  ::flatbuffers::Offset<grail::data::generated::SimulatedGameReasonerSnapshot> root) {
156  fbb.FinishSizePrefixed(root);
157 }
158 
159 } // namespace generated
160 } // namespace data
161 } // namespace grail
162 
163 #endif // FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_GRAIL_DATA_GENERATED_H_
grail::data::generated::SimulatedGameReasonerSnapshotBuilder
Definition: SimulatedGameReasonerSnapshot_generated.h:65
grail::data::SimulatedGameReasonerSnapshot
Definition: SimulatedGamesSnapshots.h:129