@@ -23,14 +23,11 @@ struct Vector3DAlt;
2323
2424struct Matrix ;
2525struct MatrixBuilder ;
26- struct MatrixT ;
2726
2827struct ApplicationData ;
2928struct ApplicationDataBuilder ;
3029struct ApplicationDataT ;
3130
32- bool operator ==(const MatrixT &lhs, const MatrixT &rhs);
33- bool operator !=(const MatrixT &lhs, const MatrixT &rhs);
3431bool operator ==(const ApplicationDataT &lhs, const ApplicationDataT &rhs);
3532bool operator !=(const ApplicationDataT &lhs, const ApplicationDataT &rhs);
3633
@@ -124,15 +121,8 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vector3DAlt FLATBUFFERS_FINAL_CLASS {
124121};
125122FLATBUFFERS_STRUCT_END (Vector3DAlt, 12 );
126123
127- struct MatrixT : public ::flatbuffers::NativeTable {
128- typedef Matrix TableType;
129- int32_t rows = 0 ;
130- int32_t columns = 0 ;
131- std::vector<float > values{};
132- };
133-
134124struct Matrix FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
135- typedef MatrixT NativeTableType;
125+ typedef Native::Matrix NativeTableType;
136126 typedef MatrixBuilder Builder;
137127 static const ::flatbuffers::TypeTable *MiniReflectTypeTable () {
138128 return MatrixTypeTable ();
@@ -168,9 +158,9 @@ struct Matrix FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
168158 verifier.VerifyVector (values ()) &&
169159 verifier.EndTable ();
170160 }
171- MatrixT *UnPack (const ::flatbuffers::resolver_function_t *_resolver = nullptr ) const ;
172- void UnPackTo (MatrixT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr ) const ;
173- static ::flatbuffers::Offset<Matrix> Pack (::flatbuffers::FlatBufferBuilder &_fbb, const MatrixT * _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
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 );
174164};
175165
176166struct MatrixBuilder {
@@ -222,16 +212,16 @@ inline ::flatbuffers::Offset<Matrix> CreateMatrixDirect(
222212 values__);
223213}
224214
225- ::flatbuffers::Offset<Matrix> CreateMatrix (::flatbuffers::FlatBufferBuilder &_fbb, const MatrixT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
215+ ::flatbuffers::Offset<Matrix> CreateMatrix (::flatbuffers::FlatBufferBuilder &_fbb, const Native::Matrix *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
226216
227217struct ApplicationDataT : public ::flatbuffers::NativeTable {
228218 typedef ApplicationData TableType;
229219 std::vector<Native::Vector3D> vectors{};
230220 std::vector<Native::Vector3D> vectors_alt{};
231221 std::unique_ptr<Native::Vector3D> position{};
232222 Native::Vector3D position_inline{};
233- std::unique_ptr<Geometry::MatrixT > matrix{};
234- std::vector<std::unique_ptr<Geometry::MatrixT >> matrices{};
223+ std::unique_ptr<Native::Matrix > matrix{};
224+ std::vector<std::unique_ptr<Native::Matrix >> matrices{};
235225 ApplicationDataT () = default ;
236226 ApplicationDataT (const ApplicationDataT &o);
237227 ApplicationDataT (ApplicationDataT&&) FLATBUFFERS_NOEXCEPT = default ;
@@ -382,51 +372,16 @@ inline ::flatbuffers::Offset<ApplicationData> CreateApplicationDataDirect(
382372
383373::flatbuffers::Offset<ApplicationData> CreateApplicationData (::flatbuffers::FlatBufferBuilder &_fbb, const ApplicationDataT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr );
384374
385-
386- inline bool operator ==(const MatrixT &lhs, const MatrixT &rhs) {
387- return
388- (lhs.rows == rhs.rows ) &&
389- (lhs.columns == rhs.columns ) &&
390- (lhs.values == rhs.values );
391- }
392-
393- inline bool operator !=(const MatrixT &lhs, const MatrixT &rhs) {
394- return !(lhs == rhs);
395- }
396-
397-
398- inline MatrixT *Matrix::UnPack (const ::flatbuffers::resolver_function_t *_resolver) const {
399- auto _o = std::unique_ptr<MatrixT>(new MatrixT ());
375+ inline Native::Matrix *Matrix::UnPack (const ::flatbuffers::resolver_function_t *_resolver) const {
376+ auto _o = std::unique_ptr<Native::Matrix>(new Native::Matrix ());
400377 UnPackTo (_o.get (), _resolver);
401378 return _o.release ();
402379}
403380
404- inline void Matrix::UnPackTo (MatrixT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
405- (void )_o;
406- (void )_resolver;
407- { auto _e = rows (); _o->rows = _e; }
408- { auto _e = columns (); _o->columns = _e; }
409- { auto _e = values (); if (_e) { _o->values .resize (_e->size ()); for (::flatbuffers::uoffset_t _i = 0 ; _i < _e->size (); _i++) { _o->values [_i] = _e->Get (_i); } } else { _o->values .resize (0 ); } }
410- }
411-
412- inline ::flatbuffers::Offset<Matrix> CreateMatrix (::flatbuffers::FlatBufferBuilder &_fbb, const MatrixT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
381+ inline ::flatbuffers::Offset<Matrix> CreateMatrix (::flatbuffers::FlatBufferBuilder &_fbb, const Native::Matrix *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
413382 return Matrix::Pack (_fbb, _o, _rehasher);
414383}
415384
416- inline ::flatbuffers::Offset<Matrix> Matrix::Pack (::flatbuffers::FlatBufferBuilder &_fbb, const MatrixT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
417- (void )_rehasher;
418- (void )_o;
419- struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const MatrixT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void )_va;
420- auto _rows = _o->rows ;
421- auto _columns = _o->columns ;
422- auto _values = _o->values .size () ? _fbb.CreateVector (_o->values ) : 0 ;
423- return Geometry::CreateMatrix (
424- _fbb,
425- _rows,
426- _columns,
427- _values);
428- }
429-
430385
431386inline bool operator ==(const ApplicationDataT &lhs, const ApplicationDataT &rhs) {
432387 return
@@ -435,7 +390,7 @@ inline bool operator==(const ApplicationDataT &lhs, const ApplicationDataT &rhs)
435390 ((lhs.position == rhs.position ) || (lhs.position && rhs.position && *lhs.position == *rhs.position )) &&
436391 (lhs.position_inline == rhs.position_inline ) &&
437392 ((lhs.matrix == rhs.matrix ) || (lhs.matrix && rhs.matrix && *lhs.matrix == *rhs.matrix )) &&
438- (lhs.matrices .size () == rhs.matrices .size () && std::equal (lhs.matrices .cbegin (), lhs.matrices .cend (), rhs.matrices .cbegin (), [](std::unique_ptr<Geometry::MatrixT > const &a, std::unique_ptr<Geometry::MatrixT > const &b) { return (a == b) || (a && b && *a == *b); }));
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); }));
439394}
440395
441396inline bool operator !=(const ApplicationDataT &lhs, const ApplicationDataT &rhs) {
@@ -448,9 +403,9 @@ inline ApplicationDataT::ApplicationDataT(const ApplicationDataT &o)
448403 vectors_alt(o.vectors_alt),
449404 position((o.position) ? new Native::Vector3D(*o.position) : nullptr),
450405 position_inline(o.position_inline),
451- matrix((o.matrix) ? new Geometry::MatrixT (*o.matrix) : nullptr) {
406+ matrix((o.matrix) ? new Native::Matrix (*o.matrix) : nullptr) {
452407 matrices.reserve (o.matrices .size ());
453- for (const auto &matrices_ : o.matrices ) { matrices.emplace_back ((matrices_) ? new Geometry::MatrixT (*matrices_) : nullptr ); }
408+ for (const auto &matrices_ : o.matrices ) { matrices.emplace_back ((matrices_) ? new Native::Matrix (*matrices_) : nullptr ); }
454409}
455410
456411inline ApplicationDataT &ApplicationDataT::operator =(ApplicationDataT o) FLATBUFFERS_NOEXCEPT {
@@ -476,8 +431,8 @@ inline void ApplicationData::UnPackTo(ApplicationDataT *_o, const ::flatbuffers:
476431 { 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 ); } }
477432 { auto _e = position (); if (_e) _o->position = std::unique_ptr<Native::Vector3D>(new Native::Vector3D (::flatbuffers::UnPack (*_e))); }
478433 { auto _e = position_inline (); if (_e) _o->position_inline = ::flatbuffers::UnPack (*_e); }
479- { auto _e = matrix (); if (_e) { if (_o->matrix ) { _e->UnPackTo (_o->matrix .get (), _resolver); } else { _o->matrix = std::unique_ptr<Geometry::MatrixT >(_e->UnPack (_resolver)); } } else if (_o->matrix ) { _o->matrix .reset (); } }
480- { 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<Geometry::MatrixT >(_e->Get (_i)->UnPack (_resolver)); } } } else { _o->matrices .resize (0 ); } }
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 ); } }
481436}
482437
483438inline ::flatbuffers::Offset<ApplicationData> CreateApplicationData (::flatbuffers::FlatBufferBuilder &_fbb, const ApplicationDataT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
0 commit comments