Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
SimulatedGameUnitSnapshot_generated.h
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_SIMULATEDGAMEUNITSNAPSHOT_GRAIL_DATA_GENERATED_H_
5 #define FLATBUFFERS_GENERATED_SIMULATEDGAMEUNITSNAPSHOT_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 "StringStringMap_generated.h"
17 
18 namespace grail {
19 namespace data {
20 namespace generated {
21 
22 struct SimulatedGameUnitSnapshot;
23 struct SimulatedGameUnitSnapshotBuilder;
24 
25 struct SimulatedGameUnitSnapshot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
26  typedef SimulatedGameUnitSnapshotBuilder Builder;
27  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
28  VT_TEAMINDEX = 4,
29  VT_ORDERID = 6,
30  VT_DESCRIPTION = 8,
31  VT_STATE = 10
32  };
33  int32_t teamIndex() const {
34  return GetField<int32_t>(VT_TEAMINDEX, 0);
35  }
36  int32_t orderId() const {
37  return GetField<int32_t>(VT_ORDERID, 0);
38  }
39  const ::flatbuffers::String *description() const {
40  return GetPointer<const ::flatbuffers::String *>(VT_DESCRIPTION);
41  }
42  const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::StringStringMap>> *state() const {
43  return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::StringStringMap>> *>(VT_STATE);
44  }
45  bool Verify(::flatbuffers::Verifier &verifier) const {
46  return VerifyTableStart(verifier) &&
47  VerifyField<int32_t>(verifier, VT_TEAMINDEX, 4) &&
48  VerifyField<int32_t>(verifier, VT_ORDERID, 4) &&
49  VerifyOffset(verifier, VT_DESCRIPTION) &&
50  verifier.VerifyString(description()) &&
51  VerifyOffset(verifier, VT_STATE) &&
52  verifier.VerifyVector(state()) &&
53  verifier.VerifyVectorOfTables(state()) &&
54  verifier.EndTable();
55  }
56 };
57 
60  ::flatbuffers::FlatBufferBuilder &fbb_;
61  ::flatbuffers::uoffset_t start_;
62  void add_teamIndex(int32_t teamIndex) {
63  fbb_.AddElement<int32_t>(SimulatedGameUnitSnapshot::VT_TEAMINDEX, teamIndex, 0);
64  }
65  void add_orderId(int32_t orderId) {
66  fbb_.AddElement<int32_t>(SimulatedGameUnitSnapshot::VT_ORDERID, orderId, 0);
67  }
68  void add_description(::flatbuffers::Offset<::flatbuffers::String> description) {
69  fbb_.AddOffset(SimulatedGameUnitSnapshot::VT_DESCRIPTION, description);
70  }
71  void add_state(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::StringStringMap>>> state) {
72  fbb_.AddOffset(SimulatedGameUnitSnapshot::VT_STATE, state);
73  }
74  explicit SimulatedGameUnitSnapshotBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
75  : fbb_(_fbb) {
76  start_ = fbb_.StartTable();
77  }
78  ::flatbuffers::Offset<SimulatedGameUnitSnapshot> Finish() {
79  const auto end = fbb_.EndTable(start_);
80  auto o = ::flatbuffers::Offset<SimulatedGameUnitSnapshot>(end);
81  return o;
82  }
83 };
84 
85 inline ::flatbuffers::Offset<SimulatedGameUnitSnapshot> CreateSimulatedGameUnitSnapshot(
86  ::flatbuffers::FlatBufferBuilder &_fbb,
87  int32_t teamIndex = 0,
88  int32_t orderId = 0,
89  ::flatbuffers::Offset<::flatbuffers::String> description = 0,
90  ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<grail::data::generated::StringStringMap>>> state = 0) {
91  SimulatedGameUnitSnapshotBuilder builder_(_fbb);
92  builder_.add_state(state);
93  builder_.add_description(description);
94  builder_.add_orderId(orderId);
95  builder_.add_teamIndex(teamIndex);
96  return builder_.Finish();
97 }
98 
99 inline ::flatbuffers::Offset<SimulatedGameUnitSnapshot> CreateSimulatedGameUnitSnapshotDirect(
100  ::flatbuffers::FlatBufferBuilder &_fbb,
101  int32_t teamIndex = 0,
102  int32_t orderId = 0,
103  const char *description = nullptr,
104  std::vector<::flatbuffers::Offset<grail::data::generated::StringStringMap>> *state = nullptr) {
105  auto description__ = description ? _fbb.CreateString(description) : 0;
106  auto state__ = state ? _fbb.CreateVectorOfSortedTables<grail::data::generated::StringStringMap>(state) : 0;
107  return grail::data::generated::CreateSimulatedGameUnitSnapshot(
108  _fbb,
109  teamIndex,
110  orderId,
111  description__,
112  state__);
113 }
114 
115 inline const grail::data::generated::SimulatedGameUnitSnapshot *GetSimulatedGameUnitSnapshot(const void *buf) {
116  return ::flatbuffers::GetRoot<grail::data::generated::SimulatedGameUnitSnapshot>(buf);
117 }
118 
119 inline const grail::data::generated::SimulatedGameUnitSnapshot *GetSizePrefixedSimulatedGameUnitSnapshot(const void *buf) {
120  return ::flatbuffers::GetSizePrefixedRoot<grail::data::generated::SimulatedGameUnitSnapshot>(buf);
121 }
122 
123 inline bool VerifySimulatedGameUnitSnapshotBuffer(
124  ::flatbuffers::Verifier &verifier) {
125  return verifier.VerifyBuffer<grail::data::generated::SimulatedGameUnitSnapshot>(nullptr);
126 }
127 
128 inline bool VerifySizePrefixedSimulatedGameUnitSnapshotBuffer(
129  ::flatbuffers::Verifier &verifier) {
130  return verifier.VerifySizePrefixedBuffer<grail::data::generated::SimulatedGameUnitSnapshot>(nullptr);
131 }
132 
133 inline void FinishSimulatedGameUnitSnapshotBuffer(
134  ::flatbuffers::FlatBufferBuilder &fbb,
135  ::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot> root) {
136  fbb.Finish(root);
137 }
138 
139 inline void FinishSizePrefixedSimulatedGameUnitSnapshotBuffer(
140  ::flatbuffers::FlatBufferBuilder &fbb,
141  ::flatbuffers::Offset<grail::data::generated::SimulatedGameUnitSnapshot> root) {
142  fbb.FinishSizePrefixed(root);
143 }
144 
145 } // namespace generated
146 } // namespace data
147 } // namespace grail
148 
149 #endif // FLATBUFFERS_GENERATED_SIMULATEDGAMEUNITSNAPSHOT_GRAIL_DATA_GENERATED_H_
grail::data::SimulatedGameUnitSnapshot
Definition: SimulatedGamesSnapshots.h:29
grail::data::generated::SimulatedGameUnitSnapshotBuilder
Definition: SimulatedGameUnitSnapshot_generated.h:58