@@ -21,6 +21,9 @@ struct Vector3D;
2121
2222struct Vector3DAlt ;
2323
24+ struct Matrix ;
25+ struct MatrixBuilder ;
26+
2427struct ApplicationData ;
2528struct ApplicationDataBuilder ;
2629struct ApplicationDataT ;
@@ -32,6 +35,8 @@ inline const ::flatbuffers::TypeTable *Vector3DTypeTable();
3235
3336inline const ::flatbuffers::TypeTable *Vector3DAltTypeTable ();
3437
38+ inline const ::flatbuffers::TypeTable *MatrixTypeTable ();
39+
3540inline const ::flatbuffers::TypeTable *ApplicationDataTypeTable ();
3641
3742FLATBUFFERS_MANUALLY_ALIGNED_STRUCT (4 ) Vector3D FLATBUFFERS_FINAL_CLASS {
@@ -116,12 +121,107 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vector3DAlt FLATBUFFERS_FINAL_CLASS {
116121};
117122FLATBUFFERS_STRUCT_END (Vector3DAlt, 12 );
118123
124+ struct Matrix FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
125+ typedef Native::Matrix NativeTableType;
126+ typedef MatrixBuilder Builder;
127+ static const ::flatbuffers::TypeTable *MiniReflectTypeTable () {
128+ return MatrixTypeTable ();
129+ }
130+ enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
131+ VT_ROWS = 4 ,
132+ VT_COLUMNS = 6 ,
133+ VT_VALUES = 8
134+ };
135+ int32_t rows () const {
136+ return GetField<int32_t >(VT_ROWS, 0 );
137+ }
138+ bool mutate_rows (int32_t _rows = 0 ) {
139+ return SetField<int32_t >(VT_ROWS, _rows, 0 );
140+ }
141+ int32_t columns () const {
142+ return GetField<int32_t >(VT_COLUMNS, 0 );
143+ }
144+ bool mutate_columns (int32_t _columns = 0 ) {
145+ return SetField<int32_t >(VT_COLUMNS, _columns, 0 );
146+ }
147+ const ::flatbuffers::Vector<float > *values () const {
148+ return GetPointer<const ::flatbuffers::Vector<float > *>(VT_VALUES);
149+ }
150+ ::flatbuffers::Vector<float > *mutable_values () {
151+ return GetPointer<::flatbuffers::Vector<float > *>(VT_VALUES);
152+ }
153+ bool Verify (::flatbuffers::Verifier &verifier) const {
154+ return VerifyTableStart (verifier) &&
155+ VerifyField<int32_t >(verifier, VT_ROWS, 4 ) &&
156+ VerifyField<int32_t >(verifier, VT_COLUMNS, 4 ) &&
157+ VerifyOffset (verifier, VT_VALUES) &&
158+ verifier.VerifyVector (values ()) &&
159+ verifier.EndTable ();
160+ }
161+ Native::Matrix *UnPack (const ::flatbuffers::resolver_function_t *_resolver = nullptr ) const ;
162+ void UnPackTo (Native::Matrix *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr ) const ;
163+ static ::flatbuffers::Offset<Matrix> Pack (::flatbuffers::FlatBufferBuilder &_fbb, const Native::Matrix* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
164+ };
165+
166+ struct MatrixBuilder {
167+ typedef Matrix Table;
168+ ::flatbuffers::FlatBufferBuilder &fbb_;
169+ ::flatbuffers::uoffset_t start_;
170+ void add_rows (int32_t rows) {
171+ fbb_.AddElement <int32_t >(Matrix::VT_ROWS, rows, 0 );
172+ }
173+ void add_columns (int32_t columns) {
174+ fbb_.AddElement <int32_t >(Matrix::VT_COLUMNS, columns, 0 );
175+ }
176+ void add_values (::flatbuffers::Offset<::flatbuffers::Vector<float >> values) {
177+ fbb_.AddOffset (Matrix::VT_VALUES, values);
178+ }
179+ explicit MatrixBuilder (::flatbuffers::FlatBufferBuilder &_fbb)
180+ : fbb_(_fbb) {
181+ start_ = fbb_.StartTable ();
182+ }
183+ ::flatbuffers::Offset<Matrix> Finish () {
184+ const auto end = fbb_.EndTable (start_);
185+ auto o = ::flatbuffers::Offset<Matrix>(end);
186+ return o;
187+ }
188+ };
189+
190+ inline ::flatbuffers::Offset<Matrix> CreateMatrix (
191+ ::flatbuffers::FlatBufferBuilder &_fbb,
192+ int32_t rows = 0 ,
193+ int32_t columns = 0 ,
194+ ::flatbuffers::Offset<::flatbuffers::Vector<float >> values = 0 ) {
195+ MatrixBuilder builder_ (_fbb);
196+ builder_.add_values (values);
197+ builder_.add_columns (columns);
198+ builder_.add_rows (rows);
199+ return builder_.Finish ();
200+ }
201+
202+ inline ::flatbuffers::Offset<Matrix> CreateMatrixDirect (
203+ ::flatbuffers::FlatBufferBuilder &_fbb,
204+ int32_t rows = 0 ,
205+ int32_t columns = 0 ,
206+ const std::vector<float > *values = nullptr ) {
207+ auto values__ = values ? _fbb.CreateVector <float >(*values) : 0 ;
208+ return Geometry::CreateMatrix (
209+ _fbb,
210+ rows,
211+ columns,
212+ values__);
213+ }
214+
215+ ::flatbuffers::Offset<Matrix> CreateMatrix (::flatbuffers::FlatBufferBuilder &_fbb, const Native::Matrix *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
216+
119217struct ApplicationDataT : public ::flatbuffers::NativeTable {
120218 typedef ApplicationData TableType;
121219 std::vector<Native::Vector3D> vectors{};
122220 std::vector<Native::Vector3D> vectors_alt{};
123221 std::unique_ptr<Native::Vector3D> position{};
124222 Native::Vector3D position_inline{};
223+ std::unique_ptr<Native::Matrix> matrix{};
224+ std::vector<std::unique_ptr<Native::Matrix>> matrices{};
125225 ApplicationDataT () = default ;
126226 ApplicationDataT (const ApplicationDataT &o);
127227 ApplicationDataT (ApplicationDataT&&) FLATBUFFERS_NOEXCEPT = default ;
@@ -138,7 +238,9 @@ struct ApplicationData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
138238 VT_VECTORS = 4 ,
139239 VT_VECTORS_ALT = 6 ,
140240 VT_POSITION = 8 ,
141- VT_POSITION_INLINE = 10
241+ VT_POSITION_INLINE = 10 ,
242+ VT_MATRIX = 12 ,
243+ VT_MATRICES = 14
142244 };
143245 const ::flatbuffers::Vector<const Geometry::Vector3D *> *vectors () const {
144246 return GetPointer<const ::flatbuffers::Vector<const Geometry::Vector3D *> *>(VT_VECTORS);
@@ -164,6 +266,18 @@ struct ApplicationData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
164266 Geometry::Vector3D *mutable_position_inline () {
165267 return GetStruct<Geometry::Vector3D *>(VT_POSITION_INLINE);
166268 }
269+ const Geometry::Matrix *matrix () const {
270+ return GetPointer<const Geometry::Matrix *>(VT_MATRIX);
271+ }
272+ Geometry::Matrix *mutable_matrix () {
273+ return GetPointer<Geometry::Matrix *>(VT_MATRIX);
274+ }
275+ const ::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>> *matrices () const {
276+ return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>> *>(VT_MATRICES);
277+ }
278+ ::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>> *mutable_matrices () {
279+ return GetPointer<::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>> *>(VT_MATRICES);
280+ }
167281 bool Verify (::flatbuffers::Verifier &verifier) const {
168282 return VerifyTableStart (verifier) &&
169283 VerifyOffset (verifier, VT_VECTORS) &&
@@ -172,6 +286,11 @@ struct ApplicationData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
172286 verifier.VerifyVector (vectors_alt ()) &&
173287 VerifyField<Geometry::Vector3D>(verifier, VT_POSITION, 4 ) &&
174288 VerifyField<Geometry::Vector3D>(verifier, VT_POSITION_INLINE, 4 ) &&
289+ VerifyOffset (verifier, VT_MATRIX) &&
290+ verifier.VerifyTable (matrix ()) &&
291+ VerifyOffset (verifier, VT_MATRICES) &&
292+ verifier.VerifyVector (matrices ()) &&
293+ verifier.VerifyVectorOfTables (matrices ()) &&
175294 verifier.EndTable ();
176295 }
177296 ApplicationDataT *UnPack (const ::flatbuffers::resolver_function_t *_resolver = nullptr ) const ;
@@ -195,6 +314,12 @@ struct ApplicationDataBuilder {
195314 void add_position_inline (const Geometry::Vector3D *position_inline) {
196315 fbb_.AddStruct (ApplicationData::VT_POSITION_INLINE, position_inline);
197316 }
317+ void add_matrix (::flatbuffers::Offset<Geometry::Matrix> matrix) {
318+ fbb_.AddOffset (ApplicationData::VT_MATRIX, matrix);
319+ }
320+ void add_matrices (::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>>> matrices) {
321+ fbb_.AddOffset (ApplicationData::VT_MATRICES, matrices);
322+ }
198323 explicit ApplicationDataBuilder (::flatbuffers::FlatBufferBuilder &_fbb)
199324 : fbb_(_fbb) {
200325 start_ = fbb_.StartTable ();
@@ -211,8 +336,12 @@ inline ::flatbuffers::Offset<ApplicationData> CreateApplicationData(
211336 ::flatbuffers::Offset<::flatbuffers::Vector<const Geometry::Vector3D *>> vectors = 0 ,
212337 ::flatbuffers::Offset<::flatbuffers::Vector<const Geometry::Vector3DAlt *>> vectors_alt = 0 ,
213338 const Geometry::Vector3D *position = nullptr ,
214- const Geometry::Vector3D *position_inline = nullptr ) {
339+ const Geometry::Vector3D *position_inline = nullptr ,
340+ ::flatbuffers::Offset<Geometry::Matrix> matrix = 0 ,
341+ ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Geometry::Matrix>>> matrices = 0 ) {
215342 ApplicationDataBuilder builder_ (_fbb);
343+ builder_.add_matrices (matrices);
344+ builder_.add_matrix (matrix);
216345 builder_.add_position_inline (position_inline);
217346 builder_.add_position (position);
218347 builder_.add_vectors_alt (vectors_alt);
@@ -225,26 +354,43 @@ inline ::flatbuffers::Offset<ApplicationData> CreateApplicationDataDirect(
225354 const std::vector<Geometry::Vector3D> *vectors = nullptr ,
226355 const std::vector<Geometry::Vector3DAlt> *vectors_alt = nullptr ,
227356 const Geometry::Vector3D *position = nullptr ,
228- const Geometry::Vector3D *position_inline = nullptr ) {
357+ const Geometry::Vector3D *position_inline = nullptr ,
358+ ::flatbuffers::Offset<Geometry::Matrix> matrix = 0 ,
359+ const std::vector<::flatbuffers::Offset<Geometry::Matrix>> *matrices = nullptr ) {
229360 auto vectors__ = vectors ? _fbb.CreateVectorOfStructs <Geometry::Vector3D>(*vectors) : 0 ;
230361 auto vectors_alt__ = vectors_alt ? _fbb.CreateVectorOfStructs <Geometry::Vector3DAlt>(*vectors_alt) : 0 ;
362+ auto matrices__ = matrices ? _fbb.CreateVector <::flatbuffers::Offset<Geometry::Matrix>>(*matrices) : 0 ;
231363 return Geometry::CreateApplicationData (
232364 _fbb,
233365 vectors__,
234366 vectors_alt__,
235367 position,
236- position_inline);
368+ position_inline,
369+ matrix,
370+ matrices__);
237371}
238372
239373::flatbuffers::Offset<ApplicationData> CreateApplicationData (::flatbuffers::FlatBufferBuilder &_fbb, const ApplicationDataT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
240374
375+ inline Native::Matrix *Matrix::UnPack (const ::flatbuffers::resolver_function_t *_resolver) const {
376+ auto _o = std::unique_ptr<Native::Matrix>(new Native::Matrix ());
377+ UnPackTo (_o.get (), _resolver);
378+ return _o.release ();
379+ }
380+
381+ inline ::flatbuffers::Offset<Matrix> Matrix::Pack (::flatbuffers::FlatBufferBuilder &_fbb, const Native::Matrix* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
382+ return CreateMatrix (_fbb, _o, _rehasher);
383+ }
384+
241385
242386inline bool operator ==(const ApplicationDataT &lhs, const ApplicationDataT &rhs) {
243387 return
244388 (lhs.vectors == rhs.vectors ) &&
245389 (lhs.vectors_alt == rhs.vectors_alt ) &&
246390 ((lhs.position == rhs.position ) || (lhs.position && rhs.position && *lhs.position == *rhs.position )) &&
247- (lhs.position_inline == rhs.position_inline );
391+ (lhs.position_inline == rhs.position_inline ) &&
392+ ((lhs.matrix == rhs.matrix ) || (lhs.matrix && rhs.matrix && *lhs.matrix == *rhs.matrix )) &&
393+ (lhs.matrices .size () == rhs.matrices .size () && std::equal (lhs.matrices .cbegin (), lhs.matrices .cend (), rhs.matrices .cbegin (), [](std::unique_ptr<Native::Matrix> const &a, std::unique_ptr<Native::Matrix> const &b) { return (a == b) || (a && b && *a == *b); }));
248394}
249395
250396inline bool operator !=(const ApplicationDataT &lhs, const ApplicationDataT &rhs) {
@@ -256,14 +402,19 @@ inline ApplicationDataT::ApplicationDataT(const ApplicationDataT &o)
256402 : vectors(o.vectors),
257403 vectors_alt(o.vectors_alt),
258404 position((o.position) ? new Native::Vector3D(*o.position) : nullptr),
259- position_inline(o.position_inline) {
405+ position_inline(o.position_inline),
406+ matrix((o.matrix) ? new Native::Matrix(*o.matrix) : nullptr) {
407+ matrices.reserve (o.matrices .size ());
408+ for (const auto &matrices_ : o.matrices ) { matrices.emplace_back ((matrices_) ? new Native::Matrix (*matrices_) : nullptr ); }
260409}
261410
262411inline ApplicationDataT &ApplicationDataT::operator =(ApplicationDataT o) FLATBUFFERS_NOEXCEPT {
263412 std::swap (vectors, o.vectors );
264413 std::swap (vectors_alt, o.vectors_alt );
265414 std::swap (position, o.position );
266415 std::swap (position_inline, o.position_inline );
416+ std::swap (matrix, o.matrix );
417+ std::swap (matrices, o.matrices );
267418 return *this ;
268419}
269420
@@ -280,6 +431,8 @@ inline void ApplicationData::UnPackTo(ApplicationDataT *_o, const ::flatbuffers:
280431 { auto _e = vectors_alt (); if (_e) { _o->vectors_alt .resize (_e->size ()); for (::flatbuffers::uoffset_t _i = 0 ; _i < _e->size (); _i++) { _o->vectors_alt [_i] = ::flatbuffers::UnPackVector3DAlt (*_e->Get (_i)); } } else { _o->vectors_alt .resize (0 ); } }
281432 { auto _e = position (); if (_e) _o->position = std::unique_ptr<Native::Vector3D>(new Native::Vector3D (::flatbuffers::UnPack (*_e))); }
282433 { auto _e = position_inline (); if (_e) _o->position_inline = ::flatbuffers::UnPack (*_e); }
434+ { auto _e = matrix (); if (_e) { if (_o->matrix ) { _e->UnPackTo (_o->matrix .get (), _resolver); } else { _o->matrix = std::unique_ptr<Native::Matrix>(_e->UnPack (_resolver)); } } else if (_o->matrix ) { _o->matrix .reset (); } }
435+ { auto _e = matrices (); if (_e) { _o->matrices .resize (_e->size ()); for (::flatbuffers::uoffset_t _i = 0 ; _i < _e->size (); _i++) { if (_o->matrices [_i]) { _e->Get (_i)->UnPackTo (_o->matrices [_i].get (), _resolver); } else { _o->matrices [_i] = std::unique_ptr<Native::Matrix>(_e->Get (_i)->UnPack (_resolver)); } } } else { _o->matrices .resize (0 ); } }
283436}
284437
285438inline ::flatbuffers::Offset<ApplicationData> ApplicationData::Pack (::flatbuffers::FlatBufferBuilder &_fbb, const ApplicationDataT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
@@ -294,12 +447,16 @@ inline ::flatbuffers::Offset<ApplicationData> CreateApplicationData(::flatbuffer
294447 auto _vectors_alt = _o->vectors_alt .size () ? _fbb.CreateVectorOfNativeStructs <Geometry::Vector3DAlt, Native::Vector3D>(_o->vectors_alt , ::flatbuffers::PackVector3DAlt) : 0 ;
295448 auto _position = Geometry::Vector3D{}; if (_o->position ) _position = ::flatbuffers::Pack (*_o->position );
296449 auto _position_inline = ::flatbuffers::Pack (_o->position_inline );
450+ auto _matrix = _o->matrix ? CreateMatrix (_fbb, _o->matrix .get (), _rehasher) : 0 ;
451+ auto _matrices = _o->matrices .size () ? _fbb.CreateVector <::flatbuffers::Offset<Geometry::Matrix>> (_o->matrices .size (), [](size_t i, _VectorArgs *__va) { return CreateMatrix (*__va->__fbb , __va->__o ->matrices [i].get (), __va->__rehasher ); }, &_va ) : 0 ;
297452 return Geometry::CreateApplicationData (
298453 _fbb,
299454 _vectors,
300455 _vectors_alt,
301456 _o->position ? &_position : nullptr ,
302- &_position_inline);
457+ &_position_inline,
458+ _matrix,
459+ _matrices);
303460}
304461
305462inline const ::flatbuffers::TypeTable *Vector3DTypeTable () {
@@ -338,25 +495,47 @@ inline const ::flatbuffers::TypeTable *Vector3DAltTypeTable() {
338495 return &tt;
339496}
340497
498+ inline const ::flatbuffers::TypeTable *MatrixTypeTable () {
499+ static const ::flatbuffers::TypeCode type_codes[] = {
500+ { ::flatbuffers::ET_INT, 0 , -1 },
501+ { ::flatbuffers::ET_INT, 0 , -1 },
502+ { ::flatbuffers::ET_FLOAT, 1 , -1 }
503+ };
504+ static const char * const names[] = {
505+ " rows" ,
506+ " columns" ,
507+ " values"
508+ };
509+ static const ::flatbuffers::TypeTable tt = {
510+ ::flatbuffers::ST_TABLE, 3 , type_codes, nullptr , nullptr , nullptr , names
511+ };
512+ return &tt;
513+ }
514+
341515inline const ::flatbuffers::TypeTable *ApplicationDataTypeTable () {
342516 static const ::flatbuffers::TypeCode type_codes[] = {
343517 { ::flatbuffers::ET_SEQUENCE, 1 , 0 },
344518 { ::flatbuffers::ET_SEQUENCE, 1 , 1 },
345519 { ::flatbuffers::ET_SEQUENCE, 0 , 0 },
346- { ::flatbuffers::ET_SEQUENCE, 0 , 0 }
520+ { ::flatbuffers::ET_SEQUENCE, 0 , 0 },
521+ { ::flatbuffers::ET_SEQUENCE, 0 , 2 },
522+ { ::flatbuffers::ET_SEQUENCE, 1 , 2 }
347523 };
348524 static const ::flatbuffers::TypeFunction type_refs[] = {
349525 Geometry::Vector3DTypeTable,
350- Geometry::Vector3DAltTypeTable
526+ Geometry::Vector3DAltTypeTable,
527+ Geometry::MatrixTypeTable
351528 };
352529 static const char * const names[] = {
353530 " vectors" ,
354531 " vectors_alt" ,
355532 " position" ,
356- " position_inline"
533+ " position_inline" ,
534+ " matrix" ,
535+ " matrices"
357536 };
358537 static const ::flatbuffers::TypeTable tt = {
359- ::flatbuffers::ST_TABLE, 4 , type_codes, type_refs, nullptr , nullptr , names
538+ ::flatbuffers::ST_TABLE, 6 , type_codes, type_refs, nullptr , nullptr , names
360539 };
361540 return &tt;
362541}
0 commit comments