Dart object API (#6682)

* dart test scripts - generate with `--gen-object-api`

* Dart object API, pack and unpack methods (WIP)

* Dart flatc - extract Builder code to separate functions to reuse it in Pack()

* Dart flatc - use builder field-building implementation in pack()

* Dart flatc - add pack() as an intance method of the "T" class

* Dart object API - make inner fields unpacked as well

* Dart object API - use pack() when collecting field offsets

* Dart object API - use packOnce() for fields that are structs or vectors of structs

* Dart object API - remove obsolete union support TODO

* Dart object API - minor review changes, test and fixes

* Dart object API - revert packOnce() - not supported by other object API implementations

* Dart object API - update docs

* update dart generated code in tests/ to fix CI failure on ./scripts/check-generated-code.sh

* Dart flatc - fix compilation for old MSVC and c++0x
This commit is contained in:
Ivan Dlugos
2021-06-14 19:15:56 +02:00
committed by GitHub
parent d959e23208
commit 4e3a66c141
16 changed files with 2002 additions and 82 deletions

View File

@@ -19,7 +19,7 @@ pushd "$(dirname $0)" >/dev/null
command -v dart >/dev/null 2>&1 || { echo >&2 "Dart tests require dart to be in path but it's not installed. Aborting."; exit 1; }
# output required files to the dart folder so that pub will be able to
# distribute them and more people can more easily run the dart tests
../flatc --dart -I include_test -o ../dart/test monster_test.fbs
../flatc --dart --gen-object-api -I include_test -o ../dart/test monster_test.fbs
cp monsterdata_test.mon ../dart/test
cd ../dart