4 #ifndef FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_GRAIL_DATA_GENERATED_H_
5 #define FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_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 "SimulatedGameIterationSnapshot_generated.h"
17 #include "SimulatedGameUnitSnapshot_generated.h"
23 struct SimulatedGameReasonerSnapshot;
24 struct SimulatedGameReasonerSnapshotBuilder;
26 struct SimulatedGameReasonerSnapshot FLATBUFFERS_FINAL_CLASS :
private ::flatbuffers::Table {
27 typedef SimulatedGameReasonerSnapshotBuilder Builder;
28 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
30 VT_ITERATIONSNAPSHOTS = 6,
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);
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);
41 float absoluteTime()
const {
42 return GetField<float>(VT_ABSOLUTETIME, 0.0f);
44 float relativeTime()
const {
45 return GetField<float>(VT_RELATIVETIME, 0.0f);
47 uint32_t entityId()
const {
48 return GetField<uint32_t>(VT_ENTITYID, 0);
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) &&
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);
72 void add_iterationSnapshots(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::SimulatedGameIterationSnapshot>>> iterationSnapshots) {
73 fbb_.AddOffset(SimulatedGameReasonerSnapshot::VT_ITERATIONSNAPSHOTS, iterationSnapshots);
75 void add_absoluteTime(
float absoluteTime) {
76 fbb_.AddElement<
float>(SimulatedGameReasonerSnapshot::VT_ABSOLUTETIME, absoluteTime, 0.0f);
78 void add_relativeTime(
float relativeTime) {
79 fbb_.AddElement<
float>(SimulatedGameReasonerSnapshot::VT_RELATIVETIME, relativeTime, 0.0f);
81 void add_entityId(uint32_t entityId) {
82 fbb_.AddElement<uint32_t>(SimulatedGameReasonerSnapshot::VT_ENTITYID, entityId, 0);
86 start_ = fbb_.StartTable();
88 ::flatbuffers::Offset<SimulatedGameReasonerSnapshot> Finish() {
89 const auto end = fbb_.EndTable(start_);
90 auto o = ::flatbuffers::Offset<SimulatedGameReasonerSnapshot>(end);
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();
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(
123 iterationSnapshots__,
129 inline const grail::data::generated::SimulatedGameReasonerSnapshot *GetSimulatedGameReasonerSnapshot(
const void *buf) {
130 return ::flatbuffers::GetRoot<grail::data::generated::SimulatedGameReasonerSnapshot>(buf);
133 inline const grail::data::generated::SimulatedGameReasonerSnapshot *GetSizePrefixedSimulatedGameReasonerSnapshot(
const void *buf) {
134 return ::flatbuffers::GetSizePrefixedRoot<grail::data::generated::SimulatedGameReasonerSnapshot>(buf);
137 inline bool VerifySimulatedGameReasonerSnapshotBuffer(
138 ::flatbuffers::Verifier &verifier) {
139 return verifier.VerifyBuffer<grail::data::generated::SimulatedGameReasonerSnapshot>(
nullptr);
142 inline bool VerifySizePrefixedSimulatedGameReasonerSnapshotBuffer(
143 ::flatbuffers::Verifier &verifier) {
144 return verifier.VerifySizePrefixedBuffer<grail::data::generated::SimulatedGameReasonerSnapshot>(
nullptr);
147 inline void FinishSimulatedGameReasonerSnapshotBuffer(
148 ::flatbuffers::FlatBufferBuilder &fbb,
149 ::flatbuffers::Offset<grail::data::generated::SimulatedGameReasonerSnapshot> root) {
153 inline void FinishSizePrefixedSimulatedGameReasonerSnapshotBuffer(
154 ::flatbuffers::FlatBufferBuilder &fbb,
155 ::flatbuffers::Offset<grail::data::generated::SimulatedGameReasonerSnapshot> root) {
156 fbb.FinishSizePrefixed(root);
163 #endif // FLATBUFFERS_GENERATED_SIMULATEDGAMEREASONERSNAPSHOT_GRAIL_DATA_GENERATED_H_