diff --git a/aos/events/logging/logger_test.cc b/aos/events/logging/logger_test.cc index cf5ec3216a..c99a7c85cc 100644 --- a/aos/events/logging/logger_test.cc +++ b/aos/events/logging/logger_test.cc @@ -3757,11 +3757,11 @@ TEST_P(MultinodeLoggerTest, DeadNode) { } constexpr std::string_view kCombinedConfigSha1( - "c10ca3c1efa7924d48859000b6671eadc007b6373c81d07138a385dfdbb33d69"); + "5d73fe35bacaa59d24f8f0c1a806fe10b783b0fcc80809ee30a9db824e82538b"); constexpr std::string_view kSplitConfigSha1( - "f8df4ee52e137025dac96303f8d38a5324fd819d1c22ff018754dd56c3ca64e8"); + "f25e8f6f90d61f41c41517e652300566228b077e44cd86f1af2af4a9bed31ad4"); constexpr std::string_view kReloggedSplitConfigSha1( - "3154b2a9f9819d676d40c689a6c2967c2c64152c2845673b78d0c1cdc368d3ec"); + "f1fabd629bdf8735c3d81bc791d7a454e8e636951c26cba6426545cbc97f911f"); INSTANTIATE_TEST_SUITE_P( All, MultinodeLoggerTest, diff --git a/aos/events/shm_event_loop_test.cc b/aos/events/shm_event_loop_test.cc index f1194797f9..90a6d1c11d 100644 --- a/aos/events/shm_event_loop_test.cc +++ b/aos/events/shm_event_loop_test.cc @@ -350,7 +350,7 @@ TEST_P(ShmEventLoopTest, GetSenderSharedMemory) { auto builder = sender.MakeBuilder(); uint8_t *buffer; - builder.fbb()->CreateUninitializedVector(5, 1, &buffer); + builder.fbb()->CreateUninitializedVector(5, &buffer); EXPECT_GE(reinterpret_cast(buffer), shared_memory.begin()); EXPECT_LT(reinterpret_cast(buffer), shared_memory.end()); } diff --git a/aos/flatbuffer_merge.cc b/aos/flatbuffer_merge.cc index 17f4468724..f89165bb6c 100644 --- a/aos/flatbuffer_merge.cc +++ b/aos/flatbuffer_merge.cc @@ -164,7 +164,7 @@ void AddVectorOfStrings(flatbuffers::ElementaryType elementary_type, } // Start the vector. - fbb->StartVector(size, inline_size); + fbb->StartVector(size, inline_size, /*align=*/inline_size); for (const flatbuffers::Offset &element : string_elements) { @@ -214,7 +214,7 @@ void AddVector(flatbuffers::ElementaryType elementary_type, flatbuffers::InlineSize(elementary_type, nullptr); // Start the vector. - fbb->StartVector(size, inline_size); + fbb->StartVector(size, inline_size, /*align=*/inline_size); // Pack the contents in in reverse order. if (t2_has) { @@ -306,7 +306,7 @@ void AddVectorOfObjects(flatbuffers::FlatBufferBuilder *fbb, } // Start the vector. - fbb->StartVector(size, inline_size); + fbb->StartVector(size, inline_size, /*align=*/inline_size); for (const flatbuffers::Offset &element : object_elements) { diff --git a/aos/json_to_flatbuffer.cc b/aos/json_to_flatbuffer.cc index e7b62d41a7..825bb3c359 100644 --- a/aos/json_to_flatbuffer.cc +++ b/aos/json_to_flatbuffer.cc @@ -580,8 +580,9 @@ bool AddSingleElement(FlatbufferType type, int field_index, bool JsonParser::FinishVector(int field_index) { // Vectors have a start (unfortunately which needs to know the size) - fbb_->StartVector(stack_.back().vector_elements.size(), - stack_.back().type.FieldInlineSize(field_index)); + const size_t inline_size = stack_.back().type.FieldInlineSize(field_index); + fbb_->StartVector(stack_.back().vector_elements.size(), inline_size, + /*align=*/inline_size); const flatbuffers::ElementaryType elementary_type = stack_.back().type.FieldElementaryType(field_index); diff --git a/third_party/cargo/BUILD.bazel b/third_party/cargo/BUILD.bazel index 4bf6ce8aa4..179912e045 100644 --- a/third_party/cargo/BUILD.bazel +++ b/third_party/cargo/BUILD.bazel @@ -300,6 +300,15 @@ alias( ], ) +alias( + name = "rustc_version", + actual = "@raze__rustc_version__0_4_0//:rustc_version", + tags = [ + "cargo-raze", + "manual", + ], +) + alias( name = "serde", actual = "@raze__serde__1_0_139//:serde", diff --git a/third_party/cargo/crates.bzl b/third_party/cargo/crates.bzl index 51d9a05fdd..7a79f881b8 100644 --- a/third_party/cargo/crates.bzl +++ b/third_party/cargo/crates.bzl @@ -961,6 +961,15 @@ def raze_fetch_remote_crates(): build_file = Label("//third_party/cargo/remote:BUILD.rustc-hash-1.1.0.bazel"), ) + maybe( + http_archive, + name = "raze__rustc_version__0_4_0", + url = "https://crates.io/api/v1/crates/rustc_version/0.4.0/download", + type = "tar.gz", + strip_prefix = "rustc_version-0.4.0", + build_file = Label("//third_party/cargo/remote:BUILD.rustc_version-0.4.0.bazel"), + ) + maybe( http_archive, name = "raze__rustversion__1_0_8", @@ -981,6 +990,15 @@ def raze_fetch_remote_crates(): build_file = Label("//third_party/cargo/remote:BUILD.ryu-1.0.10.bazel"), ) + maybe( + http_archive, + name = "raze__semver__1_0_14", + url = "https://crates.io/api/v1/crates/semver/1.0.14/download", + type = "tar.gz", + strip_prefix = "semver-1.0.14", + build_file = Label("//third_party/cargo/remote:BUILD.semver-1.0.14.bazel"), + ) + maybe( http_archive, name = "raze__serde__1_0_139", diff --git a/third_party/cargo/remote/BUILD.rustc_version-0.4.0.bazel b/third_party/cargo/remote/BUILD.rustc_version-0.4.0.bazel new file mode 100644 index 0000000000..1155411ea9 --- /dev/null +++ b/third_party/cargo/remote/BUILD.rustc_version-0.4.0.bazel @@ -0,0 +1,57 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//third_party/cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT OR Apache-2.0" +]) + +# Generated Targets + +rust_library( + name = "rustc_version", + srcs = glob(["**/*.rs"]), + crate_features = [ + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=rustc_version", + "manual", + ], + version = "0.4.0", + # buildifier: leave-alone + deps = [ + "@raze__semver__1_0_14//:semver", + ], +) + +# Unsupported target "all" with type "test" omitted diff --git a/third_party/cargo/remote/BUILD.semver-1.0.14.bazel b/third_party/cargo/remote/BUILD.semver-1.0.14.bazel new file mode 100644 index 0000000000..f2167141cd --- /dev/null +++ b/third_party/cargo/remote/BUILD.semver-1.0.14.bazel @@ -0,0 +1,98 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//third_party/cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT OR Apache-2.0" +]) + +# Generated Targets +# buildifier: disable=out-of-order-load +# buildifier: disable=load-on-top +load( + "@rules_rust//cargo:cargo_build_script.bzl", + "cargo_build_script", +) + +cargo_build_script( + name = "semver_build_script", + srcs = glob(["**/*.rs"]), + build_script_env = { + }, + crate_features = [ + "default", + "std", + ], + crate_root = "build.rs", + data = glob(["**"]), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "manual", + ], + version = "1.0.14", + visibility = ["//visibility:private"], + deps = [ + ], +) + +# Unsupported target "parse" with type "bench" omitted + +rust_library( + name = "semver", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=semver", + "manual", + ], + version = "1.0.14", + # buildifier: leave-alone + deps = [ + ":semver_build_script", + ], +) + +# Unsupported target "test_autotrait" with type "test" omitted + +# Unsupported target "test_identifier" with type "test" omitted + +# Unsupported target "test_version" with type "test" omitted + +# Unsupported target "test_version_req" with type "test" omitted diff --git a/third_party/flatbuffers/.github/labeler.yml b/third_party/flatbuffers/.github/labeler.yml index eb1d7fdf80..dcab0447e8 100644 --- a/third_party/flatbuffers/.github/labeler.yml +++ b/third_party/flatbuffers/.github/labeler.yml @@ -18,6 +18,12 @@ swift: - tests/swift/** - src/idl_gen_swift.cpp +nim: + - '**/*.nim' + - nim/**/* + - src/idl_gen_nim.cpp + - src/bfbs_gen_nim.cpp + javascript: - '**/*.js' - src/idl_gen_ts.cpp @@ -61,7 +67,7 @@ rust: - '**/*.rs' - rust/**/* - src/idl_gen_rust.cpp - + dart: - '**/*.dart' - src/idl_gen_dart.cpp @@ -88,4 +94,4 @@ CI: grpc: - grpc/**/* - - src/idl_gen_grpc.cpp \ No newline at end of file + - src/idl_gen_grpc.cpp diff --git a/third_party/flatbuffers/.github/workflows/build.yml b/third_party/flatbuffers/.github/workflows/build.yml index cb4e1f39b4..925c3a46d2 100644 --- a/third_party/flatbuffers/.github/workflows/build.yml +++ b/third_party/flatbuffers/.github/workflows/build.yml @@ -367,7 +367,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 + - uses: gradle/wrapper-validation-action@v1.0.5 - uses: actions/setup-java@v2 with: distribution: 'adopt-hotspot' @@ -386,11 +386,11 @@ jobs: with: distribution: 'adopt-hotspot' java-version: '11' - - uses: gradle/wrapper-validation-action@v1 + - uses: gradle/wrapper-validation-action@v1.0.5 - name: Build working-directory: kotlin # we are using docker's version of gradle - # so no need for wrapper validadation or user + # so no need for wrapper validation or user # gradlew run: gradle jvmMainClasses jvmTest jsTest jsBrowserTest @@ -477,6 +477,22 @@ jobs: working-directory: tests run: bash DartTest.sh + build-nim: + name: Build Nim + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: flatc + # FIXME: make test script not rely on flatc + run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j + - uses: jiro4989/setup-nim-action@v1 + - name: install library + working-directory: nim + run: nimble -y develop + - name: test + working-directory: tests/nim + run: python3 testnim.py + release-digests: if: startsWith(github.ref, 'refs/tags/') needs: [build-linux, build-windows, build-mac-intel, build-mac-universal] diff --git a/third_party/flatbuffers/.github/workflows/release.yml b/third_party/flatbuffers/.github/workflows/release.yml new file mode 100644 index 0000000000..da4ac01e88 --- /dev/null +++ b/third_party/flatbuffers/.github/workflows/release.yml @@ -0,0 +1,106 @@ +name: Release +permissions: read-all + +on: + # For manual tests. + workflow_dispatch: + release: + types: [created] + +jobs: + publish-npm: + name: Publish NPM + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + publish-pypi: + name: Publish PyPi + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./python + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install setuptools wheel twine + + - name: Build + run: | + python3 setup.py sdist bdist_wheel + + - name: Upload to PyPi + run: | + python3 -m twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} + + publish-nuget: + name: Publish NuGet + runs-on: windows-latest + defaults: + run: + working-directory: ./net/flatbuffers + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + + - name: Build + run: | + dotnet build Google.FlatBuffers.csproj -c Release + + - name: Pack + run: | + dotnet pack Google.FlatBuffers.csproj -c Release + + - name: Upload to NuGet + run: | + dotnet nuget push .\bin\Release\Google.FlatBuffers.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + + publish-maven: + name: Publish Maven + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./java + steps: + - uses: actions/checkout@v3 + + - name: Set up Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + cache: 'maven' + server-id: ossrh + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE # this needs to be an env var + + - name: Publish Maven + run: mvn --batch-mode clean deploy + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + + diff --git a/third_party/flatbuffers/.gitignore b/third_party/flatbuffers/.gitignore index 08daee191a..8c7baf8765 100644 --- a/third_party/flatbuffers/.gitignore +++ b/third_party/flatbuffers/.gitignore @@ -149,4 +149,4 @@ flatbuffers.pc **/html/** **/latex/** # https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_BASE_DIR -_deps/ +_deps/ \ No newline at end of file diff --git a/third_party/flatbuffers/CHANGELOG.md b/third_party/flatbuffers/CHANGELOG.md index b4c32d4f49..05c153095c 100644 --- a/third_party/flatbuffers/CHANGELOG.md +++ b/third_party/flatbuffers/CHANGELOG.md @@ -4,33 +4,63 @@ All major or breaking changes will be documented in this file, as well as any new features that should be highlighted. Minor fixes or improvements are not necessarily listed. +## 22.10.25 (Oct 25 2002) + +* Added Nim language support with generator and runtime libraries (#7534). + +## 22.9.29 (Sept 29 2022) + +* Rust soundness fixes to avoid the crate from bing labelled unsafe (#7518). + +## 22.9.24 (Sept 24 2022) + +* 20 Major releases in a row? Nope, we switched to a new + [versioning scheme](https://github.com/google/flatbuffers/wiki/Versioning) + that is based on date. + +* Python supports fixed size arrays now (#7529). + +* Behavior change in how C++ object API uses `UnPackTo`. The original intent of + this was to reduce allocations by reusing an existing object to pack data + into. At some point, this logic started to merge the states of the two objects + instead of clearing the state of the packee. This change goes back to the + original intention, the packed object is cleared when getting data packed into + it (#7527). + +* Fixed a bug in C++ alignment that was using `sizeof()` instead of the intended + `AlignOf()` for structs (#7520). + +* C# has an + [official Nuget package](https://www.nuget.org/packages/Google.FlatBuffers) + now (#7496). + ## 2.0.8 (Aug 29 2022) * Fix for `--keep-prefix` the was generating the wrong include statements for -C++ (#7469). The bug was introduced in 2.0.7. + C++ (#7469). The bug was introduced in 2.0.7. * Added the `Verifier::Options` option struct to allow specifying runtime -configuration settings for the verifier (#7489). This allows to skip verifying -nested flatbuffers, a on-by-default change that was introduced in 2.0.7. This -deprecates the existing `Verifier` constructor, which may be removed in a future -version. + configuration settings for the verifier (#7489). This allows to skip verifying + nested flatbuffers, a on-by-default change that was introduced in 2.0.7. This + deprecates the existing `Verifier` constructor, which may be removed in a + future version. * Refactor of `tests/test.cpp` that lead to ~10% speedup in compilation of the -entire project (#7487). + entire project (#7487). ## 2.0.7 (Aug 22 2022) * This is the first version with an explicit change log, so all the previous -features will not be listed. + features will not be listed. * Verifier now checks that buffers are at least the minimum size required to be -a flatbuffers (12 bytes). This includes nested flatbuffers, which previously -could be declared valid at size 0. + a flatbuffers (12 bytes). This includes nested flatbuffers, which previously + could be declared valid at size 0. * Annotated binaries. Given a flatbuffer binary and a schema (or binary schema) -one can generate an annotated flatbuffer (.afb) to describe each byte in the -binary with schema metadata and value. + one can generate an annotated flatbuffer (.afb) to describe each byte in the + binary with schema metadata and value. -* First binary schema generator (Lua) to generate Lua code via a .bfbs file. -This is mostly an implementation detail of flatc internals, but will be slowly -applied to the other language generators. \ No newline at end of file +* First binary schema generator (Lua) to generate Lua code via a .bfbs file. + This is mostly an implementation detail of flatc internals, but will be slowly + applied to the other language generators. \ No newline at end of file diff --git a/third_party/flatbuffers/CMake/Version.cmake b/third_party/flatbuffers/CMake/Version.cmake index e6f4b4c8fc..a713f3413b 100644 --- a/third_party/flatbuffers/CMake/Version.cmake +++ b/third_party/flatbuffers/CMake/Version.cmake @@ -1,6 +1,6 @@ -set(VERSION_MAJOR 2) -set(VERSION_MINOR 0) -set(VERSION_PATCH 8) +set(VERSION_MAJOR 22) +set(VERSION_MINOR 10) +set(VERSION_PATCH 26) set(VERSION_COMMIT 0) find_program(GIT git) diff --git a/third_party/flatbuffers/CMakeLists.txt b/third_party/flatbuffers/CMakeLists.txt index f5ae5ac81c..395ac59e7c 100644 --- a/third_party/flatbuffers/CMakeLists.txt +++ b/third_party/flatbuffers/CMakeLists.txt @@ -125,6 +125,13 @@ if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT) endif() add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$) +if(NOT WIN32) + check_symbol_exists(realpath "stdlib.h" HAVE_REALPATH) + if(NOT HAVE_REALPATH) + add_definitions(-DFLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION) + endif() +endif() + set(FlatBuffers_Library_SRCS include/flatbuffers/allocator.h include/flatbuffers/array.h @@ -182,6 +189,7 @@ set(FlatBuffers_Compiler_SRCS src/flatc_main.cpp src/bfbs_gen.h src/bfbs_gen_lua.h + src/bfbs_gen_nim.h src/bfbs_namer.h include/flatbuffers/code_generators.h src/binary_annotator.h @@ -189,6 +197,7 @@ set(FlatBuffers_Compiler_SRCS src/annotated_binary_text_gen.h src/annotated_binary_text_gen.cpp src/bfbs_gen_lua.cpp + src/bfbs_gen_nim.cpp src/code_generators.cpp grpc/src/compiler/schema_interface.h grpc/src/compiler/cpp_generator.h @@ -230,6 +239,8 @@ set(FlatBuffers_Tests_SRCS tests/util_test.cpp tests/native_type_test_impl.h tests/native_type_test_impl.cpp + tests/alignment_test.h + tests/alignment_test.cpp include/flatbuffers/code_generators.h src/code_generators.cpp # file generate by running compiler on tests/monster_test.fbs @@ -251,6 +262,8 @@ set(FlatBuffers_Tests_SRCS ${CMAKE_CURRENT_BINARY_DIR}/tests/optional_scalars_generated.h # file generate by running compiler on tests/native_inline_table_test.fbs ${CMAKE_CURRENT_BINARY_DIR}/tests/native_inline_table_test_generated.h + # file generate by running compiler on tests/alignment_test.fbs + ${CMAKE_CURRENT_BINARY_DIR}/tests/alignment_test_generated.h ) set(FlatBuffers_Tests_CPP17_SRCS @@ -623,6 +636,7 @@ if(FLATBUFFERS_BUILD_TESTS) compile_flatbuffers_schema_to_binary(tests/arrays_test.fbs) compile_flatbuffers_schema_to_embedded_binary(tests/monster_test.fbs "--no-includes;--gen-compare") compile_flatbuffers_schema_to_cpp(tests/native_inline_table_test.fbs "--gen-compare") + compile_flatbuffers_schema_to_cpp(tests/alignment_test.fbs "--gen-compare") if(NOT (MSVC AND (MSVC_VERSION LESS 1900))) compile_flatbuffers_schema_to_cpp(tests/monster_extra.fbs) # Test floating-point NAN/INF. endif() diff --git a/third_party/flatbuffers/swift/FlatBuffers.podspec b/third_party/flatbuffers/FlatBuffers.podspec similarity index 76% rename from third_party/flatbuffers/swift/FlatBuffers.podspec rename to third_party/flatbuffers/FlatBuffers.podspec index c26d1a2f88..2a39138fee 100644 --- a/third_party/flatbuffers/swift/FlatBuffers.podspec +++ b/third_party/flatbuffers/FlatBuffers.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FlatBuffers' - s.version = '2.0.8' + s.version = '22.10.26' s.summary = 'FlatBuffers: Memory Efficient Serialization Library' s.description = "FlatBuffers is a cross platform serialization library architected for @@ -11,11 +11,11 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/google/flatbuffers' s.license = { :type => 'Apache2.0', :file => 'LICENSE' } s.author = { 'mustii' => 'mustii@mmk.one' } - s.source = { :git => 'https://github.com/mustiikhalil/flatbuffers.git', :tag => s.version.to_s, :submodules => true } + s.source = { :git => 'https://github.com/google/flatbuffers.git', :tag => s.version.to_s, :submodules => true } s.ios.deployment_target = '11.0' s.osx.deployment_target = '10.14' s.swift_version = '5.0' - s.source_files = 'Sources/Flatbuffers/*.swift' + s.source_files = 'swift/Sources/Flatbuffers/*.swift' end diff --git a/third_party/flatbuffers/swift/Package.swift b/third_party/flatbuffers/Package.swift similarity index 97% rename from third_party/flatbuffers/swift/Package.swift rename to third_party/flatbuffers/Package.swift index d2d2d5c6f0..982277a921 100644 --- a/third_party/flatbuffers/swift/Package.swift +++ b/third_party/flatbuffers/Package.swift @@ -32,5 +32,6 @@ let package = Package( .target( name: "FlatBuffers", dependencies: [], + path: "swift/Sources", exclude: ["Documentation.docc/Resources/code/swift"]), ]) diff --git a/third_party/flatbuffers/swift/Package@swift-5.5.swift b/third_party/flatbuffers/Package@swift-5.5.swift similarity index 94% rename from third_party/flatbuffers/swift/Package@swift-5.5.swift rename to third_party/flatbuffers/Package@swift-5.5.swift index 3cfdcf6024..3c2e13092a 100644 --- a/third_party/flatbuffers/swift/Package@swift-5.5.swift +++ b/third_party/flatbuffers/Package@swift-5.5.swift @@ -31,6 +31,7 @@ let package = Package( targets: [ .target( name: "FlatBuffers", - dependencies: []), + dependencies: [], + path: "swift/Sources") ]) diff --git a/third_party/flatbuffers/WORKSPACE b/third_party/flatbuffers/WORKSPACE index b707857240..5b364e0989 100644 --- a/third_party/flatbuffers/WORKSPACE +++ b/third_party/flatbuffers/WORKSPACE @@ -56,10 +56,13 @@ http_archive( ) ##### GRPC -_GRPC_VERSION = "1.48.0" # https://github.com/grpc/grpc/releases/tag/v1.48.0 +_GRPC_VERSION = "1.49.0" # https://github.com/grpc/grpc/releases/tag/v1.48.0 http_archive( name = "com_github_grpc_grpc", + patch_args = ["-p1"], + patches = ["//grpc:build_grpc_with_cxx14.patch"], + sha256 = "15715e1847cc9e42014f02c727dbcb48e39dbdb90f79ad3d66fe4361709ff935", strip_prefix = "grpc-" + _GRPC_VERSION, urls = ["https://github.com/grpc/grpc/archive/refs/tags/v" + _GRPC_VERSION + ".tar.gz"], ) diff --git a/third_party/flatbuffers/android/app/src/main/java/generated/com/fbs/app/Animal.kt b/third_party/flatbuffers/android/app/src/main/java/generated/com/fbs/app/Animal.kt index f647fef678..6ecac60409 100644 --- a/third_party/flatbuffers/android/app/src/main/java/generated/com/fbs/app/Animal.kt +++ b/third_party/flatbuffers/android/app/src/main/java/generated/com/fbs/app/Animal.kt @@ -36,7 +36,7 @@ class Animal : Table() { return if(o != 0) bb.getShort(o + bb_pos).toUShort() else 0u } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsAnimal(_bb: ByteBuffer): Animal = getRootAsAnimal(_bb, Animal()) fun getRootAsAnimal(_bb: ByteBuffer, obj: Animal): Animal { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/dart/pubspec.yaml b/third_party/flatbuffers/dart/pubspec.yaml index a19bf6f31a..2bd448d2fc 100644 --- a/third_party/flatbuffers/dart/pubspec.yaml +++ b/third_party/flatbuffers/dart/pubspec.yaml @@ -1,5 +1,5 @@ name: flat_buffers -version: 2.0.8 +version: 22.10.26 description: FlatBuffers reading and writing library for Dart. Based on original work by Konstantin Scheglov and Paul Berry of the Dart SDK team. homepage: https://github.com/google/flatbuffers documentation: https://google.github.io/flatbuffers/index.html diff --git a/third_party/flatbuffers/dart/test/bool_structs_generated.dart b/third_party/flatbuffers/dart/test/bool_structs_generated.dart new file mode 100644 index 0000000000..cdd8a5ebce --- /dev/null +++ b/third_party/flatbuffers/dart/test/bool_structs_generated.dart @@ -0,0 +1,207 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable + +import 'dart:typed_data' show Uint8List; +import 'package:flat_buffers/flat_buffers.dart' as fb; + + +class Foo { + Foo._(this._bc, this._bcOffset); + factory Foo(List bytes) { + final rootRef = fb.BufferContext.fromBytes(bytes); + return reader.read(rootRef, 0); + } + + static const fb.Reader reader = _FooReader(); + + final fb.BufferContext _bc; + final int _bcOffset; + + FooProperties? get myFoo => FooProperties.reader.vTableGetNullable(_bc, _bcOffset, 4); + + @override + String toString() { + return 'Foo{myFoo: ${myFoo}}'; + } + + FooT unpack() => FooT( + myFoo: myFoo?.unpack()); + + static int pack(fb.Builder fbBuilder, FooT? object) { + if (object == null) return 0; + return object.pack(fbBuilder); + } +} + +class FooT implements fb.Packable { + FooPropertiesT? myFoo; + + FooT({ + this.myFoo}); + + @override + int pack(fb.Builder fbBuilder) { + fbBuilder.startTable(1); + if (myFoo != null) { + fbBuilder.addStruct(0, myFoo!.pack(fbBuilder)); + } + return fbBuilder.endTable(); + } + + @override + String toString() { + return 'FooT{myFoo: ${myFoo}}'; + } +} + +class _FooReader extends fb.TableReader { + const _FooReader(); + + @override + Foo createObject(fb.BufferContext bc, int offset) => + Foo._(bc, offset); +} + +class FooBuilder { + FooBuilder(this.fbBuilder); + + final fb.Builder fbBuilder; + + void begin() { + fbBuilder.startTable(1); + } + + int addMyFoo(int offset) { + fbBuilder.addStruct(0, offset); + return fbBuilder.offset; + } + + int finish() { + return fbBuilder.endTable(); + } +} + +class FooObjectBuilder extends fb.ObjectBuilder { + final FooPropertiesObjectBuilder? _myFoo; + + FooObjectBuilder({ + FooPropertiesObjectBuilder? myFoo, + }) + : _myFoo = myFoo; + + /// Finish building, and store into the [fbBuilder]. + @override + int finish(fb.Builder fbBuilder) { + fbBuilder.startTable(1); + if (_myFoo != null) { + fbBuilder.addStruct(0, _myFoo!.finish(fbBuilder)); + } + return fbBuilder.endTable(); + } + + /// Convenience method to serialize to byte list. + @override + Uint8List toBytes([String? fileIdentifier]) { + final fbBuilder = fb.Builder(deduplicateTables: false); + fbBuilder.finish(finish(fbBuilder), fileIdentifier); + return fbBuilder.buffer; + } +} +class FooProperties { + FooProperties._(this._bc, this._bcOffset); + + static const fb.Reader reader = _FooPropertiesReader(); + + final fb.BufferContext _bc; + final int _bcOffset; + + bool get a => const fb.BoolReader().read(_bc, _bcOffset + 0); + bool get b => const fb.BoolReader().read(_bc, _bcOffset + 1); + + @override + String toString() { + return 'FooProperties{a: ${a}, b: ${b}}'; + } + + FooPropertiesT unpack() => FooPropertiesT( + a: a, + b: b); + + static int pack(fb.Builder fbBuilder, FooPropertiesT? object) { + if (object == null) return 0; + return object.pack(fbBuilder); + } +} + +class FooPropertiesT implements fb.Packable { + bool a; + bool b; + + FooPropertiesT({ + required this.a, + required this.b}); + + @override + int pack(fb.Builder fbBuilder) { + fbBuilder.putBool(b); + fbBuilder.putBool(a); + return fbBuilder.offset; + } + + @override + String toString() { + return 'FooPropertiesT{a: ${a}, b: ${b}}'; + } +} + +class _FooPropertiesReader extends fb.StructReader { + const _FooPropertiesReader(); + + @override + int get size => 2; + + @override + FooProperties createObject(fb.BufferContext bc, int offset) => + FooProperties._(bc, offset); +} + +class FooPropertiesBuilder { + FooPropertiesBuilder(this.fbBuilder); + + final fb.Builder fbBuilder; + + int finish(bool a, bool b) { + fbBuilder.putBool(b); + fbBuilder.putBool(a); + return fbBuilder.offset; + } + +} + +class FooPropertiesObjectBuilder extends fb.ObjectBuilder { + final bool _a; + final bool _b; + + FooPropertiesObjectBuilder({ + required bool a, + required bool b, + }) + : _a = a, + _b = b; + + /// Finish building, and store into the [fbBuilder]. + @override + int finish(fb.Builder fbBuilder) { + fbBuilder.putBool(_b); + fbBuilder.putBool(_a); + return fbBuilder.offset; + } + + /// Convenience method to serialize to byte list. + @override + Uint8List toBytes([String? fileIdentifier]) { + final fbBuilder = fb.Builder(deduplicateTables: false); + fbBuilder.finish(finish(fbBuilder), fileIdentifier); + return fbBuilder.buffer; + } +} diff --git a/third_party/flatbuffers/dart/test/flat_buffers_test.dart b/third_party/flatbuffers/dart/test/flat_buffers_test.dart index 5298b17088..000ccff68c 100644 --- a/third_party/flatbuffers/dart/test/flat_buffers_test.dart +++ b/third_party/flatbuffers/dart/test/flat_buffers_test.dart @@ -87,7 +87,10 @@ class CheckOtherLangaugesData { 'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, ' 'nativeInline: null, ' 'longEnumNonEnumDefault: LongEnum{value: 0}, ' - 'longEnumNormalDefault: LongEnum{value: 2}}, ' + 'longEnumNormalDefault: LongEnum{value: 2}, nanDefault: NaN, ' + 'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: ' + 'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: ' + '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, ' 'test4: [Test{a: 10, b: 20}, Test{a: 30, b: 40}], ' 'testarrayofstring: [test1, test2], testarrayoftables: null, ' 'enemy: Monster{pos: null, mana: 150, hp: 100, name: Fred, ' @@ -110,7 +113,10 @@ class CheckOtherLangaugesData { 'testrequirednestedflatbuffer: null, scalarKeySortedTables: null, ' 'nativeInline: null, ' 'longEnumNonEnumDefault: LongEnum{value: 0}, ' - 'longEnumNormalDefault: LongEnum{value: 2}}, ' + 'longEnumNormalDefault: LongEnum{value: 2}, nanDefault: NaN, ' + 'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: ' + 'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: ' + '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}, ' 'testnestedflatbuffer: null, testempty: null, testbool: true, ' 'testhashs32Fnv1: -579221183, testhashu32Fnv1: 3715746113, ' 'testhashs64Fnv1: 7930699090847568257, ' @@ -137,7 +143,10 @@ class CheckOtherLangaugesData { 'miss, val: 0, count: 0}, Stat{id: hit, val: 10, count: 1}], ' 'nativeInline: Test{a: 1, b: 2}, ' 'longEnumNonEnumDefault: LongEnum{value: 0}, ' - 'longEnumNormalDefault: LongEnum{value: 2}}', + 'longEnumNormalDefault: LongEnum{value: 2}, nanDefault: NaN, ' + 'infDefault: Infinity, positiveInfDefault: Infinity, infinityDefault: ' + 'Infinity, positiveInfinityDefault: Infinity, negativeInfDefault: ' + '-Infinity, negativeInfinityDefault: -Infinity, doubleInfDefault: Infinity}' ); } } diff --git a/third_party/flatbuffers/dart/test/list_of_enums_generated.dart b/third_party/flatbuffers/dart/test/list_of_enums_generated.dart new file mode 100644 index 0000000000..eb837a5bc3 --- /dev/null +++ b/third_party/flatbuffers/dart/test/list_of_enums_generated.dart @@ -0,0 +1,155 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable + +import 'dart:typed_data' show Uint8List; +import 'package:flat_buffers/flat_buffers.dart' as fb; + + +class OptionsEnum { + final int value; + const OptionsEnum._(this.value); + + factory OptionsEnum.fromValue(int value) { + final result = values[value]; + if (result == null) { + throw StateError('Invalid value $value for bit flag enum OptionsEnum'); + } + return result; + } + + static OptionsEnum? _createOrNull(int? value) => + value == null ? null : OptionsEnum.fromValue(value); + + static const int minValue = 1; + static const int maxValue = 3; + static bool containsValue(int value) => values.containsKey(value); + + static const OptionsEnum A = OptionsEnum._(1); + static const OptionsEnum B = OptionsEnum._(2); + static const OptionsEnum C = OptionsEnum._(3); + static const Map values = { + 1: A, + 2: B, + 3: C}; + + static const fb.Reader reader = _OptionsEnumReader(); + + @override + String toString() { + return 'OptionsEnum{value: $value}'; + } +} + +class _OptionsEnumReader extends fb.Reader { + const _OptionsEnumReader(); + + @override + int get size => 4; + + @override + OptionsEnum read(fb.BufferContext bc, int offset) => + OptionsEnum.fromValue(const fb.Uint32Reader().read(bc, offset)); +} + +class MyTable { + MyTable._(this._bc, this._bcOffset); + factory MyTable(List bytes) { + final rootRef = fb.BufferContext.fromBytes(bytes); + return reader.read(rootRef, 0); + } + + static const fb.Reader reader = _MyTableReader(); + + final fb.BufferContext _bc; + final int _bcOffset; + + List? get options => const fb.ListReader(OptionsEnum.reader).vTableGetNullable(_bc, _bcOffset, 4); + + @override + String toString() { + return 'MyTable{options: ${options}}'; + } + + MyTableT unpack() => MyTableT( + options: const fb.ListReader(OptionsEnum.reader, lazy: false).vTableGetNullable(_bc, _bcOffset, 4)); + + static int pack(fb.Builder fbBuilder, MyTableT? object) { + if (object == null) return 0; + return object.pack(fbBuilder); + } +} + +class MyTableT implements fb.Packable { + List? options; + + MyTableT({ + this.options}); + + @override + int pack(fb.Builder fbBuilder) { + final int? optionsOffset = options == null ? null + : fbBuilder.writeListUint32(options!.map((f) => f.value).toList()); + fbBuilder.startTable(1); + fbBuilder.addOffset(0, optionsOffset); + return fbBuilder.endTable(); + } + + @override + String toString() { + return 'MyTableT{options: ${options}}'; + } +} + +class _MyTableReader extends fb.TableReader { + const _MyTableReader(); + + @override + MyTable createObject(fb.BufferContext bc, int offset) => + MyTable._(bc, offset); +} + +class MyTableBuilder { + MyTableBuilder(this.fbBuilder); + + final fb.Builder fbBuilder; + + void begin() { + fbBuilder.startTable(1); + } + + int addOptionsOffset(int? offset) { + fbBuilder.addOffset(0, offset); + return fbBuilder.offset; + } + + int finish() { + return fbBuilder.endTable(); + } +} + +class MyTableObjectBuilder extends fb.ObjectBuilder { + final List? _options; + + MyTableObjectBuilder({ + List? options, + }) + : _options = options; + + /// Finish building, and store into the [fbBuilder]. + @override + int finish(fb.Builder fbBuilder) { + final int? optionsOffset = _options == null ? null + : fbBuilder.writeListUint32(_options!.map((f) => f.value).toList()); + fbBuilder.startTable(1); + fbBuilder.addOffset(0, optionsOffset); + return fbBuilder.endTable(); + } + + /// Convenience method to serialize to byte list. + @override + Uint8List toBytes([String? fileIdentifier]) { + final fbBuilder = fb.Builder(deduplicateTables: false); + fbBuilder.finish(finish(fbBuilder), fileIdentifier); + return fbBuilder.buffer; + } +} diff --git a/third_party/flatbuffers/dart/test/monster_test.fbs b/third_party/flatbuffers/dart/test/monster_test.fbs index fdd5acfcc3..14d34cb4ab 100644 --- a/third_party/flatbuffers/dart/test/monster_test.fbs +++ b/third_party/flatbuffers/dart/test/monster_test.fbs @@ -31,6 +31,14 @@ enum Race:byte { Elf, } +enum LongEnum:ulong (bit_flags) { + LongOne = 1, + LongTwo = 2, + // Because this is a bitflag, 40 will be out of range of a 32-bit integer, + // allowing us to exercise any logic special to big numbers. + LongBig = 40, +} + union Any { Monster, TestSimpleTableWithEnum, MyGame.Example2.Monster } union AnyUniqueAliases { M: Monster, TS: TestSimpleTableWithEnum, M2: MyGame.Example2.Monster } @@ -62,6 +70,10 @@ struct StructOfStructs { c: Ability; } +struct StructOfStructsOfStructs { + a: StructOfStructs; +} + table Stat { id:string; val:long; @@ -124,6 +136,11 @@ table Monster { signed_enum:Race = None (id:48); testrequirednestedflatbuffer:[ubyte] (id:49, nested_flatbuffer: "Monster"); scalar_key_sorted_tables:[Stat] (id: 50); + native_inline:Test (id: 51, native_inline); + // The default value of this enum will be a numeric zero, which isn't a valid + // enum value. + long_enum_non_enum_default:LongEnum (id: 52); + long_enum_normal_default:LongEnum = LongOne (id: 53); } table TypeAliases { diff --git a/third_party/flatbuffers/dart/test/monster_test_my_game.example_generated.dart b/third_party/flatbuffers/dart/test/monster_test_my_game.example_generated.dart index 8db82e31fb..174fe1d8dd 100644 --- a/third_party/flatbuffers/dart/test/monster_test_my_game.example_generated.dart +++ b/third_party/flatbuffers/dart/test/monster_test_my_game.example_generated.dart @@ -17,7 +17,11 @@ class Color { factory Color.fromValue(int value) { final result = values[value]; if (result == null) { - throw StateError('Invalid value $value for bit flag enum Color'); + if (value == 0) { + return Color._(0); + } else { + throw StateError('Invalid value $value for bit flag enum Color'); + } } return result; } @@ -66,7 +70,7 @@ class Race { factory Race.fromValue(int value) { final result = values[value]; if (result == null) { - throw StateError('Invalid value $value for bit flag enum Race'); + throw StateError('Invalid value $value for bit flag enum Race'); } return result; } @@ -107,6 +111,54 @@ class _RaceReader extends fb.Reader { Race.fromValue(const fb.Int8Reader().read(bc, offset)); } +class LongEnum { + final int value; + const LongEnum._(this.value); + + factory LongEnum.fromValue(int value) { + final result = values[value]; + if (result == null) { + if (value == 0) { + return LongEnum._(0); + } else { + throw StateError('Invalid value $value for bit flag enum LongEnum'); + } + } + return result; + } + + static LongEnum? _createOrNull(int? value) => + value == null ? null : LongEnum.fromValue(value); + + static bool containsValue(int value) => values.containsKey(value); + + static const LongEnum LongOne = LongEnum._(2); + static const LongEnum LongTwo = LongEnum._(4); + static const LongEnum LongBig = LongEnum._(1099511627776); + static const Map values = { + 2: LongOne, + 4: LongTwo, + 1099511627776: LongBig}; + + static const fb.Reader reader = _LongEnumReader(); + + @override + String toString() { + return 'LongEnum{value: $value}'; + } +} + +class _LongEnumReader extends fb.Reader { + const _LongEnumReader(); + + @override + int get size => 8; + + @override + LongEnum read(fb.BufferContext bc, int offset) => + LongEnum.fromValue(const fb.Uint64Reader().read(bc, offset)); +} + class AnyTypeId { final int value; const AnyTypeId._(this.value); @@ -114,7 +166,7 @@ class AnyTypeId { factory AnyTypeId.fromValue(int value) { final result = values[value]; if (result == null) { - throw StateError('Invalid value $value for bit flag enum AnyTypeId'); + throw StateError('Invalid value $value for bit flag enum AnyTypeId'); } return result; } @@ -162,7 +214,7 @@ class AnyUniqueAliasesTypeId { factory AnyUniqueAliasesTypeId.fromValue(int value) { final result = values[value]; if (result == null) { - throw StateError('Invalid value $value for bit flag enum AnyUniqueAliasesTypeId'); + throw StateError('Invalid value $value for bit flag enum AnyUniqueAliasesTypeId'); } return result; } @@ -210,7 +262,7 @@ class AnyAmbiguousAliasesTypeId { factory AnyAmbiguousAliasesTypeId.fromValue(int value) { final result = values[value]; if (result == null) { - throw StateError('Invalid value $value for bit flag enum AnyAmbiguousAliasesTypeId'); + throw StateError('Invalid value $value for bit flag enum AnyAmbiguousAliasesTypeId'); } return result; } @@ -264,7 +316,7 @@ class Test { @override String toString() { - return 'Test{a: $a, b: $b}'; + return 'Test{a: ${a}, b: ${b}}'; } TestT unpack() => TestT( @@ -295,7 +347,7 @@ class TestT implements fb.Packable { @override String toString() { - return 'TestT{a: $a, b: $b}'; + return 'TestT{a: ${a}, b: ${b}}'; } } @@ -368,7 +420,7 @@ class TestSimpleTableWithEnum { @override String toString() { - return 'TestSimpleTableWithEnum{color: $color}'; + return 'TestSimpleTableWithEnum{color: ${color}}'; } TestSimpleTableWithEnumT unpack() => TestSimpleTableWithEnumT( @@ -395,7 +447,7 @@ class TestSimpleTableWithEnumT implements fb.Packable { @override String toString() { - return 'TestSimpleTableWithEnumT{color: $color}'; + return 'TestSimpleTableWithEnumT{color: ${color}}'; } } @@ -467,7 +519,7 @@ class Vec3 { @override String toString() { - return 'Vec3{x: $x, y: $y, z: $z, test1: $test1, test2: $test2, test3: $test3}'; + return 'Vec3{x: ${x}, y: ${y}, z: ${z}, test1: ${test1}, test2: ${test2}, test3: ${test3}}'; } Vec3T unpack() => Vec3T( @@ -516,7 +568,7 @@ class Vec3T implements fb.Packable { @override String toString() { - return 'Vec3T{x: $x, y: $y, z: $z, test1: $test1, test2: $test2, test3: $test3}'; + return 'Vec3T{x: ${x}, y: ${y}, z: ${z}, test1: ${test1}, test2: ${test2}, test3: ${test3}}'; } } @@ -610,7 +662,7 @@ class Ability { @override String toString() { - return 'Ability{id: $id, distance: $distance}'; + return 'Ability{id: ${id}, distance: ${distance}}'; } AbilityT unpack() => AbilityT( @@ -640,7 +692,7 @@ class AbilityT implements fb.Packable { @override String toString() { - return 'AbilityT{id: $id, distance: $distance}'; + return 'AbilityT{id: ${id}, distance: ${distance}}'; } } @@ -709,7 +761,7 @@ class StructOfStructs { @override String toString() { - return 'StructOfStructs{a: $a, b: $b, c: $c}'; + return 'StructOfStructs{a: ${a}, b: ${b}, c: ${c}}'; } StructOfStructsT unpack() => StructOfStructsT( @@ -743,7 +795,7 @@ class StructOfStructsT implements fb.Packable { @override String toString() { - return 'StructOfStructsT{a: $a, b: $b, c: $c}'; + return 'StructOfStructsT{a: ${a}, b: ${b}, c: ${c}}'; } } @@ -803,6 +855,94 @@ class StructOfStructsObjectBuilder extends fb.ObjectBuilder { return fbBuilder.buffer; } } +class StructOfStructsOfStructs { + StructOfStructsOfStructs._(this._bc, this._bcOffset); + + static const fb.Reader reader = _StructOfStructsOfStructsReader(); + + final fb.BufferContext _bc; + final int _bcOffset; + + StructOfStructs get a => StructOfStructs.reader.read(_bc, _bcOffset + 0); + + @override + String toString() { + return 'StructOfStructsOfStructs{a: ${a}}'; + } + + StructOfStructsOfStructsT unpack() => StructOfStructsOfStructsT( + a: a.unpack()); + + static int pack(fb.Builder fbBuilder, StructOfStructsOfStructsT? object) { + if (object == null) return 0; + return object.pack(fbBuilder); + } +} + +class StructOfStructsOfStructsT implements fb.Packable { + StructOfStructsT a; + + StructOfStructsOfStructsT({ + required this.a}); + + @override + int pack(fb.Builder fbBuilder) { + a.pack(fbBuilder); + return fbBuilder.offset; + } + + @override + String toString() { + return 'StructOfStructsOfStructsT{a: ${a}}'; + } +} + +class _StructOfStructsOfStructsReader extends fb.StructReader { + const _StructOfStructsOfStructsReader(); + + @override + int get size => 20; + + @override + StructOfStructsOfStructs createObject(fb.BufferContext bc, int offset) => + StructOfStructsOfStructs._(bc, offset); +} + +class StructOfStructsOfStructsBuilder { + StructOfStructsOfStructsBuilder(this.fbBuilder); + + final fb.Builder fbBuilder; + + int finish(fb.StructBuilder a) { + a(); + return fbBuilder.offset; + } + +} + +class StructOfStructsOfStructsObjectBuilder extends fb.ObjectBuilder { + final StructOfStructsObjectBuilder _a; + + StructOfStructsOfStructsObjectBuilder({ + required StructOfStructsObjectBuilder a, + }) + : _a = a; + + /// Finish building, and store into the [fbBuilder]. + @override + int finish(fb.Builder fbBuilder) { + _a.finish(fbBuilder); + return fbBuilder.offset; + } + + /// Convenience method to serialize to byte list. + @override + Uint8List toBytes([String? fileIdentifier]) { + final fbBuilder = fb.Builder(deduplicateTables: false); + fbBuilder.finish(finish(fbBuilder), fileIdentifier); + return fbBuilder.buffer; + } +} class Stat { Stat._(this._bc, this._bcOffset); factory Stat(List bytes) { @@ -821,7 +961,7 @@ class Stat { @override String toString() { - return 'Stat{id: $id, val: $val, count: $count}'; + return 'Stat{id: ${id}, val: ${val}, count: ${count}}'; } StatT unpack() => StatT( @@ -858,7 +998,7 @@ class StatT implements fb.Packable { @override String toString() { - return 'StatT{id: $id, val: $val, count: $count}'; + return 'StatT{id: ${id}, val: ${val}, count: ${count}}'; } } @@ -947,7 +1087,7 @@ class Referrable { @override String toString() { - return 'Referrable{id: $id}'; + return 'Referrable{id: ${id}}'; } ReferrableT unpack() => ReferrableT( @@ -974,7 +1114,7 @@ class ReferrableT implements fb.Packable { @override String toString() { - return 'ReferrableT{id: $id}'; + return 'ReferrableT{id: ${id}}'; } } @@ -1115,10 +1255,13 @@ class Monster { Race get signedEnum => Race.fromValue(const fb.Int8Reader().vTableGet(_bc, _bcOffset, 100, -1)); List? get testrequirednestedflatbuffer => const fb.Uint8ListReader().vTableGetNullable(_bc, _bcOffset, 102); List? get scalarKeySortedTables => const fb.ListReader(Stat.reader).vTableGetNullable(_bc, _bcOffset, 104); + Test? get nativeInline => Test.reader.vTableGetNullable(_bc, _bcOffset, 106); + LongEnum get longEnumNonEnumDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 108, 0)); + LongEnum get longEnumNormalDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 110, 2)); @override String toString() { - return 'Monster{pos: $pos, mana: $mana, hp: $hp, name: $name, inventory: $inventory, color: $color, testType: $testType, test: $test, test4: $test4, testarrayofstring: $testarrayofstring, testarrayoftables: $testarrayoftables, enemy: $enemy, testnestedflatbuffer: $testnestedflatbuffer, testempty: $testempty, testbool: $testbool, testhashs32Fnv1: $testhashs32Fnv1, testhashu32Fnv1: $testhashu32Fnv1, testhashs64Fnv1: $testhashs64Fnv1, testhashu64Fnv1: $testhashu64Fnv1, testhashs32Fnv1a: $testhashs32Fnv1a, testhashu32Fnv1a: $testhashu32Fnv1a, testhashs64Fnv1a: $testhashs64Fnv1a, testhashu64Fnv1a: $testhashu64Fnv1a, testarrayofbools: $testarrayofbools, testf: $testf, testf2: $testf2, testf3: $testf3, testarrayofstring2: $testarrayofstring2, testarrayofsortedstruct: $testarrayofsortedstruct, flex: $flex, test5: $test5, vectorOfLongs: $vectorOfLongs, vectorOfDoubles: $vectorOfDoubles, parentNamespaceTest: $parentNamespaceTest, vectorOfReferrables: $vectorOfReferrables, singleWeakReference: $singleWeakReference, vectorOfWeakReferences: $vectorOfWeakReferences, vectorOfStrongReferrables: $vectorOfStrongReferrables, coOwningReference: $coOwningReference, vectorOfCoOwningReferences: $vectorOfCoOwningReferences, nonOwningReference: $nonOwningReference, vectorOfNonOwningReferences: $vectorOfNonOwningReferences, anyUniqueType: $anyUniqueType, anyUnique: $anyUnique, anyAmbiguousType: $anyAmbiguousType, anyAmbiguous: $anyAmbiguous, vectorOfEnums: $vectorOfEnums, signedEnum: $signedEnum, testrequirednestedflatbuffer: $testrequirednestedflatbuffer, scalarKeySortedTables: $scalarKeySortedTables}'; + return 'Monster{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}'; } MonsterT unpack() => MonsterT( @@ -1171,7 +1314,10 @@ class Monster { vectorOfEnums: const fb.ListReader(Color.reader, lazy: false).vTableGetNullable(_bc, _bcOffset, 98), signedEnum: signedEnum, testrequirednestedflatbuffer: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 102), - scalarKeySortedTables: scalarKeySortedTables?.map((e) => e.unpack()).toList()); + scalarKeySortedTables: scalarKeySortedTables?.map((e) => e.unpack()).toList(), + nativeInline: nativeInline?.unpack(), + longEnumNonEnumDefault: longEnumNonEnumDefault, + longEnumNormalDefault: longEnumNormalDefault); static int pack(fb.Builder fbBuilder, MonsterT? object) { if (object == null) return 0; @@ -1233,6 +1379,9 @@ class MonsterT implements fb.Packable { Race signedEnum; List? testrequirednestedflatbuffer; List? scalarKeySortedTables; + TestT? nativeInline; + LongEnum longEnumNonEnumDefault; + LongEnum longEnumNormalDefault; MonsterT({ this.pos, @@ -1284,7 +1433,10 @@ class MonsterT implements fb.Packable { this.vectorOfEnums, this.signedEnum = Race.None, this.testrequirednestedflatbuffer, - this.scalarKeySortedTables}); + this.scalarKeySortedTables, + this.nativeInline, + this.longEnumNonEnumDefault = const LongEnum._(0), + this.longEnumNormalDefault = LongEnum.LongOne}); @override int pack(fb.Builder fbBuilder) { @@ -1345,7 +1497,7 @@ class MonsterT implements fb.Packable { : fbBuilder.writeListUint8(testrequirednestedflatbuffer!); final int? scalarKeySortedTablesOffset = scalarKeySortedTables == null ? null : fbBuilder.writeList(scalarKeySortedTables!.map((b) => b.pack(fbBuilder)).toList()); - fbBuilder.startTable(50); + fbBuilder.startTable(54); if (pos != null) { fbBuilder.addStruct(0, pos!.pack(fbBuilder)); } @@ -1398,12 +1550,17 @@ class MonsterT implements fb.Packable { fbBuilder.addInt8(48, signedEnum.value); fbBuilder.addOffset(49, testrequirednestedflatbufferOffset); fbBuilder.addOffset(50, scalarKeySortedTablesOffset); + if (nativeInline != null) { + fbBuilder.addStruct(51, nativeInline!.pack(fbBuilder)); + } + fbBuilder.addUint64(52, longEnumNonEnumDefault.value); + fbBuilder.addUint64(53, longEnumNormalDefault.value); return fbBuilder.endTable(); } @override String toString() { - return 'MonsterT{pos: $pos, mana: $mana, hp: $hp, name: $name, inventory: $inventory, color: $color, testType: $testType, test: $test, test4: $test4, testarrayofstring: $testarrayofstring, testarrayoftables: $testarrayoftables, enemy: $enemy, testnestedflatbuffer: $testnestedflatbuffer, testempty: $testempty, testbool: $testbool, testhashs32Fnv1: $testhashs32Fnv1, testhashu32Fnv1: $testhashu32Fnv1, testhashs64Fnv1: $testhashs64Fnv1, testhashu64Fnv1: $testhashu64Fnv1, testhashs32Fnv1a: $testhashs32Fnv1a, testhashu32Fnv1a: $testhashu32Fnv1a, testhashs64Fnv1a: $testhashs64Fnv1a, testhashu64Fnv1a: $testhashu64Fnv1a, testarrayofbools: $testarrayofbools, testf: $testf, testf2: $testf2, testf3: $testf3, testarrayofstring2: $testarrayofstring2, testarrayofsortedstruct: $testarrayofsortedstruct, flex: $flex, test5: $test5, vectorOfLongs: $vectorOfLongs, vectorOfDoubles: $vectorOfDoubles, parentNamespaceTest: $parentNamespaceTest, vectorOfReferrables: $vectorOfReferrables, singleWeakReference: $singleWeakReference, vectorOfWeakReferences: $vectorOfWeakReferences, vectorOfStrongReferrables: $vectorOfStrongReferrables, coOwningReference: $coOwningReference, vectorOfCoOwningReferences: $vectorOfCoOwningReferences, nonOwningReference: $nonOwningReference, vectorOfNonOwningReferences: $vectorOfNonOwningReferences, anyUniqueType: $anyUniqueType, anyUnique: $anyUnique, anyAmbiguousType: $anyAmbiguousType, anyAmbiguous: $anyAmbiguous, vectorOfEnums: $vectorOfEnums, signedEnum: $signedEnum, testrequirednestedflatbuffer: $testrequirednestedflatbuffer, scalarKeySortedTables: $scalarKeySortedTables}'; + return 'MonsterT{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}'; } } @@ -1421,7 +1578,7 @@ class MonsterBuilder { final fb.Builder fbBuilder; void begin() { - fbBuilder.startTable(50); + fbBuilder.startTable(54); } int addPos(int offset) { @@ -1624,6 +1781,18 @@ class MonsterBuilder { fbBuilder.addOffset(50, offset); return fbBuilder.offset; } + int addNativeInline(int offset) { + fbBuilder.addStruct(51, offset); + return fbBuilder.offset; + } + int addLongEnumNonEnumDefault(LongEnum? longEnumNonEnumDefault) { + fbBuilder.addUint64(52, longEnumNonEnumDefault?.value); + return fbBuilder.offset; + } + int addLongEnumNormalDefault(LongEnum? longEnumNormalDefault) { + fbBuilder.addUint64(53, longEnumNormalDefault?.value); + return fbBuilder.offset; + } int finish() { return fbBuilder.endTable(); @@ -1681,6 +1850,9 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { final Race? _signedEnum; final List? _testrequirednestedflatbuffer; final List? _scalarKeySortedTables; + final TestObjectBuilder? _nativeInline; + final LongEnum? _longEnumNonEnumDefault; + final LongEnum? _longEnumNormalDefault; MonsterObjectBuilder({ Vec3ObjectBuilder? pos, @@ -1733,6 +1905,9 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { Race? signedEnum, List? testrequirednestedflatbuffer, List? scalarKeySortedTables, + TestObjectBuilder? nativeInline, + LongEnum? longEnumNonEnumDefault, + LongEnum? longEnumNormalDefault, }) : _pos = pos, _mana = mana, @@ -1783,7 +1958,10 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { _vectorOfEnums = vectorOfEnums, _signedEnum = signedEnum, _testrequirednestedflatbuffer = testrequirednestedflatbuffer, - _scalarKeySortedTables = scalarKeySortedTables; + _scalarKeySortedTables = scalarKeySortedTables, + _nativeInline = nativeInline, + _longEnumNonEnumDefault = longEnumNonEnumDefault, + _longEnumNormalDefault = longEnumNormalDefault; /// Finish building, and store into the [fbBuilder]. @override @@ -1836,7 +2014,7 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { : fbBuilder.writeListUint8(_testrequirednestedflatbuffer!); final int? scalarKeySortedTablesOffset = _scalarKeySortedTables == null ? null : fbBuilder.writeList(_scalarKeySortedTables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList()); - fbBuilder.startTable(50); + fbBuilder.startTable(54); if (_pos != null) { fbBuilder.addStruct(0, _pos!.finish(fbBuilder)); } @@ -1889,6 +2067,11 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { fbBuilder.addInt8(48, _signedEnum?.value); fbBuilder.addOffset(49, testrequirednestedflatbufferOffset); fbBuilder.addOffset(50, scalarKeySortedTablesOffset); + if (_nativeInline != null) { + fbBuilder.addStruct(51, _nativeInline!.finish(fbBuilder)); + } + fbBuilder.addUint64(52, _longEnumNonEnumDefault?.value); + fbBuilder.addUint64(53, _longEnumNormalDefault?.value); return fbBuilder.endTable(); } @@ -1927,7 +2110,7 @@ class TypeAliases { @override String toString() { - return 'TypeAliases{i8: $i8, u8: $u8, i16: $i16, u16: $u16, i32: $i32, u32: $u32, i64: $i64, u64: $u64, f32: $f32, f64: $f64, v8: $v8, vf64: $vf64}'; + return 'TypeAliases{i8: ${i8}, u8: ${u8}, i16: ${i16}, u16: ${u16}, i32: ${i32}, u32: ${u32}, i64: ${i64}, u64: ${u64}, f32: ${f32}, f64: ${f64}, v8: ${v8}, vf64: ${vf64}}'; } TypeAliasesT unpack() => TypeAliasesT( @@ -2002,7 +2185,7 @@ class TypeAliasesT implements fb.Packable { @override String toString() { - return 'TypeAliasesT{i8: $i8, u8: $u8, i16: $i16, u16: $u16, i32: $i32, u32: $u32, i64: $i64, u64: $u64, f32: $f32, f64: $f64, v8: $v8, vf64: $vf64}'; + return 'TypeAliasesT{i8: ${i8}, u8: ${u8}, i16: ${i16}, u16: ${u16}, i32: ${i32}, u32: ${u32}, i64: ${i64}, u64: ${u64}, f32: ${f32}, f64: ${f64}, v8: ${v8}, vf64: ${vf64}}'; } } diff --git a/third_party/flatbuffers/dart/test/monsterdata_test.mon b/third_party/flatbuffers/dart/test/monsterdata_test.mon index cd52947bd0..da0ed8698f 100644 Binary files a/third_party/flatbuffers/dart/test/monsterdata_test.mon and b/third_party/flatbuffers/dart/test/monsterdata_test.mon differ diff --git a/third_party/flatbuffers/docs/source/Grammar.md b/third_party/flatbuffers/docs/source/Grammar.md index f8cf832c89..a54f4beae5 100644 --- a/third_party/flatbuffers/docs/source/Grammar.md +++ b/third_party/flatbuffers/docs/source/Grammar.md @@ -10,7 +10,7 @@ include = `include` string\_constant `;` namespace\_decl = `namespace` ident ( `.` ident )* `;` -attribute\_decl = `attribute` ident | `"`ident`"` `;` +attribute\_decl = `attribute` ident | `"` ident `"` `;` type\_decl = ( `table` | `struct` ) ident metadata `{` field\_decl+ `}` @@ -31,7 +31,7 @@ type = `bool` | `byte` | `ubyte` | `short` | `ushort` | `int` | `uint` | `float32` | `float64` | `string` | `[` type `]` | ident -enumval\_decl = ident [ `=` integer\_constant ] +enumval\_decl = ident [ `=` integer\_constant ] metadata metadata = [ `(` commasep( ident [ `:` single\_value ] ) `)` ] diff --git a/third_party/flatbuffers/docs/source/Schemas.md b/third_party/flatbuffers/docs/source/Schemas.md index 10ed260c29..f049cf40b9 100644 --- a/third_party/flatbuffers/docs/source/Schemas.md +++ b/third_party/flatbuffers/docs/source/Schemas.md @@ -309,11 +309,11 @@ in the corresponding C++ code. Multiple such lines per item are allowed. ### Attributes -Attributes may be attached to a declaration, behind a field, or after -the name of a table/struct/enum/union. These may either have a value or -not. Some attributes like `deprecated` are understood by the compiler; -user defined ones need to be declared with the attribute declaration -(like `priority` in the example above), and are +Attributes may be attached to a declaration, behind a field/enum value, +or after the name of a table/struct/enum/union. These may either have +a value or not. Some attributes like `deprecated` are understood by +the compiler; user defined ones need to be declared with the attribute +declaration (like `priority` in the example above), and are available to query if you parse the schema at runtime. This is useful if you write your own code generators/editors etc., and you wish to add additional information specific to your tool (such as a @@ -552,7 +552,7 @@ the world. If this is not practical for you, use explicit field ids, which should always generate a merge conflict if two people try to allocate the same id. -### Schema evolution examples +### Schema evolution examples (tables) Some examples to clarify what happens as you change a schema: @@ -614,6 +614,41 @@ Occasionally ok. You've renamed fields, which will break all code (and JSON files!) that use this schema, but as long as the change is obvious, this is not incompatible with the actual binary buffers, since those only ever address fields by id/offset. + +#### Schema evolution examples (unions) + +Suppose we have the following schema: +``` +union Foo { A, B } +``` +We can add another variant at the end. +``` +union Foo { A, B, another_a: A } +``` +and this will be okay. Old code will not recognize `another_a`. +However if we add `another_a` anywhere but the end, e.g. +``` +union Foo { A, another_a: A, B } +``` +this is not okay. When new code writes `another_a`, old code will +misinterpret it as `B` (and vice versa). However you can explicitly +set the union's "discriminant" value like so: +``` +union Foo { A = 1, another_a: A = 3, B = 2 } +``` +This is okay. + +``` +union Foo { original_a: A = 1, another_a: A = 3, B = 2 } +``` +Renaming fields will break code and any saved human readable representations, +such as json files, but the binary buffers will be the same. + + + + + +
### Testing whether a field is present in a table diff --git a/third_party/flatbuffers/grpc/build_grpc_with_cxx14.patch b/third_party/flatbuffers/grpc/build_grpc_with_cxx14.patch new file mode 100644 index 0000000000..38cdfe9931 --- /dev/null +++ b/third_party/flatbuffers/grpc/build_grpc_with_cxx14.patch @@ -0,0 +1,10 @@ +diff --git a/bazel/copts.bzl b/bazel/copts.bzl +index 10be944f25..879518b92f 100644 +--- a/bazel/copts.bzl ++++ b/bazel/copts.bzl +@@ -59,4 +59,4 @@ GRPC_LLVM_WARNING_FLAGS = [ + GRPC_DEFAULT_COPTS = select({ + "//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"], + "//conditions:default": [], +-}) ++}) + ["-std=c++14"] diff --git a/third_party/flatbuffers/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift b/third_party/flatbuffers/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift index 17cf38f72b..6c5640e691 100644 --- a/third_party/flatbuffers/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift +++ b/third_party/flatbuffers/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift @@ -6,7 +6,7 @@ import FlatBuffers public struct models_HelloReply: FlatBufferObject, Verifiable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -55,7 +55,7 @@ extension models_HelloReply: Encodable { public struct models_HelloRequest: FlatBufferObject, Verifiable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/include/flatbuffers/array.h b/third_party/flatbuffers/include/flatbuffers/array.h index d4b73fc9e1..ec34deea5a 100644 --- a/third_party/flatbuffers/include/flatbuffers/array.h +++ b/third_party/flatbuffers/include/flatbuffers/array.h @@ -35,7 +35,7 @@ template class Array { public: typedef uint16_t size_type; typedef typename IndirectHelper::return_type return_type; - typedef VectorIterator const_iterator; + typedef VectorConstIterator const_iterator; typedef VectorReverseIterator const_reverse_iterator; // If T is a LE-scalar or a struct (!scalar_tag::value). diff --git a/third_party/flatbuffers/include/flatbuffers/base.h b/third_party/flatbuffers/include/flatbuffers/base.h index 870a811c17..1a5ae76772 100644 --- a/third_party/flatbuffers/include/flatbuffers/base.h +++ b/third_party/flatbuffers/include/flatbuffers/base.h @@ -32,7 +32,7 @@ #include #include -#if defined(ARDUINO) && !defined(ARDUINOSTL_M_H) +#if defined(ARDUINO) && !defined(ARDUINOSTL_M_H) && defined(__AVR__) #include #else #include @@ -138,9 +138,9 @@ #endif #endif // !defined(FLATBUFFERS_LITTLEENDIAN) -#define FLATBUFFERS_VERSION_MAJOR 2 -#define FLATBUFFERS_VERSION_MINOR 0 -#define FLATBUFFERS_VERSION_REVISION 8 +#define FLATBUFFERS_VERSION_MAJOR 22 +#define FLATBUFFERS_VERSION_MINOR 10 +#define FLATBUFFERS_VERSION_REVISION 26 #define FLATBUFFERS_STRING_EXPAND(X) #X #define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X) namespace flatbuffers { diff --git a/third_party/flatbuffers/include/flatbuffers/buffer.h b/third_party/flatbuffers/include/flatbuffers/buffer.h index ca005f7157..e26a153c3f 100644 --- a/third_party/flatbuffers/include/flatbuffers/buffer.h +++ b/third_party/flatbuffers/include/flatbuffers/buffer.h @@ -17,6 +17,8 @@ #ifndef FLATBUFFERS_BUFFER_H_ #define FLATBUFFERS_BUFFER_H_ +#include + #include "flatbuffers/base.h" namespace flatbuffers { @@ -76,6 +78,9 @@ template struct IndirectHelper { static return_type Read(const uint8_t *p, uoffset_t i) { return EndianScalar((reinterpret_cast(p))[i]); } + static return_type Read(uint8_t *p, uoffset_t i) { + return Read(const_cast(p), i); + } }; template struct IndirectHelper> { typedef const T *return_type; @@ -85,13 +90,20 @@ template struct IndirectHelper> { p += i * sizeof(uoffset_t); return reinterpret_cast(p + ReadScalar(p)); } + static mutable_return_type Read(uint8_t *p, uoffset_t i) { + p += i * sizeof(uoffset_t); + return reinterpret_cast(p + ReadScalar(p)); + } }; template struct IndirectHelper { typedef const T *return_type; typedef T *mutable_return_type; static const size_t element_stride = sizeof(T); static return_type Read(const uint8_t *p, uoffset_t i) { - return reinterpret_cast(p + i * sizeof(T)); + return reinterpret_cast(p + i * sizeof(T)); + } + static mutable_return_type Read(uint8_t *p, uoffset_t i) { + return reinterpret_cast(p + i * sizeof(T)); } }; @@ -139,4 +151,4 @@ template const T *GetSizePrefixedRoot(const void *buf) { } // namespace flatbuffers -#endif // FLATBUFFERS_BUFFER_H_ \ No newline at end of file +#endif // FLATBUFFERS_BUFFER_H_ diff --git a/third_party/flatbuffers/include/flatbuffers/flatbuffer_builder.h b/third_party/flatbuffers/include/flatbuffers/flatbuffer_builder.h index d5cac74545..efa4d89619 100644 --- a/third_party/flatbuffers/include/flatbuffers/flatbuffer_builder.h +++ b/third_party/flatbuffers/include/flatbuffers/flatbuffer_builder.h @@ -17,6 +17,7 @@ #ifndef FLATBUFFERS_FLATBUFFER_BUILDER_H_ #define FLATBUFFERS_FLATBUFFER_BUILDER_H_ +#include #include #include @@ -449,7 +450,7 @@ class FlatBufferBuilder { } template void PreAlign(size_t len) { AssertScalarT(); - PreAlign(len, sizeof(T)); + PreAlign(len, AlignOf()); } /// @endcond @@ -589,11 +590,15 @@ class FlatBufferBuilder { return PushElement(static_cast(len)); } - void StartVector(size_t len, size_t elemsize) { + void StartVector(size_t len, size_t elemsize, size_t alignment) { NotNested(); nested = true; PreAlign(len * elemsize); - PreAlign(len * elemsize, elemsize); // Just in case elemsize > uoffset_t. + PreAlign(len * elemsize, alignment); // Just in case elemsize > uoffset_t. + } + + template void StartVector(size_t len) { + return StartVector(len, sizeof(T), AlignOf()); } // Call this right before StartVector/CreateVector if you want to force the @@ -627,7 +632,7 @@ class FlatBufferBuilder { // If this assert hits, you're specifying a template argument that is // causing the wrong overload to be selected, remove it. AssertScalarT(); - StartVector(len, sizeof(T)); + StartVector(len); if (len == 0) { return Offset>(EndVector(len)); } // clang-format off #if FLATBUFFERS_LITTLEENDIAN @@ -668,7 +673,7 @@ class FlatBufferBuilder { template Offset>> CreateVector(const Offset *v, size_t len) { - StartVector(len, sizeof(Offset)); + StartVector>(len); for (auto i = len; i > 0;) { PushElement(v[--i]); } return Offset>>(EndVector(len)); } @@ -688,7 +693,7 @@ class FlatBufferBuilder { // an array. Instead, read elements manually. // Background: https://isocpp.org/blog/2012/11/on-vectorbool Offset> CreateVector(const std::vector &v) { - StartVector(v.size(), sizeof(uint8_t)); + StartVector(v.size()); for (auto i = v.size(); i > 0;) { PushElement(static_cast(v[--i])); } @@ -762,7 +767,7 @@ class FlatBufferBuilder { for (auto it = begin; it != end; ++it) { buf_.scratch_push_small(CreateString(*it)); } - StartVector(size, sizeof(Offset)); + StartVector>(size); for (auto i = 1; i <= size; i++) { // Note we re-evaluate the buf location each iteration to account for any // underlying buffer resizing that may occur. @@ -782,7 +787,7 @@ class FlatBufferBuilder { /// where the vector is stored. template Offset> CreateVectorOfStructs(const T *v, size_t len) { - StartVector(len * sizeof(T) / AlignOf(), AlignOf()); + StartVector(len * sizeof(T) / AlignOf(), sizeof(T), AlignOf()); if (len > 0) { PushBytes(reinterpret_cast(v), sizeof(T) * len); } @@ -1052,9 +1057,9 @@ class FlatBufferBuilder { /// written to at a later time to serialize the data into a `vector` /// in the buffer. uoffset_t CreateUninitializedVector(size_t len, size_t elemsize, - uint8_t **buf) { + size_t alignment, uint8_t **buf) { NotNested(); - StartVector(len, elemsize); + StartVector(len, elemsize, alignment); buf_.make_space(len * elemsize); auto vec_start = GetSize(); auto vec_end = EndVector(len); @@ -1062,6 +1067,12 @@ class FlatBufferBuilder { return vec_end; } + FLATBUFFERS_ATTRIBUTE([[deprecated("call the version above instead")]]) + uoffset_t CreateUninitializedVector(size_t len, size_t elemsize, + uint8_t **buf) { + return CreateUninitializedVector(len, elemsize, elemsize, buf); + } + /// @brief Specialized version of `CreateVector` for non-copying use cases. /// Write the data any time later to the returned buffer pointer `buf`. /// @tparam T The data type of the data that will be stored in the buffer @@ -1073,14 +1084,14 @@ class FlatBufferBuilder { template Offset> CreateUninitializedVector(size_t len, T **buf) { AssertScalarT(); - return CreateUninitializedVector(len, sizeof(T), + return CreateUninitializedVector(len, sizeof(T), AlignOf(), reinterpret_cast(buf)); } template Offset> CreateUninitializedVectorOfStructs(size_t len, T **buf) { - return CreateUninitializedVector(len, sizeof(T), + return CreateUninitializedVector(len, sizeof(T), AlignOf(), reinterpret_cast(buf)); } @@ -1091,7 +1102,7 @@ class FlatBufferBuilder { Offset> CreateVectorScalarCast(const U *v, size_t len) { AssertScalarT(); AssertScalarT(); - StartVector(len, sizeof(T)); + StartVector(len); for (auto i = len; i > 0;) { PushElement(static_cast(v[--i])); } return Offset>(EndVector(len)); } @@ -1200,7 +1211,7 @@ class FlatBufferBuilder { // Allocates space for a vector of structures. // Must be completed with EndVectorOfStructs(). template T *StartVectorOfStructs(size_t vector_size) { - StartVector(vector_size * sizeof(T) / AlignOf(), AlignOf()); + StartVector(vector_size * sizeof(T) / AlignOf(), sizeof(T), AlignOf()); return reinterpret_cast(buf_.make_space(vector_size * sizeof(T))); } diff --git a/third_party/flatbuffers/include/flatbuffers/flatbuffers.h b/third_party/flatbuffers/include/flatbuffers/flatbuffers.h index 642178897b..d7ee6ab4dd 100644 --- a/third_party/flatbuffers/include/flatbuffers/flatbuffers.h +++ b/third_party/flatbuffers/include/flatbuffers/flatbuffers.h @@ -17,6 +17,8 @@ #ifndef FLATBUFFERS_H_ #define FLATBUFFERS_H_ +#include + // TODO: These includes are for mitigating the pains of users editing their // source because they relied on flatbuffers.h to include everything for them. #include "flatbuffers/array.h" diff --git a/third_party/flatbuffers/include/flatbuffers/flexbuffers.h b/third_party/flatbuffers/include/flatbuffers/flexbuffers.h index 7bf84302e5..79cdd9c5d6 100644 --- a/third_party/flatbuffers/include/flatbuffers/flexbuffers.h +++ b/third_party/flatbuffers/include/flatbuffers/flexbuffers.h @@ -17,6 +17,7 @@ #ifndef FLATBUFFERS_FLEXBUFFERS_H_ #define FLATBUFFERS_FLEXBUFFERS_H_ +#include #include // Used to select STL variant. #include "flatbuffers/base.h" diff --git a/third_party/flatbuffers/include/flatbuffers/idl.h b/third_party/flatbuffers/include/flatbuffers/idl.h index 4cfd7ebfb0..1701236bf7 100644 --- a/third_party/flatbuffers/include/flatbuffers/idl.h +++ b/third_party/flatbuffers/include/flatbuffers/idl.h @@ -17,6 +17,7 @@ #ifndef FLATBUFFERS_IDL_H_ #define FLATBUFFERS_IDL_H_ +#include #include #include #include @@ -382,7 +383,14 @@ struct EnumVal { Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; - bool Deserialize(const Parser &parser, const reflection::EnumVal *val); + bool Deserialize(Parser &parser, const reflection::EnumVal *val); + + flatbuffers::Offset< + flatbuffers::Vector>> + SerializeAttributes(FlatBufferBuilder *builder, const Parser &parser) const; + + bool DeserializeAttributes(Parser &parser, + const Vector> *attrs); uint64_t GetAsUInt64() const { return static_cast(value); } int64_t GetAsInt64() const { return value; } @@ -392,6 +400,7 @@ struct EnumVal { std::string name; std::vector doc_comment; Type union_type; + SymbolTable attributes; private: friend EnumDef; @@ -480,11 +489,11 @@ inline bool IsVector(const Type &type) { return type.base_type == BASE_TYPE_VECTOR; } -inline bool IsVectorOfStruct(const Type& type) { +inline bool IsVectorOfStruct(const Type &type) { return IsVector(type) && IsStruct(type.VectorType()); } -inline bool IsVectorOfTable(const Type& type) { +inline bool IsVectorOfTable(const Type &type) { return IsVector(type) && IsTable(type.VectorType()); } @@ -634,6 +643,7 @@ struct IDLOptions { bool json_nested_legacy_flatbuffers; bool ts_flat_file; bool no_leak_private_annotations; + bool require_json_eof; // Possible options for the more general generator below. enum Language { @@ -653,6 +663,7 @@ struct IDLOptions { kRust = 1 << 14, kKotlin = 1 << 15, kSwift = 1 << 16, + kNim = 1 << 17, kMAX }; @@ -734,6 +745,7 @@ struct IDLOptions { json_nested_legacy_flatbuffers(false), ts_flat_file(false), no_leak_private_annotations(false), + require_json_eof(true), mini_reflect(IDLOptions::kNone), require_explicit_ids(false), rust_serialize(false), @@ -896,6 +908,9 @@ class Parser : public ParserState { bool ParseJson(const char *json, const char *json_filename = nullptr); + // Returns the number of characters were consumed when parsing a JSON string. + std::ptrdiff_t BytesConsumed() const; + // Set the root type. May override the one set in the schema. bool SetRootType(const char *name); @@ -1016,6 +1031,7 @@ class Parser : public ParserState { FLATBUFFERS_CHECKED_ERROR ParseService(const char *filename); FLATBUFFERS_CHECKED_ERROR ParseProtoFields(StructDef *struct_def, bool isextend, bool inside_oneof); + FLATBUFFERS_CHECKED_ERROR ParseProtoMapField(StructDef *struct_def); FLATBUFFERS_CHECKED_ERROR ParseProtoOption(); FLATBUFFERS_CHECKED_ERROR ParseProtoKey(); FLATBUFFERS_CHECKED_ERROR ParseProtoDecl(); diff --git a/third_party/flatbuffers/include/flatbuffers/reflection_generated.h b/third_party/flatbuffers/include/flatbuffers/reflection_generated.h index 0b2fc004ec..6a99e66356 100644 --- a/third_party/flatbuffers/include/flatbuffers/reflection_generated.h +++ b/third_party/flatbuffers/include/flatbuffers/reflection_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace reflection { @@ -543,7 +543,8 @@ struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_NAME = 4, VT_VALUE = 6, VT_UNION_TYPE = 10, - VT_DOCUMENTATION = 12 + VT_DOCUMENTATION = 12, + VT_ATTRIBUTES = 14 }; const flatbuffers::String *name() const { return GetPointer(VT_NAME); @@ -599,6 +600,15 @@ struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool has_documentation() const { return CheckField(VT_DOCUMENTATION); } + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + void clear_attributes() { + ClearField(VT_ATTRIBUTES); + } + bool has_attributes() const { + return CheckField(VT_ATTRIBUTES); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && @@ -609,6 +619,9 @@ struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && verifier.VerifyVectorOfStrings(documentation()) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && + verifier.VerifyVectorOfTables(attributes()) && verifier.EndTable(); } EnumValT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -632,6 +645,9 @@ struct EnumValBuilder { void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(EnumVal::VT_DOCUMENTATION, documentation); } + void add_attributes(flatbuffers::Offset>> attributes) { + fbb_.AddOffset(EnumVal::VT_ATTRIBUTES, attributes); + } explicit EnumValBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -649,9 +665,11 @@ inline flatbuffers::Offset CreateEnumVal( flatbuffers::Offset name = 0, int64_t value = 0, flatbuffers::Offset union_type = 0, - flatbuffers::Offset>> documentation = 0) { + flatbuffers::Offset>> documentation = 0, + flatbuffers::Offset>> attributes = 0) { EnumValBuilder builder_(_fbb); builder_.add_value(value); + builder_.add_attributes(attributes); builder_.add_documentation(documentation); builder_.add_union_type(union_type); builder_.add_name(name); @@ -668,15 +686,18 @@ inline flatbuffers::Offset CreateEnumValDirect( const char *name = nullptr, int64_t value = 0, flatbuffers::Offset union_type = 0, - const std::vector> *documentation = nullptr) { + const std::vector> *documentation = nullptr, + std::vector> *attributes = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; return reflection::CreateEnumVal( _fbb, name__, value, union_type, - documentation__); + documentation__, + attributes__); } flatbuffers::Offset CreateEnumVal(flatbuffers::FlatBufferBuilder &_fbb, const EnumValT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); diff --git a/third_party/flatbuffers/include/flatbuffers/util.h b/third_party/flatbuffers/include/flatbuffers/util.h index 73a3ab786b..74edbce467 100644 --- a/third_party/flatbuffers/include/flatbuffers/util.h +++ b/third_party/flatbuffers/include/flatbuffers/util.h @@ -31,6 +31,7 @@ # include #endif // FLATBUFFERS_PREFER_PRINTF +#include #include namespace flatbuffers { @@ -392,6 +393,18 @@ inline uint64_t StringToUInt(const char *s, int base = 10) { return StringToIntegerImpl(&val, s, base) ? val : 0; } +inline bool StringIsFlatbufferNan(const std::string &s) { + return s == "nan" || s == "+nan" || s == "-nan"; +} + +inline bool StringIsFlatbufferPositiveInfinity(const std::string &s) { + return s == "inf" || s == "+inf" || s == "infinity" || s == "+infinity"; +} + +inline bool StringIsFlatbufferNegativeInfinity(const std::string &s) { + return s == "-inf" || s == "-infinity"; +} + typedef bool (*LoadFileFunction)(const char *filename, bool binary, std::string *dest); typedef bool (*FileExistsFunction)(const char *filename); diff --git a/third_party/flatbuffers/include/flatbuffers/vector.h b/third_party/flatbuffers/include/flatbuffers/vector.h index 6bcdfe263a..9cb6a2da89 100644 --- a/third_party/flatbuffers/include/flatbuffers/vector.h +++ b/third_party/flatbuffers/include/flatbuffers/vector.h @@ -27,14 +27,15 @@ struct String; // An STL compatible iterator implementation for Vector below, effectively // calling Get() for every element. -template struct VectorIterator { +template +struct VectorIterator { typedef std::random_access_iterator_tag iterator_category; typedef IT value_type; typedef ptrdiff_t difference_type; typedef IT *pointer; typedef IT &reference; - VectorIterator(const uint8_t *data, uoffset_t i) + VectorIterator(Data data, uoffset_t i) : data_(data + IndirectHelper::element_stride * i) {} VectorIterator(const VectorIterator &other) : data_(other.data_) {} VectorIterator() : data_(nullptr) {} @@ -116,9 +117,12 @@ template struct VectorIterator { } private: - const uint8_t *data_; + Data data_; }; +template +using VectorConstIterator = VectorIterator; + template struct VectorReverseIterator : public std::reverse_iterator { explicit VectorReverseIterator(Iterator iter) @@ -145,7 +149,7 @@ template class Vector { public: typedef VectorIterator::mutable_return_type> iterator; - typedef VectorIterator::return_type> + typedef VectorConstIterator::return_type> const_iterator; typedef VectorReverseIterator reverse_iterator; typedef VectorReverseIterator const_reverse_iterator; diff --git a/third_party/flatbuffers/include/flatbuffers/vector_downward.h b/third_party/flatbuffers/include/flatbuffers/vector_downward.h index d25e544970..2dbaa60055 100644 --- a/third_party/flatbuffers/include/flatbuffers/vector_downward.h +++ b/third_party/flatbuffers/include/flatbuffers/vector_downward.h @@ -17,6 +17,8 @@ #ifndef FLATBUFFERS_VECTOR_DOWNWARD_H_ #define FLATBUFFERS_VECTOR_DOWNWARD_H_ +#include + #include "flatbuffers/base.h" #include "flatbuffers/default_allocator.h" #include "flatbuffers/detached_buffer.h" diff --git a/third_party/flatbuffers/java/pom.xml b/third_party/flatbuffers/java/pom.xml index 34f154ad72..ca81c823e8 100644 --- a/third_party/flatbuffers/java/pom.xml +++ b/third_party/flatbuffers/java/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.flatbuffers flatbuffers-java - 2.0.8 + 22.10.26 bundle FlatBuffers Java API @@ -58,19 +58,17 @@ - - maven-compiler-plugin - - 8 - - **/LongEnum.java - MyGame/Example/MonsterStorageGrpc.java - MyGame/Example/StructOfStructs** - MyGame/OtherNameSpace/TableBT.java - - - 3.8.1 - + + maven-compiler-plugin + + 8 + + MyGame/Example/MonsterStorageGrpc.java + MyGame/OtherNameSpace/TableBT.java + + + 3.8.1 + @@ -149,10 +147,10 @@ sign - - --pinentry-mode - loopback - + + --pinentry-mode + loopback + @@ -173,4 +171,3 @@ - diff --git a/third_party/flatbuffers/java/src/main/java/com/google/flatbuffers/Constants.java b/third_party/flatbuffers/java/src/main/java/com/google/flatbuffers/Constants.java index b9cb8f29df..5bbc343d74 100644 --- a/third_party/flatbuffers/java/src/main/java/com/google/flatbuffers/Constants.java +++ b/third_party/flatbuffers/java/src/main/java/com/google/flatbuffers/Constants.java @@ -46,7 +46,7 @@ public class Constants { Changes to the Java implementation need to be sure to change the version here and in the code generator on every possible incompatible change */ - public static void FLATBUFFERS_2_0_8() {} + public static void FLATBUFFERS_22_10_26() {} } /// @endcond diff --git a/third_party/flatbuffers/net/FlatBuffers/FlatBufferConstants.cs b/third_party/flatbuffers/net/FlatBuffers/FlatBufferConstants.cs index e3f0f89b73..77deb99c61 100644 --- a/third_party/flatbuffers/net/FlatBuffers/FlatBufferConstants.cs +++ b/third_party/flatbuffers/net/FlatBuffers/FlatBufferConstants.cs @@ -32,6 +32,6 @@ the runtime and generated code are modified in sync. Changes to the C# implementation need to be sure to change the version here and in the code generator on every possible incompatible change */ - public static void FLATBUFFERS_2_0_8() {} + public static void FLATBUFFERS_22_10_26() {} } } diff --git a/third_party/flatbuffers/net/FlatBuffers/Google.FlatBuffers.csproj b/third_party/flatbuffers/net/FlatBuffers/Google.FlatBuffers.csproj index 107ba7c213..3e07aa1670 100644 --- a/third_party/flatbuffers/net/FlatBuffers/Google.FlatBuffers.csproj +++ b/third_party/flatbuffers/net/FlatBuffers/Google.FlatBuffers.csproj @@ -3,7 +3,7 @@ netstandard2.1;netstandard2.0;net46 A cross-platform memory efficient serialization library - 2.0.8-beta.1 + 22.10.26 Google LLC https://github.com/google/flatbuffers https://github.com/google/flatbuffers diff --git a/third_party/flatbuffers/nim/flatbuffers.nimble b/third_party/flatbuffers/nim/flatbuffers.nimble new file mode 100644 index 0000000000..df16be26a0 --- /dev/null +++ b/third_party/flatbuffers/nim/flatbuffers.nimble @@ -0,0 +1,7 @@ +version = "2.0.8" +author = "flatbuffers" +description = "Flatbuffers" +license = "Apache 2.0" +srcDir = "flatbuffers" + +requires "nim >= 1.4.0" diff --git a/third_party/flatbuffers/nim/flatbuffers/flatbuffers.nim b/third_party/flatbuffers/nim/flatbuffers/flatbuffers.nim new file mode 100644 index 0000000000..b9532877e7 --- /dev/null +++ b/third_party/flatbuffers/nim/flatbuffers/flatbuffers.nim @@ -0,0 +1,7 @@ +import + src/[ + builder, + struct, + table + ] +export flatbuffers.builder, flatbuffers.table, flatbuffers.struct diff --git a/third_party/flatbuffers/nim/flatbuffers/src/builder.nim b/third_party/flatbuffers/nim/flatbuffers/src/builder.nim new file mode 100644 index 0000000000..62ac2edb0b --- /dev/null +++ b/third_party/flatbuffers/nim/flatbuffers/src/builder.nim @@ -0,0 +1,262 @@ +import math +import table + + +const MAX_BUFFER_SIZE* = 2^31 + + +type Builder* = ref object of RootObj + bytes*: seq[byte] + minalign*: int + current_vtable*: seq[uoffset] + objectEnd*: uoffset + vtables*: seq[uoffset] #? + head*: uoffset + nested*: bool + finished*: bool + vectorNumElems*: uoffset + +using this: var Builder + +func newBuilder*(size: int): Builder = + result = new Builder + result.bytes.setLen(size) + result.minalign = 1 + result.head = size.uoffset + result.nested = false + result.finished = false + result.vectorNumElems = 0 + +proc FinishedBytes*(this): seq[byte] = + if not this.finished: + quit("Builder not finished, Incorrect use of FinishedBytes(): must call 'Finish' first.") + result = this.bytes[this.head..^1] + +proc Output*(this): seq[byte] = + if not this.finished: + quit("Builder not finished, Incorrect use of Output(): must call 'Finish' first.") + + result = this.bytes[this.head..^1] + +func Offset*(this): uoffset = + result = this.bytes.len.uoffset - this.head + +proc StartObject*(this; numfields: int) = + if this.nested: + quit("builder is nested") + + this.current_vtable.setLen(numfields) + for i in this.current_vtable.mitems(): + i = 0 + this.objectEnd = this.Offset() + this.nested = true + +proc GrowByteBuffer*(this) = + if this.bytes.len == MAX_BUFFER_SIZE: + quit("flatbuffers: cannot grow buffer beyond 2 gigabytes") + let oldLen = this.bytes.len + var newLen = min(this.bytes.len * 2, MAX_BUFFER_SIZE) + if newLen == 0: + newLen = 1 + this.bytes.setLen(newLen) + var j = this.bytes.len - 1 + while j >= 0: + if j >= newLen - oldLen: + this.bytes[j] = this.bytes[j - (newLen - oldLen)] + else: + this.bytes[j] = 0 + dec(j) + +proc Place*[T](this; x: T) = + this.head -= uoffset x.sizeof + WriteVal(this.bytes, this.head, x) + +func Pad*(this; n: int) = + for i in 0.. this.minalign: + this.minalign = size + var alignsize = (not (this.bytes.len - this.head.int + additionalBytes)) + 1 + alignsize = alignsize and (size - 1) + + while this.head.int < alignsize + size + additionalBytes: + let oldbufSize = this.bytes.len + this.GrowByteBuffer() + this.head = (this.head.int + this.bytes.len - oldbufSize).uoffset + this.Pad(alignsize) + +proc PrependOffsetRelative*[T: Offsets](this; off: T) = + when T is voffset: + this.Prep(T.sizeof, 0) + if not off.uoffset <= this.Offset: + quit("flatbuffers: Offset arithmetic error.") + this.Place(off) + else: + this.Prep(T.sizeof, 0) + if not off.uoffset <= this.Offset: + quit("flatbuffers: Offset arithmetic error.") + let off2: T = this.Offset.T - off + sizeof(T).T + this.Place(off2) + + +proc Prepend*[T](this; x: T) = + this.Prep(x.sizeof, 0) + this.Place(x) + +proc Slot*(this; slotnum: int) = + this.current_vtable[slotnum] = this.Offset + +proc PrependSlot*[T](this; o: int; x, d: T) = + if x != d: + when T is uoffset or T is soffset or T is voffset: + this.PrependOffsetRelative(x) + else: + this.Prepend(x) + this.Slot(o) + +proc AssertStuctInline(this; obj: uoffset) = + if obj != this.Offset: + quit("flatbuffers: Tried to write a Struct at an Offset that is different from the current Offset of the Builder.") + +proc PrependStructSlot*(this; o: int; x: uoffset; d: uoffset) = + if x != d: + this.AssertStuctInline(x) + this.Slot(o) + +proc Add*[T](this; n: T) = + this.Prep(T.sizeof, 0) + WriteVal(this.bytes, this.head, n) + +proc VtableEqual*(a: seq[uoffset]; objectStart: uoffset; b: seq[byte]): bool = + if a.len * voffset.sizeof != b.len: + return false + + var i = 0 + while i < a.len: + var seq = b[i * voffset.sizeof..<(i + 1) * voffset.sizeof] + let x = GetVal[voffset](addr seq) + + if x == 0 and a[i] == 0: + inc i + continue + + let y = objectStart.soffset - a[i].soffset + if x.soffset != y: + return false + inc i + return true + +proc WriteVtable*(this): uoffset = + this.PrependOffsetRelative(0.soffset) + + let objectOffset = this.Offset + var existingVtable = uoffset 0 + + var i = this.current_vtable.len - 1 + while i >= 0 and this.current_vtable[i] == 0: dec i + + this.current_vtable = this.current_vtable[0..i] + for i in countdown(this.vtables.len - 1, 0): + let + vt2Offset: uoffset = this.vtables[i] + vt2Start: int = this.bytes.len - int vt2Offset + + var seq = this.bytes[vt2Start..`_ ' @@ -81,4 +41,4 @@ def version(): 'Documentation': 'https://google.github.io/flatbuffers/', 'Source': 'https://github.com/google/flatbuffers', }, -) \ No newline at end of file +) diff --git a/third_party/flatbuffers/readme.md b/third_party/flatbuffers/readme.md index 5056a64729..bc2db1919f 100644 --- a/third_party/flatbuffers/readme.md +++ b/third_party/flatbuffers/readme.md @@ -17,7 +17,7 @@ maximum memory efficiency. It allows you to directly access serialized data with ## Supported operating systems * Windows -* MacOS X +* macOS * Linux * Android * And any others with a recent C++ compiler (C++ 11 and newer) diff --git a/third_party/flatbuffers/reflection/reflection.fbs b/third_party/flatbuffers/reflection/reflection.fbs index 51e5b63f94..672816bdbf 100644 --- a/third_party/flatbuffers/reflection/reflection.fbs +++ b/third_party/flatbuffers/reflection/reflection.fbs @@ -56,6 +56,7 @@ table EnumVal { object:Object (id: 2, deprecated); union_type:Type (id: 3); documentation:[string] (id: 4); + attributes:[KeyValue] (id: 5); } table Enum { @@ -83,7 +84,7 @@ table Field { documentation:[string] (id: 10); optional:bool = false (id: 11); /// Number of padding octets to always add after this field. Structs only. - padding:uint16 = 0 (id: 12); + padding:uint16 = 0 (id: 12); } table Object { // Used for both tables and structs. diff --git a/third_party/flatbuffers/rust/flatbuffers/Cargo.toml b/third_party/flatbuffers/rust/flatbuffers/Cargo.toml index b3276c0cdc..2cba5b7279 100644 --- a/third_party/flatbuffers/rust/flatbuffers/Cargo.toml +++ b/third_party/flatbuffers/rust/flatbuffers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flatbuffers" -version = "2.1.2" +version = "22.10.26" edition = "2018" authors = ["Robert Winslow ", "FlatBuffers Maintainers"] license = "Apache-2.0" @@ -12,15 +12,13 @@ categories = ["encoding", "data-structures", "memory-management"] rust = "1.51" [features] -default = ["thiserror"] -no_std = ["core2", "thiserror_core2"] +default = ["std"] +std = [] serialize = ["serde"] [dependencies] -smallvec = "1.6.1" bitflags = "1.2.1" serde = { version = "1.0", optional = true } -thiserror = { version = "1.0.30", optional = true } -core2 = { version = "0.4.0", optional = true } -# This version is compliant with mainline 1.0.30 -thiserror_core2 = { version = "2.0.0", default-features = false, optional = true } + +[build-dependencies] +rustc_version = "0.4.0" diff --git a/third_party/flatbuffers/rust/flatbuffers/build.rs b/third_party/flatbuffers/rust/flatbuffers/build.rs new file mode 100644 index 0000000000..c13ed1da48 --- /dev/null +++ b/third_party/flatbuffers/rust/flatbuffers/build.rs @@ -0,0 +1,12 @@ +use rustc_version::{version_meta, Channel}; + +fn main() { + let version_meta = version_meta().unwrap(); + + // To use nightly features we declare this and then we can use + // #[cfg(nightly)] + // for nightly only features + if version_meta.channel == Channel::Nightly { + println!("cargo:rustc-cfg=nightly") + } +} diff --git a/third_party/flatbuffers/rust/flatbuffers/src/array.rs b/third_party/flatbuffers/rust/flatbuffers/src/array.rs index 2ce2e47133..089557440c 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/array.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/array.rs @@ -37,14 +37,18 @@ where #[allow(clippy::len_without_is_empty)] #[allow(clippy::from_over_into)] // TODO(caspern): Go from From to Into. impl<'a, T: 'a, const N: usize> Array<'a, T, N> { + /// # Safety + /// + /// buf must be a contiguous array of `T` + /// + /// # Panics + /// + /// Panics if `buf.len()` is not `size_of::() * N` #[inline(always)] - pub fn new(buf: &'a [u8]) -> Self { - assert!(size_of::() * N == buf.len()); + pub unsafe fn new(buf: &'a [u8]) -> Self { + assert_eq!(size_of::() * N, buf.len()); - Array { - 0: buf, - 1: PhantomData, - } + Array(buf, PhantomData) } #[inline(always)] @@ -61,34 +65,39 @@ impl<'a, T: Follow<'a> + 'a, const N: usize> Array<'a, T, N> { pub fn get(&self, idx: usize) -> T::Inner { assert!(idx < N); let sz = size_of::(); - T::follow(self.0, sz * idx) + // Safety: + // self.0 was valid for length `N` on construction and have verified `idx < N` + unsafe { T::follow(self.0, sz * idx) } } #[inline(always)] pub fn iter(&self) -> VectorIter<'a, T> { - VectorIter::from_slice(self.0, self.len()) + // Safety: + // self.0 was valid for length N on construction + unsafe { VectorIter::from_slice(self.0, self.len()) } } } -impl<'a, T: Follow<'a> + Debug, const N: usize> Into<[T::Inner; N]> for Array<'a, T, N> { - #[inline(always)] - fn into(self) -> [T::Inner; N] { - array_init(|i| self.get(i)) +impl<'a, T: Follow<'a> + Debug, const N: usize> From> for [T::Inner; N] { + fn from(array: Array<'a, T, N>) -> Self { + array_init(|i| array.get(i)) } } -// TODO(caspern): Implement some future safe version of SafeSliceAccess. - /// Implement Follow for all possible Arrays that have Follow-able elements. impl<'a, T: Follow<'a> + 'a, const N: usize> Follow<'a> for Array<'a, T, N> { type Inner = Array<'a, T, N>; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Array::new(&buf[loc..loc + N * size_of::()]) } } -pub fn emplace_scalar_array( +/// Place an array of EndianScalar into the provided mutable byte slice. Performs +/// endian conversion, if necessary. +/// # Safety +/// Caller must ensure `s.len() >= size_of::<[T; N]>()` +pub unsafe fn emplace_scalar_array( buf: &mut [u8], loc: usize, src: &[T; N], @@ -96,14 +105,12 @@ pub fn emplace_scalar_array( let mut buf_ptr = buf[loc..].as_mut_ptr(); for item in src.iter() { let item_le = item.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &item_le as *const T as *const u8, - buf_ptr, - size_of::(), - ); - buf_ptr = buf_ptr.add(size_of::()); - } + core::ptr::copy_nonoverlapping( + &item_le as *const T::Scalar as *const u8, + buf_ptr, + size_of::(), + ); + buf_ptr = buf_ptr.add(size_of::()); } } @@ -124,6 +131,8 @@ where let mut array: core::mem::MaybeUninit<[T; N]> = core::mem::MaybeUninit::uninit(); let mut ptr_i = array.as_mut_ptr() as *mut T; + // Safety: + // array is aligned by T, and has length N unsafe { for i in 0..N { let value_i = initializer(i); @@ -134,7 +143,7 @@ where } } -#[cfg(feature="serialize")] +#[cfg(feature = "serialize")] impl<'a, T: 'a, const N: usize> serde::ser::Serialize for Array<'a, T, N> where T: 'a + Follow<'a>, diff --git a/third_party/flatbuffers/rust/flatbuffers/src/builder.rs b/third_party/flatbuffers/rust/flatbuffers/src/builder.rs index 8a8b58cf03..7d0f408ba1 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/builder.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/builder.rs @@ -14,26 +14,22 @@ * limitations under the License. */ -extern crate smallvec; - +#[cfg(not(feature = "std"))] +use alloc::{vec, vec::Vec}; use core::cmp::max; use core::iter::{DoubleEndedIterator, ExactSizeIterator}; use core::marker::PhantomData; use core::ptr::write_bytes; -use core::slice::from_raw_parts; -#[cfg(feature = "no_std")] -use alloc::{vec, vec::Vec}; -use crate::endian_scalar::{emplace_scalar, read_scalar_at}; +use crate::endian_scalar::emplace_scalar; use crate::primitives::*; use crate::push::{Push, PushAlignment}; +use crate::read_scalar; use crate::table::Table; -use crate::vector::{SafeSliceAccess, Vector}; +use crate::vector::Vector; use crate::vtable::{field_index_to_field_offset, VTable}; use crate::vtable_writer::VTableWriter; -pub const N_SMALLVEC_STRING_VECTOR_CAPACITY: usize = 16; - #[derive(Clone, Copy, Debug, Eq, PartialEq)] struct FieldLoc { off: UOffsetT, @@ -120,7 +116,9 @@ impl<'fbb> FlatBufferBuilder<'fbb> { // memset only the part of the buffer that could be dirty: { let to_clear = self.owned_buf.len() - self.head; - let ptr = (&mut self.owned_buf[self.head..]).as_mut_ptr(); + let ptr = self.owned_buf[self.head..].as_mut_ptr(); + // Safety: + // Verified ptr is valid for `to_clear` above unsafe { write_bytes(ptr, 0, to_clear); } @@ -152,8 +150,10 @@ impl<'fbb> FlatBufferBuilder<'fbb> { self.align(sz, P::alignment()); self.make_space(sz); { - let (dst, rest) = (&mut self.owned_buf[self.head..]).split_at_mut(sz); - x.push(dst, rest); + let (dst, rest) = self.owned_buf[self.head..].split_at_mut(sz); + // Safety: + // Called make_space above + unsafe { x.push(dst, rest.len()) }; } WIPOffset::new(self.used_space() as UOffsetT) } @@ -309,73 +309,32 @@ impl<'fbb> FlatBufferBuilder<'fbb> { WIPOffset::new(self.used_space() as UOffsetT) } - /// Create a vector by memcpy'ing. This is much faster than calling - /// `create_vector`, but the underlying type must be represented as - /// little-endian on the host machine. This property is encoded in the - /// type system through the SafeSliceAccess trait. The following types are - /// always safe, on any platform: bool, u8, i8, and any - /// FlatBuffers-generated struct. - #[inline] - pub fn create_vector_direct<'a: 'b, 'b, T: SafeSliceAccess + Push + Sized + 'b>( - &'a mut self, - items: &'b [T], - ) -> WIPOffset> { - self.assert_not_nested( - "create_vector_direct can not be called when a table or vector is under construction", - ); - let elem_size = T::size(); - self.align(items.len() * elem_size, T::alignment().max_of(SIZE_UOFFSET)); - - let bytes = { - let ptr = items.as_ptr() as *const T as *const u8; - unsafe { from_raw_parts(ptr, items.len() * elem_size) } - }; - self.push_bytes_unprefixed(bytes); - self.push(items.len() as UOffsetT); - - WIPOffset::new(self.used_space() as UOffsetT) - } - - /// Create a vector of strings. - /// - /// Speed-sensitive users may wish to reduce memory usage by creating the - /// vector manually: use `start_vector`, `push`, and `end_vector`. - #[inline] - pub fn create_vector_of_strings<'a, 'b>( - &'a mut self, - xs: &'b [&'b str], - ) -> WIPOffset>> { - self.assert_not_nested("create_vector_of_strings can not be called when a table or vector is under construction"); - // internally, smallvec can be a stack-allocated or heap-allocated vector: - // if xs.len() > N_SMALLVEC_STRING_VECTOR_CAPACITY then it will overflow to the heap. - let mut offsets: smallvec::SmallVec<[WIPOffset<&str>; N_SMALLVEC_STRING_VECTOR_CAPACITY]> = - smallvec::SmallVec::with_capacity(xs.len()); - unsafe { - offsets.set_len(xs.len()); - } - - // note that this happens in reverse, because the buffer is built back-to-front: - for (i, &s) in xs.iter().enumerate().rev() { - let o = self.create_string(s); - offsets[i] = o; - } - self.create_vector(&offsets[..]) - } - /// Create a vector of Push-able objects. /// /// Speed-sensitive users may wish to reduce memory usage by creating the /// vector manually: use `start_vector`, `push`, and `end_vector`. #[inline] - pub fn create_vector<'a: 'b, 'b, T: Push + Copy + 'b>( + pub fn create_vector<'a: 'b, 'b, T: Push + 'b>( &'a mut self, items: &'b [T], ) -> WIPOffset> { let elem_size = T::size(); - self.align(items.len() * elem_size, T::alignment().max_of(SIZE_UOFFSET)); - for i in (0..items.len()).rev() { - self.push(items[i]); + let slice_size = items.len() * elem_size; + self.align(slice_size, T::alignment().max_of(SIZE_UOFFSET)); + self.ensure_capacity(slice_size + UOffsetT::size()); + + self.head -= slice_size; + let mut written_len = self.owned_buf.len() - self.head; + + let buf = &mut self.owned_buf[self.head..self.head + slice_size]; + for (item, out) in items.iter().zip(buf.chunks_exact_mut(elem_size)) { + written_len -= elem_size; + + // Safety: + // Called ensure_capacity and aligned to T above + unsafe { item.push(out, written_len) }; } + WIPOffset::new(self.push::(items.len() as UOffsetT).value()) } @@ -384,17 +343,18 @@ impl<'fbb> FlatBufferBuilder<'fbb> { /// Speed-sensitive users may wish to reduce memory usage by creating the /// vector manually: use `start_vector`, `push`, and `end_vector`. #[inline] - pub fn create_vector_from_iter( + pub fn create_vector_from_iter( &mut self, items: impl ExactSizeIterator + DoubleEndedIterator, ) -> WIPOffset> { let elem_size = T::size(); - let len = items.len(); - self.align(len * elem_size, T::alignment().max_of(SIZE_UOFFSET)); + self.align(items.len() * elem_size, T::alignment().max_of(SIZE_UOFFSET)); + let mut actual = 0; for item in items.rev() { self.push(item); + actual += 1; } - WIPOffset::new(self.push::(len as UOffsetT).value()) + WIPOffset::new(self.push::(actual).value()) } /// Set whether default values are stored. @@ -443,7 +403,15 @@ impl<'fbb> FlatBufferBuilder<'fbb> { assert_msg_name: &'static str, ) { let idx = self.used_space() - tab_revloc.value() as usize; - let tab = Table::new(&self.owned_buf[self.head..], idx); + + // Safety: + // The value of TableFinishedWIPOffset is the offset from the end of owned_buf + // to an SOffsetT pointing to a valid VTable + // + // `self.owned_buf.len() = self.used_space() + self.head` + // `self.owned_buf.len() - tab_revloc = self.used_space() - tab_revloc + self.head` + // `self.owned_buf.len() - tab_revloc = idx + self.head` + let tab = unsafe { Table::new(&self.owned_buf[self.head..], idx) }; let o = tab.vtable().get(slot_byte_loc) as usize; assert!(o != 0, "missing required field {}", assert_msg_name); } @@ -560,11 +528,15 @@ impl<'fbb> FlatBufferBuilder<'fbb> { } } let new_vt_bytes = &self.owned_buf[vt_start_pos..vt_end_pos]; - let found = self.written_vtable_revpos.binary_search_by(|old_vtable_revpos: &UOffsetT| { - let old_vtable_pos = self.owned_buf.len() - *old_vtable_revpos as usize; - let old_vtable = VTable::init(&self.owned_buf, old_vtable_pos); - new_vt_bytes.cmp(old_vtable.as_bytes()) - }); + let found = self + .written_vtable_revpos + .binary_search_by(|old_vtable_revpos: &UOffsetT| { + let old_vtable_pos = self.owned_buf.len() - *old_vtable_revpos as usize; + // Safety: + // Already written vtables are valid by construction + let old_vtable = unsafe { VTable::init(&self.owned_buf, old_vtable_pos) }; + new_vt_bytes.cmp(old_vtable.as_bytes()) + }); let final_vtable_revpos = match found { Ok(i) => { // The new vtable is a duplicate so clear it. @@ -581,12 +553,22 @@ impl<'fbb> FlatBufferBuilder<'fbb> { }; // Write signed offset from table to its vtable. let table_pos = self.owned_buf.len() - object_revloc_to_vtable.value() as usize; - let tmp_soffset_to_vt = unsafe { read_scalar_at::(&self.owned_buf, table_pos) }; - debug_assert_eq!(tmp_soffset_to_vt, 0xF0F0_F0F0); + if cfg!(debug_assertions) { + // Safety: + // Verified slice length + let tmp_soffset_to_vt = unsafe { + read_scalar::(&self.owned_buf[table_pos..table_pos + SIZE_UOFFSET]) + }; + assert_eq!(tmp_soffset_to_vt, 0xF0F0_F0F0); + } + + let buf = &mut self.owned_buf[table_pos..table_pos + SIZE_SOFFSET]; + // Safety: + // Verified length of buf above unsafe { emplace_scalar::( - &mut self.owned_buf[table_pos..table_pos + SIZE_SOFFSET], - final_vtable_revpos as SOffsetT - object_revloc_to_vtable.value() as SOffsetT + buf, + final_vtable_revpos as SOffsetT - object_revloc_to_vtable.value() as SOffsetT, ); } @@ -623,7 +605,9 @@ impl<'fbb> FlatBufferBuilder<'fbb> { } // finally, zero out the old end data. { - let ptr = (&mut self.owned_buf[..middle]).as_mut_ptr(); + let ptr = self.owned_buf[..middle].as_mut_ptr(); + // Safety: + // ptr is byte aligned and of length middle unsafe { write_bytes(ptr, 0, middle); } diff --git a/third_party/flatbuffers/rust/flatbuffers/src/endian_scalar.rs b/third_party/flatbuffers/rust/flatbuffers/src/endian_scalar.rs index 5f50cf1f36..48cb83e2f9 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/endian_scalar.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/endian_scalar.rs @@ -17,6 +17,24 @@ use core::mem::size_of; +mod private { + /// Types that are trivially transmutable are those where any combination of bits + /// represents a valid value of that type + /// + /// For example integral types are TriviallyTransmutable as all bit patterns are valid, + /// however, `bool` is not trivially transmutable as only `0` and `1` are valid + pub trait TriviallyTransmutable {} + + impl TriviallyTransmutable for i8 {} + impl TriviallyTransmutable for i16 {} + impl TriviallyTransmutable for i32 {} + impl TriviallyTransmutable for i64 {} + impl TriviallyTransmutable for u8 {} + impl TriviallyTransmutable for u16 {} + impl TriviallyTransmutable for u32 {} + impl TriviallyTransmutable for u64 {} +} + /// Trait for values that must be stored in little-endian byte order, but /// might be represented in memory as big-endian. Every type that implements /// EndianScalar is a valid FlatBuffers scalar value. @@ -28,144 +46,118 @@ use core::mem::size_of; /// "too much". For example, num-traits provides i128 support, but that is an /// invalid FlatBuffers type. pub trait EndianScalar: Sized + PartialEq + Copy + Clone { - fn to_little_endian(self) -> Self; - fn from_little_endian(self) -> Self; -} + type Scalar: private::TriviallyTransmutable; -/// Macro for implementing a no-op endian conversion. This is used for types -/// that are one byte wide. -macro_rules! impl_endian_scalar_noop { - ($ty:ident) => { - impl EndianScalar for $ty { - #[inline] - fn to_little_endian(self) -> Self { - self - } - #[inline] - fn from_little_endian(self) -> Self { - self - } - } - }; + fn to_little_endian(self) -> Self::Scalar; + + fn from_little_endian(v: Self::Scalar) -> Self; } /// Macro for implementing an endian conversion using the stdlib `to_le` and /// `from_le` functions. This is used for integer types. It is not used for /// floats, because the `to_le` and `from_le` are not implemented for them in /// the stdlib. -macro_rules! impl_endian_scalar_stdlib_le_conversion { +macro_rules! impl_endian_scalar { ($ty:ident) => { impl EndianScalar for $ty { + type Scalar = Self; + #[inline] - fn to_little_endian(self) -> Self { + fn to_little_endian(self) -> Self::Scalar { Self::to_le(self) } #[inline] - fn from_little_endian(self) -> Self { - Self::from_le(self) + fn from_little_endian(v: Self::Scalar) -> Self { + Self::from_le(v) } } }; } -impl_endian_scalar_noop!(bool); -impl_endian_scalar_noop!(u8); -impl_endian_scalar_noop!(i8); +impl_endian_scalar!(u8); +impl_endian_scalar!(i8); +impl_endian_scalar!(u16); +impl_endian_scalar!(u32); +impl_endian_scalar!(u64); +impl_endian_scalar!(i16); +impl_endian_scalar!(i32); +impl_endian_scalar!(i64); + +impl EndianScalar for bool { + type Scalar = u8; -impl_endian_scalar_stdlib_le_conversion!(u16); -impl_endian_scalar_stdlib_le_conversion!(u32); -impl_endian_scalar_stdlib_le_conversion!(u64); -impl_endian_scalar_stdlib_le_conversion!(i16); -impl_endian_scalar_stdlib_le_conversion!(i32); -impl_endian_scalar_stdlib_le_conversion!(i64); + fn to_little_endian(self) -> Self::Scalar { + self as u8 + } + + fn from_little_endian(v: Self::Scalar) -> Self { + v != 0 + } +} impl EndianScalar for f32 { + type Scalar = u32; /// Convert f32 from host endian-ness to little-endian. #[inline] - fn to_little_endian(self) -> Self { - #[cfg(target_endian = "little")] - { - self - } - #[cfg(not(target_endian = "little"))] - { - byte_swap_f32(self) - } + fn to_little_endian(self) -> u32 { + // Floats and Ints have the same endianness on all supported platforms. + // + self.to_bits().to_le() } /// Convert f32 from little-endian to host endian-ness. #[inline] - fn from_little_endian(self) -> Self { - #[cfg(target_endian = "little")] - { - self - } - #[cfg(not(target_endian = "little"))] - { - byte_swap_f32(self) - } + fn from_little_endian(v: u32) -> Self { + // Floats and Ints have the same endianness on all supported platforms. + // + f32::from_bits(u32::from_le(v)) } } impl EndianScalar for f64 { + type Scalar = u64; + /// Convert f64 from host endian-ness to little-endian. #[inline] - fn to_little_endian(self) -> Self { - #[cfg(target_endian = "little")] - { - self - } - #[cfg(not(target_endian = "little"))] - { - byte_swap_f64(self) - } + fn to_little_endian(self) -> u64 { + // Floats and Ints have the same endianness on all supported platforms. + // + self.to_bits().to_le() } /// Convert f64 from little-endian to host endian-ness. #[inline] - fn from_little_endian(self) -> Self { - #[cfg(target_endian = "little")] - { - self - } - #[cfg(not(target_endian = "little"))] - { - byte_swap_f64(self) - } + fn from_little_endian(v: u64) -> Self { + // Floats and Ints have the same endianness on all supported platforms. + // + f64::from_bits(u64::from_le(v)) } } -/// Swaps the bytes of an f32. -#[allow(dead_code)] -#[inline] -pub fn byte_swap_f32(x: f32) -> f32 { - f32::from_bits(x.to_bits().swap_bytes()) -} - -/// Swaps the bytes of an f64. -#[allow(dead_code)] -#[inline] -pub fn byte_swap_f64(x: f64) -> f64 { - f64::from_bits(x.to_bits().swap_bytes()) -} - /// Place an EndianScalar into the provided mutable byte slice. Performs /// endian conversion, if necessary. /// # Safety -/// Caller must ensure `s.len() > size_of::()` -/// and `x` does not overlap with `s`. +/// Caller must ensure `s.len() >= size_of::()` #[inline] pub unsafe fn emplace_scalar(s: &mut [u8], x: T) { + let size = size_of::(); + debug_assert!( + s.len() >= size, + "insufficient capacity for emplace_scalar, needed {} got {}", + size, + s.len() + ); + let x_le = x.to_little_endian(); core::ptr::copy_nonoverlapping( - &x_le as *const T as *const u8, + &x_le as *const T::Scalar as *const u8, s.as_mut_ptr() as *mut u8, - size_of::(), + size, ); } /// Read an EndianScalar from the provided byte slice at the specified location. /// Performs endian conversion, if necessary. /// # Safety -/// Caller must ensure `s.len() > loc + size_of::()`. +/// Caller must ensure `s.len() >= loc + size_of::()`. #[inline] pub unsafe fn read_scalar_at(s: &[u8], loc: usize) -> T { read_scalar(&s[loc..]) @@ -177,8 +169,16 @@ pub unsafe fn read_scalar_at(s: &[u8], loc: usize) -> T { /// Caller must ensure `s.len() > size_of::()`. #[inline] pub unsafe fn read_scalar(s: &[u8]) -> T { - let mut mem = core::mem::MaybeUninit::::uninit(); + let size = size_of::(); + debug_assert!( + s.len() >= size, + "insufficient capacity for emplace_scalar, needed {} got {}", + size, + s.len() + ); + + let mut mem = core::mem::MaybeUninit::::uninit(); // Since [u8] has alignment 1, we copy it into T which may have higher alignment. - core::ptr::copy_nonoverlapping(s.as_ptr(), mem.as_mut_ptr() as *mut u8, size_of::()); - mem.assume_init().from_little_endian() + core::ptr::copy_nonoverlapping(s.as_ptr(), mem.as_mut_ptr() as *mut u8, size); + T::from_little_endian(mem.assume_init()) } diff --git a/third_party/flatbuffers/rust/flatbuffers/src/follow.rs b/third_party/flatbuffers/rust/flatbuffers/src/follow.rs index c14fec32dc..6adcd4f645 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/follow.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/follow.rs @@ -29,7 +29,11 @@ use core::marker::PhantomData; /// continue traversing the FlatBuffer. pub trait Follow<'buf> { type Inner; - fn follow(buf: &'buf [u8], loc: usize) -> Self::Inner; + /// # Safety + /// + /// `buf[loc..]` must contain a valid value of `Self` and anything it + /// transitively refers to by offset must also be valid + unsafe fn follow(buf: &'buf [u8], loc: usize) -> Self::Inner; } /// FollowStart wraps a Follow impl in a struct type. This can make certain @@ -39,17 +43,21 @@ pub struct FollowStart(PhantomData); impl<'a, T: Follow<'a> + 'a> FollowStart { #[inline] pub fn new() -> Self { - Self { 0: PhantomData } + Self(PhantomData) } + + /// # Safety + /// + /// `buf[loc..]` must contain a valid value of `T` #[inline] - pub fn self_follow(&'a self, buf: &'a [u8], loc: usize) -> T::Inner { + pub unsafe fn self_follow(&'a self, buf: &'a [u8], loc: usize) -> T::Inner { T::follow(buf, loc) } } impl<'a, T: Follow<'a>> Follow<'a> for FollowStart { type Inner = T::Inner; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { T::follow(buf, loc) } } diff --git a/third_party/flatbuffers/rust/flatbuffers/src/get_root.rs b/third_party/flatbuffers/rust/flatbuffers/src/get_root.rs index 3305efade8..372d02f73c 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/get_root.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/get_root.rs @@ -45,6 +45,8 @@ where { let mut v = Verifier::new(opts, data); >::run_verifier(&mut v, 0)?; + // Safety: + // Run verifier above Ok(unsafe { root_unchecked::(data) }) } @@ -75,6 +77,8 @@ where { let mut v = Verifier::new(opts, data); >>::run_verifier(&mut v, 0)?; + // Safety: + // Run verifier above Ok(unsafe { size_prefixed_root_unchecked::(data) }) } diff --git a/third_party/flatbuffers/rust/flatbuffers/src/lib.rs b/third_party/flatbuffers/rust/flatbuffers/src/lib.rs index f597ef0b23..2741811ab5 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/lib.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/lib.rs @@ -28,9 +28,10 @@ //! At this time, to generate Rust code, you will need the latest `master` version of `flatc`, available from here: //! (On OSX, you can install FlatBuffers from `HEAD` with the Homebrew package manager.) -#![cfg_attr(feature = "no_std", no_std)] +#![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(all(nightly, not(feature = "std")), feature(error_in_core))] -#[cfg(feature = "no_std")] +#[cfg(not(feature = "std"))] extern crate alloc; mod array; @@ -48,14 +49,12 @@ mod vtable_writer; pub use crate::array::{array_init, emplace_scalar_array, Array}; pub use crate::builder::FlatBufferBuilder; -pub use crate::endian_scalar::{ - byte_swap_f32, byte_swap_f64, emplace_scalar, read_scalar, read_scalar_at, EndianScalar, -}; +pub use crate::endian_scalar::{emplace_scalar, read_scalar, read_scalar_at, EndianScalar}; pub use crate::follow::{Follow, FollowStart, FollowWith}; pub use crate::primitives::*; pub use crate::push::Push; pub use crate::table::{buffer_has_identifier, Table}; -pub use crate::vector::{follow_cast_ref, SafeSliceAccess, Vector, VectorIter}; +pub use crate::vector::{follow_cast_ref, Vector, VectorIter}; pub use crate::verifier::{ ErrorTraceDetail, InvalidFlatbuffer, SimpleToVerifyInSlice, Verifiable, Verifier, VerifierOptions, @@ -64,6 +63,4 @@ pub use crate::vtable::field_index_to_field_offset; pub use bitflags; pub use get_root::*; -// TODO(rw): Unify `create_vector` and `create_vector_direct` by using -// `Into>`. // TODO(rw): Split fill ops in builder into fill_small, fill_big like in C++. diff --git a/third_party/flatbuffers/rust/flatbuffers/src/primitives.rs b/third_party/flatbuffers/rust/flatbuffers/src/primitives.rs index 4c12af87ed..1005941831 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/primitives.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/primitives.rs @@ -112,10 +112,7 @@ impl<'a, T: 'a> WIPOffset { /// Create a new WIPOffset. #[inline] pub fn new(o: UOffsetT) -> WIPOffset { - WIPOffset { - 0: o, - 1: PhantomData, - } + WIPOffset(o, PhantomData) } /// Return a wrapped value that brings its meaning as a union WIPOffset @@ -135,11 +132,9 @@ impl Push for WIPOffset { type Output = ForwardsUOffset; #[inline(always)] - fn push(&self, dst: &mut [u8], rest: &[u8]) { - let n = (SIZE_UOFFSET + rest.len() - self.value() as usize) as UOffsetT; - unsafe { - emplace_scalar::(dst, n); - } + unsafe fn push(&self, dst: &mut [u8], written_len: usize) { + let n = (SIZE_UOFFSET + written_len - self.value() as usize) as UOffsetT; + emplace_scalar::(dst, n); } } @@ -147,8 +142,8 @@ impl Push for ForwardsUOffset { type Output = Self; #[inline(always)] - fn push(&self, dst: &mut [u8], rest: &[u8]) { - self.value().push(dst, rest); + unsafe fn push(&self, dst: &mut [u8], written_len: usize) { + self.value().push(dst, written_len); } } @@ -179,9 +174,9 @@ impl ForwardsUOffset { impl<'a, T: Follow<'a>> Follow<'a> for ForwardsUOffset { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { let slice = &buf[loc..loc + SIZE_UOFFSET]; - let off = unsafe { read_scalar::(slice) as usize }; + let off = read_scalar::(slice) as usize; T::follow(buf, loc + off) } } @@ -200,9 +195,9 @@ impl ForwardsVOffset { impl<'a, T: Follow<'a>> Follow<'a> for ForwardsVOffset { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { let slice = &buf[loc..loc + SIZE_VOFFSET]; - let off = unsafe { read_scalar::(slice) as usize }; + let off = read_scalar::(slice) as usize; T::follow(buf, loc + off) } } @@ -211,8 +206,8 @@ impl Push for ForwardsVOffset { type Output = Self; #[inline] - fn push(&self, dst: &mut [u8], rest: &[u8]) { - self.value().push(dst, rest); + unsafe fn push(&self, dst: &mut [u8], written_len: usize) { + self.value().push(dst, written_len); } } @@ -230,9 +225,9 @@ impl BackwardsSOffset { impl<'a, T: Follow<'a>> Follow<'a> for BackwardsSOffset { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { let slice = &buf[loc..loc + SIZE_SOFFSET]; - let off = unsafe { read_scalar::(slice) }; + let off = read_scalar::(slice); T::follow(buf, (loc as SOffsetT - off) as usize) } } @@ -241,8 +236,8 @@ impl Push for BackwardsSOffset { type Output = Self; #[inline] - fn push(&self, dst: &mut [u8], rest: &[u8]) { - self.value().push(dst, rest); + unsafe fn push(&self, dst: &mut [u8], written_len: usize) { + self.value().push(dst, written_len); } } @@ -252,7 +247,7 @@ pub struct SkipSizePrefix(PhantomData); impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipSizePrefix { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { T::follow(buf, loc + SIZE_SIZEPREFIX) } } @@ -263,7 +258,7 @@ pub struct SkipRootOffset(PhantomData); impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipRootOffset { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { T::follow(buf, loc + SIZE_UOFFSET) } } @@ -274,7 +269,7 @@ pub struct FileIdentifier; impl<'a> Follow<'a> for FileIdentifier { type Inner = &'a [u8]; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { &buf[loc..loc + FILE_IDENTIFIER_LENGTH] } } @@ -286,7 +281,7 @@ pub struct SkipFileIdentifier(PhantomData); impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipFileIdentifier { type Inner = T::Inner; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { T::follow(buf, loc + FILE_IDENTIFIER_LENGTH) } } @@ -294,8 +289,8 @@ impl<'a, T: Follow<'a> + 'a> Follow<'a> for SkipFileIdentifier { impl<'a> Follow<'a> for bool { type Inner = bool; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - unsafe { read_scalar_at::(buf, loc) != 0 } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + read_scalar_at::(buf, loc) != 0 } } @@ -309,8 +304,8 @@ macro_rules! impl_follow_for_endian_scalar { impl<'a> Follow<'a> for $ty { type Inner = $ty; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - unsafe { read_scalar_at::<$ty>(buf, loc) } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + read_scalar_at::<$ty>(buf, loc) } } }; diff --git a/third_party/flatbuffers/rust/flatbuffers/src/push.rs b/third_party/flatbuffers/rust/flatbuffers/src/push.rs index 8bb8fe9a7d..20bacd8e2e 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/push.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/push.rs @@ -24,7 +24,11 @@ use crate::endian_scalar::emplace_scalar; /// types. pub trait Push: Sized { type Output; - fn push(&self, dst: &mut [u8], _rest: &[u8]); + + /// # Safety + /// + /// dst is aligned to [`Self::alignment`] and has length greater than or equal to [`Self::size`] + unsafe fn push(&self, dst: &mut [u8], written_len: usize); #[inline] fn size() -> usize { size_of::() @@ -35,13 +39,29 @@ pub trait Push: Sized { } } +impl<'a, T: Push> Push for &'a T { + type Output = T::Output; + + unsafe fn push(&self, dst: &mut [u8], written_len: usize) { + T::push(self, dst, written_len) + } + + fn size() -> usize { + T::size() + } + + fn alignment() -> PushAlignment { + T::alignment() + } +} + /// Ensure Push alignment calculations are typesafe (because this helps reduce /// implementation issues when using FlatBufferBuilder::align). pub struct PushAlignment(usize); impl PushAlignment { #[inline] pub fn new(x: usize) -> Self { - PushAlignment { 0: x } + PushAlignment(x) } #[inline] pub fn value(&self) -> usize { @@ -60,10 +80,8 @@ macro_rules! impl_push_for_endian_scalar { type Output = $ty; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { - emplace_scalar::<$ty>(dst, *self); - } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + emplace_scalar::<$ty>(dst, *self); } } }; diff --git a/third_party/flatbuffers/rust/flatbuffers/src/table.rs b/third_party/flatbuffers/rust/flatbuffers/src/table.rs index cfb85590d0..c3242193ae 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/table.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/table.rs @@ -18,23 +18,36 @@ use crate::follow::Follow; use crate::primitives::*; use crate::vtable::VTable; -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct Table<'a> { pub buf: &'a [u8], pub loc: usize, } impl<'a> Table<'a> { + /// # Safety + /// + /// `buf` must contain a `soffset_t` at `loc`, which points to a valid vtable #[inline] - pub fn new(buf: &'a [u8], loc: usize) -> Self { + pub unsafe fn new(buf: &'a [u8], loc: usize) -> Self { Table { buf, loc } } + #[inline] pub fn vtable(&self) -> VTable<'a> { - >>::follow(self.buf, self.loc) + // Safety: + // Table::new is created with a valid buf and location + unsafe { >>::follow(self.buf, self.loc) } } + + /// Retrieves the value at the provided `slot_byte_loc` returning `default` + /// if no value present + /// + /// # Safety + /// + /// The value of the corresponding slot must have type T #[inline] - pub fn get + 'a>( + pub unsafe fn get + 'a>( &self, slot_byte_loc: VOffsetT, default: Option, @@ -50,19 +63,26 @@ impl<'a> Table<'a> { impl<'a> Follow<'a> for Table<'a> { type Inner = Table<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Table { buf, loc } } } +/// Returns true if data contains a prefix of `ident` #[inline] pub fn buffer_has_identifier(data: &[u8], ident: &str, size_prefixed: bool) -> bool { assert_eq!(ident.len(), FILE_IDENTIFIER_LENGTH); let got = if size_prefixed { - >>::follow(data, 0) + assert!(data.len() >= SIZE_SIZEPREFIX + SIZE_UOFFSET + FILE_IDENTIFIER_LENGTH); + // Safety: + // Verified data has sufficient bytes + unsafe { >>::follow(data, 0) } } else { - >::follow(data, 0) + assert!(data.len() >= SIZE_UOFFSET + FILE_IDENTIFIER_LENGTH); + // Safety: + // Verified data has sufficient bytes + unsafe { >::follow(data, 0) } }; ident.as_bytes() == got diff --git a/third_party/flatbuffers/rust/flatbuffers/src/vector.rs b/third_party/flatbuffers/rust/flatbuffers/src/vector.rs index da04ef6fc3..b486ff33c0 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/vector.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/vector.rs @@ -17,13 +17,10 @@ use core::fmt::{Debug, Formatter, Result}; use core::iter::{DoubleEndedIterator, ExactSizeIterator, FusedIterator}; use core::marker::PhantomData; -use core::mem::size_of; -use core::slice::from_raw_parts; +use core::mem::{align_of, size_of}; use core::str::from_utf8_unchecked; use crate::endian_scalar::read_scalar_at; -#[cfg(target_endian = "little")] -use crate::endian_scalar::EndianScalar; use crate::follow::Follow; use crate::primitives::*; @@ -55,6 +52,7 @@ where // and Clone for `T: Copy` and `T: Clone` respectively. However `Vector<'a, T>` // can always be copied, no matter that `T` you have. impl<'a, T> Copy for Vector<'a, T> {} + impl<'a, T> Clone for Vector<'a, T> { fn clone(&self) -> Self { *self @@ -62,32 +60,46 @@ impl<'a, T> Clone for Vector<'a, T> { } impl<'a, T: 'a> Vector<'a, T> { + /// # Safety + /// + /// `buf` contains a valid vector at `loc` consisting of + /// + /// - UOffsetT element count + /// - Consecutive list of `T` elements #[inline(always)] - pub fn new(buf: &'a [u8], loc: usize) -> Self { - Vector { - 0: buf, - 1: loc, - 2: PhantomData, - } + pub unsafe fn new(buf: &'a [u8], loc: usize) -> Self { + Vector(buf, loc, PhantomData) } #[inline(always)] pub fn len(&self) -> usize { + // Safety: + // Valid vector at time of construction starting with UOffsetT element count unsafe { read_scalar_at::(self.0, self.1) as usize } } + #[inline(always)] pub fn is_empty(&self) -> bool { self.len() == 0 } + + #[inline(always)] + pub fn bytes(&self) -> &'a [u8] { + let sz = size_of::(); + let len = self.len(); + &self.0[self.1 + SIZE_UOFFSET..self.1 + SIZE_UOFFSET + sz * len] + } } impl<'a, T: Follow<'a> + 'a> Vector<'a, T> { #[inline(always)] pub fn get(&self, idx: usize) -> T::Inner { - assert!(idx < self.len() as usize); + assert!(idx < self.len()); let sz = size_of::(); debug_assert!(sz > 0); - T::follow(self.0, self.1 as usize + SIZE_UOFFSET + sz * idx) + // Safety: + // Valid vector at time of construction, verified that idx < element count + unsafe { T::follow(self.0, self.1 as usize + SIZE_UOFFSET + sz * idx) } } #[inline(always)] @@ -96,84 +108,40 @@ impl<'a, T: Follow<'a> + 'a> Vector<'a, T> { } } -pub trait SafeSliceAccess {} -impl<'a, T: SafeSliceAccess + 'a> Vector<'a, T> { - pub fn safe_slice(self) -> &'a [T] { - let buf = self.0; - let loc = self.1; - let sz = size_of::(); - debug_assert!(sz > 0); - let len = unsafe { read_scalar_at::(buf, loc) } as usize; - let data_buf = &buf[loc + SIZE_UOFFSET..loc + SIZE_UOFFSET + len * sz]; - let ptr = data_buf.as_ptr() as *const T; - let s: &'a [T] = unsafe { from_raw_parts(ptr, len) }; - s - } -} - -impl SafeSliceAccess for u8 {} -impl SafeSliceAccess for i8 {} -impl SafeSliceAccess for bool {} - -// TODO(caspern): Get rid of this. Conditional compliation is unnecessary complexity. -// Vectors of primitives just don't work on big endian machines!!! -#[cfg(target_endian = "little")] -mod le_safe_slice_impls { - impl super::SafeSliceAccess for u16 {} - impl super::SafeSliceAccess for u32 {} - impl super::SafeSliceAccess for u64 {} - - impl super::SafeSliceAccess for i16 {} - impl super::SafeSliceAccess for i32 {} - impl super::SafeSliceAccess for i64 {} - - impl super::SafeSliceAccess for f32 {} - impl super::SafeSliceAccess for f64 {} -} - -#[cfg(target_endian = "little")] -pub use self::le_safe_slice_impls::*; - -pub fn follow_cast_ref<'a, T: Sized + 'a>(buf: &'a [u8], loc: usize) -> &'a T { +/// # Safety +/// +/// `buf` must contain a value of T at `loc` and have alignment of 1 +pub unsafe fn follow_cast_ref<'a, T: Sized + 'a>(buf: &'a [u8], loc: usize) -> &'a T { + assert_eq!(align_of::(), 1); let sz = size_of::(); let buf = &buf[loc..loc + sz]; let ptr = buf.as_ptr() as *const T; - unsafe { &*ptr } + // SAFETY + // buf contains a value at loc of type T and T has no alignment requirements + &*ptr } impl<'a> Follow<'a> for &'a str { type Inner = &'a str; - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let len = unsafe { read_scalar_at::(buf, loc) } as usize; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let len = read_scalar_at::(buf, loc) as usize; let slice = &buf[loc + SIZE_UOFFSET..loc + SIZE_UOFFSET + len]; - unsafe { from_utf8_unchecked(slice) } + from_utf8_unchecked(slice) } } -#[cfg(target_endian = "little")] -fn follow_slice_helper(buf: &[u8], loc: usize) -> &[T] { - let sz = size_of::(); - debug_assert!(sz > 0); - let len = unsafe { read_scalar_at::(buf, loc) as usize }; - let data_buf = &buf[loc + SIZE_UOFFSET..loc + SIZE_UOFFSET + len * sz]; - let ptr = data_buf.as_ptr() as *const T; - let s: &[T] = unsafe { from_raw_parts(ptr, len) }; - s -} - -/// Implement direct slice access if the host is little-endian. -#[cfg(target_endian = "little")] -impl<'a, T: EndianScalar> Follow<'a> for &'a [T] { - type Inner = &'a [T]; - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - follow_slice_helper::(buf, loc) +impl<'a> Follow<'a> for &'a [u8] { + type Inner = &'a [u8]; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let len = read_scalar_at::(buf, loc) as usize; + &buf[loc + SIZE_UOFFSET..loc + SIZE_UOFFSET + len] } } /// Implement Follow for all possible Vectors that have Follow-able elements. impl<'a, T: Follow<'a> + 'a> Follow<'a> for Vector<'a, T> { type Inner = Vector<'a, T>; - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Vector::new(buf, loc) } } @@ -201,8 +169,14 @@ impl<'a, T: 'a> VectorIter<'a, T> { } } + /// Creates a new `VectorIter` from the provided slice + /// + /// # Safety + /// + /// buf must contain a contiguous sequence of `items_num` values of `T` + /// #[inline] - pub fn from_slice(buf: &'a [u8], items_num: usize) -> Self { + pub unsafe fn from_slice(buf: &'a [u8], items_num: usize) -> Self { VectorIter { buf, loc: 0, @@ -235,7 +209,10 @@ impl<'a, T: Follow<'a> + 'a> Iterator for VectorIter<'a, T> { if self.remaining == 0 { None } else { - let result = T::follow(self.buf, self.loc); + // Safety: + // VectorIter can only be created from a contiguous sequence of `items_num` + // And remaining is initialized to `items_num` + let result = unsafe { T::follow(self.buf, self.loc) }; self.loc += sz; self.remaining -= 1; Some(result) @@ -272,7 +249,10 @@ impl<'a, T: Follow<'a> + 'a> DoubleEndedIterator for VectorIter<'a, T> { None } else { self.remaining -= 1; - Some(T::follow(self.buf, self.loc + sz * self.remaining)) + // Safety: + // VectorIter can only be created from a contiguous sequence of `items_num` + // And remaining is initialized to `items_num` + Some(unsafe { T::follow(self.buf, self.loc + sz * self.remaining) }) } } @@ -309,7 +289,7 @@ impl<'a, 'b, T: Follow<'a> + 'a> IntoIterator for &'b Vector<'a, T> { } } -#[cfg(feature="serialize")] +#[cfg(feature = "serialize")] impl<'a, T> serde::ser::Serialize for Vector<'a, T> where T: 'a + Follow<'a>, diff --git a/third_party/flatbuffers/rust/flatbuffers/src/verifier.rs b/third_party/flatbuffers/rust/flatbuffers/src/verifier.rs index 36a5775e30..047d4f6136 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/verifier.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/verifier.rs @@ -1,14 +1,14 @@ -#[cfg(feature = "no_std")] +use crate::follow::Follow; +use crate::{ForwardsUOffset, SOffsetT, SkipSizePrefix, UOffsetT, VOffsetT, Vector, SIZE_UOFFSET}; +#[cfg(not(feature = "std"))] use alloc::vec::Vec; use core::ops::Range; use core::option::Option; -use crate::follow::Follow; -use crate::{ForwardsUOffset, SOffsetT, SkipSizePrefix, UOffsetT, VOffsetT, Vector, SIZE_UOFFSET}; -#[cfg(feature="no_std")] -use thiserror_core2::Error; -#[cfg(not(feature="no_std"))] -use thiserror::Error; +#[cfg(all(nightly, not(feature = "std")))] +use core::error::Error; +#[cfg(feature = "std")] +use std::error::Error; /// Traces the location of data errors. Not populated for Dos detecting errors. /// Useful for MissingRequiredField and Utf8Error in particular, though @@ -28,8 +28,10 @@ pub enum ErrorTraceDetail { position: usize, }, } + #[derive(PartialEq, Eq, Default, Debug, Clone)] pub struct ErrorTrace(Vec); + impl core::convert::AsRef<[ErrorTraceDetail]> for ErrorTrace { #[inline] fn as_ref(&self) -> &[ErrorTraceDetail] { @@ -39,64 +41,138 @@ impl core::convert::AsRef<[ErrorTraceDetail]> for ErrorTrace { /// Describes how a flatuffer is invalid and, for data errors, roughly where. No extra tracing /// information is given for DoS detecting errors since it will probably be a lot. -#[derive(Clone, Error, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum InvalidFlatbuffer { - #[error("Missing required field `{required}`.\n{error_trace}")] MissingRequiredField { required: &'static str, error_trace: ErrorTrace, }, - #[error( - "Union exactly one of union discriminant (`{field_type}`) and value \ - (`{field}`) are present.\n{error_trace}" - )] InconsistentUnion { field: &'static str, field_type: &'static str, error_trace: ErrorTrace, }, - #[error("Utf8 error for string in {range:?}: {error}\n{error_trace}")] Utf8Error { - #[source] error: core::str::Utf8Error, range: Range, error_trace: ErrorTrace, }, - #[error("String in range [{}, {}) is missing its null terminator.\n{error_trace}", - range.start, range.end)] MissingNullTerminator { range: Range, error_trace: ErrorTrace, }, - #[error("Type `{unaligned_type}` at position {position} is unaligned.\n{error_trace}")] Unaligned { position: usize, unaligned_type: &'static str, error_trace: ErrorTrace, }, - #[error("Range [{}, {}) is out of bounds.\n{error_trace}", range.start, range.end)] RangeOutOfBounds { range: Range, error_trace: ErrorTrace, }, - #[error( - "Signed offset at position {position} has value {soffset} which points out of bounds.\ - \n{error_trace}" - )] SignedOffsetOutOfBounds { soffset: SOffsetT, position: usize, error_trace: ErrorTrace, }, // Dos detecting errors. These do not get error traces since it will probably be very large. - #[error("Too many tables.")] TooManyTables, - #[error("Apparent size too large.")] ApparentSizeTooLarge, - #[error("Nested table depth limit reached.")] DepthLimitReached, } +#[cfg(any(nightly, feature = "std"))] +impl Error for InvalidFlatbuffer { + fn source(&self) -> Option<&(dyn Error + 'static)> { + if let InvalidFlatbuffer::Utf8Error { error: source, .. } = self { + Some(source) + } else { + None + } + } +} + +impl core::fmt::Display for InvalidFlatbuffer { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + match self { + InvalidFlatbuffer::MissingRequiredField { + required, + error_trace, + } => { + writeln!(f, "Missing required field `{}`.\n{}", required, error_trace)?; + } + InvalidFlatbuffer::InconsistentUnion { + field, + field_type, + error_trace, + } => { + writeln!( + f, + "Exactly one of union discriminant (`{}`) and value (`{}`) are present.\n{}", + field_type, field, error_trace + )?; + } + InvalidFlatbuffer::Utf8Error { + error, + range, + error_trace, + } => { + writeln!( + f, + "Utf8 error for string in {:?}: {}\n{}", + range, error, error_trace + )?; + } + InvalidFlatbuffer::MissingNullTerminator { range, error_trace } => { + writeln!( + f, + "String in range [{}, {}) is missing its null terminator.\n{}", + range.start, range.end, error_trace + )?; + } + InvalidFlatbuffer::Unaligned { + position, + unaligned_type, + error_trace, + } => { + writeln!( + f, + "Type `{}` at position {} is unaligned.\n{}", + unaligned_type, position, error_trace + )?; + } + InvalidFlatbuffer::RangeOutOfBounds { range, error_trace } => { + writeln!( + f, + "Range [{}, {}) is out of bounds.\n{}", + range.start, range.end, error_trace + )?; + } + InvalidFlatbuffer::SignedOffsetOutOfBounds { + soffset, + position, + error_trace, + } => { + writeln!( + f, + "Signed offset at position {} has value {} which points out of bounds.\n{}", + position, soffset, error_trace + )?; + } + InvalidFlatbuffer::TooManyTables {} => { + writeln!(f, "Too many tables.")?; + } + InvalidFlatbuffer::ApparentSizeTooLarge {} => { + writeln!(f, "Apparent size too large.")?; + } + InvalidFlatbuffer::DepthLimitReached {} => { + writeln!(f, "Nested table depth limit reached.")?; + } + } + Ok(()) + } +} + impl core::fmt::Display for ErrorTrace { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { use ErrorTraceDetail::*; @@ -184,6 +260,7 @@ fn trace_field(res: Result, field_name: &'static str, position: usize) -> }, ) } + /// Adds a TableField trace detail if `res` is a data error. fn trace_elem(res: Result, index: usize, position: usize) -> Result { append_trace(res, ErrorTraceDetail::VectorElement { index, position }) @@ -205,6 +282,7 @@ pub struct VerifierOptions { // options to error un-recognized enums and unions? possible footgun. // Ignore nested flatbuffers, etc? } + impl Default for VerifierOptions { fn default() -> Self { Self { @@ -226,6 +304,7 @@ pub struct Verifier<'opts, 'buf> { num_tables: usize, apparent_size: usize, } + impl<'opts, 'buf> Verifier<'opts, 'buf> { pub fn new(opts: &'opts VerifierOptions, buffer: &'buf [u8]) -> Self { Self { @@ -247,9 +326,12 @@ impl<'opts, 'buf> Verifier<'opts, 'buf> { /// memory since `buffer: &[u8]` has alignment 1. /// /// ### WARNING + /// /// This does not work for flatbuffers-structs as they have alignment 1 according to /// `core::mem::align_of` but are meant to have higher alignment within a Flatbuffer w.r.t. /// `buffer[0]`. TODO(caspern). + /// + /// Note this does not impact soundness as this crate does not assume alignment of structs #[inline] fn is_aligned(&self, pos: usize) -> Result<()> { if pos % core::mem::align_of::() == 0 { @@ -307,9 +389,9 @@ impl<'opts, 'buf> Verifier<'opts, 'buf> { // signed offsets are subtracted. let derefed = if offset > 0 { - pos.checked_sub(offset.abs() as usize) + pos.checked_sub(offset.unsigned_abs() as usize) } else { - pos.checked_add(offset.abs() as usize) + pos.checked_add(offset.unsigned_abs() as usize) }; if let Some(x) = derefed { if x < self.buffer.len() { @@ -372,6 +454,7 @@ pub struct TableVerifier<'ver, 'opts, 'buf> { // Verifier struct which holds the surrounding state and options. verifier: &'ver mut Verifier<'opts, 'buf>, } + impl<'ver, 'opts, 'buf> TableVerifier<'ver, 'opts, 'buf> { fn deref(&mut self, field: VOffsetT) -> Result> { let field = field as usize; @@ -439,7 +522,9 @@ impl<'ver, 'opts, 'buf> TableVerifier<'ver, 'opts, 'buf> { } (Some(k), Some(v)) => { trace_field(Key::run_verifier(self.verifier, k), key_field_name, k)?; - let discriminant = Key::follow(self.verifier.buffer, k); + // Safety: + // Run verifier on `k` above + let discriminant = unsafe { Key::follow(self.verifier.buffer, k) }; trace_field( verify_union(discriminant, self.verifier, v), val_field_name, @@ -486,16 +571,27 @@ fn verify_vector_range(v: &mut Verifier, pos: usize) -> Result Verifiable for Vector<'_, T> { diff --git a/third_party/flatbuffers/rust/flatbuffers/src/vtable.rs b/third_party/flatbuffers/rust/flatbuffers/src/vtable.rs index bbb7190ae3..1516153d52 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/vtable.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/vtable.rs @@ -33,24 +33,42 @@ impl<'a> PartialEq for VTable<'a> { } impl<'a> VTable<'a> { - pub fn init(buf: &'a [u8], loc: usize) -> Self { + /// SAFETY + /// `buf` must contain a valid vtable at `loc` + /// + /// This consists of a number of `VOffsetT` + /// - size of vtable in bytes including size element + /// - size of object in bytes including the vtable offset + /// - n fields where n is the number of fields in the table's schema when the code was compiled + pub unsafe fn init(buf: &'a [u8], loc: usize) -> Self { VTable { buf, loc } } + pub fn num_fields(&self) -> usize { (self.num_bytes() / SIZE_VOFFSET) - 2 } + pub fn num_bytes(&self) -> usize { + // Safety: + // Valid VTable at time of construction unsafe { read_scalar_at::(self.buf, self.loc) as usize } } + pub fn object_inline_num_bytes(&self) -> usize { + // Safety: + // Valid VTable at time of construction let n = unsafe { read_scalar_at::(self.buf, self.loc + SIZE_VOFFSET) }; n as usize } + pub fn get_field(&self, idx: usize) -> VOffsetT { // TODO(rw): distinguish between None and 0? if idx > self.num_fields() { return 0; } + + // Safety: + // Valid VTable at time of construction unsafe { read_scalar_at::( self.buf, @@ -58,13 +76,17 @@ impl<'a> VTable<'a> { ) } } + pub fn get(&self, byte_loc: VOffsetT) -> VOffsetT { // TODO(rw): distinguish between None and 0? - if byte_loc as usize >= self.num_bytes() { + if byte_loc as usize + 2 > self.num_bytes() { return 0; } + // Safety: + // byte_loc is within bounds of vtable, which was valid at time of construction unsafe { read_scalar_at::(self.buf, self.loc + byte_loc as usize) } } + pub fn as_bytes(&self) -> &[u8] { let len = self.num_bytes(); &self.buf[self.loc..self.loc + len] @@ -87,7 +109,7 @@ pub fn field_offset_to_field_index(field_o: VOffsetT) -> VOffsetT { impl<'a> Follow<'a> for VTable<'a> { type Inner = VTable<'a>; - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { VTable::init(buf, loc) } } diff --git a/third_party/flatbuffers/rust/flatbuffers/src/vtable_writer.rs b/third_party/flatbuffers/rust/flatbuffers/src/vtable_writer.rs index 9b61dac7fc..4bcde9adca 100644 --- a/third_party/flatbuffers/rust/flatbuffers/src/vtable_writer.rs +++ b/third_party/flatbuffers/rust/flatbuffers/src/vtable_writer.rs @@ -40,8 +40,11 @@ impl<'a> VTableWriter<'a> { /// to the provided value. #[inline(always)] pub fn write_vtable_byte_length(&mut self, n: VOffsetT) { + let buf = &mut self.buf[..SIZE_VOFFSET]; + // Safety: + // Validated range above unsafe { - emplace_scalar::(&mut self.buf[..SIZE_VOFFSET], n); + emplace_scalar::(buf, n); } debug_assert_eq!(n as usize, self.buf.len()); } @@ -49,8 +52,11 @@ impl<'a> VTableWriter<'a> { /// Writes an object length (in bytes) into the vtable. #[inline(always)] pub fn write_object_inline_size(&mut self, n: VOffsetT) { + let buf = &mut self.buf[SIZE_VOFFSET..2 * SIZE_VOFFSET]; + // Safety: + // Validated range above unsafe { - emplace_scalar::(&mut self.buf[SIZE_VOFFSET..2 * SIZE_VOFFSET], n); + emplace_scalar::(buf, n); } } @@ -61,8 +67,11 @@ impl<'a> VTableWriter<'a> { #[inline(always)] pub fn write_field_offset(&mut self, vtable_offset: VOffsetT, object_data_offset: VOffsetT) { let idx = vtable_offset as usize; + let buf = &mut self.buf[idx..idx + SIZE_VOFFSET]; + // Safety: + // Validated range above unsafe { - emplace_scalar::(&mut self.buf[idx..idx + SIZE_VOFFSET], object_data_offset); + emplace_scalar::(buf, object_data_offset); } } @@ -73,6 +82,9 @@ impl<'a> VTableWriter<'a> { // This is the closest thing to memset in Rust right now. let len = self.buf.len(); let p = self.buf.as_mut_ptr() as *mut u8; + + // Safety: + // p is byte aligned and of length `len` unsafe { write_bytes(p, 0, len); } diff --git a/third_party/flatbuffers/rust/flexbuffers/src/buffer.rs b/third_party/flatbuffers/rust/flexbuffers/src/buffer.rs index 4643cb8d45..ad522deccf 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/buffer.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/buffer.rs @@ -70,7 +70,7 @@ impl<'de> Buffer for &'de [u8] { /// Based off of the `empty` function, allows override for optimization purposes. #[inline] fn empty_str() -> Self::BufferString { - &"" + "" } #[inline] diff --git a/third_party/flatbuffers/rust/flexbuffers/src/builder/map.rs b/third_party/flatbuffers/rust/flexbuffers/src/builder/map.rs index 18d7687940..73194c7bf9 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/builder/map.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/builder/map.rs @@ -49,7 +49,7 @@ impl<'a> MapBuilder<'a> { // Nested vector. let start = Some(self.builder.values.len()); VectorBuilder { - builder: &mut self.builder, + builder: self.builder, start, } } @@ -64,7 +64,7 @@ impl<'a> MapBuilder<'a> { // Nested map. let start = Some(self.builder.values.len()); MapBuilder { - builder: &mut self.builder, + builder: self.builder, start, } } diff --git a/third_party/flatbuffers/rust/flexbuffers/src/builder/ser.rs b/third_party/flatbuffers/rust/flexbuffers/src/builder/ser.rs index 7ef77577df..4d8fe53e38 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/builder/ser.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/builder/ser.rs @@ -98,7 +98,7 @@ impl ser::Error for Error { Self::Serde(format!("{}", msg)) } } -impl<'a> ser::SerializeSeq for &mut FlexbufferSerializer { +impl ser::SerializeSeq for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_element(&mut self, value: &T) -> Result<(), Self::Error> @@ -113,14 +113,14 @@ impl<'a> ser::SerializeSeq for &mut FlexbufferSerializer { } // This is unlike a flexbuffers map which requires CString like keys. // Its implemented as alternating keys and values (hopefully). -impl<'a> ser::SerializeMap for &'a mut FlexbufferSerializer { +impl ser::SerializeMap for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_key(&mut self, key: &T) -> Result<(), Self::Error> where T: Serialize, { - key.serialize(MapKeySerializer(&mut **self)) + key.serialize(MapKeySerializer(self)) } fn serialize_value(&mut self, value: &T) -> Result<(), Self::Error> where @@ -132,7 +132,7 @@ impl<'a> ser::SerializeMap for &'a mut FlexbufferSerializer { self.end_map() } } -impl<'a> ser::SerializeTuple for &mut FlexbufferSerializer { +impl ser::SerializeTuple for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_element(&mut self, value: &T) -> Result<(), Self::Error> @@ -145,7 +145,7 @@ impl<'a> ser::SerializeTuple for &mut FlexbufferSerializer { self.end_vector() } } -impl<'a> ser::SerializeTupleStruct for &mut FlexbufferSerializer { +impl ser::SerializeTupleStruct for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_field(&mut self, value: &T) -> Result<(), Self::Error> @@ -158,7 +158,7 @@ impl<'a> ser::SerializeTupleStruct for &mut FlexbufferSerializer { self.end_vector() } } -impl<'a> ser::SerializeStruct for &mut FlexbufferSerializer { +impl ser::SerializeStruct for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_field( @@ -176,7 +176,7 @@ impl<'a> ser::SerializeStruct for &mut FlexbufferSerializer { self.end_map() } } -impl<'a> ser::SerializeTupleVariant for &mut FlexbufferSerializer { +impl ser::SerializeTupleVariant for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_field(&mut self, value: &T) -> Result<(), Self::Error> @@ -190,7 +190,7 @@ impl<'a> ser::SerializeTupleVariant for &mut FlexbufferSerializer { self.end_map() } } -impl<'a> ser::SerializeStructVariant for &mut FlexbufferSerializer { +impl ser::SerializeStructVariant for &mut FlexbufferSerializer { type Ok = (); type Error = Error; fn serialize_field( diff --git a/third_party/flatbuffers/rust/flexbuffers/src/builder/vector.rs b/third_party/flatbuffers/rust/flexbuffers/src/builder/vector.rs index 4d73da3c35..375d49e2aa 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/builder/vector.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/builder/vector.rs @@ -39,7 +39,7 @@ impl<'a> VectorBuilder<'a> { pub fn start_vector(&mut self) -> VectorBuilder { let start = Some(self.builder.values.len()); VectorBuilder { - builder: &mut self.builder, + builder: self.builder, start, } } @@ -48,7 +48,7 @@ impl<'a> VectorBuilder<'a> { pub fn start_map(&mut self) -> MapBuilder { let start = Some(self.builder.values.len()); MapBuilder { - builder: &mut self.builder, + builder: self.builder, start, } } diff --git a/third_party/flatbuffers/rust/flexbuffers/src/lib.rs b/third_party/flatbuffers/rust/flexbuffers/src/lib.rs index 2935190506..760ab16efa 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/lib.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/lib.rs @@ -29,7 +29,7 @@ // Serde with maps - field names and type names. // Until flat/flexbuffers is on Rust v1.42, we cannot use the previously unstable matches! macro. -#![allow(clippy::unknown_clippy_lints)] +#![allow(unknown_lints)] #![allow(clippy::match_like_matches_macro)] #[macro_use] diff --git a/third_party/flatbuffers/rust/flexbuffers/src/reader/mod.rs b/third_party/flatbuffers/rust/flexbuffers/src/reader/mod.rs index c6f51d0662..8e9c247c25 100644 --- a/third_party/flatbuffers/rust/flexbuffers/src/reader/mod.rs +++ b/third_party/flatbuffers/rust/flexbuffers/src/reader/mod.rs @@ -380,7 +380,7 @@ impl Reader { } pub fn as_blob(&self) -> Blob { - self.get_blob().unwrap_or(Blob(B::empty())) + self.get_blob().unwrap_or_else(|_| Blob(B::empty())) } /// Retrieves str pointer, errors if invalid UTF-8, or the provided index @@ -580,8 +580,8 @@ impl Reader { /// Returns empty string if you're not trying to read a string. pub fn as_str(&self) -> B::BufferString { match self.fxb_type { - FlexBufferType::String => self.get_str().unwrap_or(B::empty_str()), - FlexBufferType::Key => self.get_key().unwrap_or(B::empty_str()), + FlexBufferType::String => self.get_str().unwrap_or_else(|_| B::empty_str()), + FlexBufferType::Key => self.get_key().unwrap_or_else(|_| B::empty_str()), _ => B::empty_str(), } } diff --git a/third_party/flatbuffers/samples/monster.bfbs b/third_party/flatbuffers/samples/monster.bfbs index 99a93f5a0b..5b47002040 100644 Binary files a/third_party/flatbuffers/samples/monster.bfbs and b/third_party/flatbuffers/samples/monster.bfbs differ diff --git a/third_party/flatbuffers/samples/monster_generated.h b/third_party/flatbuffers/samples/monster_generated.h index 8c24d17610..31db6a1450 100644 --- a/third_party/flatbuffers/samples/monster_generated.h +++ b/third_party/flatbuffers/samples/monster_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { diff --git a/third_party/flatbuffers/samples/monster_generated.swift b/third_party/flatbuffers/samples/monster_generated.swift index 173bacb90a..72e0e71423 100644 --- a/third_party/flatbuffers/samples/monster_generated.swift +++ b/third_party/flatbuffers/samples/monster_generated.swift @@ -31,7 +31,7 @@ public enum MyGame_Sample_Equipment: UInt8, Enum { public struct MyGame_Sample_Vec3: NativeStruct { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _x: Float32 private var _y: Float32 @@ -56,7 +56,7 @@ public struct MyGame_Sample_Vec3: NativeStruct { public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -72,7 +72,7 @@ public struct MyGame_Sample_Vec3_Mutable: FlatBufferObject { public struct MyGame_Sample_Monster: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -162,7 +162,7 @@ public struct MyGame_Sample_Monster: FlatBufferObject { public struct MyGame_Sample_Weapon: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/samples/rust_generated/my_game/sample/color_generated.rs b/third_party/flatbuffers/samples/rust_generated/my_game/sample/color_generated.rs index 7a7d1d5b24..19e8445a58 100644 --- a/third_party/flatbuffers/samples/rust_generated/my_game/sample/color_generated.rs +++ b/third_party/flatbuffers/samples/rust_generated/my_game/sample/color_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for Color { impl<'a> flatbuffers::Follow<'a> for Color { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for Color { impl flatbuffers::Push for Color { type Output = Color; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Color { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/samples/rust_generated/my_game/sample/equipment_generated.rs b/third_party/flatbuffers/samples/rust_generated/my_game/sample/equipment_generated.rs index 9898c8d4ac..9f9cd35900 100644 --- a/third_party/flatbuffers/samples/rust_generated/my_game/sample/equipment_generated.rs +++ b/third_party/flatbuffers/samples/rust_generated/my_game/sample/equipment_generated.rs @@ -55,10 +55,8 @@ impl core::fmt::Debug for Equipment { impl<'a> flatbuffers::Follow<'a> for Equipment { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -66,21 +64,21 @@ impl<'a> flatbuffers::Follow<'a> for Equipment { impl flatbuffers::Push for Equipment { type Output = Equipment; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Equipment { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/samples/rust_generated/my_game/sample/monster_generated.rs b/third_party/flatbuffers/samples/rust_generated/my_game/sample/monster_generated.rs index 273212f2d5..68ba6d5785 100644 --- a/third_party/flatbuffers/samples/rust_generated/my_game/sample/monster_generated.rs +++ b/third_party/flatbuffers/samples/rust_generated/my_game/sample/monster_generated.rs @@ -19,8 +19,8 @@ pub struct Monster<'a> { impl<'a> flatbuffers::Follow<'a> for Monster<'a> { type Inner = Monster<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -41,7 +41,7 @@ impl<'a> Monster<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Monster { _tab: table } } #[allow(unused_mut)] @@ -73,7 +73,7 @@ impl<'a> Monster<'a> { x.to_string() }); let inventory = self.inventory().map(|x| { - x.to_vec() + x.into_iter().collect() }); let color = self.color(); let weapons = self.weapons().map(|x| { @@ -106,49 +106,84 @@ impl<'a> Monster<'a> { #[inline] pub fn pos(&self) -> Option<&'a Vec3> { - self._tab.get::(Monster::VT_POS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POS, None)} } #[inline] pub fn mana(&self) -> i16 { - self._tab.get::(Monster::VT_MANA, Some(150)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_MANA, Some(150)).unwrap()} } #[inline] pub fn hp(&self) -> i16 { - self._tab.get::(Monster::VT_HP, Some(100)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_HP, Some(100)).unwrap()} } #[inline] pub fn name(&self) -> Option<&'a str> { - self._tab.get::>(Monster::VT_NAME, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_NAME, None)} } #[inline] - pub fn inventory(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_INVENTORY, None).map(|v| v.safe_slice()) + pub fn inventory(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_INVENTORY, None)} } #[inline] pub fn color(&self) -> Color { - self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap()} } #[inline] pub fn weapons(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_WEAPONS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_WEAPONS, None)} } #[inline] pub fn equipped_type(&self) -> Equipment { - self._tab.get::(Monster::VT_EQUIPPED_TYPE, Some(Equipment::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_EQUIPPED_TYPE, Some(Equipment::NONE)).unwrap()} } #[inline] pub fn equipped(&self) -> Option> { - self._tab.get::>>(Monster::VT_EQUIPPED, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_EQUIPPED, None)} } #[inline] - pub fn path(&self) -> Option<&'a [Vec3]> { - self._tab.get::>>(Monster::VT_PATH, None).map(|v| v.safe_slice()) + pub fn path(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_PATH, None)} } #[inline] #[allow(non_snake_case)] pub fn equipped_as_weapon(&self) -> Option> { if self.equipped_type() == Equipment::Weapon { - self.equipped().map(Weapon::init_from_table) + self.equipped().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Weapon::init_from_table(t) } + }) } else { None } @@ -365,18 +400,6 @@ impl MonsterT { }) } } -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::root_unchecked::>(buf) } -} - -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_size_prefixed_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::size_prefixed_root_unchecked::>(buf) } -} - #[inline] /// Verifies that a buffer of bytes contains a `Monster` /// and returns it. diff --git a/third_party/flatbuffers/samples/rust_generated/my_game/sample/vec_3_generated.rs b/third_party/flatbuffers/samples/rust_generated/my_game/sample/vec_3_generated.rs index 894186b6e3..185677f894 100644 --- a/third_party/flatbuffers/samples/rust_generated/my_game/sample/vec_3_generated.rs +++ b/third_party/flatbuffers/samples/rust_generated/my_game/sample/vec_3_generated.rs @@ -29,39 +29,25 @@ impl core::fmt::Debug for Vec3 { } impl flatbuffers::SimpleToVerifyInSlice for Vec3 {} -impl flatbuffers::SafeSliceAccess for Vec3 {} impl<'a> flatbuffers::Follow<'a> for Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Vec3>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Vec3 { type Output = Vec3; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Vec3 { - type Output = Vec3; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Vec3 as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -95,70 +81,88 @@ impl<'a> Vec3 { } pub fn x(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_x(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_y(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[8..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_z(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[8..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/samples/rust_generated/my_game/sample/weapon_generated.rs b/third_party/flatbuffers/samples/rust_generated/my_game/sample/weapon_generated.rs index f0a709d581..93ea6b2abe 100644 --- a/third_party/flatbuffers/samples/rust_generated/my_game/sample/weapon_generated.rs +++ b/third_party/flatbuffers/samples/rust_generated/my_game/sample/weapon_generated.rs @@ -19,8 +19,8 @@ pub struct Weapon<'a> { impl<'a> flatbuffers::Follow<'a> for Weapon<'a> { type Inner = Weapon<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -33,7 +33,7 @@ impl<'a> Weapon<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Weapon { _tab: table } } #[allow(unused_mut)] @@ -60,11 +60,17 @@ impl<'a> Weapon<'a> { #[inline] pub fn name(&self) -> Option<&'a str> { - self._tab.get::>(Weapon::VT_NAME, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Weapon::VT_NAME, None)} } #[inline] pub fn damage(&self) -> i16 { - self._tab.get::(Weapon::VT_DAMAGE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Weapon::VT_DAMAGE, Some(0)).unwrap()} } } diff --git a/third_party/flatbuffers/samples/sample_binary.rs b/third_party/flatbuffers/samples/sample_binary.rs index 2f010b8d3c..2fed9e5226 100644 --- a/third_party/flatbuffers/samples/sample_binary.rs +++ b/third_party/flatbuffers/samples/sample_binary.rs @@ -19,7 +19,7 @@ extern crate flatbuffers; // import the generated code #[allow(dead_code, unused_imports)] -#[allow(clippy::approx_constant)] // We use low precision PI as a default value. +#[allow(clippy::all)] mod rust_generated; pub use rust_generated::my_game::sample::{Color, Equipment, Monster, MonsterArgs, @@ -122,10 +122,7 @@ fn main() { // Get an element from the `inventory` FlatBuffer's `vector`. assert!(monster.inventory().is_some()); let inv = monster.inventory().unwrap(); - - // Note that this vector is returned as a slice, because direct access for - // this type, a u8 vector, is safe on all platforms: - let third_item = inv[2]; + let third_item = inv.get(2); assert_eq!(third_item, 2); // Get and test the `weapons` FlatBuffers's `vector`. diff --git a/third_party/flatbuffers/scripts/generate_code.py b/third_party/flatbuffers/scripts/generate_code.py index 7111d8d313..dd84cfdfb0 100755 --- a/third_party/flatbuffers/scripts/generate_code.py +++ b/third_party/flatbuffers/scripts/generate_code.py @@ -147,7 +147,7 @@ def glob(path, pattern): LOBSTER_OPTS = ["--lobster"] SWIFT_OPTS = ["--swift", "--gen-json-emit", "--bfbs-filenames", str(tests_path)] SWIFT_OPTS_CODE_GEN = [ - "--swift", + "--swift", "--gen-json-emit", "--bfbs-filenames", swift_code_gen @@ -305,14 +305,14 @@ def glob(path, pattern): # Generate the annotated binary of the monster_test binary schema. flatc_annotate( - schema="../reflection/reflection.fbs", - file="monster_test.bfbs", + schema="../reflection/reflection.fbs", + file="monster_test.bfbs", include="include_test" ) flatc_annotate( - schema="monster_test.fbs", - file="monsterdata_test.mon", + schema="monster_test.fbs", + file="monsterdata_test.mon", include="include_test" ) @@ -371,6 +371,12 @@ def glob(path, pattern): ) +flatc( + BASE_OPTS + PYTHON_OPTS, + schema="nested_union_test.fbs", +) + + # Optional Scalars optional_scalars_schema = "optional_scalars.fbs" flatc(["--java", "--kotlin", "--lobster"], schema=optional_scalars_schema) @@ -449,6 +455,13 @@ def glob(path, pattern): cwd=swift_code_gen ) +# Nim Tests +NIM_OPTS = BASE_OPTS + ["--nim"] +flatc(NIM_OPTS, schema="monster_test.fbs", include="include_test") +flatc(NIM_OPTS, schema="optional_scalars.fbs") +flatc(NIM_OPTS, schema="more_defaults.fbs") +flatc(NIM_OPTS, schema="MutatingBool.fbs") + # --filename-suffix and --filename-ext tests flatc( CPP_OPTS + NO_INCL_OPTS + ["--grpc", "--filename-ext", "hpp"], diff --git a/third_party/flatbuffers/scripts/release.sh b/third_party/flatbuffers/scripts/release.sh new file mode 100755 index 0000000000..80a93c0034 --- /dev/null +++ b/third_party/flatbuffers/scripts/release.sh @@ -0,0 +1,81 @@ + +printf -v year '%(%y)T' -1 +printf -v month '%(%m)T' -1 +printf -v day '%(%d)T' -1 + +version="$year.$month.$day" +version_underscore="$year\_$month\_$day" + +echo "Setting Flatbuffers Version to: $version" + +echo "Updating include/flatbuffers/base.h..." +sed -i \ + -e "s/\(#define FLATBUFFERS_VERSION_MAJOR \).*/\1$year/" \ + -e "s/\(#define FLATBUFFERS_VERSION_MINOR \).*/\1$month/" \ + -e "s/\(#define FLATBUFFERS_VERSION_REVISION \).*/\1$day/" \ + include/flatbuffers/base.h + +echo "Updating CMake\Version.cmake..." +sed -i \ + -e "s/\(set(VERSION_MAJOR \).*/\1$year)/" \ + -e "s/\(set(VERSION_MINOR \).*/\1$month)/" \ + -e "s/\(set(VERSION_PATCH \).*/\1$day)/" \ + CMake/Version.cmake + +echo "Updating include/flatbuffers/reflection_generated.h..." +echo "Updating tests/evolution_test/evolution_v1_generated.h..." +echo "Updating tests/evolution_test/evolution_v1_generated.h..." +sed -i \ + -e "s/\(FLATBUFFERS_VERSION_MAJOR == \)[0-9]*\(.*\)/\1$year\2/" \ + -e "s/\(FLATBUFFERS_VERSION_MINOR == \)[0-9]*\(.*\)/\1$month\2/" \ + -e "s/\(FLATBUFFERS_VERSION_REVISION == \)[0-9]*\(.*\)/\1$day\2/" \ + include/flatbuffers/reflection_generated.h \ + tests/evolution_test/evolution_v1_generated.h \ + tests/evolution_test/evolution_v2_generated.h + +echo "Updating java/pom.xml..." +xmlstarlet edit --inplace -N s=http://maven.apache.org/POM/4.0.0 \ + --update '//s:project/s:version' --value $version \ + java/pom.xml + +echo "Updating package.json..." +sed -i \ + -e "s/\(\"version\": \).*/\1\"$version\",/" \ + package.json + +echo "Updating net/FlatBuffers/Google.FlatBuffers.csproj..." +sed -i \ + -e "s/\(\).*\(<\/PackageVersion>\)/\1$version\2/" \ + net/FlatBuffers/Google.FlatBuffers.csproj + +echo "Updating dart/pubspec.yaml..." +sed -i \ + -e "s/\(version: \).*/\1$version/" \ + dart/pubspec.yaml + +echo "Updating python/flatbuffers/_version.py..." +sed -i \ + -e "s/\(__version__ = u\).*/\1\"$version\"/" \ + python/flatbuffers/_version.py + +echo "Updating python/setup.py..." +sed -i \ + -e "s/\(version='\).*/\1$version',/" \ + python/setup.py + +echo "Updating FlatBuffers.podspec..." +sed -i \ + -e "s/\(s.version\s*= \).*/\1'$version'/" \ + FlatBuffers.podspec + +echo "Updating FlatBuffersVersion_X_X_X() version check...." +grep -rl 'FlatBuffersVersion_' * --exclude=release.sh | xargs -i@ \ + sed -i \ + -e "s/\(FlatBuffersVersion_\).*()/\1$version_underscore()/g" \ + @ + +echo "Updating FLATBUFFERS_X_X_X() version check...." +grep -rl 'FLATBUFFERS_\d*' * --exclude=release.sh | xargs -i@ \ + sed -i \ + -e "s/\(FLATBUFFERS_\)[0-9]\{2\}.*()/\1$version_underscore()/g" \ + @ \ No newline at end of file diff --git a/third_party/flatbuffers/src/BUILD.bazel b/third_party/flatbuffers/src/BUILD.bazel index 8110be4a1b..e8c3ffb765 100644 --- a/third_party/flatbuffers/src/BUILD.bazel +++ b/third_party/flatbuffers/src/BUILD.bazel @@ -39,6 +39,8 @@ cc_library( "bfbs_gen.h", "bfbs_gen_lua.cpp", "bfbs_gen_lua.h", + "bfbs_gen_nim.cpp", + "bfbs_gen_nim.h", "bfbs_namer.h", "binary_annotator.cpp", "binary_annotator.h", @@ -62,6 +64,8 @@ cc_library( "bfbs_gen.h", "bfbs_gen_lua.cpp", "bfbs_gen_lua.h", + "bfbs_gen_nim.cpp", + "bfbs_gen_nim.h", "bfbs_namer.h", "flatc_main.cpp", "idl_gen_cpp.cpp", diff --git a/third_party/flatbuffers/src/annotated_binary_text_gen.cpp b/third_party/flatbuffers/src/annotated_binary_text_gen.cpp index ec30b1dd69..1c7a4dd623 100644 --- a/third_party/flatbuffers/src/annotated_binary_text_gen.cpp +++ b/third_party/flatbuffers/src/annotated_binary_text_gen.cpp @@ -1,5 +1,6 @@ #include "annotated_binary_text_gen.h" +#include #include #include diff --git a/third_party/flatbuffers/src/bfbs_gen.h b/third_party/flatbuffers/src/bfbs_gen.h index 63220e8aae..8e3c6f3724 100644 --- a/third_party/flatbuffers/src/bfbs_gen.h +++ b/third_party/flatbuffers/src/bfbs_gen.h @@ -38,8 +38,9 @@ static void ForAllObjects( for (auto it = objects->cbegin(); it != objects->cend(); ++it) { func(*it); } } -static void ForAllEnumValues(const reflection::Enum *enum_def, - std::function func) { +static void ForAllEnumValues( + const reflection::Enum *enum_def, + std::function func) { for (auto it = enum_def->values()->cbegin(); it != enum_def->values()->cend(); ++it) { func(*it); @@ -91,7 +92,7 @@ static bool IsVector(const reflection::BaseType base_type) { return base_type == reflection::BaseType::Vector; } -} // namespace +} // namespace // A concrete base Flatbuffer Generator that specific language generators can // derive from. @@ -130,17 +131,29 @@ class BaseBfbsGenerator : public BfbsGenerator { } protected: - const reflection::Object *GetObject(const reflection::Type *type) const { - if (type->index() >= 0 && IsStructOrTable(type->base_type())) { + // GetObject returns the underlying object struct of the given type + // if element_type is true and GetObject is a list of objects then + // GetObject will correctly return the object struct of the vector's elements + const reflection::Object *GetObject(const reflection::Type *type, + bool element_type = false) const { + const reflection::BaseType base_type = + element_type ? type->element() : type->base_type(); + if (type->index() >= 0 && IsStructOrTable(base_type)) { return GetObjectByIndex(type->index()); } return nullptr; } - const reflection::Enum *GetEnum(const reflection::Type *type) const { + // GetEnum returns the underlying enum struct of the given type + // if element_type is true and GetEnum is a list of enums then + // GetEnum will correctly return the enum struct of the vector's elements + const reflection::Enum *GetEnum(const reflection::Type *type, + bool element_type = false) const { + const reflection::BaseType base_type = + element_type ? type->element() : type->base_type(); // TODO(derekbailey): it would be better to have a explicit list of allowed // base types, instead of negating Obj types. - if (type->index() >= 0 && !IsStructOrTable(type->base_type())) { + if (type->index() >= 0 && !IsStructOrTable(base_type)) { return GetEnumByIndex(type->index()); } return nullptr; diff --git a/third_party/flatbuffers/src/bfbs_gen_lua.cpp b/third_party/flatbuffers/src/bfbs_gen_lua.cpp index e9623d4afb..1bfe8b2b81 100644 --- a/third_party/flatbuffers/src/bfbs_gen_lua.cpp +++ b/third_party/flatbuffers/src/bfbs_gen_lua.cpp @@ -175,7 +175,7 @@ class LuaBfbsGenerator : public BaseBfbsGenerator { // Skip writing deprecated fields altogether. if (field->deprecated()) { return; } - const std::string field_name = namer_.Field(field->name()->str()); + const std::string field_name = namer_.Field(*field); const r::BaseType base_type = field->type()->base_type(); // Generate some fixed strings so we don't repeat outselves later. @@ -367,9 +367,8 @@ class LuaBfbsGenerator : public BaseBfbsGenerator { ForAllFields(object, /*reverse=*/false, [&](const r::Field *field) { if (field->deprecated()) { return; } - const std::string field_name = namer_.Field(field->name()->str()); - const std::string variable_name = - namer_.Variable(field->name()->str()); + const std::string field_name = namer_.Field(*field); + const std::string variable_name = namer_.Variable(*field); code += "function " + object_name + ".Add" + field_name + "(builder, " + variable_name + ")\n"; @@ -428,9 +427,9 @@ class LuaBfbsGenerator : public BaseBfbsGenerator { if (IsStructOrTable(field->type()->base_type())) { const r::Object *field_object = GetObject(field->type()); signature += GenerateStructBuilderArgs( - field_object, prefix + namer_.Variable(field->name()->str()) + "_"); + field_object, prefix + namer_.Variable(*field) + "_"); } else { - signature += ", " + prefix + namer_.Variable(field->name()->str()); + signature += ", " + prefix + namer_.Variable(*field); } }); return signature; @@ -451,11 +450,11 @@ class LuaBfbsGenerator : public BaseBfbsGenerator { } if (IsStructOrTable(field->type()->base_type())) { const r::Object *field_object = GetObject(field->type()); - code += AppendStructBuilderBody( - field_object, prefix + namer_.Variable(field->name()->str()) + "_"); + code += AppendStructBuilderBody(field_object, + prefix + namer_.Variable(*field) + "_"); } else { code += " builder:Prepend" + GenerateMethod(field) + "(" + prefix + - namer_.Variable(field->name()->str()) + ")\n"; + namer_.Variable(*field) + ")\n"; } }); diff --git a/third_party/flatbuffers/src/bfbs_gen_nim.cpp b/third_party/flatbuffers/src/bfbs_gen_nim.cpp new file mode 100644 index 0000000000..dcd4cde89f --- /dev/null +++ b/third_party/flatbuffers/src/bfbs_gen_nim.cpp @@ -0,0 +1,651 @@ +/* + * Copyright 2021 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bfbs_gen_nim.h" + +#include +#include +#include +#include +#include +#include + +// Ensure no includes to flatc internals. bfbs_gen.h and generator.h are OK. +#include "bfbs_gen.h" +#include "bfbs_namer.h" +#include "flatbuffers/bfbs_generator.h" + +// The intermediate representation schema. +#include "flatbuffers/reflection.h" +#include "flatbuffers/reflection_generated.h" + +namespace flatbuffers { +namespace { + +// To reduce typing +namespace r = ::reflection; + +std::set NimKeywords() { + return { + "addr", "and", "as", "asm", "bind", "block", + "break", "case", "cast", "concept", "const", "continue", + "converter", "defer", "discard", "distinct", "div", "do", + "elif", "else", "end", "enum", "except", "export", + "finally", "for", "from", "func", "if", "import", + "in", "include", "interface", "is", "isnot", "iterator", + "let", "macro", "method", "mixin", "mod", "nil", + "not", "notin", "object", "of", "or", "out", + "proc", "ptr", "raise", "ref", "return", "shl", + "shr", "static", "template", "try", "tuple", "type", + "using", "var", "when", "while", "xor", "yield", + }; +} + +Namer::Config NimDefaultConfig() { + return { /*types=*/Case::kUpperCamel, + /*constants=*/Case::kUpperCamel, + /*methods=*/Case::kLowerCamel, + /*functions=*/Case::kUpperCamel, + /*fields=*/Case::kLowerCamel, + /*variable=*/Case::kLowerCamel, + /*variants=*/Case::kUpperCamel, + /*enum_variant_seperator=*/".", + /*escape_keywords=*/Namer::Config::Escape::AfterConvertingCase, + /*namespaces=*/Case::kKeep, + /*namespace_seperator=*/"/", + /*object_prefix=*/"", + /*object_suffix=*/"T", + /*keyword_prefix=*/"", + /*keyword_suffix=*/"_", + /*filenames=*/Case::kKeep, + /*directories=*/Case::kKeep, + /*output_path=*/"", + /*filename_suffix=*/"", + /*filename_extension=*/".nim" }; +} + +const std::string Indent = " "; +const std::string Export = "*"; +const std::set builtin_types = { + "uint8", "uint8", "bool", "int8", "uint8", "int16", + "uint16", "int32", "uint32", "int64", "uint64", "float32", + "float64", "string", "int", "uint", "uoffset", "Builder" +}; + +class NimBfbsGenerator : public BaseBfbsGenerator { + public: + explicit NimBfbsGenerator(const std::string &flatc_version) + : BaseBfbsGenerator(), + keywords_(), + imports_(), + current_obj_(nullptr), + current_enum_(nullptr), + flatc_version_(flatc_version), + namer_(NimDefaultConfig(), NimKeywords()) {} + + GeneratorStatus GenerateFromSchema(const r::Schema *schema) + FLATBUFFERS_OVERRIDE { + ForAllEnums(schema->enums(), [&](const r::Enum *enum_def) { + StartCodeBlock(enum_def); + GenerateEnum(enum_def); + }); + ForAllObjects(schema->objects(), [&](const r::Object *object) { + StartCodeBlock(object); + GenerateObject(object); + }); + return OK; + } + + uint64_t SupportedAdvancedFeatures() const FLATBUFFERS_OVERRIDE { + return static_cast(r::AdvancedFeatures::AdvancedArrayFeatures) | + static_cast(r::AdvancedFeatures::AdvancedUnionFeatures) | + static_cast(r::AdvancedFeatures::OptionalScalars) | + static_cast(r::AdvancedFeatures::DefaultVectorsAndStrings); + } + + protected: + void GenerateEnum(const r::Enum *enum_def) { + std::string code; + + std::string ns; + const std::string enum_name = namer_.Type(namer_.Denamespace(enum_def, ns)); + const std::string enum_type = + GenerateTypeBasic(enum_def->underlying_type()); + + GenerateDocumentation(enum_def->documentation(), "", code); + code += "type " + enum_name + Export + "{.pure.} = enum\n"; + + ForAllEnumValues(enum_def, [&](const reflection::EnumVal *enum_val) { + GenerateDocumentation(enum_val->documentation(), " ", code); + code += " " + namer_.Variant(enum_val->name()->str()) + " = " + + NumToString(enum_val->value()) + "." + enum_type + ",\n"; + }); + + EmitCodeBlock(code, enum_name, ns, enum_def->declaration_file()->str()); + } + + void GenerateObject(const r::Object *object) { + // Register the main flatbuffers module. + RegisterImports("flatbuffers", ""); + std::string code; + + std::string ns; + const std::string object_name = namer_.Type(namer_.Denamespace(object, ns)); + + GenerateDocumentation(object->documentation(), "", code); + code += "type " + object_name + "* = object of FlatObj\n"; + + // Create all the field accessors. + ForAllFields(object, /*reverse=*/false, [&](const r::Field *field) { + // Skip writing deprecated fields altogether. + if (field->deprecated()) { return; } + + const std::string field_name = namer_.Field(*field); + const r::BaseType base_type = field->type()->base_type(); + std::string field_type = GenerateType(field->type()); + + if (field->optional() && !object->is_struct()) { + RegisterImports("std/options", ""); + field_type = "Option[" + field_type + "]"; + } + + const std::string offset_prefix = + "let o = self.tab.Offset(" + NumToString(field->offset()) + ")\n"; + const std::string offset_prefix_2 = "if o != 0:\n"; + + if (IsScalar(base_type) || base_type == r::BaseType::String || + base_type == r::BaseType::Obj || base_type == r::BaseType::Union) { + GenerateDocumentation(field->documentation(), "", code); + + std::string getter_signature = "func " + namer_.Method(field_name) + + "*(self: " + object_name + + "): " + field_type + " =\n"; + std::string getter_code; + std::string setter_signature = + "func `" + namer_.Method(field_name + "=") + "`*(self: var " + + object_name + ", n: " + field_type + "): bool =\n"; + std::string setter_code; + + if (base_type == r::BaseType::Obj || base_type == r::BaseType::Union || + field->type()->index() >= 0) { + RegisterImports(object, field); + } + + if (object->is_struct()) { + std::string field_getter = + GenerateGetter(field->type(), NumToString(field->offset())); + getter_code += " return " + field_getter + "\n"; + + if (IsScalar(base_type)) { + setter_code += " return self.tab.Mutate(self.tab.Pos + " + + NumToString(field->offset()) + ", n)\n"; + } + } else { + // Table accessors + getter_code += " " + offset_prefix; + getter_code += " " + offset_prefix_2; + std::string field_getter = GenerateGetter(field->type(), "o"); + if (field->optional()) { + field_getter = "some(" + field_getter + ")"; + } + getter_code += " return " + field_getter + "\n"; + if (!field->optional()) { + getter_code += " return " + DefaultValue(field) + "\n"; + } + + if (IsScalar(base_type)) { + setter_code += " return self.tab.MutateSlot(" + + NumToString(field->offset()) + ", n)\n"; + } + } + code += getter_signature + getter_code; + if (IsScalar(base_type)) { code += setter_signature + setter_code; } + } else if (base_type == r::BaseType::Array || + base_type == r::BaseType::Vector) { + const r::BaseType vector_base_type = field->type()->element(); + uint32_t element_size = field->type()->element_size(); + + if (vector_base_type == r::BaseType::Obj || + vector_base_type == r::BaseType::Union || + field->type()->index() >= 0) { + RegisterImports(object, field, true); + } + + // Get vector length: + code += "func " + namer_.Method(field_name + "Length") + + "*(self: " + object_name + "): int = \n"; + code += " " + offset_prefix; + code += " " + offset_prefix_2; + code += " return self.tab.VectorLen(o)\n"; + + // Get single vector field: + code += "func " + namer_.Method(field_name) + "*(self: " + object_name + + ", j: int): " + GenerateType(field->type(), true) + " = \n"; + code += " " + offset_prefix; + code += " " + offset_prefix_2; + code += " var x = self.tab.Vector(o)\n"; + code += + " x += j.uoffset * " + NumToString(element_size) + ".uoffset\n"; + code += " return " + GenerateGetter(field->type(), "x", true) + "\n"; + + // Get entire vector: + code += "func " + namer_.Method(field_name) + "*(self: " + object_name + + "): " + GenerateType(field->type()) + " = \n"; + code += " let len = self." + field_name + "Length\n"; + code += " for i in countup(0, len - 1):\n"; + code += " result.add(self." + field_name + "(i))\n"; + + (void)IsSingleByte(vector_base_type); // unnused function warning + } + }); + + // Create all the builders + if (object->is_struct()) { + code += "proc " + namer_.Function(object_name + "Create") + + "*(self: var Builder"; + code += GenerateStructBuilderArgs(object); + code += "): uoffset =\n"; + code += AppendStructBuilderBody(object); + code += " return self.Offset()\n"; + } else { + // Table builders + code += "proc " + namer_.Function(object_name + "Start") + + "*(builder: var Builder) =\n"; + code += " builder.StartObject(" + NumToString(object->fields()->size()) + + ")\n"; + + ForAllFields(object, /*reverse=*/false, [&](const r::Field *field) { + if (field->deprecated()) { return; } + + const std::string field_name = namer_.Field(*field); + const std::string variable_name = namer_.Variable(*field); + const std::string variable_type = GenerateTypeBasic(field->type()); + + code += "proc " + namer_.Function(object_name + "Add" + field_name) + + "*(builder: var Builder, " + variable_name + ": " + + variable_type + ") =\n"; + code += " builder.Prepend" + GenerateMethod(field) + "Slot(" + + NumToString(field->id()) + ", " + variable_name + ", default(" + + variable_type + "))\n"; + + if (IsVector(field->type()->base_type())) { + code += "proc " + + namer_.Function(object_name + "Start" + field_name) + + "Vector*(builder: var Builder, numElems: uoffset) =\n"; + + const int32_t element_size = field->type()->element_size(); + int32_t alignment = element_size; + if (IsStruct(field->type(), /*use_element=*/true)) { + alignment = GetObjectByIndex(field->type()->index())->minalign(); + } + + code += " builder.StartVector(" + NumToString(element_size) + + ", numElems, " + NumToString(alignment) + ")\n"; + } + }); + + code += "proc " + namer_.Function(object_name + "End") + + "*(builder: var Builder): uoffset =\n"; + code += " return builder.EndObject()\n"; + } + EmitCodeBlock(code, object_name, ns, object->declaration_file()->str()); + } + + private: + void GenerateDocumentation( + const flatbuffers::Vector> + *documentation, + std::string indent, std::string &code) const { + flatbuffers::ForAllDocumentation( + documentation, [&](const flatbuffers::String *str) { + code += indent + "# " + str->str() + "\n"; + }); + } + + std::string GenerateStructBuilderArgs(const r::Object *object, + std::string prefix = "") const { + std::string signature; + ForAllFields(object, /*reverse=*/false, [&](const r::Field *field) { + if (IsStructOrTable(field->type()->base_type())) { + const r::Object *field_object = GetObject(field->type()); + signature += GenerateStructBuilderArgs( + field_object, prefix + namer_.Variable(*field) + "_"); + } else { + signature += ", " + prefix + namer_.Variable(*field) + ": " + + GenerateType(field->type()); + } + }); + return signature; + } + + std::string AppendStructBuilderBody(const r::Object *object, + std::string prefix = "") const { + std::string code; + code += " self.Prep(" + NumToString(object->minalign()) + ", " + + NumToString(object->bytesize()) + ")\n"; + + // We need to reverse the order we iterate over, since we build the + // buffer backwards. + ForAllFields(object, /*reverse=*/true, [&](const r::Field *field) { + const int32_t num_padding_bytes = field->padding(); + if (num_padding_bytes) { + code += " self.Pad(" + NumToString(num_padding_bytes) + ")\n"; + } + if (IsStructOrTable(field->type()->base_type())) { + const r::Object *field_object = GetObject(field->type()); + code += AppendStructBuilderBody(field_object, + prefix + namer_.Variable(*field) + "_"); + } else { + code += " self.Prepend(" + prefix + namer_.Variable(*field) + ")\n"; + } + }); + + return code; + } + + std::string GenerateMethod(const r::Field *field) const { + const r::BaseType base_type = field->type()->base_type(); + if (IsStructOrTable(base_type)) { return "Struct"; } + return ""; + } + + std::string GenerateGetter(const r::Type *type, const std::string &offsetval, + bool element_type = false) const { + const r::BaseType base_type = + element_type ? type->element() : type->base_type(); + std::string offset = offsetval; + if (!element_type) { offset = "self.tab.Pos + " + offset; } + switch (base_type) { + case r::BaseType::String: return "self.tab.String(" + offset + ")"; + case r::BaseType::Union: return "self.tab.Union(" + offsetval + ")"; + case r::BaseType::Obj: { + return GenerateType(type, element_type) + + "(tab: Vtable(Bytes: self.tab.Bytes, Pos: " + offset + "))"; + } + case r::BaseType::Vector: return GenerateGetter(type, offsetval, true); + default: + const r::Enum *type_enum = GetEnum(type, element_type); + if (type_enum != nullptr) { + return GenerateType(type, element_type) + "(" + "Get[" + + GenerateType(base_type) + "](self.tab, " + offset + ")" + ")"; + } else { + return "Get[" + GenerateType(base_type) + "](self.tab, " + offset + + ")"; + } + } + } + + std::string Denamespace(const std::string &s, std::string &importns, + std::string &ns) const { + if (builtin_types.find(s) != builtin_types.end()) { return s; } + std::string type = namer_.Type(namer_.Denamespace(s, ns)); + importns = ns.empty() ? type : ns + "." + type; + std::replace(importns.begin(), importns.end(), '.', '_'); + return type; + } + + std::string Denamespace(const std::string &s, std::string &importns) const { + std::string ns; + return Denamespace(s, importns, ns); + } + + std::string Denamespace(const std::string &s) const { + std::string importns; + return Denamespace(s, importns); + } + + std::string GenerateType(const r::Type *type, bool element_type = false, + bool enum_inner = false) const { + const r::BaseType base_type = + element_type ? type->element() : type->base_type(); + if (IsScalar(base_type) && !enum_inner) { + const r::Enum *type_enum = GetEnum(type, element_type); + if (type_enum != nullptr) { + std::string importns; + std::string type_name = Denamespace(type_enum->name()->str(), importns); + return importns + "." + type_name; + } + } + if (IsScalar(base_type)) { return Denamespace(GenerateType(base_type)); } + switch (base_type) { + case r::BaseType::String: return "string"; + case r::BaseType::Vector: { + return "seq[" + GenerateType(type, true) + "]"; + } + case r::BaseType::Union: return "Vtable"; + case r::BaseType::Obj: { + const r::Object *type_obj = GetObject(type, element_type); + std::string importns; + std::string type_name = Denamespace(type_obj->name()->str(), importns); + if (type_obj == current_obj_) { + return type_name; + } else { + return importns + "." + type_name; + } + } + default: return "uoffset"; + } + } + + std::string GenerateTypeBasic(const r::Type *type, + bool element_type = false) const { + const r::BaseType base_type = + element_type ? type->element() : type->base_type(); + if (IsScalar(base_type)) { + return GenerateType(base_type); + } else { + return "uoffset"; + } + } + + std::string GenerateType(const r::BaseType base_type) const { + switch (base_type) { + case r::BaseType::None: return "uint8"; + case r::BaseType::UType: return "uint8"; + case r::BaseType::Bool: return "bool"; + case r::BaseType::Byte: return "int8"; + case r::BaseType::UByte: return "uint8"; + case r::BaseType::Short: return "int16"; + case r::BaseType::UShort: return "uint16"; + case r::BaseType::Int: return "int32"; + case r::BaseType::UInt: return "uint32"; + case r::BaseType::Long: return "int64"; + case r::BaseType::ULong: return "uint64"; + case r::BaseType::Float: return "float32"; + case r::BaseType::Double: return "float64"; + case r::BaseType::String: return "string"; + default: return r::EnumNameBaseType(base_type); + } + } + + std::string DefaultValue(const r::Field *field) const { + const r::BaseType base_type = field->type()->base_type(); + if (IsFloatingPoint(base_type)) { + if (field->default_real() != field->default_real()) { + return "NaN"; + } else if (field->default_real() == std::numeric_limits::infinity()) { + return "Inf"; + } else if (field->default_real() == -std::numeric_limits::infinity()) { + return "-Inf"; + } + return NumToString(field->default_real()); + } + if (IsBool(base_type)) { + return field->default_integer() ? "true" : "false"; + } + if (IsScalar(base_type)) { + const r::Enum *type_enum = GetEnum(field->type()); + if (type_enum != nullptr) { + return "type(result)(" + NumToString((field->default_integer())) + ")"; + } + return NumToString((field->default_integer())); + } + if (base_type == r::BaseType::String) { return "\"\""; } + // represents offsets + return "0"; + } + + void StartCodeBlock(const reflection::Enum *enum_def) { + current_enum_ = enum_def; + current_obj_ = nullptr; + imports_.clear(); + } + + void StartCodeBlock(const reflection::Object *object) { + current_enum_ = nullptr; + current_obj_ = object; + imports_.clear(); + } + + std::vector StringSplit(const std::string orig_str, + const std::string token) { + std::vector result; + std::string str = orig_str; + while (str.size()) { + size_t index = str.find(token); + if (index != std::string::npos) { + result.push_back(str.substr(0, index)); + str = str.substr(index + token.size()); + if (str.size() == 0) result.push_back(str); + } else { + result.push_back(str); + str = ""; + } + } + return result; + } + + std::string GetRelativePathFromNamespace(const std::string &relative_to, + const std::string &str2) { + std::vector relative_to_vec = StringSplit(relative_to, "."); + std::vector str2_vec = StringSplit(str2, "."); + while (relative_to_vec.size() > 0 && str2_vec.size() > 0) { + if (relative_to_vec[0] == str2_vec[0]) { + relative_to_vec.erase(relative_to_vec.begin()); + str2_vec.erase(str2_vec.begin()); + } else { + break; + } + } + relative_to_vec.pop_back(); + for (size_t i = 0; i < relative_to_vec.size(); ++i) { + str2_vec.insert(str2_vec.begin(), std::string("..")); + } + + std::string new_path; + for (size_t i = 0; i < str2_vec.size(); ++i) { + new_path += str2_vec[i]; + if (i != str2_vec.size() - 1) { new_path += "/"; } + } + return new_path; + } + + void RegisterImports(const r::Object *object, const r::Field *field, + bool use_element = false) { + std::string importns; + std::string type_name; + + const r::BaseType type = + use_element ? field->type()->element() : field->type()->base_type(); + + if (IsStructOrTable(type)) { + const r::Object *object_def = GetObjectByIndex(field->type()->index()); + if (object_def == current_obj_) { return; } + std::string ns; + type_name = Denamespace(object_def->name()->str(), importns, ns); + type_name = ns.empty() ? type_name : ns + "." + type_name; + } else { + const r::Enum *enum_def = GetEnumByIndex(field->type()->index()); + if (enum_def == current_enum_) { return; } + std::string ns; + type_name = Denamespace(enum_def->name()->str(), importns, ns); + type_name = ns.empty() ? type_name : ns + "." + type_name; + } + + std::string import_path = + GetRelativePathFromNamespace(object->name()->str(), type_name); + std::replace(type_name.begin(), type_name.end(), '.', '_'); + RegisterImports(import_path, importns); + } + + void RegisterImports(const std::string &local_name, + const std::string &imports_name) { + imports_[local_name] = imports_name; + } + + void EmitCodeBlock(const std::string &code_block, const std::string &name, + const std::string &ns, const std::string &declaring_file) { + const std::string full_qualified_name = ns.empty() ? name : ns + "." + name; + + std::string code = "#[ " + full_qualified_name + "\n"; + code += + " Automatically generated by the FlatBuffers compiler, do not " + "modify.\n"; + code += " Or modify. I'm a message, not a cop.\n"; + code += "\n"; + code += " flatc version: " + flatc_version_ + "\n"; + code += "\n"; + code += " Declared by : " + declaring_file + "\n"; + if (schema_->root_table() != nullptr) { + const std::string root_type = schema_->root_table()->name()->str(); + const std::string root_file = + schema_->root_table()->declaration_file()->str(); + code += " Rooting type : " + root_type + " (" + root_file + ")\n"; + } + code += "]#\n\n"; + + if (!imports_.empty()) { + for (auto it = imports_.cbegin(); it != imports_.cend(); ++it) { + if (it->second.empty()) { + code += "import " + it->first + "\n"; + } else { + code += "import " + it->first + " as " + it->second + "\n"; + } + } + code += "\n"; + } + code += code_block; + + // Namespaces are '.' deliminted, so replace it with the path separator. + std::string path = ns; + + if (ns.empty()) { + path = "."; + } else { + std::replace(path.begin(), path.end(), '.', '/'); + } + + // TODO(derekbailey): figure out a save file without depending on util.h + EnsureDirExists(path); + const std::string file_name = path + "/" + namer_.File(name); + SaveFile(file_name.c_str(), code, false); + } + + std::unordered_set keywords_; + std::map imports_; + const r::Object *current_obj_; + const r::Enum *current_enum_; + const std::string flatc_version_; + const BfbsNamer namer_; +}; +} // namespace + +std::unique_ptr NewNimBfbsGenerator( + const std::string &flatc_version) { + return std::unique_ptr(new NimBfbsGenerator(flatc_version)); +} + +} // namespace flatbuffers diff --git a/third_party/flatbuffers/src/bfbs_gen_nim.h b/third_party/flatbuffers/src/bfbs_gen_nim.h new file mode 100644 index 0000000000..80be16d014 --- /dev/null +++ b/third_party/flatbuffers/src/bfbs_gen_nim.h @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FLATBUFFERS_BFBS_GEN_NIM_H_ +#define FLATBUFFERS_BFBS_GEN_NIM_H_ + +#include +#include + +#include "flatbuffers/bfbs_generator.h" + +namespace flatbuffers { + +// Constructs a new Nim Code generator. +std::unique_ptr NewNimBfbsGenerator( + const std::string &flatc_version); + +} // namespace flatbuffers + +#endif // FLATBUFFERS_BFBS_GEN_NIM_H_ diff --git a/third_party/flatbuffers/src/bfbs_namer.h b/third_party/flatbuffers/src/bfbs_namer.h index 2c6e724ab6..ef6c6c5d86 100644 --- a/third_party/flatbuffers/src/bfbs_namer.h +++ b/third_party/flatbuffers/src/bfbs_namer.h @@ -36,6 +36,14 @@ class BfbsNamer : public Namer { std::string Denamespace(T t, const char delimiter = '.') const { return Namer::Denamespace(t->name()->c_str(), delimiter); } + + virtual std::string Field(const ::reflection::Field &f) const { + return Field(f.name()->str()); + } + + virtual std::string Variable(const ::reflection::Field &f) const { + return Variable(f.name()->str()); + } }; } // namespace flatbuffers diff --git a/third_party/flatbuffers/src/binary_annotator.cpp b/third_party/flatbuffers/src/binary_annotator.cpp index 2a94abcef6..92d4391c70 100644 --- a/third_party/flatbuffers/src/binary_annotator.cpp +++ b/third_party/flatbuffers/src/binary_annotator.cpp @@ -1,5 +1,6 @@ #include "binary_annotator.h" +#include #include #include #include @@ -1451,4 +1452,4 @@ bool BinaryAnnotator::ContainsSection(const uint64_t offset) { it->second.regions.back().length; } -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/src/flatc.cpp b/third_party/flatbuffers/src/flatc.cpp index 1d12a1769c..40a538fcd6 100644 --- a/third_party/flatbuffers/src/flatc.cpp +++ b/third_party/flatbuffers/src/flatc.cpp @@ -16,6 +16,8 @@ #include "flatbuffers/flatc.h" +#include +#include #include #include @@ -88,7 +90,7 @@ const static FlatCOption options[] = { "--no-prefix." }, { "", "swift-implementation-only", "", "Adds a @_implementationOnly to swift imports" }, - { "", "gen-inclues", "", + { "", "gen-includes", "", "(deprecated), this is the default behavior. If the original behavior is " "required (no include statements) use --no-includes." }, { "", "no-includes", "", @@ -215,14 +217,14 @@ const static FlatCOption options[] = { "Allows (de)serialization of JSON text in the Object API. (requires " "--gen-object-api)." }, { "", "json-nested-bytes", "", - "Allow a nested_flatbuffer field to be parsed as a vector of bytes" + "Allow a nested_flatbuffer field to be parsed as a vector of bytes " "in JSON, which is unsafe unless checked by a verifier afterwards." }, { "", "ts-flat-files", "", "Only generated one typescript file per .fbs file." }, { "", "annotate", "SCHEMA", "Annotate the provided BINARY_FILE with the specified SCHEMA file." }, { "", "no-leak-private-annotation", "", - "Prevents multiple type of annotations within a Fbs SCHEMA file." + "Prevents multiple type of annotations within a Fbs SCHEMA file. " "Currently this is required to generate private types in Rust" }, }; diff --git a/third_party/flatbuffers/src/flatc_main.cpp b/third_party/flatbuffers/src/flatc_main.cpp index b4c4251c4c..f2aa781a37 100644 --- a/third_party/flatbuffers/src/flatc_main.cpp +++ b/third_party/flatbuffers/src/flatc_main.cpp @@ -18,6 +18,7 @@ #include #include "bfbs_gen_lua.h" +#include "bfbs_gen_nim.h" #include "flatbuffers/base.h" #include "flatbuffers/flatc.h" #include "flatbuffers/util.h" @@ -56,6 +57,8 @@ int main(int argc, const char *argv[]) { std::unique_ptr bfbs_gen_lua = flatbuffers::NewLuaBfbsGenerator(flatbuffers_version); + std::unique_ptr bfbs_gen_nim = + flatbuffers::NewNimBfbsGenerator(flatbuffers_version); g_program_name = argv[0]; @@ -142,6 +145,10 @@ int main(int argc, const char *argv[]) { flatbuffers::FlatCOption{ "", "swift", "", "Generate Swift files for tables/structs" }, nullptr, nullptr, nullptr }, + { nullptr, "Nim", true, nullptr, flatbuffers::IDLOptions::kNim, + flatbuffers::FlatCOption{ "", "nim", "", + "Generate Nim files for tables/structs" }, + nullptr, bfbs_gen_nim.get(), nullptr }, }; flatbuffers::FlatCompiler::InitParams params; diff --git a/third_party/flatbuffers/src/idl_gen_cpp.cpp b/third_party/flatbuffers/src/idl_gen_cpp.cpp index c1a01988a9..aeb16fde3e 100644 --- a/third_party/flatbuffers/src/idl_gen_cpp.cpp +++ b/third_party/flatbuffers/src/idl_gen_cpp.cpp @@ -16,6 +16,7 @@ // independent from idl_parser, since this code is not needed for most clients +#include #include #include diff --git a/third_party/flatbuffers/src/idl_gen_csharp.cpp b/third_party/flatbuffers/src/idl_gen_csharp.cpp index fa67eaf029..ab36bd9c2a 100644 --- a/third_party/flatbuffers/src/idl_gen_csharp.cpp +++ b/third_party/flatbuffers/src/idl_gen_csharp.cpp @@ -655,7 +655,7 @@ class CSharpGenerator : public BaseGenerator { // Force compile time error if not using the same version runtime. code += " public static void ValidateVersion() {"; code += " FlatBufferConstants."; - code += "FLATBUFFERS_2_0_8(); "; + code += "FLATBUFFERS_22_10_26(); "; code += "}\n"; // Generate a special accessor for the table that when used as the root diff --git a/third_party/flatbuffers/src/idl_gen_dart.cpp b/third_party/flatbuffers/src/idl_gen_dart.cpp index 0bf230ddde..ada5956081 100644 --- a/third_party/flatbuffers/src/idl_gen_dart.cpp +++ b/third_party/flatbuffers/src/idl_gen_dart.cpp @@ -16,6 +16,7 @@ // independent from idl_parser, since this code is not needed for most clients #include +#include #include "flatbuffers/code_generators.h" #include "flatbuffers/flatbuffers.h" @@ -721,16 +722,17 @@ class DartGenerator : public BaseGenerator { if (!value.constant.empty() && value.constant != "0") { if (IsBool(value.type.base_type)) { return "true"; - } else if (value.constant == "nan" || value.constant == "+nan" || - value.constant == "-nan") { - return "double.nan"; - } else if (value.constant == "inf" || value.constant == "+inf") { - return "double.infinity"; - } else if (value.constant == "-inf") { - return "double.negativeInfinity"; - } else { - return value.constant; } + if (IsScalar(value.type.base_type)) { + if (StringIsFlatbufferNan(value.constant)) { + return "double.nan"; + } else if (StringIsFlatbufferPositiveInfinity(value.constant)) { + return "double.infinity"; + } else if (StringIsFlatbufferNegativeInfinity(value.constant)) { + return "double.negativeInfinity"; + } + } + return value.constant; } else if (IsBool(value.type.base_type)) { return "false"; } else if (IsScalar(value.type.base_type) && !IsUnion(value.type)) { diff --git a/third_party/flatbuffers/src/idl_gen_fbs.cpp b/third_party/flatbuffers/src/idl_gen_fbs.cpp index 782557f09a..9c58dc4a36 100644 --- a/third_party/flatbuffers/src/idl_gen_fbs.cpp +++ b/third_party/flatbuffers/src/idl_gen_fbs.cpp @@ -137,6 +137,7 @@ std::string GenerateFBS(const Parser &parser, const std::string &file_name) { schema += " " + field.name + ":" + GenType(field.value.type); if (field.value.constant != "0") schema += " = " + field.value.constant; if (field.IsRequired()) schema += " (required)"; + if (field.key) schema += " (key)"; schema += ";\n"; } } diff --git a/third_party/flatbuffers/src/idl_gen_go.cpp b/third_party/flatbuffers/src/idl_gen_go.cpp index 51e018a009..33917ff776 100644 --- a/third_party/flatbuffers/src/idl_gen_go.cpp +++ b/third_party/flatbuffers/src/idl_gen_go.cpp @@ -16,6 +16,8 @@ // independent from idl_parser, since this code is not needed for most clients +#include +#include #include #include @@ -101,6 +103,7 @@ class GoGenerator : public BaseGenerator { for (auto it = parser_.enums_.vec.begin(); it != parser_.enums_.vec.end(); ++it) { tracked_imported_namespaces_.clear(); + needs_math_import_ = false; needs_imports = false; std::string enumcode; GenEnum(**it, &enumcode); @@ -120,6 +123,7 @@ class GoGenerator : public BaseGenerator { for (auto it = parser_.structs_.vec.begin(); it != parser_.structs_.vec.end(); ++it) { tracked_imported_namespaces_.clear(); + needs_math_import_ = false; std::string declcode; GenStruct(**it, &declcode); if (parser_.opts.one_file) { @@ -153,6 +157,7 @@ class GoGenerator : public BaseGenerator { } }; std::set tracked_imported_namespaces_; + bool needs_math_import_ = false; // Most field accessors need to retrieve and test the field offset first, // this is the prefix code for that. @@ -1276,6 +1281,23 @@ class GoGenerator : public BaseGenerator { switch (field.value.type.base_type) { case BASE_TYPE_BOOL: return field.value.constant == "0" ? "false" : "true"; + case BASE_TYPE_FLOAT: + case BASE_TYPE_DOUBLE: { + const std::string float_type = + field.value.type.base_type == BASE_TYPE_FLOAT ? "float32" + : "float64"; + if (StringIsFlatbufferNan(field.value.constant)) { + needs_math_import_ = true; + return float_type + "(math.NaN())"; + } else if (StringIsFlatbufferPositiveInfinity(field.value.constant)) { + needs_math_import_ = true; + return float_type + "(math.Inf(1))"; + } else if (StringIsFlatbufferNegativeInfinity(field.value.constant)) { + needs_math_import_ = true; + return float_type + "(math.Inf(-1))"; + } + return field.value.constant; + } default: return field.value.constant; } } @@ -1329,6 +1351,8 @@ class GoGenerator : public BaseGenerator { if (needs_imports) { code += "import (\n"; if (is_enum) { code += "\t\"strconv\"\n\n"; } + // math is needed to support non-finite scalar default values. + if (needs_math_import_) { code += "\t\"math\"\n\n"; } if (!parser_.opts.go_import.empty()) { code += "\tflatbuffers \"" + parser_.opts.go_import + "\"\n"; } else { @@ -1345,6 +1369,10 @@ class GoGenerator : public BaseGenerator { code += ")\n\n"; } else { if (is_enum) { code += "import \"strconv\"\n\n"; } + if (needs_math_import_) { + // math is needed to support non-finite scalar default values. + code += "import \"math\"\n\n"; + } } } diff --git a/third_party/flatbuffers/src/idl_gen_java.cpp b/third_party/flatbuffers/src/idl_gen_java.cpp index 6ee97aa47f..a35950f5b0 100644 --- a/third_party/flatbuffers/src/idl_gen_java.cpp +++ b/third_party/flatbuffers/src/idl_gen_java.cpp @@ -397,6 +397,10 @@ class JavaGenerator : public BaseGenerator { code += " "; code += namer_.Variant(ev) + " = "; code += enum_def.ToString(ev); + if (enum_def.underlying_type.base_type == BASE_TYPE_LONG || + enum_def.underlying_type.base_type == BASE_TYPE_ULONG) { + code += "L"; + } code += ";\n"; } @@ -665,7 +669,7 @@ class JavaGenerator : public BaseGenerator { // Force compile time error if not using the same version runtime. code += " public static void ValidateVersion() {"; code += " Constants."; - code += "FLATBUFFERS_2_0_8(); "; + code += "FLATBUFFERS_22_10_26(); "; code += "}\n"; // Generate a special accessor for the table that when used as the root @@ -1889,6 +1893,7 @@ class JavaGenerator : public BaseGenerator { } } else { code += " " + name + " = "; + code += SourceCast(field_type); code += "_o"; for (size_t i = 0; i < array_lengths.size(); ++i) { code += "." + namer_.Method("get", array_lengths[i].name) + "()"; diff --git a/third_party/flatbuffers/src/idl_gen_json_schema.cpp b/third_party/flatbuffers/src/idl_gen_json_schema.cpp index 5cb6a9dcb2..796d1e20ca 100644 --- a/third_party/flatbuffers/src/idl_gen_json_schema.cpp +++ b/third_party/flatbuffers/src/idl_gen_json_schema.cpp @@ -14,7 +14,9 @@ * limitations under the License. */ +#include #include +#include #include "flatbuffers/code_generators.h" #include "flatbuffers/idl.h" diff --git a/third_party/flatbuffers/src/idl_gen_kotlin.cpp b/third_party/flatbuffers/src/idl_gen_kotlin.cpp index 102e24d8ff..57ec7b736e 100644 --- a/third_party/flatbuffers/src/idl_gen_kotlin.cpp +++ b/third_party/flatbuffers/src/idl_gen_kotlin.cpp @@ -505,7 +505,7 @@ class KotlinGenerator : public BaseGenerator { // runtime. GenerateFunOneLine( writer, "validateVersion", "", "", - [&]() { writer += "Constants.FLATBUFFERS_2_0_8()"; }, + [&]() { writer += "Constants.FLATBUFFERS_22_10_26()"; }, options.gen_jvmstatic); GenerateGetRootAsAccessors(namer_.Type(struct_def), writer, options); diff --git a/third_party/flatbuffers/src/idl_gen_python.cpp b/third_party/flatbuffers/src/idl_gen_python.cpp index 0b8ffa821e..38a5bc100a 100644 --- a/third_party/flatbuffers/src/idl_gen_python.cpp +++ b/third_party/flatbuffers/src/idl_gen_python.cpp @@ -83,11 +83,11 @@ class PythonGenerator : public BaseGenerator { // Most field accessors need to retrieve and test the field offset first, // this is the prefix code for that. - std::string OffsetPrefix(const FieldDef &field) const { + std::string OffsetPrefix(const FieldDef &field, bool new_line = true) const { return "\n" + Indent + Indent + "o = flatbuffers.number_types.UOffsetTFlags.py_type" + "(self._tab.Offset(" + NumToString(field.value.offset) + "))\n" + - Indent + Indent + "if o != 0:\n"; + Indent + Indent + "if o != 0:" + (new_line ? "\n" : ""); } // Begin a class declaration. @@ -164,9 +164,14 @@ class PythonGenerator : public BaseGenerator { GenReceiver(struct_def, code_ptr); code += namer_.Method(field) + "Length(self"; - code += "):" + OffsetPrefix(field); - code += Indent + Indent + Indent + "return self._tab.VectorLen(o)\n"; - code += Indent + Indent + "return 0\n\n"; + code += "):"; + if(!IsArray(field.value.type)){ + code += OffsetPrefix(field,false); + code += GenIndents(3) + "return self._tab.VectorLen(o)"; + code += GenIndents(2) + "return 0\n\n"; + }else{ + code += GenIndents(2) + "return "+NumToString(field.value.type.fixed_length)+"\n\n"; + } } // Determines whether a vector is none or not. @@ -177,10 +182,15 @@ class PythonGenerator : public BaseGenerator { GenReceiver(struct_def, code_ptr); code += namer_.Method(field) + "IsNone(self"; code += "):"; - code += GenIndents(2) + - "o = flatbuffers.number_types.UOffsetTFlags.py_type" + - "(self._tab.Offset(" + NumToString(field.value.offset) + "))"; - code += GenIndents(2) + "return o == 0"; + if(!IsArray(field.value.type)){ + code += GenIndents(2) + + "o = flatbuffers.number_types.UOffsetTFlags.py_type" + + "(self._tab.Offset(" + NumToString(field.value.offset) + "))"; + code += GenIndents(2) + "return o == 0"; + } else { + //assume that we always have an array as memory is preassigned + code += GenIndents(2) + "return False"; + } code += "\n\n"; } @@ -244,21 +254,42 @@ class PythonGenerator : public BaseGenerator { const auto vec_type = field.value.type.VectorType(); GenReceiver(struct_def, code_ptr); code += namer_.Method(field); - if (IsStruct(vec_type)) { - code += "(self, obj, i):\n"; - code += Indent + Indent + "obj.Init(self._tab.Bytes, self._tab.Pos + "; - code += NumToString(field.value.offset) + " + i * "; - code += NumToString(InlineSize(vec_type)); - code += ")\n" + Indent + Indent + "return obj\n\n"; - } else { - auto getter = GenGetter(vec_type); - code += "(self): return [" + getter; - code += "self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type("; - code += NumToString(field.value.offset) + " + i * "; - code += NumToString(InlineSize(vec_type)); - code += ")) for i in range("; - code += NumToString(field.value.type.fixed_length) + ")]\n"; + code += "(self, i: int):"; + if (parser_.opts.include_dependence_headers) { + code += GenIndents(2); + code += "from " + GenPackageReference(field.value.type) + " import " + + TypeName(field); } + code += GenIndents(2) + "obj = " + TypeName(field) + "()"; + code += GenIndents(2) + "obj.Init(self._tab.Bytes, self._tab.Pos + "; + code += NumToString(field.value.offset) + " + i * "; + code += NumToString(InlineSize(vec_type)); + code += ")" + GenIndents(2) + "return obj\n\n"; + } + + // Get the value of a vector's non-struct member. Uses a named return + // argument to conveniently set the zero value for the result. + void GetArrayOfNonStruct(const StructDef &struct_def, const FieldDef &field, + std::string *code_ptr) const { + auto &code = *code_ptr; + GenReceiver(struct_def, code_ptr); + code += namer_.Method(field); + code += "(self, j = None):"; + code += GenIndents(2) + "if j is None:"; + code += GenIndents(3) + "return [" + GenGetter(field.value.type); + code += "self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type("; + code += NumToString(field.value.offset) + " + i * "; + code += NumToString(InlineSize(field.value.type.VectorType())); + code += ")) for i in range("; + code += "self."+namer_.Method(field)+"Length()" + ")]"; + code += GenIndents(2) +"elif j >= 0 and j < self."+namer_.Method(field)+"Length():"; + code += GenIndents(3) + "return " + GenGetter(field.value.type); + code += "self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type("; + code += NumToString(field.value.offset) + " + j * "; + code += NumToString(InlineSize(field.value.type.VectorType())); + code += "))"; + code += GenIndents(2) + "else:"; + code += GenIndents(3) + "return None\n\n"; } // Get a struct by initializing an existing struct. @@ -403,18 +434,25 @@ class PythonGenerator : public BaseGenerator { GenReceiver(struct_def, code_ptr); code += namer_.Method(field) + "AsNumpy(self):"; - code += OffsetPrefix(field); + if(!IsArray(field.value.type)){ + code += OffsetPrefix(field, false); - code += Indent + Indent + Indent; - code += "return "; - code += "self._tab.GetVectorAsNumpy(flatbuffers.number_types."; - code += namer_.Method(GenTypeGet(field.value.type)); - code += "Flags, o)\n"; + code += GenIndents(3); + code += "return "; + code += "self._tab.GetVectorAsNumpy(flatbuffers.number_types."; + code += namer_.Method(GenTypeGet(field.value.type)); + code += "Flags, o)"; - if (IsString(vectortype)) { - code += Indent + Indent + "return \"\"\n"; - } else { - code += Indent + Indent + "return 0\n"; + if (IsString(vectortype)) { + code += GenIndents(2) + "return \"\"\n"; + } else { + code += GenIndents(2) + "return 0\n"; + } + }else{ + code += GenIndents(2) + "return "; + code += "self._tab.GetArrayAsNumpy(flatbuffers.number_types."; + code += namer_.Method(GenTypeGet(field.value.type.VectorType())); + code += "Flags, self._tab.Pos + "+NumToString(field.value.offset)+", "+NumToString("self."+namer_.Method(field)+"Length()")+")\n"; } code += "\n"; } @@ -714,8 +752,6 @@ class PythonGenerator : public BaseGenerator { } else { GetScalarFieldOfTable(struct_def, field, code_ptr); } - } else if (IsArray(field.value.type)) { - GetArrayOfStruct(struct_def, field, code_ptr); } else { switch (field.value.type.base_type) { case BASE_TYPE_STRUCT: @@ -739,6 +775,17 @@ class PythonGenerator : public BaseGenerator { } break; } + case BASE_TYPE_ARRAY: { + auto vectortype = field.value.type.VectorType(); + if (vectortype.base_type == BASE_TYPE_STRUCT) { + GetArrayOfStruct(struct_def, field, code_ptr); + } else { + GetArrayOfNonStruct(struct_def, field, code_ptr); + GetVectorOfNonStructAsNumpy(struct_def, field, code_ptr); + GetVectorAsNestedFlatbuffer(struct_def, field, code_ptr); + } + break; + } case BASE_TYPE_UNION: GetUnionField(struct_def, field, code_ptr); break; default: FLATBUFFERS_ASSERT(0); } @@ -1067,6 +1114,19 @@ class PythonGenerator : public BaseGenerator { code += "\n"; } + void InitializeFromPackedBuf(const StructDef &struct_def, + std::string *code_ptr) const { + auto &code = *code_ptr; + const auto struct_var = namer_.Variable(struct_def); + const auto struct_type = namer_.Type(struct_def); + + code += GenIndents(1) + "@classmethod"; + code += GenIndents(1) + "def InitFromPackedBuf(cls, buf, pos=0):"; + code += GenIndents(2) + "n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos)"; + code += GenIndents(2) + "return cls.InitFromBuf(buf, pos+n)"; + code += "\n"; + } + void InitializeFromObjForObject(const StructDef &struct_def, std::string *code_ptr) const { auto &code = *code_ptr; @@ -1100,8 +1160,8 @@ class PythonGenerator : public BaseGenerator { code += field_type + "()"; } code += ") is not None:"; - code += GenIndents(3) + "self." + field_field + " = " + field_type + - "T.InitFromObj(" + struct_var + "." + field_method + "("; + code += GenIndents(3) + "self." + field_field + " = " + namer_.ObjectType(field_type) + + + ".InitFromObj(" + struct_var + "." + field_method + "("; // A struct's accessor requires a struct buf instance. if (struct_def.fixed && field.value.type.base_type == BASE_TYPE_STRUCT) { code += field_type + "()"; @@ -1143,18 +1203,47 @@ class PythonGenerator : public BaseGenerator { auto field_type = TypeName(field); auto one_instance = field_type + "_"; one_instance[0] = CharToLower(one_instance[0]); - if (parser_.opts.include_dependence_headers) { auto package_reference = GenPackageReference(field.value.type); field_type = package_reference + "." + TypeName(field); } + code += GenIndents(4) + "if " + struct_var + "." + field_method + + "(i) is None:"; + code += GenIndents(5) + "self." + field_field + ".append(None)"; + code += GenIndents(4) + "else:"; + code += GenIndents(5) + one_instance + " = " + namer_.ObjectType(field_type) + + ".InitFromObj(" + struct_var + "." + field_method + "(i))"; + code += + GenIndents(5) + "self." + field_field + ".append(" + one_instance + ")"; + } + + void GenUnpackForTableVector(const StructDef &struct_def, + const FieldDef &field, + std::string *code_ptr) const { + auto &code = *code_ptr; + const auto field_field = namer_.Field(field); + const auto field_method = namer_.Method(field); + const auto struct_var = namer_.Variable(struct_def); + code += GenIndents(2) + "if not " + struct_var + "." + field_method + + "IsNone():"; + code += GenIndents(3) + "self." + field_field + " = []"; + code += GenIndents(3) + "for i in range(" + struct_var + "." + + field_method + "Length()):"; + + auto field_type = TypeName(field); + auto one_instance = field_type + "_"; + one_instance[0] = CharToLower(one_instance[0]); + if (parser_.opts.include_dependence_headers) { + auto package_reference = GenPackageReference(field.value.type); + field_type = package_reference + "." + TypeName(field); + } code += GenIndents(4) + "if " + struct_var + "." + field_method + "(i) is None:"; code += GenIndents(5) + "self." + field_field + ".append(None)"; code += GenIndents(4) + "else:"; - code += GenIndents(5) + one_instance + " = " + field_type + - "T.InitFromObj(" + struct_var + "." + field_method + "(i))"; + code += GenIndents(5) + one_instance + " = " + namer_.ObjectType(field_type) + + ".InitFromObj(" + struct_var + "." + field_method + "(i))"; code += GenIndents(5) + "self." + field_field + ".append(" + one_instance + ")"; } @@ -1233,6 +1322,7 @@ class PythonGenerator : public BaseGenerator { GenUnPackForUnion(struct_def, field, &code); break; } + case BASE_TYPE_ARRAY: case BASE_TYPE_VECTOR: { auto vectortype = field.value.type.VectorType(); if (vectortype.base_type == BASE_TYPE_STRUCT) { @@ -1242,10 +1332,6 @@ class PythonGenerator : public BaseGenerator { } break; } - case BASE_TYPE_ARRAY: { - GenUnPackForScalarVector(struct_def, field, &code); - break; - } default: GenUnPackForScalar(struct_def, field, &code); } } @@ -1482,6 +1568,7 @@ class PythonGenerator : public BaseGenerator { GenPackForUnionField(struct_def, field, &code_prefix, &code); break; } + case BASE_TYPE_ARRAY: case BASE_TYPE_VECTOR: { auto vectortype = field.value.type.VectorType(); if (vectortype.base_type == BASE_TYPE_STRUCT) { @@ -1491,10 +1578,6 @@ class PythonGenerator : public BaseGenerator { } break; } - case BASE_TYPE_ARRAY: { - GenPackForScalarVectorField(struct_def, field, &code_prefix, &code); - break; - } case BASE_TYPE_STRING: { code_prefix += GenIndents(2) + "if self." + field_field + " is not None:"; @@ -1536,6 +1619,8 @@ class PythonGenerator : public BaseGenerator { InitializeFromBuf(struct_def, &code); + InitializeFromPackedBuf(struct_def, &code); + InitializeFromObjForObject(struct_def, &code); GenUnPack(struct_def, &code); @@ -1666,7 +1751,9 @@ class PythonGenerator : public BaseGenerator { std::string GenTypePointer(const Type &type) const { switch (type.base_type) { case BASE_TYPE_STRING: return "string"; - case BASE_TYPE_VECTOR: return GenTypeGet(type.VectorType()); + case BASE_TYPE_VECTOR: + // fall through + case BASE_TYPE_ARRAY: return GenTypeGet(type.VectorType()); case BASE_TYPE_STRUCT: return type.struct_def->name; case BASE_TYPE_UNION: // fall through diff --git a/third_party/flatbuffers/src/idl_gen_rust.cpp b/third_party/flatbuffers/src/idl_gen_rust.cpp index 64391d0f71..43237b2ebd 100644 --- a/third_party/flatbuffers/src/idl_gen_rust.cpp +++ b/third_party/flatbuffers/src/idl_gen_rust.cpp @@ -16,6 +16,8 @@ // independent from idl_parser, since this code is not needed for most clients +#include + #include "flatbuffers/code_generators.h" #include "flatbuffers/flatbuffers.h" #include "flatbuffers/idl.h" @@ -738,7 +740,6 @@ class RustGenerator : public BaseGenerator { code_ += "pub use self::bitflags_{{ENUM_NAMESPACE}}::{{ENUM_TY}};"; code_ += ""; - code_.SetValue("FROM_BASE", "unsafe { Self::from_bits_unchecked(b) }"); code_.SetValue("INTO_BASE", "self.bits()"); } else { // Normal, c-modelled enums. @@ -811,7 +812,6 @@ class RustGenerator : public BaseGenerator { code_ += " }"; code_ += "}"; - code_.SetValue("FROM_BASE", "Self(b)"); code_.SetValue("INTO_BASE", "self.0"); } @@ -840,35 +840,55 @@ class RustGenerator : public BaseGenerator { code_ += "impl<'a> flatbuffers::Follow<'a> for {{ENUM_TY}} {"; code_ += " type Inner = Self;"; code_ += " #[inline]"; - code_ += " fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; - code_ += " let b = unsafe {"; - code_ += " flatbuffers::read_scalar_at::<{{BASE_TYPE}}>(buf, loc)"; - code_ += " };"; - code_ += " {{FROM_BASE}}"; + code_ += " unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; + code_ += " let b = flatbuffers::read_scalar_at::<{{BASE_TYPE}}>(buf, loc);"; + if (IsBitFlagsEnum(enum_def)) { + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + code_ += " // Safety:"; + code_ += " // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size."; + code_ += " // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0"; + code_ += " // https://github.com/bitflags/bitflags/issues/262"; + code_ += " Self::from_bits_unchecked(b)"; + } else { + code_ += " Self(b)"; + } code_ += " }"; code_ += "}"; code_ += ""; code_ += "impl flatbuffers::Push for {{ENUM_TY}} {"; code_ += " type Output = {{ENUM_TY}};"; code_ += " #[inline]"; - code_ += " fn push(&self, dst: &mut [u8], _rest: &[u8]) {"; - code_ += - " unsafe { flatbuffers::emplace_scalar::<{{BASE_TYPE}}>" - "(dst, {{INTO_BASE}}); }"; + code_ += " unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {"; + code_ += " flatbuffers::emplace_scalar::<{{BASE_TYPE}}>(dst, {{INTO_BASE}});"; code_ += " }"; code_ += "}"; code_ += ""; code_ += "impl flatbuffers::EndianScalar for {{ENUM_TY}} {"; + code_ += " type Scalar = {{BASE_TYPE}};"; code_ += " #[inline]"; - code_ += " fn to_little_endian(self) -> Self {"; - code_ += " let b = {{BASE_TYPE}}::to_le({{INTO_BASE}});"; - code_ += " {{FROM_BASE}}"; + code_ += " fn to_little_endian(self) -> {{BASE_TYPE}} {"; + code_ += " {{INTO_BASE}}.to_le()"; code_ += " }"; code_ += " #[inline]"; code_ += " #[allow(clippy::wrong_self_convention)]"; - code_ += " fn from_little_endian(self) -> Self {"; - code_ += " let b = {{BASE_TYPE}}::from_le({{INTO_BASE}});"; - code_ += " {{FROM_BASE}}"; + code_ += " fn from_little_endian(v: {{BASE_TYPE}}) -> Self {"; + code_ += " let b = {{BASE_TYPE}}::from_le(v);"; + if (IsBitFlagsEnum(enum_def)) { + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + code_ += " // Safety:"; + code_ += " // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size."; + code_ += " // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0"; + code_ += " // https://github.com/bitflags/bitflags/issues/262"; + code_ += " unsafe { Self::from_bits_unchecked(b) }"; + } else { + code_ += " Self(b)"; + } code_ += " }"; code_ += "}"; code_ += ""; @@ -1029,8 +1049,19 @@ class RustGenerator : public BaseGenerator { if (field.IsOptional() && !IsUnion(field.value.type)) { return "None"; } } switch (GetFullType(field.value.type)) { - case ftInteger: + case ftInteger: { + return field.value.constant; + } case ftFloat: { + const std::string float_prefix = + (field.value.type.base_type == BASE_TYPE_FLOAT) ? "f32::" : "f64::"; + if (StringIsFlatbufferNan(field.value.constant)) { + return float_prefix + "NAN"; + } else if (StringIsFlatbufferPositiveInfinity(field.value.constant)) { + return float_prefix + "INFINITY"; + } else if (StringIsFlatbufferNegativeInfinity(field.value.constant)) { + return float_prefix + "NEG_INFINITY"; + } return field.value.constant; } case ftBool: { @@ -1426,11 +1457,7 @@ class RustGenerator : public BaseGenerator { case ftVectorOfBool: case ftVectorOfFloat: { const auto typname = GetTypeBasic(type.VectorType()); - const auto vector_type = - IsOneByte(type.VectorType().base_type) - ? "&" + lifetime + " [" + typname + "]" - : "flatbuffers::Vector<" + lifetime + ", " + typname + ">"; - return WrapOption(vector_type); + return WrapOption("flatbuffers::Vector<" + lifetime + ", " + typname + ">"); } case ftVectorOfEnumKey: { const auto typname = WrapInNameSpace(*type.enum_def); @@ -1439,7 +1466,7 @@ class RustGenerator : public BaseGenerator { } case ftVectorOfStruct: { const auto typname = WrapInNameSpace(*type.struct_def); - return WrapOption("&" + lifetime + " [" + typname + "]"); + return WrapOption("flatbuffers::Vector<" + lifetime + ", " + typname + ">"); } case ftVectorOfTable: { const auto typname = WrapInNameSpace(*type.struct_def); @@ -1557,19 +1584,8 @@ class RustGenerator : public BaseGenerator { : "None"; const std::string unwrap = field.IsOptional() ? "" : ".unwrap()"; - const auto t = GetFullType(field.value.type); - - // TODO(caspern): Shouldn't 1byte VectorOfEnumKey be slice too? - const std::string safe_slice = - (t == ftVectorOfStruct || - ((t == ftVectorOfBool || t == ftVectorOfFloat || - t == ftVectorOfInteger) && - IsOneByte(field.value.type.VectorType().base_type))) - ? ".map(|v| v.safe_slice())" - : ""; - - return "self._tab.get::<" + typname + ">({{STRUCT_TY}}::" + vt_offset + - ", " + default_value + ")" + safe_slice + unwrap; + return "unsafe { self._tab.get::<" + typname + ">({{STRUCT_TY}}::" + vt_offset + + ", " + default_value + ")" + unwrap + "}"; } // Generates a fully-qualified name getter for use with --gen-name-strings @@ -1655,8 +1671,8 @@ class RustGenerator : public BaseGenerator { code_ += "impl<'a> flatbuffers::Follow<'a> for {{STRUCT_TY}}<'a> {"; code_ += " type Inner = {{STRUCT_TY}}<'a>;"; code_ += " #[inline]"; - code_ += " fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; - code_ += " Self { _tab: flatbuffers::Table { buf, loc } }"; + code_ += " unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; + code_ += " Self { _tab: flatbuffers::Table::new(buf, loc) }"; code_ += " }"; code_ += "}"; code_ += ""; @@ -1677,7 +1693,7 @@ class RustGenerator : public BaseGenerator { code_ += " #[inline]"; code_ += - " pub fn init_from_table(table: flatbuffers::Table<'a>) -> " + " pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> " "Self {"; code_ += " {{STRUCT_TY}} { _tab: table }"; code_ += " }"; @@ -1769,16 +1785,7 @@ class RustGenerator : public BaseGenerator { break; } case ftVectorOfInteger: - case ftVectorOfBool: { - if (IsOneByte(type.VectorType().base_type)) { - // 1 byte stuff is viewed w/ slice instead of flatbuffer::Vector - // and thus needs to be cloned out of the slice. - code_.SetValue("EXPR", "x.to_vec()"); - break; - } - code_.SetValue("EXPR", "x.into_iter().collect()"); - break; - } + case ftVectorOfBool: case ftVectorOfFloat: case ftVectorOfEnumKey: { code_.SetValue("EXPR", "x.into_iter().collect()"); @@ -1845,6 +1852,9 @@ class RustGenerator : public BaseGenerator { this->GenComment(field.doc_comment); code_ += "#[inline]"; code_ += "pub fn {{FIELD}}(&self) -> {{RETURN_TYPE}} {"; + code_ += " // Safety:"; + code_ += " // Created from valid Table for this object"; + code_ += " // which contains a valid value in this slot"; code_ += " " + GenTableAccessorFuncBody(field, "'a"); code_ += "}"; @@ -1869,16 +1879,22 @@ class RustGenerator : public BaseGenerator { code_ += "{{NESTED}}<'a> {"; code_ += " let data = self.{{FIELD}}();"; code_ += " use flatbuffers::Follow;"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid flatbuffer in this slot"; code_ += - " >>" - "::follow(data, 0)"; + " unsafe { >>" + "::follow(data.bytes(), 0) }"; } else { code_ += "Option<{{NESTED}}<'a>> {"; code_ += " self.{{FIELD}}().map(|data| {"; code_ += " use flatbuffers::Follow;"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid flatbuffer in this slot"; code_ += - " >>" - "::follow(data, 0)"; + " unsafe { >>" + "::follow(data.bytes(), 0) }"; code_ += " })"; } code_ += "}"; @@ -1914,11 +1930,17 @@ class RustGenerator : public BaseGenerator { // as of April 10, 2020 if (field.IsRequired()) { code_ += " let u = self.{{FIELD}}();"; - code_ += " Some({{U_ELEMENT_TABLE_TYPE}}::init_from_table(u))"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid union in this slot"; + code_ += " Some(unsafe { {{U_ELEMENT_TABLE_TYPE}}::init_from_table(u) })"; } else { - code_ += - " self.{{FIELD}}().map(" - "{{U_ELEMENT_TABLE_TYPE}}::init_from_table)"; + code_ +=" self.{{FIELD}}().map(|t| {"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid union in this slot"; + code_ += " unsafe { {{U_ELEMENT_TABLE_TYPE}}::init_from_table(t) }"; + code_ += " })"; } code_ += " } else {"; code_ += " None"; @@ -2291,8 +2313,8 @@ class RustGenerator : public BaseGenerator { MapNativeTableField( field, - "let w: Vec<_> = x.iter().map(|s| s.as_ref()).collect();" - "_fbb.create_vector_of_strings(&w)"); + "let w: Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();" + "_fbb.create_vector(&w)"); return; } case ftVectorOfTable: { @@ -2383,32 +2405,6 @@ class RustGenerator : public BaseGenerator { code_.SetValue("STRUCT_FN", namer_.Function(struct_def)); code_.SetValue("STRUCT_CONST", namer_.Constant(struct_def.name)); - // The root datatype accessors: - code_ += "#[inline]"; - code_ += - "#[deprecated(since=\"2.0.0\", " - "note=\"Deprecated in favor of `root_as...` methods.\")]"; - code_ += - "pub fn get_root_as_{{STRUCT_FN}}<'a>(buf: &'a [u8])" - " -> {{STRUCT_TY}}<'a> {"; - code_ += - " unsafe { flatbuffers::root_unchecked::<{{STRUCT_TY}}" - "<'a>>(buf) }"; - code_ += "}"; - code_ += ""; - - code_ += "#[inline]"; - code_ += - "#[deprecated(since=\"2.0.0\", " - "note=\"Deprecated in favor of `root_as...` methods.\")]"; - code_ += - "pub fn get_size_prefixed_root_as_{{STRUCT_FN}}" - "<'a>(buf: &'a [u8]) -> {{STRUCT_TY}}<'a> {"; - code_ += - " unsafe { flatbuffers::size_prefixed_root_unchecked::<{{STRUCT_TY}}" - "<'a>>(buf) }"; - code_ += "}"; - code_ += ""; // Default verifier root fns. code_ += "#[inline]"; code_ += "/// Verifies that a buffer of bytes contains a `{{STRUCT_TY}}`"; @@ -2650,43 +2646,25 @@ class RustGenerator : public BaseGenerator { // Follow for the value type, Follow for the reference type, Push for the // value type, and Push for the reference type. code_ += "impl flatbuffers::SimpleToVerifyInSlice for {{STRUCT_TY}} {}"; - code_ += "impl flatbuffers::SafeSliceAccess for {{STRUCT_TY}} {}"; code_ += "impl<'a> flatbuffers::Follow<'a> for {{STRUCT_TY}} {"; code_ += " type Inner = &'a {{STRUCT_TY}};"; code_ += " #[inline]"; - code_ += " fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; + code_ += " unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; code_ += " <&'a {{STRUCT_TY}}>::follow(buf, loc)"; code_ += " }"; code_ += "}"; code_ += "impl<'a> flatbuffers::Follow<'a> for &'a {{STRUCT_TY}} {"; code_ += " type Inner = &'a {{STRUCT_TY}};"; code_ += " #[inline]"; - code_ += " fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; + code_ += " unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {"; code_ += " flatbuffers::follow_cast_ref::<{{STRUCT_TY}}>(buf, loc)"; code_ += " }"; code_ += "}"; code_ += "impl<'b> flatbuffers::Push for {{STRUCT_TY}} {"; code_ += " type Output = {{STRUCT_TY}};"; code_ += " #[inline]"; - code_ += " fn push(&self, dst: &mut [u8], _rest: &[u8]) {"; - code_ += " let src = unsafe {"; - code_ += - " ::core::slice::from_raw_parts(" - "self as *const {{STRUCT_TY}} as *const u8, Self::size())"; - code_ += " };"; - code_ += " dst.copy_from_slice(src);"; - code_ += " }"; - code_ += "}"; - code_ += "impl<'b> flatbuffers::Push for &'b {{STRUCT_TY}} {"; - code_ += " type Output = {{STRUCT_TY}};"; - code_ += ""; - code_ += " #[inline]"; - code_ += " fn push(&self, dst: &mut [u8], _rest: &[u8]) {"; - code_ += " let src = unsafe {"; - code_ += - " ::core::slice::from_raw_parts(" - "*self as *const {{STRUCT_TY}} as *const u8, Self::size())"; - code_ += " };"; + code_ += " unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {"; + code_ += " let src = ::core::slice::from_raw_parts(self as *const {{STRUCT_TY}} as *const u8, Self::size());"; code_ += " dst.copy_from_slice(src);"; code_ += " }"; code_ += "}"; @@ -2759,6 +2737,9 @@ class RustGenerator : public BaseGenerator { // Getter. if (IsStruct(field.value.type)) { code_ += "pub fn {{FIELD}}(&self) -> &{{FIELD_TYPE}} {"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid struct in this slot"; code_ += " unsafe {" " &*(self.0[{{FIELD_OFFSET}}..].as_ptr() as *const" @@ -2770,20 +2751,26 @@ class RustGenerator : public BaseGenerator { code_ += "pub fn {{FIELD}}(&'a self) -> " "flatbuffers::Array<'a, {{ARRAY_ITEM}}, {{ARRAY_SIZE}}> {"; - code_ += " flatbuffers::Array::follow(&self.0, {{FIELD_OFFSET}})"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid array in this slot"; + code_ += " unsafe { flatbuffers::Array::follow(&self.0, {{FIELD_OFFSET}}) }"; } else { code_ += "pub fn {{FIELD}}(&self) -> {{FIELD_TYPE}} {"; code_ += " let mut mem = core::mem::MaybeUninit::" - "<{{FIELD_TYPE}}>::uninit();"; - code_ += " unsafe {"; + "<<{{FIELD_TYPE}} as EndianScalar>::Scalar>::uninit();"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid value in this slot"; + code_ += " EndianScalar::from_little_endian(unsafe {"; code_ += " core::ptr::copy_nonoverlapping("; code_ += " self.0[{{FIELD_OFFSET}}..].as_ptr(),"; code_ += " mem.as_mut_ptr() as *mut u8,"; - code_ += " core::mem::size_of::<{{FIELD_TYPE}}>(),"; + code_ += " core::mem::size_of::<<{{FIELD_TYPE}} as EndianScalar>::Scalar>(),"; code_ += " );"; code_ += " mem.assume_init()"; - code_ += " }.from_little_endian()"; + code_ += " })"; } code_ += "}\n"; // Setter. @@ -2804,13 +2791,19 @@ class RustGenerator : public BaseGenerator { code_ += "pub fn set_{{FIELD}}(&mut self, items: &{{FIELD_TYPE}}) " "{"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid array in this slot"; code_ += - " flatbuffers::emplace_scalar_array(&mut self.0, " - "{{FIELD_OFFSET}}, items);"; + " unsafe { flatbuffers::emplace_scalar_array(&mut self.0, " + "{{FIELD_OFFSET}}, items) };"; } else { code_.SetValue("FIELD_SIZE", NumToString(InlineSize(field.value.type))); code_ += "pub fn set_{{FIELD}}(&mut self, x: &{{FIELD_TYPE}}) {"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid array in this slot"; code_ += " unsafe {"; code_ += " core::ptr::copy("; code_ += " x.as_ptr() as *const u8,"; @@ -2822,11 +2815,14 @@ class RustGenerator : public BaseGenerator { } else { code_ += "pub fn set_{{FIELD}}(&mut self, x: {{FIELD_TYPE}}) {"; code_ += " let x_le = x.to_little_endian();"; + code_ += " // Safety:"; + code_ += " // Created from a valid Table for this object"; + code_ += " // Which contains a valid value in this slot"; code_ += " unsafe {"; code_ += " core::ptr::copy_nonoverlapping("; - code_ += " &x_le as *const {{FIELD_TYPE}} as *const u8,"; + code_ += " &x_le as *const _ as *const u8,"; code_ += " self.0[{{FIELD_OFFSET}}..].as_mut_ptr(),"; - code_ += " core::mem::size_of::<{{FIELD_TYPE}}>(),"; + code_ += " core::mem::size_of::<<{{FIELD_TYPE}} as EndianScalar>::Scalar>(),"; code_ += " );"; code_ += " }"; } diff --git a/third_party/flatbuffers/src/idl_gen_swift.cpp b/third_party/flatbuffers/src/idl_gen_swift.cpp index b3baa281a5..c7cf2b5c88 100644 --- a/third_party/flatbuffers/src/idl_gen_swift.cpp +++ b/third_party/flatbuffers/src/idl_gen_swift.cpp @@ -1198,7 +1198,8 @@ class SwiftGenerator : public BaseGenerator { void GenEnum(const EnumDef &enum_def) { if (enum_def.generated) return; - const auto is_private_access = enum_def.attributes.Lookup("private"); + const bool is_private_access = parser_.opts.swift_implementation_only || + enum_def.attributes.Lookup("private") != nullptr; code_.SetValue("ENUM_TYPE", enum_def.is_union ? "UnionEnum" : "Enum, Verifiable"); code_.SetValue("ACCESS_TYPE", is_private_access ? "internal" : "public"); @@ -1873,7 +1874,7 @@ class SwiftGenerator : public BaseGenerator { } std::string ValidateFunc() { - return "static func validateVersion() { FlatBuffersVersion_2_0_8() }"; + return "static func validateVersion() { FlatBuffersVersion_22_10_26() }"; } std::string GenType(const Type &type, diff --git a/third_party/flatbuffers/src/idl_gen_text.cpp b/third_party/flatbuffers/src/idl_gen_text.cpp index 3b69c9587e..52f854dd45 100644 --- a/third_party/flatbuffers/src/idl_gen_text.cpp +++ b/third_party/flatbuffers/src/idl_gen_text.cpp @@ -16,6 +16,8 @@ // independent from idl_parser, since this code is not needed for most clients +#include + #include "flatbuffers/flatbuffers.h" #include "flatbuffers/flexbuffers.h" #include "flatbuffers/idl.h" diff --git a/third_party/flatbuffers/src/idl_gen_ts.cpp b/third_party/flatbuffers/src/idl_gen_ts.cpp index 32ab863edc..9fd1203f58 100644 --- a/third_party/flatbuffers/src/idl_gen_ts.cpp +++ b/third_party/flatbuffers/src/idl_gen_ts.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -402,12 +403,26 @@ class TsGenerator : public BaseGenerator { const auto &value = field.value; if (value.type.enum_def && value.type.base_type != BASE_TYPE_UNION && value.type.base_type != BASE_TYPE_VECTOR) { - // If the value is an enum with a 64-bit base type, we have to just - // return the bigint value directly since typescript does not support - // enums with bigint backing types. switch (value.type.base_type) { + case BASE_TYPE_ARRAY: { + std::string ret = "["; + for (auto i = 0; i < value.type.fixed_length; ++i) { + std::string enum_name = + AddImport(imports, *value.type.enum_def, *value.type.enum_def) + .name; + std::string enum_value = namer_.Variant( + *value.type.enum_def->FindByValue(value.constant)); + ret += enum_name + "." + enum_value + + (i < value.type.fixed_length - 1 ? ", " : ""); + } + ret += "]"; + return ret; + } case BASE_TYPE_LONG: case BASE_TYPE_ULONG: { + // If the value is an enum with a 64-bit base type, we have to just + // return the bigint value directly since typescript does not support + // enums with bigint backing types. return "BigInt('" + value.constant + "')"; } default: { @@ -432,6 +447,7 @@ class TsGenerator : public BaseGenerator { return "null"; } + case BASE_TYPE_ARRAY: case BASE_TYPE_VECTOR: return "[]"; case BASE_TYPE_LONG: @@ -439,9 +455,16 @@ class TsGenerator : public BaseGenerator { return "BigInt('" + value.constant + "')"; } - default: - if (value.constant == "nan") { return "NaN"; } + default: { + if (StringIsFlatbufferNan(value.constant)) { + return "NaN"; + } else if (StringIsFlatbufferPositiveInfinity(value.constant)) { + return "Infinity"; + } else if (StringIsFlatbufferNegativeInfinity(value.constant)) { + return "-Infinity"; + } return value.constant; + } } } @@ -464,6 +487,22 @@ class TsGenerator : public BaseGenerator { case BASE_TYPE_BOOL: return allowNull ? "boolean|null" : "boolean"; case BASE_TYPE_LONG: case BASE_TYPE_ULONG: return allowNull ? "bigint|null" : "bigint"; + case BASE_TYPE_ARRAY: { + std::string name; + if (type.element == BASE_TYPE_LONG || type.element == BASE_TYPE_ULONG) { + name = "bigint[]"; + } else if (type.element != BASE_TYPE_STRUCT) { + name = "number[]"; + } else { + name = "any[]"; + if (parser_.opts.generate_object_based_api) { + name = "(any|" + + GetTypeName(*type.struct_def, /*object_api =*/true) + ")[]"; + } + } + + return name + (allowNull ? "|null" : ""); + } default: if (IsScalar(type.base_type)) { if (type.enum_def) { @@ -536,12 +575,91 @@ class TsGenerator : public BaseGenerator { // Generate arguments for a struct inside a struct. To ensure names // don't clash, and to make it obvious these arguments are constructing // a nested struct, prefix the name with the field name. - GenStructBody(*field.value.type.struct_def, body, - nameprefix + field.name + "_"); + GenStructBody( + *field.value.type.struct_def, body, + nameprefix.length() ? nameprefix + "_" + field.name : field.name); } else { - *body += " builder.write" + GenWriteMethod(field.value.type) + "("; - if (field.value.type.base_type == BASE_TYPE_BOOL) { *body += "+"; } - *body += nameprefix + field.name + ");\n"; + auto element_type = field.value.type.element; + + if (field.value.type.base_type == BASE_TYPE_ARRAY) { + switch (field.value.type.element) { + case BASE_TYPE_STRUCT: { + std::string str_last_item_idx = + NumToString(field.value.type.fixed_length - 1); + *body += "\n for (let i = " + str_last_item_idx + + "; i >= 0; --i" + ") {\n"; + + std::string fname = nameprefix.length() + ? nameprefix + "_" + field.name + : field.name; + + *body += " const item = " + fname + "?.[i];\n\n"; + + if (parser_.opts.generate_object_based_api) { + *body += " if (item instanceof " + + GetTypeName(*field.value.type.struct_def, + /*object_api =*/true) + + ") {\n"; + *body += " item.pack(builder);\n"; + *body += " continue;\n"; + *body += " }\n\n"; + } + + std::string class_name = + GetPrefixedName(*field.value.type.struct_def); + std::string pack_func_create_call = + class_name + ".create" + class_name + "(builder,\n"; + pack_func_create_call += + " " + + GenStructMemberValueTS(*field.value.type.struct_def, "item", + ",\n ", false) + + "\n "; + *body += " " + pack_func_create_call; + *body += " );\n }\n\n"; + + break; + } + default: { + std::string str_last_item_idx = + NumToString(field.value.type.fixed_length - 1); + std::string fname = nameprefix.length() + ? nameprefix + "_" + field.name + : field.name; + + *body += "\n for (let i = " + str_last_item_idx + + "; i >= 0; --i) {\n"; + *body += " builder.write"; + *body += GenWriteMethod( + static_cast(field.value.type.element)); + *body += "("; + *body += element_type == BASE_TYPE_BOOL ? "+" : ""; + + if (element_type == BASE_TYPE_LONG || + element_type == BASE_TYPE_ULONG) { + *body += "BigInt(" + fname + "?.[i] ?? 0));\n"; + } else { + *body += "(" + fname + "?.[i] ?? 0));\n\n"; + } + *body += " }\n\n"; + break; + } + } + } else { + std::string fname = + nameprefix.length() ? nameprefix + "_" + field.name : field.name; + + *body += " builder.write" + GenWriteMethod(field.value.type) + "("; + if (field.value.type.base_type == BASE_TYPE_BOOL) { + *body += "Number(Boolean(" + fname + ")));\n"; + continue; + } else if (field.value.type.base_type == BASE_TYPE_LONG || + field.value.type.base_type == BASE_TYPE_ULONG) { + *body += "BigInt(" + fname + " ?? 0));\n"; + continue; + } + + *body += fname + ");\n"; + } } } } @@ -759,10 +877,10 @@ class TsGenerator : public BaseGenerator { import.object_name = object_name; import.bare_file_path = bare_file_path; import.rel_file_path = rel_file_path; - import.import_statement = - "import { " + symbols_expression + " } from '" + rel_file_path + ".js';"; - import.export_statement = - "export { " + symbols_expression + " } from '." + bare_file_path + ".js';"; + import.import_statement = "import { " + symbols_expression + " } from '" + + rel_file_path + ".js';"; + import.export_statement = "export { " + symbols_expression + " } from '." + + bare_file_path + ".js';"; import.dependency = &dependency; import.dependent = &dependent; @@ -903,7 +1021,7 @@ class TsGenerator : public BaseGenerator { const auto conversion_function = GenUnionConvFuncName(enum_def); ret = "(() => {\n"; - ret += " let temp = " + conversion_function + "(this." + + ret += " const temp = " + conversion_function + "(this." + namer_.Method(field_name, "Type") + "(), " + field_binded_method + ");\n"; ret += " if(temp === null) { return null; }\n"; @@ -916,17 +1034,20 @@ class TsGenerator : public BaseGenerator { const auto conversion_function = GenUnionListConvFuncName(enum_def); ret = "(() => {\n"; - ret += " let ret = [];\n"; + ret += " const ret: (" + + GenObjApiUnionTypeTS(imports, *union_type.struct_def, + parser_.opts, *union_type.enum_def) + + ")[] = [];\n"; ret += " for(let targetEnumIndex = 0; targetEnumIndex < this." + namer_.Method(field_name, "TypeLength") + "()" + "; " "++targetEnumIndex) {\n"; - ret += " let targetEnum = this." + + ret += " const targetEnum = this." + namer_.Method(field_name, "Type") + "(targetEnumIndex);\n"; ret += " if(targetEnum === null || " + enum_type + "[targetEnum!] === 'NONE') { " "continue; }\n\n"; - ret += " let temp = " + conversion_function + "(targetEnum, " + + ret += " const temp = " + conversion_function + "(targetEnum, " + field_binded_method + ", targetEnumIndex);\n"; ret += " if(temp === null) { continue; }\n"; ret += union_has_string ? " if(typeof temp === 'string') { " @@ -973,6 +1094,11 @@ class TsGenerator : public BaseGenerator { std::string nullValue = "0"; if (field.value.type.base_type == BASE_TYPE_BOOL) { nullValue = "false"; + } else if (field.value.type.base_type == BASE_TYPE_LONG || + field.value.type.base_type == BASE_TYPE_ULONG) { + nullValue = "BigInt(0)"; + } else if (field.value.type.base_type == BASE_TYPE_ARRAY) { + nullValue = "[]"; } ret += "(" + curr_member_accessor + " ?? " + nullValue + ")"; } else { @@ -1091,6 +1217,95 @@ class TsGenerator : public BaseGenerator { break; } + case BASE_TYPE_ARRAY: { + auto vectortype = field.value.type.VectorType(); + auto vectortypename = + GenTypeName(imports, struct_def, vectortype, false); + is_vector = true; + + field_type = "("; + + switch (vectortype.base_type) { + case BASE_TYPE_STRUCT: { + const auto &sd = *field.value.type.struct_def; + const auto field_type_name = + GetTypeName(sd, /*object_api=*/true); + field_type += field_type_name; + field_type += ")[]"; + + field_val = GenBBAccess() + ".createObjList<" + vectortypename + + ", " + field_type_name + ">(" + + field_binded_method + ", " + + NumToString(field.value.type.fixed_length) + ")"; + + if (sd.fixed) { + field_offset_decl = + "builder.createStructOffsetList(this." + field_field + + ", " + AddImport(imports, struct_def, struct_def).name + + "." + namer_.Method("start", field, "Vector") + ")"; + } else { + field_offset_decl = + AddImport(imports, struct_def, struct_def).name + "." + + namer_.Method("create", field, "Vector") + + "(builder, builder.createObjectOffsetList(" + "this." + + field_field + "))"; + } + + break; + } + + case BASE_TYPE_STRING: { + field_type += "string)[]"; + field_val = GenBBAccess() + ".createScalarList(" + + field_binded_method + ", this." + + namer_.Field(field, "Length") + "())"; + field_offset_decl = + AddImport(imports, struct_def, struct_def).name + "." + + namer_.Method("create", field, "Vector") + + "(builder, builder.createObjectOffsetList(" + "this." + + namer_.Field(field) + "))"; + break; + } + + case BASE_TYPE_UNION: { + field_type += GenObjApiUnionTypeTS( + imports, struct_def, parser.opts, *(vectortype.enum_def)); + field_type += ")[]"; + field_val = GenUnionValTS(imports, struct_def, field_method, + vectortype, true); + + field_offset_decl = + AddImport(imports, struct_def, struct_def).name + "." + + namer_.Method("create", field, "Vector") + + "(builder, builder.createObjectOffsetList(" + "this." + + namer_.Field(field) + "))"; + + break; + } + default: { + if (vectortype.enum_def) { + field_type += GenTypeName(imports, struct_def, vectortype, + false, HasNullDefault(field)); + } else { + field_type += vectortypename; + } + field_type += ")[]"; + field_val = GenBBAccess() + ".createScalarList<" + + vectortypename + ">(" + field_binded_method + ", " + + NumToString(field.value.type.fixed_length) + ")"; + + field_offset_decl = + AddImport(imports, struct_def, struct_def).name + "." + + namer_.Method("create", field, "Vector") + + "(builder, this." + field_field + ")"; + + break; + } + } + + break; + } + case BASE_TYPE_VECTOR: { auto vectortype = field.value.type.VectorType(); auto vectortypename = @@ -1102,11 +1317,13 @@ class TsGenerator : public BaseGenerator { switch (vectortype.base_type) { case BASE_TYPE_STRUCT: { const auto &sd = *field.value.type.struct_def; - field_type += GetTypeName(sd, /*object_api=*/true); - ; + const auto field_type_name = + GetTypeName(sd, /*object_api=*/true); + field_type += field_type_name; field_type += ")[]"; - field_val = GenBBAccess() + ".createObjList(" + + field_val = GenBBAccess() + ".createObjList<" + vectortypename + + ", " + field_type_name + ">(" + field_binded_method + ", this." + namer_.Method(field, "Length") + "())"; @@ -1128,7 +1345,7 @@ class TsGenerator : public BaseGenerator { case BASE_TYPE_STRING: { field_type += "string)[]"; - field_val = GenBBAccess() + ".createScalarList(" + + field_val = GenBBAccess() + ".createScalarList(" + field_binded_method + ", this." + namer_.Field(field, "Length") + "())"; field_offset_decl = @@ -1162,9 +1379,9 @@ class TsGenerator : public BaseGenerator { field_type += vectortypename; } field_type += ")[]"; - field_val = GenBBAccess() + ".createScalarList(" + - field_binded_method + ", this." + - namer_.Method(field, "Length") + "())"; + field_val = GenBBAccess() + ".createScalarList<" + + vectortypename + ">(" + field_binded_method + + ", this." + namer_.Method(field, "Length") + "())"; field_offset_decl = AddImport(imports, struct_def, struct_def).name + "." + @@ -1260,7 +1477,7 @@ class TsGenerator : public BaseGenerator { obj_api_class = "\n"; obj_api_class += "export class "; obj_api_class += GetTypeName(struct_def, /*object_api=*/true); - obj_api_class += " {\n"; + obj_api_class += " implements flatbuffers.IGeneratedObject {\n"; obj_api_class += constructor_func; obj_api_class += pack_func_prototype + pack_func_offset_decl + pack_func_create_call + "\n}"; @@ -1298,12 +1515,17 @@ class TsGenerator : public BaseGenerator { } const std::string object_name = GetTypeName(struct_def); + const std::string object_api_name = GetTypeName(struct_def, true); // Emit constructor GenDocComment(struct_def.doc_comment, code_ptr); code += "export class "; code += object_name; - code += " {\n"; + if (parser.opts.generate_object_based_api) + code += " implements flatbuffers.IUnpackableObject<" + object_api_name + + "> {\n"; + else + code += " {\n"; code += " bb: flatbuffers.ByteBuffer|null = null;\n"; code += " bb_pos = 0;\n"; @@ -1337,9 +1559,16 @@ class TsGenerator : public BaseGenerator { it != struct_def.fields.vec.end(); ++it) { auto &field = **it; if (field.deprecated) continue; - auto offset_prefix = - " const offset = " + GenBBAccess() + ".__offset(this.bb_pos, " + - NumToString(field.value.offset) + ");\n return offset ? "; + std::string offset_prefix = ""; + + if (field.value.type.base_type == BASE_TYPE_ARRAY) { + offset_prefix = " return "; + } else { + offset_prefix = " const offset = " + GenBBAccess() + + ".__offset(this.bb_pos, " + + NumToString(field.value.offset) + ");\n"; + offset_prefix += " return offset ? "; + } // Emit a scalar field const auto is_string = IsString(field.value.type); @@ -1379,9 +1608,11 @@ class TsGenerator : public BaseGenerator { } else { std::string index = "this.bb_pos + offset"; if (is_string) { index += ", optionalEncoding"; } - code += offset_prefix + - GenGetter(field.value.type, "(" + index + ")") + " : " + - GenDefaultValue(field, imports); + code += + offset_prefix + GenGetter(field.value.type, "(" + index + ")"); + if (field.value.type.base_type != BASE_TYPE_ARRAY) { + code += " : " + GenDefaultValue(field, imports); + } code += ";\n"; } } @@ -1414,6 +1645,95 @@ class TsGenerator : public BaseGenerator { break; } + case BASE_TYPE_ARRAY: { + auto vectortype = field.value.type.VectorType(); + auto vectortypename = + GenTypeName(imports, struct_def, vectortype, false); + auto inline_size = InlineSize(vectortype); + auto index = "this.bb_pos + " + NumToString(field.value.offset) + + " + index" + MaybeScale(inline_size); + std::string ret_type; + bool is_union = false; + switch (vectortype.base_type) { + case BASE_TYPE_STRUCT: ret_type = vectortypename; break; + case BASE_TYPE_STRING: ret_type = vectortypename; break; + case BASE_TYPE_UNION: + ret_type = "?flatbuffers.Table"; + is_union = true; + break; + default: ret_type = vectortypename; + } + GenDocComment(field.doc_comment, code_ptr); + std::string prefix = namer_.Method(field); + // TODO: make it work without any + // if (is_union) { prefix += ""; } + if (is_union) { prefix += ""; } + prefix += "(index: number"; + if (is_union) { + const auto union_type = + GenUnionGenericTypeTS(*(field.value.type.enum_def)); + + vectortypename = union_type; + code += prefix + ", obj:" + union_type; + } else if (vectortype.base_type == BASE_TYPE_STRUCT) { + code += prefix + ", obj?:" + vectortypename; + } else if (IsString(vectortype)) { + code += prefix + "):string\n"; + code += prefix + ",optionalEncoding:flatbuffers.Encoding" + + "):" + vectortypename + "\n"; + code += prefix + ",optionalEncoding?:any"; + } else { + code += prefix; + } + code += "):" + vectortypename + "|null {\n"; + + if (vectortype.base_type == BASE_TYPE_STRUCT) { + code += offset_prefix + "(obj || " + + GenerateNewExpression(vectortypename); + code += ").__init("; + code += vectortype.struct_def->fixed + ? index + : GenBBAccess() + ".__indirect(" + index + ")"; + code += ", " + GenBBAccess() + ")"; + } else { + if (is_union) { + index = "obj, " + index; + } else if (IsString(vectortype)) { + index += ", optionalEncoding"; + } + code += offset_prefix + GenGetter(vectortype, "(" + index + ")"); + } + + switch (field.value.type.base_type) { + case BASE_TYPE_ARRAY: { + break; + } + case BASE_TYPE_BOOL: { + code += " : false"; + break; + } + case BASE_TYPE_LONG: + case BASE_TYPE_ULONG: { + code += " : BigInt(0)"; + break; + } + default: { + if (IsScalar(field.value.type.element)) { + if (field.value.type.enum_def) { + code += field.value.constant; + } else { + code += " : 0"; + } + } else { + code += ": null"; + } + break; + } + } + code += ";\n"; + break; + } + case BASE_TYPE_VECTOR: { auto vectortype = field.value.type.VectorType(); auto vectortypename = diff --git a/third_party/flatbuffers/src/idl_parser.cpp b/third_party/flatbuffers/src/idl_parser.cpp index 524c99688c..48d0f072be 100644 --- a/third_party/flatbuffers/src/idl_parser.cpp +++ b/third_party/flatbuffers/src/idl_parser.cpp @@ -507,6 +507,8 @@ CheckedError Parser::Next() { case ')': case '[': case ']': + case '<': + case '>': case ',': case ':': case ';': @@ -1584,7 +1586,6 @@ CheckedError Parser::ParseVectorDelimiters(uoffset_t &count, F body) { return NoError(); } - CheckedError Parser::ParseAlignAttribute(const std::string &align_constant, size_t min_align, size_t *align) { // Use uint8_t to avoid problems with size_t==`unsigned long` on LP64. @@ -1614,6 +1615,7 @@ CheckedError Parser::ParseVector(const Type &type, uoffset_t *ovalue, }); ECHECK(err); + const size_t alignment = InlineAlignment(type); const size_t len = count * InlineSize(type) / InlineAlignment(type); const size_t elemsize = InlineAlignment(type); const auto force_align = field->attributes.Lookup("force_align"); @@ -1623,7 +1625,8 @@ CheckedError Parser::ParseVector(const Type &type, uoffset_t *ovalue, if (align > 1) { builder_.ForceVectorAlignment(len, elemsize, align); } } - builder_.StartVector(len, elemsize); + // TODO Fix using element alignment as size (`elemsize`)! + builder_.StartVector(len, elemsize, alignment); for (uoffset_t i = 0; i < count; i++) { // start at the back, since we're building the data backwards. auto &val = field_stack_.back().first; @@ -2448,14 +2451,17 @@ CheckedError Parser::ParseEnum(const bool is_union, EnumDef **dest, EXPECT(kTokenIntegerConstant); } - ECHECK(evb.AcceptEnumerator()); - if (opts.proto_mode && Is('[')) { NEXT(); // ignore attributes on enums. while (token_ != ']') NEXT(); NEXT(); + } else { + // parse attributes in fbs schema + ECHECK(ParseMetaData(&ev.attributes)); } + + ECHECK(evb.AcceptEnumerator()); } if (!Is(opts.proto_mode ? ';' : ',')) break; NEXT(); @@ -2550,7 +2556,8 @@ bool Parser::SupportsOptionalScalars(const flatbuffers::IDLOptions &opts) { IDLOptions::kRust | IDLOptions::kSwift | IDLOptions::kLobster | IDLOptions::kKotlin | IDLOptions::kCpp | IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kTs | IDLOptions::kBinary | - IDLOptions::kGo | IDLOptions::kPython | IDLOptions::kJson; + IDLOptions::kGo | IDLOptions::kPython | IDLOptions::kJson | + IDLOptions::kNim; unsigned long langs = opts.lang_to_generate; return (langs > 0 && langs < IDLOptions::kMAX) && !(langs & ~supported_langs); } @@ -2561,7 +2568,7 @@ bool Parser::SupportsOptionalScalars() const { bool Parser::SupportsDefaultVectorsAndStrings() const { static FLATBUFFERS_CONSTEXPR unsigned long supported_langs = - IDLOptions::kRust | IDLOptions::kSwift; + IDLOptions::kRust | IDLOptions::kSwift | IDLOptions::kNim; return !(opts.lang_to_generate & ~supported_langs); } @@ -2569,14 +2576,14 @@ bool Parser::SupportsAdvancedUnionFeatures() const { return (opts.lang_to_generate & ~(IDLOptions::kCpp | IDLOptions::kTs | IDLOptions::kPhp | IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kKotlin | - IDLOptions::kBinary | IDLOptions::kSwift)) == 0; + IDLOptions::kBinary | IDLOptions::kSwift | IDLOptions::kNim)) == 0; } bool Parser::SupportsAdvancedArrayFeatures() const { return (opts.lang_to_generate & ~(IDLOptions::kCpp | IDLOptions::kPython | IDLOptions::kJava | IDLOptions::kCSharp | IDLOptions::kJsonSchema | IDLOptions::kJson | - IDLOptions::kBinary | IDLOptions::kRust)) == 0; + IDLOptions::kBinary | IDLOptions::kRust | IDLOptions::kTs)) == 0; } Namespace *Parser::UniqueNamespace(Namespace *ns) { @@ -2891,6 +2898,8 @@ CheckedError Parser::ParseProtoFields(StructDef *struct_def, bool isextend, NEXT(); while (!Is(';')) { NEXT(); } // A variety of formats, just skip. NEXT(); + } else if (IsIdent("map")) { + ECHECK(ParseProtoMapField(struct_def)); } else { std::vector field_comment = doc_comment_; // Parse the qualifier. @@ -3025,6 +3034,41 @@ CheckedError Parser::ParseProtoFields(StructDef *struct_def, bool isextend, return NoError(); } +CheckedError Parser::ParseProtoMapField(StructDef *struct_def) { + NEXT(); + EXPECT('<'); + Type key_type; + ECHECK(ParseType(key_type)); + EXPECT(','); + Type value_type; + ECHECK(ParseType(value_type)); + EXPECT('>'); + auto field_name = attribute_; + NEXT(); + EXPECT('='); + EXPECT(kTokenIntegerConstant); + EXPECT(';'); + + auto entry_table_name = ConvertCase(field_name, Case::kUpperCamel) + "Entry"; + StructDef *entry_table; + ECHECK(StartStruct(entry_table_name, &entry_table)); + entry_table->has_key = true; + FieldDef *key_field; + ECHECK(AddField(*entry_table, "key", key_type, &key_field)); + key_field->key = true; + FieldDef *value_field; + ECHECK(AddField(*entry_table, "value", value_type, &value_field)); + + Type field_type; + field_type.base_type = BASE_TYPE_VECTOR; + field_type.element = BASE_TYPE_STRUCT; + field_type.struct_def = entry_table; + FieldDef *field; + ECHECK(AddField(*struct_def, field_name, field_type, &field)); + + return NoError(); +} + CheckedError Parser::ParseProtoKey() { if (token_ == '(') { NEXT(); @@ -3259,6 +3303,10 @@ bool Parser::ParseJson(const char *json, const char *json_filename) { return done; } +std::ptrdiff_t Parser::BytesConsumed() const { + return std::distance(source_, cursor_); +} + CheckedError Parser::StartParseFile(const char *source, const char *source_filename) { file_being_parsed_ = source_filename ? source_filename : ""; @@ -3413,7 +3461,6 @@ CheckedError Parser::CheckPrivatelyLeakedFields(const Definition &def, return NoError(); } - CheckedError Parser::DoParse(const char *source, const char **include_paths, const char *source_filename, const char *include_filename) { @@ -3601,9 +3648,11 @@ CheckedError Parser::DoParseJson() { : nullptr); } } - // Check that JSON file doesn't contain more objects or IDL directives. - // Comments after JSON are allowed. - EXPECT(kTokenEof); + if (opts.require_json_eof) { + // Check that JSON file doesn't contain more objects or IDL directives. + // Comments after JSON are allowed. + EXPECT(kTokenEof); + } return NoError(); } @@ -3635,6 +3684,44 @@ std::set Parser::GetIncludedFilesRecursive( // Schema serialization functionality: +static flatbuffers::Offset< + flatbuffers::Vector>> +SerializeAttributesCommon(const SymbolTable &attributes, + FlatBufferBuilder *builder, const Parser &parser) { + std::vector> attrs; + for (auto kv = attributes.dict.begin(); kv != attributes.dict.end(); ++kv) { + auto it = parser.known_attributes_.find(kv->first); + FLATBUFFERS_ASSERT(it != parser.known_attributes_.end()); + if (parser.opts.binary_schema_builtins || !it->second) { + auto key = builder->CreateString(kv->first); + auto val = builder->CreateString(kv->second->constant); + attrs.push_back(reflection::CreateKeyValue(*builder, key, val)); + } + } + if (attrs.size()) { + return builder->CreateVectorOfSortedTables(&attrs); + } else { + return 0; + } +} + +static bool DeserializeAttributesCommon( + SymbolTable &attributes, Parser &parser, + const Vector> *attrs) { + if (attrs == nullptr) return true; + for (uoffset_t i = 0; i < attrs->size(); ++i) { + auto kv = attrs->Get(i); + auto value = new Value(); + if (kv->value()) { value->constant = kv->value()->str(); } + if (attributes.Add(kv->key()->str(), value)) { + delete value; + return false; + } + parser.known_attributes_[kv->key()->str()]; + } + return true; +} + void Parser::Serialize() { builder_.Clear(); AssignIndices(structs_.vec); @@ -3927,32 +4014,52 @@ bool EnumDef::Deserialize(Parser &parser, const reflection::Enum *_enum) { return true; } +flatbuffers::Offset< + flatbuffers::Vector>> +EnumVal::SerializeAttributes(FlatBufferBuilder *builder, + const Parser &parser) const { + return SerializeAttributesCommon(attributes, builder, parser); +} + +bool EnumVal::DeserializeAttributes( + Parser &parser, const Vector> *attrs) { + return DeserializeAttributesCommon(attributes, parser, attrs); +} + Offset EnumVal::Serialize(FlatBufferBuilder *builder, const Parser &parser) const { - auto name__ = builder->CreateString(name); - auto type__ = union_type.Serialize(builder); - auto docs__ = parser.opts.binary_schema_comments - ? builder->CreateVectorOfStrings(doc_comment) - : 0; - return reflection::CreateEnumVal(*builder, name__, value, type__, docs__); + const auto name__ = builder->CreateString(name); + const auto type__ = union_type.Serialize(builder); + const auto attr__ = SerializeAttributes(builder, parser); + const auto docs__ = parser.opts.binary_schema_comments + ? builder->CreateVectorOfStrings(doc_comment) + : 0; + return reflection::CreateEnumVal(*builder, name__, value, type__, docs__, + attr__); } -bool EnumVal::Deserialize(const Parser &parser, - const reflection::EnumVal *val) { +bool EnumVal::Deserialize(Parser &parser, const reflection::EnumVal *val) { name = val->name()->str(); value = val->value(); if (!union_type.Deserialize(parser, val->union_type())) return false; + if (!DeserializeAttributes(parser, val->attributes())) return false; DeserializeDoc(doc_comment, val->documentation()); return true; } Offset Type::Serialize(FlatBufferBuilder *builder) const { + size_t element_size = SizeOf(element); + if (base_type == BASE_TYPE_VECTOR && element == BASE_TYPE_STRUCT && + struct_def->bytesize != 0) { + // struct_def->bytesize==0 means struct is table + element_size = struct_def->bytesize; + } return reflection::CreateType( *builder, static_cast(base_type), static_cast(element), struct_def ? struct_def->index : (enum_def ? enum_def->index : -1), fixed_length, static_cast(SizeOf(base_type)), - static_cast(SizeOf(element))); + static_cast(element_size)); } bool Type::Deserialize(const Parser &parser, const reflection::Type *type) { @@ -3986,37 +4093,12 @@ flatbuffers::Offset< flatbuffers::Vector>> Definition::SerializeAttributes(FlatBufferBuilder *builder, const Parser &parser) const { - std::vector> attrs; - for (auto kv = attributes.dict.begin(); kv != attributes.dict.end(); ++kv) { - auto it = parser.known_attributes_.find(kv->first); - FLATBUFFERS_ASSERT(it != parser.known_attributes_.end()); - if (parser.opts.binary_schema_builtins || !it->second) { - auto key = builder->CreateString(kv->first); - auto val = builder->CreateString(kv->second->constant); - attrs.push_back(reflection::CreateKeyValue(*builder, key, val)); - } - } - if (attrs.size()) { - return builder->CreateVectorOfSortedTables(&attrs); - } else { - return 0; - } + return SerializeAttributesCommon(attributes, builder, parser); } bool Definition::DeserializeAttributes( Parser &parser, const Vector> *attrs) { - if (attrs == nullptr) return true; - for (uoffset_t i = 0; i < attrs->size(); ++i) { - auto kv = attrs->Get(i); - auto value = new Value(); - if (kv->value()) { value->constant = kv->value()->str(); } - if (attributes.Add(kv->key()->str(), value)) { - delete value; - return false; - } - parser.known_attributes_[kv->key()->str()]; - } - return true; + return DeserializeAttributesCommon(attributes, parser, attrs); } /************************************************************************/ @@ -4131,17 +4213,19 @@ std::string Parser::ConformTo(const Parser &base) { struct_def.defined_namespace->GetFullyQualifiedName(struct_def.name); auto struct_def_base = base.LookupStruct(qualified_name); if (!struct_def_base) continue; + std::set renamed_fields; for (auto fit = struct_def.fields.vec.begin(); fit != struct_def.fields.vec.end(); ++fit) { auto &field = **fit; auto field_base = struct_def_base->fields.Lookup(field.name); + const auto qualified_field_name = qualified_name + "." + field.name; if (field_base) { if (field.value.offset != field_base->value.offset) - return "offsets differ for field: " + field.name; + return "offsets differ for field: " + qualified_field_name; if (field.value.constant != field_base->value.constant) - return "defaults differ for field: " + field.name; + return "defaults differ for field: " + qualified_field_name; if (!EqualByName(field.value.type, field_base->value.type)) - return "types differ for field: " + field.name; + return "types differ for field: " + qualified_field_name; } else { // Doesn't have to exist, deleting fields is fine. // But we should check if there is a field that has the same offset @@ -4150,14 +4234,28 @@ std::string Parser::ConformTo(const Parser &base) { fbit != struct_def_base->fields.vec.end(); ++fbit) { field_base = *fbit; if (field.value.offset == field_base->value.offset) { + renamed_fields.insert(field_base); if (!EqualByName(field.value.type, field_base->value.type)) - return "field renamed to different type: " + field.name; + return "field renamed to different type: " + qualified_field_name; break; } } } } + // deletion of trailing fields are not allowed + for (auto fit = struct_def_base->fields.vec.begin(); + fit != struct_def_base->fields.vec.end(); ++fit) { + auto &field_base = **fit; + // not a renamed field + if (renamed_fields.find(&field_base) == renamed_fields.end()) { + auto field = struct_def.fields.Lookup(field_base.name); + if (!field) { + return "field deleted: " + qualified_name + "." + field_base.name; + } + } + } } + for (auto eit = enums_.vec.begin(); eit != enums_.vec.end(); ++eit) { auto &enum_def = **eit; auto qualified_name = diff --git a/third_party/flatbuffers/src/reflection.cpp b/third_party/flatbuffers/src/reflection.cpp index 7549859385..5ddff63420 100644 --- a/third_party/flatbuffers/src/reflection.cpp +++ b/third_party/flatbuffers/src/reflection.cpp @@ -689,9 +689,10 @@ Offset CopyTable(FlatBufferBuilder &fbb, FLATBUFFERS_FALLTHROUGH(); // fall thru default: { // Scalars and structs. auto element_size = GetTypeSize(element_base_type); + auto element_alignment = element_size; // For primitive elements if (elemobjectdef && elemobjectdef->is_struct()) element_size = elemobjectdef->bytesize(); - fbb.StartVector(vec->size(), element_size); + fbb.StartVector(vec->size(), element_size, element_alignment); fbb.PushBytes(vec->Data(), element_size * vec->size()); offset = fbb.EndVector(vec->size()); break; diff --git a/third_party/flatbuffers/src/util.cpp b/third_party/flatbuffers/src/util.cpp index df324e837f..aabc23aa40 100644 --- a/third_party/flatbuffers/src/util.cpp +++ b/third_party/flatbuffers/src/util.cpp @@ -109,7 +109,7 @@ static std::string ToSnakeCase(const std::string &input, bool screaming) { } else if (!islower(input[i])) { // Prevent duplicate underscores for Upper_Snake_Case strings // and UPPERCASE strings. - if (islower(input[i - 1])) { s += '_'; } + if (islower(input[i - 1]) || (isdigit(input[i-1]) && !isdigit(input[i]))) { s += '_'; } s += screaming ? CharToUpper(input[i]) : CharToLower(input[i]); } else { s += screaming ? CharToUpper(input[i]) : input[i]; @@ -135,7 +135,7 @@ std::string CamelToSnake(const std::string &input) { } else if (!islower(input[i])) { // Prevent duplicate underscores for Upper_Snake_Case strings // and UPPERCASE strings. - if (islower(input[i - 1])) { s += '_'; } + if (islower(input[i - 1]) || (isdigit(input[i-1]) && !isdigit(input[i]))) { s += '_'; } s += CharToLower(input[i]); } else { s += input[i]; diff --git a/third_party/flatbuffers/swift/README.md b/third_party/flatbuffers/swift/README.md index 6984fa8a43..cbacbf4f9c 100644 --- a/third_party/flatbuffers/swift/README.md +++ b/third_party/flatbuffers/swift/README.md @@ -1,15 +1,11 @@ FlatBuffers swift can be found in both SPM -`.package(url: "https://github.com/mustiikhalil/flatbuffers.git", from: "X.Y.Z"),` +`.package(url: "https://github.com/google/flatbuffers.git", from: "X.Y.Z"),` and Cocoapods `pod 'FlatBuffers'` -### Notes - -1- To report any error please use the main repository. - ### Contribute 1- Always run `swift test --generate-linuxmain` whenever new test functions are added or removed \ No newline at end of file diff --git a/third_party/flatbuffers/swift/Sources/FlatBuffers/Constants.swift b/third_party/flatbuffers/swift/Sources/FlatBuffers/Constants.swift index a2a108263c..cf5935c752 100644 --- a/third_party/flatbuffers/swift/Sources/FlatBuffers/Constants.swift +++ b/third_party/flatbuffers/swift/Sources/FlatBuffers/Constants.swift @@ -119,4 +119,4 @@ extension UInt64: Scalar, Verifiable { public typealias NumericValue = UInt64 } -public func FlatBuffersVersion_2_0_8() {} +public func FlatBuffersVersion_22_10_26() {} diff --git a/third_party/flatbuffers/tests/Abc.nim b/third_party/flatbuffers/tests/Abc.nim new file mode 100644 index 0000000000..be4e6675f1 --- /dev/null +++ b/third_party/flatbuffers/tests/Abc.nim @@ -0,0 +1,13 @@ +#[ Abc + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : +]# + +type Abc*{.pure.} = enum + A = 0.int32, + B = 1.int32, + C = 2.int32, diff --git a/third_party/flatbuffers/tests/BUILD.bazel b/third_party/flatbuffers/tests/BUILD.bazel index 6c0ca22a15..b76eece097 100644 --- a/third_party/flatbuffers/tests/BUILD.bazel +++ b/third_party/flatbuffers/tests/BUILD.bazel @@ -8,6 +8,9 @@ cc_test( name = "flatbuffers_test", testonly = 1, srcs = [ + "alignment_test.cpp", + "alignment_test.h", + "alignment_test_generated.h", "evolution_test.cpp", "evolution_test.h", "evolution_test/evolution_v1_generated.h", @@ -50,6 +53,7 @@ cc_test( "-DBAZEL_TEST_DATA_PATH", ], data = [ + ":alignment_test.fbs", ":arrays_test.bfbs", ":arrays_test.fbs", ":arrays_test.golden", @@ -90,6 +94,7 @@ cc_test( "include/", ], deps = [ + ":alignment_test_cc_fbs", ":arrays_test_cc_fbs", ":monster_extra_cc_fbs", ":monster_test_cc_fbs", @@ -223,3 +228,8 @@ flatbuffer_ts_library( "//tests/test_dir:typescript_transitive_ts_ts_fbs", ], ) + +flatbuffer_cc_library( + name = "alignment_test_cc_fbs", + srcs = ["alignment_test.fbs"], +) diff --git a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.java b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.java index 0419f794a2..58d676db4b 100644 --- a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.java +++ b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class LongFloatEntry extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static LongFloatEntry getRootAsLongFloatEntry(ByteBuffer _bb) { return getRootAsLongFloatEntry(_bb, new LongFloatEntry()); } public static LongFloatEntry getRootAsLongFloatEntry(ByteBuffer _bb, LongFloatEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.kt b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.kt index 6b1e500849..dfb2ecbae6 100644 --- a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.kt +++ b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatEntry.kt @@ -32,7 +32,7 @@ class LongFloatEntry : Table() { return (val_1 - val_2).sign } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsLongFloatEntry(_bb: ByteBuffer): LongFloatEntry = getRootAsLongFloatEntry(_bb, LongFloatEntry()) fun getRootAsLongFloatEntry(_bb: ByteBuffer, obj: LongFloatEntry): LongFloatEntry { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.java b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.java index 9cc3500c17..761439d1db 100644 --- a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.java +++ b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class LongFloatMap extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb) { return getRootAsLongFloatMap(_bb, new LongFloatMap()); } public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb, LongFloatMap obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.kt b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.kt index 3ac15aa9df..9458608e6c 100644 --- a/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.kt +++ b/third_party/flatbuffers/tests/DictionaryLookup/LongFloatMap.kt @@ -46,7 +46,7 @@ class LongFloatMap : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsLongFloatMap(_bb: ByteBuffer): LongFloatMap = getRootAsLongFloatMap(_bb, LongFloatMap()) fun getRootAsLongFloatMap(_bb: ByteBuffer, obj: LongFloatMap): LongFloatMap { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/KeywordTest/KeywordsInTable.cs b/third_party/flatbuffers/tests/KeywordTest/KeywordsInTable.cs index af2a37567c..271b21b3f8 100644 --- a/third_party/flatbuffers/tests/KeywordTest/KeywordsInTable.cs +++ b/third_party/flatbuffers/tests/KeywordTest/KeywordsInTable.cs @@ -13,7 +13,7 @@ public struct KeywordsInTable : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb) { return GetRootAsKeywordsInTable(_bb, new KeywordsInTable()); } public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb, KeywordsInTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MoreDefaults.nim b/third_party/flatbuffers/tests/MoreDefaults.nim new file mode 100644 index 0000000000..0376f5541d --- /dev/null +++ b/third_party/flatbuffers/tests/MoreDefaults.nim @@ -0,0 +1,103 @@ +#[ MoreDefaults + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : +]# + +import Abc as Abc +import flatbuffers + +type MoreDefaults* = object of FlatObj +func intsLength*(self: MoreDefaults): int = + let o = self.tab.Offset(4) + if o != 0: + return self.tab.VectorLen(o) +func ints*(self: MoreDefaults, j: int): int32 = + let o = self.tab.Offset(4) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return Get[int32](self.tab, x) +func ints*(self: MoreDefaults): seq[int32] = + let len = self.intsLength + for i in countup(0, len - 1): + result.add(self.ints(i)) +func floatsLength*(self: MoreDefaults): int = + let o = self.tab.Offset(6) + if o != 0: + return self.tab.VectorLen(o) +func floats*(self: MoreDefaults, j: int): float32 = + let o = self.tab.Offset(6) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return Get[float32](self.tab, x) +func floats*(self: MoreDefaults): seq[float32] = + let len = self.floatsLength + for i in countup(0, len - 1): + result.add(self.floats(i)) +func emptyString*(self: MoreDefaults): string = + let o = self.tab.Offset(8) + if o != 0: + return self.tab.String(self.tab.Pos + o) + return "" +func someString*(self: MoreDefaults): string = + let o = self.tab.Offset(10) + if o != 0: + return self.tab.String(self.tab.Pos + o) + return "" +func abcsLength*(self: MoreDefaults): int = + let o = self.tab.Offset(12) + if o != 0: + return self.tab.VectorLen(o) +func abcs*(self: MoreDefaults, j: int): Abc.Abc = + let o = self.tab.Offset(12) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return Abc.Abc(Get[int32](self.tab, x)) +func abcs*(self: MoreDefaults): seq[Abc.Abc] = + let len = self.abcsLength + for i in countup(0, len - 1): + result.add(self.abcs(i)) +func boolsLength*(self: MoreDefaults): int = + let o = self.tab.Offset(14) + if o != 0: + return self.tab.VectorLen(o) +func bools*(self: MoreDefaults, j: int): bool = + let o = self.tab.Offset(14) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[bool](self.tab, x) +func bools*(self: MoreDefaults): seq[bool] = + let len = self.boolsLength + for i in countup(0, len - 1): + result.add(self.bools(i)) +proc MoreDefaultsStart*(builder: var Builder) = + builder.StartObject(6) +proc MoreDefaultsAddints*(builder: var Builder, ints: uoffset) = + builder.PrependSlot(0, ints, default(uoffset)) +proc MoreDefaultsStartintsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MoreDefaultsAddfloats*(builder: var Builder, floats: uoffset) = + builder.PrependSlot(1, floats, default(uoffset)) +proc MoreDefaultsStartfloatsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MoreDefaultsAddemptyString*(builder: var Builder, emptyString: uoffset) = + builder.PrependSlot(2, emptyString, default(uoffset)) +proc MoreDefaultsAddsomeString*(builder: var Builder, someString: uoffset) = + builder.PrependSlot(3, someString, default(uoffset)) +proc MoreDefaultsAddabcs*(builder: var Builder, abcs: uoffset) = + builder.PrependSlot(4, abcs, default(uoffset)) +proc MoreDefaultsStartabcsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MoreDefaultsAddbools*(builder: var Builder, bools: uoffset) = + builder.PrependSlot(5, bools, default(uoffset)) +proc MoreDefaultsStartboolsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MoreDefaultsEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Ability.lua b/third_party/flatbuffers/tests/MyGame/Example/Ability.lua index 01c7480f82..223c6f0312 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Ability.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Ability.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Ability.nim b/third_party/flatbuffers/tests/MyGame/Example/Ability.nim new file mode 100644 index 0000000000..987a0bc5af --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Ability.nim @@ -0,0 +1,26 @@ +#[ MyGame.Example.Ability + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type Ability* = object of FlatObj +func id*(self: Ability): uint32 = + return Get[uint32](self.tab, self.tab.Pos + 0) +func `id=`*(self: var Ability, n: uint32): bool = + return self.tab.Mutate(self.tab.Pos + 0, n) +func distance*(self: Ability): uint32 = + return Get[uint32](self.tab, self.tab.Pos + 4) +func `distance=`*(self: var Ability, n: uint32): bool = + return self.tab.Mutate(self.tab.Pos + 4, n) +proc AbilityCreate*(self: var Builder, id: uint32, distance: uint32): uoffset = + self.Prep(4, 8) + self.Prepend(distance) + self.Prepend(id) + return self.Offset() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Ability.py b/third_party/flatbuffers/tests/MyGame/Example/Ability.py index e57dfd74f7..e0344e5fd0 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Ability.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Ability.py @@ -42,6 +42,11 @@ def InitFromBuf(cls, buf, pos): ability.Init(buf, pos) return cls.InitFromObj(ability) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, ability): x = AbilityT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Any.lua b/third_party/flatbuffers/tests/MyGame/Example/Any.lua index b99f4c6af1..8aa73eed89 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Any.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Any.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Any.nim b/third_party/flatbuffers/tests/MyGame/Example/Any.nim new file mode 100644 index 0000000000..977d419967 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Any.nim @@ -0,0 +1,15 @@ +#[ MyGame.Example.Any + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type Any*{.pure.} = enum + None = 0.uint8, + Monster = 1.uint8, + TestSimpleTableWithEnum = 2.uint8, + MyGameExample2Monster = 3.uint8, diff --git a/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.lua b/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.lua index 0d6106c561..226055c553 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.nim b/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.nim new file mode 100644 index 0000000000..e8fd6c99a2 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/AnyAmbiguousAliases.nim @@ -0,0 +1,15 @@ +#[ MyGame.Example.AnyAmbiguousAliases + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type AnyAmbiguousAliases*{.pure.} = enum + None = 0.uint8, + M1 = 1.uint8, + M2 = 2.uint8, + M3 = 3.uint8, diff --git a/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.lua b/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.lua index 7ab4f9cd76..159028b58a 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.nim b/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.nim new file mode 100644 index 0000000000..b31caf12d2 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/AnyUniqueAliases.nim @@ -0,0 +1,15 @@ +#[ MyGame.Example.AnyUniqueAliases + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type AnyUniqueAliases*{.pure.} = enum + None = 0.uint8, + M = 1.uint8, + Ts = 2.uint8, + M2 = 3.uint8, diff --git a/third_party/flatbuffers/tests/MyGame/Example/ArrayStruct.py b/third_party/flatbuffers/tests/MyGame/Example/ArrayStruct.py index c80bf6882e..d80f84253f 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/ArrayStruct.py +++ b/third_party/flatbuffers/tests/MyGame/Example/ArrayStruct.py @@ -20,53 +20,65 @@ def Init(self, buf, pos): # ArrayStruct def A(self): return self._tab.Get(flatbuffers.number_types.Float32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0)) # ArrayStruct - def B(self): return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4 + i * 4)) for i in range(15)] + def B(self, j = None): + if j is None: + return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4 + i * 4)) for i in range(self.BLength())] + elif j >= 0 and j < self.BLength(): + return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4 + j * 4)) + else: + return None + + # ArrayStruct + def BAsNumpy(self): + return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int32Flags, self._tab.Pos + 4, self.BLength()) + # ArrayStruct def BLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 15 # ArrayStruct def BIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - return o == 0 + return False # ArrayStruct def C(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(64)) # ArrayStruct - def D(self, obj, i): + def D(self, i: int): + from MyGame.Example.NestedStruct import NestedStruct + obj = NestedStruct() obj.Init(self._tab.Bytes, self._tab.Pos + 72 + i * 32) return obj # ArrayStruct def DLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(72)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 2 # ArrayStruct def DIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(72)) - return o == 0 + return False # ArrayStruct def E(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(136)) # ArrayStruct - def F(self): return [self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(144 + i * 8)) for i in range(2)] + def F(self, j = None): + if j is None: + return [self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(144 + i * 8)) for i in range(self.FLength())] + elif j >= 0 and j < self.FLength(): + return self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(144 + j * 8)) + else: + return None + + # ArrayStruct + def FAsNumpy(self): + return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int64Flags, self._tab.Pos + 144, self.FLength()) + # ArrayStruct def FLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(144)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 2 # ArrayStruct def FIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(144)) - return o == 0 + return False def CreateArrayStruct(builder, a, b, c, d_a, d_b, d_c, d_d, e, f): @@ -115,6 +127,11 @@ def InitFromBuf(cls, buf, pos): arrayStruct.Init(buf, pos) return cls.InitFromObj(arrayStruct) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, arrayStruct): x = ArrayStructT() @@ -137,7 +154,11 @@ def _UnPack(self, arrayStruct): if not arrayStruct.DIsNone(): self.d = [] for i in range(arrayStruct.DLength()): - self.d.append(arrayStruct.D(i)) + if arrayStruct.D(i) is None: + self.d.append(None) + else: + nestedStruct_ = MyGame.Example.NestedStruct.NestedStructT.InitFromObj(arrayStruct.D(i)) + self.d.append(nestedStruct_) self.e = arrayStruct.E() if not arrayStruct.FIsNone(): if np is None: diff --git a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.cs b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.cs index a5e4e79642..1af6c282d5 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.cs @@ -13,7 +13,7 @@ public struct ArrayTable : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static ArrayTable GetRootAsArrayTable(ByteBuffer _bb) { return GetRootAsArrayTable(_bb, new ArrayTable()); } public static ArrayTable GetRootAsArrayTable(ByteBuffer _bb, ArrayTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public static bool ArrayTableBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "ARRT"); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.java b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.java index c255da3f4a..1291eaf8dc 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.java +++ b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class ArrayTable extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static ArrayTable getRootAsArrayTable(ByteBuffer _bb) { return getRootAsArrayTable(_bb, new ArrayTable()); } public static ArrayTable getRootAsArrayTable(ByteBuffer _bb, ArrayTable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public static boolean ArrayTableBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "ARRT"); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.py b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.py index 62d71afa45..b7a3ac5b67 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.py +++ b/third_party/flatbuffers/tests/MyGame/Example/ArrayTable.py @@ -66,6 +66,11 @@ def InitFromBuf(cls, buf, pos): arrayTable.Init(buf, pos) return cls.InitFromObj(arrayTable) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, arrayTable): x = ArrayTableT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Color.lua b/third_party/flatbuffers/tests/MyGame/Example/Color.lua index c7a0b1edd6..35a58dc249 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Color.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Color.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Color.nim b/third_party/flatbuffers/tests/MyGame/Example/Color.nim new file mode 100644 index 0000000000..3c94beb47e --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Color.nim @@ -0,0 +1,18 @@ +#[ MyGame.Example.Color + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +# Composite components of Monster color. +type Color*{.pure.} = enum + Red = 1.uint8, + # \brief color Green + # Green is bit_flag with value (1u << 1) + Green = 2.uint8, + # \brief color Blue (1u << 3) + Blue = 8.uint8, diff --git a/third_party/flatbuffers/tests/MyGame/Example/LongEnum.java b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.java index 4640f08aa2..ca2f81af50 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/LongEnum.java +++ b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.java @@ -5,8 +5,8 @@ @SuppressWarnings("unused") public final class LongEnum { private LongEnum() { } - public static final long LongOne = 2; - public static final long LongTwo = 4; - public static final long LongBig = 1099511627776; + public static final long LongOne = 2L; + public static final long LongTwo = 4L; + public static final long LongBig = 1099511627776L; } diff --git a/third_party/flatbuffers/tests/MyGame/Example/LongEnum.lua b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.lua index a4e3dc537f..b7d3367caa 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/LongEnum.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/LongEnum.nim b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.nim new file mode 100644 index 0000000000..2ff5b0829e --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/LongEnum.nim @@ -0,0 +1,14 @@ +#[ MyGame.Example.LongEnum + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type LongEnum*{.pure.} = enum + LongOne = 2.uint64, + LongTwo = 4.uint64, + LongBig = 1099511627776.uint64, diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.cs b/third_party/flatbuffers/tests/MyGame/Example/Monster.cs index 87d8ef3b6b..c0f310c0e8 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.cs @@ -14,7 +14,7 @@ public struct Monster : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Monster GetRootAsMonster(ByteBuffer _bb) { return GetRootAsMonster(_bb, new Monster()); } public static Monster GetRootAsMonster(ByteBuffer _bb, Monster obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public static bool MonsterBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "MONS"); } @@ -215,6 +215,22 @@ public struct Monster : IFlatbufferObject public bool MutateLongEnumNonEnumDefault(MyGame.Example.LongEnum long_enum_non_enum_default) { int o = __p.__offset(108); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, (ulong)long_enum_non_enum_default); return true; } else { return false; } } public MyGame.Example.LongEnum LongEnumNormalDefault { get { int o = __p.__offset(110); return o != 0 ? (MyGame.Example.LongEnum)__p.bb.GetUlong(o + __p.bb_pos) : MyGame.Example.LongEnum.LongOne; } } public bool MutateLongEnumNormalDefault(MyGame.Example.LongEnum long_enum_normal_default) { int o = __p.__offset(110); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, (ulong)long_enum_normal_default); return true; } else { return false; } } + public float NanDefault { get { int o = __p.__offset(112); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NaN; } } + public bool MutateNanDefault(float nan_default) { int o = __p.__offset(112); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, nan_default); return true; } else { return false; } } + public float InfDefault { get { int o = __p.__offset(114); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.PositiveInfinity; } } + public bool MutateInfDefault(float inf_default) { int o = __p.__offset(114); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, inf_default); return true; } else { return false; } } + public float PositiveInfDefault { get { int o = __p.__offset(116); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.PositiveInfinity; } } + public bool MutatePositiveInfDefault(float positive_inf_default) { int o = __p.__offset(116); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, positive_inf_default); return true; } else { return false; } } + public float InfinityDefault { get { int o = __p.__offset(118); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.PositiveInfinity; } } + public bool MutateInfinityDefault(float infinity_default) { int o = __p.__offset(118); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, infinity_default); return true; } else { return false; } } + public float PositiveInfinityDefault { get { int o = __p.__offset(120); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.PositiveInfinity; } } + public bool MutatePositiveInfinityDefault(float positive_infinity_default) { int o = __p.__offset(120); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, positive_infinity_default); return true; } else { return false; } } + public float NegativeInfDefault { get { int o = __p.__offset(122); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NegativeInfinity; } } + public bool MutateNegativeInfDefault(float negative_inf_default) { int o = __p.__offset(122); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, negative_inf_default); return true; } else { return false; } } + public float NegativeInfinityDefault { get { int o = __p.__offset(124); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NegativeInfinity; } } + public bool MutateNegativeInfinityDefault(float negative_infinity_default) { int o = __p.__offset(124); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, negative_infinity_default); return true; } else { return false; } } + public double DoubleInfDefault { get { int o = __p.__offset(126); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)Double.PositiveInfinity; } } + public bool MutateDoubleInfDefault(double double_inf_default) { int o = __p.__offset(126); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, double_inf_default); return true; } else { return false; } } public static Offset CreateMonster(FlatBufferBuilder builder, MyGame.Example.Vec3T pos = null, @@ -269,8 +285,17 @@ public struct Monster : IFlatbufferObject VectorOffset scalar_key_sorted_tablesOffset = default(VectorOffset), MyGame.Example.TestT native_inline = null, MyGame.Example.LongEnum long_enum_non_enum_default = 0, - MyGame.Example.LongEnum long_enum_normal_default = MyGame.Example.LongEnum.LongOne) { - builder.StartTable(54); + MyGame.Example.LongEnum long_enum_normal_default = MyGame.Example.LongEnum.LongOne, + float nan_default = Single.NaN, + float inf_default = Single.PositiveInfinity, + float positive_inf_default = Single.PositiveInfinity, + float infinity_default = Single.PositiveInfinity, + float positive_infinity_default = Single.PositiveInfinity, + float negative_inf_default = Single.NegativeInfinity, + float negative_infinity_default = Single.NegativeInfinity, + double double_inf_default = Double.PositiveInfinity) { + builder.StartTable(62); + Monster.AddDoubleInfDefault(builder, double_inf_default); Monster.AddLongEnumNormalDefault(builder, long_enum_normal_default); Monster.AddLongEnumNonEnumDefault(builder, long_enum_non_enum_default); Monster.AddNonOwningReference(builder, non_owning_reference); @@ -280,6 +305,13 @@ public struct Monster : IFlatbufferObject Monster.AddTesthashs64Fnv1a(builder, testhashs64_fnv1a); Monster.AddTesthashu64Fnv1(builder, testhashu64_fnv1); Monster.AddTesthashs64Fnv1(builder, testhashs64_fnv1); + Monster.AddNegativeInfinityDefault(builder, negative_infinity_default); + Monster.AddNegativeInfDefault(builder, negative_inf_default); + Monster.AddPositiveInfinityDefault(builder, positive_infinity_default); + Monster.AddInfinityDefault(builder, infinity_default); + Monster.AddPositiveInfDefault(builder, positive_inf_default); + Monster.AddInfDefault(builder, inf_default); + Monster.AddNanDefault(builder, nan_default); Monster.AddNativeInline(builder, MyGame.Example.Test.Pack(builder, native_inline)); Monster.AddScalarKeySortedTables(builder, scalar_key_sorted_tablesOffset); Monster.AddTestrequirednestedflatbuffer(builder, testrequirednestedflatbufferOffset); @@ -327,7 +359,7 @@ public struct Monster : IFlatbufferObject return Monster.EndMonster(builder); } - public static void StartMonster(FlatBufferBuilder builder) { builder.StartTable(54); } + public static void StartMonster(FlatBufferBuilder builder) { builder.StartTable(62); } public static void AddPos(FlatBufferBuilder builder, Offset posOffset) { builder.AddStruct(0, posOffset.Value, 0); } public static void AddMana(FlatBufferBuilder builder, short mana) { builder.AddShort(1, mana, 150); } public static void AddHp(FlatBufferBuilder builder, short hp) { builder.AddShort(2, hp, 100); } @@ -469,6 +501,14 @@ public struct Monster : IFlatbufferObject public static void AddNativeInline(FlatBufferBuilder builder, Offset nativeInlineOffset) { builder.AddStruct(51, nativeInlineOffset.Value, 0); } public static void AddLongEnumNonEnumDefault(FlatBufferBuilder builder, MyGame.Example.LongEnum longEnumNonEnumDefault) { builder.AddUlong(52, (ulong)longEnumNonEnumDefault, 0); } public static void AddLongEnumNormalDefault(FlatBufferBuilder builder, MyGame.Example.LongEnum longEnumNormalDefault) { builder.AddUlong(53, (ulong)longEnumNormalDefault, 2); } + public static void AddNanDefault(FlatBufferBuilder builder, float nanDefault) { builder.AddFloat(54, nanDefault, Single.NaN); } + public static void AddInfDefault(FlatBufferBuilder builder, float infDefault) { builder.AddFloat(55, infDefault, Single.PositiveInfinity); } + public static void AddPositiveInfDefault(FlatBufferBuilder builder, float positiveInfDefault) { builder.AddFloat(56, positiveInfDefault, Single.PositiveInfinity); } + public static void AddInfinityDefault(FlatBufferBuilder builder, float infinityDefault) { builder.AddFloat(57, infinityDefault, Single.PositiveInfinity); } + public static void AddPositiveInfinityDefault(FlatBufferBuilder builder, float positiveInfinityDefault) { builder.AddFloat(58, positiveInfinityDefault, Single.PositiveInfinity); } + public static void AddNegativeInfDefault(FlatBufferBuilder builder, float negativeInfDefault) { builder.AddFloat(59, negativeInfDefault, Single.NegativeInfinity); } + public static void AddNegativeInfinityDefault(FlatBufferBuilder builder, float negativeInfinityDefault) { builder.AddFloat(60, negativeInfinityDefault, Single.NegativeInfinity); } + public static void AddDoubleInfDefault(FlatBufferBuilder builder, double doubleInfDefault) { builder.AddDouble(61, doubleInfDefault, Double.PositiveInfinity); } public static Offset EndMonster(FlatBufferBuilder builder) { int o = builder.EndTable(); builder.Required(o, 10); // name @@ -620,6 +660,14 @@ public void UnPackTo(MonsterT _o) { _o.NativeInline = this.NativeInline.HasValue ? this.NativeInline.Value.UnPack() : null; _o.LongEnumNonEnumDefault = this.LongEnumNonEnumDefault; _o.LongEnumNormalDefault = this.LongEnumNormalDefault; + _o.NanDefault = this.NanDefault; + _o.InfDefault = this.InfDefault; + _o.PositiveInfDefault = this.PositiveInfDefault; + _o.InfinityDefault = this.InfinityDefault; + _o.PositiveInfinityDefault = this.PositiveInfinityDefault; + _o.NegativeInfDefault = this.NegativeInfDefault; + _o.NegativeInfinityDefault = this.NegativeInfinityDefault; + _o.DoubleInfDefault = this.DoubleInfDefault; } public static Offset Pack(FlatBufferBuilder builder, MonsterT _o) { if (_o == null) return default(Offset); @@ -796,7 +844,15 @@ public void UnPackTo(MonsterT _o) { _scalar_key_sorted_tables, _o.NativeInline, _o.LongEnumNonEnumDefault, - _o.LongEnumNormalDefault); + _o.LongEnumNormalDefault, + _o.NanDefault, + _o.InfDefault, + _o.PositiveInfDefault, + _o.InfinityDefault, + _o.PositiveInfinityDefault, + _o.NegativeInfDefault, + _o.NegativeInfinityDefault, + _o.DoubleInfDefault); } } @@ -949,6 +1005,22 @@ private MyGame.Example.AnyAmbiguousAliases AnyAmbiguousType { public MyGame.Example.LongEnum LongEnumNonEnumDefault { get; set; } [Newtonsoft.Json.JsonProperty("long_enum_normal_default")] public MyGame.Example.LongEnum LongEnumNormalDefault { get; set; } + [Newtonsoft.Json.JsonProperty("nan_default")] + public float NanDefault { get; set; } + [Newtonsoft.Json.JsonProperty("inf_default")] + public float InfDefault { get; set; } + [Newtonsoft.Json.JsonProperty("positive_inf_default")] + public float PositiveInfDefault { get; set; } + [Newtonsoft.Json.JsonProperty("infinity_default")] + public float InfinityDefault { get; set; } + [Newtonsoft.Json.JsonProperty("positive_infinity_default")] + public float PositiveInfinityDefault { get; set; } + [Newtonsoft.Json.JsonProperty("negative_inf_default")] + public float NegativeInfDefault { get; set; } + [Newtonsoft.Json.JsonProperty("negative_infinity_default")] + public float NegativeInfinityDefault { get; set; } + [Newtonsoft.Json.JsonProperty("double_inf_default")] + public double DoubleInfDefault { get; set; } public MonsterT() { this.Pos = new MyGame.Example.Vec3T(); @@ -1001,6 +1073,14 @@ public MonsterT() { this.NativeInline = new MyGame.Example.TestT(); this.LongEnumNonEnumDefault = 0; this.LongEnumNormalDefault = MyGame.Example.LongEnum.LongOne; + this.NanDefault = Single.NaN; + this.InfDefault = Single.PositiveInfinity; + this.PositiveInfDefault = Single.PositiveInfinity; + this.InfinityDefault = Single.PositiveInfinity; + this.PositiveInfinityDefault = Single.PositiveInfinity; + this.NegativeInfDefault = Single.NegativeInfinity; + this.NegativeInfinityDefault = Single.NegativeInfinity; + this.DoubleInfDefault = Double.PositiveInfinity; } public static MonsterT DeserializeFromJson(string jsonText) { diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.go b/third_party/flatbuffers/tests/MyGame/Example/Monster.go index 237896c9b8..b64ced7dab 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.go +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.go @@ -3,6 +3,8 @@ package Example import ( + "math" + flatbuffers "github.com/google/flatbuffers/go" MyGame "MyGame" @@ -60,6 +62,14 @@ type MonsterT struct { NativeInline *TestT `json:"native_inline"` LongEnumNonEnumDefault LongEnum `json:"long_enum_non_enum_default"` LongEnumNormalDefault LongEnum `json:"long_enum_normal_default"` + NanDefault float32 `json:"nan_default"` + InfDefault float32 `json:"inf_default"` + PositiveInfDefault float32 `json:"positive_inf_default"` + InfinityDefault float32 `json:"infinity_default"` + PositiveInfinityDefault float32 `json:"positive_infinity_default"` + NegativeInfDefault float32 `json:"negative_inf_default"` + NegativeInfinityDefault float32 `json:"negative_infinity_default"` + DoubleInfDefault float64 `json:"double_inf_default"` } func (t *MonsterT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { @@ -320,6 +330,14 @@ func (t *MonsterT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { MonsterAddNativeInline(builder, nativeInlineOffset) MonsterAddLongEnumNonEnumDefault(builder, t.LongEnumNonEnumDefault) MonsterAddLongEnumNormalDefault(builder, t.LongEnumNormalDefault) + MonsterAddNanDefault(builder, t.NanDefault) + MonsterAddInfDefault(builder, t.InfDefault) + MonsterAddPositiveInfDefault(builder, t.PositiveInfDefault) + MonsterAddInfinityDefault(builder, t.InfinityDefault) + MonsterAddPositiveInfinityDefault(builder, t.PositiveInfinityDefault) + MonsterAddNegativeInfDefault(builder, t.NegativeInfDefault) + MonsterAddNegativeInfinityDefault(builder, t.NegativeInfinityDefault) + MonsterAddDoubleInfDefault(builder, t.DoubleInfDefault) return MonsterEnd(builder) } @@ -461,6 +479,14 @@ func (rcv *Monster) UnPackTo(t *MonsterT) { t.NativeInline = rcv.NativeInline(nil).UnPack() t.LongEnumNonEnumDefault = rcv.LongEnumNonEnumDefault() t.LongEnumNormalDefault = rcv.LongEnumNormalDefault() + t.NanDefault = rcv.NanDefault() + t.InfDefault = rcv.InfDefault() + t.PositiveInfDefault = rcv.PositiveInfDefault() + t.InfinityDefault = rcv.InfinityDefault() + t.PositiveInfinityDefault = rcv.PositiveInfinityDefault() + t.NegativeInfDefault = rcv.NegativeInfDefault() + t.NegativeInfinityDefault = rcv.NegativeInfinityDefault() + t.DoubleInfDefault = rcv.DoubleInfDefault() } func (rcv *Monster) UnPack() *MonsterT { @@ -1386,8 +1412,104 @@ func (rcv *Monster) MutateLongEnumNormalDefault(n LongEnum) bool { return rcv._tab.MutateUint64Slot(110, uint64(n)) } +func (rcv *Monster) NanDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(112)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.NaN()) +} + +func (rcv *Monster) MutateNanDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(112, n) +} + +func (rcv *Monster) InfDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(114)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(1)) +} + +func (rcv *Monster) MutateInfDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(114, n) +} + +func (rcv *Monster) PositiveInfDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(116)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(1)) +} + +func (rcv *Monster) MutatePositiveInfDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(116, n) +} + +func (rcv *Monster) InfinityDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(118)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(1)) +} + +func (rcv *Monster) MutateInfinityDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(118, n) +} + +func (rcv *Monster) PositiveInfinityDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(120)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(1)) +} + +func (rcv *Monster) MutatePositiveInfinityDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(120, n) +} + +func (rcv *Monster) NegativeInfDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(122)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(-1)) +} + +func (rcv *Monster) MutateNegativeInfDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(122, n) +} + +func (rcv *Monster) NegativeInfinityDefault() float32 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(124)) + if o != 0 { + return rcv._tab.GetFloat32(o + rcv._tab.Pos) + } + return float32(math.Inf(-1)) +} + +func (rcv *Monster) MutateNegativeInfinityDefault(n float32) bool { + return rcv._tab.MutateFloat32Slot(124, n) +} + +func (rcv *Monster) DoubleInfDefault() float64 { + o := flatbuffers.UOffsetT(rcv._tab.Offset(126)) + if o != 0 { + return rcv._tab.GetFloat64(o + rcv._tab.Pos) + } + return float64(math.Inf(1)) +} + +func (rcv *Monster) MutateDoubleInfDefault(n float64) bool { + return rcv._tab.MutateFloat64Slot(126, n) +} + func MonsterStart(builder *flatbuffers.Builder) { - builder.StartObject(54) + builder.StartObject(62) } func MonsterAddPos(builder *flatbuffers.Builder, pos flatbuffers.UOffsetT) { builder.PrependStructSlot(0, flatbuffers.UOffsetT(pos), 0) @@ -1608,6 +1730,30 @@ func MonsterAddLongEnumNonEnumDefault(builder *flatbuffers.Builder, longEnumNonE func MonsterAddLongEnumNormalDefault(builder *flatbuffers.Builder, longEnumNormalDefault LongEnum) { builder.PrependUint64Slot(53, uint64(longEnumNormalDefault), 2) } +func MonsterAddNanDefault(builder *flatbuffers.Builder, nanDefault float32) { + builder.PrependFloat32Slot(54, nanDefault, float32(math.NaN())) +} +func MonsterAddInfDefault(builder *flatbuffers.Builder, infDefault float32) { + builder.PrependFloat32Slot(55, infDefault, float32(math.Inf(1))) +} +func MonsterAddPositiveInfDefault(builder *flatbuffers.Builder, positiveInfDefault float32) { + builder.PrependFloat32Slot(56, positiveInfDefault, float32(math.Inf(1))) +} +func MonsterAddInfinityDefault(builder *flatbuffers.Builder, infinityDefault float32) { + builder.PrependFloat32Slot(57, infinityDefault, float32(math.Inf(1))) +} +func MonsterAddPositiveInfinityDefault(builder *flatbuffers.Builder, positiveInfinityDefault float32) { + builder.PrependFloat32Slot(58, positiveInfinityDefault, float32(math.Inf(1))) +} +func MonsterAddNegativeInfDefault(builder *flatbuffers.Builder, negativeInfDefault float32) { + builder.PrependFloat32Slot(59, negativeInfDefault, float32(math.Inf(-1))) +} +func MonsterAddNegativeInfinityDefault(builder *flatbuffers.Builder, negativeInfinityDefault float32) { + builder.PrependFloat32Slot(60, negativeInfinityDefault, float32(math.Inf(-1))) +} +func MonsterAddDoubleInfDefault(builder *flatbuffers.Builder, doubleInfDefault float64) { + builder.PrependFloat64Slot(61, doubleInfDefault, float64(math.Inf(1))) +} func MonsterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.java b/third_party/flatbuffers/tests/MyGame/Example/Monster.java index 5339054395..ad958aae31 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.java +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.java @@ -12,7 +12,7 @@ */ @SuppressWarnings("unused") public final class Monster extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Monster getRootAsMonster(ByteBuffer _bb) { return getRootAsMonster(_bb, new Monster()); } public static Monster getRootAsMonster(ByteBuffer _bb, Monster obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public static boolean MonsterBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MONS"); } @@ -216,8 +216,24 @@ public final class Monster extends Table { public boolean mutateLongEnumNonEnumDefault(long long_enum_non_enum_default) { int o = __offset(108); if (o != 0) { bb.putLong(o + bb_pos, long_enum_non_enum_default); return true; } else { return false; } } public long longEnumNormalDefault() { int o = __offset(110); return o != 0 ? bb.getLong(o + bb_pos) : 2L; } public boolean mutateLongEnumNormalDefault(long long_enum_normal_default) { int o = __offset(110); if (o != 0) { bb.putLong(o + bb_pos, long_enum_normal_default); return true; } else { return false; } } + public float nanDefault() { int o = __offset(112); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NaN; } + public boolean mutateNanDefault(float nan_default) { int o = __offset(112); if (o != 0) { bb.putFloat(o + bb_pos, nan_default); return true; } else { return false; } } + public float infDefault() { int o = __offset(114); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } + public boolean mutateInfDefault(float inf_default) { int o = __offset(114); if (o != 0) { bb.putFloat(o + bb_pos, inf_default); return true; } else { return false; } } + public float positiveInfDefault() { int o = __offset(116); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } + public boolean mutatePositiveInfDefault(float positive_inf_default) { int o = __offset(116); if (o != 0) { bb.putFloat(o + bb_pos, positive_inf_default); return true; } else { return false; } } + public float infinityDefault() { int o = __offset(118); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } + public boolean mutateInfinityDefault(float infinity_default) { int o = __offset(118); if (o != 0) { bb.putFloat(o + bb_pos, infinity_default); return true; } else { return false; } } + public float positiveInfinityDefault() { int o = __offset(120); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } + public boolean mutatePositiveInfinityDefault(float positive_infinity_default) { int o = __offset(120); if (o != 0) { bb.putFloat(o + bb_pos, positive_infinity_default); return true; } else { return false; } } + public float negativeInfDefault() { int o = __offset(122); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NEGATIVE_INFINITY; } + public boolean mutateNegativeInfDefault(float negative_inf_default) { int o = __offset(122); if (o != 0) { bb.putFloat(o + bb_pos, negative_inf_default); return true; } else { return false; } } + public float negativeInfinityDefault() { int o = __offset(124); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NEGATIVE_INFINITY; } + public boolean mutateNegativeInfinityDefault(float negative_infinity_default) { int o = __offset(124); if (o != 0) { bb.putFloat(o + bb_pos, negative_infinity_default); return true; } else { return false; } } + public double doubleInfDefault() { int o = __offset(126); return o != 0 ? bb.getDouble(o + bb_pos) : Double.POSITIVE_INFINITY; } + public boolean mutateDoubleInfDefault(double double_inf_default) { int o = __offset(126); if (o != 0) { bb.putDouble(o + bb_pos, double_inf_default); return true; } else { return false; } } - public static void startMonster(FlatBufferBuilder builder) { builder.startTable(54); } + public static void startMonster(FlatBufferBuilder builder) { builder.startTable(62); } public static void addPos(FlatBufferBuilder builder, int posOffset) { builder.addStruct(0, posOffset, 0); } public static void addMana(FlatBufferBuilder builder, short mana) { builder.addShort(1, mana, 150); } public static void addHp(FlatBufferBuilder builder, short hp) { builder.addShort(2, hp, 100); } @@ -313,6 +329,14 @@ public final class Monster extends Table { public static void addNativeInline(FlatBufferBuilder builder, int nativeInlineOffset) { builder.addStruct(51, nativeInlineOffset, 0); } public static void addLongEnumNonEnumDefault(FlatBufferBuilder builder, long longEnumNonEnumDefault) { builder.addLong(52, longEnumNonEnumDefault, 0L); } public static void addLongEnumNormalDefault(FlatBufferBuilder builder, long longEnumNormalDefault) { builder.addLong(53, longEnumNormalDefault, 2L); } + public static void addNanDefault(FlatBufferBuilder builder, float nanDefault) { builder.addFloat(54, nanDefault, Float.NaN); } + public static void addInfDefault(FlatBufferBuilder builder, float infDefault) { builder.addFloat(55, infDefault, Float.POSITIVE_INFINITY); } + public static void addPositiveInfDefault(FlatBufferBuilder builder, float positiveInfDefault) { builder.addFloat(56, positiveInfDefault, Float.POSITIVE_INFINITY); } + public static void addInfinityDefault(FlatBufferBuilder builder, float infinityDefault) { builder.addFloat(57, infinityDefault, Float.POSITIVE_INFINITY); } + public static void addPositiveInfinityDefault(FlatBufferBuilder builder, float positiveInfinityDefault) { builder.addFloat(58, positiveInfinityDefault, Float.POSITIVE_INFINITY); } + public static void addNegativeInfDefault(FlatBufferBuilder builder, float negativeInfDefault) { builder.addFloat(59, negativeInfDefault, Float.NEGATIVE_INFINITY); } + public static void addNegativeInfinityDefault(FlatBufferBuilder builder, float negativeInfinityDefault) { builder.addFloat(60, negativeInfinityDefault, Float.NEGATIVE_INFINITY); } + public static void addDoubleInfDefault(FlatBufferBuilder builder, double doubleInfDefault) { builder.addDouble(61, doubleInfDefault, Double.POSITIVE_INFINITY); } public static int endMonster(FlatBufferBuilder builder) { int o = builder.endTable(); builder.required(o, 10); // name @@ -533,6 +557,22 @@ public void unpackTo(MonsterT _o) { _o.setLongEnumNonEnumDefault(_oLongEnumNonEnumDefault); long _oLongEnumNormalDefault = longEnumNormalDefault(); _o.setLongEnumNormalDefault(_oLongEnumNormalDefault); + float _oNanDefault = nanDefault(); + _o.setNanDefault(_oNanDefault); + float _oInfDefault = infDefault(); + _o.setInfDefault(_oInfDefault); + float _oPositiveInfDefault = positiveInfDefault(); + _o.setPositiveInfDefault(_oPositiveInfDefault); + float _oInfinityDefault = infinityDefault(); + _o.setInfinityDefault(_oInfinityDefault); + float _oPositiveInfinityDefault = positiveInfinityDefault(); + _o.setPositiveInfinityDefault(_oPositiveInfinityDefault); + float _oNegativeInfDefault = negativeInfDefault(); + _o.setNegativeInfDefault(_oNegativeInfDefault); + float _oNegativeInfinityDefault = negativeInfinityDefault(); + _o.setNegativeInfinityDefault(_oNegativeInfinityDefault); + double _oDoubleInfDefault = doubleInfDefault(); + _o.setDoubleInfDefault(_oDoubleInfDefault); } public static int pack(FlatBufferBuilder builder, MonsterT _o) { if (_o == null) return 0; @@ -725,6 +765,14 @@ public static int pack(FlatBufferBuilder builder, MonsterT _o) { addNativeInline(builder, MyGame.Example.Test.pack(builder, _o.getNativeInline())); addLongEnumNonEnumDefault(builder, _o.getLongEnumNonEnumDefault()); addLongEnumNormalDefault(builder, _o.getLongEnumNormalDefault()); + addNanDefault(builder, _o.getNanDefault()); + addInfDefault(builder, _o.getInfDefault()); + addPositiveInfDefault(builder, _o.getPositiveInfDefault()); + addInfinityDefault(builder, _o.getInfinityDefault()); + addPositiveInfinityDefault(builder, _o.getPositiveInfinityDefault()); + addNegativeInfDefault(builder, _o.getNegativeInfDefault()); + addNegativeInfinityDefault(builder, _o.getNegativeInfinityDefault()); + addDoubleInfDefault(builder, _o.getDoubleInfDefault()); return endMonster(builder); } } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.kt b/third_party/flatbuffers/tests/MyGame/Example/Monster.kt index fecf6657fe..12ee70ac4a 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.kt +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.kt @@ -870,18 +870,130 @@ class Monster : Table() { false } } + val nanDefault : Float + get() { + val o = __offset(112) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.NaN + } + fun mutateNanDefault(nanDefault: Float) : Boolean { + val o = __offset(112) + return if (o != 0) { + bb.putFloat(o + bb_pos, nanDefault) + true + } else { + false + } + } + val infDefault : Float + get() { + val o = __offset(114) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.POSITIVE_INFINITY + } + fun mutateInfDefault(infDefault: Float) : Boolean { + val o = __offset(114) + return if (o != 0) { + bb.putFloat(o + bb_pos, infDefault) + true + } else { + false + } + } + val positiveInfDefault : Float + get() { + val o = __offset(116) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.POSITIVE_INFINITY + } + fun mutatePositiveInfDefault(positiveInfDefault: Float) : Boolean { + val o = __offset(116) + return if (o != 0) { + bb.putFloat(o + bb_pos, positiveInfDefault) + true + } else { + false + } + } + val infinityDefault : Float + get() { + val o = __offset(118) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.POSITIVE_INFINITY + } + fun mutateInfinityDefault(infinityDefault: Float) : Boolean { + val o = __offset(118) + return if (o != 0) { + bb.putFloat(o + bb_pos, infinityDefault) + true + } else { + false + } + } + val positiveInfinityDefault : Float + get() { + val o = __offset(120) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.POSITIVE_INFINITY + } + fun mutatePositiveInfinityDefault(positiveInfinityDefault: Float) : Boolean { + val o = __offset(120) + return if (o != 0) { + bb.putFloat(o + bb_pos, positiveInfinityDefault) + true + } else { + false + } + } + val negativeInfDefault : Float + get() { + val o = __offset(122) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.NEGATIVE_INFINITY + } + fun mutateNegativeInfDefault(negativeInfDefault: Float) : Boolean { + val o = __offset(122) + return if (o != 0) { + bb.putFloat(o + bb_pos, negativeInfDefault) + true + } else { + false + } + } + val negativeInfinityDefault : Float + get() { + val o = __offset(124) + return if(o != 0) bb.getFloat(o + bb_pos) else Float.NEGATIVE_INFINITY + } + fun mutateNegativeInfinityDefault(negativeInfinityDefault: Float) : Boolean { + val o = __offset(124) + return if (o != 0) { + bb.putFloat(o + bb_pos, negativeInfinityDefault) + true + } else { + false + } + } + val doubleInfDefault : Double + get() { + val o = __offset(126) + return if(o != 0) bb.getDouble(o + bb_pos) else Double.POSITIVE_INFINITY + } + fun mutateDoubleInfDefault(doubleInfDefault: Double) : Boolean { + val o = __offset(126) + return if (o != 0) { + bb.putDouble(o + bb_pos, doubleInfDefault) + true + } else { + false + } + } override fun keysCompare(o1: Int, o2: Int, _bb: ByteBuffer) : Int { return compareStrings(__offset(10, o1, _bb), __offset(10, o2, _bb), _bb) } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsMonster(_bb: ByteBuffer): Monster = getRootAsMonster(_bb, Monster()) fun getRootAsMonster(_bb: ByteBuffer, obj: Monster): Monster { _bb.order(ByteOrder.LITTLE_ENDIAN) return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } fun MonsterBufferHasIdentifier(_bb: ByteBuffer) : Boolean = __has_identifier(_bb, "MONS") - fun startMonster(builder: FlatBufferBuilder) = builder.startTable(54) + fun startMonster(builder: FlatBufferBuilder) = builder.startTable(62) fun addPos(builder: FlatBufferBuilder, pos: Int) = builder.addStruct(0, pos, 0) fun addMana(builder: FlatBufferBuilder, mana: Short) = builder.addShort(1, mana, 150) fun addHp(builder: FlatBufferBuilder, hp: Short) = builder.addShort(2, hp, 100) @@ -1077,6 +1189,14 @@ class Monster : Table() { fun addNativeInline(builder: FlatBufferBuilder, nativeInline: Int) = builder.addStruct(51, nativeInline, 0) fun addLongEnumNonEnumDefault(builder: FlatBufferBuilder, longEnumNonEnumDefault: ULong) = builder.addLong(52, longEnumNonEnumDefault.toLong(), 0) fun addLongEnumNormalDefault(builder: FlatBufferBuilder, longEnumNormalDefault: ULong) = builder.addLong(53, longEnumNormalDefault.toLong(), 2) + fun addNanDefault(builder: FlatBufferBuilder, nanDefault: Float) = builder.addFloat(54, nanDefault, Double.NaN) + fun addInfDefault(builder: FlatBufferBuilder, infDefault: Float) = builder.addFloat(55, infDefault, Double.POSITIVE_INFINITY) + fun addPositiveInfDefault(builder: FlatBufferBuilder, positiveInfDefault: Float) = builder.addFloat(56, positiveInfDefault, Double.POSITIVE_INFINITY) + fun addInfinityDefault(builder: FlatBufferBuilder, infinityDefault: Float) = builder.addFloat(57, infinityDefault, Double.POSITIVE_INFINITY) + fun addPositiveInfinityDefault(builder: FlatBufferBuilder, positiveInfinityDefault: Float) = builder.addFloat(58, positiveInfinityDefault, Double.POSITIVE_INFINITY) + fun addNegativeInfDefault(builder: FlatBufferBuilder, negativeInfDefault: Float) = builder.addFloat(59, negativeInfDefault, Double.NEGATIVE_INFINITY) + fun addNegativeInfinityDefault(builder: FlatBufferBuilder, negativeInfinityDefault: Float) = builder.addFloat(60, negativeInfinityDefault, Double.NEGATIVE_INFINITY) + fun addDoubleInfDefault(builder: FlatBufferBuilder, doubleInfDefault: Double) = builder.addDouble(61, doubleInfDefault, Double.POSITIVE_INFINITY) fun endMonster(builder: FlatBufferBuilder) : Int { val o = builder.endTable() builder.required(o, 10) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.lua b/third_party/flatbuffers/tests/MyGame/Example/Monster.lua index 6697c9b2ce..34073627c0 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) @@ -359,7 +359,7 @@ function mt:Testarrayofsortedstruct(j) local o = self.view:Offset(62) if o ~= 0 then local x = self.view:Vector(o) - x = x + ((j-1) * 4) + x = x + ((j-1) * 8) local obj = __MyGame_Example_Ability.New() obj:Init(self.view.bytes, x) return obj @@ -703,8 +703,72 @@ function mt:LongEnumNormalDefault() return 2 end +function mt:NanDefault() + local o = self.view:Offset(112) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return nan +end + +function mt:InfDefault() + local o = self.view:Offset(114) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return inf +end + +function mt:PositiveInfDefault() + local o = self.view:Offset(116) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return inf +end + +function mt:InfinityDefault() + local o = self.view:Offset(118) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return inf +end + +function mt:PositiveInfinityDefault() + local o = self.view:Offset(120) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return inf +end + +function mt:NegativeInfDefault() + local o = self.view:Offset(122) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return -inf +end + +function mt:NegativeInfinityDefault() + local o = self.view:Offset(124) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float32, self.view.pos + o) + end + return -inf +end + +function mt:DoubleInfDefault() + local o = self.view:Offset(126) + if o ~= 0 then + return self.view:Get(flatbuffers.N.Float64, self.view.pos + o) + end + return inf +end + function Monster.Start(builder) - builder:StartObject(54) + builder:StartObject(62) end function Monster.AddPos(builder, pos) @@ -852,7 +916,7 @@ function Monster.AddTestarrayofsortedstruct(builder, testarrayofsortedstruct) end function Monster.StartTestarrayofsortedstructVector(builder, numElems) - return builder:StartVector(4, numElems, 4) + return builder:StartVector(8, numElems, 4) end function Monster.AddFlex(builder, flex) @@ -999,6 +1063,38 @@ function Monster.AddLongEnumNormalDefault(builder, longEnumNormalDefault) builder:PrependUint64Slot(53, longEnumNormalDefault, 2) end +function Monster.AddNanDefault(builder, nanDefault) + builder:PrependFloat32Slot(54, nanDefault, nan) +end + +function Monster.AddInfDefault(builder, infDefault) + builder:PrependFloat32Slot(55, infDefault, inf) +end + +function Monster.AddPositiveInfDefault(builder, positiveInfDefault) + builder:PrependFloat32Slot(56, positiveInfDefault, inf) +end + +function Monster.AddInfinityDefault(builder, infinityDefault) + builder:PrependFloat32Slot(57, infinityDefault, inf) +end + +function Monster.AddPositiveInfinityDefault(builder, positiveInfinityDefault) + builder:PrependFloat32Slot(58, positiveInfinityDefault, inf) +end + +function Monster.AddNegativeInfDefault(builder, negativeInfDefault) + builder:PrependFloat32Slot(59, negativeInfDefault, -inf) +end + +function Monster.AddNegativeInfinityDefault(builder, negativeInfinityDefault) + builder:PrependFloat32Slot(60, negativeInfinityDefault, -inf) +end + +function Monster.AddDoubleInfDefault(builder, doubleInfDefault) + builder:PrependFloat64Slot(61, doubleInfDefault, inf) +end + function Monster.End(builder) return builder:EndObject() end diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.nim b/third_party/flatbuffers/tests/MyGame/Example/Monster.nim new file mode 100644 index 0000000000..283e01a656 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.nim @@ -0,0 +1,734 @@ +#[ MyGame.Example.Monster + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import ../InParentNamespace as MyGame_InParentNamespace +import Ability as MyGame_Example_Ability +import Any as MyGame_Example_Any +import AnyAmbiguousAliases as MyGame_Example_AnyAmbiguousAliases +import AnyUniqueAliases as MyGame_Example_AnyUniqueAliases +import Color as MyGame_Example_Color +import LongEnum as MyGame_Example_LongEnum +import Race as MyGame_Example_Race +import Referrable as MyGame_Example_Referrable +import Stat as MyGame_Example_Stat +import Test as MyGame_Example_Test +import Vec3 as MyGame_Example_Vec3 +import flatbuffers +import std/options + +# an example documentation comment: "monster object" +type Monster* = object of FlatObj +func pos*(self: Monster): Option[MyGame_Example_Vec3.Vec3] = + let o = self.tab.Offset(4) + if o != 0: + return some(MyGame_Example_Vec3.Vec3(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +func mana*(self: Monster): int16 = + let o = self.tab.Offset(6) + if o != 0: + return Get[int16](self.tab, self.tab.Pos + o) + return 150 +func `mana=`*(self: var Monster, n: int16): bool = + return self.tab.MutateSlot(6, n) +func hp*(self: Monster): int16 = + let o = self.tab.Offset(8) + if o != 0: + return Get[int16](self.tab, self.tab.Pos + o) + return 100 +func `hp=`*(self: var Monster, n: int16): bool = + return self.tab.MutateSlot(8, n) +func name*(self: Monster): string = + let o = self.tab.Offset(10) + if o != 0: + return self.tab.String(self.tab.Pos + o) + return "" +func inventoryLength*(self: Monster): int = + let o = self.tab.Offset(14) + if o != 0: + return self.tab.VectorLen(o) +func inventory*(self: Monster, j: int): uint8 = + let o = self.tab.Offset(14) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[uint8](self.tab, x) +func inventory*(self: Monster): seq[uint8] = + let len = self.inventoryLength + for i in countup(0, len - 1): + result.add(self.inventory(i)) +func color*(self: Monster): MyGame_Example_Color.Color = + let o = self.tab.Offset(16) + if o != 0: + return MyGame_Example_Color.Color(Get[uint8](self.tab, self.tab.Pos + o)) + return type(result)(8) +func `color=`*(self: var Monster, n: MyGame_Example_Color.Color): bool = + return self.tab.MutateSlot(16, n) +func testType*(self: Monster): MyGame_Example_Any.Any = + let o = self.tab.Offset(18) + if o != 0: + return MyGame_Example_Any.Any(Get[uint8](self.tab, self.tab.Pos + o)) + return type(result)(0) +func `testType=`*(self: var Monster, n: MyGame_Example_Any.Any): bool = + return self.tab.MutateSlot(18, n) +func test*(self: Monster): Option[Vtable] = + let o = self.tab.Offset(20) + if o != 0: + return some(self.tab.Union(o)) +func test4Length*(self: Monster): int = + let o = self.tab.Offset(22) + if o != 0: + return self.tab.VectorLen(o) +func test4*(self: Monster, j: int): MyGame_Example_Test.Test = + let o = self.tab.Offset(22) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func test4*(self: Monster): seq[MyGame_Example_Test.Test] = + let len = self.test4Length + for i in countup(0, len - 1): + result.add(self.test4(i)) +func testarrayofstringLength*(self: Monster): int = + let o = self.tab.Offset(24) + if o != 0: + return self.tab.VectorLen(o) +func testarrayofstring*(self: Monster, j: int): string = + let o = self.tab.Offset(24) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return self.tab.String(x) +func testarrayofstring*(self: Monster): seq[string] = + let len = self.testarrayofstringLength + for i in countup(0, len - 1): + result.add(self.testarrayofstring(i)) +func testarrayoftablesLength*(self: Monster): int = + let o = self.tab.Offset(26) + if o != 0: + return self.tab.VectorLen(o) +func testarrayoftables*(self: Monster, j: int): Monster = + let o = self.tab.Offset(26) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return Monster(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func testarrayoftables*(self: Monster): seq[Monster] = + let len = self.testarrayoftablesLength + for i in countup(0, len - 1): + result.add(self.testarrayoftables(i)) +func enemy*(self: Monster): Option[Monster] = + let o = self.tab.Offset(28) + if o != 0: + return some(Monster(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +func testnestedflatbufferLength*(self: Monster): int = + let o = self.tab.Offset(30) + if o != 0: + return self.tab.VectorLen(o) +func testnestedflatbuffer*(self: Monster, j: int): uint8 = + let o = self.tab.Offset(30) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[uint8](self.tab, x) +func testnestedflatbuffer*(self: Monster): seq[uint8] = + let len = self.testnestedflatbufferLength + for i in countup(0, len - 1): + result.add(self.testnestedflatbuffer(i)) +func testempty*(self: Monster): Option[MyGame_Example_Stat.Stat] = + let o = self.tab.Offset(32) + if o != 0: + return some(MyGame_Example_Stat.Stat(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +func testbool*(self: Monster): bool = + let o = self.tab.Offset(34) + if o != 0: + return Get[bool](self.tab, self.tab.Pos + o) + return false +func `testbool=`*(self: var Monster, n: bool): bool = + return self.tab.MutateSlot(34, n) +func testhashs32Fnv1*(self: Monster): int32 = + let o = self.tab.Offset(36) + if o != 0: + return Get[int32](self.tab, self.tab.Pos + o) + return 0 +func `testhashs32Fnv1=`*(self: var Monster, n: int32): bool = + return self.tab.MutateSlot(36, n) +func testhashu32Fnv1*(self: Monster): uint32 = + let o = self.tab.Offset(38) + if o != 0: + return Get[uint32](self.tab, self.tab.Pos + o) + return 0 +func `testhashu32Fnv1=`*(self: var Monster, n: uint32): bool = + return self.tab.MutateSlot(38, n) +func testhashs64Fnv1*(self: Monster): int64 = + let o = self.tab.Offset(40) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 0 +func `testhashs64Fnv1=`*(self: var Monster, n: int64): bool = + return self.tab.MutateSlot(40, n) +func testhashu64Fnv1*(self: Monster): uint64 = + let o = self.tab.Offset(42) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `testhashu64Fnv1=`*(self: var Monster, n: uint64): bool = + return self.tab.MutateSlot(42, n) +func testhashs32Fnv1a*(self: Monster): int32 = + let o = self.tab.Offset(44) + if o != 0: + return Get[int32](self.tab, self.tab.Pos + o) + return 0 +func `testhashs32Fnv1a=`*(self: var Monster, n: int32): bool = + return self.tab.MutateSlot(44, n) +func testhashu32Fnv1a*(self: Monster): uint32 = + let o = self.tab.Offset(46) + if o != 0: + return Get[uint32](self.tab, self.tab.Pos + o) + return 0 +func `testhashu32Fnv1a=`*(self: var Monster, n: uint32): bool = + return self.tab.MutateSlot(46, n) +func testhashs64Fnv1a*(self: Monster): int64 = + let o = self.tab.Offset(48) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 0 +func `testhashs64Fnv1a=`*(self: var Monster, n: int64): bool = + return self.tab.MutateSlot(48, n) +func testhashu64Fnv1a*(self: Monster): uint64 = + let o = self.tab.Offset(50) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `testhashu64Fnv1a=`*(self: var Monster, n: uint64): bool = + return self.tab.MutateSlot(50, n) +func testarrayofboolsLength*(self: Monster): int = + let o = self.tab.Offset(52) + if o != 0: + return self.tab.VectorLen(o) +func testarrayofbools*(self: Monster, j: int): bool = + let o = self.tab.Offset(52) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[bool](self.tab, x) +func testarrayofbools*(self: Monster): seq[bool] = + let len = self.testarrayofboolsLength + for i in countup(0, len - 1): + result.add(self.testarrayofbools(i)) +func testf*(self: Monster): float32 = + let o = self.tab.Offset(54) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 3.14159 +func `testf=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(54, n) +func testf2*(self: Monster): float32 = + let o = self.tab.Offset(56) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 3.0 +func `testf2=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(56, n) +func testf3*(self: Monster): float32 = + let o = self.tab.Offset(58) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 0.0 +func `testf3=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(58, n) +func testarrayofstring2Length*(self: Monster): int = + let o = self.tab.Offset(60) + if o != 0: + return self.tab.VectorLen(o) +func testarrayofstring2*(self: Monster, j: int): string = + let o = self.tab.Offset(60) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return self.tab.String(x) +func testarrayofstring2*(self: Monster): seq[string] = + let len = self.testarrayofstring2Length + for i in countup(0, len - 1): + result.add(self.testarrayofstring2(i)) +func testarrayofsortedstructLength*(self: Monster): int = + let o = self.tab.Offset(62) + if o != 0: + return self.tab.VectorLen(o) +func testarrayofsortedstruct*(self: Monster, j: int): MyGame_Example_Ability.Ability = + let o = self.tab.Offset(62) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return MyGame_Example_Ability.Ability(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func testarrayofsortedstruct*(self: Monster): seq[MyGame_Example_Ability.Ability] = + let len = self.testarrayofsortedstructLength + for i in countup(0, len - 1): + result.add(self.testarrayofsortedstruct(i)) +func flexLength*(self: Monster): int = + let o = self.tab.Offset(64) + if o != 0: + return self.tab.VectorLen(o) +func flex*(self: Monster, j: int): uint8 = + let o = self.tab.Offset(64) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[uint8](self.tab, x) +func flex*(self: Monster): seq[uint8] = + let len = self.flexLength + for i in countup(0, len - 1): + result.add(self.flex(i)) +func test5Length*(self: Monster): int = + let o = self.tab.Offset(66) + if o != 0: + return self.tab.VectorLen(o) +func test5*(self: Monster, j: int): MyGame_Example_Test.Test = + let o = self.tab.Offset(66) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func test5*(self: Monster): seq[MyGame_Example_Test.Test] = + let len = self.test5Length + for i in countup(0, len - 1): + result.add(self.test5(i)) +func vectorOfLongsLength*(self: Monster): int = + let o = self.tab.Offset(68) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfLongs*(self: Monster, j: int): int64 = + let o = self.tab.Offset(68) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[int64](self.tab, x) +func vectorOfLongs*(self: Monster): seq[int64] = + let len = self.vectorOfLongsLength + for i in countup(0, len - 1): + result.add(self.vectorOfLongs(i)) +func vectorOfDoublesLength*(self: Monster): int = + let o = self.tab.Offset(70) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfDoubles*(self: Monster, j: int): float64 = + let o = self.tab.Offset(70) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[float64](self.tab, x) +func vectorOfDoubles*(self: Monster): seq[float64] = + let len = self.vectorOfDoublesLength + for i in countup(0, len - 1): + result.add(self.vectorOfDoubles(i)) +func parentNamespaceTest*(self: Monster): Option[MyGame_InParentNamespace.InParentNamespace] = + let o = self.tab.Offset(72) + if o != 0: + return some(MyGame_InParentNamespace.InParentNamespace(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +func vectorOfReferrablesLength*(self: Monster): int = + let o = self.tab.Offset(74) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfReferrables*(self: Monster, j: int): MyGame_Example_Referrable.Referrable = + let o = self.tab.Offset(74) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return MyGame_Example_Referrable.Referrable(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func vectorOfReferrables*(self: Monster): seq[MyGame_Example_Referrable.Referrable] = + let len = self.vectorOfReferrablesLength + for i in countup(0, len - 1): + result.add(self.vectorOfReferrables(i)) +func singleWeakReference*(self: Monster): uint64 = + let o = self.tab.Offset(76) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `singleWeakReference=`*(self: var Monster, n: uint64): bool = + return self.tab.MutateSlot(76, n) +func vectorOfWeakReferencesLength*(self: Monster): int = + let o = self.tab.Offset(78) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfWeakReferences*(self: Monster, j: int): uint64 = + let o = self.tab.Offset(78) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[uint64](self.tab, x) +func vectorOfWeakReferences*(self: Monster): seq[uint64] = + let len = self.vectorOfWeakReferencesLength + for i in countup(0, len - 1): + result.add(self.vectorOfWeakReferences(i)) +func vectorOfStrongReferrablesLength*(self: Monster): int = + let o = self.tab.Offset(80) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfStrongReferrables*(self: Monster, j: int): MyGame_Example_Referrable.Referrable = + let o = self.tab.Offset(80) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return MyGame_Example_Referrable.Referrable(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func vectorOfStrongReferrables*(self: Monster): seq[MyGame_Example_Referrable.Referrable] = + let len = self.vectorOfStrongReferrablesLength + for i in countup(0, len - 1): + result.add(self.vectorOfStrongReferrables(i)) +func coOwningReference*(self: Monster): uint64 = + let o = self.tab.Offset(82) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `coOwningReference=`*(self: var Monster, n: uint64): bool = + return self.tab.MutateSlot(82, n) +func vectorOfCoOwningReferencesLength*(self: Monster): int = + let o = self.tab.Offset(84) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfCoOwningReferences*(self: Monster, j: int): uint64 = + let o = self.tab.Offset(84) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[uint64](self.tab, x) +func vectorOfCoOwningReferences*(self: Monster): seq[uint64] = + let len = self.vectorOfCoOwningReferencesLength + for i in countup(0, len - 1): + result.add(self.vectorOfCoOwningReferences(i)) +func nonOwningReference*(self: Monster): uint64 = + let o = self.tab.Offset(86) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `nonOwningReference=`*(self: var Monster, n: uint64): bool = + return self.tab.MutateSlot(86, n) +func vectorOfNonOwningReferencesLength*(self: Monster): int = + let o = self.tab.Offset(88) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfNonOwningReferences*(self: Monster, j: int): uint64 = + let o = self.tab.Offset(88) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[uint64](self.tab, x) +func vectorOfNonOwningReferences*(self: Monster): seq[uint64] = + let len = self.vectorOfNonOwningReferencesLength + for i in countup(0, len - 1): + result.add(self.vectorOfNonOwningReferences(i)) +func anyUniqueType*(self: Monster): MyGame_Example_AnyUniqueAliases.AnyUniqueAliases = + let o = self.tab.Offset(90) + if o != 0: + return MyGame_Example_AnyUniqueAliases.AnyUniqueAliases(Get[uint8](self.tab, self.tab.Pos + o)) + return type(result)(0) +func `anyUniqueType=`*(self: var Monster, n: MyGame_Example_AnyUniqueAliases.AnyUniqueAliases): bool = + return self.tab.MutateSlot(90, n) +func anyUnique*(self: Monster): Option[Vtable] = + let o = self.tab.Offset(92) + if o != 0: + return some(self.tab.Union(o)) +func anyAmbiguousType*(self: Monster): MyGame_Example_AnyAmbiguousAliases.AnyAmbiguousAliases = + let o = self.tab.Offset(94) + if o != 0: + return MyGame_Example_AnyAmbiguousAliases.AnyAmbiguousAliases(Get[uint8](self.tab, self.tab.Pos + o)) + return type(result)(0) +func `anyAmbiguousType=`*(self: var Monster, n: MyGame_Example_AnyAmbiguousAliases.AnyAmbiguousAliases): bool = + return self.tab.MutateSlot(94, n) +func anyAmbiguous*(self: Monster): Option[Vtable] = + let o = self.tab.Offset(96) + if o != 0: + return some(self.tab.Union(o)) +func vectorOfEnumsLength*(self: Monster): int = + let o = self.tab.Offset(98) + if o != 0: + return self.tab.VectorLen(o) +func vectorOfEnums*(self: Monster, j: int): MyGame_Example_Color.Color = + let o = self.tab.Offset(98) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return MyGame_Example_Color.Color(Get[uint8](self.tab, x)) +func vectorOfEnums*(self: Monster): seq[MyGame_Example_Color.Color] = + let len = self.vectorOfEnumsLength + for i in countup(0, len - 1): + result.add(self.vectorOfEnums(i)) +func signedEnum*(self: Monster): MyGame_Example_Race.Race = + let o = self.tab.Offset(100) + if o != 0: + return MyGame_Example_Race.Race(Get[int8](self.tab, self.tab.Pos + o)) + return type(result)(-1) +func `signedEnum=`*(self: var Monster, n: MyGame_Example_Race.Race): bool = + return self.tab.MutateSlot(100, n) +func testrequirednestedflatbufferLength*(self: Monster): int = + let o = self.tab.Offset(102) + if o != 0: + return self.tab.VectorLen(o) +func testrequirednestedflatbuffer*(self: Monster, j: int): uint8 = + let o = self.tab.Offset(102) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[uint8](self.tab, x) +func testrequirednestedflatbuffer*(self: Monster): seq[uint8] = + let len = self.testrequirednestedflatbufferLength + for i in countup(0, len - 1): + result.add(self.testrequirednestedflatbuffer(i)) +func scalarKeySortedTablesLength*(self: Monster): int = + let o = self.tab.Offset(104) + if o != 0: + return self.tab.VectorLen(o) +func scalarKeySortedTables*(self: Monster, j: int): MyGame_Example_Stat.Stat = + let o = self.tab.Offset(104) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 4.uoffset + return MyGame_Example_Stat.Stat(tab: Vtable(Bytes: self.tab.Bytes, Pos: x)) +func scalarKeySortedTables*(self: Monster): seq[MyGame_Example_Stat.Stat] = + let len = self.scalarKeySortedTablesLength + for i in countup(0, len - 1): + result.add(self.scalarKeySortedTables(i)) +func nativeInline*(self: Monster): Option[MyGame_Example_Test.Test] = + let o = self.tab.Offset(106) + if o != 0: + return some(MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +func longEnumNonEnumDefault*(self: Monster): MyGame_Example_LongEnum.LongEnum = + let o = self.tab.Offset(108) + if o != 0: + return MyGame_Example_LongEnum.LongEnum(Get[uint64](self.tab, self.tab.Pos + o)) + return type(result)(0) +func `longEnumNonEnumDefault=`*(self: var Monster, n: MyGame_Example_LongEnum.LongEnum): bool = + return self.tab.MutateSlot(108, n) +func longEnumNormalDefault*(self: Monster): MyGame_Example_LongEnum.LongEnum = + let o = self.tab.Offset(110) + if o != 0: + return MyGame_Example_LongEnum.LongEnum(Get[uint64](self.tab, self.tab.Pos + o)) + return type(result)(2) +func `longEnumNormalDefault=`*(self: var Monster, n: MyGame_Example_LongEnum.LongEnum): bool = + return self.tab.MutateSlot(110, n) +func nanDefault*(self: Monster): float32 = + let o = self.tab.Offset(112) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return NaN +func `nanDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(112, n) +func infDefault*(self: Monster): float32 = + let o = self.tab.Offset(114) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return Inf +func `infDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(114, n) +func positiveInfDefault*(self: Monster): float32 = + let o = self.tab.Offset(116) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return Inf +func `positiveInfDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(116, n) +func infinityDefault*(self: Monster): float32 = + let o = self.tab.Offset(118) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return Inf +func `infinityDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(118, n) +func positiveInfinityDefault*(self: Monster): float32 = + let o = self.tab.Offset(120) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return Inf +func `positiveInfinityDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(120, n) +func negativeInfDefault*(self: Monster): float32 = + let o = self.tab.Offset(122) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return -Inf +func `negativeInfDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(122, n) +func negativeInfinityDefault*(self: Monster): float32 = + let o = self.tab.Offset(124) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return -Inf +func `negativeInfinityDefault=`*(self: var Monster, n: float32): bool = + return self.tab.MutateSlot(124, n) +func doubleInfDefault*(self: Monster): float64 = + let o = self.tab.Offset(126) + if o != 0: + return Get[float64](self.tab, self.tab.Pos + o) + return Inf +func `doubleInfDefault=`*(self: var Monster, n: float64): bool = + return self.tab.MutateSlot(126, n) +proc MonsterStart*(builder: var Builder) = + builder.StartObject(62) +proc MonsterAddpos*(builder: var Builder, pos: uoffset) = + builder.PrependStructSlot(0, pos, default(uoffset)) +proc MonsterAddmana*(builder: var Builder, mana: int16) = + builder.PrependSlot(1, mana, default(int16)) +proc MonsterAddhp*(builder: var Builder, hp: int16) = + builder.PrependSlot(2, hp, default(int16)) +proc MonsterAddname*(builder: var Builder, name: uoffset) = + builder.PrependSlot(3, name, default(uoffset)) +proc MonsterAddinventory*(builder: var Builder, inventory: uoffset) = + builder.PrependSlot(5, inventory, default(uoffset)) +proc MonsterStartinventoryVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddcolor*(builder: var Builder, color: uint8) = + builder.PrependSlot(6, color, default(uint8)) +proc MonsterAddtestType*(builder: var Builder, testType: uint8) = + builder.PrependSlot(7, testType, default(uint8)) +proc MonsterAddtest*(builder: var Builder, test: uoffset) = + builder.PrependSlot(8, test, default(uoffset)) +proc MonsterAddtest4*(builder: var Builder, test4: uoffset) = + builder.PrependSlot(9, test4, default(uoffset)) +proc MonsterStarttest4Vector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 2) +proc MonsterAddtestarrayofstring*(builder: var Builder, testarrayofstring: uoffset) = + builder.PrependSlot(10, testarrayofstring, default(uoffset)) +proc MonsterStarttestarrayofstringVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddtestarrayoftables*(builder: var Builder, testarrayoftables: uoffset) = + builder.PrependSlot(11, testarrayoftables, default(uoffset)) +proc MonsterStarttestarrayoftablesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddenemy*(builder: var Builder, enemy: uoffset) = + builder.PrependStructSlot(12, enemy, default(uoffset)) +proc MonsterAddtestnestedflatbuffer*(builder: var Builder, testnestedflatbuffer: uoffset) = + builder.PrependSlot(13, testnestedflatbuffer, default(uoffset)) +proc MonsterStarttestnestedflatbufferVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddtestempty*(builder: var Builder, testempty: uoffset) = + builder.PrependStructSlot(14, testempty, default(uoffset)) +proc MonsterAddtestbool*(builder: var Builder, testbool: bool) = + builder.PrependSlot(15, testbool, default(bool)) +proc MonsterAddtesthashs32Fnv1*(builder: var Builder, testhashs32Fnv1: int32) = + builder.PrependSlot(16, testhashs32Fnv1, default(int32)) +proc MonsterAddtesthashu32Fnv1*(builder: var Builder, testhashu32Fnv1: uint32) = + builder.PrependSlot(17, testhashu32Fnv1, default(uint32)) +proc MonsterAddtesthashs64Fnv1*(builder: var Builder, testhashs64Fnv1: int64) = + builder.PrependSlot(18, testhashs64Fnv1, default(int64)) +proc MonsterAddtesthashu64Fnv1*(builder: var Builder, testhashu64Fnv1: uint64) = + builder.PrependSlot(19, testhashu64Fnv1, default(uint64)) +proc MonsterAddtesthashs32Fnv1a*(builder: var Builder, testhashs32Fnv1a: int32) = + builder.PrependSlot(20, testhashs32Fnv1a, default(int32)) +proc MonsterAddtesthashu32Fnv1a*(builder: var Builder, testhashu32Fnv1a: uint32) = + builder.PrependSlot(21, testhashu32Fnv1a, default(uint32)) +proc MonsterAddtesthashs64Fnv1a*(builder: var Builder, testhashs64Fnv1a: int64) = + builder.PrependSlot(22, testhashs64Fnv1a, default(int64)) +proc MonsterAddtesthashu64Fnv1a*(builder: var Builder, testhashu64Fnv1a: uint64) = + builder.PrependSlot(23, testhashu64Fnv1a, default(uint64)) +proc MonsterAddtestarrayofbools*(builder: var Builder, testarrayofbools: uoffset) = + builder.PrependSlot(24, testarrayofbools, default(uoffset)) +proc MonsterStarttestarrayofboolsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddtestf*(builder: var Builder, testf: float32) = + builder.PrependSlot(25, testf, default(float32)) +proc MonsterAddtestf2*(builder: var Builder, testf2: float32) = + builder.PrependSlot(26, testf2, default(float32)) +proc MonsterAddtestf3*(builder: var Builder, testf3: float32) = + builder.PrependSlot(27, testf3, default(float32)) +proc MonsterAddtestarrayofstring2*(builder: var Builder, testarrayofstring2: uoffset) = + builder.PrependSlot(28, testarrayofstring2, default(uoffset)) +proc MonsterStarttestarrayofstring2Vector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddtestarrayofsortedstruct*(builder: var Builder, testarrayofsortedstruct: uoffset) = + builder.PrependSlot(29, testarrayofsortedstruct, default(uoffset)) +proc MonsterStarttestarrayofsortedstructVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 4) +proc MonsterAddflex*(builder: var Builder, flex: uoffset) = + builder.PrependSlot(30, flex, default(uoffset)) +proc MonsterStartflexVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddtest5*(builder: var Builder, test5: uoffset) = + builder.PrependSlot(31, test5, default(uoffset)) +proc MonsterStarttest5Vector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 2) +proc MonsterAddvectorOfLongs*(builder: var Builder, vectorOfLongs: uoffset) = + builder.PrependSlot(32, vectorOfLongs, default(uoffset)) +proc MonsterStartvectorOfLongsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc MonsterAddvectorOfDoubles*(builder: var Builder, vectorOfDoubles: uoffset) = + builder.PrependSlot(33, vectorOfDoubles, default(uoffset)) +proc MonsterStartvectorOfDoublesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc MonsterAddparentNamespaceTest*(builder: var Builder, parentNamespaceTest: uoffset) = + builder.PrependStructSlot(34, parentNamespaceTest, default(uoffset)) +proc MonsterAddvectorOfReferrables*(builder: var Builder, vectorOfReferrables: uoffset) = + builder.PrependSlot(35, vectorOfReferrables, default(uoffset)) +proc MonsterStartvectorOfReferrablesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddsingleWeakReference*(builder: var Builder, singleWeakReference: uint64) = + builder.PrependSlot(36, singleWeakReference, default(uint64)) +proc MonsterAddvectorOfWeakReferences*(builder: var Builder, vectorOfWeakReferences: uoffset) = + builder.PrependSlot(37, vectorOfWeakReferences, default(uoffset)) +proc MonsterStartvectorOfWeakReferencesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc MonsterAddvectorOfStrongReferrables*(builder: var Builder, vectorOfStrongReferrables: uoffset) = + builder.PrependSlot(38, vectorOfStrongReferrables, default(uoffset)) +proc MonsterStartvectorOfStrongReferrablesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddcoOwningReference*(builder: var Builder, coOwningReference: uint64) = + builder.PrependSlot(39, coOwningReference, default(uint64)) +proc MonsterAddvectorOfCoOwningReferences*(builder: var Builder, vectorOfCoOwningReferences: uoffset) = + builder.PrependSlot(40, vectorOfCoOwningReferences, default(uoffset)) +proc MonsterStartvectorOfCoOwningReferencesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc MonsterAddnonOwningReference*(builder: var Builder, nonOwningReference: uint64) = + builder.PrependSlot(41, nonOwningReference, default(uint64)) +proc MonsterAddvectorOfNonOwningReferences*(builder: var Builder, vectorOfNonOwningReferences: uoffset) = + builder.PrependSlot(42, vectorOfNonOwningReferences, default(uoffset)) +proc MonsterStartvectorOfNonOwningReferencesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc MonsterAddanyUniqueType*(builder: var Builder, anyUniqueType: uint8) = + builder.PrependSlot(43, anyUniqueType, default(uint8)) +proc MonsterAddanyUnique*(builder: var Builder, anyUnique: uoffset) = + builder.PrependSlot(44, anyUnique, default(uoffset)) +proc MonsterAddanyAmbiguousType*(builder: var Builder, anyAmbiguousType: uint8) = + builder.PrependSlot(45, anyAmbiguousType, default(uint8)) +proc MonsterAddanyAmbiguous*(builder: var Builder, anyAmbiguous: uoffset) = + builder.PrependSlot(46, anyAmbiguous, default(uoffset)) +proc MonsterAddvectorOfEnums*(builder: var Builder, vectorOfEnums: uoffset) = + builder.PrependSlot(47, vectorOfEnums, default(uoffset)) +proc MonsterStartvectorOfEnumsVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddsignedEnum*(builder: var Builder, signedEnum: int8) = + builder.PrependSlot(48, signedEnum, default(int8)) +proc MonsterAddtestrequirednestedflatbuffer*(builder: var Builder, testrequirednestedflatbuffer: uoffset) = + builder.PrependSlot(49, testrequirednestedflatbuffer, default(uoffset)) +proc MonsterStarttestrequirednestedflatbufferVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc MonsterAddscalarKeySortedTables*(builder: var Builder, scalarKeySortedTables: uoffset) = + builder.PrependSlot(50, scalarKeySortedTables, default(uoffset)) +proc MonsterStartscalarKeySortedTablesVector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(4, numElems, 4) +proc MonsterAddnativeInline*(builder: var Builder, nativeInline: uoffset) = + builder.PrependStructSlot(51, nativeInline, default(uoffset)) +proc MonsterAddlongEnumNonEnumDefault*(builder: var Builder, longEnumNonEnumDefault: uint64) = + builder.PrependSlot(52, longEnumNonEnumDefault, default(uint64)) +proc MonsterAddlongEnumNormalDefault*(builder: var Builder, longEnumNormalDefault: uint64) = + builder.PrependSlot(53, longEnumNormalDefault, default(uint64)) +proc MonsterAddnanDefault*(builder: var Builder, nanDefault: float32) = + builder.PrependSlot(54, nanDefault, default(float32)) +proc MonsterAddinfDefault*(builder: var Builder, infDefault: float32) = + builder.PrependSlot(55, infDefault, default(float32)) +proc MonsterAddpositiveInfDefault*(builder: var Builder, positiveInfDefault: float32) = + builder.PrependSlot(56, positiveInfDefault, default(float32)) +proc MonsterAddinfinityDefault*(builder: var Builder, infinityDefault: float32) = + builder.PrependSlot(57, infinityDefault, default(float32)) +proc MonsterAddpositiveInfinityDefault*(builder: var Builder, positiveInfinityDefault: float32) = + builder.PrependSlot(58, positiveInfinityDefault, default(float32)) +proc MonsterAddnegativeInfDefault*(builder: var Builder, negativeInfDefault: float32) = + builder.PrependSlot(59, negativeInfDefault, default(float32)) +proc MonsterAddnegativeInfinityDefault*(builder: var Builder, negativeInfinityDefault: float32) = + builder.PrependSlot(60, negativeInfinityDefault, default(float32)) +proc MonsterAdddoubleInfDefault*(builder: var Builder, doubleInfDefault: float64) = + builder.PrependSlot(61, doubleInfDefault, default(float64)) +proc MonsterEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.php b/third_party/flatbuffers/tests/MyGame/Example/Monster.php index 5f8ad5af55..29976e4aa1 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.php +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.php @@ -754,22 +754,94 @@ public function getLongEnumNormalDefault() return $o != 0 ? $this->bb->getUlong($o + $this->bb_pos) : \MyGame\Example\LongEnum::LongOne; } + /** + * @return float + */ + public function getNanDefault() + { + $o = $this->__offset(112); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : nan; + } + + /** + * @return float + */ + public function getInfDefault() + { + $o = $this->__offset(114); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : inf; + } + + /** + * @return float + */ + public function getPositiveInfDefault() + { + $o = $this->__offset(116); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : +inf; + } + + /** + * @return float + */ + public function getInfinityDefault() + { + $o = $this->__offset(118); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : infinity; + } + + /** + * @return float + */ + public function getPositiveInfinityDefault() + { + $o = $this->__offset(120); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : +infinity; + } + + /** + * @return float + */ + public function getNegativeInfDefault() + { + $o = $this->__offset(122); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : -inf; + } + + /** + * @return float + */ + public function getNegativeInfinityDefault() + { + $o = $this->__offset(124); + return $o != 0 ? $this->bb->getFloat($o + $this->bb_pos) : -infinity; + } + + /** + * @return double + */ + public function getDoubleInfDefault() + { + $o = $this->__offset(126); + return $o != 0 ? $this->bb->getDouble($o + $this->bb_pos) : inf; + } + /** * @param FlatBufferBuilder $builder * @return void */ public static function startMonster(FlatBufferBuilder $builder) { - $builder->StartObject(54); + $builder->StartObject(62); } /** * @param FlatBufferBuilder $builder * @return Monster */ - public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3, $testarrayofstring2, $testarrayofsortedstruct, $flex, $test5, $vector_of_longs, $vector_of_doubles, $parent_namespace_test, $vector_of_referrables, $single_weak_reference, $vector_of_weak_references, $vector_of_strong_referrables, $co_owning_reference, $vector_of_co_owning_references, $non_owning_reference, $vector_of_non_owning_references, $any_unique_type, $any_unique, $any_ambiguous_type, $any_ambiguous, $vector_of_enums, $signed_enum, $testrequirednestedflatbuffer, $scalar_key_sorted_tables, $native_inline, $long_enum_non_enum_default, $long_enum_normal_default) + public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3, $testarrayofstring2, $testarrayofsortedstruct, $flex, $test5, $vector_of_longs, $vector_of_doubles, $parent_namespace_test, $vector_of_referrables, $single_weak_reference, $vector_of_weak_references, $vector_of_strong_referrables, $co_owning_reference, $vector_of_co_owning_references, $non_owning_reference, $vector_of_non_owning_references, $any_unique_type, $any_unique, $any_ambiguous_type, $any_ambiguous, $vector_of_enums, $signed_enum, $testrequirednestedflatbuffer, $scalar_key_sorted_tables, $native_inline, $long_enum_non_enum_default, $long_enum_normal_default, $nan_default, $inf_default, $positive_inf_default, $infinity_default, $positive_infinity_default, $negative_inf_default, $negative_infinity_default, $double_inf_default) { - $builder->startObject(54); + $builder->startObject(62); self::addPos($builder, $pos); self::addMana($builder, $mana); self::addHp($builder, $hp); @@ -823,6 +895,14 @@ public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $h self::addNativeInline($builder, $native_inline); self::addLongEnumNonEnumDefault($builder, $long_enum_non_enum_default); self::addLongEnumNormalDefault($builder, $long_enum_normal_default); + self::addNanDefault($builder, $nan_default); + self::addInfDefault($builder, $inf_default); + self::addPositiveInfDefault($builder, $positive_inf_default); + self::addInfinityDefault($builder, $infinity_default); + self::addPositiveInfinityDefault($builder, $positive_infinity_default); + self::addNegativeInfDefault($builder, $negative_inf_default); + self::addNegativeInfinityDefault($builder, $negative_infinity_default); + self::addDoubleInfDefault($builder, $double_inf_default); $o = $builder->endObject(); $builder->required($o, 10); // name return $o; @@ -1823,6 +1903,86 @@ public static function addLongEnumNormalDefault(FlatBufferBuilder $builder, $lon $builder->addUlongX(53, $longEnumNormalDefault, 2); } + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addNanDefault(FlatBufferBuilder $builder, $nanDefault) + { + $builder->addFloatX(54, $nanDefault, nan); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addInfDefault(FlatBufferBuilder $builder, $infDefault) + { + $builder->addFloatX(55, $infDefault, inf); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addPositiveInfDefault(FlatBufferBuilder $builder, $positiveInfDefault) + { + $builder->addFloatX(56, $positiveInfDefault, +inf); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addInfinityDefault(FlatBufferBuilder $builder, $infinityDefault) + { + $builder->addFloatX(57, $infinityDefault, infinity); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addPositiveInfinityDefault(FlatBufferBuilder $builder, $positiveInfinityDefault) + { + $builder->addFloatX(58, $positiveInfinityDefault, +infinity); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addNegativeInfDefault(FlatBufferBuilder $builder, $negativeInfDefault) + { + $builder->addFloatX(59, $negativeInfDefault, -inf); + } + + /** + * @param FlatBufferBuilder $builder + * @param float + * @return void + */ + public static function addNegativeInfinityDefault(FlatBufferBuilder $builder, $negativeInfinityDefault) + { + $builder->addFloatX(60, $negativeInfinityDefault, -infinity); + } + + /** + * @param FlatBufferBuilder $builder + * @param double + * @return void + */ + public static function addDoubleInfDefault(FlatBufferBuilder $builder, $doubleInfDefault) + { + $builder->addDoubleX(61, $doubleInfDefault, inf); + } + /** * @param FlatBufferBuilder $builder * @return int table offset diff --git a/third_party/flatbuffers/tests/MyGame/Example/Monster.py b/third_party/flatbuffers/tests/MyGame/Example/Monster.py index 0044f8d18c..03dda3b66d 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Monster.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Monster.py @@ -816,7 +816,63 @@ def LongEnumNormalDefault(self): return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) return 2 -def MonsterStart(builder): builder.StartObject(54) + # Monster + def NanDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(112)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('nan') + + # Monster + def InfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(114)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def PositiveInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(116)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def InfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(118)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def PositiveInfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(120)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def NegativeInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(122)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('-inf') + + # Monster + def NegativeInfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(124)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('-inf') + + # Monster + def DoubleInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(126)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return float('inf') + +def MonsterStart(builder): builder.StartObject(62) def Start(builder): return MonsterStart(builder) def MonsterAddPos(builder, pos): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0) @@ -1052,6 +1108,30 @@ def AddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault): def MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault): builder.PrependUint64Slot(53, longEnumNormalDefault, 2) def AddLongEnumNormalDefault(builder, longEnumNormalDefault): return MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault) +def MonsterAddNanDefault(builder, nanDefault): builder.PrependFloat32Slot(54, nanDefault, float('nan')) +def AddNanDefault(builder, nanDefault): + return MonsterAddNanDefault(builder, nanDefault) +def MonsterAddInfDefault(builder, infDefault): builder.PrependFloat32Slot(55, infDefault, float('inf')) +def AddInfDefault(builder, infDefault): + return MonsterAddInfDefault(builder, infDefault) +def MonsterAddPositiveInfDefault(builder, positiveInfDefault): builder.PrependFloat32Slot(56, positiveInfDefault, float('inf')) +def AddPositiveInfDefault(builder, positiveInfDefault): + return MonsterAddPositiveInfDefault(builder, positiveInfDefault) +def MonsterAddInfinityDefault(builder, infinityDefault): builder.PrependFloat32Slot(57, infinityDefault, float('inf')) +def AddInfinityDefault(builder, infinityDefault): + return MonsterAddInfinityDefault(builder, infinityDefault) +def MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault): builder.PrependFloat32Slot(58, positiveInfinityDefault, float('inf')) +def AddPositiveInfinityDefault(builder, positiveInfinityDefault): + return MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault) +def MonsterAddNegativeInfDefault(builder, negativeInfDefault): builder.PrependFloat32Slot(59, negativeInfDefault, float('-inf')) +def AddNegativeInfDefault(builder, negativeInfDefault): + return MonsterAddNegativeInfDefault(builder, negativeInfDefault) +def MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault): builder.PrependFloat32Slot(60, negativeInfinityDefault, float('-inf')) +def AddNegativeInfinityDefault(builder, negativeInfinityDefault): + return MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault) +def MonsterAddDoubleInfDefault(builder, doubleInfDefault): builder.PrependFloat64Slot(61, doubleInfDefault, float('inf')) +def AddDoubleInfDefault(builder, doubleInfDefault): + return MonsterAddDoubleInfDefault(builder, doubleInfDefault) def MonsterEnd(builder): return builder.EndObject() def End(builder): return MonsterEnd(builder) @@ -1128,6 +1208,14 @@ def __init__(self): self.nativeInline = None # type: Optional[MyGame.Example.Test.TestT] self.longEnumNonEnumDefault = 0 # type: int self.longEnumNormalDefault = 2 # type: int + self.nanDefault = float('nan') # type: float + self.infDefault = float('inf') # type: float + self.positiveInfDefault = float('inf') # type: float + self.infinityDefault = float('inf') # type: float + self.positiveInfinityDefault = float('inf') # type: float + self.negativeInfDefault = float('-inf') # type: float + self.negativeInfinityDefault = float('-inf') # type: float + self.doubleInfDefault = float('inf') # type: float @classmethod def InitFromBuf(cls, buf, pos): @@ -1135,6 +1223,11 @@ def InitFromBuf(cls, buf, pos): monster.Init(buf, pos) return cls.InitFromObj(monster) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, monster): x = MonsterT() @@ -1324,6 +1417,14 @@ def _UnPack(self, monster): self.nativeInline = MyGame.Example.Test.TestT.InitFromObj(monster.NativeInline()) self.longEnumNonEnumDefault = monster.LongEnumNonEnumDefault() self.longEnumNormalDefault = monster.LongEnumNormalDefault() + self.nanDefault = monster.NanDefault() + self.infDefault = monster.InfDefault() + self.positiveInfDefault = monster.PositiveInfDefault() + self.infinityDefault = monster.InfinityDefault() + self.positiveInfinityDefault = monster.PositiveInfinityDefault() + self.negativeInfDefault = monster.NegativeInfDefault() + self.negativeInfinityDefault = monster.NegativeInfinityDefault() + self.doubleInfDefault = monster.DoubleInfDefault() # MonsterT def Pack(self, builder): @@ -1577,5 +1678,13 @@ def Pack(self, builder): MonsterAddNativeInline(builder, nativeInline) MonsterAddLongEnumNonEnumDefault(builder, self.longEnumNonEnumDefault) MonsterAddLongEnumNormalDefault(builder, self.longEnumNormalDefault) + MonsterAddNanDefault(builder, self.nanDefault) + MonsterAddInfDefault(builder, self.infDefault) + MonsterAddPositiveInfDefault(builder, self.positiveInfDefault) + MonsterAddInfinityDefault(builder, self.infinityDefault) + MonsterAddPositiveInfinityDefault(builder, self.positiveInfinityDefault) + MonsterAddNegativeInfDefault(builder, self.negativeInfDefault) + MonsterAddNegativeInfinityDefault(builder, self.negativeInfinityDefault) + MonsterAddDoubleInfDefault(builder, self.doubleInfDefault) monster = MonsterEnd(builder) return monster diff --git a/third_party/flatbuffers/tests/MyGame/Example/MonsterT.java b/third_party/flatbuffers/tests/MyGame/Example/MonsterT.java index 06804c78a3..d4a65259a5 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/MonsterT.java +++ b/third_party/flatbuffers/tests/MyGame/Example/MonsterT.java @@ -58,6 +58,14 @@ public class MonsterT { private MyGame.Example.TestT nativeInline; private long longEnumNonEnumDefault; private long longEnumNormalDefault; + private float nanDefault; + private float infDefault; + private float positiveInfDefault; + private float infinityDefault; + private float positiveInfinityDefault; + private float negativeInfDefault; + private float negativeInfinityDefault; + private double doubleInfDefault; public MyGame.Example.Vec3T getPos() { return pos; } @@ -259,6 +267,38 @@ public class MonsterT { public void setLongEnumNormalDefault(long longEnumNormalDefault) { this.longEnumNormalDefault = longEnumNormalDefault; } + public float getNanDefault() { return nanDefault; } + + public void setNanDefault(float nanDefault) { this.nanDefault = nanDefault; } + + public float getInfDefault() { return infDefault; } + + public void setInfDefault(float infDefault) { this.infDefault = infDefault; } + + public float getPositiveInfDefault() { return positiveInfDefault; } + + public void setPositiveInfDefault(float positiveInfDefault) { this.positiveInfDefault = positiveInfDefault; } + + public float getInfinityDefault() { return infinityDefault; } + + public void setInfinityDefault(float infinityDefault) { this.infinityDefault = infinityDefault; } + + public float getPositiveInfinityDefault() { return positiveInfinityDefault; } + + public void setPositiveInfinityDefault(float positiveInfinityDefault) { this.positiveInfinityDefault = positiveInfinityDefault; } + + public float getNegativeInfDefault() { return negativeInfDefault; } + + public void setNegativeInfDefault(float negativeInfDefault) { this.negativeInfDefault = negativeInfDefault; } + + public float getNegativeInfinityDefault() { return negativeInfinityDefault; } + + public void setNegativeInfinityDefault(float negativeInfinityDefault) { this.negativeInfinityDefault = negativeInfinityDefault; } + + public double getDoubleInfDefault() { return doubleInfDefault; } + + public void setDoubleInfDefault(double doubleInfDefault) { this.doubleInfDefault = doubleInfDefault; } + public MonsterT() { this.pos = new MyGame.Example.Vec3T(); @@ -311,6 +351,14 @@ public MonsterT() { this.nativeInline = new MyGame.Example.TestT(); this.longEnumNonEnumDefault = 0L; this.longEnumNormalDefault = 2L; + this.nanDefault = Float.NaN; + this.infDefault = Float.POSITIVE_INFINITY; + this.positiveInfDefault = Float.POSITIVE_INFINITY; + this.infinityDefault = Float.POSITIVE_INFINITY; + this.positiveInfinityDefault = Float.POSITIVE_INFINITY; + this.negativeInfDefault = Float.NEGATIVE_INFINITY; + this.negativeInfinityDefault = Float.NEGATIVE_INFINITY; + this.doubleInfDefault = Double.POSITIVE_INFINITY; } public static MonsterT deserializeFromBinary(byte[] fbBuffer) { return Monster.getRootAsMonster(ByteBuffer.wrap(fbBuffer)).unpack(); diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedStruct.py b/third_party/flatbuffers/tests/MyGame/Example/NestedStruct.py index a9db014f9a..7f8d18ef19 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/NestedStruct.py +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedStruct.py @@ -18,48 +18,69 @@ def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # NestedStruct - def A(self): return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(2)] + def A(self, j = None): + if j is None: + return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(self.ALength())] + elif j >= 0 and j < self.ALength(): + return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + j * 4)) + else: + return None + + # NestedStruct + def AAsNumpy(self): + return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int32Flags, self._tab.Pos + 0, self.ALength()) + # NestedStruct def ALength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(0)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 2 # NestedStruct def AIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(0)) - return o == 0 + return False # NestedStruct def B(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8)) # NestedStruct - def C(self): return [self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + i * 1)) for i in range(2)] + def C(self, j = None): + if j is None: + return [self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + i * 1)) for i in range(self.CLength())] + elif j >= 0 and j < self.CLength(): + return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + j * 1)) + else: + return None + + # NestedStruct + def CAsNumpy(self): + return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int8Flags, self._tab.Pos + 9, self.CLength()) + # NestedStruct def CLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(9)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 2 # NestedStruct def CIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(9)) - return o == 0 + return False # NestedStruct - def D(self): return [self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(16 + i * 8)) for i in range(2)] + def D(self, j = None): + if j is None: + return [self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(16 + i * 8)) for i in range(self.DLength())] + elif j >= 0 and j < self.DLength(): + return self._tab.Get(flatbuffers.number_types.Int64Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(16 + j * 8)) + else: + return None + + # NestedStruct + def DAsNumpy(self): + return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int64Flags, self._tab.Pos + 16, self.DLength()) + # NestedStruct def DLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - if o != 0: - return self._tab.VectorLen(o) - return 0 + return 2 # NestedStruct def DIsNone(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - return o == 0 + return False def CreateNestedStruct(builder, a, b, c, d): @@ -94,6 +115,11 @@ def InitFromBuf(cls, buf, pos): nestedStruct.Init(buf, pos) return cls.InitFromObj(nestedStruct) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, nestedStruct): x = NestedStructT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Any.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Any.py new file mode 100644 index 0000000000..e0b8594241 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Any.py @@ -0,0 +1,20 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +class Any(object): + NONE = 0 + Vec3 = 1 + TestSimpleTableWithEnum = 2 + +def AnyCreator(unionType, table): + from flatbuffers.table import Table + if not isinstance(table, Table): + return None + if unionType == Any().Vec3: + import MyGame.Example.NestedUnion.Vec3 + return MyGame.Example.NestedUnion.Vec3.Vec3T.InitFromBuf(table.Bytes, table.Pos) + if unionType == Any().TestSimpleTableWithEnum: + import MyGame.Example.NestedUnion.TestSimpleTableWithEnum + return MyGame.Example.NestedUnion.TestSimpleTableWithEnum.TestSimpleTableWithEnumT.InitFromBuf(table.Bytes, table.Pos) + return None diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Color.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Color.py new file mode 100644 index 0000000000..6ba9ca1c63 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Color.py @@ -0,0 +1,12 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +# Composite components of Monster color. +class Color(object): + Red = 1 + # \brief color Green + # Green is bit_flag with value (1u << 1) + Green = 2 + # \brief color Blue (1u << 3) + Blue = 8 diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/NestedUnionTest.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/NestedUnionTest.py new file mode 100644 index 0000000000..9a3cbee225 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/NestedUnionTest.py @@ -0,0 +1,133 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +import flatbuffers +from flatbuffers.compat import import_numpy +np = import_numpy() + +class NestedUnionTest(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAs(cls, buf, offset=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = NestedUnionTest() + x.Init(buf, n + offset) + return x + + @classmethod + def GetRootAsNestedUnionTest(cls, buf, offset=0): + """This method is deprecated. Please switch to GetRootAs.""" + return cls.GetRootAs(buf, offset) + # NestedUnionTest + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # NestedUnionTest + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # NestedUnionTest + def DataType(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) + return 0 + + # NestedUnionTest + def Data(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + from flatbuffers.table import Table + obj = Table(bytearray(), 0) + self._tab.Union(obj, o) + return obj + return None + + # NestedUnionTest + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int16Flags, o + self._tab.Pos) + return 0 + +def NestedUnionTestStart(builder): builder.StartObject(4) +def Start(builder): + return NestedUnionTestStart(builder) +def NestedUnionTestAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def AddName(builder, name): + return NestedUnionTestAddName(builder, name) +def NestedUnionTestAddDataType(builder, dataType): builder.PrependUint8Slot(1, dataType, 0) +def AddDataType(builder, dataType): + return NestedUnionTestAddDataType(builder, dataType) +def NestedUnionTestAddData(builder, data): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) +def AddData(builder, data): + return NestedUnionTestAddData(builder, data) +def NestedUnionTestAddId(builder, id): builder.PrependInt16Slot(3, id, 0) +def AddId(builder, id): + return NestedUnionTestAddId(builder, id) +def NestedUnionTestEnd(builder): return builder.EndObject() +def End(builder): + return NestedUnionTestEnd(builder) +import MyGame.Example.NestedUnion.Any +import MyGame.Example.NestedUnion.TestSimpleTableWithEnum +import MyGame.Example.NestedUnion.Vec3 +try: + from typing import Union +except: + pass + +class NestedUnionTestT(object): + + # NestedUnionTestT + def __init__(self): + self.name = None # type: str + self.dataType = 0 # type: int + self.data = None # type: Union[None, MyGame.Example.NestedUnion.Vec3.Vec3T, MyGame.Example.NestedUnion.TestSimpleTableWithEnum.TestSimpleTableWithEnumT] + self.id = 0 # type: int + + @classmethod + def InitFromBuf(cls, buf, pos): + nestedUnionTest = NestedUnionTest() + nestedUnionTest.Init(buf, pos) + return cls.InitFromObj(nestedUnionTest) + + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + + @classmethod + def InitFromObj(cls, nestedUnionTest): + x = NestedUnionTestT() + x._UnPack(nestedUnionTest) + return x + + # NestedUnionTestT + def _UnPack(self, nestedUnionTest): + if nestedUnionTest is None: + return + self.name = nestedUnionTest.Name() + self.dataType = nestedUnionTest.DataType() + self.data = MyGame.Example.NestedUnion.Any.AnyCreator(self.dataType, nestedUnionTest.Data()) + self.id = nestedUnionTest.Id() + + # NestedUnionTestT + def Pack(self, builder): + if self.name is not None: + name = builder.CreateString(self.name) + if self.data is not None: + data = self.data.Pack(builder) + NestedUnionTestStart(builder) + if self.name is not None: + NestedUnionTestAddName(builder, name) + NestedUnionTestAddDataType(builder, self.dataType) + if self.data is not None: + NestedUnionTestAddData(builder, data) + NestedUnionTestAddId(builder, self.id) + nestedUnionTest = NestedUnionTestEnd(builder) + return nestedUnionTest diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Test.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Test.py new file mode 100644 index 0000000000..143d1dfde9 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Test.py @@ -0,0 +1,66 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +import flatbuffers +from flatbuffers.compat import import_numpy +np = import_numpy() + +class Test(object): + __slots__ = ['_tab'] + + @classmethod + def SizeOf(cls): + return 4 + + # Test + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # Test + def A(self): return self._tab.Get(flatbuffers.number_types.Int16Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0)) + # Test + def B(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2)) + +def CreateTest(builder, a, b): + builder.Prep(2, 4) + builder.Pad(1) + builder.PrependInt8(b) + builder.PrependInt16(a) + return builder.Offset() + + +class TestT(object): + + # TestT + def __init__(self): + self.a = 0 # type: int + self.b = 0 # type: int + + @classmethod + def InitFromBuf(cls, buf, pos): + test = Test() + test.Init(buf, pos) + return cls.InitFromObj(test) + + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + + @classmethod + def InitFromObj(cls, test): + x = TestT() + x._UnPack(test) + return x + + # TestT + def _UnPack(self, test): + if test is None: + return + self.a = test.A() + self.b = test.B() + + # TestT + def Pack(self, builder): + return CreateTest(builder, self.a, self.b) diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py new file mode 100644 index 0000000000..46ebc263c9 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/TestSimpleTableWithEnum.py @@ -0,0 +1,78 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +import flatbuffers +from flatbuffers.compat import import_numpy +np = import_numpy() + +class TestSimpleTableWithEnum(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAs(cls, buf, offset=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = TestSimpleTableWithEnum() + x.Init(buf, n + offset) + return x + + @classmethod + def GetRootAsTestSimpleTableWithEnum(cls, buf, offset=0): + """This method is deprecated. Please switch to GetRootAs.""" + return cls.GetRootAs(buf, offset) + # TestSimpleTableWithEnum + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # TestSimpleTableWithEnum + def Color(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) + return 2 + +def TestSimpleTableWithEnumStart(builder): builder.StartObject(1) +def Start(builder): + return TestSimpleTableWithEnumStart(builder) +def TestSimpleTableWithEnumAddColor(builder, color): builder.PrependUint8Slot(0, color, 2) +def AddColor(builder, color): + return TestSimpleTableWithEnumAddColor(builder, color) +def TestSimpleTableWithEnumEnd(builder): return builder.EndObject() +def End(builder): + return TestSimpleTableWithEnumEnd(builder) + +class TestSimpleTableWithEnumT(object): + + # TestSimpleTableWithEnumT + def __init__(self): + self.color = 2 # type: int + + @classmethod + def InitFromBuf(cls, buf, pos): + testSimpleTableWithEnum = TestSimpleTableWithEnum() + testSimpleTableWithEnum.Init(buf, pos) + return cls.InitFromObj(testSimpleTableWithEnum) + + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + + @classmethod + def InitFromObj(cls, testSimpleTableWithEnum): + x = TestSimpleTableWithEnumT() + x._UnPack(testSimpleTableWithEnum) + return x + + # TestSimpleTableWithEnumT + def _UnPack(self, testSimpleTableWithEnum): + if testSimpleTableWithEnum is None: + return + self.color = testSimpleTableWithEnum.Color() + + # TestSimpleTableWithEnumT + def Pack(self, builder): + TestSimpleTableWithEnumStart(builder) + TestSimpleTableWithEnumAddColor(builder, self.color) + testSimpleTableWithEnum = TestSimpleTableWithEnumEnd(builder) + return testSimpleTableWithEnum diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Vec3.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Vec3.py new file mode 100644 index 0000000000..f3bb75f26c --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/Vec3.py @@ -0,0 +1,155 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# namespace: NestedUnion + +import flatbuffers +from flatbuffers.compat import import_numpy +np = import_numpy() + +class Vec3(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAs(cls, buf, offset=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = Vec3() + x.Init(buf, n + offset) + return x + + @classmethod + def GetRootAsVec3(cls, buf, offset=0): + """This method is deprecated. Please switch to GetRootAs.""" + return cls.GetRootAs(buf, offset) + # Vec3 + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # Vec3 + def X(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # Vec3 + def Y(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # Vec3 + def Z(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # Vec3 + def Test1(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # Vec3 + def Test2(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) + return 0 + + # Vec3 + def Test3(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + x = o + self._tab.Pos + from MyGame.Example.NestedUnion.Test import Test + obj = Test() + obj.Init(self._tab.Bytes, x) + return obj + return None + +def Vec3Start(builder): builder.StartObject(6) +def Start(builder): + return Vec3Start(builder) +def Vec3AddX(builder, x): builder.PrependFloat64Slot(0, x, 0.0) +def AddX(builder, x): + return Vec3AddX(builder, x) +def Vec3AddY(builder, y): builder.PrependFloat64Slot(1, y, 0.0) +def AddY(builder, y): + return Vec3AddY(builder, y) +def Vec3AddZ(builder, z): builder.PrependFloat64Slot(2, z, 0.0) +def AddZ(builder, z): + return Vec3AddZ(builder, z) +def Vec3AddTest1(builder, test1): builder.PrependFloat64Slot(3, test1, 0.0) +def AddTest1(builder, test1): + return Vec3AddTest1(builder, test1) +def Vec3AddTest2(builder, test2): builder.PrependUint8Slot(4, test2, 0) +def AddTest2(builder, test2): + return Vec3AddTest2(builder, test2) +def Vec3AddTest3(builder, test3): builder.PrependStructSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(test3), 0) +def AddTest3(builder, test3): + return Vec3AddTest3(builder, test3) +def Vec3End(builder): return builder.EndObject() +def End(builder): + return Vec3End(builder) +import MyGame.Example.NestedUnion.Test +try: + from typing import Optional +except: + pass + +class Vec3T(object): + + # Vec3T + def __init__(self): + self.x = 0.0 # type: float + self.y = 0.0 # type: float + self.z = 0.0 # type: float + self.test1 = 0.0 # type: float + self.test2 = 0 # type: int + self.test3 = None # type: Optional[MyGame.Example.NestedUnion.Test.TestT] + + @classmethod + def InitFromBuf(cls, buf, pos): + vec3 = Vec3() + vec3.Init(buf, pos) + return cls.InitFromObj(vec3) + + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + + @classmethod + def InitFromObj(cls, vec3): + x = Vec3T() + x._UnPack(vec3) + return x + + # Vec3T + def _UnPack(self, vec3): + if vec3 is None: + return + self.x = vec3.X() + self.y = vec3.Y() + self.z = vec3.Z() + self.test1 = vec3.Test1() + self.test2 = vec3.Test2() + if vec3.Test3() is not None: + self.test3 = MyGame.Example.NestedUnion.Test.TestT.InitFromObj(vec3.Test3()) + + # Vec3T + def Pack(self, builder): + Vec3Start(builder) + Vec3AddX(builder, self.x) + Vec3AddY(builder, self.y) + Vec3AddZ(builder, self.z) + Vec3AddTest1(builder, self.test1) + Vec3AddTest2(builder, self.test2) + if self.test3 is not None: + test3 = self.test3.Pack(builder) + Vec3AddTest3(builder, test3) + vec3 = Vec3End(builder) + return vec3 diff --git a/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/__init__.py b/third_party/flatbuffers/tests/MyGame/Example/NestedUnion/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third_party/flatbuffers/tests/MyGame/Example/Race.lua b/third_party/flatbuffers/tests/MyGame/Example/Race.lua index 7aa37e5c48..b4f27d68e2 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Race.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Race.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Race.nim b/third_party/flatbuffers/tests/MyGame/Example/Race.nim new file mode 100644 index 0000000000..de77e1cbae --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Race.nim @@ -0,0 +1,15 @@ +#[ MyGame.Example.Race + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type Race*{.pure.} = enum + None = -1.int8, + Human = 0.int8, + Dwarf = 1.int8, + Elf = 2.int8, diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.cs b/third_party/flatbuffers/tests/MyGame/Example/Referrable.cs index a9b59c4d5b..3d6f8a6c58 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Referrable.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.cs @@ -13,7 +13,7 @@ public struct Referrable : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Referrable GetRootAsReferrable(ByteBuffer _bb) { return GetRootAsReferrable(_bb, new Referrable()); } public static Referrable GetRootAsReferrable(ByteBuffer _bb, Referrable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.java b/third_party/flatbuffers/tests/MyGame/Example/Referrable.java index f28d6cbdd9..552aa9699e 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Referrable.java +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class Referrable extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Referrable getRootAsReferrable(ByteBuffer _bb) { return getRootAsReferrable(_bb, new Referrable()); } public static Referrable getRootAsReferrable(ByteBuffer _bb, Referrable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.kt b/third_party/flatbuffers/tests/MyGame/Example/Referrable.kt index 6d4b63e441..92078ac015 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Referrable.kt +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.kt @@ -36,7 +36,7 @@ class Referrable : Table() { return (val_1 - val_2).sign } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsReferrable(_bb: ByteBuffer): Referrable = getRootAsReferrable(_bb, Referrable()) fun getRootAsReferrable(_bb: ByteBuffer, obj: Referrable): Referrable { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.lua b/third_party/flatbuffers/tests/MyGame/Example/Referrable.lua index 191190609b..f3f8396bb2 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Referrable.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.nim b/third_party/flatbuffers/tests/MyGame/Example/Referrable.nim new file mode 100644 index 0000000000..0abc4946a2 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.nim @@ -0,0 +1,26 @@ +#[ MyGame.Example.Referrable + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type Referrable* = object of FlatObj +func id*(self: Referrable): uint64 = + let o = self.tab.Offset(4) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `id=`*(self: var Referrable, n: uint64): bool = + return self.tab.MutateSlot(4, n) +proc ReferrableStart*(builder: var Builder) = + builder.StartObject(1) +proc ReferrableAddid*(builder: var Builder, id: uint64) = + builder.PrependSlot(0, id, default(uint64)) +proc ReferrableEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Referrable.py b/third_party/flatbuffers/tests/MyGame/Example/Referrable.py index 4b1da6ae45..5fd1e24a27 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Referrable.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Referrable.py @@ -57,6 +57,11 @@ def InitFromBuf(cls, buf, pos): referrable.Init(buf, pos) return cls.InitFromObj(referrable) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, referrable): x = ReferrableT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.cs b/third_party/flatbuffers/tests/MyGame/Example/Stat.cs index 32c05dc0df..9ad234fc6d 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Stat.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.cs @@ -13,7 +13,7 @@ public struct Stat : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Stat GetRootAsStat(ByteBuffer _bb) { return GetRootAsStat(_bb, new Stat()); } public static Stat GetRootAsStat(ByteBuffer _bb, Stat obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.java b/third_party/flatbuffers/tests/MyGame/Example/Stat.java index 30444212e3..b4cd21731f 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Stat.java +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class Stat extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Stat getRootAsStat(ByteBuffer _bb) { return getRootAsStat(_bb, new Stat()); } public static Stat getRootAsStat(ByteBuffer _bb, Stat obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.kt b/third_party/flatbuffers/tests/MyGame/Example/Stat.kt index ef6f31ffa0..fe0a1d7705 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Stat.kt +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.kt @@ -57,7 +57,7 @@ class Stat : Table() { return (val_1 - val_2).sign } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsStat(_bb: ByteBuffer): Stat = getRootAsStat(_bb, Stat()) fun getRootAsStat(_bb: ByteBuffer, obj: Stat): Stat { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.lua b/third_party/flatbuffers/tests/MyGame/Example/Stat.lua index bf5704bec6..a9848aa41c 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Stat.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.nim b/third_party/flatbuffers/tests/MyGame/Example/Stat.nim new file mode 100644 index 0000000000..09cda131cf --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.nim @@ -0,0 +1,42 @@ +#[ MyGame.Example.Stat + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers +import std/options + +type Stat* = object of FlatObj +func id*(self: Stat): Option[string] = + let o = self.tab.Offset(4) + if o != 0: + return some(self.tab.String(self.tab.Pos + o)) +func val*(self: Stat): int64 = + let o = self.tab.Offset(6) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 0 +func `val=`*(self: var Stat, n: int64): bool = + return self.tab.MutateSlot(6, n) +func count*(self: Stat): uint16 = + let o = self.tab.Offset(8) + if o != 0: + return Get[uint16](self.tab, self.tab.Pos + o) + return 0 +func `count=`*(self: var Stat, n: uint16): bool = + return self.tab.MutateSlot(8, n) +proc StatStart*(builder: var Builder) = + builder.StartObject(3) +proc StatAddid*(builder: var Builder, id: uoffset) = + builder.PrependSlot(0, id, default(uoffset)) +proc StatAddval*(builder: var Builder, val: int64) = + builder.PrependSlot(1, val, default(int64)) +proc StatAddcount*(builder: var Builder, count: uint16) = + builder.PrependSlot(2, count, default(uint16)) +proc StatEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Stat.py b/third_party/flatbuffers/tests/MyGame/Example/Stat.py index 3b19a3b849..471bc36ff0 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Stat.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Stat.py @@ -79,6 +79,11 @@ def InitFromBuf(cls, buf, pos): stat.Init(buf, pos) return cls.InitFromObj(stat) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, stat): x = StatT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.java b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.java index 424a8a282b..32c6e1f463 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.java +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.java @@ -52,12 +52,12 @@ public void unpackTo(StructOfStructsT _o) { } public static int pack(FlatBufferBuilder builder, StructOfStructsT _o) { if (_o == null) return 0; - int _a_id = _o.getA().getId(); - int _a_distance = _o.getA().getDistance(); + int _a_id = (int) _o.getA().getId(); + int _a_distance = (int) _o.getA().getDistance(); short _b_a = _o.getB().getA(); byte _b_b = _o.getB().getB(); - int _c_id = _o.getC().getId(); - int _c_distance = _o.getC().getDistance(); + int _c_id = (int) _o.getC().getId(); + int _c_distance = (int) _o.getC().getDistance(); return createStructOfStructs( builder, _a_id, diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.lua b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.lua index be0148b605..1f3b1db478 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.nim b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.nim new file mode 100644 index 0000000000..6cd979eba9 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.nim @@ -0,0 +1,34 @@ +#[ MyGame.Example.StructOfStructs + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import Ability as MyGame_Example_Ability +import Test as MyGame_Example_Test +import flatbuffers + +type StructOfStructs* = object of FlatObj +func a*(self: StructOfStructs): MyGame_Example_Ability.Ability = + return MyGame_Example_Ability.Ability(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 0)) +func b*(self: StructOfStructs): MyGame_Example_Test.Test = + return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 8)) +func c*(self: StructOfStructs): MyGame_Example_Ability.Ability = + return MyGame_Example_Ability.Ability(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 12)) +proc StructOfStructsCreate*(self: var Builder, a_id: uint32, a_distance: uint32, b_a: int16, b_b: int8, c_id: uint32, c_distance: uint32): uoffset = + self.Prep(4, 20) + self.Prep(4, 8) + self.Prepend(c_distance) + self.Prepend(c_id) + self.Prep(2, 4) + self.Pad(1) + self.Prepend(b_b) + self.Prepend(b_a) + self.Prep(4, 8) + self.Prepend(a_distance) + self.Prepend(a_id) + return self.Offset() diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.py b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.py index 0dcf3d5585..88c469ed7c 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.py +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructs.py @@ -68,6 +68,11 @@ def InitFromBuf(cls, buf, pos): structOfStructs.Init(buf, pos) return cls.InitFromObj(structOfStructs) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, structOfStructs): x = StructOfStructsT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.java b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.java index 5d5f00f02a..ae1f50de90 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.java +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.java @@ -47,12 +47,12 @@ public void unpackTo(StructOfStructsOfStructsT _o) { } public static int pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) { if (_o == null) return 0; - int _a_a_id = _o.getA().getA().getId(); - int _a_a_distance = _o.getA().getA().getDistance(); + int _a_a_id = (int) _o.getA().getA().getId(); + int _a_a_distance = (int) _o.getA().getA().getDistance(); short _a_b_a = _o.getA().getB().getA(); byte _a_b_b = _o.getA().getB().getB(); - int _a_c_id = _o.getA().getC().getId(); - int _a_c_distance = _o.getA().getC().getDistance(); + int _a_c_id = (int) _o.getA().getC().getId(); + int _a_c_distance = (int) _o.getA().getC().getDistance(); return createStructOfStructsOfStructs( builder, _a_a_id, diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.lua b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.lua index f8587c1339..87a23a5468 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.nim b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.nim new file mode 100644 index 0000000000..de039e97f8 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.nim @@ -0,0 +1,30 @@ +#[ MyGame.Example.StructOfStructsOfStructs + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import StructOfStructs as MyGame_Example_StructOfStructs +import flatbuffers + +type StructOfStructsOfStructs* = object of FlatObj +func a*(self: StructOfStructsOfStructs): MyGame_Example_StructOfStructs.StructOfStructs = + return MyGame_Example_StructOfStructs.StructOfStructs(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 0)) +proc StructOfStructsOfStructsCreate*(self: var Builder, a_a_id: uint32, a_a_distance: uint32, a_b_a: int16, a_b_b: int8, a_c_id: uint32, a_c_distance: uint32): uoffset = + self.Prep(4, 20) + self.Prep(4, 20) + self.Prep(4, 8) + self.Prepend(a_c_distance) + self.Prepend(a_c_id) + self.Prep(2, 4) + self.Pad(1) + self.Prepend(a_b_b) + self.Prepend(a_b_a) + self.Prep(4, 8) + self.Prepend(a_a_distance) + self.Prepend(a_a_id) + return self.Offset() diff --git a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.py b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.py index edba982152..0243f71c4d 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.py +++ b/third_party/flatbuffers/tests/MyGame/Example/StructOfStructsOfStructs.py @@ -56,6 +56,11 @@ def InitFromBuf(cls, buf, pos): structOfStructsOfStructs.Init(buf, pos) return cls.InitFromObj(structOfStructsOfStructs) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, structOfStructsOfStructs): x = StructOfStructsOfStructsT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Test.lua b/third_party/flatbuffers/tests/MyGame/Example/Test.lua index 74217cc7e6..b912df0c9f 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Test.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Test.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Test.nim b/third_party/flatbuffers/tests/MyGame/Example/Test.nim new file mode 100644 index 0000000000..c7ea8cc8f4 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Test.nim @@ -0,0 +1,27 @@ +#[ MyGame.Example.Test + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type Test* = object of FlatObj +func a*(self: Test): int16 = + return Get[int16](self.tab, self.tab.Pos + 0) +func `a=`*(self: var Test, n: int16): bool = + return self.tab.Mutate(self.tab.Pos + 0, n) +func b*(self: Test): int8 = + return Get[int8](self.tab, self.tab.Pos + 2) +func `b=`*(self: var Test, n: int8): bool = + return self.tab.Mutate(self.tab.Pos + 2, n) +proc TestCreate*(self: var Builder, a: int16, b: int8): uoffset = + self.Prep(2, 4) + self.Pad(1) + self.Prepend(b) + self.Prepend(a) + return self.Offset() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Test.py b/third_party/flatbuffers/tests/MyGame/Example/Test.py index 8357ec209c..f095d33451 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Test.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Test.py @@ -43,6 +43,11 @@ def InitFromBuf(cls, buf, pos): test.Init(buf, pos) return cls.InitFromObj(test) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, test): x = TestT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.cs b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.cs index 837ad19fc4..cf8c5556c1 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.cs @@ -13,7 +13,7 @@ internal partial struct TestSimpleTableWithEnum : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return GetRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); } public static TestSimpleTableWithEnum GetRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.java b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.java index 39f9421d63..067d37a6a1 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.java +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") final class TestSimpleTableWithEnum extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return getRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); } public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.kt b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.kt index cb081fc3aa..8268c8cb74 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.kt +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.kt @@ -31,7 +31,7 @@ class TestSimpleTableWithEnum : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsTestSimpleTableWithEnum(_bb: ByteBuffer): TestSimpleTableWithEnum = getRootAsTestSimpleTableWithEnum(_bb, TestSimpleTableWithEnum()) fun getRootAsTestSimpleTableWithEnum(_bb: ByteBuffer, obj: TestSimpleTableWithEnum): TestSimpleTableWithEnum { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.lua b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.lua index 90dcf7928b..ee809608e6 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.nim b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.nim new file mode 100644 index 0000000000..873527bae6 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.nim @@ -0,0 +1,27 @@ +#[ MyGame.Example.TestSimpleTableWithEnum + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import Color as MyGame_Example_Color +import flatbuffers + +type TestSimpleTableWithEnum* = object of FlatObj +func color*(self: TestSimpleTableWithEnum): MyGame_Example_Color.Color = + let o = self.tab.Offset(4) + if o != 0: + return MyGame_Example_Color.Color(Get[uint8](self.tab, self.tab.Pos + o)) + return type(result)(2) +func `color=`*(self: var TestSimpleTableWithEnum, n: MyGame_Example_Color.Color): bool = + return self.tab.MutateSlot(4, n) +proc TestSimpleTableWithEnumStart*(builder: var Builder) = + builder.StartObject(1) +proc TestSimpleTableWithEnumAddcolor*(builder: var Builder, color: uint8) = + builder.PrependSlot(0, color, default(uint8)) +proc TestSimpleTableWithEnumEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.py b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.py index 7f18ed24e5..9e58cc4b55 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.py +++ b/third_party/flatbuffers/tests/MyGame/Example/TestSimpleTableWithEnum.py @@ -57,6 +57,11 @@ def InitFromBuf(cls, buf, pos): testSimpleTableWithEnum.Init(buf, pos) return cls.InitFromObj(testSimpleTableWithEnum) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, testSimpleTableWithEnum): x = TestSimpleTableWithEnumT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.cs b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.cs index f936ad615f..00b8c709bb 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.cs +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.cs @@ -13,7 +13,7 @@ public struct TypeAliases : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static TypeAliases GetRootAsTypeAliases(ByteBuffer _bb) { return GetRootAsTypeAliases(_bb, new TypeAliases()); } public static TypeAliases GetRootAsTypeAliases(ByteBuffer _bb, TypeAliases obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.java b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.java index d91ca65951..c8e183a6d7 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.java +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class TypeAliases extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb) { return getRootAsTypeAliases(_bb, new TypeAliases()); } public static TypeAliases getRootAsTypeAliases(ByteBuffer _bb, TypeAliases obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.kt b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.kt index 8a2d80ebfb..c5ca774e2c 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.kt +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.kt @@ -203,7 +203,7 @@ class TypeAliases : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsTypeAliases(_bb: ByteBuffer): TypeAliases = getRootAsTypeAliases(_bb, TypeAliases()) fun getRootAsTypeAliases(_bb: ByteBuffer, obj: TypeAliases): TypeAliases { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.lua b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.lua index cd406c384c..e6d926c4c4 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.nim b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.nim new file mode 100644 index 0000000000..d675949aaa --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.nim @@ -0,0 +1,144 @@ +#[ MyGame.Example.TypeAliases + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers +import std/options + +type TypeAliases* = object of FlatObj +func i8*(self: TypeAliases): int8 = + let o = self.tab.Offset(4) + if o != 0: + return Get[int8](self.tab, self.tab.Pos + o) + return 0 +func `i8=`*(self: var TypeAliases, n: int8): bool = + return self.tab.MutateSlot(4, n) +func u8*(self: TypeAliases): uint8 = + let o = self.tab.Offset(6) + if o != 0: + return Get[uint8](self.tab, self.tab.Pos + o) + return 0 +func `u8=`*(self: var TypeAliases, n: uint8): bool = + return self.tab.MutateSlot(6, n) +func i16*(self: TypeAliases): int16 = + let o = self.tab.Offset(8) + if o != 0: + return Get[int16](self.tab, self.tab.Pos + o) + return 0 +func `i16=`*(self: var TypeAliases, n: int16): bool = + return self.tab.MutateSlot(8, n) +func u16*(self: TypeAliases): uint16 = + let o = self.tab.Offset(10) + if o != 0: + return Get[uint16](self.tab, self.tab.Pos + o) + return 0 +func `u16=`*(self: var TypeAliases, n: uint16): bool = + return self.tab.MutateSlot(10, n) +func i32*(self: TypeAliases): int32 = + let o = self.tab.Offset(12) + if o != 0: + return Get[int32](self.tab, self.tab.Pos + o) + return 0 +func `i32=`*(self: var TypeAliases, n: int32): bool = + return self.tab.MutateSlot(12, n) +func u32*(self: TypeAliases): uint32 = + let o = self.tab.Offset(14) + if o != 0: + return Get[uint32](self.tab, self.tab.Pos + o) + return 0 +func `u32=`*(self: var TypeAliases, n: uint32): bool = + return self.tab.MutateSlot(14, n) +func i64*(self: TypeAliases): int64 = + let o = self.tab.Offset(16) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 0 +func `i64=`*(self: var TypeAliases, n: int64): bool = + return self.tab.MutateSlot(16, n) +func u64*(self: TypeAliases): uint64 = + let o = self.tab.Offset(18) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `u64=`*(self: var TypeAliases, n: uint64): bool = + return self.tab.MutateSlot(18, n) +func f32*(self: TypeAliases): float32 = + let o = self.tab.Offset(20) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 0.0 +func `f32=`*(self: var TypeAliases, n: float32): bool = + return self.tab.MutateSlot(20, n) +func f64*(self: TypeAliases): float64 = + let o = self.tab.Offset(22) + if o != 0: + return Get[float64](self.tab, self.tab.Pos + o) + return 0.0 +func `f64=`*(self: var TypeAliases, n: float64): bool = + return self.tab.MutateSlot(22, n) +func v8Length*(self: TypeAliases): int = + let o = self.tab.Offset(24) + if o != 0: + return self.tab.VectorLen(o) +func v8*(self: TypeAliases, j: int): int8 = + let o = self.tab.Offset(24) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 1.uoffset + return Get[int8](self.tab, x) +func v8*(self: TypeAliases): seq[int8] = + let len = self.v8Length + for i in countup(0, len - 1): + result.add(self.v8(i)) +func vf64Length*(self: TypeAliases): int = + let o = self.tab.Offset(26) + if o != 0: + return self.tab.VectorLen(o) +func vf64*(self: TypeAliases, j: int): float64 = + let o = self.tab.Offset(26) + if o != 0: + var x = self.tab.Vector(o) + x += j.uoffset * 8.uoffset + return Get[float64](self.tab, x) +func vf64*(self: TypeAliases): seq[float64] = + let len = self.vf64Length + for i in countup(0, len - 1): + result.add(self.vf64(i)) +proc TypeAliasesStart*(builder: var Builder) = + builder.StartObject(12) +proc TypeAliasesAddi8*(builder: var Builder, i8: int8) = + builder.PrependSlot(0, i8, default(int8)) +proc TypeAliasesAddu8*(builder: var Builder, u8: uint8) = + builder.PrependSlot(1, u8, default(uint8)) +proc TypeAliasesAddi16*(builder: var Builder, i16: int16) = + builder.PrependSlot(2, i16, default(int16)) +proc TypeAliasesAddu16*(builder: var Builder, u16: uint16) = + builder.PrependSlot(3, u16, default(uint16)) +proc TypeAliasesAddi32*(builder: var Builder, i32: int32) = + builder.PrependSlot(4, i32, default(int32)) +proc TypeAliasesAddu32*(builder: var Builder, u32: uint32) = + builder.PrependSlot(5, u32, default(uint32)) +proc TypeAliasesAddi64*(builder: var Builder, i64: int64) = + builder.PrependSlot(6, i64, default(int64)) +proc TypeAliasesAddu64*(builder: var Builder, u64: uint64) = + builder.PrependSlot(7, u64, default(uint64)) +proc TypeAliasesAddf32*(builder: var Builder, f32: float32) = + builder.PrependSlot(8, f32, default(float32)) +proc TypeAliasesAddf64*(builder: var Builder, f64: float64) = + builder.PrependSlot(9, f64, default(float64)) +proc TypeAliasesAddv8*(builder: var Builder, v8: uoffset) = + builder.PrependSlot(10, v8, default(uoffset)) +proc TypeAliasesStartv8Vector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(1, numElems, 1) +proc TypeAliasesAddvf64*(builder: var Builder, vf64: uoffset) = + builder.PrependSlot(11, vf64, default(uoffset)) +proc TypeAliasesStartvf64Vector*(builder: var Builder, numElems: uoffset) = + builder.StartVector(8, numElems, 8) +proc TypeAliasesEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.py b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.py index 8b0ea19c5b..b3020490a0 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.py +++ b/third_party/flatbuffers/tests/MyGame/Example/TypeAliases.py @@ -228,6 +228,11 @@ def InitFromBuf(cls, buf, pos): typeAliases.Init(buf, pos) return cls.InitFromObj(typeAliases) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, typeAliases): x = TypeAliasesT() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Vec3.lua b/third_party/flatbuffers/tests/MyGame/Example/Vec3.lua index 796ac7af24..89b2bfbee6 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Vec3.lua +++ b/third_party/flatbuffers/tests/MyGame/Example/Vec3.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example/Vec3.nim b/third_party/flatbuffers/tests/MyGame/Example/Vec3.nim new file mode 100644 index 0000000000..9131fe8339 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example/Vec3.nim @@ -0,0 +1,52 @@ +#[ MyGame.Example.Vec3 + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import Color as MyGame_Example_Color +import Test as MyGame_Example_Test +import flatbuffers + +type Vec3* = object of FlatObj +func x*(self: Vec3): float32 = + return Get[float32](self.tab, self.tab.Pos + 0) +func `x=`*(self: var Vec3, n: float32): bool = + return self.tab.Mutate(self.tab.Pos + 0, n) +func y*(self: Vec3): float32 = + return Get[float32](self.tab, self.tab.Pos + 4) +func `y=`*(self: var Vec3, n: float32): bool = + return self.tab.Mutate(self.tab.Pos + 4, n) +func z*(self: Vec3): float32 = + return Get[float32](self.tab, self.tab.Pos + 8) +func `z=`*(self: var Vec3, n: float32): bool = + return self.tab.Mutate(self.tab.Pos + 8, n) +func test1*(self: Vec3): float64 = + return Get[float64](self.tab, self.tab.Pos + 16) +func `test1=`*(self: var Vec3, n: float64): bool = + return self.tab.Mutate(self.tab.Pos + 16, n) +func test2*(self: Vec3): MyGame_Example_Color.Color = + return MyGame_Example_Color.Color(Get[uint8](self.tab, self.tab.Pos + 24)) +func `test2=`*(self: var Vec3, n: MyGame_Example_Color.Color): bool = + return self.tab.Mutate(self.tab.Pos + 24, n) +func test3*(self: Vec3): MyGame_Example_Test.Test = + return MyGame_Example_Test.Test(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + 26)) +proc Vec3Create*(self: var Builder, x: float32, y: float32, z: float32, test1: float64, test2: MyGame_Example_Color.Color, test3_a: int16, test3_b: int8): uoffset = + self.Prep(8, 32) + self.Pad(2) + self.Prep(2, 4) + self.Pad(1) + self.Prepend(test3_b) + self.Prepend(test3_a) + self.Pad(1) + self.Prepend(test2) + self.Prepend(test1) + self.Pad(4) + self.Prepend(z) + self.Prepend(y) + self.Prepend(x) + return self.Offset() diff --git a/third_party/flatbuffers/tests/MyGame/Example/Vec3.py b/third_party/flatbuffers/tests/MyGame/Example/Vec3.py index 69cd511f43..3a394a269c 100644 --- a/third_party/flatbuffers/tests/MyGame/Example/Vec3.py +++ b/third_party/flatbuffers/tests/MyGame/Example/Vec3.py @@ -72,6 +72,11 @@ def InitFromBuf(cls, buf, pos): vec3.Init(buf, pos) return cls.InitFromObj(vec3) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, vec3): x = Vec3T() diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.cs b/third_party/flatbuffers/tests/MyGame/Example2/Monster.cs index af736e7dd2..575d77e666 100644 --- a/third_party/flatbuffers/tests/MyGame/Example2/Monster.cs +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.cs @@ -13,7 +13,7 @@ public struct Monster : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Monster GetRootAsMonster(ByteBuffer _bb) { return GetRootAsMonster(_bb, new Monster()); } public static Monster GetRootAsMonster(ByteBuffer _bb, Monster obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.java b/third_party/flatbuffers/tests/MyGame/Example2/Monster.java index 8065218b4c..4697f4dd06 100644 --- a/third_party/flatbuffers/tests/MyGame/Example2/Monster.java +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class Monster extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Monster getRootAsMonster(ByteBuffer _bb) { return getRootAsMonster(_bb, new Monster()); } public static Monster getRootAsMonster(ByteBuffer _bb, Monster obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.kt b/third_party/flatbuffers/tests/MyGame/Example2/Monster.kt index b5a148f9aa..01f60a63dc 100644 --- a/third_party/flatbuffers/tests/MyGame/Example2/Monster.kt +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.kt @@ -17,7 +17,7 @@ class Monster : Table() { return this } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsMonster(_bb: ByteBuffer): Monster = getRootAsMonster(_bb, Monster()) fun getRootAsMonster(_bb: ByteBuffer, obj: Monster): Monster { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.lua b/third_party/flatbuffers/tests/MyGame/Example2/Monster.lua index ddf4738697..db43d8e518 100644 --- a/third_party/flatbuffers/tests/MyGame/Example2/Monster.lua +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.nim b/third_party/flatbuffers/tests/MyGame/Example2/Monster.nim new file mode 100644 index 0000000000..1a1a7e3193 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.nim @@ -0,0 +1,17 @@ +#[ MyGame.Example2.Monster + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type Monster* = object of FlatObj +proc MonsterStart*(builder: var Builder) = + builder.StartObject(0) +proc MonsterEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/Example2/Monster.py b/third_party/flatbuffers/tests/MyGame/Example2/Monster.py index 893ea9bbb4..020efef731 100644 --- a/third_party/flatbuffers/tests/MyGame/Example2/Monster.py +++ b/third_party/flatbuffers/tests/MyGame/Example2/Monster.py @@ -47,6 +47,11 @@ def InitFromBuf(cls, buf, pos): monster.Init(buf, pos) return cls.InitFromObj(monster) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, monster): x = MonsterT() diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.cs b/third_party/flatbuffers/tests/MyGame/InParentNamespace.cs index 6237e7c4bf..43fb0748a9 100644 --- a/third_party/flatbuffers/tests/MyGame/InParentNamespace.cs +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.cs @@ -13,7 +13,7 @@ public struct InParentNamespace : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static InParentNamespace GetRootAsInParentNamespace(ByteBuffer _bb) { return GetRootAsInParentNamespace(_bb, new InParentNamespace()); } public static InParentNamespace GetRootAsInParentNamespace(ByteBuffer _bb, InParentNamespace obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.java b/third_party/flatbuffers/tests/MyGame/InParentNamespace.java index c525ed5727..26e5aa11b4 100644 --- a/third_party/flatbuffers/tests/MyGame/InParentNamespace.java +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class InParentNamespace extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static InParentNamespace getRootAsInParentNamespace(ByteBuffer _bb) { return getRootAsInParentNamespace(_bb, new InParentNamespace()); } public static InParentNamespace getRootAsInParentNamespace(ByteBuffer _bb, InParentNamespace obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.kt b/third_party/flatbuffers/tests/MyGame/InParentNamespace.kt index 7bed05813d..5be2ca44d9 100644 --- a/third_party/flatbuffers/tests/MyGame/InParentNamespace.kt +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.kt @@ -17,7 +17,7 @@ class InParentNamespace : Table() { return this } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsInParentNamespace(_bb: ByteBuffer): InParentNamespace = getRootAsInParentNamespace(_bb, InParentNamespace()) fun getRootAsInParentNamespace(_bb: ByteBuffer, obj: InParentNamespace): InParentNamespace { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.lua b/third_party/flatbuffers/tests/MyGame/InParentNamespace.lua index 911566699b..9d7f498f21 100644 --- a/third_party/flatbuffers/tests/MyGame/InParentNamespace.lua +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.nim b/third_party/flatbuffers/tests/MyGame/InParentNamespace.nim new file mode 100644 index 0000000000..cd1397fc0a --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.nim @@ -0,0 +1,17 @@ +#[ MyGame.InParentNamespace + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type InParentNamespace* = object of FlatObj +proc InParentNamespaceStart*(builder: var Builder) = + builder.StartObject(0) +proc InParentNamespaceEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/InParentNamespace.py b/third_party/flatbuffers/tests/MyGame/InParentNamespace.py index 197072b843..0914aa4624 100644 --- a/third_party/flatbuffers/tests/MyGame/InParentNamespace.py +++ b/third_party/flatbuffers/tests/MyGame/InParentNamespace.py @@ -47,6 +47,11 @@ def InitFromBuf(cls, buf, pos): inParentNamespace.Init(buf, pos) return cls.InitFromObj(inParentNamespace) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, inParentNamespace): x = InParentNamespaceT() diff --git a/third_party/flatbuffers/tests/MyGame/MonsterExtra.cs b/third_party/flatbuffers/tests/MyGame/MonsterExtra.cs index 0236856d03..c964dd7e3e 100644 --- a/third_party/flatbuffers/tests/MyGame/MonsterExtra.cs +++ b/third_party/flatbuffers/tests/MyGame/MonsterExtra.cs @@ -13,7 +13,7 @@ public struct MonsterExtra : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static MonsterExtra GetRootAsMonsterExtra(ByteBuffer _bb) { return GetRootAsMonsterExtra(_bb, new MonsterExtra()); } public static MonsterExtra GetRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public static bool MonsterExtraBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "MONE"); } diff --git a/third_party/flatbuffers/tests/MyGame/MonsterExtra.java b/third_party/flatbuffers/tests/MyGame/MonsterExtra.java index fdaf40b91d..3e5fbcde32 100644 --- a/third_party/flatbuffers/tests/MyGame/MonsterExtra.java +++ b/third_party/flatbuffers/tests/MyGame/MonsterExtra.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class MonsterExtra extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb) { return getRootAsMonsterExtra(_bb, new MonsterExtra()); } public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public static boolean MonsterExtraBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MONE"); } diff --git a/third_party/flatbuffers/tests/MyGame/MonsterExtra.kt b/third_party/flatbuffers/tests/MyGame/MonsterExtra.kt index 3c8760c862..d999e46766 100644 --- a/third_party/flatbuffers/tests/MyGame/MonsterExtra.kt +++ b/third_party/flatbuffers/tests/MyGame/MonsterExtra.kt @@ -175,7 +175,7 @@ class MonsterExtra : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsMonsterExtra(_bb: ByteBuffer): MonsterExtra = getRootAsMonsterExtra(_bb, MonsterExtra()) fun getRootAsMonsterExtra(_bb: ByteBuffer, obj: MonsterExtra): MonsterExtra { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/MyGame/MonsterExtra.py b/third_party/flatbuffers/tests/MyGame/MonsterExtra.py index f7288b6c97..b30ee6e788 100644 --- a/third_party/flatbuffers/tests/MyGame/MonsterExtra.py +++ b/third_party/flatbuffers/tests/MyGame/MonsterExtra.py @@ -206,6 +206,11 @@ def InitFromBuf(cls, buf, pos): monsterExtra.Init(buf, pos) return cls.InitFromObj(monsterExtra) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, monsterExtra): x = MonsterExtraT() diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.lua b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.lua index 64d894e2d1..a98cec98fe 100644 --- a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.lua +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //include_test/sub/include_test2.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.nim b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.nim new file mode 100644 index 0000000000..36efea6156 --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/FromInclude.nim @@ -0,0 +1,12 @@ +#[ MyGame.OtherNameSpace.FromInclude + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +type FromInclude*{.pure.} = enum + IncludeVal = 0.int64, diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.lua b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.lua index 1f76c88f39..6e24cdf839 100644 --- a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.lua +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //include_test/sub/include_test2.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.nim b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.nim new file mode 100644 index 0000000000..8026fb0f8b --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/TableB.nim @@ -0,0 +1,25 @@ +#[ MyGame.OtherNameSpace.TableB + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import ../../TableA as TableA +import flatbuffers +import std/options + +type TableB* = object of FlatObj +func a*(self: TableB): Option[TableA.TableA] = + let o = self.tab.Offset(4) + if o != 0: + return some(TableA.TableA(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +proc TableBstart*(builder: var Builder) = + builder.StartObject(1) +proc TableBadda*(builder: var Builder, a: uoffset) = + builder.PrependStructSlot(0, a, default(uoffset)) +proc TableBend*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.lua b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.lua index 155a04e130..9745a24b44 100644 --- a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.lua +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //include_test/sub/include_test2.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.nim b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.nim new file mode 100644 index 0000000000..fd3b6242fd --- /dev/null +++ b/third_party/flatbuffers/tests/MyGame/OtherNameSpace/Unused.nim @@ -0,0 +1,21 @@ +#[ MyGame.OtherNameSpace.Unused + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import flatbuffers + +type Unused* = object of FlatObj +func a*(self: Unused): int32 = + return Get[int32](self.tab, self.tab.Pos + 0) +func `a=`*(self: var Unused, n: int32): bool = + return self.tab.Mutate(self.tab.Pos + 0, n) +proc UnusedCreate*(self: var Builder, a: int32): uoffset = + self.Prep(4, 4) + self.Prepend(a) + return self.Offset() diff --git a/third_party/flatbuffers/tests/Property.nim b/third_party/flatbuffers/tests/Property.nim new file mode 100644 index 0000000000..ae47ccd91c --- /dev/null +++ b/third_party/flatbuffers/tests/Property.nim @@ -0,0 +1,20 @@ +#[ Property + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : +]# + +import flatbuffers + +type Property* = object of FlatObj +func property*(self: Property): bool = + return Get[bool](self.tab, self.tab.Pos + 0) +func `property=`*(self: var Property, n: bool): bool = + return self.tab.Mutate(self.tab.Pos + 0, n) +proc PropertyCreate*(self: var Builder, property: bool): uoffset = + self.Prep(1, 1) + self.Prepend(property) + return self.Offset() diff --git a/third_party/flatbuffers/tests/PythonTest.sh b/third_party/flatbuffers/tests/PythonTest.sh index 00772eae39..925bd95ebb 100755 --- a/third_party/flatbuffers/tests/PythonTest.sh +++ b/third_party/flatbuffers/tests/PythonTest.sh @@ -17,12 +17,14 @@ pushd "$(dirname $0)" >/dev/null test_dir="$(pwd)" gen_code_path=${test_dir} -runtime_library_dir=${test_dir}/../python +runtime_library_dir=${test_dir}/../../python # Emit Python code for the example schema in the test dir: ${test_dir}/../flatc -p -o ${gen_code_path} -I include_test monster_test.fbs --gen-object-api ${test_dir}/../flatc -p -o ${gen_code_path} -I include_test monster_test.fbs --gen-object-api --gen-onefile ${test_dir}/../flatc -p -o ${gen_code_path} -I include_test monster_extra.fbs --gen-object-api +${test_dir}/../flatc -p -o ${gen_code_path} -I include_test arrays_test.fbs --gen-object-api +${test_dir}/../flatc -p -o ${gen_code_path} -I include_test nested_union_test.fbs --gen-object-api # Syntax: run_tests # @@ -73,7 +75,7 @@ if $(which coverage >/dev/null); then PYTHONDONTWRITEBYTECODE=1 \ PYTHONPATH=${runtime_library_dir}:${gen_code_path} \ - coverage run --source=flatbuffers,MyGame py_test.py 0 0 0 > /dev/null + coverage run --source=flatbuffers,MyGame py_test.py 0 0 0 false > /dev/null echo cov_result=`coverage report --omit="*flatbuffers/vendor*,*py_test*" \ diff --git a/third_party/flatbuffers/tests/RustTest.bat b/third_party/flatbuffers/tests/RustTest.bat index e897534cf2..236cd9d7f5 100644 --- a/third_party/flatbuffers/tests/RustTest.bat +++ b/third_party/flatbuffers/tests/RustTest.bat @@ -21,3 +21,10 @@ cargo run --bin=flatbuffers_alloc_check || exit /b 1 cargo run --bin=flexbuffers_alloc_check || exit /b 1 cargo run --bin=monster_example || exit /b 1 cd .. + +cd rust_no_std_compilation_test +rustup install nightly +rustup component add rust-src --toolchain nightly +rustup target add thumbv7m-none-eabi +cargo build || exit /b 1 +cd .. diff --git a/third_party/flatbuffers/tests/RustTest.sh b/third_party/flatbuffers/tests/RustTest.sh index c0e1f9ef79..1e7d0eed9d 100755 --- a/third_party/flatbuffers/tests/RustTest.sh +++ b/third_party/flatbuffers/tests/RustTest.sh @@ -35,11 +35,18 @@ cd ./rust_serialize_test cargo run $TARGET_FLAG -- --quiet check_test_result "Rust serde tests" +cd ../rust_no_std_compilation_test +rustup install nightly +rustup component add rust-src --toolchain nightly +rustup target add thumbv7m-none-eabi +cargo +nightly build +check_test_result "Rust flatbuffers test no_std compilation" + cd ../rust_usage_test cargo test $TARGET_FLAG -- --quiet check_test_result "Rust tests" -cargo test $TARGET_FLAG --no-default-features --features no_std -- --quiet +cargo test $TARGET_FLAG --no-default-features -- --quiet check_test_result "Rust tests (no_std)" cargo run $TARGET_FLAG --bin=flatbuffers_alloc_check @@ -48,13 +55,9 @@ check_test_result "Rust flatbuffers heap alloc test" cargo run $TARGET_FLAG --bin=flexbuffers_alloc_check check_test_result "Rust flexbuffers heap alloc test" -# TODO(caspern): Fix this. -# Temporarily disabled due to error in upstream configuration -# https://github.com/google/flatbuffers/issues/6491 -# -# rustup component add clippy -# cargo clippy $TARGET_FLAG -# check_test_result "No Cargo clippy lints test" +rustup component add clippy +cargo clippy $TARGET_FLAG +check_test_result "No Cargo clippy lints test" cargo bench $TARGET_FLAG diff --git a/third_party/flatbuffers/tests/TableA.lua b/third_party/flatbuffers/tests/TableA.lua index 312f82d4f9..472f7ea1d3 100644 --- a/third_party/flatbuffers/tests/TableA.lua +++ b/third_party/flatbuffers/tests/TableA.lua @@ -3,7 +3,7 @@ Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. - flatc version: 2.0.8 + flatc version: 22.10.26 Declared by : //include_test/include_test1.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) diff --git a/third_party/flatbuffers/tests/TableA.nim b/third_party/flatbuffers/tests/TableA.nim new file mode 100644 index 0000000000..2c4e283b36 --- /dev/null +++ b/third_party/flatbuffers/tests/TableA.nim @@ -0,0 +1,25 @@ +#[ TableA + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : MyGame.Example.Monster () +]# + +import MyGame/OtherNameSpace/TableB as MyGame_OtherNameSpace_TableB +import flatbuffers +import std/options + +type TableA* = object of FlatObj +func b*(self: TableA): Option[MyGame_OtherNameSpace_TableB.TableB] = + let o = self.tab.Offset(4) + if o != 0: + return some(MyGame_OtherNameSpace_TableB.TableB(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +proc TableAstart*(builder: var Builder) = + builder.StartObject(1) +proc TableAaddb*(builder: var Builder, b: uoffset) = + builder.PrependStructSlot(0, b, default(uoffset)) +proc TableAend*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/TestMutatingBool.nim b/third_party/flatbuffers/tests/TestMutatingBool.nim new file mode 100644 index 0000000000..0b0ac158e7 --- /dev/null +++ b/third_party/flatbuffers/tests/TestMutatingBool.nim @@ -0,0 +1,24 @@ +#[ TestMutatingBool + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : +]# + +import Property as Property +import flatbuffers +import std/options + +type TestMutatingBool* = object of FlatObj +func b*(self: TestMutatingBool): Option[Property.Property] = + let o = self.tab.Offset(4) + if o != 0: + return some(Property.Property(tab: Vtable(Bytes: self.tab.Bytes, Pos: self.tab.Pos + o))) +proc TestMutatingBoolStart*(builder: var Builder) = + builder.StartObject(1) +proc TestMutatingBoolAddb*(builder: var Builder, b: uoffset) = + builder.PrependStructSlot(0, b, default(uoffset)) +proc TestMutatingBoolEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/alignment_test.cpp b/third_party/flatbuffers/tests/alignment_test.cpp new file mode 100644 index 0000000000..1026fc3397 --- /dev/null +++ b/third_party/flatbuffers/tests/alignment_test.cpp @@ -0,0 +1,31 @@ +#include "alignment_test.h" + +#include "flatbuffers/flatbuffer_builder.h" +#include "alignment_test_generated.h" +#include "test_assert.h" + +namespace flatbuffers { +namespace tests { + +void AlignmentTest() { + FlatBufferBuilder builder; + + BadAlignmentLarge large; + Offset outer_large = CreateOuterLarge(builder, &large); + + BadAlignmentSmall *small; + Offset> small_offset = + builder.CreateUninitializedVectorOfStructs(9, &small); + (void)small; // We do not have to write data to trigger the test failure + + Offset root = + CreateBadAlignmentRoot(builder, outer_large, small_offset); + + builder.Finish(root); + + Verifier verifier(builder.GetBufferPointer(), builder.GetSize()); + TEST_ASSERT(VerifyBadAlignmentRootBuffer(verifier)); +} + +} // namespace tests +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/alignment_test.fbs b/third_party/flatbuffers/tests/alignment_test.fbs new file mode 100644 index 0000000000..3fc08bd7ff --- /dev/null +++ b/third_party/flatbuffers/tests/alignment_test.fbs @@ -0,0 +1,24 @@ +// sizeof(BadAlignmentSmall) == 12 +// alignof(BadAlignmentSmall) == 4 +struct BadAlignmentSmall { + var_0: uint; + var_1: uint; + var_2: uint; +} + +// sizeof(BadAlignmentLarge) == 8 +// alignof(BadAlignmentLarge) == 8 +struct BadAlignmentLarge { + var_0: ulong; +} + +table OuterLarge { + large: BadAlignmentLarge; +} + +table BadAlignmentRoot { + large: OuterLarge; + small: [BadAlignmentSmall]; +} + +root_type BadAlignmentRoot; diff --git a/third_party/flatbuffers/tests/alignment_test.h b/third_party/flatbuffers/tests/alignment_test.h new file mode 100644 index 0000000000..68cdf0bd82 --- /dev/null +++ b/third_party/flatbuffers/tests/alignment_test.h @@ -0,0 +1,12 @@ +#ifndef TESTS_ALIGNMENT_TEST_H +#define TESTS_ALIGNMENT_TEST_H + +namespace flatbuffers { +namespace tests { + +void AlignmentTest(); + +} // namespace tests +} // namespace flatbuffers + +#endif diff --git a/third_party/flatbuffers/tests/alignment_test_generated.h b/third_party/flatbuffers/tests/alignment_test_generated.h new file mode 100644 index 0000000000..44f615795d --- /dev/null +++ b/third_party/flatbuffers/tests/alignment_test_generated.h @@ -0,0 +1,497 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_ALIGNMENTTEST_H_ +#define FLATBUFFERS_GENERATED_ALIGNMENTTEST_H_ + +#include "flatbuffers/flatbuffers.h" + +// Ensure the included flatbuffers.h is the same version as when this file was +// generated, otherwise it may not be compatible. +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, + "Non-compatible flatbuffers version included"); + +struct BadAlignmentSmall; + +struct BadAlignmentLarge; + +struct OuterLarge; +struct OuterLargeBuilder; +struct OuterLargeT; + +struct BadAlignmentRoot; +struct BadAlignmentRootBuilder; +struct BadAlignmentRootT; + +bool operator==(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs); +bool operator!=(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs); +bool operator==(const BadAlignmentLarge &lhs, const BadAlignmentLarge &rhs); +bool operator!=(const BadAlignmentLarge &lhs, const BadAlignmentLarge &rhs); +bool operator==(const OuterLargeT &lhs, const OuterLargeT &rhs); +bool operator!=(const OuterLargeT &lhs, const OuterLargeT &rhs); +bool operator==(const BadAlignmentRootT &lhs, const BadAlignmentRootT &rhs); +bool operator!=(const BadAlignmentRootT &lhs, const BadAlignmentRootT &rhs); + +inline const flatbuffers::TypeTable *BadAlignmentSmallTypeTable(); + +inline const flatbuffers::TypeTable *BadAlignmentLargeTypeTable(); + +inline const flatbuffers::TypeTable *OuterLargeTypeTable(); + +inline const flatbuffers::TypeTable *BadAlignmentRootTypeTable(); + +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BadAlignmentSmall FLATBUFFERS_FINAL_CLASS { + private: + uint32_t var_0_; + uint32_t var_1_; + uint32_t var_2_; + + public: + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BadAlignmentSmallTypeTable(); + } + BadAlignmentSmall() + : var_0_(0), + var_1_(0), + var_2_(0) { + } + BadAlignmentSmall(uint32_t _var_0, uint32_t _var_1, uint32_t _var_2) + : var_0_(flatbuffers::EndianScalar(_var_0)), + var_1_(flatbuffers::EndianScalar(_var_1)), + var_2_(flatbuffers::EndianScalar(_var_2)) { + } + uint32_t var_0() const { + return flatbuffers::EndianScalar(var_0_); + } + void mutate_var_0(uint32_t _var_0) { + flatbuffers::WriteScalar(&var_0_, _var_0); + } + uint32_t var_1() const { + return flatbuffers::EndianScalar(var_1_); + } + void mutate_var_1(uint32_t _var_1) { + flatbuffers::WriteScalar(&var_1_, _var_1); + } + uint32_t var_2() const { + return flatbuffers::EndianScalar(var_2_); + } + void mutate_var_2(uint32_t _var_2) { + flatbuffers::WriteScalar(&var_2_, _var_2); + } +}; +FLATBUFFERS_STRUCT_END(BadAlignmentSmall, 12); + +inline bool operator==(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs) { + return + (lhs.var_0() == rhs.var_0()) && + (lhs.var_1() == rhs.var_1()) && + (lhs.var_2() == rhs.var_2()); +} + +inline bool operator!=(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs) { + return !(lhs == rhs); +} + + +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) BadAlignmentLarge FLATBUFFERS_FINAL_CLASS { + private: + uint64_t var_0_; + + public: + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BadAlignmentLargeTypeTable(); + } + BadAlignmentLarge() + : var_0_(0) { + } + BadAlignmentLarge(uint64_t _var_0) + : var_0_(flatbuffers::EndianScalar(_var_0)) { + } + uint64_t var_0() const { + return flatbuffers::EndianScalar(var_0_); + } + void mutate_var_0(uint64_t _var_0) { + flatbuffers::WriteScalar(&var_0_, _var_0); + } +}; +FLATBUFFERS_STRUCT_END(BadAlignmentLarge, 8); + +inline bool operator==(const BadAlignmentLarge &lhs, const BadAlignmentLarge &rhs) { + return + (lhs.var_0() == rhs.var_0()); +} + +inline bool operator!=(const BadAlignmentLarge &lhs, const BadAlignmentLarge &rhs) { + return !(lhs == rhs); +} + + +struct OuterLargeT : public flatbuffers::NativeTable { + typedef OuterLarge TableType; + flatbuffers::unique_ptr large{}; + OuterLargeT() = default; + OuterLargeT(const OuterLargeT &o); + OuterLargeT(OuterLargeT&&) FLATBUFFERS_NOEXCEPT = default; + OuterLargeT &operator=(OuterLargeT o) FLATBUFFERS_NOEXCEPT; +}; + +struct OuterLarge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OuterLargeT NativeTableType; + typedef OuterLargeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return OuterLargeTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_LARGE = 4 + }; + const BadAlignmentLarge *large() const { + return GetStruct(VT_LARGE); + } + BadAlignmentLarge *mutable_large() { + return GetStruct(VT_LARGE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_LARGE, 8) && + verifier.EndTable(); + } + OuterLargeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(OuterLargeT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OuterLargeT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct OuterLargeBuilder { + typedef OuterLarge Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_large(const BadAlignmentLarge *large) { + fbb_.AddStruct(OuterLarge::VT_LARGE, large); + } + explicit OuterLargeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateOuterLarge( + flatbuffers::FlatBufferBuilder &_fbb, + const BadAlignmentLarge *large = nullptr) { + OuterLargeBuilder builder_(_fbb); + builder_.add_large(large); + return builder_.Finish(); +} + +flatbuffers::Offset CreateOuterLarge(flatbuffers::FlatBufferBuilder &_fbb, const OuterLargeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BadAlignmentRootT : public flatbuffers::NativeTable { + typedef BadAlignmentRoot TableType; + flatbuffers::unique_ptr large{}; + std::vector small{}; + BadAlignmentRootT() = default; + BadAlignmentRootT(const BadAlignmentRootT &o); + BadAlignmentRootT(BadAlignmentRootT&&) FLATBUFFERS_NOEXCEPT = default; + BadAlignmentRootT &operator=(BadAlignmentRootT o) FLATBUFFERS_NOEXCEPT; +}; + +struct BadAlignmentRoot FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BadAlignmentRootT NativeTableType; + typedef BadAlignmentRootBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BadAlignmentRootTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_LARGE = 4, + VT_SMALL = 6 + }; + const OuterLarge *large() const { + return GetPointer(VT_LARGE); + } + OuterLarge *mutable_large() { + return GetPointer(VT_LARGE); + } + const flatbuffers::Vector *small() const { + return GetPointer *>(VT_SMALL); + } + flatbuffers::Vector *mutable_small() { + return GetPointer *>(VT_SMALL); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_LARGE) && + verifier.VerifyTable(large()) && + VerifyOffset(verifier, VT_SMALL) && + verifier.VerifyVector(small()) && + verifier.EndTable(); + } + BadAlignmentRootT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BadAlignmentRootT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BadAlignmentRootT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BadAlignmentRootBuilder { + typedef BadAlignmentRoot Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_large(flatbuffers::Offset large) { + fbb_.AddOffset(BadAlignmentRoot::VT_LARGE, large); + } + void add_small(flatbuffers::Offset> small) { + fbb_.AddOffset(BadAlignmentRoot::VT_SMALL, small); + } + explicit BadAlignmentRootBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBadAlignmentRoot( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset large = 0, + flatbuffers::Offset> small = 0) { + BadAlignmentRootBuilder builder_(_fbb); + builder_.add_small(small); + builder_.add_large(large); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateBadAlignmentRootDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset large = 0, + const std::vector *small = nullptr) { + auto small__ = small ? _fbb.CreateVectorOfStructs(*small) : 0; + return CreateBadAlignmentRoot( + _fbb, + large, + small__); +} + +flatbuffers::Offset CreateBadAlignmentRoot(flatbuffers::FlatBufferBuilder &_fbb, const BadAlignmentRootT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + +inline bool operator==(const OuterLargeT &lhs, const OuterLargeT &rhs) { + return + ((lhs.large == rhs.large) || (lhs.large && rhs.large && *lhs.large == *rhs.large)); +} + +inline bool operator!=(const OuterLargeT &lhs, const OuterLargeT &rhs) { + return !(lhs == rhs); +} + + +inline OuterLargeT::OuterLargeT(const OuterLargeT &o) + : large((o.large) ? new BadAlignmentLarge(*o.large) : nullptr) { +} + +inline OuterLargeT &OuterLargeT::operator=(OuterLargeT o) FLATBUFFERS_NOEXCEPT { + std::swap(large, o.large); + return *this; +} + +inline OuterLargeT *OuterLarge::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new OuterLargeT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void OuterLarge::UnPackTo(OuterLargeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = large(); if (_e) _o->large = flatbuffers::unique_ptr(new BadAlignmentLarge(*_e)); } +} + +inline flatbuffers::Offset OuterLarge::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OuterLargeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateOuterLarge(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateOuterLarge(flatbuffers::FlatBufferBuilder &_fbb, const OuterLargeT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const OuterLargeT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _large = _o->large ? _o->large.get() : nullptr; + return CreateOuterLarge( + _fbb, + _large); +} + + +inline bool operator==(const BadAlignmentRootT &lhs, const BadAlignmentRootT &rhs) { + return + ((lhs.large == rhs.large) || (lhs.large && rhs.large && *lhs.large == *rhs.large)) && + (lhs.small == rhs.small); +} + +inline bool operator!=(const BadAlignmentRootT &lhs, const BadAlignmentRootT &rhs) { + return !(lhs == rhs); +} + + +inline BadAlignmentRootT::BadAlignmentRootT(const BadAlignmentRootT &o) + : large((o.large) ? new OuterLargeT(*o.large) : nullptr), + small(o.small) { +} + +inline BadAlignmentRootT &BadAlignmentRootT::operator=(BadAlignmentRootT o) FLATBUFFERS_NOEXCEPT { + std::swap(large, o.large); + std::swap(small, o.small); + return *this; +} + +inline BadAlignmentRootT *BadAlignmentRoot::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new BadAlignmentRootT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void BadAlignmentRoot::UnPackTo(BadAlignmentRootT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = large(); if (_e) { if(_o->large) { _e->UnPackTo(_o->large.get(), _resolver); } else { _o->large = flatbuffers::unique_ptr(_e->UnPack(_resolver)); } } else if (_o->large) { _o->large.reset(); } } + { auto _e = small(); if (_e) { _o->small.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->small[_i] = *_e->Get(_i); } } else { _o->small.resize(0); } } +} + +inline flatbuffers::Offset BadAlignmentRoot::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BadAlignmentRootT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateBadAlignmentRoot(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateBadAlignmentRoot(flatbuffers::FlatBufferBuilder &_fbb, const BadAlignmentRootT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BadAlignmentRootT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _large = _o->large ? CreateOuterLarge(_fbb, _o->large.get(), _rehasher) : 0; + auto _small = _o->small.size() ? _fbb.CreateVectorOfStructs(_o->small) : 0; + return CreateBadAlignmentRoot( + _fbb, + _large, + _small); +} + +inline const flatbuffers::TypeTable *BadAlignmentSmallTypeTable() { + static const flatbuffers::TypeCode type_codes[] = { + { flatbuffers::ET_UINT, 0, -1 }, + { flatbuffers::ET_UINT, 0, -1 }, + { flatbuffers::ET_UINT, 0, -1 } + }; + static const int64_t values[] = { 0, 4, 8, 12 }; + static const char * const names[] = { + "var_0", + "var_1", + "var_2" + }; + static const flatbuffers::TypeTable tt = { + flatbuffers::ST_STRUCT, 3, type_codes, nullptr, nullptr, values, names + }; + return &tt; +} + +inline const flatbuffers::TypeTable *BadAlignmentLargeTypeTable() { + static const flatbuffers::TypeCode type_codes[] = { + { flatbuffers::ET_ULONG, 0, -1 } + }; + static const int64_t values[] = { 0, 8 }; + static const char * const names[] = { + "var_0" + }; + static const flatbuffers::TypeTable tt = { + flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names + }; + return &tt; +} + +inline const flatbuffers::TypeTable *OuterLargeTypeTable() { + static const flatbuffers::TypeCode type_codes[] = { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { + BadAlignmentLargeTypeTable + }; + static const char * const names[] = { + "large" + }; + static const flatbuffers::TypeTable tt = { + flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; +} + +inline const flatbuffers::TypeTable *BadAlignmentRootTypeTable() { + static const flatbuffers::TypeCode type_codes[] = { + { flatbuffers::ET_SEQUENCE, 0, 0 }, + { flatbuffers::ET_SEQUENCE, 1, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { + OuterLargeTypeTable, + BadAlignmentSmallTypeTable + }; + static const char * const names[] = { + "large", + "small" + }; + static const flatbuffers::TypeTable tt = { + flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; +} + +inline const BadAlignmentRoot *GetBadAlignmentRoot(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const BadAlignmentRoot *GetSizePrefixedBadAlignmentRoot(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline BadAlignmentRoot *GetMutableBadAlignmentRoot(void *buf) { + return flatbuffers::GetMutableRoot(buf); +} + +inline BadAlignmentRoot *GetMutableSizePrefixedBadAlignmentRoot(void *buf) { + return flatbuffers::GetMutableSizePrefixedRoot(buf); +} + +inline bool VerifyBadAlignmentRootBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedBadAlignmentRootBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishBadAlignmentRootBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedBadAlignmentRootBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +inline flatbuffers::unique_ptr UnPackBadAlignmentRoot( + const void *buf, + const flatbuffers::resolver_function_t *res = nullptr) { + return flatbuffers::unique_ptr(GetBadAlignmentRoot(buf)->UnPack(res)); +} + +inline flatbuffers::unique_ptr UnPackSizePrefixedBadAlignmentRoot( + const void *buf, + const flatbuffers::resolver_function_t *res = nullptr) { + return flatbuffers::unique_ptr(GetSizePrefixedBadAlignmentRoot(buf)->UnPack(res)); +} + +#endif // FLATBUFFERS_GENERATED_ALIGNMENTTEST_H_ diff --git a/third_party/flatbuffers/tests/arrays_test/my_game/example/array_struct_generated.rs b/third_party/flatbuffers/tests/arrays_test/my_game/example/array_struct_generated.rs index bf416960bf..31e1f9ccc8 100644 --- a/third_party/flatbuffers/tests/arrays_test/my_game/example/array_struct_generated.rs +++ b/third_party/flatbuffers/tests/arrays_test/my_game/example/array_struct_generated.rs @@ -32,39 +32,25 @@ impl core::fmt::Debug for ArrayStruct { } impl flatbuffers::SimpleToVerifyInSlice for ArrayStruct {} -impl flatbuffers::SafeSliceAccess for ArrayStruct {} impl<'a> flatbuffers::Follow<'a> for ArrayStruct { type Inner = &'a ArrayStruct; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a ArrayStruct>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a ArrayStruct { type Inner = &'a ArrayStruct; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for ArrayStruct { type Output = ArrayStruct; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const ArrayStruct as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b ArrayStruct { - type Output = ArrayStruct; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const ArrayStruct as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const ArrayStruct as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -104,64 +90,88 @@ impl<'a> ArrayStruct { } pub fn a(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn b(&'a self) -> flatbuffers::Array<'a, i32, 15> { - flatbuffers::Array::follow(&self.0, 4) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 4) } } pub fn set_b(&mut self, items: &[i32; 15]) { - flatbuffers::emplace_scalar_array(&mut self.0, 4, items); + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 4, items) }; } pub fn c(&self) -> i8 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[64..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_c(&mut self, x: i8) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i8 as *const u8, + &x_le as *const _ as *const u8, self.0[64..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn d(&'a self) -> flatbuffers::Array<'a, NestedStruct, 2> { - flatbuffers::Array::follow(&self.0, 72) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 72) } } pub fn set_d(&mut self, x: &[NestedStruct; 2]) { + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot unsafe { core::ptr::copy( x.as_ptr() as *const u8, @@ -172,34 +182,46 @@ impl<'a> ArrayStruct { } pub fn e(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[136..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_e(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[136..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn f(&'a self) -> flatbuffers::Array<'a, i64, 2> { - flatbuffers::Array::follow(&self.0, 144) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 144) } } pub fn set_f(&mut self, items: &[i64; 2]) { - flatbuffers::emplace_scalar_array(&mut self.0, 144, items); + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 144, items) }; } pub fn unpack(&self) -> ArrayStructT { diff --git a/third_party/flatbuffers/tests/arrays_test/my_game/example/array_table_generated.rs b/third_party/flatbuffers/tests/arrays_test/my_game/example/array_table_generated.rs index bc78fc1a17..a9b51cd058 100644 --- a/third_party/flatbuffers/tests/arrays_test/my_game/example/array_table_generated.rs +++ b/third_party/flatbuffers/tests/arrays_test/my_game/example/array_table_generated.rs @@ -19,8 +19,8 @@ pub struct ArrayTable<'a> { impl<'a> flatbuffers::Follow<'a> for ArrayTable<'a> { type Inner = ArrayTable<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> ArrayTable<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ArrayTable { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> ArrayTable<'a> { #[inline] pub fn a(&self) -> Option<&'a ArrayStruct> { - self._tab.get::(ArrayTable::VT_A, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ArrayTable::VT_A, None)} } } @@ -139,18 +142,6 @@ impl ArrayTableT { }) } } -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_root_as_array_table<'a>(buf: &'a [u8]) -> ArrayTable<'a> { - unsafe { flatbuffers::root_unchecked::>(buf) } -} - -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_size_prefixed_root_as_array_table<'a>(buf: &'a [u8]) -> ArrayTable<'a> { - unsafe { flatbuffers::size_prefixed_root_unchecked::>(buf) } -} - #[inline] /// Verifies that a buffer of bytes contains a `ArrayTable` /// and returns it. diff --git a/third_party/flatbuffers/tests/arrays_test/my_game/example/nested_struct_generated.rs b/third_party/flatbuffers/tests/arrays_test/my_game/example/nested_struct_generated.rs index 337affc586..0f1f54467e 100644 --- a/third_party/flatbuffers/tests/arrays_test/my_game/example/nested_struct_generated.rs +++ b/third_party/flatbuffers/tests/arrays_test/my_game/example/nested_struct_generated.rs @@ -30,39 +30,25 @@ impl core::fmt::Debug for NestedStruct { } impl flatbuffers::SimpleToVerifyInSlice for NestedStruct {} -impl flatbuffers::SafeSliceAccess for NestedStruct {} impl<'a> flatbuffers::Follow<'a> for NestedStruct { type Inner = &'a NestedStruct; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a NestedStruct>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a NestedStruct { type Inner = &'a NestedStruct; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for NestedStruct { type Output = NestedStruct; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const NestedStruct as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b NestedStruct { - type Output = NestedStruct; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const NestedStruct as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const NestedStruct as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -98,41 +84,59 @@ impl<'a> NestedStruct { } pub fn a(&'a self) -> flatbuffers::Array<'a, i32, 2> { - flatbuffers::Array::follow(&self.0, 0) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 0) } } pub fn set_a(&mut self, items: &[i32; 2]) { - flatbuffers::emplace_scalar_array(&mut self.0, 0, items); + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 0, items) }; } pub fn b(&self) -> TestEnum { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[8..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_b(&mut self, x: TestEnum) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const TestEnum as *const u8, + &x_le as *const _ as *const u8, self.0[8..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn c(&'a self) -> flatbuffers::Array<'a, TestEnum, 2> { - flatbuffers::Array::follow(&self.0, 9) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 9) } } pub fn set_c(&mut self, x: &[TestEnum; 2]) { + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot unsafe { core::ptr::copy( x.as_ptr() as *const u8, @@ -143,11 +147,17 @@ impl<'a> NestedStruct { } pub fn d(&'a self) -> flatbuffers::Array<'a, i64, 2> { - flatbuffers::Array::follow(&self.0, 16) + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::Array::follow(&self.0, 16) } } pub fn set_d(&mut self, items: &[i64; 2]) { - flatbuffers::emplace_scalar_array(&mut self.0, 16, items); + // Safety: + // Created from a valid Table for this object + // Which contains a valid array in this slot + unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 16, items) }; } pub fn unpack(&self) -> NestedStructT { diff --git a/third_party/flatbuffers/tests/arrays_test/my_game/example/test_enum_generated.rs b/third_party/flatbuffers/tests/arrays_test/my_game/example/test_enum_generated.rs index 5252133c68..6721484ae2 100644 --- a/third_party/flatbuffers/tests/arrays_test/my_game/example/test_enum_generated.rs +++ b/third_party/flatbuffers/tests/arrays_test/my_game/example/test_enum_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for TestEnum { impl<'a> flatbuffers::Follow<'a> for TestEnum { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for TestEnum { impl flatbuffers::Push for TestEnum { type Output = TestEnum; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for TestEnum { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/arrays_test_generated.h b/third_party/flatbuffers/tests/arrays_test_generated.h index 090f4648ad..5ba5a9879a 100644 --- a/third_party/flatbuffers/tests/arrays_test_generated.h +++ b/third_party/flatbuffers/tests/arrays_test_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { diff --git a/third_party/flatbuffers/tests/cpp17/generated_cpp17/monster_test_generated.h b/third_party/flatbuffers/tests/cpp17/generated_cpp17/monster_test_generated.h index be27b45d54..2fdeeac128 100644 --- a/third_party/flatbuffers/tests/cpp17/generated_cpp17/monster_test_generated.h +++ b/third_party/flatbuffers/tests/cpp17/generated_cpp17/monster_test_generated.h @@ -10,9 +10,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -1321,6 +1321,14 @@ struct MonsterT : public flatbuffers::NativeTable { MyGame::Example::Test native_inline{}; MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0); MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum::LongOne; + float nan_default = std::numeric_limits::quiet_NaN(); + float inf_default = std::numeric_limits::infinity(); + float positive_inf_default = std::numeric_limits::infinity(); + float infinity_default = std::numeric_limits::infinity(); + float positive_infinity_default = std::numeric_limits::infinity(); + float negative_inf_default = -std::numeric_limits::infinity(); + float negative_infinity_default = -std::numeric_limits::infinity(); + double double_inf_default = std::numeric_limits::infinity(); MonsterT() = default; MonsterT(const MonsterT &o); MonsterT(MonsterT&&) FLATBUFFERS_NOEXCEPT = default; @@ -1388,7 +1396,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_SCALAR_KEY_SORTED_TABLES = 104, VT_NATIVE_INLINE = 106, VT_LONG_ENUM_NON_ENUM_DEFAULT = 108, - VT_LONG_ENUM_NORMAL_DEFAULT = 110 + VT_LONG_ENUM_NORMAL_DEFAULT = 110, + VT_NAN_DEFAULT = 112, + VT_INF_DEFAULT = 114, + VT_POSITIVE_INF_DEFAULT = 116, + VT_INFINITY_DEFAULT = 118, + VT_POSITIVE_INFINITY_DEFAULT = 120, + VT_NEGATIVE_INF_DEFAULT = 122, + VT_NEGATIVE_INFINITY_DEFAULT = 124, + VT_DOUBLE_INF_DEFAULT = 126 }; const MyGame::Example::Vec3 *pos() const { return GetStruct(VT_POS); @@ -1745,6 +1761,54 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool mutate_long_enum_normal_default(MyGame::Example::LongEnum _long_enum_normal_default = static_cast(2ULL)) { return SetField(VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(_long_enum_normal_default), 2ULL); } + float nan_default() const { + return GetField(VT_NAN_DEFAULT, std::numeric_limits::quiet_NaN()); + } + bool mutate_nan_default(float _nan_default = std::numeric_limits::quiet_NaN()) { + return SetField(VT_NAN_DEFAULT, _nan_default, std::numeric_limits::quiet_NaN()); + } + float inf_default() const { + return GetField(VT_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_inf_default(float _inf_default = std::numeric_limits::infinity()) { + return SetField(VT_INF_DEFAULT, _inf_default, std::numeric_limits::infinity()); + } + float positive_inf_default() const { + return GetField(VT_POSITIVE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_inf_default(float _positive_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INF_DEFAULT, _positive_inf_default, std::numeric_limits::infinity()); + } + float infinity_default() const { + return GetField(VT_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_infinity_default(float _infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_INFINITY_DEFAULT, _infinity_default, std::numeric_limits::infinity()); + } + float positive_infinity_default() const { + return GetField(VT_POSITIVE_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_infinity_default(float _positive_infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INFINITY_DEFAULT, _positive_infinity_default, std::numeric_limits::infinity()); + } + float negative_inf_default() const { + return GetField(VT_NEGATIVE_INF_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_inf_default(float _negative_inf_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INF_DEFAULT, _negative_inf_default, -std::numeric_limits::infinity()); + } + float negative_infinity_default() const { + return GetField(VT_NEGATIVE_INFINITY_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_infinity_default(float _negative_infinity_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INFINITY_DEFAULT, _negative_infinity_default, -std::numeric_limits::infinity()); + } + double double_inf_default() const { + return GetField(VT_DOUBLE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_double_inf_default(double _double_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_DOUBLE_INF_DEFAULT, _double_inf_default, std::numeric_limits::infinity()); + } template auto get_field() const { if constexpr (Index == 0) return pos(); @@ -1800,6 +1864,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { else if constexpr (Index == 50) return native_inline(); else if constexpr (Index == 51) return long_enum_non_enum_default(); else if constexpr (Index == 52) return long_enum_normal_default(); + else if constexpr (Index == 53) return nan_default(); + else if constexpr (Index == 54) return inf_default(); + else if constexpr (Index == 55) return positive_inf_default(); + else if constexpr (Index == 56) return infinity_default(); + else if constexpr (Index == 57) return positive_infinity_default(); + else if constexpr (Index == 58) return negative_inf_default(); + else if constexpr (Index == 59) return negative_infinity_default(); + else if constexpr (Index == 60) return double_inf_default(); else static_assert(Index != Index, "Invalid Field Index"); } bool Verify(flatbuffers::Verifier &verifier) const { @@ -1893,6 +1965,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_NATIVE_INLINE, 2) && VerifyField(verifier, VT_LONG_ENUM_NON_ENUM_DEFAULT, 8) && VerifyField(verifier, VT_LONG_ENUM_NORMAL_DEFAULT, 8) && + VerifyField(verifier, VT_NAN_DEFAULT, 4) && + VerifyField(verifier, VT_INF_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_DOUBLE_INF_DEFAULT, 8) && verifier.EndTable(); } MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -2087,6 +2167,30 @@ struct MonsterBuilder { void add_long_enum_normal_default(MyGame::Example::LongEnum long_enum_normal_default) { fbb_.AddElement(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(long_enum_normal_default), 2ULL); } + void add_nan_default(float nan_default) { + fbb_.AddElement(Monster::VT_NAN_DEFAULT, nan_default, std::numeric_limits::quiet_NaN()); + } + void add_inf_default(float inf_default) { + fbb_.AddElement(Monster::VT_INF_DEFAULT, inf_default, std::numeric_limits::infinity()); + } + void add_positive_inf_default(float positive_inf_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, std::numeric_limits::infinity()); + } + void add_infinity_default(float infinity_default) { + fbb_.AddElement(Monster::VT_INFINITY_DEFAULT, infinity_default, std::numeric_limits::infinity()); + } + void add_positive_infinity_default(float positive_infinity_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, std::numeric_limits::infinity()); + } + void add_negative_inf_default(float negative_inf_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, -std::numeric_limits::infinity()); + } + void add_negative_infinity_default(float negative_infinity_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, -std::numeric_limits::infinity()); + } + void add_double_inf_default(double double_inf_default) { + fbb_.AddElement(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, std::numeric_limits::infinity()); + } explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -2153,8 +2257,17 @@ inline flatbuffers::Offset CreateMonster( flatbuffers::Offset>> scalar_key_sorted_tables = 0, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum::LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum::LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { MonsterBuilder builder_(_fbb); + builder_.add_double_inf_default(double_inf_default); builder_.add_long_enum_normal_default(long_enum_normal_default); builder_.add_long_enum_non_enum_default(long_enum_non_enum_default); builder_.add_non_owning_reference(non_owning_reference); @@ -2164,6 +2277,13 @@ inline flatbuffers::Offset CreateMonster( builder_.add_testhashs64_fnv1a(testhashs64_fnv1a); builder_.add_testhashu64_fnv1(testhashu64_fnv1); builder_.add_testhashs64_fnv1(testhashs64_fnv1); + builder_.add_negative_infinity_default(negative_infinity_default); + builder_.add_negative_inf_default(negative_inf_default); + builder_.add_positive_infinity_default(positive_infinity_default); + builder_.add_infinity_default(infinity_default); + builder_.add_positive_inf_default(positive_inf_default); + builder_.add_inf_default(inf_default); + builder_.add_nan_default(nan_default); builder_.add_native_inline(native_inline); builder_.add_scalar_key_sorted_tables(scalar_key_sorted_tables); builder_.add_testrequirednestedflatbuffer(testrequirednestedflatbuffer); @@ -2216,7 +2336,7 @@ struct Monster::Traits { static auto constexpr Create = CreateMonster; static constexpr auto name = "Monster"; static constexpr auto fully_qualified_name = "MyGame.Example.Monster"; - static constexpr size_t fields_number = 53; + static constexpr size_t fields_number = 61; static constexpr std::array field_names = { "pos", "mana", @@ -2270,7 +2390,15 @@ struct Monster::Traits { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; template using FieldType = decltype(std::declval().get_field()); @@ -2330,7 +2458,15 @@ inline flatbuffers::Offset CreateMonsterDirect( std::vector> *scalar_key_sorted_tables = nullptr, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum::LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum::LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { auto name__ = name ? _fbb.CreateString(name) : 0; auto inventory__ = inventory ? _fbb.CreateVector(*inventory) : 0; auto test4__ = test4 ? _fbb.CreateVectorOfStructs(*test4) : 0; @@ -2406,7 +2542,15 @@ inline flatbuffers::Offset CreateMonsterDirect( scalar_key_sorted_tables__, native_inline, long_enum_non_enum_default, - long_enum_normal_default); + long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default); } flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); @@ -2881,7 +3025,15 @@ inline MonsterT::MonsterT(const MonsterT &o) testrequirednestedflatbuffer(o.testrequirednestedflatbuffer), native_inline(o.native_inline), long_enum_non_enum_default(o.long_enum_non_enum_default), - long_enum_normal_default(o.long_enum_normal_default) { + long_enum_normal_default(o.long_enum_normal_default), + nan_default(o.nan_default), + inf_default(o.inf_default), + positive_inf_default(o.positive_inf_default), + infinity_default(o.infinity_default), + positive_infinity_default(o.positive_infinity_default), + negative_inf_default(o.negative_inf_default), + negative_infinity_default(o.negative_infinity_default), + double_inf_default(o.double_inf_default) { testarrayoftables.reserve(o.testarrayoftables.size()); for (const auto &testarrayoftables_ : o.testarrayoftables) { testarrayoftables.emplace_back((testarrayoftables_) ? new MyGame::Example::MonsterT(*testarrayoftables_) : nullptr); } vector_of_referrables.reserve(o.vector_of_referrables.size()); @@ -2945,6 +3097,14 @@ inline MonsterT &MonsterT::operator=(MonsterT o) FLATBUFFERS_NOEXCEPT { std::swap(native_inline, o.native_inline); std::swap(long_enum_non_enum_default, o.long_enum_non_enum_default); std::swap(long_enum_normal_default, o.long_enum_normal_default); + std::swap(nan_default, o.nan_default); + std::swap(inf_default, o.inf_default); + std::swap(positive_inf_default, o.positive_inf_default); + std::swap(infinity_default, o.infinity_default); + std::swap(positive_infinity_default, o.positive_infinity_default); + std::swap(negative_inf_default, o.negative_inf_default); + std::swap(negative_infinity_default, o.negative_infinity_default); + std::swap(double_inf_default, o.double_inf_default); return *this; } @@ -3010,6 +3170,14 @@ inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function { auto _e = native_inline(); if (_e) _o->native_inline = *_e; } { auto _e = long_enum_non_enum_default(); _o->long_enum_non_enum_default = _e; } { auto _e = long_enum_normal_default(); _o->long_enum_normal_default = _e; } + { auto _e = nan_default(); _o->nan_default = _e; } + { auto _e = inf_default(); _o->inf_default = _e; } + { auto _e = positive_inf_default(); _o->positive_inf_default = _e; } + { auto _e = infinity_default(); _o->infinity_default = _e; } + { auto _e = positive_infinity_default(); _o->positive_infinity_default = _e; } + { auto _e = negative_inf_default(); _o->negative_inf_default = _e; } + { auto _e = negative_infinity_default(); _o->negative_infinity_default = _e; } + { auto _e = double_inf_default(); _o->double_inf_default = _e; } } inline flatbuffers::Offset Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) { @@ -3073,6 +3241,14 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder auto _native_inline = &_o->native_inline; auto _long_enum_non_enum_default = _o->long_enum_non_enum_default; auto _long_enum_normal_default = _o->long_enum_normal_default; + auto _nan_default = _o->nan_default; + auto _inf_default = _o->inf_default; + auto _positive_inf_default = _o->positive_inf_default; + auto _infinity_default = _o->infinity_default; + auto _positive_infinity_default = _o->positive_infinity_default; + auto _negative_inf_default = _o->negative_inf_default; + auto _negative_infinity_default = _o->negative_infinity_default; + auto _double_inf_default = _o->double_inf_default; return MyGame::Example::CreateMonster( _fbb, _pos, @@ -3127,7 +3303,15 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder _scalar_key_sorted_tables, _native_inline, _long_enum_non_enum_default, - _long_enum_normal_default); + _long_enum_normal_default, + _nan_default, + _inf_default, + _positive_inf_default, + _infinity_default, + _positive_infinity_default, + _negative_inf_default, + _negative_infinity_default, + _double_inf_default); } inline TypeAliasesT *TypeAliases::UnPack(const flatbuffers::resolver_function_t *_resolver) const { @@ -3885,7 +4069,15 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { { flatbuffers::ET_SEQUENCE, 1, 5 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_ULONG, 0, 12 }, - { flatbuffers::ET_ULONG, 0, 12 } + { flatbuffers::ET_ULONG, 0, 12 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_DOUBLE, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { MyGame::Example::Vec3TypeTable, @@ -3956,10 +4148,18 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; static const flatbuffers::TypeTable tt = { - flatbuffers::ST_TABLE, 54, type_codes, type_refs, nullptr, nullptr, names + flatbuffers::ST_TABLE, 62, type_codes, type_refs, nullptr, nullptr, names }; return &tt; } diff --git a/third_party/flatbuffers/tests/cpp17/generated_cpp17/optional_scalars_generated.h b/third_party/flatbuffers/tests/cpp17/generated_cpp17/optional_scalars_generated.h index b4b0625ba0..09711d3992 100644 --- a/third_party/flatbuffers/tests/cpp17/generated_cpp17/optional_scalars_generated.h +++ b/third_party/flatbuffers/tests/cpp17/generated_cpp17/optional_scalars_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace optional_scalars { diff --git a/third_party/flatbuffers/tests/cpp17/generated_cpp17/union_vector_generated.h b/third_party/flatbuffers/tests/cpp17/generated_cpp17/union_vector_generated.h index 5d45644e3a..07d866921d 100644 --- a/third_party/flatbuffers/tests/cpp17/generated_cpp17/union_vector_generated.h +++ b/third_party/flatbuffers/tests/cpp17/generated_cpp17/union_vector_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); struct Attacker; diff --git a/third_party/flatbuffers/tests/cpp17/test_cpp17.cpp b/third_party/flatbuffers/tests/cpp17/test_cpp17.cpp index cfba2b6b73..6c1929120e 100644 --- a/third_party/flatbuffers/tests/cpp17/test_cpp17.cpp +++ b/third_party/flatbuffers/tests/cpp17/test_cpp17.cpp @@ -148,6 +148,14 @@ void StringifyAnyFlatbuffersTypeTest() { signed_enum = -1 long_enum_non_enum_default = 0 long_enum_normal_default = 2 + nan_default = nan + inf_default = inf + positive_inf_default = inf + infinity_default = inf + positive_infinity_default = inf + negative_inf_default = -inf + negative_infinity_default = -inf + double_inf_default = inf })"; // Call a generic function that has no specific knowledge of the flatbuffer we diff --git a/third_party/flatbuffers/tests/evolution_test.cpp b/third_party/flatbuffers/tests/evolution_test.cpp index da0fd743cf..e7404d4218 100644 --- a/third_party/flatbuffers/tests/evolution_test.cpp +++ b/third_party/flatbuffers/tests/evolution_test.cpp @@ -98,6 +98,8 @@ void ConformTest() { test_conform(parser, "table T { B:float; }", "field renamed to different type"); test_conform(parser, "enum E:byte { B, A }", "values differ for enum"); + test_conform(parser, "table T { }", "field deleted"); + test_conform(parser, "table T { B:int; }", ""); //renaming a field is allowed } void UnionDeprecationTest(const std::string& tests_data_path) { diff --git a/third_party/flatbuffers/tests/evolution_test/evolution_v1_generated.h b/third_party/flatbuffers/tests/evolution_test/evolution_v1_generated.h index 31370d8761..560fc40618 100644 --- a/third_party/flatbuffers/tests/evolution_test/evolution_v1_generated.h +++ b/third_party/flatbuffers/tests/evolution_test/evolution_v1_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace Evolution { diff --git a/third_party/flatbuffers/tests/evolution_test/evolution_v2_generated.h b/third_party/flatbuffers/tests/evolution_test/evolution_v2_generated.h index 20d019c457..881596ffc3 100644 --- a/third_party/flatbuffers/tests/evolution_test/evolution_v2_generated.h +++ b/third_party/flatbuffers/tests/evolution_test/evolution_v2_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace Evolution { diff --git a/third_party/flatbuffers/tests/flatc/enum_val_attributes.fbs b/third_party/flatbuffers/tests/flatc/enum_val_attributes.fbs new file mode 100644 index 0000000000..33b67d7f22 --- /dev/null +++ b/third_party/flatbuffers/tests/flatc/enum_val_attributes.fbs @@ -0,0 +1,8 @@ +attribute display_name; + +enum ValAttributes : int +{ + Val1 = 0 (display_name: "Value 1"), + Val2 (display_name: "Value 2"), + Val3 (deprecated, display_name: "Value 3 (deprecated)"), +} \ No newline at end of file diff --git a/third_party/flatbuffers/tests/flatc/flatc_schema_tests.py b/third_party/flatbuffers/tests/flatc/flatc_schema_tests.py new file mode 100644 index 0000000000..e79bb3ce36 --- /dev/null +++ b/third_party/flatbuffers/tests/flatc/flatc_schema_tests.py @@ -0,0 +1,43 @@ +# Copyright 2022 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flatc_test import * +import json + + +class SchemaTests: + def EnumValAttributes(self): + # Generate .bfbs schema first + flatc(["--schema", "--binary", "--bfbs-builtins", "enum_val_attributes.fbs"]) + assert_file_exists("enum_val_attributes.bfbs") + + # Then turn it into JSON + flatc(["--json", "--strict-json", str(reflection_fbs_path()), "--", "enum_val_attributes.bfbs"]) + + # The attributes should be present in JSON + schema_json = json.loads(get_file_contents("enum_val_attributes.json")) + + assert schema_json["enums"][0]["name"] == "ValAttributes" + assert schema_json["enums"][0]["values"][0]["name"] == "Val1" + assert schema_json["enums"][0]["values"][0]["attributes"][0]["key"] == "display_name" + assert schema_json["enums"][0]["values"][0]["attributes"][0]["value"] == "Value 1" + + assert schema_json["enums"][0]["values"][1]["name"] == "Val2" + assert schema_json["enums"][0]["values"][1]["attributes"][0]["key"] == "display_name" + assert schema_json["enums"][0]["values"][1]["attributes"][0]["value"] == "Value 2" + + assert schema_json["enums"][0]["values"][2]["name"] == "Val3" + assert schema_json["enums"][0]["values"][2]["attributes"][0]["key"] == "deprecated" + assert schema_json["enums"][0]["values"][2]["attributes"][1]["key"] == "display_name" + assert schema_json["enums"][0]["values"][2]["attributes"][1]["value"] == "Value 3 (deprecated)" diff --git a/third_party/flatbuffers/tests/flatc/flatc_test.py b/third_party/flatbuffers/tests/flatc/flatc_test.py index fcc32c6c27..2e51743e30 100755 --- a/third_party/flatbuffers/tests/flatc/flatc_test.py +++ b/third_party/flatbuffers/tests/flatc/flatc_test.py @@ -51,6 +51,10 @@ def flatc(options, cwd=script_path): subprocess.check_call(cmd, cwd=str(cwd)) +def reflection_fbs_path(): + return Path(root_path).joinpath("reflection", "reflection.fbs") + + def make_absolute(filename, path=script_path): return str(Path(path, filename).absolute()) @@ -67,6 +71,14 @@ def assert_file_doesnt_exists(filename, path=script_path): return file +def get_file_contents(filename, path=script_path): + file = Path(path, filename) + contents = "" + with open(file) as file: + contents = file.read() + return contents + + def assert_file_contains(file, needles): with open(file) as file: contents = file.read() diff --git a/third_party/flatbuffers/tests/flatc/main.py b/third_party/flatbuffers/tests/flatc/main.py index 1b6bee90d7..3bc231848a 100755 --- a/third_party/flatbuffers/tests/flatc/main.py +++ b/third_party/flatbuffers/tests/flatc/main.py @@ -19,8 +19,9 @@ from flatc_test import run_all from flatc_cpp_tests import CppTests from flatc_ts_tests import TsTests +from flatc_schema_tests import SchemaTests -passing, failing = run_all(CppTests, TsTests) +passing, failing = run_all(CppTests, TsTests, SchemaTests) print("") print("{0} of {1} tests passed".format(passing, passing + failing)) diff --git a/third_party/flatbuffers/tests/flexbuffers_test.cpp b/third_party/flatbuffers/tests/flexbuffers_test.cpp index 1b34f85820..b8da8ed70d 100644 --- a/third_party/flatbuffers/tests/flexbuffers_test.cpp +++ b/third_party/flatbuffers/tests/flexbuffers_test.cpp @@ -1,3 +1,5 @@ +#include + #include "flexbuffers_test.h" #include "flatbuffers/flexbuffers.h" @@ -289,4 +291,4 @@ void ParseFlexbuffersFromJsonWithNullTest() { } } // namespace tests -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/fuzz_test.cpp b/third_party/flatbuffers/tests/fuzz_test.cpp index 66883faaa1..060742466c 100644 --- a/third_party/flatbuffers/tests/fuzz_test.cpp +++ b/third_party/flatbuffers/tests/fuzz_test.cpp @@ -1,3 +1,5 @@ +#include + #include "fuzz_test.h" #include "flatbuffers/flatbuffers.h" @@ -302,4 +304,4 @@ void FuzzTest2() { } } // namespace tests -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/go_test.go b/third_party/flatbuffers/tests/go_test.go index 8cb7b97f36..a04ef2c9b1 100644 --- a/third_party/flatbuffers/tests/go_test.go +++ b/third_party/flatbuffers/tests/go_test.go @@ -533,6 +533,14 @@ func CheckObjectAPI(buf []byte, offset flatbuffers.UOffsetT, sizePrefix bool, fa fail(FailString("mana", 150, got)) } + if monster.Test != nil && monster.Test.Type == example.AnyMonster { + monster.Test.Value.(*example.MonsterT).NanDefault = 0.0 + } + if monster.Enemy != nil { + monster.Enemy.NanDefault = 0.0 + } + monster.NanDefault = 0.0 + builder := flatbuffers.NewBuilder(0) builder.Finish(monster.Pack(builder)) monster2 := example.GetRootAsMonster(builder.FinishedBytes(), 0).UnPack() diff --git a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/from_include_generated.rs b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/from_include_generated.rs index 3c5165d17e..70cb407c1e 100644 --- a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/from_include_generated.rs +++ b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/from_include_generated.rs @@ -51,10 +51,8 @@ impl core::fmt::Debug for FromInclude { impl<'a> flatbuffers::Follow<'a> for FromInclude { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -62,21 +60,21 @@ impl<'a> flatbuffers::Follow<'a> for FromInclude { impl flatbuffers::Push for FromInclude { type Output = FromInclude; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for FromInclude { + type Scalar = i64; #[inline] - fn to_little_endian(self) -> Self { - let b = i64::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i64 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i64::from_le(self.0); + fn from_little_endian(v: i64) -> Self { + let b = i64::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/table_b_generated.rs b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/table_b_generated.rs index da7b9378b0..5652195b5f 100644 --- a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/table_b_generated.rs +++ b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/table_b_generated.rs @@ -19,8 +19,8 @@ pub struct TableB<'a> { impl<'a> flatbuffers::Follow<'a> for TableB<'a> { type Inner = TableB<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableB<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableB { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableB<'a> { #[inline] pub fn a(&self) -> Option> { - self._tab.get::>(TableB::VT_A, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableB::VT_A, None)} } } diff --git a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/unused_generated.rs b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/unused_generated.rs index 1e4ad9c7bb..69be4869ee 100644 --- a/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/unused_generated.rs +++ b/third_party/flatbuffers/tests/include_test1/my_game/other_name_space/unused_generated.rs @@ -27,39 +27,25 @@ impl core::fmt::Debug for Unused { } impl flatbuffers::SimpleToVerifyInSlice for Unused {} -impl flatbuffers::SafeSliceAccess for Unused {} impl<'a> flatbuffers::Follow<'a> for Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Unused>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Unused { type Output = Unused; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Unused { - type Output = Unused; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Unused as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -89,24 +75,30 @@ impl<'a> Unused { } pub fn a(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/include_test1/table_a_generated.rs b/third_party/flatbuffers/tests/include_test1/table_a_generated.rs index 0e6a78de14..fd979b092d 100644 --- a/third_party/flatbuffers/tests/include_test1/table_a_generated.rs +++ b/third_party/flatbuffers/tests/include_test1/table_a_generated.rs @@ -19,8 +19,8 @@ pub struct TableA<'a> { impl<'a> flatbuffers::Follow<'a> for TableA<'a> { type Inner = TableA<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableA<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableA { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableA<'a> { #[inline] pub fn b(&self) -> Option> { - self._tab.get::>(TableA::VT_B, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableA::VT_B, None)} } } diff --git a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/from_include_generated.rs b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/from_include_generated.rs index 3c5165d17e..70cb407c1e 100644 --- a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/from_include_generated.rs +++ b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/from_include_generated.rs @@ -51,10 +51,8 @@ impl core::fmt::Debug for FromInclude { impl<'a> flatbuffers::Follow<'a> for FromInclude { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -62,21 +60,21 @@ impl<'a> flatbuffers::Follow<'a> for FromInclude { impl flatbuffers::Push for FromInclude { type Output = FromInclude; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for FromInclude { + type Scalar = i64; #[inline] - fn to_little_endian(self) -> Self { - let b = i64::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i64 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i64::from_le(self.0); + fn from_little_endian(v: i64) -> Self { + let b = i64::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/table_b_generated.rs b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/table_b_generated.rs index da7b9378b0..5652195b5f 100644 --- a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/table_b_generated.rs +++ b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/table_b_generated.rs @@ -19,8 +19,8 @@ pub struct TableB<'a> { impl<'a> flatbuffers::Follow<'a> for TableB<'a> { type Inner = TableB<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableB<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableB { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableB<'a> { #[inline] pub fn a(&self) -> Option> { - self._tab.get::>(TableB::VT_A, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableB::VT_A, None)} } } diff --git a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/unused_generated.rs b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/unused_generated.rs index 1e4ad9c7bb..69be4869ee 100644 --- a/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/unused_generated.rs +++ b/third_party/flatbuffers/tests/include_test2/my_game/other_name_space/unused_generated.rs @@ -27,39 +27,25 @@ impl core::fmt::Debug for Unused { } impl flatbuffers::SimpleToVerifyInSlice for Unused {} -impl flatbuffers::SafeSliceAccess for Unused {} impl<'a> flatbuffers::Follow<'a> for Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Unused>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Unused { type Output = Unused; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Unused { - type Output = Unused; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Unused as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -89,24 +75,30 @@ impl<'a> Unused { } pub fn a(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/include_test2/table_a_generated.rs b/third_party/flatbuffers/tests/include_test2/table_a_generated.rs index 0e6a78de14..fd979b092d 100644 --- a/third_party/flatbuffers/tests/include_test2/table_a_generated.rs +++ b/third_party/flatbuffers/tests/include_test2/table_a_generated.rs @@ -19,8 +19,8 @@ pub struct TableA<'a> { impl<'a> flatbuffers::Follow<'a> for TableA<'a> { type Inner = TableA<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableA<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableA { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableA<'a> { #[inline] pub fn b(&self) -> Option> { - self._tab.get::>(TableA::VT_B, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableA::VT_B, None)} } } diff --git a/third_party/flatbuffers/tests/keyword_test/keyword_test/abc_generated.rs b/third_party/flatbuffers/tests/keyword_test/keyword_test/abc_generated.rs index 823b883b78..5169ab13da 100644 --- a/third_party/flatbuffers/tests/keyword_test/keyword_test/abc_generated.rs +++ b/third_party/flatbuffers/tests/keyword_test/keyword_test/abc_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for ABC { impl<'a> flatbuffers::Follow<'a> for ABC { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for ABC { impl flatbuffers::Push for ABC { type Output = ABC; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for ABC { + type Scalar = i32; #[inline] - fn to_little_endian(self) -> Self { - let b = i32::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i32 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i32::from_le(self.0); + fn from_little_endian(v: i32) -> Self { + let b = i32::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_table_generated.rs b/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_table_generated.rs index 74ddfba0af..4dd30dc947 100644 --- a/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_table_generated.rs +++ b/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_table_generated.rs @@ -19,8 +19,8 @@ pub struct KeywordsInTable<'a> { impl<'a> flatbuffers::Follow<'a> for KeywordsInTable<'a> { type Inner = KeywordsInTable<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -35,7 +35,7 @@ impl<'a> KeywordsInTable<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { KeywordsInTable { _tab: table } } #[allow(unused_mut)] @@ -66,19 +66,31 @@ impl<'a> KeywordsInTable<'a> { #[inline] pub fn is(&self) -> ABC { - self._tab.get::(KeywordsInTable::VT_IS, Some(ABC::void)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(KeywordsInTable::VT_IS, Some(ABC::void)).unwrap()} } #[inline] pub fn private(&self) -> public { - self._tab.get::(KeywordsInTable::VT_PRIVATE, Some(public::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(KeywordsInTable::VT_PRIVATE, Some(public::NONE)).unwrap()} } #[inline] pub fn type_(&self) -> i32 { - self._tab.get::(KeywordsInTable::VT_TYPE_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(KeywordsInTable::VT_TYPE_, Some(0)).unwrap()} } #[inline] pub fn default(&self) -> bool { - self._tab.get::(KeywordsInTable::VT_DEFAULT, Some(false)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(KeywordsInTable::VT_DEFAULT, Some(false)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_union_generated.rs b/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_union_generated.rs index 78d8cd79c9..ba9fcd3a63 100644 --- a/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_union_generated.rs +++ b/third_party/flatbuffers/tests/keyword_test/keyword_test/keywords_in_union_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for KeywordsInUnion { impl<'a> flatbuffers::Follow<'a> for KeywordsInUnion { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for KeywordsInUnion { impl flatbuffers::Push for KeywordsInUnion { type Output = KeywordsInUnion; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for KeywordsInUnion { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/keyword_test/keyword_test/public_generated.rs b/third_party/flatbuffers/tests/keyword_test/keyword_test/public_generated.rs index 76c6ed00c9..12c3ff5793 100644 --- a/third_party/flatbuffers/tests/keyword_test/keyword_test/public_generated.rs +++ b/third_party/flatbuffers/tests/keyword_test/keyword_test/public_generated.rs @@ -51,10 +51,8 @@ impl core::fmt::Debug for public { impl<'a> flatbuffers::Follow<'a> for public { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -62,21 +60,21 @@ impl<'a> flatbuffers::Follow<'a> for public { impl flatbuffers::Push for public { type Output = public; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for public { + type Scalar = i32; #[inline] - fn to_little_endian(self) -> Self { - let b = i32::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i32 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i32::from_le(self.0); + fn from_little_endian(v: i32) -> Self { + let b = i32::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_extra_generated.h b/third_party/flatbuffers/tests/monster_extra_generated.h index b224677a97..895249e79d 100644 --- a/third_party/flatbuffers/tests/monster_extra_generated.h +++ b/third_party/flatbuffers/tests/monster_extra_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { diff --git a/third_party/flatbuffers/tests/monster_test.afb b/third_party/flatbuffers/tests/monster_test.afb index b98933a78b..b77de7b77c 100644 --- a/third_party/flatbuffers/tests/monster_test.afb +++ b/third_party/flatbuffers/tests/monster_test.afb @@ -58,21 +58,21 @@ vector (reflection.Schema.enums): vector (reflection.Schema.objects): +0x0078 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of vector (# items) - +0x007C | 9C 31 00 00 | UOffset32 | 0x0000319C (12700) Loc: +0x3218 | offset to table[0] + +0x007C | 54 35 00 00 | UOffset32 | 0x00003554 (13652) Loc: +0x35D0 | offset to table[0] +0x0080 | 50 0E 00 00 | UOffset32 | 0x00000E50 (3664) Loc: +0x0ED0 | offset to table[1] - +0x0084 | E8 2D 00 00 | UOffset32 | 0x00002DE8 (11752) Loc: +0x2E6C | offset to table[2] - +0x0088 | C4 2E 00 00 | UOffset32 | 0x00002EC4 (11972) Loc: +0x2F4C | offset to table[3] - +0x008C | 64 30 00 00 | UOffset32 | 0x00003064 (12388) Loc: +0x30F0 | offset to table[4] - +0x0090 | D8 2F 00 00 | UOffset32 | 0x00002FD8 (12248) Loc: +0x3068 | offset to table[5] - +0x0094 | A0 35 00 00 | UOffset32 | 0x000035A0 (13728) Loc: +0x3634 | offset to table[6] - +0x0098 | 80 34 00 00 | UOffset32 | 0x00003480 (13440) Loc: +0x3518 | offset to table[7] + +0x0084 | A0 31 00 00 | UOffset32 | 0x000031A0 (12704) Loc: +0x3224 | offset to table[2] + +0x0088 | 7C 32 00 00 | UOffset32 | 0x0000327C (12924) Loc: +0x3304 | offset to table[3] + +0x008C | 1C 34 00 00 | UOffset32 | 0x0000341C (13340) Loc: +0x34A8 | offset to table[4] + +0x0090 | 90 33 00 00 | UOffset32 | 0x00003390 (13200) Loc: +0x3420 | offset to table[5] + +0x0094 | 58 39 00 00 | UOffset32 | 0x00003958 (14680) Loc: +0x39EC | offset to table[6] + +0x0098 | 38 38 00 00 | UOffset32 | 0x00003838 (14392) Loc: +0x38D0 | offset to table[7] +0x009C | 70 0B 00 00 | UOffset32 | 0x00000B70 (2928) Loc: +0x0C0C | offset to table[8] - +0x00A0 | 78 32 00 00 | UOffset32 | 0x00003278 (12920) Loc: +0x3318 | offset to table[9] - +0x00A4 | 68 36 00 00 | UOffset32 | 0x00003668 (13928) Loc: +0x370C | offset to table[10] - +0x00A8 | A0 36 00 00 | UOffset32 | 0x000036A0 (13984) Loc: +0x3748 | offset to table[11] - +0x00AC | 90 37 00 00 | UOffset32 | 0x00003790 (14224) Loc: +0x383C | offset to table[12] - +0x00B0 | 44 38 00 00 | UOffset32 | 0x00003844 (14404) Loc: +0x38F4 | offset to table[13] - +0x00B4 | EC 36 00 00 | UOffset32 | 0x000036EC (14060) Loc: +0x37A0 | offset to table[14] + +0x00A0 | 30 36 00 00 | UOffset32 | 0x00003630 (13872) Loc: +0x36D0 | offset to table[9] + +0x00A4 | 20 3A 00 00 | UOffset32 | 0x00003A20 (14880) Loc: +0x3AC4 | offset to table[10] + +0x00A8 | 58 3A 00 00 | UOffset32 | 0x00003A58 (14936) Loc: +0x3B00 | offset to table[11] + +0x00AC | 48 3B 00 00 | UOffset32 | 0x00003B48 (15176) Loc: +0x3BF4 | offset to table[12] + +0x00B0 | FC 3B 00 00 | UOffset32 | 0x00003BFC (15356) Loc: +0x3CAC | offset to table[13] + +0x00B4 | A4 3A 00 00 | UOffset32 | 0x00003AA4 (15012) Loc: +0x3B58 | offset to table[14] vector (reflection.Schema.fbs_files): +0x00B8 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) @@ -81,43 +81,43 @@ vector (reflection.Schema.fbs_files): +0x00C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x00C8 | offset to table[2] table (reflection.SchemaFile): - +0x00C8 | 64 CB FF FF | SOffset32 | 0xFFFFCB64 (-13468) Loc: +0x3564 | offset to vtable - +0x00CC | 94 36 00 00 | UOffset32 | 0x00003694 (13972) Loc: +0x3760 | offset to field `key` (string) + +0x00C8 | AC C7 FF FF | SOffset32 | 0xFFFFC7AC (-14420) Loc: +0x391C | offset to vtable + +0x00CC | 4C 3A 00 00 | UOffset32 | 0x00003A4C (14924) Loc: +0x3B18 | offset to field `key` (string) +0x00D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x00D4 | offset to field `value` (string) string (reflection.SchemaFile.value): +0x00D4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x00D8 | E0 | char[1] | à | string literal - +0x00D9 | 36 | char | 0x36 (54) | string terminator + +0x00D8 | 98 | char[1] | ˜ | string literal + +0x00D9 | 3A | char | 0x3A (58) | string terminator padding: +0x00DA | 00 00 | uint8_t[2] | .. | padding table (reflection.SchemaFile): - +0x00DC | 78 CB FF FF | SOffset32 | 0xFFFFCB78 (-13448) Loc: +0x3564 | offset to vtable - +0x00E0 | 34 38 00 00 | UOffset32 | 0x00003834 (14388) Loc: +0x3914 | offset to field `key` (string) + +0x00DC | C0 C7 FF FF | SOffset32 | 0xFFFFC7C0 (-14400) Loc: +0x391C | offset to vtable + +0x00E0 | EC 3B 00 00 | UOffset32 | 0x00003BEC (15340) Loc: +0x3CCC | offset to field `key` (string) +0x00E4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x00E8 | offset to field `value` (string) string (reflection.SchemaFile.value): +0x00E8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x00EC | CC 36 | char[2] | Ì6 | string literal + +0x00EC | 84 3A | char[2] | „: | string literal +0x00EE | 00 | char | 0x00 (0) | string terminator unknown (no known references): - +0x00EF | 00 24 38 00 00 | ?uint8_t[5] | .$8.. | WARN: could be corrupted padding region. + +0x00EF | 00 DC 3B 00 00 | ?uint8_t[5] | ..;.. | WARN: could be corrupted padding region. table (reflection.SchemaFile): - +0x00F4 | 90 CB FF FF | SOffset32 | 0xFFFFCB90 (-13424) Loc: +0x3564 | offset to vtable - +0x00F8 | C0 36 00 00 | UOffset32 | 0x000036C0 (14016) Loc: +0x37B8 | offset to field `key` (string) + +0x00F4 | D8 C7 FF FF | SOffset32 | 0xFFFFC7D8 (-14376) Loc: +0x391C | offset to vtable + +0x00F8 | 78 3A 00 00 | UOffset32 | 0x00003A78 (14968) Loc: +0x3B70 | offset to field `key` (string) +0x00FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0100 | offset to field `value` (string) string (reflection.SchemaFile.value): +0x0100 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x0104 | B4 36 | char[2] | ´6 | string literal + +0x0104 | 6C 3A | char[2] | l: | string literal +0x0106 | 00 | char | 0x00 (0) | string terminator unknown (no known references): - +0x0107 | 00 0C 38 00 00 00 00 | ?uint8_t[7] | ..8.... | WARN: could be corrupted padding region. + +0x0107 | 00 C4 3B 00 00 00 00 | ?uint8_t[7] | ..;.... | WARN: could be corrupted padding region. vtable (reflection.Service): +0x010E | 0E 00 | uint16_t | 0x000E (14) | size of this vtable @@ -133,7 +133,7 @@ table (reflection.Service): +0x0120 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x0148 | offset to field `name` (string) +0x0124 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0134 | offset to field `calls` (vector) +0x0128 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0130 | offset to field `documentation` (vector) - +0x012C | 34 36 00 00 | UOffset32 | 0x00003634 (13876) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x012C | EC 39 00 00 | UOffset32 | 0x000039EC (14828) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Service.documentation): +0x0130 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) @@ -160,7 +160,7 @@ table (reflection.RPCCall): +0x016C | BA FE FF FF | SOffset32 | 0xFFFFFEBA (-326) Loc: +0x02B2 | offset to vtable +0x0170 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x01B8 | offset to field `name` (string) +0x0174 | 5C 0D 00 00 | UOffset32 | 0x00000D5C (3420) Loc: +0x0ED0 | offset to field `request` (table) - +0x0178 | D4 2D 00 00 | UOffset32 | 0x00002DD4 (11732) Loc: +0x2F4C | offset to field `response` (table) + +0x0178 | 8C 31 00 00 | UOffset32 | 0x0000318C (12684) Loc: +0x3304 | offset to field `response` (table) +0x017C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x0188 | offset to field `attributes` (vector) +0x0180 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0184 | offset to field `documentation` (vector) @@ -172,7 +172,7 @@ vector (reflection.RPCCall.attributes): +0x018C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0190 | offset to table[0] table (reflection.KeyValue): - +0x0190 | 2C CC FF FF | SOffset32 | 0xFFFFCC2C (-13268) Loc: +0x3564 | offset to vtable + +0x0190 | 74 C8 FF FF | SOffset32 | 0xFFFFC874 (-14220) Loc: +0x391C | offset to vtable +0x0194 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x01A8 | offset to field `key` (string) +0x0198 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x019C | offset to field `value` (string) @@ -204,7 +204,7 @@ table (reflection.RPCCall): +0x01D0 | 1E FF FF FF | SOffset32 | 0xFFFFFF1E (-226) Loc: +0x02B2 | offset to vtable +0x01D4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x021C | offset to field `name` (string) +0x01D8 | F8 0C 00 00 | UOffset32 | 0x00000CF8 (3320) Loc: +0x0ED0 | offset to field `request` (table) - +0x01DC | 70 2D 00 00 | UOffset32 | 0x00002D70 (11632) Loc: +0x2F4C | offset to field `response` (table) + +0x01DC | 28 31 00 00 | UOffset32 | 0x00003128 (12584) Loc: +0x3304 | offset to field `response` (table) +0x01E0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x01EC | offset to field `attributes` (vector) +0x01E4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x01E8 | offset to field `documentation` (vector) @@ -216,7 +216,7 @@ vector (reflection.RPCCall.attributes): +0x01F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x01F4 | offset to table[0] table (reflection.KeyValue): - +0x01F4 | 90 CC FF FF | SOffset32 | 0xFFFFCC90 (-13168) Loc: +0x3564 | offset to vtable + +0x01F4 | D8 C8 FF FF | SOffset32 | 0xFFFFC8D8 (-14120) Loc: +0x391C | offset to vtable +0x01F8 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x020C | offset to field `key` (string) +0x01FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0200 | offset to field `value` (string) @@ -243,7 +243,7 @@ string (reflection.RPCCall.name): table (reflection.RPCCall): +0x0230 | 7E FF FF FF | SOffset32 | 0xFFFFFF7E (-130) Loc: +0x02B2 | offset to vtable +0x0234 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x02A4 | offset to field `name` (string) - +0x0238 | 14 2D 00 00 | UOffset32 | 0x00002D14 (11540) Loc: +0x2F4C | offset to field `request` (table) + +0x0238 | CC 30 00 00 | UOffset32 | 0x000030CC (12492) Loc: +0x3304 | offset to field `request` (table) +0x023C | 94 0C 00 00 | UOffset32 | 0x00000C94 (3220) Loc: +0x0ED0 | offset to field `response` (table) +0x0240 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x024C | offset to field `attributes` (vector) +0x0244 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0248 | offset to field `documentation` (vector) @@ -257,7 +257,7 @@ vector (reflection.RPCCall.attributes): +0x0254 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0258 | offset to table[1] table (reflection.KeyValue): - +0x0258 | F4 CC FF FF | SOffset32 | 0xFFFFCCF4 (-13068) Loc: +0x3564 | offset to vtable + +0x0258 | 3C C9 FF FF | SOffset32 | 0xFFFFC93C (-14020) Loc: +0x391C | offset to vtable +0x025C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x0270 | offset to field `key` (string) +0x0260 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0264 | offset to field `value` (string) @@ -276,7 +276,7 @@ padding: +0x027E | 00 00 | uint8_t[2] | .. | padding table (reflection.KeyValue): - +0x0280 | 1C CD FF FF | SOffset32 | 0xFFFFCD1C (-13028) Loc: +0x3564 | offset to vtable + +0x0280 | 64 C9 FF FF | SOffset32 | 0xFFFFC964 (-13980) Loc: +0x391C | offset to vtable +0x0284 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0294 | offset to field `key` (string) +0x0288 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x028C | offset to field `value` (string) @@ -312,7 +312,7 @@ table (reflection.RPCCall): +0x02C0 | 0E 00 00 00 | SOffset32 | 0x0000000E (14) Loc: +0x02B2 | offset to vtable +0x02C4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x030C | offset to field `name` (string) +0x02C8 | 08 0C 00 00 | UOffset32 | 0x00000C08 (3080) Loc: +0x0ED0 | offset to field `request` (table) - +0x02CC | 80 2C 00 00 | UOffset32 | 0x00002C80 (11392) Loc: +0x2F4C | offset to field `response` (table) + +0x02CC | 38 30 00 00 | UOffset32 | 0x00003038 (12344) Loc: +0x3304 | offset to field `response` (table) +0x02D0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x02DC | offset to field `attributes` (vector) +0x02D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x02D8 | offset to field `documentation` (vector) @@ -324,7 +324,7 @@ vector (reflection.RPCCall.attributes): +0x02E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x02E4 | offset to table[0] table (reflection.KeyValue): - +0x02E4 | 80 CD FF FF | SOffset32 | 0xFFFFCD80 (-12928) Loc: +0x3564 | offset to vtable + +0x02E4 | C8 C9 FF FF | SOffset32 | 0xFFFFC9C8 (-13880) Loc: +0x391C | offset to vtable +0x02E8 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x02FC | offset to field `key` (string) +0x02EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x02F0 | offset to field `value` (string) @@ -361,13 +361,13 @@ table (reflection.Enum): +0x0324 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x034C | offset to field `values` (vector) +0x0328 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0338 | offset to field `underlying_type` (table) +0x032C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0334 | offset to field `documentation` (vector) - +0x0330 | 30 34 00 00 | UOffset32 | 0x00003430 (13360) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0330 | E8 37 00 00 | UOffset32 | 0x000037E8 (14312) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0334 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0338 | 34 CD FF FF | SOffset32 | 0xFFFFCD34 (-13004) Loc: +0x3604 | offset to vtable + +0x0338 | 7C C9 FF FF | SOffset32 | 0xFFFFC97C (-13956) Loc: +0x39BC | offset to vtable +0x033C | 00 00 00 | uint8_t[3] | ... | padding +0x033F | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) +0x0340 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -402,7 +402,7 @@ vector (reflection.EnumVal.documentation): +0x03A4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x03A8 | F0 CA FF FF | SOffset32 | 0xFFFFCAF0 (-13584) Loc: +0x38B8 | offset to vtable + +0x03A8 | 38 C7 FF FF | SOffset32 | 0xFFFFC738 (-14536) Loc: +0x3C70 | offset to vtable +0x03AC | 00 00 00 | uint8_t[3] | ... | padding +0x03AF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x03B0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -425,7 +425,7 @@ vector (reflection.EnumVal.documentation): +0x03DC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x03E0 | 28 CB FF FF | SOffset32 | 0xFFFFCB28 (-13528) Loc: +0x38B8 | offset to vtable + +0x03E0 | 70 C7 FF FF | SOffset32 | 0xFFFFC770 (-14480) Loc: +0x3C70 | offset to vtable +0x03E4 | 00 00 00 | uint8_t[3] | ... | padding +0x03E7 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x03E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -448,7 +448,7 @@ vector (reflection.EnumVal.documentation): +0x0414 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0418 | 60 CB FF FF | SOffset32 | 0xFFFFCB60 (-13472) Loc: +0x38B8 | offset to vtable + +0x0418 | A8 C7 FF FF | SOffset32 | 0xFFFFC7A8 (-14424) Loc: +0x3C70 | offset to vtable +0x041C | 00 00 00 | uint8_t[3] | ... | padding +0x041F | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x0420 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -489,13 +489,13 @@ table (reflection.Enum): +0x0468 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x0490 | offset to field `values` (vector) +0x046C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x047C | offset to field `underlying_type` (table) +0x0470 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0478 | offset to field `documentation` (vector) - +0x0474 | EC 32 00 00 | UOffset32 | 0x000032EC (13036) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0474 | A4 36 00 00 | UOffset32 | 0x000036A4 (13988) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0478 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x047C | 78 CE FF FF | SOffset32 | 0xFFFFCE78 (-12680) Loc: +0x3604 | offset to vtable + +0x047C | C0 CA FF FF | SOffset32 | 0xFFFFCAC0 (-13632) Loc: +0x39BC | offset to vtable +0x0480 | 00 00 00 | uint8_t[3] | ... | padding +0x0483 | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) +0x0484 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) @@ -529,7 +529,7 @@ vector (reflection.EnumVal.documentation): +0x04E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x04E8 | 30 CC FF FF | SOffset32 | 0xFFFFCC30 (-13264) Loc: +0x38B8 | offset to vtable + +0x04E8 | 78 C8 FF FF | SOffset32 | 0xFFFFC878 (-14216) Loc: +0x3C70 | offset to vtable +0x04EC | 00 00 00 | uint8_t[3] | ... | padding +0x04EF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x04F0 | 0A 00 00 00 | uint32_t | 0x0000000A (10) | table field `index` (Int) @@ -552,7 +552,7 @@ vector (reflection.EnumVal.documentation): +0x051C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0520 | 68 CC FF FF | SOffset32 | 0xFFFFCC68 (-13208) Loc: +0x38B8 | offset to vtable + +0x0520 | B0 C8 FF FF | SOffset32 | 0xFFFFC8B0 (-14160) Loc: +0x3C70 | offset to vtable +0x0524 | 00 00 00 | uint8_t[3] | ... | padding +0x0527 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x0528 | 07 00 00 00 | uint32_t | 0x00000007 (7) | table field `index` (Int) @@ -574,7 +574,7 @@ vector (reflection.EnumVal.documentation): +0x0550 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0554 | 9C CC FF FF | SOffset32 | 0xFFFFCC9C (-13156) Loc: +0x38B8 | offset to vtable + +0x0554 | E4 C8 FF FF | SOffset32 | 0xFFFFC8E4 (-14108) Loc: +0x3C70 | offset to vtable +0x0558 | 00 00 00 | uint8_t[3] | ... | padding +0x055B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x055C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -626,13 +626,13 @@ table (reflection.Enum): +0x05B4 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x05DC | offset to field `values` (vector) +0x05B8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x05C8 | offset to field `underlying_type` (table) +0x05BC | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x05C4 | offset to field `documentation` (vector) - +0x05C0 | A0 31 00 00 | UOffset32 | 0x000031A0 (12704) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x05C0 | 58 35 00 00 | UOffset32 | 0x00003558 (13656) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x05C4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x05C8 | C4 CF FF FF | SOffset32 | 0xFFFFCFC4 (-12348) Loc: +0x3604 | offset to vtable + +0x05C8 | 0C CC FF FF | SOffset32 | 0xFFFFCC0C (-13300) Loc: +0x39BC | offset to vtable +0x05CC | 00 00 00 | uint8_t[3] | ... | padding +0x05CF | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) +0x05D0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) @@ -664,7 +664,7 @@ vector (reflection.EnumVal.documentation): +0x0620 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0624 | 6C CD FF FF | SOffset32 | 0xFFFFCD6C (-12948) Loc: +0x38B8 | offset to vtable + +0x0624 | B4 C9 FF FF | SOffset32 | 0xFFFFC9B4 (-13900) Loc: +0x3C70 | offset to vtable +0x0628 | 00 00 00 | uint8_t[3] | ... | padding +0x062B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x062C | 0A 00 00 00 | uint32_t | 0x0000000A (10) | table field `index` (Int) @@ -688,7 +688,7 @@ vector (reflection.EnumVal.documentation): +0x0668 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x066C | B4 CD FF FF | SOffset32 | 0xFFFFCDB4 (-12876) Loc: +0x38B8 | offset to vtable + +0x066C | FC C9 FF FF | SOffset32 | 0xFFFFC9FC (-13828) Loc: +0x3C70 | offset to vtable +0x0670 | 00 00 00 | uint8_t[3] | ... | padding +0x0673 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x0674 | 07 00 00 00 | uint32_t | 0x00000007 (7) | table field `index` (Int) @@ -712,7 +712,7 @@ vector (reflection.EnumVal.documentation): +0x06B0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x06B4 | FC CD FF FF | SOffset32 | 0xFFFFCDFC (-12804) Loc: +0x38B8 | offset to vtable + +0x06B4 | 44 CA FF FF | SOffset32 | 0xFFFFCA44 (-13756) Loc: +0x3C70 | offset to vtable +0x06B8 | 00 00 00 | uint8_t[3] | ... | padding +0x06BB | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) +0x06BC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) @@ -752,7 +752,7 @@ table (reflection.Enum): +0x0708 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x0748 | offset to field `underlying_type` (table) +0x070C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x071C | offset to field `attributes` (vector) +0x0710 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0718 | offset to field `documentation` (vector) - +0x0714 | 4C 30 00 00 | UOffset32 | 0x0000304C (12364) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0714 | 04 34 00 00 | UOffset32 | 0x00003404 (13316) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0718 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) @@ -762,7 +762,7 @@ vector (reflection.Enum.attributes): +0x0720 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0724 | offset to table[0] table (reflection.KeyValue): - +0x0724 | C0 D1 FF FF | SOffset32 | 0xFFFFD1C0 (-11840) Loc: +0x3564 | offset to vtable + +0x0724 | 08 CE FF FF | SOffset32 | 0xFFFFCE08 (-12792) Loc: +0x391C | offset to vtable +0x0728 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0738 | offset to field `key` (string) +0x072C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0730 | offset to field `value` (string) @@ -784,7 +784,7 @@ padding: +0x0746 | 00 00 | uint8_t[2] | .. | padding table (reflection.Type): - +0x0748 | 44 D1 FF FF | SOffset32 | 0xFFFFD144 (-11964) Loc: +0x3604 | offset to vtable + +0x0748 | 8C CD FF FF | SOffset32 | 0xFFFFCD8C (-12916) Loc: +0x39BC | offset to vtable +0x074C | 00 00 00 | uint8_t[3] | ... | padding +0x074F | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) +0x0750 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) @@ -872,13 +872,13 @@ table (reflection.Enum): +0x0834 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x085C | offset to field `values` (vector) +0x0838 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0848 | offset to field `underlying_type` (table) +0x083C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0844 | offset to field `documentation` (vector) - +0x0840 | 20 2F 00 00 | UOffset32 | 0x00002F20 (12064) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0840 | D8 32 00 00 | UOffset32 | 0x000032D8 (13016) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0844 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0848 | 44 D2 FF FF | SOffset32 | 0xFFFFD244 (-11708) Loc: +0x3604 | offset to vtable + +0x0848 | 8C CE FF FF | SOffset32 | 0xFFFFCE8C (-12660) Loc: +0x39BC | offset to vtable +0x084C | 00 00 00 | uint8_t[3] | ... | padding +0x084F | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) +0x0850 | 05 00 00 00 | uint32_t | 0x00000005 (5) | table field `index` (Int) @@ -1009,7 +1009,7 @@ table (reflection.Enum): +0x0978 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x09E8 | offset to field `underlying_type` (table) +0x097C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x09BC | offset to field `attributes` (vector) +0x0980 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0988 | offset to field `documentation` (vector) - +0x0984 | DC 2D 00 00 | UOffset32 | 0x00002DDC (11740) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0984 | 94 31 00 00 | UOffset32 | 0x00003194 (12692) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0988 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) @@ -1029,7 +1029,7 @@ vector (reflection.Enum.attributes): +0x09C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x09C4 | offset to table[0] table (reflection.KeyValue): - +0x09C4 | 60 D4 FF FF | SOffset32 | 0xFFFFD460 (-11168) Loc: +0x3564 | offset to vtable + +0x09C4 | A8 D0 FF FF | SOffset32 | 0xFFFFD0A8 (-12120) Loc: +0x391C | offset to vtable +0x09C8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x09D8 | offset to field `key` (string) +0x09CC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x09D0 | offset to field `value` (string) @@ -1051,7 +1051,7 @@ padding: +0x09E6 | 00 00 | uint8_t[2] | .. | padding table (reflection.Type): - +0x09E8 | E4 D3 FF FF | SOffset32 | 0xFFFFD3E4 (-11292) Loc: +0x3604 | offset to vtable + +0x09E8 | 2C D0 FF FF | SOffset32 | 0xFFFFD02C (-12244) Loc: +0x39BC | offset to vtable +0x09EC | 00 00 00 | uint8_t[3] | ... | padding +0x09EF | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) +0x09F0 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) @@ -1199,13 +1199,13 @@ table (reflection.Enum): +0x0B68 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x0B90 | offset to field `values` (vector) +0x0B6C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0B7C | offset to field `underlying_type` (table) +0x0B70 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0B78 | offset to field `documentation` (vector) - +0x0B74 | A0 2D 00 00 | UOffset32 | 0x00002DA0 (11680) Loc: +0x3914 | offset to field `declaration_file` (string) + +0x0B74 | 58 31 00 00 | UOffset32 | 0x00003158 (12632) Loc: +0x3CCC | offset to field `declaration_file` (string) vector (reflection.Enum.documentation): +0x0B78 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0B7C | 78 D5 FF FF | SOffset32 | 0xFFFFD578 (-10888) Loc: +0x3604 | offset to vtable + +0x0B7C | C0 D1 FF FF | SOffset32 | 0xFFFFD1C0 (-11840) Loc: +0x39BC | offset to vtable +0x0B80 | 00 00 00 | uint8_t[3] | ... | padding +0x0B83 | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) +0x0B84 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) @@ -1265,12 +1265,12 @@ string (reflection.EnumVal.name): +0x0C0A | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x0C0C | E4 D3 FF FF | SOffset32 | 0xFFFFD3E4 (-11292) Loc: +0x3828 | offset to vtable + +0x0C0C | 2C D0 FF FF | SOffset32 | 0xFFFFD02C (-12244) Loc: +0x3BE0 | offset to vtable +0x0C10 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x0C5C | offset to field `name` (string) +0x0C14 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x0C28 | offset to field `fields` (vector) +0x0C18 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) +0x0C1C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0C24 | offset to field `documentation` (vector) - +0x0C20 | 40 2B 00 00 | UOffset32 | 0x00002B40 (11072) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0C20 | F8 2E 00 00 | UOffset32 | 0x00002EF8 (12024) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): +0x0C24 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) @@ -1299,7 +1299,7 @@ string (reflection.Object.name): +0x0C7A | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0C7C | 00 DB FF FF | SOffset32 | 0xFFFFDB00 (-9472) Loc: +0x317C | offset to vtable + +0x0C7C | 48 D7 FF FF | SOffset32 | 0xFFFFD748 (-10424) Loc: +0x3534 | offset to vtable +0x0C80 | 00 00 00 | uint8_t[3] | ... | padding +0x0C83 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) +0x0C84 | 0B 00 | uint16_t | 0x000B (11) | table field `id` (UShort) @@ -1312,7 +1312,7 @@ vector (reflection.Field.documentation): +0x0C94 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0C98 | 14 E1 FF FF | SOffset32 | 0xFFFFE114 (-7916) Loc: +0x2B84 | offset to vtable + +0x0C98 | 5C DD FF FF | SOffset32 | 0xFFFFDD5C (-8868) Loc: +0x2F3C | offset to vtable +0x0C9C | 00 00 | uint8_t[2] | .. | padding +0x0C9E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) +0x0C9F | 0C | uint8_t | 0x0C (12) | table field `element` (Byte) @@ -1327,7 +1327,7 @@ padding: +0x0CAD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x0CB0 | 34 DB FF FF | SOffset32 | 0xFFFFDB34 (-9420) Loc: +0x317C | offset to vtable + +0x0CB0 | 7C D7 FF FF | SOffset32 | 0xFFFFD77C (-10372) Loc: +0x3534 | offset to vtable +0x0CB4 | 00 00 00 | uint8_t[3] | ... | padding +0x0CB7 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) +0x0CB8 | 0A 00 | uint16_t | 0x000A (10) | table field `id` (UShort) @@ -1340,7 +1340,7 @@ vector (reflection.Field.documentation): +0x0CC8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0CCC | 48 E1 FF FF | SOffset32 | 0xFFFFE148 (-7864) Loc: +0x2B84 | offset to vtable + +0x0CCC | 90 DD FF FF | SOffset32 | 0xFFFFDD90 (-8816) Loc: +0x2F3C | offset to vtable +0x0CD0 | 00 00 | uint8_t[2] | .. | padding +0x0CD2 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) +0x0CD3 | 03 | uint8_t | 0x03 (3) | table field `element` (Byte) @@ -1352,7 +1352,7 @@ string (reflection.Field.name): +0x0CDE | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0CE0 | 4A D8 FF FF | SOffset32 | 0xFFFFD84A (-10166) Loc: +0x3496 | offset to vtable + +0x0CE0 | 92 D4 FF FF | SOffset32 | 0xFFFFD492 (-11118) Loc: +0x384E | offset to vtable +0x0CE4 | 09 00 | uint16_t | 0x0009 (9) | table field `id` (UShort) +0x0CE6 | 16 00 | uint16_t | 0x0016 (22) | table field `offset` (UShort) +0x0CE8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0D08 | offset to field `name` (string) @@ -1363,7 +1363,7 @@ vector (reflection.Field.documentation): +0x0CF4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0CF8 | 14 D6 FF FF | SOffset32 | 0xFFFFD614 (-10732) Loc: +0x36E4 | offset to vtable + +0x0CF8 | 5C D2 FF FF | SOffset32 | 0xFFFFD25C (-11684) Loc: +0x3A9C | offset to vtable +0x0CFC | 00 00 00 | uint8_t[3] | ... | padding +0x0CFF | 0C | uint8_t | 0x0C (12) | table field `base_type` (Byte) +0x0D00 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) @@ -1375,7 +1375,7 @@ string (reflection.Field.name): +0x0D0F | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0D10 | 7A D8 FF FF | SOffset32 | 0xFFFFD87A (-10118) Loc: +0x3496 | offset to vtable + +0x0D10 | C2 D4 FF FF | SOffset32 | 0xFFFFD4C2 (-11070) Loc: +0x384E | offset to vtable +0x0D14 | 08 00 | uint16_t | 0x0008 (8) | table field `id` (UShort) +0x0D16 | 14 00 | uint16_t | 0x0014 (20) | table field `offset` (UShort) +0x0D18 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x0D34 | offset to field `name` (string) @@ -1386,7 +1386,7 @@ vector (reflection.Field.documentation): +0x0D24 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0D28 | 8C D3 FF FF | SOffset32 | 0xFFFFD38C (-11380) Loc: +0x399C | offset to vtable + +0x0D28 | D4 CF FF FF | SOffset32 | 0xFFFFCFD4 (-12332) Loc: +0x3D54 | offset to vtable +0x0D2C | 00 00 00 | uint8_t[3] | ... | padding +0x0D2F | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) +0x0D30 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) @@ -1397,7 +1397,7 @@ string (reflection.Field.name): +0x0D3B | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0D3C | A6 D8 FF FF | SOffset32 | 0xFFFFD8A6 (-10074) Loc: +0x3496 | offset to vtable + +0x0D3C | EE D4 FF FF | SOffset32 | 0xFFFFD4EE (-11026) Loc: +0x384E | offset to vtable +0x0D40 | 07 00 | uint16_t | 0x0007 (7) | table field `id` (UShort) +0x0D42 | 12 00 | uint16_t | 0x0012 (18) | table field `offset` (UShort) +0x0D44 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0D64 | offset to field `name` (string) @@ -1408,7 +1408,7 @@ vector (reflection.Field.documentation): +0x0D50 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0D54 | 70 D6 FF FF | SOffset32 | 0xFFFFD670 (-10640) Loc: +0x36E4 | offset to vtable + +0x0D54 | B8 D2 FF FF | SOffset32 | 0xFFFFD2B8 (-11592) Loc: +0x3A9C | offset to vtable +0x0D58 | 00 00 00 | uint8_t[3] | ... | padding +0x0D5B | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) +0x0D5C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) @@ -1420,7 +1420,7 @@ string (reflection.Field.name): +0x0D6B | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0D6C | D6 D8 FF FF | SOffset32 | 0xFFFFD8D6 (-10026) Loc: +0x3496 | offset to vtable + +0x0D6C | 1E D5 FF FF | SOffset32 | 0xFFFFD51E (-10978) Loc: +0x384E | offset to vtable +0x0D70 | 06 00 | uint16_t | 0x0006 (6) | table field `id` (UShort) +0x0D72 | 10 00 | uint16_t | 0x0010 (16) | table field `offset` (UShort) +0x0D74 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0D94 | offset to field `name` (string) @@ -1431,7 +1431,7 @@ vector (reflection.Field.documentation): +0x0D80 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0D84 | A0 D6 FF FF | SOffset32 | 0xFFFFD6A0 (-10592) Loc: +0x36E4 | offset to vtable + +0x0D84 | E8 D2 FF FF | SOffset32 | 0xFFFFD2E8 (-11544) Loc: +0x3A9C | offset to vtable +0x0D88 | 00 00 00 | uint8_t[3] | ... | padding +0x0D8B | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) +0x0D8C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) @@ -1443,7 +1443,7 @@ string (reflection.Field.name): +0x0D9B | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0D9C | 06 D9 FF FF | SOffset32 | 0xFFFFD906 (-9978) Loc: +0x3496 | offset to vtable + +0x0D9C | 4E D5 FF FF | SOffset32 | 0xFFFFD54E (-10930) Loc: +0x384E | offset to vtable +0x0DA0 | 05 00 | uint16_t | 0x0005 (5) | table field `id` (UShort) +0x0DA2 | 0E 00 | uint16_t | 0x000E (14) | table field `offset` (UShort) +0x0DA4 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x0DC0 | offset to field `name` (string) @@ -1454,7 +1454,7 @@ vector (reflection.Field.documentation): +0x0DB0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0DB4 | 18 D4 FF FF | SOffset32 | 0xFFFFD418 (-11240) Loc: +0x399C | offset to vtable + +0x0DB4 | 60 D0 FF FF | SOffset32 | 0xFFFFD060 (-12192) Loc: +0x3D54 | offset to vtable +0x0DB8 | 00 00 00 | uint8_t[3] | ... | padding +0x0DBB | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) +0x0DBC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) @@ -1465,7 +1465,7 @@ string (reflection.Field.name): +0x0DC7 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0DC8 | 32 D9 FF FF | SOffset32 | 0xFFFFD932 (-9934) Loc: +0x3496 | offset to vtable + +0x0DC8 | 7A D5 FF FF | SOffset32 | 0xFFFFD57A (-10886) Loc: +0x384E | offset to vtable +0x0DCC | 04 00 | uint16_t | 0x0004 (4) | table field `id` (UShort) +0x0DCE | 0C 00 | uint16_t | 0x000C (12) | table field `offset` (UShort) +0x0DD0 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x0DEC | offset to field `name` (string) @@ -1476,7 +1476,7 @@ vector (reflection.Field.documentation): +0x0DDC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0DE0 | 44 D4 FF FF | SOffset32 | 0xFFFFD444 (-11196) Loc: +0x399C | offset to vtable + +0x0DE0 | 8C D0 FF FF | SOffset32 | 0xFFFFD08C (-12148) Loc: +0x3D54 | offset to vtable +0x0DE4 | 00 00 00 | uint8_t[3] | ... | padding +0x0DE7 | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) +0x0DE8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) @@ -1487,7 +1487,7 @@ string (reflection.Field.name): +0x0DF3 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0DF4 | 5E D9 FF FF | SOffset32 | 0xFFFFD95E (-9890) Loc: +0x3496 | offset to vtable + +0x0DF4 | A6 D5 FF FF | SOffset32 | 0xFFFFD5A6 (-10842) Loc: +0x384E | offset to vtable +0x0DF8 | 03 00 | uint16_t | 0x0003 (3) | table field `id` (UShort) +0x0DFA | 0A 00 | uint16_t | 0x000A (10) | table field `offset` (UShort) +0x0DFC | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0E1C | offset to field `name` (string) @@ -1498,7 +1498,7 @@ vector (reflection.Field.documentation): +0x0E08 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0E0C | 28 D7 FF FF | SOffset32 | 0xFFFFD728 (-10456) Loc: +0x36E4 | offset to vtable + +0x0E0C | 70 D3 FF FF | SOffset32 | 0xFFFFD370 (-11408) Loc: +0x3A9C | offset to vtable +0x0E10 | 00 00 00 | uint8_t[3] | ... | padding +0x0E13 | 06 | uint8_t | 0x06 (6) | table field `base_type` (Byte) +0x0E14 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) @@ -1510,7 +1510,7 @@ string (reflection.Field.name): +0x0E23 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0E24 | 8E D9 FF FF | SOffset32 | 0xFFFFD98E (-9842) Loc: +0x3496 | offset to vtable + +0x0E24 | D6 D5 FF FF | SOffset32 | 0xFFFFD5D6 (-10794) Loc: +0x384E | offset to vtable +0x0E28 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) +0x0E2A | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) +0x0E2C | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0E4C | offset to field `name` (string) @@ -1521,7 +1521,7 @@ vector (reflection.Field.documentation): +0x0E38 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0E3C | 58 D7 FF FF | SOffset32 | 0xFFFFD758 (-10408) Loc: +0x36E4 | offset to vtable + +0x0E3C | A0 D3 FF FF | SOffset32 | 0xFFFFD3A0 (-11360) Loc: +0x3A9C | offset to vtable +0x0E40 | 00 00 00 | uint8_t[3] | ... | padding +0x0E43 | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) +0x0E44 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) @@ -1533,7 +1533,7 @@ string (reflection.Field.name): +0x0E53 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x0E54 | BE D9 FF FF | SOffset32 | 0xFFFFD9BE (-9794) Loc: +0x3496 | offset to vtable + +0x0E54 | 06 D6 FF FF | SOffset32 | 0xFFFFD606 (-10746) Loc: +0x384E | offset to vtable +0x0E58 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) +0x0E5A | 06 00 | uint16_t | 0x0006 (6) | table field `offset` (UShort) +0x0E5C | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x0E7C | offset to field `name` (string) @@ -1544,7 +1544,7 @@ vector (reflection.Field.documentation): +0x0E68 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0E6C | 88 D7 FF FF | SOffset32 | 0xFFFFD788 (-10360) Loc: +0x36E4 | offset to vtable + +0x0E6C | D0 D3 FF FF | SOffset32 | 0xFFFFD3D0 (-11312) Loc: +0x3A9C | offset to vtable +0x0E70 | 00 00 00 | uint8_t[3] | ... | padding +0x0E73 | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) +0x0E74 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) @@ -1585,7 +1585,7 @@ vector (reflection.Field.documentation): +0x0EB4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x0EB8 | D4 D7 FF FF | SOffset32 | 0xFFFFD7D4 (-10284) Loc: +0x36E4 | offset to vtable + +0x0EB8 | 1C D4 FF FF | SOffset32 | 0xFFFFD41C (-11236) Loc: +0x3A9C | offset to vtable +0x0EBC | 00 00 00 | uint8_t[3] | ... | padding +0x0EBF | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) +0x0EC0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) @@ -1597,12 +1597,12 @@ string (reflection.Field.name): +0x0ECE | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x0ED0 | A8 D6 FF FF | SOffset32 | 0xFFFFD6A8 (-10584) Loc: +0x3828 | offset to vtable - +0x0ED4 | 30 01 00 00 | UOffset32 | 0x00000130 (304) Loc: +0x1004 | offset to field `name` (string) + +0x0ED0 | F0 D2 FF FF | SOffset32 | 0xFFFFD2F0 (-11536) Loc: +0x3BE0 | offset to vtable + +0x0ED4 | 50 01 00 00 | UOffset32 | 0x00000150 (336) Loc: +0x1024 | offset to field `name` (string) +0x0ED8 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x0F28 | offset to field `fields` (vector) +0x0EDC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) +0x0EE0 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x0EE8 | offset to field `documentation` (vector) - +0x0EE4 | 7C 28 00 00 | UOffset32 | 0x0000287C (10364) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x0EE4 | 34 2C 00 00 | UOffset32 | 0x00002C34 (11316) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): +0x0EE8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) @@ -1620,5028 +1620,5428 @@ string (reflection.Object.documentation): +0x0F27 | 00 | char | 0x00 (0) | string terminator vector (reflection.Object.fields): - +0x0F28 | 36 00 00 00 | uint32_t | 0x00000036 (54) | length of vector (# items) - +0x0F2C | 80 04 00 00 | UOffset32 | 0x00000480 (1152) Loc: +0x13AC | offset to table[0] - +0x0F30 | E4 04 00 00 | UOffset32 | 0x000004E4 (1252) Loc: +0x1414 | offset to table[1] - +0x0F34 | 4C 05 00 00 | UOffset32 | 0x0000054C (1356) Loc: +0x1480 | offset to table[2] - +0x0F38 | AC 05 00 00 | UOffset32 | 0x000005AC (1452) Loc: +0x14E4 | offset to table[3] - +0x0F3C | A8 09 00 00 | UOffset32 | 0x000009A8 (2472) Loc: +0x18E4 | offset to table[4] - +0x0F40 | 78 1B 00 00 | UOffset32 | 0x00001B78 (7032) Loc: +0x2AB8 | offset to table[5] - +0x0F44 | 88 18 00 00 | UOffset32 | 0x00001888 (6280) Loc: +0x27CC | offset to table[6] - +0x0F48 | 44 0F 00 00 | UOffset32 | 0x00000F44 (3908) Loc: +0x1E8C | offset to table[7] - +0x0F4C | 7C 1C 00 00 | UOffset32 | 0x00001C7C (7292) Loc: +0x2BC8 | offset to table[8] - +0x0F50 | C0 1D 00 00 | UOffset32 | 0x00001DC0 (7616) Loc: +0x2D10 | offset to table[9] - +0x0F54 | EC 1B 00 00 | UOffset32 | 0x00001BEC (7148) Loc: +0x2B40 | offset to table[10] - +0x0F58 | 44 01 00 00 | UOffset32 | 0x00000144 (324) Loc: +0x109C | offset to table[11] - +0x0F5C | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x1020 | offset to table[12] - +0x0F60 | 30 1E 00 00 | UOffset32 | 0x00001E30 (7728) Loc: +0x2D90 | offset to table[13] - +0x0F64 | 30 1D 00 00 | UOffset32 | 0x00001D30 (7472) Loc: +0x2C94 | offset to table[14] - +0x0F68 | A8 01 00 00 | UOffset32 | 0x000001A8 (424) Loc: +0x1110 | offset to table[15] - +0x0F6C | 10 07 00 00 | UOffset32 | 0x00000710 (1808) Loc: +0x167C | offset to table[16] - +0x0F70 | 80 0D 00 00 | UOffset32 | 0x00000D80 (3456) Loc: +0x1CF0 | offset to table[17] - +0x0F74 | A0 1E 00 00 | UOffset32 | 0x00001EA0 (7840) Loc: +0x2E14 | offset to table[18] - +0x0F78 | 2C 02 00 00 | UOffset32 | 0x0000022C (556) Loc: +0x11A4 | offset to table[19] - +0x0F7C | 5C 03 00 00 | UOffset32 | 0x0000035C (860) Loc: +0x12D8 | offset to table[20] - +0x0F80 | 08 0C 00 00 | UOffset32 | 0x00000C08 (3080) Loc: +0x1B88 | offset to table[21] - +0x0F84 | 58 1A 00 00 | UOffset32 | 0x00001A58 (6744) Loc: +0x29DC | offset to table[22] - +0x0F88 | E4 19 00 00 | UOffset32 | 0x000019E4 (6628) Loc: +0x296C | offset to table[23] - +0x0F8C | A0 0E 00 00 | UOffset32 | 0x00000EA0 (3744) Loc: +0x1E2C | offset to table[24] - +0x0F90 | C4 1A 00 00 | UOffset32 | 0x00001AC4 (6852) Loc: +0x2A54 | offset to table[25] - +0x0F94 | 90 11 00 00 | UOffset32 | 0x00001190 (4496) Loc: +0x2124 | offset to table[26] - +0x0F98 | 78 0F 00 00 | UOffset32 | 0x00000F78 (3960) Loc: +0x1F10 | offset to table[27] - +0x0F9C | 68 19 00 00 | UOffset32 | 0x00001968 (6504) Loc: +0x2904 | offset to table[28] - +0x0FA0 | E0 0F 00 00 | UOffset32 | 0x00000FE0 (4064) Loc: +0x1F80 | offset to table[29] - +0x0FA4 | 88 18 00 00 | UOffset32 | 0x00001888 (6280) Loc: +0x282C | offset to table[30] - +0x0FA8 | C0 16 00 00 | UOffset32 | 0x000016C0 (5824) Loc: +0x2668 | offset to table[31] - +0x0FAC | 1C 17 00 00 | UOffset32 | 0x0000171C (5916) Loc: +0x26C8 | offset to table[32] - +0x0FB0 | 10 11 00 00 | UOffset32 | 0x00001110 (4368) Loc: +0x20C0 | offset to table[33] - +0x0FB4 | 8C 10 00 00 | UOffset32 | 0x0000108C (4236) Loc: +0x2040 | offset to table[34] - +0x0FB8 | 30 10 00 00 | UOffset32 | 0x00001030 (4144) Loc: +0x1FE8 | offset to table[35] - +0x0FBC | 20 16 00 00 | UOffset32 | 0x00001620 (5664) Loc: +0x25DC | offset to table[36] - +0x0FC0 | E0 13 00 00 | UOffset32 | 0x000013E0 (5088) Loc: +0x23A0 | offset to table[37] - +0x0FC4 | FC 14 00 00 | UOffset32 | 0x000014FC (5372) Loc: +0x24C0 | offset to table[38] - +0x0FC8 | 58 12 00 00 | UOffset32 | 0x00001258 (4696) Loc: +0x2220 | offset to table[39] - +0x0FCC | 84 15 00 00 | UOffset32 | 0x00001584 (5508) Loc: +0x2550 | offset to table[40] - +0x0FD0 | E4 12 00 00 | UOffset32 | 0x000012E4 (4836) Loc: +0x22B4 | offset to table[41] - +0x0FD4 | 5C 14 00 00 | UOffset32 | 0x0000145C (5212) Loc: +0x2430 | offset to table[42] - +0x0FD8 | B4 11 00 00 | UOffset32 | 0x000011B4 (4532) Loc: +0x218C | offset to table[43] - +0x0FDC | 50 17 00 00 | UOffset32 | 0x00001750 (5968) Loc: +0x272C | offset to table[44] - +0x0FE0 | 38 02 00 00 | UOffset32 | 0x00000238 (568) Loc: +0x1218 | offset to table[45] - +0x0FE4 | C0 07 00 00 | UOffset32 | 0x000007C0 (1984) Loc: +0x17A4 | offset to table[46] - +0x0FE8 | 78 0D 00 00 | UOffset32 | 0x00000D78 (3448) Loc: +0x1D60 | offset to table[47] - +0x0FEC | 58 03 00 00 | UOffset32 | 0x00000358 (856) Loc: +0x1344 | offset to table[48] - +0x0FF0 | D8 0D 00 00 | UOffset32 | 0x00000DD8 (3544) Loc: +0x1DC8 | offset to table[49] - +0x0FF4 | 58 05 00 00 | UOffset32 | 0x00000558 (1368) Loc: +0x154C | offset to table[50] - +0x0FF8 | 88 0C 00 00 | UOffset32 | 0x00000C88 (3208) Loc: +0x1C80 | offset to table[51] - +0x0FFC | DC 09 00 00 | UOffset32 | 0x000009DC (2524) Loc: +0x19D8 | offset to table[52] - +0x1000 | 8C 0A 00 00 | UOffset32 | 0x00000A8C (2700) Loc: +0x1A8C | offset to table[53] + +0x0F28 | 3E 00 00 00 | uint32_t | 0x0000003E (62) | length of vector (# items) + +0x0F2C | 38 08 00 00 | UOffset32 | 0x00000838 (2104) Loc: +0x1764 | offset to table[0] + +0x0F30 | 9C 08 00 00 | UOffset32 | 0x0000089C (2204) Loc: +0x17CC | offset to table[1] + +0x0F34 | 04 09 00 00 | UOffset32 | 0x00000904 (2308) Loc: +0x1838 | offset to table[2] + +0x0F38 | 64 09 00 00 | UOffset32 | 0x00000964 (2404) Loc: +0x189C | offset to table[3] + +0x0F3C | 60 0D 00 00 | UOffset32 | 0x00000D60 (3424) Loc: +0x1C9C | offset to table[4] + +0x0F40 | 30 1F 00 00 | UOffset32 | 0x00001F30 (7984) Loc: +0x2E70 | offset to table[5] + +0x0F44 | FC 00 00 00 | UOffset32 | 0x000000FC (252) Loc: +0x1040 | offset to table[6] + +0x0F48 | 3C 1C 00 00 | UOffset32 | 0x00001C3C (7228) Loc: +0x2B84 | offset to table[7] + +0x0F4C | F8 12 00 00 | UOffset32 | 0x000012F8 (4856) Loc: +0x2244 | offset to table[8] + +0x0F50 | 30 20 00 00 | UOffset32 | 0x00002030 (8240) Loc: +0x2F80 | offset to table[9] + +0x0F54 | 74 21 00 00 | UOffset32 | 0x00002174 (8564) Loc: +0x30C8 | offset to table[10] + +0x0F58 | B0 03 00 00 | UOffset32 | 0x000003B0 (944) Loc: +0x1308 | offset to table[11] + +0x0F5C | B4 02 00 00 | UOffset32 | 0x000002B4 (692) Loc: +0x1210 | offset to table[12] + +0x0F60 | 98 1F 00 00 | UOffset32 | 0x00001F98 (8088) Loc: +0x2EF8 | offset to table[13] + +0x0F64 | F0 04 00 00 | UOffset32 | 0x000004F0 (1264) Loc: +0x1454 | offset to table[14] + +0x0F68 | 70 04 00 00 | UOffset32 | 0x00000470 (1136) Loc: +0x13D8 | offset to table[15] + +0x0F6C | DC 21 00 00 | UOffset32 | 0x000021DC (8668) Loc: +0x3148 | offset to table[16] + +0x0F70 | DC 20 00 00 | UOffset32 | 0x000020DC (8412) Loc: +0x304C | offset to table[17] + +0x0F74 | FC 03 00 00 | UOffset32 | 0x000003FC (1020) Loc: +0x1370 | offset to table[18] + +0x0F78 | 50 05 00 00 | UOffset32 | 0x00000550 (1360) Loc: +0x14C8 | offset to table[19] + +0x0F7C | AC 01 00 00 | UOffset32 | 0x000001AC (428) Loc: +0x1128 | offset to table[20] + +0x0F80 | 30 01 00 00 | UOffset32 | 0x00000130 (304) Loc: +0x10B0 | offset to table[21] + +0x0F84 | B0 0A 00 00 | UOffset32 | 0x00000AB0 (2736) Loc: +0x1A34 | offset to table[22] + +0x0F88 | 20 11 00 00 | UOffset32 | 0x00001120 (4384) Loc: +0x20A8 | offset to table[23] + +0x0F8C | 40 22 00 00 | UOffset32 | 0x00002240 (8768) Loc: +0x31CC | offset to table[24] + +0x0F90 | 08 03 00 00 | UOffset32 | 0x00000308 (776) Loc: +0x1298 | offset to table[25] + +0x0F94 | 04 02 00 00 | UOffset32 | 0x00000204 (516) Loc: +0x1198 | offset to table[26] + +0x0F98 | C4 05 00 00 | UOffset32 | 0x000005C4 (1476) Loc: +0x155C | offset to table[27] + +0x0F9C | F4 06 00 00 | UOffset32 | 0x000006F4 (1780) Loc: +0x1690 | offset to table[28] + +0x0FA0 | A0 0F 00 00 | UOffset32 | 0x00000FA0 (4000) Loc: +0x1F40 | offset to table[29] + +0x0FA4 | F0 1D 00 00 | UOffset32 | 0x00001DF0 (7664) Loc: +0x2D94 | offset to table[30] + +0x0FA8 | 7C 1D 00 00 | UOffset32 | 0x00001D7C (7548) Loc: +0x2D24 | offset to table[31] + +0x0FAC | 38 12 00 00 | UOffset32 | 0x00001238 (4664) Loc: +0x21E4 | offset to table[32] + +0x0FB0 | 5C 1E 00 00 | UOffset32 | 0x00001E5C (7772) Loc: +0x2E0C | offset to table[33] + +0x0FB4 | 28 15 00 00 | UOffset32 | 0x00001528 (5416) Loc: +0x24DC | offset to table[34] + +0x0FB8 | 10 13 00 00 | UOffset32 | 0x00001310 (4880) Loc: +0x22C8 | offset to table[35] + +0x0FBC | 00 1D 00 00 | UOffset32 | 0x00001D00 (7424) Loc: +0x2CBC | offset to table[36] + +0x0FC0 | 78 13 00 00 | UOffset32 | 0x00001378 (4984) Loc: +0x2338 | offset to table[37] + +0x0FC4 | 20 1C 00 00 | UOffset32 | 0x00001C20 (7200) Loc: +0x2BE4 | offset to table[38] + +0x0FC8 | 58 1A 00 00 | UOffset32 | 0x00001A58 (6744) Loc: +0x2A20 | offset to table[39] + +0x0FCC | B4 1A 00 00 | UOffset32 | 0x00001AB4 (6836) Loc: +0x2A80 | offset to table[40] + +0x0FD0 | A8 14 00 00 | UOffset32 | 0x000014A8 (5288) Loc: +0x2478 | offset to table[41] + +0x0FD4 | 24 14 00 00 | UOffset32 | 0x00001424 (5156) Loc: +0x23F8 | offset to table[42] + +0x0FD8 | C8 13 00 00 | UOffset32 | 0x000013C8 (5064) Loc: +0x23A0 | offset to table[43] + +0x0FDC | B8 19 00 00 | UOffset32 | 0x000019B8 (6584) Loc: +0x2994 | offset to table[44] + +0x0FE0 | 78 17 00 00 | UOffset32 | 0x00001778 (6008) Loc: +0x2758 | offset to table[45] + +0x0FE4 | 94 18 00 00 | UOffset32 | 0x00001894 (6292) Loc: +0x2878 | offset to table[46] + +0x0FE8 | F0 15 00 00 | UOffset32 | 0x000015F0 (5616) Loc: +0x25D8 | offset to table[47] + +0x0FEC | 1C 19 00 00 | UOffset32 | 0x0000191C (6428) Loc: +0x2908 | offset to table[48] + +0x0FF0 | 7C 16 00 00 | UOffset32 | 0x0000167C (5756) Loc: +0x266C | offset to table[49] + +0x0FF4 | F4 17 00 00 | UOffset32 | 0x000017F4 (6132) Loc: +0x27E8 | offset to table[50] + +0x0FF8 | 4C 15 00 00 | UOffset32 | 0x0000154C (5452) Loc: +0x2544 | offset to table[51] + +0x0FFC | E8 1A 00 00 | UOffset32 | 0x00001AE8 (6888) Loc: +0x2AE4 | offset to table[52] + +0x1000 | D0 05 00 00 | UOffset32 | 0x000005D0 (1488) Loc: +0x15D0 | offset to table[53] + +0x1004 | 58 0B 00 00 | UOffset32 | 0x00000B58 (2904) Loc: +0x1B5C | offset to table[54] + +0x1008 | 10 11 00 00 | UOffset32 | 0x00001110 (4368) Loc: +0x2118 | offset to table[55] + +0x100C | F0 06 00 00 | UOffset32 | 0x000006F0 (1776) Loc: +0x16FC | offset to table[56] + +0x1010 | 70 11 00 00 | UOffset32 | 0x00001170 (4464) Loc: +0x2180 | offset to table[57] + +0x1014 | F0 08 00 00 | UOffset32 | 0x000008F0 (2288) Loc: +0x1904 | offset to table[58] + +0x1018 | 20 10 00 00 | UOffset32 | 0x00001020 (4128) Loc: +0x2038 | offset to table[59] + +0x101C | 74 0D 00 00 | UOffset32 | 0x00000D74 (3444) Loc: +0x1D90 | offset to table[60] + +0x1020 | 24 0E 00 00 | UOffset32 | 0x00000E24 (3620) Loc: +0x1E44 | offset to table[61] string (reflection.Object.name): - +0x1004 | 16 00 00 00 | uint32_t | 0x00000016 (22) | length of string - +0x1008 | 4D 79 47 61 6D 65 2E 45 | char[22] | MyGame.E | string literal - +0x1010 | 78 61 6D 70 6C 65 2E 4D | | xample.M - +0x1018 | 6F 6E 73 74 65 72 | | onster - +0x101E | 00 | char | 0x00 (0) | string terminator + +0x1024 | 16 00 00 00 | uint32_t | 0x00000016 (22) | length of string + +0x1028 | 4D 79 47 61 6D 65 2E 45 | char[22] | MyGame.E | string literal + +0x1030 | 78 61 6D 70 6C 65 2E 4D | | xample.M + +0x1038 | 6F 6E 73 74 65 72 | | onster + +0x103E | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1020 | 62 FD FF FF | SOffset32 | 0xFFFFFD62 (-670) Loc: +0x12BE | offset to vtable - +0x1024 | 35 00 | uint16_t | 0x0035 (53) | table field `id` (UShort) - +0x1026 | 6E 00 | uint16_t | 0x006E (110) | table field `offset` (UShort) - +0x1028 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x107C | offset to field `name` (string) - +0x102C | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x1068 | offset to field `type` (table) - +0x1030 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1044 | offset to field `attributes` (vector) - +0x1034 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1040 | offset to field `documentation` (vector) - +0x1038 | 02 00 00 00 00 00 00 00 | int64_t | 0x0000000000000002 (2) | table field `default_integer` (Long) + +0x1040 | C2 FD FF FF | SOffset32 | 0xFFFFFDC2 (-574) Loc: +0x127E | offset to vtable + +0x1044 | 3D 00 | uint16_t | 0x003D (61) | table field `id` (UShort) + +0x1046 | 7E 00 | uint16_t | 0x007E (126) | table field `offset` (UShort) + +0x1048 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1098 | offset to field `name` (string) + +0x104C | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x1088 | offset to field `type` (table) + +0x1050 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1064 | offset to field `attributes` (vector) + +0x1054 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1060 | offset to field `documentation` (vector) + +0x1058 | 00 00 00 00 00 00 F0 7F | double | 0x7FF0000000000000 (inf) | table field `default_real` (Double) vector (reflection.Field.documentation): - +0x1040 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1060 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1044 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1048 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x104C | offset to table[0] + +0x1064 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1068 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x106C | offset to table[0] table (reflection.KeyValue): - +0x104C | E8 DA FF FF | SOffset32 | 0xFFFFDAE8 (-9496) Loc: +0x3564 | offset to vtable - +0x1050 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1060 | offset to field `key` (string) - +0x1054 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1058 | offset to field `value` (string) + +0x106C | 50 D7 FF FF | SOffset32 | 0xFFFFD750 (-10416) Loc: +0x391C | offset to vtable + +0x1070 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1080 | offset to field `key` (string) + +0x1074 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1078 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1058 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x105C | 35 33 | char[2] | 53 | string literal - +0x105E | 00 | char | 0x00 (0) | string terminator + +0x1078 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x107C | 36 31 | char[2] | 61 | string literal + +0x107E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1060 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1064 | 69 64 | char[2] | id | string literal - +0x1066 | 00 | char | 0x00 (0) | string terminator + +0x1080 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1084 | 69 64 | char[2] | id | string literal + +0x1086 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1068 | 64 DA FF FF | SOffset32 | 0xFFFFDA64 (-9628) Loc: +0x3604 | offset to vtable - +0x106C | 00 00 00 | uint8_t[3] | ... | padding - +0x106F | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x1070 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) - +0x1074 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x1078 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1088 | EC D5 FF FF | SOffset32 | 0xFFFFD5EC (-10772) Loc: +0x3A9C | offset to vtable + +0x108C | 00 00 00 | uint8_t[3] | ... | padding + +0x108F | 0C | uint8_t | 0x0C (12) | table field `base_type` (Byte) + +0x1090 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x1094 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x107C | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string - +0x1080 | 6C 6F 6E 67 5F 65 6E 75 | char[24] | long_enu | string literal - +0x1088 | 6D 5F 6E 6F 72 6D 61 6C | | m_normal - +0x1090 | 5F 64 65 66 61 75 6C 74 | | _default - +0x1098 | 00 | char | 0x00 (0) | string terminator + +0x1098 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string + +0x109C | 64 6F 75 62 6C 65 5F 69 | char[18] | double_i | string literal + +0x10A4 | 6E 66 5F 64 65 66 61 75 | | nf_defau + +0x10AC | 6C 74 | | lt + +0x10AE | 00 | char | 0x00 (0) | string terminator + +table (reflection.Field): + +0x10B0 | 52 EC FF FF | SOffset32 | 0xFFFFEC52 (-5038) Loc: +0x245E | offset to vtable + +0x10B4 | 3C 00 | uint16_t | 0x003C (60) | table field `id` (UShort) + +0x10B6 | 7C 00 | uint16_t | 0x007C (124) | table field `offset` (UShort) + +0x10B8 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1108 | offset to field `name` (string) + +0x10BC | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x10FC | offset to field `type` (table) + +0x10C0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x10D8 | offset to field `attributes` (vector) + +0x10C4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x10D4 | offset to field `documentation` (vector) + +0x10C8 | 00 00 00 00 00 00 F0 FF | double | 0xFFF0000000000000 (-inf) | table field `default_real` (Double) + +0x10D0 | 00 00 00 00 | uint8_t[4] | .... | padding + +vector (reflection.Field.documentation): + +0x10D4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x10D8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x10DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x10E0 | offset to table[0] + +table (reflection.KeyValue): + +0x10E0 | C4 D7 FF FF | SOffset32 | 0xFFFFD7C4 (-10300) Loc: +0x391C | offset to vtable + +0x10E4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x10F4 | offset to field `key` (string) + +0x10E8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x10EC | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x10EC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x10F0 | 36 30 | char[2] | 60 | string literal + +0x10F2 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x10F4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x10F8 | 69 64 | char[2] | id | string literal + +0x10FA | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x10FC | A8 D3 FF FF | SOffset32 | 0xFFFFD3A8 (-11352) Loc: +0x3D54 | offset to vtable + +0x1100 | 00 00 00 | uint8_t[3] | ... | padding + +0x1103 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x1104 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x1108 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string + +0x110C | 6E 65 67 61 74 69 76 65 | char[25] | negative | string literal + +0x1114 | 5F 69 6E 66 69 6E 69 74 | | _infinit + +0x111C | 79 5F 64 65 66 61 75 6C | | y_defaul + +0x1124 | 74 | | t + +0x1125 | 00 | char | 0x00 (0) | string terminator + +padding: + +0x1126 | 00 00 | uint8_t[2] | .. | padding + +table (reflection.Field): + +0x1128 | AA FE FF FF | SOffset32 | 0xFFFFFEAA (-342) Loc: +0x127E | offset to vtable + +0x112C | 3B 00 | uint16_t | 0x003B (59) | table field `id` (UShort) + +0x112E | 7A 00 | uint16_t | 0x007A (122) | table field `offset` (UShort) + +0x1130 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x117C | offset to field `name` (string) + +0x1134 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x1170 | offset to field `type` (table) + +0x1138 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x114C | offset to field `attributes` (vector) + +0x113C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1148 | offset to field `documentation` (vector) + +0x1140 | 00 00 00 00 00 00 F0 FF | double | 0xFFF0000000000000 (-inf) | table field `default_real` (Double) + +vector (reflection.Field.documentation): + +0x1148 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x114C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1150 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1154 | offset to table[0] + +table (reflection.KeyValue): + +0x1154 | 38 D8 FF FF | SOffset32 | 0xFFFFD838 (-10184) Loc: +0x391C | offset to vtable + +0x1158 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1168 | offset to field `key` (string) + +0x115C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1160 | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x1160 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1164 | 35 39 | char[2] | 59 | string literal + +0x1166 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x1168 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x116C | 69 64 | char[2] | id | string literal + +0x116E | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x1170 | 1C D4 FF FF | SOffset32 | 0xFFFFD41C (-11236) Loc: +0x3D54 | offset to vtable + +0x1174 | 00 00 00 | uint8_t[3] | ... | padding + +0x1177 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x1178 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x117C | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string + +0x1180 | 6E 65 67 61 74 69 76 65 | char[20] | negative | string literal + +0x1188 | 5F 69 6E 66 5F 64 65 66 | | _inf_def + +0x1190 | 61 75 6C 74 | | ault + +0x1194 | 00 | char | 0x00 (0) | string terminator + +padding: + +0x1195 | 00 00 00 | uint8_t[3] | ... | padding + +table (reflection.Field): + +0x1198 | 3A ED FF FF | SOffset32 | 0xFFFFED3A (-4806) Loc: +0x245E | offset to vtable + +0x119C | 3A 00 | uint16_t | 0x003A (58) | table field `id` (UShort) + +0x119E | 78 00 | uint16_t | 0x0078 (120) | table field `offset` (UShort) + +0x11A0 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x11F0 | offset to field `name` (string) + +0x11A4 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x11E4 | offset to field `type` (table) + +0x11A8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x11C0 | offset to field `attributes` (vector) + +0x11AC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x11BC | offset to field `documentation` (vector) + +0x11B0 | 00 00 00 00 00 00 F0 7F | double | 0x7FF0000000000000 (inf) | table field `default_real` (Double) + +0x11B8 | 00 00 00 00 | uint8_t[4] | .... | padding + +vector (reflection.Field.documentation): + +0x11BC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x11C0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x11C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x11C8 | offset to table[0] + +table (reflection.KeyValue): + +0x11C8 | AC D8 FF FF | SOffset32 | 0xFFFFD8AC (-10068) Loc: +0x391C | offset to vtable + +0x11CC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x11DC | offset to field `key` (string) + +0x11D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x11D4 | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x11D4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x11D8 | 35 38 | char[2] | 58 | string literal + +0x11DA | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x11DC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x11E0 | 69 64 | char[2] | id | string literal + +0x11E2 | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x11E4 | 90 D4 FF FF | SOffset32 | 0xFFFFD490 (-11120) Loc: +0x3D54 | offset to vtable + +0x11E8 | 00 00 00 | uint8_t[3] | ... | padding + +0x11EB | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x11EC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x11F0 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string + +0x11F4 | 70 6F 73 69 74 69 76 65 | char[25] | positive | string literal + +0x11FC | 5F 69 6E 66 69 6E 69 74 | | _infinit + +0x1204 | 79 5F 64 65 66 61 75 6C | | y_defaul + +0x120C | 74 | | t + +0x120D | 00 | char | 0x00 (0) | string terminator + +padding: + +0x120E | 00 00 | uint8_t[2] | .. | padding + +table (reflection.Field): + +0x1210 | B2 ED FF FF | SOffset32 | 0xFFFFEDB2 (-4686) Loc: +0x245E | offset to vtable + +0x1214 | 39 00 | uint16_t | 0x0039 (57) | table field `id` (UShort) + +0x1216 | 76 00 | uint16_t | 0x0076 (118) | table field `offset` (UShort) + +0x1218 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1268 | offset to field `name` (string) + +0x121C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x125C | offset to field `type` (table) + +0x1220 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1238 | offset to field `attributes` (vector) + +0x1224 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1234 | offset to field `documentation` (vector) + +0x1228 | 00 00 00 00 00 00 F0 7F | double | 0x7FF0000000000000 (inf) | table field `default_real` (Double) + +0x1230 | 00 00 00 00 | uint8_t[4] | .... | padding + +vector (reflection.Field.documentation): + +0x1234 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x1238 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x123C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1240 | offset to table[0] + +table (reflection.KeyValue): + +0x1240 | 24 D9 FF FF | SOffset32 | 0xFFFFD924 (-9948) Loc: +0x391C | offset to vtable + +0x1244 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1254 | offset to field `key` (string) + +0x1248 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x124C | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x124C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1250 | 35 37 | char[2] | 57 | string literal + +0x1252 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x1254 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1258 | 69 64 | char[2] | id | string literal + +0x125A | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x125C | 08 D5 FF FF | SOffset32 | 0xFFFFD508 (-11000) Loc: +0x3D54 | offset to vtable + +0x1260 | 00 00 00 | uint8_t[3] | ... | padding + +0x1263 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x1264 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x1268 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x126C | 69 6E 66 69 6E 69 74 79 | char[16] | infinity | string literal + +0x1274 | 5F 64 65 66 61 75 6C 74 | | _default + +0x127C | 00 | char | 0x00 (0) | string terminator + +vtable (reflection.Field): + +0x127E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x1280 | 20 00 | uint16_t | 0x0020 (32) | size of referring table + +0x1282 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x1284 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x1286 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x1288 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x128A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x128C | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_real` (id: 5) + +0x128E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x1290 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x1292 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x1294 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x1296 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +table (reflection.Field): + +0x1298 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x127E | offset to vtable + +0x129C | 38 00 | uint16_t | 0x0038 (56) | table field `id` (UShort) + +0x129E | 74 00 | uint16_t | 0x0074 (116) | table field `offset` (UShort) + +0x12A0 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x12EC | offset to field `name` (string) + +0x12A4 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x12E0 | offset to field `type` (table) + +0x12A8 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x12BC | offset to field `attributes` (vector) + +0x12AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x12B8 | offset to field `documentation` (vector) + +0x12B0 | 00 00 00 00 00 00 F0 7F | double | 0x7FF0000000000000 (inf) | table field `default_real` (Double) + +vector (reflection.Field.documentation): + +0x12B8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x12BC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x12C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x12C4 | offset to table[0] + +table (reflection.KeyValue): + +0x12C4 | A8 D9 FF FF | SOffset32 | 0xFFFFD9A8 (-9816) Loc: +0x391C | offset to vtable + +0x12C8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x12D8 | offset to field `key` (string) + +0x12CC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x12D0 | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x12D0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x12D4 | 35 36 | char[2] | 56 | string literal + +0x12D6 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x12D8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x12DC | 69 64 | char[2] | id | string literal + +0x12DE | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x12E0 | 8C D5 FF FF | SOffset32 | 0xFFFFD58C (-10868) Loc: +0x3D54 | offset to vtable + +0x12E4 | 00 00 00 | uint8_t[3] | ... | padding + +0x12E7 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x12E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x12EC | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string + +0x12F0 | 70 6F 73 69 74 69 76 65 | char[20] | positive | string literal + +0x12F8 | 5F 69 6E 66 5F 64 65 66 | | _inf_def + +0x1300 | 61 75 6C 74 | | ault + +0x1304 | 00 | char | 0x00 (0) | string terminator + +padding: + +0x1305 | 00 00 00 | uint8_t[3] | ... | padding + +table (reflection.Field): + +0x1308 | AA EE FF FF | SOffset32 | 0xFFFFEEAA (-4438) Loc: +0x245E | offset to vtable + +0x130C | 37 00 | uint16_t | 0x0037 (55) | table field `id` (UShort) + +0x130E | 72 00 | uint16_t | 0x0072 (114) | table field `offset` (UShort) + +0x1310 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1360 | offset to field `name` (string) + +0x1314 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x1354 | offset to field `type` (table) + +0x1318 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1330 | offset to field `attributes` (vector) + +0x131C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x132C | offset to field `documentation` (vector) + +0x1320 | 00 00 00 00 00 00 F0 7F | double | 0x7FF0000000000000 (inf) | table field `default_real` (Double) + +0x1328 | 00 00 00 00 | uint8_t[4] | .... | padding + +vector (reflection.Field.documentation): + +0x132C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x1330 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1334 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1338 | offset to table[0] + +table (reflection.KeyValue): + +0x1338 | 1C DA FF FF | SOffset32 | 0xFFFFDA1C (-9700) Loc: +0x391C | offset to vtable + +0x133C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x134C | offset to field `key` (string) + +0x1340 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1344 | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x1344 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1348 | 35 35 | char[2] | 55 | string literal + +0x134A | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x134C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1350 | 69 64 | char[2] | id | string literal + +0x1352 | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x1354 | 00 D6 FF FF | SOffset32 | 0xFFFFD600 (-10752) Loc: +0x3D54 | offset to vtable + +0x1358 | 00 00 00 | uint8_t[3] | ... | padding + +0x135B | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x135C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x1360 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1364 | 69 6E 66 5F 64 65 66 61 | char[11] | inf_defa | string literal + +0x136C | 75 6C 74 | | ult + +0x136F | 00 | char | 0x00 (0) | string terminator + +table (reflection.Field): + +0x1370 | 12 EF FF FF | SOffset32 | 0xFFFFEF12 (-4334) Loc: +0x245E | offset to vtable + +0x1374 | 36 00 | uint16_t | 0x0036 (54) | table field `id` (UShort) + +0x1376 | 70 00 | uint16_t | 0x0070 (112) | table field `offset` (UShort) + +0x1378 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x13C8 | offset to field `name` (string) + +0x137C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x13BC | offset to field `type` (table) + +0x1380 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1398 | offset to field `attributes` (vector) + +0x1384 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1394 | offset to field `documentation` (vector) + +0x1388 | 00 00 00 00 00 00 F8 7F | double | 0x7FF8000000000000 (nan) | table field `default_real` (Double) + +0x1390 | 00 00 00 00 | uint8_t[4] | .... | padding + +vector (reflection.Field.documentation): + +0x1394 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x1398 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x139C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x13A0 | offset to table[0] + +table (reflection.KeyValue): + +0x13A0 | 84 DA FF FF | SOffset32 | 0xFFFFDA84 (-9596) Loc: +0x391C | offset to vtable + +0x13A4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x13B4 | offset to field `key` (string) + +0x13A8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x13AC | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x13AC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x13B0 | 35 34 | char[2] | 54 | string literal + +0x13B2 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x13B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x13B8 | 69 64 | char[2] | id | string literal + +0x13BA | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x13BC | 68 D6 FF FF | SOffset32 | 0xFFFFD668 (-10648) Loc: +0x3D54 | offset to vtable + +0x13C0 | 00 00 00 | uint8_t[3] | ... | padding + +0x13C3 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x13C4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x13C8 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x13CC | 6E 61 6E 5F 64 65 66 61 | char[11] | nan_defa | string literal + +0x13D4 | 75 6C 74 | | ult + +0x13D7 | 00 | char | 0x00 (0) | string terminator + +table (reflection.Field): + +0x13D8 | 62 FD FF FF | SOffset32 | 0xFFFFFD62 (-670) Loc: +0x1676 | offset to vtable + +0x13DC | 35 00 | uint16_t | 0x0035 (53) | table field `id` (UShort) + +0x13DE | 6E 00 | uint16_t | 0x006E (110) | table field `offset` (UShort) + +0x13E0 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x1434 | offset to field `name` (string) + +0x13E4 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x1420 | offset to field `type` (table) + +0x13E8 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x13FC | offset to field `attributes` (vector) + +0x13EC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x13F8 | offset to field `documentation` (vector) + +0x13F0 | 02 00 00 00 00 00 00 00 | int64_t | 0x0000000000000002 (2) | table field `default_integer` (Long) + +vector (reflection.Field.documentation): + +0x13F8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +vector (reflection.Field.attributes): + +0x13FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1400 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1404 | offset to table[0] + +table (reflection.KeyValue): + +0x1404 | E8 DA FF FF | SOffset32 | 0xFFFFDAE8 (-9496) Loc: +0x391C | offset to vtable + +0x1408 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1418 | offset to field `key` (string) + +0x140C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1410 | offset to field `value` (string) + +string (reflection.KeyValue.value): + +0x1410 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1414 | 35 33 | char[2] | 53 | string literal + +0x1416 | 00 | char | 0x00 (0) | string terminator + +string (reflection.KeyValue.key): + +0x1418 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x141C | 69 64 | char[2] | id | string literal + +0x141E | 00 | char | 0x00 (0) | string terminator + +table (reflection.Type): + +0x1420 | 64 DA FF FF | SOffset32 | 0xFFFFDA64 (-9628) Loc: +0x39BC | offset to vtable + +0x1424 | 00 00 00 | uint8_t[3] | ... | padding + +0x1427 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x1428 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) + +0x142C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x1430 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +string (reflection.Field.name): + +0x1434 | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string + +0x1438 | 6C 6F 6E 67 5F 65 6E 75 | char[24] | long_enu | string literal + +0x1440 | 6D 5F 6E 6F 72 6D 61 6C | | m_normal + +0x1448 | 5F 64 65 66 61 75 6C 74 | | _default + +0x1450 | 00 | char | 0x00 (0) | string terminator padding: - +0x1099 | 00 00 00 | uint8_t[3] | ... | padding + +0x1451 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x109C | 62 E6 FF FF | SOffset32 | 0xFFFFE662 (-6558) Loc: +0x2A3A | offset to vtable - +0x10A0 | 34 00 | uint16_t | 0x0034 (52) | table field `id` (UShort) - +0x10A2 | 6C 00 | uint16_t | 0x006C (108) | table field `offset` (UShort) - +0x10A4 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x10F0 | offset to field `name` (string) - +0x10A8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x10DC | offset to field `type` (table) - +0x10AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x10B8 | offset to field `attributes` (vector) - +0x10B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x10B4 | offset to field `documentation` (vector) + +0x1454 | 62 E6 FF FF | SOffset32 | 0xFFFFE662 (-6558) Loc: +0x2DF2 | offset to vtable + +0x1458 | 34 00 | uint16_t | 0x0034 (52) | table field `id` (UShort) + +0x145A | 6C 00 | uint16_t | 0x006C (108) | table field `offset` (UShort) + +0x145C | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x14A8 | offset to field `name` (string) + +0x1460 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1494 | offset to field `type` (table) + +0x1464 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1470 | offset to field `attributes` (vector) + +0x1468 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x146C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x10B4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x146C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x10B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x10BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x10C0 | offset to table[0] + +0x1470 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1474 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1478 | offset to table[0] table (reflection.KeyValue): - +0x10C0 | 5C DB FF FF | SOffset32 | 0xFFFFDB5C (-9380) Loc: +0x3564 | offset to vtable - +0x10C4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x10D4 | offset to field `key` (string) - +0x10C8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x10CC | offset to field `value` (string) + +0x1478 | 5C DB FF FF | SOffset32 | 0xFFFFDB5C (-9380) Loc: +0x391C | offset to vtable + +0x147C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x148C | offset to field `key` (string) + +0x1480 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1484 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x10CC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x10D0 | 35 32 | char[2] | 52 | string literal - +0x10D2 | 00 | char | 0x00 (0) | string terminator + +0x1484 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1488 | 35 32 | char[2] | 52 | string literal + +0x148A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x10D4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x10D8 | 69 64 | char[2] | id | string literal - +0x10DA | 00 | char | 0x00 (0) | string terminator + +0x148C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1490 | 69 64 | char[2] | id | string literal + +0x1492 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x10DC | D8 DA FF FF | SOffset32 | 0xFFFFDAD8 (-9512) Loc: +0x3604 | offset to vtable - +0x10E0 | 00 00 00 | uint8_t[3] | ... | padding - +0x10E3 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x10E4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) - +0x10E8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x10EC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1494 | D8 DA FF FF | SOffset32 | 0xFFFFDAD8 (-9512) Loc: +0x39BC | offset to vtable + +0x1498 | 00 00 00 | uint8_t[3] | ... | padding + +0x149B | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x149C | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) + +0x14A0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x14A4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x10F0 | 1A 00 00 00 | uint32_t | 0x0000001A (26) | length of string - +0x10F4 | 6C 6F 6E 67 5F 65 6E 75 | char[26] | long_enu | string literal - +0x10FC | 6D 5F 6E 6F 6E 5F 65 6E | | m_non_en - +0x1104 | 75 6D 5F 64 65 66 61 75 | | um_defau - +0x110C | 6C 74 | | lt - +0x110E | 00 | char | 0x00 (0) | string terminator + +0x14A8 | 1A 00 00 00 | uint32_t | 0x0000001A (26) | length of string + +0x14AC | 6C 6F 6E 67 5F 65 6E 75 | char[26] | long_enu | string literal + +0x14B4 | 6D 5F 6E 6F 6E 5F 65 6E | | m_non_en + +0x14BC | 75 6D 5F 64 65 66 61 75 | | um_defau + +0x14C4 | 6C 74 | | lt + +0x14C6 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1110 | EC E5 FF FF | SOffset32 | 0xFFFFE5EC (-6676) Loc: +0x2B24 | offset to vtable - +0x1114 | 00 00 00 | uint8_t[3] | ... | padding - +0x1117 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1118 | 33 00 | uint16_t | 0x0033 (51) | table field `id` (UShort) - +0x111A | 6A 00 | uint16_t | 0x006A (106) | table field `offset` (UShort) - +0x111C | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x1190 | offset to field `name` (string) - +0x1120 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x1180 | offset to field `type` (table) - +0x1124 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1130 | offset to field `attributes` (vector) - +0x1128 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x112C | offset to field `documentation` (vector) + +0x14C8 | EC E5 FF FF | SOffset32 | 0xFFFFE5EC (-6676) Loc: +0x2EDC | offset to vtable + +0x14CC | 00 00 00 | uint8_t[3] | ... | padding + +0x14CF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x14D0 | 33 00 | uint16_t | 0x0033 (51) | table field `id` (UShort) + +0x14D2 | 6A 00 | uint16_t | 0x006A (106) | table field `offset` (UShort) + +0x14D4 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x1548 | offset to field `name` (string) + +0x14D8 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x1538 | offset to field `type` (table) + +0x14DC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x14E8 | offset to field `attributes` (vector) + +0x14E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x14E4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x112C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x14E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1130 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x1134 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x1164 | offset to table[0] - +0x1138 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x113C | offset to table[1] + +0x14E8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x14EC | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x151C | offset to table[0] + +0x14F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x14F4 | offset to table[1] table (reflection.KeyValue): - +0x113C | D8 DB FF FF | SOffset32 | 0xFFFFDBD8 (-9256) Loc: +0x3564 | offset to vtable - +0x1140 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1150 | offset to field `key` (string) - +0x1144 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1148 | offset to field `value` (string) + +0x14F4 | D8 DB FF FF | SOffset32 | 0xFFFFDBD8 (-9256) Loc: +0x391C | offset to vtable + +0x14F8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1508 | offset to field `key` (string) + +0x14FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1500 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1148 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x114C | 30 | char[1] | 0 | string literal - +0x114D | 00 | char | 0x00 (0) | string terminator + +0x1500 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x1504 | 30 | char[1] | 0 | string literal + +0x1505 | 00 | char | 0x00 (0) | string terminator padding: - +0x114E | 00 00 | uint8_t[2] | .. | padding + +0x1506 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1150 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string - +0x1154 | 6E 61 74 69 76 65 5F 69 | char[13] | native_i | string literal - +0x115C | 6E 6C 69 6E 65 | | nline - +0x1161 | 00 | char | 0x00 (0) | string terminator + +0x1508 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string + +0x150C | 6E 61 74 69 76 65 5F 69 | char[13] | native_i | string literal + +0x1514 | 6E 6C 69 6E 65 | | nline + +0x1519 | 00 | char | 0x00 (0) | string terminator padding: - +0x1162 | 00 00 | uint8_t[2] | .. | padding + +0x151A | 00 00 | uint8_t[2] | .. | padding table (reflection.KeyValue): - +0x1164 | 00 DC FF FF | SOffset32 | 0xFFFFDC00 (-9216) Loc: +0x3564 | offset to vtable - +0x1168 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1178 | offset to field `key` (string) - +0x116C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1170 | offset to field `value` (string) + +0x151C | 00 DC FF FF | SOffset32 | 0xFFFFDC00 (-9216) Loc: +0x391C | offset to vtable + +0x1520 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1530 | offset to field `key` (string) + +0x1524 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1528 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1170 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1174 | 35 31 | char[2] | 51 | string literal - +0x1176 | 00 | char | 0x00 (0) | string terminator + +0x1528 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x152C | 35 31 | char[2] | 51 | string literal + +0x152E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1178 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x117C | 69 64 | char[2] | id | string literal - +0x117E | 00 | char | 0x00 (0) | string terminator + +0x1530 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1534 | 69 64 | char[2] | id | string literal + +0x1536 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1180 | C8 D8 FF FF | SOffset32 | 0xFFFFD8C8 (-10040) Loc: +0x38B8 | offset to vtable - +0x1184 | 00 00 00 | uint8_t[3] | ... | padding - +0x1187 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x1188 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) - +0x118C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1538 | C8 D8 FF FF | SOffset32 | 0xFFFFD8C8 (-10040) Loc: +0x3C70 | offset to vtable + +0x153C | 00 00 00 | uint8_t[3] | ... | padding + +0x153F | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x1540 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) + +0x1544 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1190 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string - +0x1194 | 6E 61 74 69 76 65 5F 69 | char[13] | native_i | string literal - +0x119C | 6E 6C 69 6E 65 | | nline - +0x11A1 | 00 | char | 0x00 (0) | string terminator + +0x1548 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string + +0x154C | 6E 61 74 69 76 65 5F 69 | char[13] | native_i | string literal + +0x1554 | 6E 6C 69 6E 65 | | nline + +0x1559 | 00 | char | 0x00 (0) | string terminator padding: - +0x11A2 | 00 00 | uint8_t[2] | .. | padding + +0x155A | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x11A4 | 80 E6 FF FF | SOffset32 | 0xFFFFE680 (-6528) Loc: +0x2B24 | offset to vtable - +0x11A8 | 00 00 00 | uint8_t[3] | ... | padding - +0x11AB | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x11AC | 32 00 | uint16_t | 0x0032 (50) | table field `id` (UShort) - +0x11AE | 68 00 | uint16_t | 0x0068 (104) | table field `offset` (UShort) - +0x11B0 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x11F8 | offset to field `name` (string) - +0x11B4 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x11E8 | offset to field `type` (table) - +0x11B8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x11C4 | offset to field `attributes` (vector) - +0x11BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x11C0 | offset to field `documentation` (vector) + +0x155C | 80 E6 FF FF | SOffset32 | 0xFFFFE680 (-6528) Loc: +0x2EDC | offset to vtable + +0x1560 | 00 00 00 | uint8_t[3] | ... | padding + +0x1563 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1564 | 32 00 | uint16_t | 0x0032 (50) | table field `id` (UShort) + +0x1566 | 68 00 | uint16_t | 0x0068 (104) | table field `offset` (UShort) + +0x1568 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x15B0 | offset to field `name` (string) + +0x156C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x15A0 | offset to field `type` (table) + +0x1570 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x157C | offset to field `attributes` (vector) + +0x1574 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1578 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x11C0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1578 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x11C4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x11C8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x11CC | offset to table[0] + +0x157C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1580 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1584 | offset to table[0] table (reflection.KeyValue): - +0x11CC | 68 DC FF FF | SOffset32 | 0xFFFFDC68 (-9112) Loc: +0x3564 | offset to vtable - +0x11D0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x11E0 | offset to field `key` (string) - +0x11D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x11D8 | offset to field `value` (string) + +0x1584 | 68 DC FF FF | SOffset32 | 0xFFFFDC68 (-9112) Loc: +0x391C | offset to vtable + +0x1588 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1598 | offset to field `key` (string) + +0x158C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1590 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x11D8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x11DC | 35 30 | char[2] | 50 | string literal - +0x11DE | 00 | char | 0x00 (0) | string terminator + +0x1590 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1594 | 35 30 | char[2] | 50 | string literal + +0x1596 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x11E0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x11E4 | 69 64 | char[2] | id | string literal - +0x11E6 | 00 | char | 0x00 (0) | string terminator + +0x1598 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x159C | 69 64 | char[2] | id | string literal + +0x159E | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x11E8 | 38 E8 FF FF | SOffset32 | 0xFFFFE838 (-6088) Loc: +0x29B0 | offset to vtable - +0x11EC | 00 00 | uint8_t[2] | .. | padding - +0x11EE | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x11EF | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x11F0 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x11F4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x15A0 | 38 E8 FF FF | SOffset32 | 0xFFFFE838 (-6088) Loc: +0x2D68 | offset to vtable + +0x15A4 | 00 00 | uint8_t[2] | .. | padding + +0x15A6 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x15A7 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x15A8 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x15AC | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x11F8 | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string - +0x11FC | 73 63 61 6C 61 72 5F 6B | char[24] | scalar_k | string literal - +0x1204 | 65 79 5F 73 6F 72 74 65 | | ey_sorte - +0x120C | 64 5F 74 61 62 6C 65 73 | | d_tables - +0x1214 | 00 | char | 0x00 (0) | string terminator + +0x15B0 | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string + +0x15B4 | 73 63 61 6C 61 72 5F 6B | char[24] | scalar_k | string literal + +0x15BC | 65 79 5F 73 6F 72 74 65 | | ey_sorte + +0x15C4 | 64 5F 74 61 62 6C 65 73 | | d_tables + +0x15CC | 00 | char | 0x00 (0) | string terminator padding: - +0x1215 | 00 00 00 | uint8_t[3] | ... | padding + +0x15CD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x1218 | F4 E6 FF FF | SOffset32 | 0xFFFFE6F4 (-6412) Loc: +0x2B24 | offset to vtable - +0x121C | 00 00 00 | uint8_t[3] | ... | padding - +0x121F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1220 | 31 00 | uint16_t | 0x0031 (49) | table field `id` (UShort) - +0x1222 | 66 00 | uint16_t | 0x0066 (102) | table field `offset` (UShort) - +0x1224 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x129C | offset to field `name` (string) - +0x1228 | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x1290 | offset to field `type` (table) - +0x122C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1238 | offset to field `attributes` (vector) - +0x1230 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1234 | offset to field `documentation` (vector) + +0x15D0 | F4 E6 FF FF | SOffset32 | 0xFFFFE6F4 (-6412) Loc: +0x2EDC | offset to vtable + +0x15D4 | 00 00 00 | uint8_t[3] | ... | padding + +0x15D7 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x15D8 | 31 00 | uint16_t | 0x0031 (49) | table field `id` (UShort) + +0x15DA | 66 00 | uint16_t | 0x0066 (102) | table field `offset` (UShort) + +0x15DC | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x1654 | offset to field `name` (string) + +0x15E0 | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x1648 | offset to field `type` (table) + +0x15E4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x15F0 | offset to field `attributes` (vector) + +0x15E8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x15EC | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1234 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x15EC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1238 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x123C | 38 00 00 00 | UOffset32 | 0x00000038 (56) Loc: +0x1274 | offset to table[0] - +0x1240 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1244 | offset to table[1] + +0x15F0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x15F4 | 38 00 00 00 | UOffset32 | 0x00000038 (56) Loc: +0x162C | offset to table[0] + +0x15F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x15FC | offset to table[1] table (reflection.KeyValue): - +0x1244 | E0 DC FF FF | SOffset32 | 0xFFFFDCE0 (-8992) Loc: +0x3564 | offset to vtable - +0x1248 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x125C | offset to field `key` (string) - +0x124C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1250 | offset to field `value` (string) + +0x15FC | E0 DC FF FF | SOffset32 | 0xFFFFDCE0 (-8992) Loc: +0x391C | offset to vtable + +0x1600 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1614 | offset to field `key` (string) + +0x1604 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1608 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1250 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x1254 | 4D 6F 6E 73 74 65 72 | char[7] | Monster | string literal - +0x125B | 00 | char | 0x00 (0) | string terminator + +0x1608 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x160C | 4D 6F 6E 73 74 65 72 | char[7] | Monster | string literal + +0x1613 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x125C | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x1260 | 6E 65 73 74 65 64 5F 66 | char[17] | nested_f | string literal - +0x1268 | 6C 61 74 62 75 66 66 65 | | latbuffe - +0x1270 | 72 | | r - +0x1271 | 00 | char | 0x00 (0) | string terminator + +0x1614 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x1618 | 6E 65 73 74 65 64 5F 66 | char[17] | nested_f | string literal + +0x1620 | 6C 61 74 62 75 66 66 65 | | latbuffe + +0x1628 | 72 | | r + +0x1629 | 00 | char | 0x00 (0) | string terminator padding: - +0x1272 | 00 00 | uint8_t[2] | .. | padding + +0x162A | 00 00 | uint8_t[2] | .. | padding table (reflection.KeyValue): - +0x1274 | 10 DD FF FF | SOffset32 | 0xFFFFDD10 (-8944) Loc: +0x3564 | offset to vtable - +0x1278 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1288 | offset to field `key` (string) - +0x127C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1280 | offset to field `value` (string) + +0x162C | 10 DD FF FF | SOffset32 | 0xFFFFDD10 (-8944) Loc: +0x391C | offset to vtable + +0x1630 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1640 | offset to field `key` (string) + +0x1634 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1638 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1280 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1284 | 34 39 | char[2] | 49 | string literal - +0x1286 | 00 | char | 0x00 (0) | string terminator + +0x1638 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x163C | 34 39 | char[2] | 49 | string literal + +0x163E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1288 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x128C | 69 64 | char[2] | id | string literal - +0x128E | 00 | char | 0x00 (0) | string terminator + +0x1640 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1644 | 69 64 | char[2] | id | string literal + +0x1646 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1290 | 0C E7 FF FF | SOffset32 | 0xFFFFE70C (-6388) Loc: +0x2B84 | offset to vtable - +0x1294 | 00 00 | uint8_t[2] | .. | padding - +0x1296 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1297 | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) - +0x1298 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1648 | 0C E7 FF FF | SOffset32 | 0xFFFFE70C (-6388) Loc: +0x2F3C | offset to vtable + +0x164C | 00 00 | uint8_t[2] | .. | padding + +0x164E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x164F | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) + +0x1650 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x129C | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string - +0x12A0 | 74 65 73 74 72 65 71 75 | char[28] | testrequ | string literal - +0x12A8 | 69 72 65 64 6E 65 73 74 | | irednest - +0x12B0 | 65 64 66 6C 61 74 62 75 | | edflatbu - +0x12B8 | 66 66 65 72 | | ffer - +0x12BC | 00 | char | 0x00 (0) | string terminator + +0x1654 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string + +0x1658 | 74 65 73 74 72 65 71 75 | char[28] | testrequ | string literal + +0x1660 | 69 72 65 64 6E 65 73 74 | | irednest + +0x1668 | 65 64 66 6C 61 74 62 75 | | edflatbu + +0x1670 | 66 66 65 72 | | ffer + +0x1674 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x12BE | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x12C0 | 20 00 | uint16_t | 0x0020 (32) | size of referring table - +0x12C2 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x12C4 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x12C6 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) - +0x12C8 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x12CA | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_integer` (id: 4) - +0x12CC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x12CE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x12D0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x12D2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x12D4 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x12D6 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x1676 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x1678 | 20 00 | uint16_t | 0x0020 (32) | size of referring table + +0x167A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x167C | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x167E | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x1680 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x1682 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_integer` (id: 4) + +0x1684 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x1686 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x1688 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x168A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x168C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x168E | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x12D8 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x12BE | offset to vtable - +0x12DC | 30 00 | uint16_t | 0x0030 (48) | table field `id` (UShort) - +0x12DE | 64 00 | uint16_t | 0x0064 (100) | table field `offset` (UShort) - +0x12E0 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x1334 | offset to field `name` (string) - +0x12E4 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x1320 | offset to field `type` (table) - +0x12E8 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x12FC | offset to field `attributes` (vector) - +0x12EC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x12F8 | offset to field `documentation` (vector) - +0x12F0 | FF FF FF FF FF FF FF FF | int64_t | 0xFFFFFFFFFFFFFFFF (-1) | table field `default_integer` (Long) + +0x1690 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x1676 | offset to vtable + +0x1694 | 30 00 | uint16_t | 0x0030 (48) | table field `id` (UShort) + +0x1696 | 64 00 | uint16_t | 0x0064 (100) | table field `offset` (UShort) + +0x1698 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x16EC | offset to field `name` (string) + +0x169C | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x16D8 | offset to field `type` (table) + +0x16A0 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x16B4 | offset to field `attributes` (vector) + +0x16A4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x16B0 | offset to field `documentation` (vector) + +0x16A8 | FF FF FF FF FF FF FF FF | int64_t | 0xFFFFFFFFFFFFFFFF (-1) | table field `default_integer` (Long) vector (reflection.Field.documentation): - +0x12F8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x16B0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x12FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1300 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1304 | offset to table[0] + +0x16B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x16B8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x16BC | offset to table[0] table (reflection.KeyValue): - +0x1304 | A0 DD FF FF | SOffset32 | 0xFFFFDDA0 (-8800) Loc: +0x3564 | offset to vtable - +0x1308 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1318 | offset to field `key` (string) - +0x130C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1310 | offset to field `value` (string) + +0x16BC | A0 DD FF FF | SOffset32 | 0xFFFFDDA0 (-8800) Loc: +0x391C | offset to vtable + +0x16C0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x16D0 | offset to field `key` (string) + +0x16C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x16C8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1310 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1314 | 34 38 | char[2] | 48 | string literal - +0x1316 | 00 | char | 0x00 (0) | string terminator + +0x16C8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x16CC | 34 38 | char[2] | 48 | string literal + +0x16CE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1318 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x131C | 69 64 | char[2] | id | string literal - +0x131E | 00 | char | 0x00 (0) | string terminator + +0x16D0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x16D4 | 69 64 | char[2] | id | string literal + +0x16D6 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1320 | 1C DD FF FF | SOffset32 | 0xFFFFDD1C (-8932) Loc: +0x3604 | offset to vtable - +0x1324 | 00 00 00 | uint8_t[3] | ... | padding - +0x1327 | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) - +0x1328 | 05 00 00 00 | uint32_t | 0x00000005 (5) | table field `index` (Int) - +0x132C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x1330 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x16D8 | 1C DD FF FF | SOffset32 | 0xFFFFDD1C (-8932) Loc: +0x39BC | offset to vtable + +0x16DC | 00 00 00 | uint8_t[3] | ... | padding + +0x16DF | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) + +0x16E0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | table field `index` (Int) + +0x16E4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x16E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1334 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1338 | 73 69 67 6E 65 64 5F 65 | char[11] | signed_e | string literal - +0x1340 | 6E 75 6D | | num - +0x1343 | 00 | char | 0x00 (0) | string terminator + +0x16EC | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x16F0 | 73 69 67 6E 65 64 5F 65 | char[11] | signed_e | string literal + +0x16F8 | 6E 75 6D | | num + +0x16FB | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1344 | 20 E8 FF FF | SOffset32 | 0xFFFFE820 (-6112) Loc: +0x2B24 | offset to vtable - +0x1348 | 00 00 00 | uint8_t[3] | ... | padding - +0x134B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x134C | 2F 00 | uint16_t | 0x002F (47) | table field `id` (UShort) - +0x134E | 62 00 | uint16_t | 0x0062 (98) | table field `offset` (UShort) - +0x1350 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1398 | offset to field `name` (string) - +0x1354 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1388 | offset to field `type` (table) - +0x1358 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1364 | offset to field `attributes` (vector) - +0x135C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1360 | offset to field `documentation` (vector) + +0x16FC | 20 E8 FF FF | SOffset32 | 0xFFFFE820 (-6112) Loc: +0x2EDC | offset to vtable + +0x1700 | 00 00 00 | uint8_t[3] | ... | padding + +0x1703 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1704 | 2F 00 | uint16_t | 0x002F (47) | table field `id` (UShort) + +0x1706 | 62 00 | uint16_t | 0x0062 (98) | table field `offset` (UShort) + +0x1708 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1750 | offset to field `name` (string) + +0x170C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1740 | offset to field `type` (table) + +0x1710 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x171C | offset to field `attributes` (vector) + +0x1714 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1718 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1360 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1718 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1364 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1368 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x136C | offset to table[0] + +0x171C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1720 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1724 | offset to table[0] table (reflection.KeyValue): - +0x136C | 08 DE FF FF | SOffset32 | 0xFFFFDE08 (-8696) Loc: +0x3564 | offset to vtable - +0x1370 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1380 | offset to field `key` (string) - +0x1374 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1378 | offset to field `value` (string) + +0x1724 | 08 DE FF FF | SOffset32 | 0xFFFFDE08 (-8696) Loc: +0x391C | offset to vtable + +0x1728 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1738 | offset to field `key` (string) + +0x172C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1730 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1378 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x137C | 34 37 | char[2] | 47 | string literal - +0x137E | 00 | char | 0x00 (0) | string terminator + +0x1730 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1734 | 34 37 | char[2] | 47 | string literal + +0x1736 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1380 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1384 | 69 64 | char[2] | id | string literal - +0x1386 | 00 | char | 0x00 (0) | string terminator + +0x1738 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x173C | 69 64 | char[2] | id | string literal + +0x173E | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1388 | D8 E9 FF FF | SOffset32 | 0xFFFFE9D8 (-5672) Loc: +0x29B0 | offset to vtable - +0x138C | 00 00 | uint8_t[2] | .. | padding - +0x138E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x138F | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) - +0x1390 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x1394 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1740 | D8 E9 FF FF | SOffset32 | 0xFFFFE9D8 (-5672) Loc: +0x2D68 | offset to vtable + +0x1744 | 00 00 | uint8_t[2] | .. | padding + +0x1746 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x1747 | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) + +0x1748 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x174C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1398 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string - +0x139C | 76 65 63 74 6F 72 5F 6F | char[15] | vector_o | string literal - +0x13A4 | 66 5F 65 6E 75 6D 73 | | f_enums - +0x13AB | 00 | char | 0x00 (0) | string terminator + +0x1750 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string + +0x1754 | 76 65 63 74 6F 72 5F 6F | char[15] | vector_o | string literal + +0x175C | 66 5F 65 6E 75 6D 73 | | f_enums + +0x1763 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x13AC | 88 E8 FF FF | SOffset32 | 0xFFFFE888 (-6008) Loc: +0x2B24 | offset to vtable - +0x13B0 | 00 00 00 | uint8_t[3] | ... | padding - +0x13B3 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x13B4 | 2E 00 | uint16_t | 0x002E (46) | table field `id` (UShort) - +0x13B6 | 60 00 | uint16_t | 0x0060 (96) | table field `offset` (UShort) - +0x13B8 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1400 | offset to field `name` (string) - +0x13BC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x13F0 | offset to field `type` (table) - +0x13C0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x13CC | offset to field `attributes` (vector) - +0x13C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x13C8 | offset to field `documentation` (vector) + +0x1764 | 88 E8 FF FF | SOffset32 | 0xFFFFE888 (-6008) Loc: +0x2EDC | offset to vtable + +0x1768 | 00 00 00 | uint8_t[3] | ... | padding + +0x176B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x176C | 2E 00 | uint16_t | 0x002E (46) | table field `id` (UShort) + +0x176E | 60 00 | uint16_t | 0x0060 (96) | table field `offset` (UShort) + +0x1770 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x17B8 | offset to field `name` (string) + +0x1774 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x17A8 | offset to field `type` (table) + +0x1778 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1784 | offset to field `attributes` (vector) + +0x177C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1780 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x13C8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1780 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x13CC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x13D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x13D4 | offset to table[0] + +0x1784 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x1788 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x178C | offset to table[0] table (reflection.KeyValue): - +0x13D4 | 70 DE FF FF | SOffset32 | 0xFFFFDE70 (-8592) Loc: +0x3564 | offset to vtable - +0x13D8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x13E8 | offset to field `key` (string) - +0x13DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x13E0 | offset to field `value` (string) + +0x178C | 70 DE FF FF | SOffset32 | 0xFFFFDE70 (-8592) Loc: +0x391C | offset to vtable + +0x1790 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x17A0 | offset to field `key` (string) + +0x1794 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1798 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x13E0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x13E4 | 34 36 | char[2] | 46 | string literal - +0x13E6 | 00 | char | 0x00 (0) | string terminator + +0x1798 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x179C | 34 36 | char[2] | 46 | string literal + +0x179E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x13E8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x13EC | 69 64 | char[2] | id | string literal - +0x13EE | 00 | char | 0x00 (0) | string terminator + +0x17A0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x17A4 | 69 64 | char[2] | id | string literal + +0x17A6 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x13F0 | 38 DB FF FF | SOffset32 | 0xFFFFDB38 (-9416) Loc: +0x38B8 | offset to vtable - +0x13F4 | 00 00 00 | uint8_t[3] | ... | padding - +0x13F7 | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) - +0x13F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) - +0x13FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x17A8 | 38 DB FF FF | SOffset32 | 0xFFFFDB38 (-9416) Loc: +0x3C70 | offset to vtable + +0x17AC | 00 00 00 | uint8_t[3] | ... | padding + +0x17AF | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) + +0x17B0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) + +0x17B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1400 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string - +0x1404 | 61 6E 79 5F 61 6D 62 69 | char[13] | any_ambi | string literal - +0x140C | 67 75 6F 75 73 | | guous - +0x1411 | 00 | char | 0x00 (0) | string terminator + +0x17B8 | 0D 00 00 00 | uint32_t | 0x0000000D (13) | length of string + +0x17BC | 61 6E 79 5F 61 6D 62 69 | char[13] | any_ambi | string literal + +0x17C4 | 67 75 6F 75 73 | | guous + +0x17C9 | 00 | char | 0x00 (0) | string terminator padding: - +0x1412 | 00 00 | uint8_t[2] | .. | padding + +0x17CA | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1414 | DA E9 FF FF | SOffset32 | 0xFFFFE9DA (-5670) Loc: +0x2A3A | offset to vtable - +0x1418 | 2D 00 | uint16_t | 0x002D (45) | table field `id` (UShort) - +0x141A | 5E 00 | uint16_t | 0x005E (94) | table field `offset` (UShort) - +0x141C | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x1468 | offset to field `name` (string) - +0x1420 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1454 | offset to field `type` (table) - +0x1424 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1430 | offset to field `attributes` (vector) - +0x1428 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x142C | offset to field `documentation` (vector) + +0x17CC | DA E9 FF FF | SOffset32 | 0xFFFFE9DA (-5670) Loc: +0x2DF2 | offset to vtable + +0x17D0 | 2D 00 | uint16_t | 0x002D (45) | table field `id` (UShort) + +0x17D2 | 5E 00 | uint16_t | 0x005E (94) | table field `offset` (UShort) + +0x17D4 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x1820 | offset to field `name` (string) + +0x17D8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x180C | offset to field `type` (table) + +0x17DC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x17E8 | offset to field `attributes` (vector) + +0x17E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17E4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x142C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x17E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1430 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1434 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1438 | offset to table[0] + +0x17E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x17EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17F0 | offset to table[0] table (reflection.KeyValue): - +0x1438 | D4 DE FF FF | SOffset32 | 0xFFFFDED4 (-8492) Loc: +0x3564 | offset to vtable - +0x143C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x144C | offset to field `key` (string) - +0x1440 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1444 | offset to field `value` (string) + +0x17F0 | D4 DE FF FF | SOffset32 | 0xFFFFDED4 (-8492) Loc: +0x391C | offset to vtable + +0x17F4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1804 | offset to field `key` (string) + +0x17F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17FC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1444 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1448 | 34 35 | char[2] | 45 | string literal - +0x144A | 00 | char | 0x00 (0) | string terminator + +0x17FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1800 | 34 35 | char[2] | 45 | string literal + +0x1802 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x144C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1450 | 69 64 | char[2] | id | string literal - +0x1452 | 00 | char | 0x00 (0) | string terminator + +0x1804 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1808 | 69 64 | char[2] | id | string literal + +0x180A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1454 | 50 DE FF FF | SOffset32 | 0xFFFFDE50 (-8624) Loc: +0x3604 | offset to vtable - +0x1458 | 00 00 00 | uint8_t[3] | ... | padding - +0x145B | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) - +0x145C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) - +0x1460 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x1464 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x180C | 50 DE FF FF | SOffset32 | 0xFFFFDE50 (-8624) Loc: +0x39BC | offset to vtable + +0x1810 | 00 00 00 | uint8_t[3] | ... | padding + +0x1813 | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) + +0x1814 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) + +0x1818 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x181C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1468 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string - +0x146C | 61 6E 79 5F 61 6D 62 69 | char[18] | any_ambi | string literal - +0x1474 | 67 75 6F 75 73 5F 74 79 | | guous_ty - +0x147C | 70 65 | | pe - +0x147E | 00 | char | 0x00 (0) | string terminator + +0x1820 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string + +0x1824 | 61 6E 79 5F 61 6D 62 69 | char[18] | any_ambi | string literal + +0x182C | 67 75 6F 75 73 5F 74 79 | | guous_ty + +0x1834 | 70 65 | | pe + +0x1836 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1480 | 5C E9 FF FF | SOffset32 | 0xFFFFE95C (-5796) Loc: +0x2B24 | offset to vtable - +0x1484 | 00 00 00 | uint8_t[3] | ... | padding - +0x1487 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1488 | 2C 00 | uint16_t | 0x002C (44) | table field `id` (UShort) - +0x148A | 5C 00 | uint16_t | 0x005C (92) | table field `offset` (UShort) - +0x148C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x14D4 | offset to field `name` (string) - +0x1490 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x14C4 | offset to field `type` (table) - +0x1494 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x14A0 | offset to field `attributes` (vector) - +0x1498 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x149C | offset to field `documentation` (vector) + +0x1838 | 5C E9 FF FF | SOffset32 | 0xFFFFE95C (-5796) Loc: +0x2EDC | offset to vtable + +0x183C | 00 00 00 | uint8_t[3] | ... | padding + +0x183F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1840 | 2C 00 | uint16_t | 0x002C (44) | table field `id` (UShort) + +0x1842 | 5C 00 | uint16_t | 0x005C (92) | table field `offset` (UShort) + +0x1844 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x188C | offset to field `name` (string) + +0x1848 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x187C | offset to field `type` (table) + +0x184C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1858 | offset to field `attributes` (vector) + +0x1850 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1854 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x149C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1854 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x14A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x14A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x14A8 | offset to table[0] + +0x1858 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x185C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1860 | offset to table[0] table (reflection.KeyValue): - +0x14A8 | 44 DF FF FF | SOffset32 | 0xFFFFDF44 (-8380) Loc: +0x3564 | offset to vtable - +0x14AC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x14BC | offset to field `key` (string) - +0x14B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x14B4 | offset to field `value` (string) + +0x1860 | 44 DF FF FF | SOffset32 | 0xFFFFDF44 (-8380) Loc: +0x391C | offset to vtable + +0x1864 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1874 | offset to field `key` (string) + +0x1868 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x186C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x14B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x14B8 | 34 34 | char[2] | 44 | string literal - +0x14BA | 00 | char | 0x00 (0) | string terminator + +0x186C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1870 | 34 34 | char[2] | 44 | string literal + +0x1872 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x14BC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x14C0 | 69 64 | char[2] | id | string literal - +0x14C2 | 00 | char | 0x00 (0) | string terminator + +0x1874 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1878 | 69 64 | char[2] | id | string literal + +0x187A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x14C4 | 0C DC FF FF | SOffset32 | 0xFFFFDC0C (-9204) Loc: +0x38B8 | offset to vtable - +0x14C8 | 00 00 00 | uint8_t[3] | ... | padding - +0x14CB | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) - +0x14CC | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) - +0x14D0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x187C | 0C DC FF FF | SOffset32 | 0xFFFFDC0C (-9204) Loc: +0x3C70 | offset to vtable + +0x1880 | 00 00 00 | uint8_t[3] | ... | padding + +0x1883 | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) + +0x1884 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) + +0x1888 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x14D4 | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string - +0x14D8 | 61 6E 79 5F 75 6E 69 71 | char[10] | any_uniq | string literal - +0x14E0 | 75 65 | | ue - +0x14E2 | 00 | char | 0x00 (0) | string terminator + +0x188C | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string + +0x1890 | 61 6E 79 5F 75 6E 69 71 | char[10] | any_uniq | string literal + +0x1898 | 75 65 | | ue + +0x189A | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x14E4 | AA EA FF FF | SOffset32 | 0xFFFFEAAA (-5462) Loc: +0x2A3A | offset to vtable - +0x14E8 | 2B 00 | uint16_t | 0x002B (43) | table field `id` (UShort) - +0x14EA | 5A 00 | uint16_t | 0x005A (90) | table field `offset` (UShort) - +0x14EC | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x1538 | offset to field `name` (string) - +0x14F0 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1524 | offset to field `type` (table) - +0x14F4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1500 | offset to field `attributes` (vector) - +0x14F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x14FC | offset to field `documentation` (vector) + +0x189C | AA EA FF FF | SOffset32 | 0xFFFFEAAA (-5462) Loc: +0x2DF2 | offset to vtable + +0x18A0 | 2B 00 | uint16_t | 0x002B (43) | table field `id` (UShort) + +0x18A2 | 5A 00 | uint16_t | 0x005A (90) | table field `offset` (UShort) + +0x18A4 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x18F0 | offset to field `name` (string) + +0x18A8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x18DC | offset to field `type` (table) + +0x18AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x18B8 | offset to field `attributes` (vector) + +0x18B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x18B4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x14FC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x18B4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1500 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1504 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1508 | offset to table[0] + +0x18B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x18BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x18C0 | offset to table[0] table (reflection.KeyValue): - +0x1508 | A4 DF FF FF | SOffset32 | 0xFFFFDFA4 (-8284) Loc: +0x3564 | offset to vtable - +0x150C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x151C | offset to field `key` (string) - +0x1510 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1514 | offset to field `value` (string) + +0x18C0 | A4 DF FF FF | SOffset32 | 0xFFFFDFA4 (-8284) Loc: +0x391C | offset to vtable + +0x18C4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x18D4 | offset to field `key` (string) + +0x18C8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x18CC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1514 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1518 | 34 33 | char[2] | 43 | string literal - +0x151A | 00 | char | 0x00 (0) | string terminator + +0x18CC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x18D0 | 34 33 | char[2] | 43 | string literal + +0x18D2 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x151C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1520 | 69 64 | char[2] | id | string literal - +0x1522 | 00 | char | 0x00 (0) | string terminator + +0x18D4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x18D8 | 69 64 | char[2] | id | string literal + +0x18DA | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1524 | 20 DF FF FF | SOffset32 | 0xFFFFDF20 (-8416) Loc: +0x3604 | offset to vtable - +0x1528 | 00 00 00 | uint8_t[3] | ... | padding - +0x152B | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) - +0x152C | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) - +0x1530 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x1534 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x18DC | 20 DF FF FF | SOffset32 | 0xFFFFDF20 (-8416) Loc: +0x39BC | offset to vtable + +0x18E0 | 00 00 00 | uint8_t[3] | ... | padding + +0x18E3 | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) + +0x18E4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) + +0x18E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x18EC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1538 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string - +0x153C | 61 6E 79 5F 75 6E 69 71 | char[15] | any_uniq | string literal - +0x1544 | 75 65 5F 74 79 70 65 | | ue_type - +0x154B | 00 | char | 0x00 (0) | string terminator + +0x18F0 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string + +0x18F4 | 61 6E 79 5F 75 6E 69 71 | char[15] | any_uniq | string literal + +0x18FC | 75 65 5F 74 79 70 65 | | ue_type + +0x1903 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x154C | 28 EA FF FF | SOffset32 | 0xFFFFEA28 (-5592) Loc: +0x2B24 | offset to vtable - +0x1550 | 00 00 00 | uint8_t[3] | ... | padding - +0x1553 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1554 | 2A 00 | uint16_t | 0x002A (42) | table field `id` (UShort) - +0x1556 | 58 00 | uint16_t | 0x0058 (88) | table field `offset` (UShort) - +0x1558 | 00 01 00 00 | UOffset32 | 0x00000100 (256) Loc: +0x1658 | offset to field `name` (string) - +0x155C | F0 00 00 00 | UOffset32 | 0x000000F0 (240) Loc: +0x164C | offset to field `type` (table) - +0x1560 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x156C | offset to field `attributes` (vector) - +0x1564 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1568 | offset to field `documentation` (vector) + +0x1904 | 28 EA FF FF | SOffset32 | 0xFFFFEA28 (-5592) Loc: +0x2EDC | offset to vtable + +0x1908 | 00 00 00 | uint8_t[3] | ... | padding + +0x190B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x190C | 2A 00 | uint16_t | 0x002A (42) | table field `id` (UShort) + +0x190E | 58 00 | uint16_t | 0x0058 (88) | table field `offset` (UShort) + +0x1910 | 00 01 00 00 | UOffset32 | 0x00000100 (256) Loc: +0x1A10 | offset to field `name` (string) + +0x1914 | F0 00 00 00 | UOffset32 | 0x000000F0 (240) Loc: +0x1A04 | offset to field `type` (table) + +0x1918 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1924 | offset to field `attributes` (vector) + +0x191C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1920 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1568 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1920 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x156C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) - +0x1570 | B0 00 00 00 | UOffset32 | 0x000000B0 (176) Loc: +0x1620 | offset to table[0] - +0x1574 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x15F4 | offset to table[1] - +0x1578 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x15C8 | offset to table[2] - +0x157C | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x15A0 | offset to table[3] - +0x1580 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1584 | offset to table[4] + +0x1924 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) + +0x1928 | B0 00 00 00 | UOffset32 | 0x000000B0 (176) Loc: +0x19D8 | offset to table[0] + +0x192C | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x19AC | offset to table[1] + +0x1930 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1980 | offset to table[2] + +0x1934 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1958 | offset to table[3] + +0x1938 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x193C | offset to table[4] table (reflection.KeyValue): - +0x1584 | 20 E0 FF FF | SOffset32 | 0xFFFFE020 (-8160) Loc: +0x3564 | offset to vtable - +0x1588 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1598 | offset to field `key` (string) - +0x158C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1590 | offset to field `value` (string) + +0x193C | 20 E0 FF FF | SOffset32 | 0xFFFFE020 (-8160) Loc: +0x391C | offset to vtable + +0x1940 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1950 | offset to field `key` (string) + +0x1944 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1948 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1590 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1594 | 34 32 | char[2] | 42 | string literal - +0x1596 | 00 | char | 0x00 (0) | string terminator + +0x1948 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x194C | 34 32 | char[2] | 42 | string literal + +0x194E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1598 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x159C | 69 64 | char[2] | id | string literal - +0x159E | 00 | char | 0x00 (0) | string terminator + +0x1950 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1954 | 69 64 | char[2] | id | string literal + +0x1956 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x15A0 | 3C E0 FF FF | SOffset32 | 0xFFFFE03C (-8132) Loc: +0x3564 | offset to vtable - +0x15A4 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x15BC | offset to field `key` (string) - +0x15A8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x15AC | offset to field `value` (string) + +0x1958 | 3C E0 FF FF | SOffset32 | 0xFFFFE03C (-8132) Loc: +0x391C | offset to vtable + +0x195C | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1974 | offset to field `key` (string) + +0x1960 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1964 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x15AC | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x15B0 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x15B8 | 00 | char | 0x00 (0) | string terminator + +0x1964 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1968 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1970 | 00 | char | 0x00 (0) | string terminator padding: - +0x15B9 | 00 00 00 | uint8_t[3] | ... | padding + +0x1971 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x15BC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x15C0 | 68 61 73 68 | char[4] | hash | string literal - +0x15C4 | 00 | char | 0x00 (0) | string terminator + +0x1974 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1978 | 68 61 73 68 | char[4] | hash | string literal + +0x197C | 00 | char | 0x00 (0) | string terminator padding: - +0x15C5 | 00 00 00 | uint8_t[3] | ... | padding + +0x197D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x15C8 | 64 E0 FF FF | SOffset32 | 0xFFFFE064 (-8092) Loc: +0x3564 | offset to vtable - +0x15CC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x15E4 | offset to field `key` (string) - +0x15D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x15D4 | offset to field `value` (string) + +0x1980 | 64 E0 FF FF | SOffset32 | 0xFFFFE064 (-8092) Loc: +0x391C | offset to vtable + +0x1984 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x199C | offset to field `key` (string) + +0x1988 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x198C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x15D4 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x15D8 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x15E0 | 6C 65 54 | | leT - +0x15E3 | 00 | char | 0x00 (0) | string terminator + +0x198C | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1990 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1998 | 6C 65 54 | | leT + +0x199B | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x15E4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x15E8 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x15F0 | 00 | char | 0x00 (0) | string terminator + +0x199C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x19A0 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x19A8 | 00 | char | 0x00 (0) | string terminator padding: - +0x15F1 | 00 00 00 | uint8_t[3] | ... | padding + +0x19A9 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x15F4 | 90 E0 FF FF | SOffset32 | 0xFFFFE090 (-8048) Loc: +0x3564 | offset to vtable - +0x15F8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1608 | offset to field `key` (string) - +0x15FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1600 | offset to field `value` (string) + +0x19AC | 90 E0 FF FF | SOffset32 | 0xFFFFE090 (-8048) Loc: +0x391C | offset to vtable + +0x19B0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x19C0 | offset to field `key` (string) + +0x19B4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x19B8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1600 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of string - +0x1604 | 00 | char | 0x00 (0) | string terminator + +0x19B8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of string + +0x19BC | 00 | char | 0x00 (0) | string terminator padding: - +0x1605 | 00 00 00 | uint8_t[3] | ... | padding + +0x19BD | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1608 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x160C | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal - +0x1614 | 74 79 70 65 5F 67 65 74 | | type_get - +0x161C | 00 | char | 0x00 (0) | string terminator + +0x19C0 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x19C4 | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal + +0x19CC | 74 79 70 65 5F 67 65 74 | | type_get + +0x19D4 | 00 | char | 0x00 (0) | string terminator padding: - +0x161D | 00 00 00 | uint8_t[3] | ... | padding + +0x19D5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1620 | BC E0 FF FF | SOffset32 | 0xFFFFE0BC (-8004) Loc: +0x3564 | offset to vtable - +0x1624 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1638 | offset to field `key` (string) - +0x1628 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x162C | offset to field `value` (string) + +0x19D8 | BC E0 FF FF | SOffset32 | 0xFFFFE0BC (-8004) Loc: +0x391C | offset to vtable + +0x19DC | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x19F0 | offset to field `key` (string) + +0x19E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x19E4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x162C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x1630 | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x1635 | 00 | char | 0x00 (0) | string terminator + +0x19E4 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x19E8 | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x19ED | 00 | char | 0x00 (0) | string terminator padding: - +0x1636 | 00 00 | uint8_t[2] | .. | padding + +0x19EE | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1638 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x163C | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x1644 | 74 79 70 65 | | type - +0x1648 | 00 | char | 0x00 (0) | string terminator + +0x19F0 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x19F4 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x19FC | 74 79 70 65 | | type + +0x1A00 | 00 | char | 0x00 (0) | string terminator padding: - +0x1649 | 00 00 00 | uint8_t[3] | ... | padding + +0x1A01 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x164C | C8 EA FF FF | SOffset32 | 0xFFFFEAC8 (-5432) Loc: +0x2B84 | offset to vtable - +0x1650 | 00 00 | uint8_t[2] | .. | padding - +0x1652 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1653 | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) - +0x1654 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) + +0x1A04 | C8 EA FF FF | SOffset32 | 0xFFFFEAC8 (-5432) Loc: +0x2F3C | offset to vtable + +0x1A08 | 00 00 | uint8_t[2] | .. | padding + +0x1A0A | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x1A0B | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) + +0x1A0C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1658 | 1F 00 00 00 | uint32_t | 0x0000001F (31) | length of string - +0x165C | 76 65 63 74 6F 72 5F 6F | char[31] | vector_o | string literal - +0x1664 | 66 5F 6E 6F 6E 5F 6F 77 | | f_non_ow - +0x166C | 6E 69 6E 67 5F 72 65 66 | | ning_ref - +0x1674 | 65 72 65 6E 63 65 73 | | erences - +0x167B | 00 | char | 0x00 (0) | string terminator + +0x1A10 | 1F 00 00 00 | uint32_t | 0x0000001F (31) | length of string + +0x1A14 | 76 65 63 74 6F 72 5F 6F | char[31] | vector_o | string literal + +0x1A1C | 66 5F 6E 6F 6E 5F 6F 77 | | f_non_ow + +0x1A24 | 6E 69 6E 67 5F 72 65 66 | | ning_ref + +0x1A2C | 65 72 65 6E 63 65 73 | | erences + +0x1A33 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x167C | 42 EC FF FF | SOffset32 | 0xFFFFEC42 (-5054) Loc: +0x2A3A | offset to vtable - +0x1680 | 29 00 | uint16_t | 0x0029 (41) | table field `id` (UShort) - +0x1682 | 56 00 | uint16_t | 0x0056 (86) | table field `offset` (UShort) - +0x1684 | 04 01 00 00 | UOffset32 | 0x00000104 (260) Loc: +0x1788 | offset to field `name` (string) - +0x1688 | F0 00 00 00 | UOffset32 | 0x000000F0 (240) Loc: +0x1778 | offset to field `type` (table) - +0x168C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1698 | offset to field `attributes` (vector) - +0x1690 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1694 | offset to field `documentation` (vector) + +0x1A34 | 42 EC FF FF | SOffset32 | 0xFFFFEC42 (-5054) Loc: +0x2DF2 | offset to vtable + +0x1A38 | 29 00 | uint16_t | 0x0029 (41) | table field `id` (UShort) + +0x1A3A | 56 00 | uint16_t | 0x0056 (86) | table field `offset` (UShort) + +0x1A3C | 04 01 00 00 | UOffset32 | 0x00000104 (260) Loc: +0x1B40 | offset to field `name` (string) + +0x1A40 | F0 00 00 00 | UOffset32 | 0x000000F0 (240) Loc: +0x1B30 | offset to field `type` (table) + +0x1A44 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1A50 | offset to field `attributes` (vector) + +0x1A48 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A4C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1694 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1A4C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1698 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) - +0x169C | B0 00 00 00 | UOffset32 | 0x000000B0 (176) Loc: +0x174C | offset to table[0] - +0x16A0 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1720 | offset to table[1] - +0x16A4 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x16F4 | offset to table[2] - +0x16A8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x16CC | offset to table[3] - +0x16AC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x16B0 | offset to table[4] + +0x1A50 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) + +0x1A54 | B0 00 00 00 | UOffset32 | 0x000000B0 (176) Loc: +0x1B04 | offset to table[0] + +0x1A58 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1AD8 | offset to table[1] + +0x1A5C | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1AAC | offset to table[2] + +0x1A60 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1A84 | offset to table[3] + +0x1A64 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A68 | offset to table[4] table (reflection.KeyValue): - +0x16B0 | 4C E1 FF FF | SOffset32 | 0xFFFFE14C (-7860) Loc: +0x3564 | offset to vtable - +0x16B4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x16C4 | offset to field `key` (string) - +0x16B8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x16BC | offset to field `value` (string) + +0x1A68 | 4C E1 FF FF | SOffset32 | 0xFFFFE14C (-7860) Loc: +0x391C | offset to vtable + +0x1A6C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1A7C | offset to field `key` (string) + +0x1A70 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A74 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x16BC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x16C0 | 34 31 | char[2] | 41 | string literal - +0x16C2 | 00 | char | 0x00 (0) | string terminator + +0x1A74 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1A78 | 34 31 | char[2] | 41 | string literal + +0x1A7A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x16C4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x16C8 | 69 64 | char[2] | id | string literal - +0x16CA | 00 | char | 0x00 (0) | string terminator + +0x1A7C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1A80 | 69 64 | char[2] | id | string literal + +0x1A82 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x16CC | 68 E1 FF FF | SOffset32 | 0xFFFFE168 (-7832) Loc: +0x3564 | offset to vtable - +0x16D0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x16E8 | offset to field `key` (string) - +0x16D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x16D8 | offset to field `value` (string) + +0x1A84 | 68 E1 FF FF | SOffset32 | 0xFFFFE168 (-7832) Loc: +0x391C | offset to vtable + +0x1A88 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1AA0 | offset to field `key` (string) + +0x1A8C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A90 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x16D8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x16DC | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x16E4 | 00 | char | 0x00 (0) | string terminator + +0x1A90 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1A94 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1A9C | 00 | char | 0x00 (0) | string terminator padding: - +0x16E5 | 00 00 00 | uint8_t[3] | ... | padding + +0x1A9D | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x16E8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x16EC | 68 61 73 68 | char[4] | hash | string literal - +0x16F0 | 00 | char | 0x00 (0) | string terminator + +0x1AA0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1AA4 | 68 61 73 68 | char[4] | hash | string literal + +0x1AA8 | 00 | char | 0x00 (0) | string terminator padding: - +0x16F1 | 00 00 00 | uint8_t[3] | ... | padding + +0x1AA9 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x16F4 | 90 E1 FF FF | SOffset32 | 0xFFFFE190 (-7792) Loc: +0x3564 | offset to vtable - +0x16F8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1710 | offset to field `key` (string) - +0x16FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1700 | offset to field `value` (string) + +0x1AAC | 90 E1 FF FF | SOffset32 | 0xFFFFE190 (-7792) Loc: +0x391C | offset to vtable + +0x1AB0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1AC8 | offset to field `key` (string) + +0x1AB4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1AB8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1700 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1704 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x170C | 6C 65 54 | | leT - +0x170F | 00 | char | 0x00 (0) | string terminator + +0x1AB8 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1ABC | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1AC4 | 6C 65 54 | | leT + +0x1AC7 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1710 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1714 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x171C | 00 | char | 0x00 (0) | string terminator + +0x1AC8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1ACC | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x1AD4 | 00 | char | 0x00 (0) | string terminator padding: - +0x171D | 00 00 00 | uint8_t[3] | ... | padding + +0x1AD5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1720 | BC E1 FF FF | SOffset32 | 0xFFFFE1BC (-7748) Loc: +0x3564 | offset to vtable - +0x1724 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1734 | offset to field `key` (string) - +0x1728 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x172C | offset to field `value` (string) + +0x1AD8 | BC E1 FF FF | SOffset32 | 0xFFFFE1BC (-7748) Loc: +0x391C | offset to vtable + +0x1ADC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1AEC | offset to field `key` (string) + +0x1AE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1AE4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x172C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of string - +0x1730 | 00 | char | 0x00 (0) | string terminator + +0x1AE4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of string + +0x1AE8 | 00 | char | 0x00 (0) | string terminator padding: - +0x1731 | 00 00 00 | uint8_t[3] | ... | padding + +0x1AE9 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1734 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x1738 | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal - +0x1740 | 74 79 70 65 5F 67 65 74 | | type_get - +0x1748 | 00 | char | 0x00 (0) | string terminator + +0x1AEC | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x1AF0 | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal + +0x1AF8 | 74 79 70 65 5F 67 65 74 | | type_get + +0x1B00 | 00 | char | 0x00 (0) | string terminator padding: - +0x1749 | 00 00 00 | uint8_t[3] | ... | padding + +0x1B01 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x174C | E8 E1 FF FF | SOffset32 | 0xFFFFE1E8 (-7704) Loc: +0x3564 | offset to vtable - +0x1750 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1764 | offset to field `key` (string) - +0x1754 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1758 | offset to field `value` (string) + +0x1B04 | E8 E1 FF FF | SOffset32 | 0xFFFFE1E8 (-7704) Loc: +0x391C | offset to vtable + +0x1B08 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1B1C | offset to field `key` (string) + +0x1B0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1B10 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1758 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x175C | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x1761 | 00 | char | 0x00 (0) | string terminator + +0x1B10 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x1B14 | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x1B19 | 00 | char | 0x00 (0) | string terminator padding: - +0x1762 | 00 00 | uint8_t[2] | .. | padding + +0x1B1A | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1764 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x1768 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x1770 | 74 79 70 65 | | type - +0x1774 | 00 | char | 0x00 (0) | string terminator + +0x1B1C | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1B20 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x1B28 | 74 79 70 65 | | type + +0x1B2C | 00 | char | 0x00 (0) | string terminator padding: - +0x1775 | 00 00 00 | uint8_t[3] | ... | padding + +0x1B2D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x1778 | 94 E0 FF FF | SOffset32 | 0xFFFFE094 (-8044) Loc: +0x36E4 | offset to vtable - +0x177C | 00 00 00 | uint8_t[3] | ... | padding - +0x177F | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x1780 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x1784 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1B30 | 94 E0 FF FF | SOffset32 | 0xFFFFE094 (-8044) Loc: +0x3A9C | offset to vtable + +0x1B34 | 00 00 00 | uint8_t[3] | ... | padding + +0x1B37 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x1B38 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x1B3C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1788 | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string - +0x178C | 6E 6F 6E 5F 6F 77 6E 69 | char[20] | non_owni | string literal - +0x1794 | 6E 67 5F 72 65 66 65 72 | | ng_refer - +0x179C | 65 6E 63 65 | | ence - +0x17A0 | 00 | char | 0x00 (0) | string terminator + +0x1B40 | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string + +0x1B44 | 6E 6F 6E 5F 6F 77 6E 69 | char[20] | non_owni | string literal + +0x1B4C | 6E 67 5F 72 65 66 65 72 | | ng_refer + +0x1B54 | 65 6E 63 65 | | ence + +0x1B58 | 00 | char | 0x00 (0) | string terminator padding: - +0x17A1 | 00 00 00 | uint8_t[3] | ... | padding + +0x1B59 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x17A4 | 80 EC FF FF | SOffset32 | 0xFFFFEC80 (-4992) Loc: +0x2B24 | offset to vtable - +0x17A8 | 00 00 00 | uint8_t[3] | ... | padding - +0x17AB | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x17AC | 28 00 | uint16_t | 0x0028 (40) | table field `id` (UShort) - +0x17AE | 54 00 | uint16_t | 0x0054 (84) | table field `offset` (UShort) - +0x17B0 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x18C0 | offset to field `name` (string) - +0x17B4 | 00 01 00 00 | UOffset32 | 0x00000100 (256) Loc: +0x18B4 | offset to field `type` (table) - +0x17B8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x17C4 | offset to field `attributes` (vector) - +0x17BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17C0 | offset to field `documentation` (vector) + +0x1B5C | 80 EC FF FF | SOffset32 | 0xFFFFEC80 (-4992) Loc: +0x2EDC | offset to vtable + +0x1B60 | 00 00 00 | uint8_t[3] | ... | padding + +0x1B63 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1B64 | 28 00 | uint16_t | 0x0028 (40) | table field `id` (UShort) + +0x1B66 | 54 00 | uint16_t | 0x0054 (84) | table field `offset` (UShort) + +0x1B68 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x1C78 | offset to field `name` (string) + +0x1B6C | 00 01 00 00 | UOffset32 | 0x00000100 (256) Loc: +0x1C6C | offset to field `type` (table) + +0x1B70 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1B7C | offset to field `attributes` (vector) + +0x1B74 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1B78 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x17C0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1B78 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x17C4 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) - +0x17C8 | B4 00 00 00 | UOffset32 | 0x000000B4 (180) Loc: +0x187C | offset to table[0] - +0x17CC | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x184C | offset to table[1] - +0x17D0 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1820 | offset to table[2] - +0x17D4 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x17F8 | offset to table[3] - +0x17D8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17DC | offset to table[4] + +0x1B7C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of vector (# items) + +0x1B80 | B4 00 00 00 | UOffset32 | 0x000000B4 (180) Loc: +0x1C34 | offset to table[0] + +0x1B84 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1C04 | offset to table[1] + +0x1B88 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1BD8 | offset to table[2] + +0x1B8C | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1BB0 | offset to table[3] + +0x1B90 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1B94 | offset to table[4] table (reflection.KeyValue): - +0x17DC | 78 E2 FF FF | SOffset32 | 0xFFFFE278 (-7560) Loc: +0x3564 | offset to vtable - +0x17E0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x17F0 | offset to field `key` (string) - +0x17E4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x17E8 | offset to field `value` (string) + +0x1B94 | 78 E2 FF FF | SOffset32 | 0xFFFFE278 (-7560) Loc: +0x391C | offset to vtable + +0x1B98 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1BA8 | offset to field `key` (string) + +0x1B9C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BA0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x17E8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x17EC | 34 30 | char[2] | 40 | string literal - +0x17EE | 00 | char | 0x00 (0) | string terminator + +0x1BA0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1BA4 | 34 30 | char[2] | 40 | string literal + +0x1BA6 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x17F0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x17F4 | 69 64 | char[2] | id | string literal - +0x17F6 | 00 | char | 0x00 (0) | string terminator + +0x1BA8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1BAC | 69 64 | char[2] | id | string literal + +0x1BAE | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x17F8 | 94 E2 FF FF | SOffset32 | 0xFFFFE294 (-7532) Loc: +0x3564 | offset to vtable - +0x17FC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1814 | offset to field `key` (string) - +0x1800 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1804 | offset to field `value` (string) + +0x1BB0 | 94 E2 FF FF | SOffset32 | 0xFFFFE294 (-7532) Loc: +0x391C | offset to vtable + +0x1BB4 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1BCC | offset to field `key` (string) + +0x1BB8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BBC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1804 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1808 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x1810 | 00 | char | 0x00 (0) | string terminator + +0x1BBC | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1BC0 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1BC8 | 00 | char | 0x00 (0) | string terminator padding: - +0x1811 | 00 00 00 | uint8_t[3] | ... | padding + +0x1BC9 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1814 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x1818 | 68 61 73 68 | char[4] | hash | string literal - +0x181C | 00 | char | 0x00 (0) | string terminator + +0x1BCC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1BD0 | 68 61 73 68 | char[4] | hash | string literal + +0x1BD4 | 00 | char | 0x00 (0) | string terminator padding: - +0x181D | 00 00 00 | uint8_t[3] | ... | padding + +0x1BD5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1820 | BC E2 FF FF | SOffset32 | 0xFFFFE2BC (-7492) Loc: +0x3564 | offset to vtable - +0x1824 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x183C | offset to field `key` (string) - +0x1828 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x182C | offset to field `value` (string) + +0x1BD8 | BC E2 FF FF | SOffset32 | 0xFFFFE2BC (-7492) Loc: +0x391C | offset to vtable + +0x1BDC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1BF4 | offset to field `key` (string) + +0x1BE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BE4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x182C | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1830 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x1838 | 6C 65 54 | | leT - +0x183B | 00 | char | 0x00 (0) | string terminator + +0x1BE4 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1BE8 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1BF0 | 6C 65 54 | | leT + +0x1BF3 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x183C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1840 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x1848 | 00 | char | 0x00 (0) | string terminator + +0x1BF4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1BF8 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x1C00 | 00 | char | 0x00 (0) | string terminator padding: - +0x1849 | 00 00 00 | uint8_t[3] | ... | padding + +0x1C01 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x184C | E8 E2 FF FF | SOffset32 | 0xFFFFE2E8 (-7448) Loc: +0x3564 | offset to vtable - +0x1850 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1864 | offset to field `key` (string) - +0x1854 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1858 | offset to field `value` (string) + +0x1C04 | E8 E2 FF FF | SOffset32 | 0xFFFFE2E8 (-7448) Loc: +0x391C | offset to vtable + +0x1C08 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1C1C | offset to field `key` (string) + +0x1C0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1C10 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1858 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string - +0x185C | 2E 67 65 74 28 29 | char[6] | .get() | string literal - +0x1862 | 00 | char | 0x00 (0) | string terminator + +0x1C10 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string + +0x1C14 | 2E 67 65 74 28 29 | char[6] | .get() | string literal + +0x1C1A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1864 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x1868 | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal - +0x1870 | 74 79 70 65 5F 67 65 74 | | type_get - +0x1878 | 00 | char | 0x00 (0) | string terminator + +0x1C1C | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x1C20 | 63 70 70 5F 70 74 72 5F | char[16] | cpp_ptr_ | string literal + +0x1C28 | 74 79 70 65 5F 67 65 74 | | type_get + +0x1C30 | 00 | char | 0x00 (0) | string terminator padding: - +0x1879 | 00 00 00 | uint8_t[3] | ... | padding + +0x1C31 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x187C | 18 E3 FF FF | SOffset32 | 0xFFFFE318 (-7400) Loc: +0x3564 | offset to vtable - +0x1880 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x18A0 | offset to field `key` (string) - +0x1884 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1888 | offset to field `value` (string) + +0x1C34 | 18 E3 FF FF | SOffset32 | 0xFFFFE318 (-7400) Loc: +0x391C | offset to vtable + +0x1C38 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x1C58 | offset to field `key` (string) + +0x1C3C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1C40 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1888 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x188C | 64 65 66 61 75 6C 74 5F | char[16] | default_ | string literal - +0x1894 | 70 74 72 5F 74 79 70 65 | | ptr_type - +0x189C | 00 | char | 0x00 (0) | string terminator + +0x1C40 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x1C44 | 64 65 66 61 75 6C 74 5F | char[16] | default_ | string literal + +0x1C4C | 70 74 72 5F 74 79 70 65 | | ptr_type + +0x1C54 | 00 | char | 0x00 (0) | string terminator padding: - +0x189D | 00 00 00 | uint8_t[3] | ... | padding + +0x1C55 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x18A0 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x18A4 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x18AC | 74 79 70 65 | | type - +0x18B0 | 00 | char | 0x00 (0) | string terminator + +0x1C58 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1C5C | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x1C64 | 74 79 70 65 | | type + +0x1C68 | 00 | char | 0x00 (0) | string terminator padding: - +0x18B1 | 00 00 00 | uint8_t[3] | ... | padding + +0x1C69 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x18B4 | 30 ED FF FF | SOffset32 | 0xFFFFED30 (-4816) Loc: +0x2B84 | offset to vtable - +0x18B8 | 00 00 | uint8_t[2] | .. | padding - +0x18BA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x18BB | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) - +0x18BC | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) + +0x1C6C | 30 ED FF FF | SOffset32 | 0xFFFFED30 (-4816) Loc: +0x2F3C | offset to vtable + +0x1C70 | 00 00 | uint8_t[2] | .. | padding + +0x1C72 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x1C73 | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) + +0x1C74 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x18C0 | 1E 00 00 00 | uint32_t | 0x0000001E (30) | length of string - +0x18C4 | 76 65 63 74 6F 72 5F 6F | char[30] | vector_o | string literal - +0x18CC | 66 5F 63 6F 5F 6F 77 6E | | f_co_own - +0x18D4 | 69 6E 67 5F 72 65 66 65 | | ing_refe - +0x18DC | 72 65 6E 63 65 73 | | rences - +0x18E2 | 00 | char | 0x00 (0) | string terminator + +0x1C78 | 1E 00 00 00 | uint32_t | 0x0000001E (30) | length of string + +0x1C7C | 76 65 63 74 6F 72 5F 6F | char[30] | vector_o | string literal + +0x1C84 | 66 5F 63 6F 5F 6F 77 6E | | f_co_own + +0x1C8C | 69 6E 67 5F 72 65 66 65 | | ing_refe + +0x1C94 | 72 65 6E 63 65 73 | | rences + +0x1C9A | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x18E4 | AA EE FF FF | SOffset32 | 0xFFFFEEAA (-4438) Loc: +0x2A3A | offset to vtable - +0x18E8 | 27 00 | uint16_t | 0x0027 (39) | table field `id` (UShort) - +0x18EA | 52 00 | uint16_t | 0x0052 (82) | table field `offset` (UShort) - +0x18EC | D4 00 00 00 | UOffset32 | 0x000000D4 (212) Loc: +0x19C0 | offset to field `name` (string) - +0x18F0 | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x19B0 | offset to field `type` (table) - +0x18F4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1900 | offset to field `attributes` (vector) - +0x18F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x18FC | offset to field `documentation` (vector) + +0x1C9C | AA EE FF FF | SOffset32 | 0xFFFFEEAA (-4438) Loc: +0x2DF2 | offset to vtable + +0x1CA0 | 27 00 | uint16_t | 0x0027 (39) | table field `id` (UShort) + +0x1CA2 | 52 00 | uint16_t | 0x0052 (82) | table field `offset` (UShort) + +0x1CA4 | D4 00 00 00 | UOffset32 | 0x000000D4 (212) Loc: +0x1D78 | offset to field `name` (string) + +0x1CA8 | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x1D68 | offset to field `type` (table) + +0x1CAC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1CB8 | offset to field `attributes` (vector) + +0x1CB0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CB4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x18FC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1CB4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1900 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) - +0x1904 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1984 | offset to table[0] - +0x1908 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1958 | offset to table[1] - +0x190C | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1930 | offset to table[2] - +0x1910 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1914 | offset to table[3] + +0x1CB8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) + +0x1CBC | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1D3C | offset to table[0] + +0x1CC0 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1D10 | offset to table[1] + +0x1CC4 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1CE8 | offset to table[2] + +0x1CC8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CCC | offset to table[3] table (reflection.KeyValue): - +0x1914 | B0 E3 FF FF | SOffset32 | 0xFFFFE3B0 (-7248) Loc: +0x3564 | offset to vtable - +0x1918 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1928 | offset to field `key` (string) - +0x191C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1920 | offset to field `value` (string) + +0x1CCC | B0 E3 FF FF | SOffset32 | 0xFFFFE3B0 (-7248) Loc: +0x391C | offset to vtable + +0x1CD0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1CE0 | offset to field `key` (string) + +0x1CD4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CD8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1920 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1924 | 33 39 | char[2] | 39 | string literal - +0x1926 | 00 | char | 0x00 (0) | string terminator + +0x1CD8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1CDC | 33 39 | char[2] | 39 | string literal + +0x1CDE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1928 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x192C | 69 64 | char[2] | id | string literal - +0x192E | 00 | char | 0x00 (0) | string terminator + +0x1CE0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1CE4 | 69 64 | char[2] | id | string literal + +0x1CE6 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x1930 | CC E3 FF FF | SOffset32 | 0xFFFFE3CC (-7220) Loc: +0x3564 | offset to vtable - +0x1934 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x194C | offset to field `key` (string) - +0x1938 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x193C | offset to field `value` (string) + +0x1CE8 | CC E3 FF FF | SOffset32 | 0xFFFFE3CC (-7220) Loc: +0x391C | offset to vtable + +0x1CEC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1D04 | offset to field `key` (string) + +0x1CF0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CF4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x193C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1940 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x1948 | 00 | char | 0x00 (0) | string terminator + +0x1CF4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1CF8 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1D00 | 00 | char | 0x00 (0) | string terminator padding: - +0x1949 | 00 00 00 | uint8_t[3] | ... | padding + +0x1D01 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x194C | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x1950 | 68 61 73 68 | char[4] | hash | string literal - +0x1954 | 00 | char | 0x00 (0) | string terminator + +0x1D04 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1D08 | 68 61 73 68 | char[4] | hash | string literal + +0x1D0C | 00 | char | 0x00 (0) | string terminator padding: - +0x1955 | 00 00 00 | uint8_t[3] | ... | padding + +0x1D0D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1958 | F4 E3 FF FF | SOffset32 | 0xFFFFE3F4 (-7180) Loc: +0x3564 | offset to vtable - +0x195C | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1974 | offset to field `key` (string) - +0x1960 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1964 | offset to field `value` (string) + +0x1D10 | F4 E3 FF FF | SOffset32 | 0xFFFFE3F4 (-7180) Loc: +0x391C | offset to vtable + +0x1D14 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1D2C | offset to field `key` (string) + +0x1D18 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D1C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1964 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1968 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x1970 | 6C 65 54 | | leT - +0x1973 | 00 | char | 0x00 (0) | string terminator + +0x1D1C | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1D20 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1D28 | 6C 65 54 | | leT + +0x1D2B | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1974 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1978 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x1980 | 00 | char | 0x00 (0) | string terminator + +0x1D2C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1D30 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x1D38 | 00 | char | 0x00 (0) | string terminator padding: - +0x1981 | 00 00 00 | uint8_t[3] | ... | padding + +0x1D39 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1984 | 20 E4 FF FF | SOffset32 | 0xFFFFE420 (-7136) Loc: +0x3564 | offset to vtable - +0x1988 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x199C | offset to field `key` (string) - +0x198C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1990 | offset to field `value` (string) + +0x1D3C | 20 E4 FF FF | SOffset32 | 0xFFFFE420 (-7136) Loc: +0x391C | offset to vtable + +0x1D40 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1D54 | offset to field `key` (string) + +0x1D44 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D48 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1990 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x1994 | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x1999 | 00 | char | 0x00 (0) | string terminator + +0x1D48 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x1D4C | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x1D51 | 00 | char | 0x00 (0) | string terminator padding: - +0x199A | 00 00 | uint8_t[2] | .. | padding + +0x1D52 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x199C | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x19A0 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x19A8 | 74 79 70 65 | | type - +0x19AC | 00 | char | 0x00 (0) | string terminator + +0x1D54 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1D58 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x1D60 | 74 79 70 65 | | type + +0x1D64 | 00 | char | 0x00 (0) | string terminator padding: - +0x19AD | 00 00 00 | uint8_t[3] | ... | padding + +0x1D65 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x19B0 | CC E2 FF FF | SOffset32 | 0xFFFFE2CC (-7476) Loc: +0x36E4 | offset to vtable - +0x19B4 | 00 00 00 | uint8_t[3] | ... | padding - +0x19B7 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x19B8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x19BC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x1D68 | CC E2 FF FF | SOffset32 | 0xFFFFE2CC (-7476) Loc: +0x3A9C | offset to vtable + +0x1D6C | 00 00 00 | uint8_t[3] | ... | padding + +0x1D6F | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x1D70 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x1D74 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x19C0 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string - +0x19C4 | 63 6F 5F 6F 77 6E 69 6E | char[19] | co_ownin | string literal - +0x19CC | 67 5F 72 65 66 65 72 65 | | g_refere - +0x19D4 | 6E 63 65 | | nce - +0x19D7 | 00 | char | 0x00 (0) | string terminator + +0x1D78 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string + +0x1D7C | 63 6F 5F 6F 77 6E 69 6E | char[19] | co_ownin | string literal + +0x1D84 | 67 5F 72 65 66 65 72 65 | | g_refere + +0x1D8C | 6E 63 65 | | nce + +0x1D8F | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x19D8 | B4 EE FF FF | SOffset32 | 0xFFFFEEB4 (-4428) Loc: +0x2B24 | offset to vtable - +0x19DC | 00 00 00 | uint8_t[3] | ... | padding - +0x19DF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x19E0 | 26 00 | uint16_t | 0x0026 (38) | table field `id` (UShort) - +0x19E2 | 50 00 | uint16_t | 0x0050 (80) | table field `offset` (UShort) - +0x19E4 | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x1A68 | offset to field `name` (string) - +0x19E8 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x1A58 | offset to field `type` (table) - +0x19EC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x19F8 | offset to field `attributes` (vector) - +0x19F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x19F4 | offset to field `documentation` (vector) + +0x1D90 | B4 EE FF FF | SOffset32 | 0xFFFFEEB4 (-4428) Loc: +0x2EDC | offset to vtable + +0x1D94 | 00 00 00 | uint8_t[3] | ... | padding + +0x1D97 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1D98 | 26 00 | uint16_t | 0x0026 (38) | table field `id` (UShort) + +0x1D9A | 50 00 | uint16_t | 0x0050 (80) | table field `offset` (UShort) + +0x1D9C | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x1E20 | offset to field `name` (string) + +0x1DA0 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x1E10 | offset to field `type` (table) + +0x1DA4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1DB0 | offset to field `attributes` (vector) + +0x1DA8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DAC | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x19F4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1DAC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x19F8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x19FC | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1A20 | offset to table[0] - +0x1A00 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A04 | offset to table[1] + +0x1DB0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x1DB4 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1DD8 | offset to table[0] + +0x1DB8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DBC | offset to table[1] table (reflection.KeyValue): - +0x1A04 | A0 E4 FF FF | SOffset32 | 0xFFFFE4A0 (-7008) Loc: +0x3564 | offset to vtable - +0x1A08 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1A18 | offset to field `key` (string) - +0x1A0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A10 | offset to field `value` (string) + +0x1DBC | A0 E4 FF FF | SOffset32 | 0xFFFFE4A0 (-7008) Loc: +0x391C | offset to vtable + +0x1DC0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1DD0 | offset to field `key` (string) + +0x1DC4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DC8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1A10 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1A14 | 33 38 | char[2] | 38 | string literal - +0x1A16 | 00 | char | 0x00 (0) | string terminator + +0x1DC8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1DCC | 33 38 | char[2] | 38 | string literal + +0x1DCE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1A18 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1A1C | 69 64 | char[2] | id | string literal - +0x1A1E | 00 | char | 0x00 (0) | string terminator + +0x1DD0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1DD4 | 69 64 | char[2] | id | string literal + +0x1DD6 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x1A20 | BC E4 FF FF | SOffset32 | 0xFFFFE4BC (-6980) Loc: +0x3564 | offset to vtable - +0x1A24 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x1A44 | offset to field `key` (string) - +0x1A28 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1A2C | offset to field `value` (string) + +0x1DD8 | BC E4 FF FF | SOffset32 | 0xFFFFE4BC (-6980) Loc: +0x391C | offset to vtable + +0x1DDC | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x1DFC | offset to field `key` (string) + +0x1DE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DE4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1A2C | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x1A30 | 64 65 66 61 75 6C 74 5F | char[16] | default_ | string literal - +0x1A38 | 70 74 72 5F 74 79 70 65 | | ptr_type - +0x1A40 | 00 | char | 0x00 (0) | string terminator + +0x1DE4 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x1DE8 | 64 65 66 61 75 6C 74 5F | char[16] | default_ | string literal + +0x1DF0 | 70 74 72 5F 74 79 70 65 | | ptr_type + +0x1DF8 | 00 | char | 0x00 (0) | string terminator padding: - +0x1A41 | 00 00 00 | uint8_t[3] | ... | padding + +0x1DF9 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1A44 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x1A48 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x1A50 | 74 79 70 65 | | type - +0x1A54 | 00 | char | 0x00 (0) | string terminator + +0x1DFC | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1E00 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x1E08 | 74 79 70 65 | | type + +0x1E0C | 00 | char | 0x00 (0) | string terminator padding: - +0x1A55 | 00 00 00 | uint8_t[3] | ... | padding + +0x1E0D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x1A58 | A8 F0 FF FF | SOffset32 | 0xFFFFF0A8 (-3928) Loc: +0x29B0 | offset to vtable - +0x1A5C | 00 00 | uint8_t[2] | .. | padding - +0x1A5E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1A5F | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x1A60 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) - +0x1A64 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x1E10 | A8 F0 FF FF | SOffset32 | 0xFFFFF0A8 (-3928) Loc: +0x2D68 | offset to vtable + +0x1E14 | 00 00 | uint8_t[2] | .. | padding + +0x1E16 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x1E17 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x1E18 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) + +0x1E1C | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1A68 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string - +0x1A6C | 76 65 63 74 6F 72 5F 6F | char[28] | vector_o | string literal - +0x1A74 | 66 5F 73 74 72 6F 6E 67 | | f_strong - +0x1A7C | 5F 72 65 66 65 72 72 61 | | _referra - +0x1A84 | 62 6C 65 73 | | bles - +0x1A88 | 00 | char | 0x00 (0) | string terminator + +0x1E20 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string + +0x1E24 | 76 65 63 74 6F 72 5F 6F | char[28] | vector_o | string literal + +0x1E2C | 66 5F 73 74 72 6F 6E 67 | | f_strong + +0x1E34 | 5F 72 65 66 65 72 72 61 | | _referra + +0x1E3C | 62 6C 65 73 | | bles + +0x1E40 | 00 | char | 0x00 (0) | string terminator padding: - +0x1A89 | 00 00 00 | uint8_t[3] | ... | padding + +0x1E41 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x1A8C | 68 EF FF FF | SOffset32 | 0xFFFFEF68 (-4248) Loc: +0x2B24 | offset to vtable - +0x1A90 | 00 00 00 | uint8_t[3] | ... | padding - +0x1A93 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1A94 | 25 00 | uint16_t | 0x0025 (37) | table field `id` (UShort) - +0x1A96 | 4E 00 | uint16_t | 0x004E (78) | table field `offset` (UShort) - +0x1A98 | D0 00 00 00 | UOffset32 | 0x000000D0 (208) Loc: +0x1B68 | offset to field `name` (string) - +0x1A9C | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x1B5C | offset to field `type` (table) - +0x1AA0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1AAC | offset to field `attributes` (vector) - +0x1AA4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1AA8 | offset to field `documentation` (vector) + +0x1E44 | 68 EF FF FF | SOffset32 | 0xFFFFEF68 (-4248) Loc: +0x2EDC | offset to vtable + +0x1E48 | 00 00 00 | uint8_t[3] | ... | padding + +0x1E4B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x1E4C | 25 00 | uint16_t | 0x0025 (37) | table field `id` (UShort) + +0x1E4E | 4E 00 | uint16_t | 0x004E (78) | table field `offset` (UShort) + +0x1E50 | D0 00 00 00 | UOffset32 | 0x000000D0 (208) Loc: +0x1F20 | offset to field `name` (string) + +0x1E54 | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x1F14 | offset to field `type` (table) + +0x1E58 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1E64 | offset to field `attributes` (vector) + +0x1E5C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E60 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1AA8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1E60 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1AAC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) - +0x1AB0 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1B30 | offset to table[0] - +0x1AB4 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1B04 | offset to table[1] - +0x1AB8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1ADC | offset to table[2] - +0x1ABC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1AC0 | offset to table[3] + +0x1E64 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) + +0x1E68 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1EE8 | offset to table[0] + +0x1E6C | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1EBC | offset to table[1] + +0x1E70 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1E94 | offset to table[2] + +0x1E74 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E78 | offset to table[3] table (reflection.KeyValue): - +0x1AC0 | 5C E5 FF FF | SOffset32 | 0xFFFFE55C (-6820) Loc: +0x3564 | offset to vtable - +0x1AC4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1AD4 | offset to field `key` (string) - +0x1AC8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1ACC | offset to field `value` (string) + +0x1E78 | 5C E5 FF FF | SOffset32 | 0xFFFFE55C (-6820) Loc: +0x391C | offset to vtable + +0x1E7C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1E8C | offset to field `key` (string) + +0x1E80 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E84 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1ACC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1AD0 | 33 37 | char[2] | 37 | string literal - +0x1AD2 | 00 | char | 0x00 (0) | string terminator + +0x1E84 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1E88 | 33 37 | char[2] | 37 | string literal + +0x1E8A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1AD4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1AD8 | 69 64 | char[2] | id | string literal - +0x1ADA | 00 | char | 0x00 (0) | string terminator + +0x1E8C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1E90 | 69 64 | char[2] | id | string literal + +0x1E92 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x1ADC | 78 E5 FF FF | SOffset32 | 0xFFFFE578 (-6792) Loc: +0x3564 | offset to vtable - +0x1AE0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1AF8 | offset to field `key` (string) - +0x1AE4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1AE8 | offset to field `value` (string) + +0x1E94 | 78 E5 FF FF | SOffset32 | 0xFFFFE578 (-6792) Loc: +0x391C | offset to vtable + +0x1E98 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1EB0 | offset to field `key` (string) + +0x1E9C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EA0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1AE8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1AEC | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x1AF4 | 00 | char | 0x00 (0) | string terminator + +0x1EA0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1EA4 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1EAC | 00 | char | 0x00 (0) | string terminator padding: - +0x1AF5 | 00 00 00 | uint8_t[3] | ... | padding + +0x1EAD | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1AF8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x1AFC | 68 61 73 68 | char[4] | hash | string literal - +0x1B00 | 00 | char | 0x00 (0) | string terminator + +0x1EB0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1EB4 | 68 61 73 68 | char[4] | hash | string literal + +0x1EB8 | 00 | char | 0x00 (0) | string terminator padding: - +0x1B01 | 00 00 00 | uint8_t[3] | ... | padding + +0x1EB9 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1B04 | A0 E5 FF FF | SOffset32 | 0xFFFFE5A0 (-6752) Loc: +0x3564 | offset to vtable - +0x1B08 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1B20 | offset to field `key` (string) - +0x1B0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1B10 | offset to field `value` (string) + +0x1EBC | A0 E5 FF FF | SOffset32 | 0xFFFFE5A0 (-6752) Loc: +0x391C | offset to vtable + +0x1EC0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1ED8 | offset to field `key` (string) + +0x1EC4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EC8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1B10 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1B14 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x1B1C | 6C 65 54 | | leT - +0x1B1F | 00 | char | 0x00 (0) | string terminator + +0x1EC8 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1ECC | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1ED4 | 6C 65 54 | | leT + +0x1ED7 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1B20 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1B24 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x1B2C | 00 | char | 0x00 (0) | string terminator + +0x1ED8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1EDC | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x1EE4 | 00 | char | 0x00 (0) | string terminator padding: - +0x1B2D | 00 00 00 | uint8_t[3] | ... | padding + +0x1EE5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1B30 | CC E5 FF FF | SOffset32 | 0xFFFFE5CC (-6708) Loc: +0x3564 | offset to vtable - +0x1B34 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1B48 | offset to field `key` (string) - +0x1B38 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1B3C | offset to field `value` (string) + +0x1EE8 | CC E5 FF FF | SOffset32 | 0xFFFFE5CC (-6708) Loc: +0x391C | offset to vtable + +0x1EEC | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1F00 | offset to field `key` (string) + +0x1EF0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EF4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1B3C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x1B40 | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x1B45 | 00 | char | 0x00 (0) | string terminator + +0x1EF4 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x1EF8 | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x1EFD | 00 | char | 0x00 (0) | string terminator padding: - +0x1B46 | 00 00 | uint8_t[2] | .. | padding + +0x1EFE | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1B48 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x1B4C | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x1B54 | 74 79 70 65 | | type - +0x1B58 | 00 | char | 0x00 (0) | string terminator + +0x1F00 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1F04 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x1F0C | 74 79 70 65 | | type + +0x1F10 | 00 | char | 0x00 (0) | string terminator padding: - +0x1B59 | 00 00 00 | uint8_t[3] | ... | padding + +0x1F11 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x1B5C | D8 EF FF FF | SOffset32 | 0xFFFFEFD8 (-4136) Loc: +0x2B84 | offset to vtable - +0x1B60 | 00 00 | uint8_t[2] | .. | padding - +0x1B62 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1B63 | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) - +0x1B64 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) + +0x1F14 | D8 EF FF FF | SOffset32 | 0xFFFFEFD8 (-4136) Loc: +0x2F3C | offset to vtable + +0x1F18 | 00 00 | uint8_t[2] | .. | padding + +0x1F1A | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x1F1B | 0A | uint8_t | 0x0A (10) | table field `element` (Byte) + +0x1F1C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1B68 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string - +0x1B6C | 76 65 63 74 6F 72 5F 6F | char[25] | vector_o | string literal - +0x1B74 | 66 5F 77 65 61 6B 5F 72 | | f_weak_r - +0x1B7C | 65 66 65 72 65 6E 63 65 | | eference - +0x1B84 | 73 | | s - +0x1B85 | 00 | char | 0x00 (0) | string terminator + +0x1F20 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string + +0x1F24 | 76 65 63 74 6F 72 5F 6F | char[25] | vector_o | string literal + +0x1F2C | 66 5F 77 65 61 6B 5F 72 | | f_weak_r + +0x1F34 | 65 66 65 72 65 6E 63 65 | | eference + +0x1F3C | 73 | | s + +0x1F3D | 00 | char | 0x00 (0) | string terminator padding: - +0x1B86 | 00 00 | uint8_t[2] | .. | padding + +0x1F3E | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1B88 | 4E F1 FF FF | SOffset32 | 0xFFFFF14E (-3762) Loc: +0x2A3A | offset to vtable - +0x1B8C | 24 00 | uint16_t | 0x0024 (36) | table field `id` (UShort) - +0x1B8E | 4C 00 | uint16_t | 0x004C (76) | table field `offset` (UShort) - +0x1B90 | D4 00 00 00 | UOffset32 | 0x000000D4 (212) Loc: +0x1C64 | offset to field `name` (string) - +0x1B94 | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x1C54 | offset to field `type` (table) - +0x1B98 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1BA4 | offset to field `attributes` (vector) - +0x1B9C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BA0 | offset to field `documentation` (vector) + +0x1F40 | 4E F1 FF FF | SOffset32 | 0xFFFFF14E (-3762) Loc: +0x2DF2 | offset to vtable + +0x1F44 | 24 00 | uint16_t | 0x0024 (36) | table field `id` (UShort) + +0x1F46 | 4C 00 | uint16_t | 0x004C (76) | table field `offset` (UShort) + +0x1F48 | D4 00 00 00 | UOffset32 | 0x000000D4 (212) Loc: +0x201C | offset to field `name` (string) + +0x1F4C | C0 00 00 00 | UOffset32 | 0x000000C0 (192) Loc: +0x200C | offset to field `type` (table) + +0x1F50 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1F5C | offset to field `attributes` (vector) + +0x1F54 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F58 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1BA0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x1F58 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1BA4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) - +0x1BA8 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1C28 | offset to table[0] - +0x1BAC | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1BFC | offset to table[1] - +0x1BB0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1BD4 | offset to table[2] - +0x1BB4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BB8 | offset to table[3] + +0x1F5C | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) + +0x1F60 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x1FE0 | offset to table[0] + +0x1F64 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x1FB4 | offset to table[1] + +0x1F68 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1F8C | offset to table[2] + +0x1F6C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F70 | offset to table[3] table (reflection.KeyValue): - +0x1BB8 | 54 E6 FF FF | SOffset32 | 0xFFFFE654 (-6572) Loc: +0x3564 | offset to vtable - +0x1BBC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1BCC | offset to field `key` (string) - +0x1BC0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BC4 | offset to field `value` (string) + +0x1F70 | 54 E6 FF FF | SOffset32 | 0xFFFFE654 (-6572) Loc: +0x391C | offset to vtable + +0x1F74 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1F84 | offset to field `key` (string) + +0x1F78 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F7C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1BC4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1BC8 | 33 36 | char[2] | 36 | string literal - +0x1BCA | 00 | char | 0x00 (0) | string terminator + +0x1F7C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1F80 | 33 36 | char[2] | 36 | string literal + +0x1F82 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1BCC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1BD0 | 69 64 | char[2] | id | string literal - +0x1BD2 | 00 | char | 0x00 (0) | string terminator + +0x1F84 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x1F88 | 69 64 | char[2] | id | string literal + +0x1F8A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x1BD4 | 70 E6 FF FF | SOffset32 | 0xFFFFE670 (-6544) Loc: +0x3564 | offset to vtable - +0x1BD8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1BF0 | offset to field `key` (string) - +0x1BDC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1BE0 | offset to field `value` (string) + +0x1F8C | 70 E6 FF FF | SOffset32 | 0xFFFFE670 (-6544) Loc: +0x391C | offset to vtable + +0x1F90 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1FA8 | offset to field `key` (string) + +0x1F94 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F98 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1BE0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1BE4 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x1BEC | 00 | char | 0x00 (0) | string terminator + +0x1F98 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1F9C | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x1FA4 | 00 | char | 0x00 (0) | string terminator padding: - +0x1BED | 00 00 00 | uint8_t[3] | ... | padding + +0x1FA5 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x1BF0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x1BF4 | 68 61 73 68 | char[4] | hash | string literal - +0x1BF8 | 00 | char | 0x00 (0) | string terminator + +0x1FA8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x1FAC | 68 61 73 68 | char[4] | hash | string literal + +0x1FB0 | 00 | char | 0x00 (0) | string terminator padding: - +0x1BF9 | 00 00 00 | uint8_t[3] | ... | padding + +0x1FB1 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1BFC | 98 E6 FF FF | SOffset32 | 0xFFFFE698 (-6504) Loc: +0x3564 | offset to vtable - +0x1C00 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1C18 | offset to field `key` (string) - +0x1C04 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1C08 | offset to field `value` (string) + +0x1FB4 | 98 E6 FF FF | SOffset32 | 0xFFFFE698 (-6504) Loc: +0x391C | offset to vtable + +0x1FB8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x1FD0 | offset to field `key` (string) + +0x1FBC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1FC0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1C08 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x1C0C | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal - +0x1C14 | 6C 65 54 | | leT - +0x1C17 | 00 | char | 0x00 (0) | string terminator + +0x1FC0 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x1FC4 | 52 65 66 65 72 72 61 62 | char[11] | Referrab | string literal + +0x1FCC | 6C 65 54 | | leT + +0x1FCF | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1C18 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x1C1C | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x1C24 | 00 | char | 0x00 (0) | string terminator + +0x1FD0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x1FD4 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x1FDC | 00 | char | 0x00 (0) | string terminator padding: - +0x1C25 | 00 00 00 | uint8_t[3] | ... | padding + +0x1FDD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x1C28 | C4 E6 FF FF | SOffset32 | 0xFFFFE6C4 (-6460) Loc: +0x3564 | offset to vtable - +0x1C2C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1C40 | offset to field `key` (string) - +0x1C30 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1C34 | offset to field `value` (string) + +0x1FE0 | C4 E6 FF FF | SOffset32 | 0xFFFFE6C4 (-6460) Loc: +0x391C | offset to vtable + +0x1FE4 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x1FF8 | offset to field `key` (string) + +0x1FE8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1FEC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1C34 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x1C38 | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x1C3D | 00 | char | 0x00 (0) | string terminator + +0x1FEC | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x1FF0 | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x1FF5 | 00 | char | 0x00 (0) | string terminator padding: - +0x1C3E | 00 00 | uint8_t[2] | .. | padding + +0x1FF6 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1C40 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x1C44 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x1C4C | 74 79 70 65 | | type - +0x1C50 | 00 | char | 0x00 (0) | string terminator + +0x1FF8 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x1FFC | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x2004 | 74 79 70 65 | | type + +0x2008 | 00 | char | 0x00 (0) | string terminator padding: - +0x1C51 | 00 00 00 | uint8_t[3] | ... | padding + +0x2009 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x1C54 | 70 E5 FF FF | SOffset32 | 0xFFFFE570 (-6800) Loc: +0x36E4 | offset to vtable - +0x1C58 | 00 00 00 | uint8_t[3] | ... | padding - +0x1C5B | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x1C5C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x1C60 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x200C | 70 E5 FF FF | SOffset32 | 0xFFFFE570 (-6800) Loc: +0x3A9C | offset to vtable + +0x2010 | 00 00 00 | uint8_t[3] | ... | padding + +0x2013 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x2014 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x2018 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1C64 | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string - +0x1C68 | 73 69 6E 67 6C 65 5F 77 | char[21] | single_w | string literal - +0x1C70 | 65 61 6B 5F 72 65 66 65 | | eak_refe - +0x1C78 | 72 65 6E 63 65 | | rence - +0x1C7D | 00 | char | 0x00 (0) | string terminator + +0x201C | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string + +0x2020 | 73 69 6E 67 6C 65 5F 77 | char[21] | single_w | string literal + +0x2028 | 65 61 6B 5F 72 65 66 65 | | eak_refe + +0x2030 | 72 65 6E 63 65 | | rence + +0x2035 | 00 | char | 0x00 (0) | string terminator padding: - +0x1C7E | 00 00 | uint8_t[2] | .. | padding + +0x2036 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1C80 | 5C F1 FF FF | SOffset32 | 0xFFFFF15C (-3748) Loc: +0x2B24 | offset to vtable - +0x1C84 | 00 00 00 | uint8_t[3] | ... | padding - +0x1C87 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1C88 | 23 00 | uint16_t | 0x0023 (35) | table field `id` (UShort) - +0x1C8A | 4A 00 | uint16_t | 0x004A (74) | table field `offset` (UShort) - +0x1C8C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1CD4 | offset to field `name` (string) - +0x1C90 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1CC4 | offset to field `type` (table) - +0x1C94 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1CA0 | offset to field `attributes` (vector) - +0x1C98 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1C9C | offset to field `documentation` (vector) + +0x2038 | 5C F1 FF FF | SOffset32 | 0xFFFFF15C (-3748) Loc: +0x2EDC | offset to vtable + +0x203C | 00 00 00 | uint8_t[3] | ... | padding + +0x203F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2040 | 23 00 | uint16_t | 0x0023 (35) | table field `id` (UShort) + +0x2042 | 4A 00 | uint16_t | 0x004A (74) | table field `offset` (UShort) + +0x2044 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x208C | offset to field `name` (string) + +0x2048 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x207C | offset to field `type` (table) + +0x204C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2058 | offset to field `attributes` (vector) + +0x2050 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2054 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1C9C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2054 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1CA0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1CA4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CA8 | offset to table[0] + +0x2058 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x205C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2060 | offset to table[0] table (reflection.KeyValue): - +0x1CA8 | 44 E7 FF FF | SOffset32 | 0xFFFFE744 (-6332) Loc: +0x3564 | offset to vtable - +0x1CAC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1CBC | offset to field `key` (string) - +0x1CB0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1CB4 | offset to field `value` (string) + +0x2060 | 44 E7 FF FF | SOffset32 | 0xFFFFE744 (-6332) Loc: +0x391C | offset to vtable + +0x2064 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2074 | offset to field `key` (string) + +0x2068 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x206C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1CB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1CB8 | 33 35 | char[2] | 35 | string literal - +0x1CBA | 00 | char | 0x00 (0) | string terminator + +0x206C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2070 | 33 35 | char[2] | 35 | string literal + +0x2072 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1CBC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1CC0 | 69 64 | char[2] | id | string literal - +0x1CC2 | 00 | char | 0x00 (0) | string terminator + +0x2074 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2078 | 69 64 | char[2] | id | string literal + +0x207A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1CC4 | 14 F3 FF FF | SOffset32 | 0xFFFFF314 (-3308) Loc: +0x29B0 | offset to vtable - +0x1CC8 | 00 00 | uint8_t[2] | .. | padding - +0x1CCA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1CCB | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x1CCC | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) - +0x1CD0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x207C | 14 F3 FF FF | SOffset32 | 0xFFFFF314 (-3308) Loc: +0x2D68 | offset to vtable + +0x2080 | 00 00 | uint8_t[2] | .. | padding + +0x2082 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2083 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x2084 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `index` (Int) + +0x2088 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1CD4 | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string - +0x1CD8 | 76 65 63 74 6F 72 5F 6F | char[21] | vector_o | string literal - +0x1CE0 | 66 5F 72 65 66 65 72 72 | | f_referr - +0x1CE8 | 61 62 6C 65 73 | | ables - +0x1CED | 00 | char | 0x00 (0) | string terminator + +0x208C | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string + +0x2090 | 76 65 63 74 6F 72 5F 6F | char[21] | vector_o | string literal + +0x2098 | 66 5F 72 65 66 65 72 72 | | f_referr + +0x20A0 | 61 62 6C 65 73 | | ables + +0x20A5 | 00 | char | 0x00 (0) | string terminator padding: - +0x1CEE | 00 00 | uint8_t[2] | .. | padding + +0x20A6 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1CF0 | CC F1 FF FF | SOffset32 | 0xFFFFF1CC (-3636) Loc: +0x2B24 | offset to vtable - +0x1CF4 | 00 00 00 | uint8_t[3] | ... | padding - +0x1CF7 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1CF8 | 22 00 | uint16_t | 0x0022 (34) | table field `id` (UShort) - +0x1CFA | 48 00 | uint16_t | 0x0048 (72) | table field `offset` (UShort) - +0x1CFC | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1D44 | offset to field `name` (string) - +0x1D00 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1D34 | offset to field `type` (table) - +0x1D04 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1D10 | offset to field `attributes` (vector) - +0x1D08 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D0C | offset to field `documentation` (vector) + +0x20A8 | CC F1 FF FF | SOffset32 | 0xFFFFF1CC (-3636) Loc: +0x2EDC | offset to vtable + +0x20AC | 00 00 00 | uint8_t[3] | ... | padding + +0x20AF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x20B0 | 22 00 | uint16_t | 0x0022 (34) | table field `id` (UShort) + +0x20B2 | 48 00 | uint16_t | 0x0048 (72) | table field `offset` (UShort) + +0x20B4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x20FC | offset to field `name` (string) + +0x20B8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x20EC | offset to field `type` (table) + +0x20BC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x20C8 | offset to field `attributes` (vector) + +0x20C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x20C4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1D0C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x20C4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1D10 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1D14 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D18 | offset to table[0] + +0x20C8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x20CC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x20D0 | offset to table[0] table (reflection.KeyValue): - +0x1D18 | B4 E7 FF FF | SOffset32 | 0xFFFFE7B4 (-6220) Loc: +0x3564 | offset to vtable - +0x1D1C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1D2C | offset to field `key` (string) - +0x1D20 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D24 | offset to field `value` (string) + +0x20D0 | B4 E7 FF FF | SOffset32 | 0xFFFFE7B4 (-6220) Loc: +0x391C | offset to vtable + +0x20D4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x20E4 | offset to field `key` (string) + +0x20D8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x20DC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1D24 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1D28 | 33 34 | char[2] | 34 | string literal - +0x1D2A | 00 | char | 0x00 (0) | string terminator + +0x20DC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x20E0 | 33 34 | char[2] | 34 | string literal + +0x20E2 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1D2C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1D30 | 69 64 | char[2] | id | string literal - +0x1D32 | 00 | char | 0x00 (0) | string terminator + +0x20E4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x20E8 | 69 64 | char[2] | id | string literal + +0x20EA | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1D34 | 7C E4 FF FF | SOffset32 | 0xFFFFE47C (-7044) Loc: +0x38B8 | offset to vtable - +0x1D38 | 00 00 00 | uint8_t[3] | ... | padding - +0x1D3B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x1D3C | 0B 00 00 00 | uint32_t | 0x0000000B (11) | table field `index` (Int) - +0x1D40 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x20EC | 7C E4 FF FF | SOffset32 | 0xFFFFE47C (-7044) Loc: +0x3C70 | offset to vtable + +0x20F0 | 00 00 00 | uint8_t[3] | ... | padding + +0x20F3 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x20F4 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | table field `index` (Int) + +0x20F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1D44 | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string - +0x1D48 | 70 61 72 65 6E 74 5F 6E | char[21] | parent_n | string literal - +0x1D50 | 61 6D 65 73 70 61 63 65 | | amespace - +0x1D58 | 5F 74 65 73 74 | | _test - +0x1D5D | 00 | char | 0x00 (0) | string terminator + +0x20FC | 15 00 00 00 | uint32_t | 0x00000015 (21) | length of string + +0x2100 | 70 61 72 65 6E 74 5F 6E | char[21] | parent_n | string literal + +0x2108 | 61 6D 65 73 70 61 63 65 | | amespace + +0x2110 | 5F 74 65 73 74 | | _test + +0x2115 | 00 | char | 0x00 (0) | string terminator padding: - +0x1D5E | 00 00 | uint8_t[2] | .. | padding + +0x2116 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1D60 | 3C F2 FF FF | SOffset32 | 0xFFFFF23C (-3524) Loc: +0x2B24 | offset to vtable - +0x1D64 | 00 00 00 | uint8_t[3] | ... | padding - +0x1D67 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1D68 | 21 00 | uint16_t | 0x0021 (33) | table field `id` (UShort) - +0x1D6A | 46 00 | uint16_t | 0x0046 (70) | table field `offset` (UShort) - +0x1D6C | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x1DB0 | offset to field `name` (string) - +0x1D70 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1DA4 | offset to field `type` (table) - +0x1D74 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1D80 | offset to field `attributes` (vector) - +0x1D78 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D7C | offset to field `documentation` (vector) + +0x2118 | 3C F2 FF FF | SOffset32 | 0xFFFFF23C (-3524) Loc: +0x2EDC | offset to vtable + +0x211C | 00 00 00 | uint8_t[3] | ... | padding + +0x211F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2120 | 21 00 | uint16_t | 0x0021 (33) | table field `id` (UShort) + +0x2122 | 46 00 | uint16_t | 0x0046 (70) | table field `offset` (UShort) + +0x2124 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2168 | offset to field `name` (string) + +0x2128 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x215C | offset to field `type` (table) + +0x212C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2138 | offset to field `attributes` (vector) + +0x2130 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2134 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1D7C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2134 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1D80 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1D84 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D88 | offset to table[0] + +0x2138 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x213C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2140 | offset to table[0] table (reflection.KeyValue): - +0x1D88 | 24 E8 FF FF | SOffset32 | 0xFFFFE824 (-6108) Loc: +0x3564 | offset to vtable - +0x1D8C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1D9C | offset to field `key` (string) - +0x1D90 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1D94 | offset to field `value` (string) + +0x2140 | 24 E8 FF FF | SOffset32 | 0xFFFFE824 (-6108) Loc: +0x391C | offset to vtable + +0x2144 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2154 | offset to field `key` (string) + +0x2148 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x214C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1D94 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1D98 | 33 33 | char[2] | 33 | string literal - +0x1D9A | 00 | char | 0x00 (0) | string terminator + +0x214C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2150 | 33 33 | char[2] | 33 | string literal + +0x2152 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1D9C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1DA0 | 69 64 | char[2] | id | string literal - +0x1DA2 | 00 | char | 0x00 (0) | string terminator + +0x2154 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2158 | 69 64 | char[2] | id | string literal + +0x215A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1DA4 | 20 F2 FF FF | SOffset32 | 0xFFFFF220 (-3552) Loc: +0x2B84 | offset to vtable - +0x1DA8 | 00 00 | uint8_t[2] | .. | padding - +0x1DAA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1DAB | 0C | uint8_t | 0x0C (12) | table field `element` (Byte) - +0x1DAC | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) + +0x215C | 20 F2 FF FF | SOffset32 | 0xFFFFF220 (-3552) Loc: +0x2F3C | offset to vtable + +0x2160 | 00 00 | uint8_t[2] | .. | padding + +0x2162 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2163 | 0C | uint8_t | 0x0C (12) | table field `element` (Byte) + +0x2164 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1DB0 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x1DB4 | 76 65 63 74 6F 72 5F 6F | char[17] | vector_o | string literal - +0x1DBC | 66 5F 64 6F 75 62 6C 65 | | f_double - +0x1DC4 | 73 | | s - +0x1DC5 | 00 | char | 0x00 (0) | string terminator + +0x2168 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x216C | 76 65 63 74 6F 72 5F 6F | char[17] | vector_o | string literal + +0x2174 | 66 5F 64 6F 75 62 6C 65 | | f_double + +0x217C | 73 | | s + +0x217D | 00 | char | 0x00 (0) | string terminator padding: - +0x1DC6 | 00 00 | uint8_t[2] | .. | padding + +0x217E | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1DC8 | A4 F2 FF FF | SOffset32 | 0xFFFFF2A4 (-3420) Loc: +0x2B24 | offset to vtable - +0x1DCC | 00 00 00 | uint8_t[3] | ... | padding - +0x1DCF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1DD0 | 20 00 | uint16_t | 0x0020 (32) | table field `id` (UShort) - +0x1DD2 | 44 00 | uint16_t | 0x0044 (68) | table field `offset` (UShort) - +0x1DD4 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x1E18 | offset to field `name` (string) - +0x1DD8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1E0C | offset to field `type` (table) - +0x1DDC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1DE8 | offset to field `attributes` (vector) - +0x1DE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DE4 | offset to field `documentation` (vector) + +0x2180 | A4 F2 FF FF | SOffset32 | 0xFFFFF2A4 (-3420) Loc: +0x2EDC | offset to vtable + +0x2184 | 00 00 00 | uint8_t[3] | ... | padding + +0x2187 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2188 | 20 00 | uint16_t | 0x0020 (32) | table field `id` (UShort) + +0x218A | 44 00 | uint16_t | 0x0044 (68) | table field `offset` (UShort) + +0x218C | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x21D0 | offset to field `name` (string) + +0x2190 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x21C4 | offset to field `type` (table) + +0x2194 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x21A0 | offset to field `attributes` (vector) + +0x2198 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x219C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1DE4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x219C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1DE8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1DEC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DF0 | offset to table[0] + +0x21A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x21A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21A8 | offset to table[0] table (reflection.KeyValue): - +0x1DF0 | 8C E8 FF FF | SOffset32 | 0xFFFFE88C (-6004) Loc: +0x3564 | offset to vtable - +0x1DF4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1E04 | offset to field `key` (string) - +0x1DF8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1DFC | offset to field `value` (string) + +0x21A8 | 8C E8 FF FF | SOffset32 | 0xFFFFE88C (-6004) Loc: +0x391C | offset to vtable + +0x21AC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x21BC | offset to field `key` (string) + +0x21B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21B4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1DFC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1E00 | 33 32 | char[2] | 32 | string literal - +0x1E02 | 00 | char | 0x00 (0) | string terminator + +0x21B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x21B8 | 33 32 | char[2] | 32 | string literal + +0x21BA | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1E04 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1E08 | 69 64 | char[2] | id | string literal - +0x1E0A | 00 | char | 0x00 (0) | string terminator + +0x21BC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x21C0 | 69 64 | char[2] | id | string literal + +0x21C2 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1E0C | 88 F2 FF FF | SOffset32 | 0xFFFFF288 (-3448) Loc: +0x2B84 | offset to vtable - +0x1E10 | 00 00 | uint8_t[2] | .. | padding - +0x1E12 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1E13 | 09 | uint8_t | 0x09 (9) | table field `element` (Byte) - +0x1E14 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) + +0x21C4 | 88 F2 FF FF | SOffset32 | 0xFFFFF288 (-3448) Loc: +0x2F3C | offset to vtable + +0x21C8 | 00 00 | uint8_t[2] | .. | padding + +0x21CA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x21CB | 09 | uint8_t | 0x09 (9) | table field `element` (Byte) + +0x21CC | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1E18 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string - +0x1E1C | 76 65 63 74 6F 72 5F 6F | char[15] | vector_o | string literal - +0x1E24 | 66 5F 6C 6F 6E 67 73 | | f_longs - +0x1E2B | 00 | char | 0x00 (0) | string terminator + +0x21D0 | 0F 00 00 00 | uint32_t | 0x0000000F (15) | length of string + +0x21D4 | 76 65 63 74 6F 72 5F 6F | char[15] | vector_o | string literal + +0x21DC | 66 5F 6C 6F 6E 67 73 | | f_longs + +0x21E3 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1E2C | 08 F3 FF FF | SOffset32 | 0xFFFFF308 (-3320) Loc: +0x2B24 | offset to vtable - +0x1E30 | 00 00 00 | uint8_t[3] | ... | padding - +0x1E33 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1E34 | 1F 00 | uint16_t | 0x001F (31) | table field `id` (UShort) - +0x1E36 | 42 00 | uint16_t | 0x0042 (66) | table field `offset` (UShort) - +0x1E38 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1E80 | offset to field `name` (string) - +0x1E3C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1E70 | offset to field `type` (table) - +0x1E40 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1E4C | offset to field `attributes` (vector) - +0x1E44 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E48 | offset to field `documentation` (vector) + +0x21E4 | 08 F3 FF FF | SOffset32 | 0xFFFFF308 (-3320) Loc: +0x2EDC | offset to vtable + +0x21E8 | 00 00 00 | uint8_t[3] | ... | padding + +0x21EB | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x21EC | 1F 00 | uint16_t | 0x001F (31) | table field `id` (UShort) + +0x21EE | 42 00 | uint16_t | 0x0042 (66) | table field `offset` (UShort) + +0x21F0 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2238 | offset to field `name` (string) + +0x21F4 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2228 | offset to field `type` (table) + +0x21F8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2204 | offset to field `attributes` (vector) + +0x21FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2200 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1E48 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2200 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1E4C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1E50 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E54 | offset to table[0] + +0x2204 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2208 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x220C | offset to table[0] table (reflection.KeyValue): - +0x1E54 | F0 E8 FF FF | SOffset32 | 0xFFFFE8F0 (-5904) Loc: +0x3564 | offset to vtable - +0x1E58 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1E68 | offset to field `key` (string) - +0x1E5C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1E60 | offset to field `value` (string) + +0x220C | F0 E8 FF FF | SOffset32 | 0xFFFFE8F0 (-5904) Loc: +0x391C | offset to vtable + +0x2210 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2220 | offset to field `key` (string) + +0x2214 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2218 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1E60 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1E64 | 33 31 | char[2] | 31 | string literal - +0x1E66 | 00 | char | 0x00 (0) | string terminator + +0x2218 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x221C | 33 31 | char[2] | 31 | string literal + +0x221E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1E68 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1E6C | 69 64 | char[2] | id | string literal - +0x1E6E | 00 | char | 0x00 (0) | string terminator + +0x2220 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2224 | 69 64 | char[2] | id | string literal + +0x2226 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1E70 | C0 F4 FF FF | SOffset32 | 0xFFFFF4C0 (-2880) Loc: +0x29B0 | offset to vtable - +0x1E74 | 00 00 | uint8_t[2] | .. | padding - +0x1E76 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1E77 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x1E78 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) - +0x1E7C | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x2228 | C0 F4 FF FF | SOffset32 | 0xFFFFF4C0 (-2880) Loc: +0x2D68 | offset to vtable + +0x222C | 00 00 | uint8_t[2] | .. | padding + +0x222E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x222F | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x2230 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) + +0x2234 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1E80 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x1E84 | 74 65 73 74 35 | char[5] | test5 | string literal - +0x1E89 | 00 | char | 0x00 (0) | string terminator + +0x2238 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x223C | 74 65 73 74 35 | char[5] | test5 | string literal + +0x2241 | 00 | char | 0x00 (0) | string terminator padding: - +0x1E8A | 00 00 | uint8_t[2] | .. | padding + +0x2242 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x1E8C | 68 F3 FF FF | SOffset32 | 0xFFFFF368 (-3224) Loc: +0x2B24 | offset to vtable - +0x1E90 | 00 00 00 | uint8_t[3] | ... | padding - +0x1E93 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1E94 | 1E 00 | uint16_t | 0x001E (30) | table field `id` (UShort) - +0x1E96 | 40 00 | uint16_t | 0x0040 (64) | table field `offset` (UShort) - +0x1E98 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x1F04 | offset to field `name` (string) - +0x1E9C | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x1EF8 | offset to field `type` (table) - +0x1EA0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1EAC | offset to field `attributes` (vector) - +0x1EA4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EA8 | offset to field `documentation` (vector) + +0x2244 | 68 F3 FF FF | SOffset32 | 0xFFFFF368 (-3224) Loc: +0x2EDC | offset to vtable + +0x2248 | 00 00 00 | uint8_t[3] | ... | padding + +0x224B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x224C | 1E 00 | uint16_t | 0x001E (30) | table field `id` (UShort) + +0x224E | 40 00 | uint16_t | 0x0040 (64) | table field `offset` (UShort) + +0x2250 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x22BC | offset to field `name` (string) + +0x2254 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x22B0 | offset to field `type` (table) + +0x2258 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2264 | offset to field `attributes` (vector) + +0x225C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2260 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1EA8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2260 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1EAC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x1EB0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x1ED4 | offset to table[0] - +0x1EB4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EB8 | offset to table[1] + +0x2264 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2268 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x228C | offset to table[0] + +0x226C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2270 | offset to table[1] table (reflection.KeyValue): - +0x1EB8 | 54 E9 FF FF | SOffset32 | 0xFFFFE954 (-5804) Loc: +0x3564 | offset to vtable - +0x1EBC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1ECC | offset to field `key` (string) - +0x1EC0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EC4 | offset to field `value` (string) + +0x2270 | 54 E9 FF FF | SOffset32 | 0xFFFFE954 (-5804) Loc: +0x391C | offset to vtable + +0x2274 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2284 | offset to field `key` (string) + +0x2278 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x227C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1EC4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1EC8 | 33 30 | char[2] | 30 | string literal - +0x1ECA | 00 | char | 0x00 (0) | string terminator + +0x227C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2280 | 33 30 | char[2] | 30 | string literal + +0x2282 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1ECC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1ED0 | 69 64 | char[2] | id | string literal - +0x1ED2 | 00 | char | 0x00 (0) | string terminator + +0x2284 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2288 | 69 64 | char[2] | id | string literal + +0x228A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x1ED4 | 70 E9 FF FF | SOffset32 | 0xFFFFE970 (-5776) Loc: +0x3564 | offset to vtable - +0x1ED8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1EE8 | offset to field `key` (string) - +0x1EDC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1EE0 | offset to field `value` (string) + +0x228C | 70 E9 FF FF | SOffset32 | 0xFFFFE970 (-5776) Loc: +0x391C | offset to vtable + +0x2290 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x22A0 | offset to field `key` (string) + +0x2294 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2298 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1EE0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x1EE4 | 30 | char[1] | 0 | string literal - +0x1EE5 | 00 | char | 0x00 (0) | string terminator + +0x2298 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x229C | 30 | char[1] | 0 | string literal + +0x229D | 00 | char | 0x00 (0) | string terminator padding: - +0x1EE6 | 00 00 | uint8_t[2] | .. | padding + +0x229E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x1EE8 | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string - +0x1EEC | 66 6C 65 78 62 75 66 66 | char[10] | flexbuff | string literal - +0x1EF4 | 65 72 | | er - +0x1EF6 | 00 | char | 0x00 (0) | string terminator + +0x22A0 | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string + +0x22A4 | 66 6C 65 78 62 75 66 66 | char[10] | flexbuff | string literal + +0x22AC | 65 72 | | er + +0x22AE | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1EF8 | 74 F3 FF FF | SOffset32 | 0xFFFFF374 (-3212) Loc: +0x2B84 | offset to vtable - +0x1EFC | 00 00 | uint8_t[2] | .. | padding - +0x1EFE | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1EFF | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) - +0x1F00 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x22B0 | 74 F3 FF FF | SOffset32 | 0xFFFFF374 (-3212) Loc: +0x2F3C | offset to vtable + +0x22B4 | 00 00 | uint8_t[2] | .. | padding + +0x22B6 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x22B7 | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) + +0x22B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1F04 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x1F08 | 66 6C 65 78 | char[4] | flex | string literal - +0x1F0C | 00 | char | 0x00 (0) | string terminator + +0x22BC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x22C0 | 66 6C 65 78 | char[4] | flex | string literal + +0x22C4 | 00 | char | 0x00 (0) | string terminator padding: - +0x1F0D | 00 00 00 | uint8_t[3] | ... | padding + +0x22C5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x1F10 | EC F3 FF FF | SOffset32 | 0xFFFFF3EC (-3092) Loc: +0x2B24 | offset to vtable - +0x1F14 | 00 00 00 | uint8_t[3] | ... | padding - +0x1F17 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1F18 | 1D 00 | uint16_t | 0x001D (29) | table field `id` (UShort) - +0x1F1A | 3E 00 | uint16_t | 0x003E (62) | table field `offset` (UShort) - +0x1F1C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x1F64 | offset to field `name` (string) - +0x1F20 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1F54 | offset to field `type` (table) - +0x1F24 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1F30 | offset to field `attributes` (vector) - +0x1F28 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F2C | offset to field `documentation` (vector) + +0x22C8 | EC F3 FF FF | SOffset32 | 0xFFFFF3EC (-3092) Loc: +0x2EDC | offset to vtable + +0x22CC | 00 00 00 | uint8_t[3] | ... | padding + +0x22CF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x22D0 | 1D 00 | uint16_t | 0x001D (29) | table field `id` (UShort) + +0x22D2 | 3E 00 | uint16_t | 0x003E (62) | table field `offset` (UShort) + +0x22D4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x231C | offset to field `name` (string) + +0x22D8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x230C | offset to field `type` (table) + +0x22DC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x22E8 | offset to field `attributes` (vector) + +0x22E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22E4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1F2C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x22E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1F30 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1F34 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F38 | offset to table[0] + +0x22E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x22EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22F0 | offset to table[0] table (reflection.KeyValue): - +0x1F38 | D4 E9 FF FF | SOffset32 | 0xFFFFE9D4 (-5676) Loc: +0x3564 | offset to vtable - +0x1F3C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1F4C | offset to field `key` (string) - +0x1F40 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F44 | offset to field `value` (string) + +0x22F0 | D4 E9 FF FF | SOffset32 | 0xFFFFE9D4 (-5676) Loc: +0x391C | offset to vtable + +0x22F4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2304 | offset to field `key` (string) + +0x22F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22FC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1F44 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1F48 | 32 39 | char[2] | 29 | string literal - +0x1F4A | 00 | char | 0x00 (0) | string terminator + +0x22FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2300 | 32 39 | char[2] | 29 | string literal + +0x2302 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1F4C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1F50 | 69 64 | char[2] | id | string literal - +0x1F52 | 00 | char | 0x00 (0) | string terminator + +0x2304 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2308 | 69 64 | char[2] | id | string literal + +0x230A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1F54 | A4 F5 FF FF | SOffset32 | 0xFFFFF5A4 (-2652) Loc: +0x29B0 | offset to vtable - +0x1F58 | 00 00 | uint8_t[2] | .. | padding - +0x1F5A | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1F5B | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x1F5C | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) - +0x1F60 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x230C | A4 F5 FF FF | SOffset32 | 0xFFFFF5A4 (-2652) Loc: +0x2D68 | offset to vtable + +0x2310 | 00 00 | uint8_t[2] | .. | padding + +0x2312 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2313 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x2314 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) + +0x2318 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1F64 | 17 00 00 00 | uint32_t | 0x00000017 (23) | length of string - +0x1F68 | 74 65 73 74 61 72 72 61 | char[23] | testarra | string literal - +0x1F70 | 79 6F 66 73 6F 72 74 65 | | yofsorte - +0x1F78 | 64 73 74 72 75 63 74 | | dstruct - +0x1F7F | 00 | char | 0x00 (0) | string terminator + +0x231C | 17 00 00 00 | uint32_t | 0x00000017 (23) | length of string + +0x2320 | 74 65 73 74 61 72 72 61 | char[23] | testarra | string literal + +0x2328 | 79 6F 66 73 6F 72 74 65 | | yofsorte + +0x2330 | 64 73 74 72 75 63 74 | | dstruct + +0x2337 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1F80 | 5C F4 FF FF | SOffset32 | 0xFFFFF45C (-2980) Loc: +0x2B24 | offset to vtable - +0x1F84 | 00 00 00 | uint8_t[3] | ... | padding - +0x1F87 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x1F88 | 1C 00 | uint16_t | 0x001C (28) | table field `id` (UShort) - +0x1F8A | 3C 00 | uint16_t | 0x003C (60) | table field `offset` (UShort) - +0x1F8C | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x1FD0 | offset to field `name` (string) - +0x1F90 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x1FC4 | offset to field `type` (table) - +0x1F94 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x1FA0 | offset to field `attributes` (vector) - +0x1F98 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1F9C | offset to field `documentation` (vector) + +0x2338 | 5C F4 FF FF | SOffset32 | 0xFFFFF45C (-2980) Loc: +0x2EDC | offset to vtable + +0x233C | 00 00 00 | uint8_t[3] | ... | padding + +0x233F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2340 | 1C 00 | uint16_t | 0x001C (28) | table field `id` (UShort) + +0x2342 | 3C 00 | uint16_t | 0x003C (60) | table field `offset` (UShort) + +0x2344 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2388 | offset to field `name` (string) + +0x2348 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x237C | offset to field `type` (table) + +0x234C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2358 | offset to field `attributes` (vector) + +0x2350 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2354 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x1F9C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2354 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x1FA0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x1FA4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1FA8 | offset to table[0] + +0x2358 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x235C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2360 | offset to table[0] table (reflection.KeyValue): - +0x1FA8 | 44 EA FF FF | SOffset32 | 0xFFFFEA44 (-5564) Loc: +0x3564 | offset to vtable - +0x1FAC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x1FBC | offset to field `key` (string) - +0x1FB0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x1FB4 | offset to field `value` (string) + +0x2360 | 44 EA FF FF | SOffset32 | 0xFFFFEA44 (-5564) Loc: +0x391C | offset to vtable + +0x2364 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2374 | offset to field `key` (string) + +0x2368 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x236C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x1FB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1FB8 | 32 38 | char[2] | 28 | string literal - +0x1FBA | 00 | char | 0x00 (0) | string terminator + +0x236C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2370 | 32 38 | char[2] | 28 | string literal + +0x2372 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x1FBC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x1FC0 | 69 64 | char[2] | id | string literal - +0x1FC2 | 00 | char | 0x00 (0) | string terminator + +0x2374 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2378 | 69 64 | char[2] | id | string literal + +0x237A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x1FC4 | 40 F4 FF FF | SOffset32 | 0xFFFFF440 (-3008) Loc: +0x2B84 | offset to vtable - +0x1FC8 | 00 00 | uint8_t[2] | .. | padding - +0x1FCA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x1FCB | 0D | uint8_t | 0x0D (13) | table field `element` (Byte) - +0x1FCC | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x237C | 40 F4 FF FF | SOffset32 | 0xFFFFF440 (-3008) Loc: +0x2F3C | offset to vtable + +0x2380 | 00 00 | uint8_t[2] | .. | padding + +0x2382 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2383 | 0D | uint8_t | 0x0D (13) | table field `element` (Byte) + +0x2384 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x1FD0 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string - +0x1FD4 | 74 65 73 74 61 72 72 61 | char[18] | testarra | string literal - +0x1FDC | 79 6F 66 73 74 72 69 6E | | yofstrin - +0x1FE4 | 67 32 | | g2 - +0x1FE6 | 00 | char | 0x00 (0) | string terminator + +0x2388 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string + +0x238C | 74 65 73 74 61 72 72 61 | char[18] | testarra | string literal + +0x2394 | 79 6F 66 73 74 72 69 6E | | yofstrin + +0x239C | 67 32 | | g2 + +0x239E | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x1FE8 | AE F5 FF FF | SOffset32 | 0xFFFFF5AE (-2642) Loc: +0x2A3A | offset to vtable - +0x1FEC | 1B 00 | uint16_t | 0x001B (27) | table field `id` (UShort) - +0x1FEE | 3A 00 | uint16_t | 0x003A (58) | table field `offset` (UShort) - +0x1FF0 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2034 | offset to field `name` (string) - +0x1FF4 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2028 | offset to field `type` (table) - +0x1FF8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2004 | offset to field `attributes` (vector) - +0x1FFC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2000 | offset to field `documentation` (vector) + +0x23A0 | AE F5 FF FF | SOffset32 | 0xFFFFF5AE (-2642) Loc: +0x2DF2 | offset to vtable + +0x23A4 | 1B 00 | uint16_t | 0x001B (27) | table field `id` (UShort) + +0x23A6 | 3A 00 | uint16_t | 0x003A (58) | table field `offset` (UShort) + +0x23A8 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x23EC | offset to field `name` (string) + +0x23AC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x23E0 | offset to field `type` (table) + +0x23B0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x23BC | offset to field `attributes` (vector) + +0x23B4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23B8 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2000 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x23B8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2004 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2008 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x200C | offset to table[0] + +0x23BC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x23C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23C4 | offset to table[0] table (reflection.KeyValue): - +0x200C | A8 EA FF FF | SOffset32 | 0xFFFFEAA8 (-5464) Loc: +0x3564 | offset to vtable - +0x2010 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2020 | offset to field `key` (string) - +0x2014 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2018 | offset to field `value` (string) + +0x23C4 | A8 EA FF FF | SOffset32 | 0xFFFFEAA8 (-5464) Loc: +0x391C | offset to vtable + +0x23C8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x23D8 | offset to field `key` (string) + +0x23CC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23D0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2018 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x201C | 32 37 | char[2] | 27 | string literal - +0x201E | 00 | char | 0x00 (0) | string terminator + +0x23D0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x23D4 | 32 37 | char[2] | 27 | string literal + +0x23D6 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2020 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2024 | 69 64 | char[2] | id | string literal - +0x2026 | 00 | char | 0x00 (0) | string terminator + +0x23D8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x23DC | 69 64 | char[2] | id | string literal + +0x23DE | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2028 | 8C E6 FF FF | SOffset32 | 0xFFFFE68C (-6516) Loc: +0x399C | offset to vtable - +0x202C | 00 00 00 | uint8_t[3] | ... | padding - +0x202F | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x2030 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x23E0 | 8C E6 FF FF | SOffset32 | 0xFFFFE68C (-6516) Loc: +0x3D54 | offset to vtable + +0x23E4 | 00 00 00 | uint8_t[3] | ... | padding + +0x23E7 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x23E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2034 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string - +0x2038 | 74 65 73 74 66 33 | char[6] | testf3 | string literal - +0x203E | 00 | char | 0x00 (0) | string terminator + +0x23EC | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string + +0x23F0 | 74 65 73 74 66 33 | char[6] | testf3 | string literal + +0x23F6 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x2040 | 9A FF FF FF | SOffset32 | 0xFFFFFF9A (-102) Loc: +0x20A6 | offset to vtable - +0x2044 | 1A 00 | uint16_t | 0x001A (26) | table field `id` (UShort) - +0x2046 | 38 00 | uint16_t | 0x0038 (56) | table field `offset` (UShort) - +0x2048 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x2098 | offset to field `name` (string) - +0x204C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x208C | offset to field `type` (table) - +0x2050 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2068 | offset to field `attributes` (vector) - +0x2054 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2064 | offset to field `documentation` (vector) - +0x2058 | 00 00 00 00 00 00 08 40 | double | 0x4008000000000000 (3) | table field `default_real` (Double) - +0x2060 | 00 00 00 00 | uint8_t[4] | .... | padding + +0x23F8 | 9A FF FF FF | SOffset32 | 0xFFFFFF9A (-102) Loc: +0x245E | offset to vtable + +0x23FC | 1A 00 | uint16_t | 0x001A (26) | table field `id` (UShort) + +0x23FE | 38 00 | uint16_t | 0x0038 (56) | table field `offset` (UShort) + +0x2400 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x2450 | offset to field `name` (string) + +0x2404 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2444 | offset to field `type` (table) + +0x2408 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2420 | offset to field `attributes` (vector) + +0x240C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x241C | offset to field `documentation` (vector) + +0x2410 | 00 00 00 00 00 00 08 40 | double | 0x4008000000000000 (3) | table field `default_real` (Double) + +0x2418 | 00 00 00 00 | uint8_t[4] | .... | padding vector (reflection.Field.documentation): - +0x2064 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x241C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2068 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x206C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2070 | offset to table[0] + +0x2420 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2424 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2428 | offset to table[0] table (reflection.KeyValue): - +0x2070 | 0C EB FF FF | SOffset32 | 0xFFFFEB0C (-5364) Loc: +0x3564 | offset to vtable - +0x2074 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2084 | offset to field `key` (string) - +0x2078 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x207C | offset to field `value` (string) + +0x2428 | 0C EB FF FF | SOffset32 | 0xFFFFEB0C (-5364) Loc: +0x391C | offset to vtable + +0x242C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x243C | offset to field `key` (string) + +0x2430 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2434 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x207C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2080 | 32 36 | char[2] | 26 | string literal - +0x2082 | 00 | char | 0x00 (0) | string terminator + +0x2434 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2438 | 32 36 | char[2] | 26 | string literal + +0x243A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2084 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2088 | 69 64 | char[2] | id | string literal - +0x208A | 00 | char | 0x00 (0) | string terminator + +0x243C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2440 | 69 64 | char[2] | id | string literal + +0x2442 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x208C | F0 E6 FF FF | SOffset32 | 0xFFFFE6F0 (-6416) Loc: +0x399C | offset to vtable - +0x2090 | 00 00 00 | uint8_t[3] | ... | padding - +0x2093 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x2094 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2444 | F0 E6 FF FF | SOffset32 | 0xFFFFE6F0 (-6416) Loc: +0x3D54 | offset to vtable + +0x2448 | 00 00 00 | uint8_t[3] | ... | padding + +0x244B | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x244C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2098 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string - +0x209C | 74 65 73 74 66 32 | char[6] | testf2 | string literal - +0x20A2 | 00 | char | 0x00 (0) | string terminator + +0x2450 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string + +0x2454 | 74 65 73 74 66 32 | char[6] | testf2 | string literal + +0x245A | 00 | char | 0x00 (0) | string terminator padding: - +0x20A3 | 00 00 00 | uint8_t[3] | ... | padding + +0x245B | 00 00 00 | uint8_t[3] | ... | padding vtable (reflection.Field): - +0x20A6 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x20A8 | 24 00 | uint16_t | 0x0024 (36) | size of referring table - +0x20AA | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x20AC | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x20AE | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) - +0x20B0 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x20B2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x20B4 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_real` (id: 5) - +0x20B6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x20B8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x20BA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x20BC | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x20BE | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x245E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x2460 | 24 00 | uint16_t | 0x0024 (36) | size of referring table + +0x2462 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x2464 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x2466 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x2468 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x246A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x246C | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_real` (id: 5) + +0x246E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x2470 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x2472 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x2474 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x2476 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x20C0 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x20A6 | offset to vtable - +0x20C4 | 19 00 | uint16_t | 0x0019 (25) | table field `id` (UShort) - +0x20C6 | 36 00 | uint16_t | 0x0036 (54) | table field `offset` (UShort) - +0x20C8 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x2118 | offset to field `name` (string) - +0x20CC | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x210C | offset to field `type` (table) - +0x20D0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x20E8 | offset to field `attributes` (vector) - +0x20D4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x20E4 | offset to field `documentation` (vector) - +0x20D8 | 6E 86 1B F0 F9 21 09 40 | double | 0x400921F9F01B866E (3.14159) | table field `default_real` (Double) - +0x20E0 | 00 00 00 00 | uint8_t[4] | .... | padding + +0x2478 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x245E | offset to vtable + +0x247C | 19 00 | uint16_t | 0x0019 (25) | table field `id` (UShort) + +0x247E | 36 00 | uint16_t | 0x0036 (54) | table field `offset` (UShort) + +0x2480 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x24D0 | offset to field `name` (string) + +0x2484 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x24C4 | offset to field `type` (table) + +0x2488 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x24A0 | offset to field `attributes` (vector) + +0x248C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x249C | offset to field `documentation` (vector) + +0x2490 | 6E 86 1B F0 F9 21 09 40 | double | 0x400921F9F01B866E (3.14159) | table field `default_real` (Double) + +0x2498 | 00 00 00 00 | uint8_t[4] | .... | padding vector (reflection.Field.documentation): - +0x20E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x249C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x20E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x20EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x20F0 | offset to table[0] + +0x24A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x24A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24A8 | offset to table[0] table (reflection.KeyValue): - +0x20F0 | 8C EB FF FF | SOffset32 | 0xFFFFEB8C (-5236) Loc: +0x3564 | offset to vtable - +0x20F4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2104 | offset to field `key` (string) - +0x20F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x20FC | offset to field `value` (string) + +0x24A8 | 8C EB FF FF | SOffset32 | 0xFFFFEB8C (-5236) Loc: +0x391C | offset to vtable + +0x24AC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x24BC | offset to field `key` (string) + +0x24B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24B4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x20FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2100 | 32 35 | char[2] | 25 | string literal - +0x2102 | 00 | char | 0x00 (0) | string terminator + +0x24B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x24B8 | 32 35 | char[2] | 25 | string literal + +0x24BA | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2104 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2108 | 69 64 | char[2] | id | string literal - +0x210A | 00 | char | 0x00 (0) | string terminator + +0x24BC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x24C0 | 69 64 | char[2] | id | string literal + +0x24C2 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x210C | 70 E7 FF FF | SOffset32 | 0xFFFFE770 (-6288) Loc: +0x399C | offset to vtable - +0x2110 | 00 00 00 | uint8_t[3] | ... | padding - +0x2113 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x2114 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x24C4 | 70 E7 FF FF | SOffset32 | 0xFFFFE770 (-6288) Loc: +0x3D54 | offset to vtable + +0x24C8 | 00 00 00 | uint8_t[3] | ... | padding + +0x24CB | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x24CC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2118 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x211C | 74 65 73 74 66 | char[5] | testf | string literal - +0x2121 | 00 | char | 0x00 (0) | string terminator + +0x24D0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x24D4 | 74 65 73 74 66 | char[5] | testf | string literal + +0x24D9 | 00 | char | 0x00 (0) | string terminator padding: - +0x2122 | 00 00 | uint8_t[2] | .. | padding + +0x24DA | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x2124 | 00 F6 FF FF | SOffset32 | 0xFFFFF600 (-2560) Loc: +0x2B24 | offset to vtable - +0x2128 | 00 00 00 | uint8_t[3] | ... | padding - +0x212B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x212C | 18 00 | uint16_t | 0x0018 (24) | table field `id` (UShort) - +0x212E | 34 00 | uint16_t | 0x0034 (52) | table field `offset` (UShort) - +0x2130 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2174 | offset to field `name` (string) - +0x2134 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2168 | offset to field `type` (table) - +0x2138 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2144 | offset to field `attributes` (vector) - +0x213C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2140 | offset to field `documentation` (vector) + +0x24DC | 00 F6 FF FF | SOffset32 | 0xFFFFF600 (-2560) Loc: +0x2EDC | offset to vtable + +0x24E0 | 00 00 00 | uint8_t[3] | ... | padding + +0x24E3 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x24E4 | 18 00 | uint16_t | 0x0018 (24) | table field `id` (UShort) + +0x24E6 | 34 00 | uint16_t | 0x0034 (52) | table field `offset` (UShort) + +0x24E8 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x252C | offset to field `name` (string) + +0x24EC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2520 | offset to field `type` (table) + +0x24F0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x24FC | offset to field `attributes` (vector) + +0x24F4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24F8 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2140 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x24F8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2144 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2148 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x214C | offset to table[0] + +0x24FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2500 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2504 | offset to table[0] table (reflection.KeyValue): - +0x214C | E8 EB FF FF | SOffset32 | 0xFFFFEBE8 (-5144) Loc: +0x3564 | offset to vtable - +0x2150 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2160 | offset to field `key` (string) - +0x2154 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2158 | offset to field `value` (string) + +0x2504 | E8 EB FF FF | SOffset32 | 0xFFFFEBE8 (-5144) Loc: +0x391C | offset to vtable + +0x2508 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2518 | offset to field `key` (string) + +0x250C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2510 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2158 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x215C | 32 34 | char[2] | 24 | string literal - +0x215E | 00 | char | 0x00 (0) | string terminator + +0x2510 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2514 | 32 34 | char[2] | 24 | string literal + +0x2516 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2160 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2164 | 69 64 | char[2] | id | string literal - +0x2166 | 00 | char | 0x00 (0) | string terminator + +0x2518 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x251C | 69 64 | char[2] | id | string literal + +0x251E | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2168 | E4 F5 FF FF | SOffset32 | 0xFFFFF5E4 (-2588) Loc: +0x2B84 | offset to vtable - +0x216C | 00 00 | uint8_t[2] | .. | padding - +0x216E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x216F | 02 | uint8_t | 0x02 (2) | table field `element` (Byte) - +0x2170 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2520 | E4 F5 FF FF | SOffset32 | 0xFFFFF5E4 (-2588) Loc: +0x2F3C | offset to vtable + +0x2524 | 00 00 | uint8_t[2] | .. | padding + +0x2526 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2527 | 02 | uint8_t | 0x02 (2) | table field `element` (Byte) + +0x2528 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2174 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x2178 | 74 65 73 74 61 72 72 61 | char[16] | testarra | string literal - +0x2180 | 79 6F 66 62 6F 6F 6C 73 | | yofbools - +0x2188 | 00 | char | 0x00 (0) | string terminator + +0x252C | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x2530 | 74 65 73 74 61 72 72 61 | char[16] | testarra | string literal + +0x2538 | 79 6F 66 62 6F 6F 6C 73 | | yofbools + +0x2540 | 00 | char | 0x00 (0) | string terminator padding: - +0x2189 | 00 00 00 | uint8_t[3] | ... | padding + +0x2541 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x218C | 52 F7 FF FF | SOffset32 | 0xFFFFF752 (-2222) Loc: +0x2A3A | offset to vtable - +0x2190 | 17 00 | uint16_t | 0x0017 (23) | table field `id` (UShort) - +0x2192 | 32 00 | uint16_t | 0x0032 (50) | table field `offset` (UShort) - +0x2194 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x2208 | offset to field `name` (string) - +0x2198 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x21F8 | offset to field `type` (table) - +0x219C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x21A8 | offset to field `attributes` (vector) - +0x21A0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21A4 | offset to field `documentation` (vector) + +0x2544 | 52 F7 FF FF | SOffset32 | 0xFFFFF752 (-2222) Loc: +0x2DF2 | offset to vtable + +0x2548 | 17 00 | uint16_t | 0x0017 (23) | table field `id` (UShort) + +0x254A | 32 00 | uint16_t | 0x0032 (50) | table field `offset` (UShort) + +0x254C | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x25C0 | offset to field `name` (string) + +0x2550 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x25B0 | offset to field `type` (table) + +0x2554 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2560 | offset to field `attributes` (vector) + +0x2558 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x255C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x21A4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x255C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x21A8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x21AC | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x21D0 | offset to table[0] - +0x21B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21B4 | offset to table[1] + +0x2560 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2564 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2588 | offset to table[0] + +0x2568 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x256C | offset to table[1] table (reflection.KeyValue): - +0x21B4 | 50 EC FF FF | SOffset32 | 0xFFFFEC50 (-5040) Loc: +0x3564 | offset to vtable - +0x21B8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x21C8 | offset to field `key` (string) - +0x21BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21C0 | offset to field `value` (string) + +0x256C | 50 EC FF FF | SOffset32 | 0xFFFFEC50 (-5040) Loc: +0x391C | offset to vtable + +0x2570 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2580 | offset to field `key` (string) + +0x2574 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2578 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x21C0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x21C4 | 32 33 | char[2] | 23 | string literal - +0x21C6 | 00 | char | 0x00 (0) | string terminator + +0x2578 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x257C | 32 33 | char[2] | 23 | string literal + +0x257E | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x21C8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x21CC | 69 64 | char[2] | id | string literal - +0x21CE | 00 | char | 0x00 (0) | string terminator + +0x2580 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2584 | 69 64 | char[2] | id | string literal + +0x2586 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x21D0 | 6C EC FF FF | SOffset32 | 0xFFFFEC6C (-5012) Loc: +0x3564 | offset to vtable - +0x21D4 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x21EC | offset to field `key` (string) - +0x21D8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x21DC | offset to field `value` (string) + +0x2588 | 6C EC FF FF | SOffset32 | 0xFFFFEC6C (-5012) Loc: +0x391C | offset to vtable + +0x258C | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x25A4 | offset to field `key` (string) + +0x2590 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2594 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x21DC | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x21E0 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x21E8 | 00 | char | 0x00 (0) | string terminator + +0x2594 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x2598 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x25A0 | 00 | char | 0x00 (0) | string terminator padding: - +0x21E9 | 00 00 00 | uint8_t[3] | ... | padding + +0x25A1 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x21EC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x21F0 | 68 61 73 68 | char[4] | hash | string literal - +0x21F4 | 00 | char | 0x00 (0) | string terminator + +0x25A4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x25A8 | 68 61 73 68 | char[4] | hash | string literal + +0x25AC | 00 | char | 0x00 (0) | string terminator padding: - +0x21F5 | 00 00 00 | uint8_t[3] | ... | padding + +0x25AD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x21F8 | 14 EB FF FF | SOffset32 | 0xFFFFEB14 (-5356) Loc: +0x36E4 | offset to vtable - +0x21FC | 00 00 00 | uint8_t[3] | ... | padding - +0x21FF | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x2200 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x2204 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x25B0 | 14 EB FF FF | SOffset32 | 0xFFFFEB14 (-5356) Loc: +0x3A9C | offset to vtable + +0x25B4 | 00 00 00 | uint8_t[3] | ... | padding + +0x25B7 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x25B8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x25BC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2208 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x220C | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal - +0x2214 | 75 36 34 5F 66 6E 76 31 | | u64_fnv1 - +0x221C | 61 | | a - +0x221D | 00 | char | 0x00 (0) | string terminator + +0x25C0 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x25C4 | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal + +0x25CC | 75 36 34 5F 66 6E 76 31 | | u64_fnv1 + +0x25D4 | 61 | | a + +0x25D5 | 00 | char | 0x00 (0) | string terminator padding: - +0x221E | 00 00 | uint8_t[2] | .. | padding + +0x25D6 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x2220 | E6 F7 FF FF | SOffset32 | 0xFFFFF7E6 (-2074) Loc: +0x2A3A | offset to vtable - +0x2224 | 16 00 | uint16_t | 0x0016 (22) | table field `id` (UShort) - +0x2226 | 30 00 | uint16_t | 0x0030 (48) | table field `offset` (UShort) - +0x2228 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x229C | offset to field `name` (string) - +0x222C | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x228C | offset to field `type` (table) - +0x2230 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x223C | offset to field `attributes` (vector) - +0x2234 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2238 | offset to field `documentation` (vector) + +0x25D8 | E6 F7 FF FF | SOffset32 | 0xFFFFF7E6 (-2074) Loc: +0x2DF2 | offset to vtable + +0x25DC | 16 00 | uint16_t | 0x0016 (22) | table field `id` (UShort) + +0x25DE | 30 00 | uint16_t | 0x0030 (48) | table field `offset` (UShort) + +0x25E0 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x2654 | offset to field `name` (string) + +0x25E4 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x2644 | offset to field `type` (table) + +0x25E8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x25F4 | offset to field `attributes` (vector) + +0x25EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x25F0 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2238 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x25F0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x223C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2240 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2264 | offset to table[0] - +0x2244 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2248 | offset to table[1] + +0x25F4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x25F8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x261C | offset to table[0] + +0x25FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2600 | offset to table[1] table (reflection.KeyValue): - +0x2248 | E4 EC FF FF | SOffset32 | 0xFFFFECE4 (-4892) Loc: +0x3564 | offset to vtable - +0x224C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x225C | offset to field `key` (string) - +0x2250 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2254 | offset to field `value` (string) + +0x2600 | E4 EC FF FF | SOffset32 | 0xFFFFECE4 (-4892) Loc: +0x391C | offset to vtable + +0x2604 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2614 | offset to field `key` (string) + +0x2608 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x260C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2254 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2258 | 32 32 | char[2] | 22 | string literal - +0x225A | 00 | char | 0x00 (0) | string terminator + +0x260C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2610 | 32 32 | char[2] | 22 | string literal + +0x2612 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x225C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2260 | 69 64 | char[2] | id | string literal - +0x2262 | 00 | char | 0x00 (0) | string terminator + +0x2614 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2618 | 69 64 | char[2] | id | string literal + +0x261A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2264 | 00 ED FF FF | SOffset32 | 0xFFFFED00 (-4864) Loc: +0x3564 | offset to vtable - +0x2268 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2280 | offset to field `key` (string) - +0x226C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2270 | offset to field `value` (string) + +0x261C | 00 ED FF FF | SOffset32 | 0xFFFFED00 (-4864) Loc: +0x391C | offset to vtable + +0x2620 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2638 | offset to field `key` (string) + +0x2624 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2628 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2270 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2274 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x227C | 00 | char | 0x00 (0) | string terminator + +0x2628 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x262C | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x2634 | 00 | char | 0x00 (0) | string terminator padding: - +0x227D | 00 00 00 | uint8_t[3] | ... | padding + +0x2635 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x2280 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2284 | 68 61 73 68 | char[4] | hash | string literal - +0x2288 | 00 | char | 0x00 (0) | string terminator + +0x2638 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x263C | 68 61 73 68 | char[4] | hash | string literal + +0x2640 | 00 | char | 0x00 (0) | string terminator padding: - +0x2289 | 00 00 00 | uint8_t[3] | ... | padding + +0x2641 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x228C | A8 EB FF FF | SOffset32 | 0xFFFFEBA8 (-5208) Loc: +0x36E4 | offset to vtable - +0x2290 | 00 00 00 | uint8_t[3] | ... | padding - +0x2293 | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) - +0x2294 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x2298 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2644 | A8 EB FF FF | SOffset32 | 0xFFFFEBA8 (-5208) Loc: +0x3A9C | offset to vtable + +0x2648 | 00 00 00 | uint8_t[3] | ... | padding + +0x264B | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) + +0x264C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x2650 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x229C | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x22A0 | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal - +0x22A8 | 73 36 34 5F 66 6E 76 31 | | s64_fnv1 - +0x22B0 | 61 | | a - +0x22B1 | 00 | char | 0x00 (0) | string terminator + +0x2654 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x2658 | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal + +0x2660 | 73 36 34 5F 66 6E 76 31 | | s64_fnv1 + +0x2668 | 61 | | a + +0x2669 | 00 | char | 0x00 (0) | string terminator padding: - +0x22B2 | 00 00 | uint8_t[2] | .. | padding + +0x266A | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x22B4 | 7A F8 FF FF | SOffset32 | 0xFFFFF87A (-1926) Loc: +0x2A3A | offset to vtable - +0x22B8 | 15 00 | uint16_t | 0x0015 (21) | table field `id` (UShort) - +0x22BA | 2E 00 | uint16_t | 0x002E (46) | table field `offset` (UShort) - +0x22BC | CC 00 00 00 | UOffset32 | 0x000000CC (204) Loc: +0x2388 | offset to field `name` (string) - +0x22C0 | BC 00 00 00 | UOffset32 | 0x000000BC (188) Loc: +0x237C | offset to field `type` (table) - +0x22C4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x22D0 | offset to field `attributes` (vector) - +0x22C8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22CC | offset to field `documentation` (vector) + +0x266C | 7A F8 FF FF | SOffset32 | 0xFFFFF87A (-1926) Loc: +0x2DF2 | offset to vtable + +0x2670 | 15 00 | uint16_t | 0x0015 (21) | table field `id` (UShort) + +0x2672 | 2E 00 | uint16_t | 0x002E (46) | table field `offset` (UShort) + +0x2674 | CC 00 00 00 | UOffset32 | 0x000000CC (204) Loc: +0x2740 | offset to field `name` (string) + +0x2678 | BC 00 00 00 | UOffset32 | 0x000000BC (188) Loc: +0x2734 | offset to field `type` (table) + +0x267C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2688 | offset to field `attributes` (vector) + +0x2680 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2684 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x22CC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2684 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x22D0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) - +0x22D4 | 7C 00 00 00 | UOffset32 | 0x0000007C (124) Loc: +0x2350 | offset to table[0] - +0x22D8 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x2328 | offset to table[1] - +0x22DC | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2300 | offset to table[2] - +0x22E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22E4 | offset to table[3] + +0x2688 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of vector (# items) + +0x268C | 7C 00 00 00 | UOffset32 | 0x0000007C (124) Loc: +0x2708 | offset to table[0] + +0x2690 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x26E0 | offset to table[1] + +0x2694 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x26B8 | offset to table[2] + +0x2698 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x269C | offset to table[3] table (reflection.KeyValue): - +0x22E4 | 80 ED FF FF | SOffset32 | 0xFFFFED80 (-4736) Loc: +0x3564 | offset to vtable - +0x22E8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x22F8 | offset to field `key` (string) - +0x22EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x22F0 | offset to field `value` (string) + +0x269C | 80 ED FF FF | SOffset32 | 0xFFFFED80 (-4736) Loc: +0x391C | offset to vtable + +0x26A0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x26B0 | offset to field `key` (string) + +0x26A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26A8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x22F0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x22F4 | 32 31 | char[2] | 21 | string literal - +0x22F6 | 00 | char | 0x00 (0) | string terminator + +0x26A8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x26AC | 32 31 | char[2] | 21 | string literal + +0x26AE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x22F8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x22FC | 69 64 | char[2] | id | string literal - +0x22FE | 00 | char | 0x00 (0) | string terminator + +0x26B0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x26B4 | 69 64 | char[2] | id | string literal + +0x26B6 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2300 | 9C ED FF FF | SOffset32 | 0xFFFFED9C (-4708) Loc: +0x3564 | offset to vtable - +0x2304 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x231C | offset to field `key` (string) - +0x2308 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x230C | offset to field `value` (string) + +0x26B8 | 9C ED FF FF | SOffset32 | 0xFFFFED9C (-4708) Loc: +0x391C | offset to vtable + +0x26BC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x26D4 | offset to field `key` (string) + +0x26C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26C4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x230C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2310 | 66 6E 76 31 61 5F 33 32 | char[8] | fnv1a_32 | string literal - +0x2318 | 00 | char | 0x00 (0) | string terminator + +0x26C4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x26C8 | 66 6E 76 31 61 5F 33 32 | char[8] | fnv1a_32 | string literal + +0x26D0 | 00 | char | 0x00 (0) | string terminator padding: - +0x2319 | 00 00 00 | uint8_t[3] | ... | padding + +0x26D1 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x231C | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2320 | 68 61 73 68 | char[4] | hash | string literal - +0x2324 | 00 | char | 0x00 (0) | string terminator + +0x26D4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x26D8 | 68 61 73 68 | char[4] | hash | string literal + +0x26DC | 00 | char | 0x00 (0) | string terminator padding: - +0x2325 | 00 00 00 | uint8_t[3] | ... | padding + +0x26DD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x2328 | C4 ED FF FF | SOffset32 | 0xFFFFEDC4 (-4668) Loc: +0x3564 | offset to vtable - +0x232C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2340 | offset to field `key` (string) - +0x2330 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2334 | offset to field `value` (string) + +0x26E0 | C4 ED FF FF | SOffset32 | 0xFFFFEDC4 (-4668) Loc: +0x391C | offset to vtable + +0x26E4 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x26F8 | offset to field `key` (string) + +0x26E8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26EC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2334 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2338 | 53 74 61 74 | char[4] | Stat | string literal - +0x233C | 00 | char | 0x00 (0) | string terminator + +0x26EC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x26F0 | 53 74 61 74 | char[4] | Stat | string literal + +0x26F4 | 00 | char | 0x00 (0) | string terminator padding: - +0x233D | 00 00 00 | uint8_t[3] | ... | padding + +0x26F5 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x2340 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2344 | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal - +0x234C | 00 | char | 0x00 (0) | string terminator + +0x26F8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x26FC | 63 70 70 5F 74 79 70 65 | char[8] | cpp_type | string literal + +0x2704 | 00 | char | 0x00 (0) | string terminator padding: - +0x234D | 00 00 00 | uint8_t[3] | ... | padding + +0x2705 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x2350 | EC ED FF FF | SOffset32 | 0xFFFFEDEC (-4628) Loc: +0x3564 | offset to vtable - +0x2354 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2368 | offset to field `key` (string) - +0x2358 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x235C | offset to field `value` (string) + +0x2708 | EC ED FF FF | SOffset32 | 0xFFFFEDEC (-4628) Loc: +0x391C | offset to vtable + +0x270C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2720 | offset to field `key` (string) + +0x2710 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2714 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x235C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x2360 | 6E 61 6B 65 64 | char[5] | naked | string literal - +0x2365 | 00 | char | 0x00 (0) | string terminator + +0x2714 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x2718 | 6E 61 6B 65 64 | char[5] | naked | string literal + +0x271D | 00 | char | 0x00 (0) | string terminator padding: - +0x2366 | 00 00 | uint8_t[2] | .. | padding + +0x271E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2368 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string - +0x236C | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal - +0x2374 | 74 79 70 65 | | type - +0x2378 | 00 | char | 0x00 (0) | string terminator + +0x2720 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | length of string + +0x2724 | 63 70 70 5F 70 74 72 5F | char[12] | cpp_ptr_ | string literal + +0x272C | 74 79 70 65 | | type + +0x2730 | 00 | char | 0x00 (0) | string terminator padding: - +0x2379 | 00 00 00 | uint8_t[3] | ... | padding + +0x2731 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x237C | E0 E9 FF FF | SOffset32 | 0xFFFFE9E0 (-5664) Loc: +0x399C | offset to vtable - +0x2380 | 00 00 00 | uint8_t[3] | ... | padding - +0x2383 | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) - +0x2384 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2734 | E0 E9 FF FF | SOffset32 | 0xFFFFE9E0 (-5664) Loc: +0x3D54 | offset to vtable + +0x2738 | 00 00 00 | uint8_t[3] | ... | padding + +0x273B | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) + +0x273C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2388 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x238C | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal - +0x2394 | 75 33 32 5F 66 6E 76 31 | | u32_fnv1 - +0x239C | 61 | | a - +0x239D | 00 | char | 0x00 (0) | string terminator + +0x2740 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x2744 | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal + +0x274C | 75 33 32 5F 66 6E 76 31 | | u32_fnv1 + +0x2754 | 61 | | a + +0x2755 | 00 | char | 0x00 (0) | string terminator padding: - +0x239E | 00 00 | uint8_t[2] | .. | padding + +0x2756 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x23A0 | 66 F9 FF FF | SOffset32 | 0xFFFFF966 (-1690) Loc: +0x2A3A | offset to vtable - +0x23A4 | 14 00 | uint16_t | 0x0014 (20) | table field `id` (UShort) - +0x23A6 | 2C 00 | uint16_t | 0x002C (44) | table field `offset` (UShort) - +0x23A8 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x2418 | offset to field `name` (string) - +0x23AC | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x240C | offset to field `type` (table) - +0x23B0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x23BC | offset to field `attributes` (vector) - +0x23B4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23B8 | offset to field `documentation` (vector) + +0x2758 | 66 F9 FF FF | SOffset32 | 0xFFFFF966 (-1690) Loc: +0x2DF2 | offset to vtable + +0x275C | 14 00 | uint16_t | 0x0014 (20) | table field `id` (UShort) + +0x275E | 2C 00 | uint16_t | 0x002C (44) | table field `offset` (UShort) + +0x2760 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x27D0 | offset to field `name` (string) + +0x2764 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x27C4 | offset to field `type` (table) + +0x2768 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2774 | offset to field `attributes` (vector) + +0x276C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2770 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x23B8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2770 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x23BC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x23C0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x23E4 | offset to table[0] - +0x23C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23C8 | offset to table[1] + +0x2774 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2778 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x279C | offset to table[0] + +0x277C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2780 | offset to table[1] table (reflection.KeyValue): - +0x23C8 | 64 EE FF FF | SOffset32 | 0xFFFFEE64 (-4508) Loc: +0x3564 | offset to vtable - +0x23CC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x23DC | offset to field `key` (string) - +0x23D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23D4 | offset to field `value` (string) + +0x2780 | 64 EE FF FF | SOffset32 | 0xFFFFEE64 (-4508) Loc: +0x391C | offset to vtable + +0x2784 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2794 | offset to field `key` (string) + +0x2788 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x278C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x23D4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x23D8 | 32 30 | char[2] | 20 | string literal - +0x23DA | 00 | char | 0x00 (0) | string terminator + +0x278C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2790 | 32 30 | char[2] | 20 | string literal + +0x2792 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x23DC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x23E0 | 69 64 | char[2] | id | string literal - +0x23E2 | 00 | char | 0x00 (0) | string terminator + +0x2794 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2798 | 69 64 | char[2] | id | string literal + +0x279A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x23E4 | 80 EE FF FF | SOffset32 | 0xFFFFEE80 (-4480) Loc: +0x3564 | offset to vtable - +0x23E8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2400 | offset to field `key` (string) - +0x23EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x23F0 | offset to field `value` (string) + +0x279C | 80 EE FF FF | SOffset32 | 0xFFFFEE80 (-4480) Loc: +0x391C | offset to vtable + +0x27A0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x27B8 | offset to field `key` (string) + +0x27A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x27A8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x23F0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x23F4 | 66 6E 76 31 61 5F 33 32 | char[8] | fnv1a_32 | string literal - +0x23FC | 00 | char | 0x00 (0) | string terminator + +0x27A8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x27AC | 66 6E 76 31 61 5F 33 32 | char[8] | fnv1a_32 | string literal + +0x27B4 | 00 | char | 0x00 (0) | string terminator padding: - +0x23FD | 00 00 00 | uint8_t[3] | ... | padding + +0x27B5 | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x2400 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2404 | 68 61 73 68 | char[4] | hash | string literal - +0x2408 | 00 | char | 0x00 (0) | string terminator + +0x27B8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x27BC | 68 61 73 68 | char[4] | hash | string literal + +0x27C0 | 00 | char | 0x00 (0) | string terminator padding: - +0x2409 | 00 00 00 | uint8_t[3] | ... | padding + +0x27C1 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x240C | 70 EA FF FF | SOffset32 | 0xFFFFEA70 (-5520) Loc: +0x399C | offset to vtable - +0x2410 | 00 00 00 | uint8_t[3] | ... | padding - +0x2413 | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) - +0x2414 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x27C4 | 70 EA FF FF | SOffset32 | 0xFFFFEA70 (-5520) Loc: +0x3D54 | offset to vtable + +0x27C8 | 00 00 00 | uint8_t[3] | ... | padding + +0x27CB | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) + +0x27CC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2418 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x241C | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal - +0x2424 | 73 33 32 5F 66 6E 76 31 | | s32_fnv1 - +0x242C | 61 | | a - +0x242D | 00 | char | 0x00 (0) | string terminator + +0x27D0 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x27D4 | 74 65 73 74 68 61 73 68 | char[17] | testhash | string literal + +0x27DC | 73 33 32 5F 66 6E 76 31 | | s32_fnv1 + +0x27E4 | 61 | | a + +0x27E5 | 00 | char | 0x00 (0) | string terminator padding: - +0x242E | 00 00 | uint8_t[2] | .. | padding + +0x27E6 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x2430 | F6 F9 FF FF | SOffset32 | 0xFFFFF9F6 (-1546) Loc: +0x2A3A | offset to vtable - +0x2434 | 13 00 | uint16_t | 0x0013 (19) | table field `id` (UShort) - +0x2436 | 2A 00 | uint16_t | 0x002A (42) | table field `offset` (UShort) - +0x2438 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x24A8 | offset to field `name` (string) - +0x243C | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x2498 | offset to field `type` (table) - +0x2440 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x244C | offset to field `attributes` (vector) - +0x2444 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2448 | offset to field `documentation` (vector) + +0x27E8 | F6 F9 FF FF | SOffset32 | 0xFFFFF9F6 (-1546) Loc: +0x2DF2 | offset to vtable + +0x27EC | 13 00 | uint16_t | 0x0013 (19) | table field `id` (UShort) + +0x27EE | 2A 00 | uint16_t | 0x002A (42) | table field `offset` (UShort) + +0x27F0 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x2860 | offset to field `name` (string) + +0x27F4 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x2850 | offset to field `type` (table) + +0x27F8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2804 | offset to field `attributes` (vector) + +0x27FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2800 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2448 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2800 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x244C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2450 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2474 | offset to table[0] - +0x2454 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2458 | offset to table[1] + +0x2804 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2808 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x282C | offset to table[0] + +0x280C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2810 | offset to table[1] table (reflection.KeyValue): - +0x2458 | F4 EE FF FF | SOffset32 | 0xFFFFEEF4 (-4364) Loc: +0x3564 | offset to vtable - +0x245C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x246C | offset to field `key` (string) - +0x2460 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2464 | offset to field `value` (string) + +0x2810 | F4 EE FF FF | SOffset32 | 0xFFFFEEF4 (-4364) Loc: +0x391C | offset to vtable + +0x2814 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2824 | offset to field `key` (string) + +0x2818 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x281C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2464 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2468 | 31 39 | char[2] | 19 | string literal - +0x246A | 00 | char | 0x00 (0) | string terminator + +0x281C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2820 | 31 39 | char[2] | 19 | string literal + +0x2822 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x246C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2470 | 69 64 | char[2] | id | string literal - +0x2472 | 00 | char | 0x00 (0) | string terminator + +0x2824 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2828 | 69 64 | char[2] | id | string literal + +0x282A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2474 | 10 EF FF FF | SOffset32 | 0xFFFFEF10 (-4336) Loc: +0x3564 | offset to vtable - +0x2478 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x248C | offset to field `key` (string) - +0x247C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2480 | offset to field `value` (string) + +0x282C | 10 EF FF FF | SOffset32 | 0xFFFFEF10 (-4336) Loc: +0x391C | offset to vtable + +0x2830 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2844 | offset to field `key` (string) + +0x2834 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2838 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2480 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x2484 | 66 6E 76 31 5F 36 34 | char[7] | fnv1_64 | string literal - +0x248B | 00 | char | 0x00 (0) | string terminator + +0x2838 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x283C | 66 6E 76 31 5F 36 34 | char[7] | fnv1_64 | string literal + +0x2843 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x248C | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2490 | 68 61 73 68 | char[4] | hash | string literal - +0x2494 | 00 | char | 0x00 (0) | string terminator + +0x2844 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x2848 | 68 61 73 68 | char[4] | hash | string literal + +0x284C | 00 | char | 0x00 (0) | string terminator padding: - +0x2495 | 00 00 00 | uint8_t[3] | ... | padding + +0x284D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x2498 | B4 ED FF FF | SOffset32 | 0xFFFFEDB4 (-4684) Loc: +0x36E4 | offset to vtable - +0x249C | 00 00 00 | uint8_t[3] | ... | padding - +0x249F | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x24A0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x24A4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2850 | B4 ED FF FF | SOffset32 | 0xFFFFEDB4 (-4684) Loc: +0x3A9C | offset to vtable + +0x2854 | 00 00 00 | uint8_t[3] | ... | padding + +0x2857 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x2858 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x285C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x24A8 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x24AC | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal - +0x24B4 | 75 36 34 5F 66 6E 76 31 | | u64_fnv1 - +0x24BC | 00 | char | 0x00 (0) | string terminator + +0x2860 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x2864 | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal + +0x286C | 75 36 34 5F 66 6E 76 31 | | u64_fnv1 + +0x2874 | 00 | char | 0x00 (0) | string terminator padding: - +0x24BD | 00 00 00 | uint8_t[3] | ... | padding + +0x2875 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x24C0 | 86 FA FF FF | SOffset32 | 0xFFFFFA86 (-1402) Loc: +0x2A3A | offset to vtable - +0x24C4 | 12 00 | uint16_t | 0x0012 (18) | table field `id` (UShort) - +0x24C6 | 28 00 | uint16_t | 0x0028 (40) | table field `offset` (UShort) - +0x24C8 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x2538 | offset to field `name` (string) - +0x24CC | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x2528 | offset to field `type` (table) - +0x24D0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x24DC | offset to field `attributes` (vector) - +0x24D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24D8 | offset to field `documentation` (vector) + +0x2878 | 86 FA FF FF | SOffset32 | 0xFFFFFA86 (-1402) Loc: +0x2DF2 | offset to vtable + +0x287C | 12 00 | uint16_t | 0x0012 (18) | table field `id` (UShort) + +0x287E | 28 00 | uint16_t | 0x0028 (40) | table field `offset` (UShort) + +0x2880 | 70 00 00 00 | UOffset32 | 0x00000070 (112) Loc: +0x28F0 | offset to field `name` (string) + +0x2884 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x28E0 | offset to field `type` (table) + +0x2888 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2894 | offset to field `attributes` (vector) + +0x288C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2890 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x24D8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2890 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x24DC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x24E0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2504 | offset to table[0] - +0x24E4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24E8 | offset to table[1] + +0x2894 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2898 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x28BC | offset to table[0] + +0x289C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x28A0 | offset to table[1] table (reflection.KeyValue): - +0x24E8 | 84 EF FF FF | SOffset32 | 0xFFFFEF84 (-4220) Loc: +0x3564 | offset to vtable - +0x24EC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x24FC | offset to field `key` (string) - +0x24F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x24F4 | offset to field `value` (string) + +0x28A0 | 84 EF FF FF | SOffset32 | 0xFFFFEF84 (-4220) Loc: +0x391C | offset to vtable + +0x28A4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x28B4 | offset to field `key` (string) + +0x28A8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x28AC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x24F4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x24F8 | 31 38 | char[2] | 18 | string literal - +0x24FA | 00 | char | 0x00 (0) | string terminator + +0x28AC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x28B0 | 31 38 | char[2] | 18 | string literal + +0x28B2 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x24FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2500 | 69 64 | char[2] | id | string literal - +0x2502 | 00 | char | 0x00 (0) | string terminator + +0x28B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x28B8 | 69 64 | char[2] | id | string literal + +0x28BA | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2504 | A0 EF FF FF | SOffset32 | 0xFFFFEFA0 (-4192) Loc: +0x3564 | offset to vtable - +0x2508 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x251C | offset to field `key` (string) - +0x250C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2510 | offset to field `value` (string) + +0x28BC | A0 EF FF FF | SOffset32 | 0xFFFFEFA0 (-4192) Loc: +0x391C | offset to vtable + +0x28C0 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x28D4 | offset to field `key` (string) + +0x28C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x28C8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2510 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x2514 | 66 6E 76 31 5F 36 34 | char[7] | fnv1_64 | string literal - +0x251B | 00 | char | 0x00 (0) | string terminator + +0x28C8 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x28CC | 66 6E 76 31 5F 36 34 | char[7] | fnv1_64 | string literal + +0x28D3 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x251C | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2520 | 68 61 73 68 | char[4] | hash | string literal - +0x2524 | 00 | char | 0x00 (0) | string terminator + +0x28D4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x28D8 | 68 61 73 68 | char[4] | hash | string literal + +0x28DC | 00 | char | 0x00 (0) | string terminator padding: - +0x2525 | 00 00 00 | uint8_t[3] | ... | padding + +0x28DD | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x2528 | 44 EE FF FF | SOffset32 | 0xFFFFEE44 (-4540) Loc: +0x36E4 | offset to vtable - +0x252C | 00 00 00 | uint8_t[3] | ... | padding - +0x252F | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) - +0x2530 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x2534 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x28E0 | 44 EE FF FF | SOffset32 | 0xFFFFEE44 (-4540) Loc: +0x3A9C | offset to vtable + +0x28E4 | 00 00 00 | uint8_t[3] | ... | padding + +0x28E7 | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) + +0x28E8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x28EC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2538 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x253C | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal - +0x2544 | 73 36 34 5F 66 6E 76 31 | | s64_fnv1 - +0x254C | 00 | char | 0x00 (0) | string terminator + +0x28F0 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x28F4 | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal + +0x28FC | 73 36 34 5F 66 6E 76 31 | | s64_fnv1 + +0x2904 | 00 | char | 0x00 (0) | string terminator padding: - +0x254D | 00 00 00 | uint8_t[3] | ... | padding + +0x2905 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x2550 | 16 FB FF FF | SOffset32 | 0xFFFFFB16 (-1258) Loc: +0x2A3A | offset to vtable - +0x2554 | 11 00 | uint16_t | 0x0011 (17) | table field `id` (UShort) - +0x2556 | 26 00 | uint16_t | 0x0026 (38) | table field `offset` (UShort) - +0x2558 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x25C4 | offset to field `name` (string) - +0x255C | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x25B8 | offset to field `type` (table) - +0x2560 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x256C | offset to field `attributes` (vector) - +0x2564 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2568 | offset to field `documentation` (vector) + +0x2908 | 16 FB FF FF | SOffset32 | 0xFFFFFB16 (-1258) Loc: +0x2DF2 | offset to vtable + +0x290C | 11 00 | uint16_t | 0x0011 (17) | table field `id` (UShort) + +0x290E | 26 00 | uint16_t | 0x0026 (38) | table field `offset` (UShort) + +0x2910 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x297C | offset to field `name` (string) + +0x2914 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x2970 | offset to field `type` (table) + +0x2918 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2924 | offset to field `attributes` (vector) + +0x291C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2920 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2568 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2920 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x256C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2570 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2594 | offset to table[0] - +0x2574 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2578 | offset to table[1] + +0x2924 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2928 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x294C | offset to table[0] + +0x292C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2930 | offset to table[1] table (reflection.KeyValue): - +0x2578 | 14 F0 FF FF | SOffset32 | 0xFFFFF014 (-4076) Loc: +0x3564 | offset to vtable - +0x257C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x258C | offset to field `key` (string) - +0x2580 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2584 | offset to field `value` (string) + +0x2930 | 14 F0 FF FF | SOffset32 | 0xFFFFF014 (-4076) Loc: +0x391C | offset to vtable + +0x2934 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2944 | offset to field `key` (string) + +0x2938 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x293C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2584 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2588 | 31 37 | char[2] | 17 | string literal - +0x258A | 00 | char | 0x00 (0) | string terminator + +0x293C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2940 | 31 37 | char[2] | 17 | string literal + +0x2942 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x258C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2590 | 69 64 | char[2] | id | string literal - +0x2592 | 00 | char | 0x00 (0) | string terminator + +0x2944 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2948 | 69 64 | char[2] | id | string literal + +0x294A | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2594 | 30 F0 FF FF | SOffset32 | 0xFFFFF030 (-4048) Loc: +0x3564 | offset to vtable - +0x2598 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x25AC | offset to field `key` (string) - +0x259C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x25A0 | offset to field `value` (string) + +0x294C | 30 F0 FF FF | SOffset32 | 0xFFFFF030 (-4048) Loc: +0x391C | offset to vtable + +0x2950 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2964 | offset to field `key` (string) + +0x2954 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2958 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x25A0 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x25A4 | 66 6E 76 31 5F 33 32 | char[7] | fnv1_32 | string literal - +0x25AB | 00 | char | 0x00 (0) | string terminator + +0x2958 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x295C | 66 6E 76 31 5F 33 32 | char[7] | fnv1_32 | string literal + +0x2963 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x25AC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x25B0 | 68 61 73 68 | char[4] | hash | string literal - +0x25B4 | 00 | char | 0x00 (0) | string terminator + +0x2964 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x2968 | 68 61 73 68 | char[4] | hash | string literal + +0x296C | 00 | char | 0x00 (0) | string terminator padding: - +0x25B5 | 00 00 00 | uint8_t[3] | ... | padding + +0x296D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x25B8 | 1C EC FF FF | SOffset32 | 0xFFFFEC1C (-5092) Loc: +0x399C | offset to vtable - +0x25BC | 00 00 00 | uint8_t[3] | ... | padding - +0x25BF | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) - +0x25C0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2970 | 1C EC FF FF | SOffset32 | 0xFFFFEC1C (-5092) Loc: +0x3D54 | offset to vtable + +0x2974 | 00 00 00 | uint8_t[3] | ... | padding + +0x2977 | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) + +0x2978 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x25C4 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x25C8 | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal - +0x25D0 | 75 33 32 5F 66 6E 76 31 | | u32_fnv1 - +0x25D8 | 00 | char | 0x00 (0) | string terminator + +0x297C | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x2980 | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal + +0x2988 | 75 33 32 5F 66 6E 76 31 | | u32_fnv1 + +0x2990 | 00 | char | 0x00 (0) | string terminator padding: - +0x25D9 | 00 00 00 | uint8_t[3] | ... | padding + +0x2991 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x25DC | A2 FB FF FF | SOffset32 | 0xFFFFFBA2 (-1118) Loc: +0x2A3A | offset to vtable - +0x25E0 | 10 00 | uint16_t | 0x0010 (16) | table field `id` (UShort) - +0x25E2 | 24 00 | uint16_t | 0x0024 (36) | table field `offset` (UShort) - +0x25E4 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x2650 | offset to field `name` (string) - +0x25E8 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x2644 | offset to field `type` (table) - +0x25EC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x25F8 | offset to field `attributes` (vector) - +0x25F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x25F4 | offset to field `documentation` (vector) + +0x2994 | A2 FB FF FF | SOffset32 | 0xFFFFFBA2 (-1118) Loc: +0x2DF2 | offset to vtable + +0x2998 | 10 00 | uint16_t | 0x0010 (16) | table field `id` (UShort) + +0x299A | 24 00 | uint16_t | 0x0024 (36) | table field `offset` (UShort) + +0x299C | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x2A08 | offset to field `name` (string) + +0x29A0 | 5C 00 00 00 | UOffset32 | 0x0000005C (92) Loc: +0x29FC | offset to field `type` (table) + +0x29A4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x29B0 | offset to field `attributes` (vector) + +0x29A8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29AC | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x25F4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x29AC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x25F8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x25FC | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2620 | offset to table[0] - +0x2600 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2604 | offset to table[1] + +0x29B0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x29B4 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x29D8 | offset to table[0] + +0x29B8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29BC | offset to table[1] table (reflection.KeyValue): - +0x2604 | A0 F0 FF FF | SOffset32 | 0xFFFFF0A0 (-3936) Loc: +0x3564 | offset to vtable - +0x2608 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2618 | offset to field `key` (string) - +0x260C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2610 | offset to field `value` (string) + +0x29BC | A0 F0 FF FF | SOffset32 | 0xFFFFF0A0 (-3936) Loc: +0x391C | offset to vtable + +0x29C0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x29D0 | offset to field `key` (string) + +0x29C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29C8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2610 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2614 | 31 36 | char[2] | 16 | string literal - +0x2616 | 00 | char | 0x00 (0) | string terminator + +0x29C8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x29CC | 31 36 | char[2] | 16 | string literal + +0x29CE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2618 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x261C | 69 64 | char[2] | id | string literal - +0x261E | 00 | char | 0x00 (0) | string terminator + +0x29D0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x29D4 | 69 64 | char[2] | id | string literal + +0x29D6 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2620 | BC F0 FF FF | SOffset32 | 0xFFFFF0BC (-3908) Loc: +0x3564 | offset to vtable - +0x2624 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2638 | offset to field `key` (string) - +0x2628 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x262C | offset to field `value` (string) + +0x29D8 | BC F0 FF FF | SOffset32 | 0xFFFFF0BC (-3908) Loc: +0x391C | offset to vtable + +0x29DC | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x29F0 | offset to field `key` (string) + +0x29E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29E4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x262C | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x2630 | 66 6E 76 31 5F 33 32 | char[7] | fnv1_32 | string literal - +0x2637 | 00 | char | 0x00 (0) | string terminator + +0x29E4 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x29E8 | 66 6E 76 31 5F 33 32 | char[7] | fnv1_32 | string literal + +0x29EF | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2638 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x263C | 68 61 73 68 | char[4] | hash | string literal - +0x2640 | 00 | char | 0x00 (0) | string terminator + +0x29F0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x29F4 | 68 61 73 68 | char[4] | hash | string literal + +0x29F8 | 00 | char | 0x00 (0) | string terminator padding: - +0x2641 | 00 00 00 | uint8_t[3] | ... | padding + +0x29F9 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x2644 | A8 EC FF FF | SOffset32 | 0xFFFFECA8 (-4952) Loc: +0x399C | offset to vtable - +0x2648 | 00 00 00 | uint8_t[3] | ... | padding - +0x264B | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) - +0x264C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x29FC | A8 EC FF FF | SOffset32 | 0xFFFFECA8 (-4952) Loc: +0x3D54 | offset to vtable + +0x2A00 | 00 00 00 | uint8_t[3] | ... | padding + +0x2A03 | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) + +0x2A04 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2650 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string - +0x2654 | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal - +0x265C | 73 33 32 5F 66 6E 76 31 | | s32_fnv1 - +0x2664 | 00 | char | 0x00 (0) | string terminator + +0x2A08 | 10 00 00 00 | uint32_t | 0x00000010 (16) | length of string + +0x2A0C | 74 65 73 74 68 61 73 68 | char[16] | testhash | string literal + +0x2A14 | 73 33 32 5F 66 6E 76 31 | | s32_fnv1 + +0x2A1C | 00 | char | 0x00 (0) | string terminator padding: - +0x2665 | 00 00 00 | uint8_t[3] | ... | padding + +0x2A1D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x2668 | 2E FC FF FF | SOffset32 | 0xFFFFFC2E (-978) Loc: +0x2A3A | offset to vtable - +0x266C | 0F 00 | uint16_t | 0x000F (15) | table field `id` (UShort) - +0x266E | 22 00 | uint16_t | 0x0022 (34) | table field `offset` (UShort) - +0x2670 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x26B8 | offset to field `name` (string) - +0x2674 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x26A8 | offset to field `type` (table) - +0x2678 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2684 | offset to field `attributes` (vector) - +0x267C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2680 | offset to field `documentation` (vector) + +0x2A20 | 2E FC FF FF | SOffset32 | 0xFFFFFC2E (-978) Loc: +0x2DF2 | offset to vtable + +0x2A24 | 0F 00 | uint16_t | 0x000F (15) | table field `id` (UShort) + +0x2A26 | 22 00 | uint16_t | 0x0022 (34) | table field `offset` (UShort) + +0x2A28 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2A70 | offset to field `name` (string) + +0x2A2C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2A60 | offset to field `type` (table) + +0x2A30 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2A3C | offset to field `attributes` (vector) + +0x2A34 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A38 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2680 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2A38 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2684 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2688 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x268C | offset to table[0] + +0x2A3C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2A40 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A44 | offset to table[0] table (reflection.KeyValue): - +0x268C | 28 F1 FF FF | SOffset32 | 0xFFFFF128 (-3800) Loc: +0x3564 | offset to vtable - +0x2690 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x26A0 | offset to field `key` (string) - +0x2694 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2698 | offset to field `value` (string) + +0x2A44 | 28 F1 FF FF | SOffset32 | 0xFFFFF128 (-3800) Loc: +0x391C | offset to vtable + +0x2A48 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2A58 | offset to field `key` (string) + +0x2A4C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A50 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2698 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x269C | 31 35 | char[2] | 15 | string literal - +0x269E | 00 | char | 0x00 (0) | string terminator + +0x2A50 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2A54 | 31 35 | char[2] | 15 | string literal + +0x2A56 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x26A0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x26A4 | 69 64 | char[2] | id | string literal - +0x26A6 | 00 | char | 0x00 (0) | string terminator + +0x2A58 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2A5C | 69 64 | char[2] | id | string literal + +0x2A5E | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x26A8 | C4 EF FF FF | SOffset32 | 0xFFFFEFC4 (-4156) Loc: +0x36E4 | offset to vtable - +0x26AC | 00 00 00 | uint8_t[3] | ... | padding - +0x26AF | 02 | uint8_t | 0x02 (2) | table field `base_type` (Byte) - +0x26B0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x26B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2A60 | C4 EF FF FF | SOffset32 | 0xFFFFEFC4 (-4156) Loc: +0x3A9C | offset to vtable + +0x2A64 | 00 00 00 | uint8_t[3] | ... | padding + +0x2A67 | 02 | uint8_t | 0x02 (2) | table field `base_type` (Byte) + +0x2A68 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x2A6C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x26B8 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x26BC | 74 65 73 74 62 6F 6F 6C | char[8] | testbool | string literal - +0x26C4 | 00 | char | 0x00 (0) | string terminator + +0x2A70 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x2A74 | 74 65 73 74 62 6F 6F 6C | char[8] | testbool | string literal + +0x2A7C | 00 | char | 0x00 (0) | string terminator padding: - +0x26C5 | 00 00 00 | uint8_t[3] | ... | padding + +0x2A7D | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x26C8 | A4 FB FF FF | SOffset32 | 0xFFFFFBA4 (-1116) Loc: +0x2B24 | offset to vtable - +0x26CC | 00 00 00 | uint8_t[3] | ... | padding - +0x26CF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x26D0 | 0E 00 | uint16_t | 0x000E (14) | table field `id` (UShort) - +0x26D2 | 20 00 | uint16_t | 0x0020 (32) | table field `offset` (UShort) - +0x26D4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x271C | offset to field `name` (string) - +0x26D8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x270C | offset to field `type` (table) - +0x26DC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x26E8 | offset to field `attributes` (vector) - +0x26E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26E4 | offset to field `documentation` (vector) + +0x2A80 | A4 FB FF FF | SOffset32 | 0xFFFFFBA4 (-1116) Loc: +0x2EDC | offset to vtable + +0x2A84 | 00 00 00 | uint8_t[3] | ... | padding + +0x2A87 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2A88 | 0E 00 | uint16_t | 0x000E (14) | table field `id` (UShort) + +0x2A8A | 20 00 | uint16_t | 0x0020 (32) | table field `offset` (UShort) + +0x2A8C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2AD4 | offset to field `name` (string) + +0x2A90 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2AC4 | offset to field `type` (table) + +0x2A94 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2AA0 | offset to field `attributes` (vector) + +0x2A98 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A9C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x26E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2A9C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x26E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x26EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26F0 | offset to table[0] + +0x2AA0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2AA4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2AA8 | offset to table[0] table (reflection.KeyValue): - +0x26F0 | 8C F1 FF FF | SOffset32 | 0xFFFFF18C (-3700) Loc: +0x3564 | offset to vtable - +0x26F4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2704 | offset to field `key` (string) - +0x26F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x26FC | offset to field `value` (string) + +0x2AA8 | 8C F1 FF FF | SOffset32 | 0xFFFFF18C (-3700) Loc: +0x391C | offset to vtable + +0x2AAC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2ABC | offset to field `key` (string) + +0x2AB0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2AB4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x26FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2700 | 31 34 | char[2] | 14 | string literal - +0x2702 | 00 | char | 0x00 (0) | string terminator + +0x2AB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2AB8 | 31 34 | char[2] | 14 | string literal + +0x2ABA | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2704 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2708 | 69 64 | char[2] | id | string literal - +0x270A | 00 | char | 0x00 (0) | string terminator + +0x2ABC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2AC0 | 69 64 | char[2] | id | string literal + +0x2AC2 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x270C | 54 EE FF FF | SOffset32 | 0xFFFFEE54 (-4524) Loc: +0x38B8 | offset to vtable - +0x2710 | 00 00 00 | uint8_t[3] | ... | padding - +0x2713 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x2714 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x2718 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2AC4 | 54 EE FF FF | SOffset32 | 0xFFFFEE54 (-4524) Loc: +0x3C70 | offset to vtable + +0x2AC8 | 00 00 00 | uint8_t[3] | ... | padding + +0x2ACB | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x2ACC | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x2AD0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x271C | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string - +0x2720 | 74 65 73 74 65 6D 70 74 | char[9] | testempt | string literal - +0x2728 | 79 | | y - +0x2729 | 00 | char | 0x00 (0) | string terminator + +0x2AD4 | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string + +0x2AD8 | 74 65 73 74 65 6D 70 74 | char[9] | testempt | string literal + +0x2AE0 | 79 | | y + +0x2AE1 | 00 | char | 0x00 (0) | string terminator padding: - +0x272A | 00 00 | uint8_t[2] | .. | padding + +0x2AE2 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x272C | 08 FC FF FF | SOffset32 | 0xFFFFFC08 (-1016) Loc: +0x2B24 | offset to vtable - +0x2730 | 00 00 00 | uint8_t[3] | ... | padding - +0x2733 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x2734 | 0D 00 | uint16_t | 0x000D (13) | table field `id` (UShort) - +0x2736 | 1E 00 | uint16_t | 0x001E (30) | table field `offset` (UShort) - +0x2738 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x27B0 | offset to field `name` (string) - +0x273C | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x27A4 | offset to field `type` (table) - +0x2740 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x274C | offset to field `attributes` (vector) - +0x2744 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2748 | offset to field `documentation` (vector) + +0x2AE4 | 08 FC FF FF | SOffset32 | 0xFFFFFC08 (-1016) Loc: +0x2EDC | offset to vtable + +0x2AE8 | 00 00 00 | uint8_t[3] | ... | padding + +0x2AEB | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2AEC | 0D 00 | uint16_t | 0x000D (13) | table field `id` (UShort) + +0x2AEE | 1E 00 | uint16_t | 0x001E (30) | table field `offset` (UShort) + +0x2AF0 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x2B68 | offset to field `name` (string) + +0x2AF4 | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x2B5C | offset to field `type` (table) + +0x2AF8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2B04 | offset to field `attributes` (vector) + +0x2AFC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B00 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2748 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2B00 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x274C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2750 | 38 00 00 00 | UOffset32 | 0x00000038 (56) Loc: +0x2788 | offset to table[0] - +0x2754 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2758 | offset to table[1] + +0x2B04 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2B08 | 38 00 00 00 | UOffset32 | 0x00000038 (56) Loc: +0x2B40 | offset to table[0] + +0x2B0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B10 | offset to table[1] table (reflection.KeyValue): - +0x2758 | F4 F1 FF FF | SOffset32 | 0xFFFFF1F4 (-3596) Loc: +0x3564 | offset to vtable - +0x275C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2770 | offset to field `key` (string) - +0x2760 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2764 | offset to field `value` (string) + +0x2B10 | F4 F1 FF FF | SOffset32 | 0xFFFFF1F4 (-3596) Loc: +0x391C | offset to vtable + +0x2B14 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2B28 | offset to field `key` (string) + +0x2B18 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B1C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2764 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x2768 | 4D 6F 6E 73 74 65 72 | char[7] | Monster | string literal - +0x276F | 00 | char | 0x00 (0) | string terminator + +0x2B1C | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x2B20 | 4D 6F 6E 73 74 65 72 | char[7] | Monster | string literal + +0x2B27 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2770 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x2774 | 6E 65 73 74 65 64 5F 66 | char[17] | nested_f | string literal - +0x277C | 6C 61 74 62 75 66 66 65 | | latbuffe - +0x2784 | 72 | | r - +0x2785 | 00 | char | 0x00 (0) | string terminator + +0x2B28 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x2B2C | 6E 65 73 74 65 64 5F 66 | char[17] | nested_f | string literal + +0x2B34 | 6C 61 74 62 75 66 66 65 | | latbuffe + +0x2B3C | 72 | | r + +0x2B3D | 00 | char | 0x00 (0) | string terminator padding: - +0x2786 | 00 00 | uint8_t[2] | .. | padding + +0x2B3E | 00 00 | uint8_t[2] | .. | padding table (reflection.KeyValue): - +0x2788 | 24 F2 FF FF | SOffset32 | 0xFFFFF224 (-3548) Loc: +0x3564 | offset to vtable - +0x278C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x279C | offset to field `key` (string) - +0x2790 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2794 | offset to field `value` (string) + +0x2B40 | 24 F2 FF FF | SOffset32 | 0xFFFFF224 (-3548) Loc: +0x391C | offset to vtable + +0x2B44 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2B54 | offset to field `key` (string) + +0x2B48 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B4C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2794 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2798 | 31 33 | char[2] | 13 | string literal - +0x279A | 00 | char | 0x00 (0) | string terminator + +0x2B4C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2B50 | 31 33 | char[2] | 13 | string literal + +0x2B52 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x279C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x27A0 | 69 64 | char[2] | id | string literal - +0x27A2 | 00 | char | 0x00 (0) | string terminator + +0x2B54 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2B58 | 69 64 | char[2] | id | string literal + +0x2B5A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x27A4 | 20 FC FF FF | SOffset32 | 0xFFFFFC20 (-992) Loc: +0x2B84 | offset to vtable - +0x27A8 | 00 00 | uint8_t[2] | .. | padding - +0x27AA | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x27AB | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) - +0x27AC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2B5C | 20 FC FF FF | SOffset32 | 0xFFFFFC20 (-992) Loc: +0x2F3C | offset to vtable + +0x2B60 | 00 00 | uint8_t[2] | .. | padding + +0x2B62 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2B63 | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) + +0x2B64 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x27B0 | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string - +0x27B4 | 74 65 73 74 6E 65 73 74 | char[20] | testnest | string literal - +0x27BC | 65 64 66 6C 61 74 62 75 | | edflatbu - +0x27C4 | 66 66 65 72 | | ffer - +0x27C8 | 00 | char | 0x00 (0) | string terminator + +0x2B68 | 14 00 00 00 | uint32_t | 0x00000014 (20) | length of string + +0x2B6C | 74 65 73 74 6E 65 73 74 | char[20] | testnest | string literal + +0x2B74 | 65 64 66 6C 61 74 62 75 | | edflatbu + +0x2B7C | 66 66 65 72 | | ffer + +0x2B80 | 00 | char | 0x00 (0) | string terminator padding: - +0x27C9 | 00 00 00 | uint8_t[3] | ... | padding + +0x2B81 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x27CC | A8 FC FF FF | SOffset32 | 0xFFFFFCA8 (-856) Loc: +0x2B24 | offset to vtable - +0x27D0 | 00 00 00 | uint8_t[3] | ... | padding - +0x27D3 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x27D4 | 0C 00 | uint16_t | 0x000C (12) | table field `id` (UShort) - +0x27D6 | 1C 00 | uint16_t | 0x001C (28) | table field `offset` (UShort) - +0x27D8 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2820 | offset to field `name` (string) - +0x27DC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2810 | offset to field `type` (table) - +0x27E0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x27EC | offset to field `attributes` (vector) - +0x27E4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x27E8 | offset to field `documentation` (vector) + +0x2B84 | A8 FC FF FF | SOffset32 | 0xFFFFFCA8 (-856) Loc: +0x2EDC | offset to vtable + +0x2B88 | 00 00 00 | uint8_t[3] | ... | padding + +0x2B8B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2B8C | 0C 00 | uint16_t | 0x000C (12) | table field `id` (UShort) + +0x2B8E | 1C 00 | uint16_t | 0x001C (28) | table field `offset` (UShort) + +0x2B90 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2BD8 | offset to field `name` (string) + +0x2B94 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2BC8 | offset to field `type` (table) + +0x2B98 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2BA4 | offset to field `attributes` (vector) + +0x2B9C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2BA0 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x27E8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2BA0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x27EC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x27F0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x27F4 | offset to table[0] + +0x2BA4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2BA8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2BAC | offset to table[0] table (reflection.KeyValue): - +0x27F4 | 90 F2 FF FF | SOffset32 | 0xFFFFF290 (-3440) Loc: +0x3564 | offset to vtable - +0x27F8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2808 | offset to field `key` (string) - +0x27FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2800 | offset to field `value` (string) + +0x2BAC | 90 F2 FF FF | SOffset32 | 0xFFFFF290 (-3440) Loc: +0x391C | offset to vtable + +0x2BB0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2BC0 | offset to field `key` (string) + +0x2BB4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2BB8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2800 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2804 | 31 32 | char[2] | 12 | string literal - +0x2806 | 00 | char | 0x00 (0) | string terminator + +0x2BB8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2BBC | 31 32 | char[2] | 12 | string literal + +0x2BBE | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2808 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x280C | 69 64 | char[2] | id | string literal - +0x280E | 00 | char | 0x00 (0) | string terminator + +0x2BC0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2BC4 | 69 64 | char[2] | id | string literal + +0x2BC6 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2810 | 58 EF FF FF | SOffset32 | 0xFFFFEF58 (-4264) Loc: +0x38B8 | offset to vtable - +0x2814 | 00 00 00 | uint8_t[3] | ... | padding - +0x2817 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x2818 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) - +0x281C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2BC8 | 58 EF FF FF | SOffset32 | 0xFFFFEF58 (-4264) Loc: +0x3C70 | offset to vtable + +0x2BCC | 00 00 00 | uint8_t[3] | ... | padding + +0x2BCF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x2BD0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) + +0x2BD4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2820 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x2824 | 65 6E 65 6D 79 | char[5] | enemy | string literal - +0x2829 | 00 | char | 0x00 (0) | string terminator + +0x2BD8 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x2BDC | 65 6E 65 6D 79 | char[5] | enemy | string literal + +0x2BE1 | 00 | char | 0x00 (0) | string terminator padding: - +0x282A | 00 00 | uint8_t[2] | .. | padding + +0x2BE2 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x282C | 08 FD FF FF | SOffset32 | 0xFFFFFD08 (-760) Loc: +0x2B24 | offset to vtable - +0x2830 | 00 00 00 | uint8_t[3] | ... | padding - +0x2833 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x2834 | 0B 00 | uint16_t | 0x000B (11) | table field `id` (UShort) - +0x2836 | 1A 00 | uint16_t | 0x001A (26) | table field `offset` (UShort) - +0x2838 | B4 00 00 00 | UOffset32 | 0x000000B4 (180) Loc: +0x28EC | offset to field `name` (string) - +0x283C | A0 00 00 00 | UOffset32 | 0x000000A0 (160) Loc: +0x28DC | offset to field `type` (table) - +0x2840 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x28B8 | offset to field `attributes` (vector) - +0x2844 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2848 | offset to field `documentation` (vector) + +0x2BE4 | 08 FD FF FF | SOffset32 | 0xFFFFFD08 (-760) Loc: +0x2EDC | offset to vtable + +0x2BE8 | 00 00 00 | uint8_t[3] | ... | padding + +0x2BEB | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2BEC | 0B 00 | uint16_t | 0x000B (11) | table field `id` (UShort) + +0x2BEE | 1A 00 | uint16_t | 0x001A (26) | table field `offset` (UShort) + +0x2BF0 | B4 00 00 00 | UOffset32 | 0x000000B4 (180) Loc: +0x2CA4 | offset to field `name` (string) + +0x2BF4 | A0 00 00 00 | UOffset32 | 0x000000A0 (160) Loc: +0x2C94 | offset to field `type` (table) + +0x2BF8 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x2C70 | offset to field `attributes` (vector) + +0x2BFC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C00 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2848 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x284C | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x2868 | offset to string[0] - +0x2850 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2854 | offset to string[1] + +0x2C00 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x2C04 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x2C20 | offset to string[0] + +0x2C08 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C0C | offset to string[1] string (reflection.Field.documentation): - +0x2854 | 0E 00 00 00 | uint32_t | 0x0000000E (14) | length of string - +0x2858 | 20 6D 75 6C 74 69 6C 69 | char[14] | multili | string literal - +0x2860 | 6E 65 20 74 6F 6F | | ne too - +0x2866 | 00 | char | 0x00 (0) | string terminator + +0x2C0C | 0E 00 00 00 | uint32_t | 0x0000000E (14) | length of string + +0x2C10 | 20 6D 75 6C 74 69 6C 69 | char[14] | multili | string literal + +0x2C18 | 6E 65 20 74 6F 6F | | ne too + +0x2C1E | 00 | char | 0x00 (0) | string terminator string (reflection.Field.documentation): - +0x2868 | 49 00 00 00 | uint32_t | 0x00000049 (73) | length of string - +0x286C | 20 61 6E 20 65 78 61 6D | char[73] | an exam | string literal - +0x2874 | 70 6C 65 20 64 6F 63 75 | | ple docu - +0x287C | 6D 65 6E 74 61 74 69 6F | | mentatio - +0x2884 | 6E 20 63 6F 6D 6D 65 6E | | n commen - +0x288C | 74 3A 20 74 68 69 73 20 | | t: this - +0x2894 | 77 69 6C 6C 20 65 6E 64 | | will end - +0x289C | 20 75 70 20 69 6E 20 74 | | up in t - +0x28A4 | 68 65 20 67 65 6E 65 72 | | he gener - +0x28AC | 61 74 65 64 20 63 6F 64 | | ated cod - +0x28B4 | 65 | | e - +0x28B5 | 00 | char | 0x00 (0) | string terminator - -padding: - +0x28B6 | 00 00 | uint8_t[2] | .. | padding + +0x2C20 | 49 00 00 00 | uint32_t | 0x00000049 (73) | length of string + +0x2C24 | 20 61 6E 20 65 78 61 6D | char[73] | an exam | string literal + +0x2C2C | 70 6C 65 20 64 6F 63 75 | | ple docu + +0x2C34 | 6D 65 6E 74 61 74 69 6F | | mentatio + +0x2C3C | 6E 20 63 6F 6D 6D 65 6E | | n commen + +0x2C44 | 74 3A 20 74 68 69 73 20 | | t: this + +0x2C4C | 77 69 6C 6C 20 65 6E 64 | | will end + +0x2C54 | 20 75 70 20 69 6E 20 74 | | up in t + +0x2C5C | 68 65 20 67 65 6E 65 72 | | he gener + +0x2C64 | 61 74 65 64 20 63 6F 64 | | ated cod + +0x2C6C | 65 | | e + +0x2C6D | 00 | char | 0x00 (0) | string terminator + +padding: + +0x2C6E | 00 00 | uint8_t[2] | .. | padding vector (reflection.Field.attributes): - +0x28B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x28BC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x28C0 | offset to table[0] + +0x2C70 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2C74 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C78 | offset to table[0] table (reflection.KeyValue): - +0x28C0 | 5C F3 FF FF | SOffset32 | 0xFFFFF35C (-3236) Loc: +0x3564 | offset to vtable - +0x28C4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x28D4 | offset to field `key` (string) - +0x28C8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x28CC | offset to field `value` (string) + +0x2C78 | 5C F3 FF FF | SOffset32 | 0xFFFFF35C (-3236) Loc: +0x391C | offset to vtable + +0x2C7C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2C8C | offset to field `key` (string) + +0x2C80 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C84 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x28CC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x28D0 | 31 31 | char[2] | 11 | string literal - +0x28D2 | 00 | char | 0x00 (0) | string terminator + +0x2C84 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2C88 | 31 31 | char[2] | 11 | string literal + +0x2C8A | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x28D4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x28D8 | 69 64 | char[2] | id | string literal - +0x28DA | 00 | char | 0x00 (0) | string terminator + +0x2C8C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2C90 | 69 64 | char[2] | id | string literal + +0x2C92 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x28DC | 2C FF FF FF | SOffset32 | 0xFFFFFF2C (-212) Loc: +0x29B0 | offset to vtable - +0x28E0 | 00 00 | uint8_t[2] | .. | padding - +0x28E2 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x28E3 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x28E4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) - +0x28E8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x2C94 | 2C FF FF FF | SOffset32 | 0xFFFFFF2C (-212) Loc: +0x2D68 | offset to vtable + +0x2C98 | 00 00 | uint8_t[2] | .. | padding + +0x2C9A | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2C9B | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x2C9C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `index` (Int) + +0x2CA0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x28EC | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x28F0 | 74 65 73 74 61 72 72 61 | char[17] | testarra | string literal - +0x28F8 | 79 6F 66 74 61 62 6C 65 | | yoftable - +0x2900 | 73 | | s - +0x2901 | 00 | char | 0x00 (0) | string terminator + +0x2CA4 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x2CA8 | 74 65 73 74 61 72 72 61 | char[17] | testarra | string literal + +0x2CB0 | 79 6F 66 74 61 62 6C 65 | | yoftable + +0x2CB8 | 73 | | s + +0x2CB9 | 00 | char | 0x00 (0) | string terminator padding: - +0x2902 | 00 00 | uint8_t[2] | .. | padding + +0x2CBA | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x2904 | E0 FD FF FF | SOffset32 | 0xFFFFFDE0 (-544) Loc: +0x2B24 | offset to vtable - +0x2908 | 00 00 00 | uint8_t[3] | ... | padding - +0x290B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x290C | 0A 00 | uint16_t | 0x000A (10) | table field `id` (UShort) - +0x290E | 18 00 | uint16_t | 0x0018 (24) | table field `offset` (UShort) - +0x2910 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2954 | offset to field `name` (string) - +0x2914 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2948 | offset to field `type` (table) - +0x2918 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2924 | offset to field `attributes` (vector) - +0x291C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2920 | offset to field `documentation` (vector) + +0x2CBC | E0 FD FF FF | SOffset32 | 0xFFFFFDE0 (-544) Loc: +0x2EDC | offset to vtable + +0x2CC0 | 00 00 00 | uint8_t[3] | ... | padding + +0x2CC3 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2CC4 | 0A 00 | uint16_t | 0x000A (10) | table field `id` (UShort) + +0x2CC6 | 18 00 | uint16_t | 0x0018 (24) | table field `offset` (UShort) + +0x2CC8 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2D0C | offset to field `name` (string) + +0x2CCC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2D00 | offset to field `type` (table) + +0x2CD0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2CDC | offset to field `attributes` (vector) + +0x2CD4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CD8 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2920 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2CD8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2924 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2928 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x292C | offset to table[0] + +0x2CDC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2CE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CE4 | offset to table[0] table (reflection.KeyValue): - +0x292C | C8 F3 FF FF | SOffset32 | 0xFFFFF3C8 (-3128) Loc: +0x3564 | offset to vtable - +0x2930 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2940 | offset to field `key` (string) - +0x2934 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2938 | offset to field `value` (string) + +0x2CE4 | C8 F3 FF FF | SOffset32 | 0xFFFFF3C8 (-3128) Loc: +0x391C | offset to vtable + +0x2CE8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2CF8 | offset to field `key` (string) + +0x2CEC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CF0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2938 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x293C | 31 30 | char[2] | 10 | string literal - +0x293E | 00 | char | 0x00 (0) | string terminator + +0x2CF0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2CF4 | 31 30 | char[2] | 10 | string literal + +0x2CF6 | 00 | char | 0x00 (0) | string terminator string (reflection.KeyValue.key): - +0x2940 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2944 | 69 64 | char[2] | id | string literal - +0x2946 | 00 | char | 0x00 (0) | string terminator + +0x2CF8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2CFC | 69 64 | char[2] | id | string literal + +0x2CFE | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2948 | C4 FD FF FF | SOffset32 | 0xFFFFFDC4 (-572) Loc: +0x2B84 | offset to vtable - +0x294C | 00 00 | uint8_t[2] | .. | padding - +0x294E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x294F | 0D | uint8_t | 0x0D (13) | table field `element` (Byte) - +0x2950 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x2D00 | C4 FD FF FF | SOffset32 | 0xFFFFFDC4 (-572) Loc: +0x2F3C | offset to vtable + +0x2D04 | 00 00 | uint8_t[2] | .. | padding + +0x2D06 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2D07 | 0D | uint8_t | 0x0D (13) | table field `element` (Byte) + +0x2D08 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2954 | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string - +0x2958 | 74 65 73 74 61 72 72 61 | char[17] | testarra | string literal - +0x2960 | 79 6F 66 73 74 72 69 6E | | yofstrin - +0x2968 | 67 | | g - +0x2969 | 00 | char | 0x00 (0) | string terminator + +0x2D0C | 11 00 00 00 | uint32_t | 0x00000011 (17) | length of string + +0x2D10 | 74 65 73 74 61 72 72 61 | char[17] | testarra | string literal + +0x2D18 | 79 6F 66 73 74 72 69 6E | | yofstrin + +0x2D20 | 67 | | g + +0x2D21 | 00 | char | 0x00 (0) | string terminator padding: - +0x296A | 00 00 | uint8_t[2] | .. | padding + +0x2D22 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x296C | 48 FE FF FF | SOffset32 | 0xFFFFFE48 (-440) Loc: +0x2B24 | offset to vtable - +0x2970 | 00 00 00 | uint8_t[3] | ... | padding - +0x2973 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x2974 | 09 00 | uint16_t | 0x0009 (9) | table field `id` (UShort) - +0x2976 | 16 00 | uint16_t | 0x0016 (22) | table field `offset` (UShort) - +0x2978 | 58 00 00 00 | UOffset32 | 0x00000058 (88) Loc: +0x29D0 | offset to field `name` (string) - +0x297C | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x29C0 | offset to field `type` (table) - +0x2980 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x298C | offset to field `attributes` (vector) - +0x2984 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2988 | offset to field `documentation` (vector) + +0x2D24 | 48 FE FF FF | SOffset32 | 0xFFFFFE48 (-440) Loc: +0x2EDC | offset to vtable + +0x2D28 | 00 00 00 | uint8_t[3] | ... | padding + +0x2D2B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2D2C | 09 00 | uint16_t | 0x0009 (9) | table field `id` (UShort) + +0x2D2E | 16 00 | uint16_t | 0x0016 (22) | table field `offset` (UShort) + +0x2D30 | 58 00 00 00 | UOffset32 | 0x00000058 (88) Loc: +0x2D88 | offset to field `name` (string) + +0x2D34 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2D78 | offset to field `type` (table) + +0x2D38 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2D44 | offset to field `attributes` (vector) + +0x2D3C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2D40 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2988 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2D40 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x298C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2990 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2994 | offset to table[0] + +0x2D44 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2D48 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2D4C | offset to table[0] table (reflection.KeyValue): - +0x2994 | 30 F4 FF FF | SOffset32 | 0xFFFFF430 (-3024) Loc: +0x3564 | offset to vtable - +0x2998 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x29A8 | offset to field `key` (string) - +0x299C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29A0 | offset to field `value` (string) + +0x2D4C | 30 F4 FF FF | SOffset32 | 0xFFFFF430 (-3024) Loc: +0x391C | offset to vtable + +0x2D50 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2D60 | offset to field `key` (string) + +0x2D54 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2D58 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x29A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x29A4 | 39 | char[1] | 9 | string literal - +0x29A5 | 00 | char | 0x00 (0) | string terminator + +0x2D58 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2D5C | 39 | char[1] | 9 | string literal + +0x2D5D | 00 | char | 0x00 (0) | string terminator padding: - +0x29A6 | 00 00 | uint8_t[2] | .. | padding + +0x2D5E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x29A8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x29AC | 69 64 | char[2] | id | string literal - +0x29AE | 00 | char | 0x00 (0) | string terminator + +0x2D60 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2D64 | 69 64 | char[2] | id | string literal + +0x2D66 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Type): - +0x29B0 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x29B2 | 10 00 | uint16_t | 0x0010 (16) | size of referring table - +0x29B4 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `base_type` (id: 0) - +0x29B6 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `element` (id: 1) - +0x29B8 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) - +0x29BA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x29BC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) - +0x29BE | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) + +0x2D68 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x2D6A | 10 00 | uint16_t | 0x0010 (16) | size of referring table + +0x2D6C | 06 00 | VOffset16 | 0x0006 (6) | offset to field `base_type` (id: 0) + +0x2D6E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `element` (id: 1) + +0x2D70 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) + +0x2D72 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x2D74 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) + +0x2D76 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x29C0 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x29B0 | offset to vtable - +0x29C4 | 00 00 | uint8_t[2] | .. | padding - +0x29C6 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x29C7 | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) - +0x29C8 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) - +0x29CC | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) + +0x2D78 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x2D68 | offset to vtable + +0x2D7C | 00 00 | uint8_t[2] | .. | padding + +0x2D7E | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2D7F | 0F | uint8_t | 0x0F (15) | table field `element` (Byte) + +0x2D80 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) + +0x2D84 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `element_size` (UInt) string (reflection.Field.name): - +0x29D0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x29D4 | 74 65 73 74 34 | char[5] | test4 | string literal - +0x29D9 | 00 | char | 0x00 (0) | string terminator + +0x2D88 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x2D8C | 74 65 73 74 34 | char[5] | test4 | string literal + +0x2D91 | 00 | char | 0x00 (0) | string terminator padding: - +0x29DA | 00 00 | uint8_t[2] | .. | padding + +0x2D92 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x29DC | B8 FE FF FF | SOffset32 | 0xFFFFFEB8 (-328) Loc: +0x2B24 | offset to vtable - +0x29E0 | 00 00 00 | uint8_t[3] | ... | padding - +0x29E3 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x29E4 | 08 00 | uint16_t | 0x0008 (8) | table field `id` (UShort) - +0x29E6 | 14 00 | uint16_t | 0x0014 (20) | table field `offset` (UShort) - +0x29E8 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2A30 | offset to field `name` (string) - +0x29EC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2A20 | offset to field `type` (table) - +0x29F0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x29FC | offset to field `attributes` (vector) - +0x29F4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x29F8 | offset to field `documentation` (vector) + +0x2D94 | B8 FE FF FF | SOffset32 | 0xFFFFFEB8 (-328) Loc: +0x2EDC | offset to vtable + +0x2D98 | 00 00 00 | uint8_t[3] | ... | padding + +0x2D9B | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2D9C | 08 00 | uint16_t | 0x0008 (8) | table field `id` (UShort) + +0x2D9E | 14 00 | uint16_t | 0x0014 (20) | table field `offset` (UShort) + +0x2DA0 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2DE8 | offset to field `name` (string) + +0x2DA4 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2DD8 | offset to field `type` (table) + +0x2DA8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2DB4 | offset to field `attributes` (vector) + +0x2DAC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2DB0 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x29F8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2DB0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x29FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2A00 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A04 | offset to table[0] + +0x2DB4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2DB8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2DBC | offset to table[0] table (reflection.KeyValue): - +0x2A04 | A0 F4 FF FF | SOffset32 | 0xFFFFF4A0 (-2912) Loc: +0x3564 | offset to vtable - +0x2A08 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2A18 | offset to field `key` (string) - +0x2A0C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A10 | offset to field `value` (string) + +0x2DBC | A0 F4 FF FF | SOffset32 | 0xFFFFF4A0 (-2912) Loc: +0x391C | offset to vtable + +0x2DC0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2DD0 | offset to field `key` (string) + +0x2DC4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2DC8 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2A10 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2A14 | 38 | char[1] | 8 | string literal - +0x2A15 | 00 | char | 0x00 (0) | string terminator + +0x2DC8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2DCC | 38 | char[1] | 8 | string literal + +0x2DCD | 00 | char | 0x00 (0) | string terminator padding: - +0x2A16 | 00 00 | uint8_t[2] | .. | padding + +0x2DCE | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2A18 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2A1C | 69 64 | char[2] | id | string literal - +0x2A1E | 00 | char | 0x00 (0) | string terminator + +0x2DD0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2DD4 | 69 64 | char[2] | id | string literal + +0x2DD6 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2A20 | 68 F1 FF FF | SOffset32 | 0xFFFFF168 (-3736) Loc: +0x38B8 | offset to vtable - +0x2A24 | 00 00 00 | uint8_t[3] | ... | padding - +0x2A27 | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) - +0x2A28 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) - +0x2A2C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2DD8 | 68 F1 FF FF | SOffset32 | 0xFFFFF168 (-3736) Loc: +0x3C70 | offset to vtable + +0x2DDC | 00 00 00 | uint8_t[3] | ... | padding + +0x2DDF | 10 | uint8_t | 0x10 (16) | table field `base_type` (Byte) + +0x2DE0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) + +0x2DE4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2A30 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2A34 | 74 65 73 74 | char[4] | test | string literal - +0x2A38 | 00 | char | 0x00 (0) | string terminator + +0x2DE8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x2DEC | 74 65 73 74 | char[4] | test | string literal + +0x2DF0 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x2A3A | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2A3C | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x2A3E | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x2A40 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x2A42 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) - +0x2A44 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x2A46 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2A48 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2A4A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2A4C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2A4E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x2A50 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x2A52 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x2DF2 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x2DF4 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x2DF6 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x2DF8 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x2DFA | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x2DFC | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x2DFE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x2E00 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x2E02 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x2E04 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x2E06 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x2E08 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x2E0A | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2A54 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2A3A | offset to vtable - +0x2A58 | 07 00 | uint16_t | 0x0007 (7) | table field `id` (UShort) - +0x2A5A | 12 00 | uint16_t | 0x0012 (18) | table field `offset` (UShort) - +0x2A5C | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x2AA8 | offset to field `name` (string) - +0x2A60 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2A94 | offset to field `type` (table) - +0x2A64 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2A70 | offset to field `attributes` (vector) - +0x2A68 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A6C | offset to field `documentation` (vector) + +0x2E0C | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2DF2 | offset to vtable + +0x2E10 | 07 00 | uint16_t | 0x0007 (7) | table field `id` (UShort) + +0x2E12 | 12 00 | uint16_t | 0x0012 (18) | table field `offset` (UShort) + +0x2E14 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x2E60 | offset to field `name` (string) + +0x2E18 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2E4C | offset to field `type` (table) + +0x2E1C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2E28 | offset to field `attributes` (vector) + +0x2E20 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E24 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2A6C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2E24 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2A70 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2A74 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A78 | offset to table[0] + +0x2E28 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2E2C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E30 | offset to table[0] table (reflection.KeyValue): - +0x2A78 | 14 F5 FF FF | SOffset32 | 0xFFFFF514 (-2796) Loc: +0x3564 | offset to vtable - +0x2A7C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2A8C | offset to field `key` (string) - +0x2A80 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2A84 | offset to field `value` (string) + +0x2E30 | 14 F5 FF FF | SOffset32 | 0xFFFFF514 (-2796) Loc: +0x391C | offset to vtable + +0x2E34 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2E44 | offset to field `key` (string) + +0x2E38 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E3C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2A84 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2A88 | 37 | char[1] | 7 | string literal - +0x2A89 | 00 | char | 0x00 (0) | string terminator + +0x2E3C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2E40 | 37 | char[1] | 7 | string literal + +0x2E41 | 00 | char | 0x00 (0) | string terminator padding: - +0x2A8A | 00 00 | uint8_t[2] | .. | padding + +0x2E42 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2A8C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2A90 | 69 64 | char[2] | id | string literal - +0x2A92 | 00 | char | 0x00 (0) | string terminator + +0x2E44 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2E48 | 69 64 | char[2] | id | string literal + +0x2E4A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2A94 | 90 F4 FF FF | SOffset32 | 0xFFFFF490 (-2928) Loc: +0x3604 | offset to vtable - +0x2A98 | 00 00 00 | uint8_t[3] | ... | padding - +0x2A9B | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) - +0x2A9C | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) - +0x2AA0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x2AA4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2E4C | 90 F4 FF FF | SOffset32 | 0xFFFFF490 (-2928) Loc: +0x39BC | offset to vtable + +0x2E50 | 00 00 00 | uint8_t[3] | ... | padding + +0x2E53 | 01 | uint8_t | 0x01 (1) | table field `base_type` (Byte) + +0x2E54 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) + +0x2E58 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x2E5C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2AA8 | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string - +0x2AAC | 74 65 73 74 5F 74 79 70 | char[9] | test_typ | string literal - +0x2AB4 | 65 | | e - +0x2AB5 | 00 | char | 0x00 (0) | string terminator + +0x2E60 | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string + +0x2E64 | 74 65 73 74 5F 74 79 70 | char[9] | test_typ | string literal + +0x2E6C | 65 | | e + +0x2E6D | 00 | char | 0x00 (0) | string terminator padding: - +0x2AB6 | 00 00 | uint8_t[2] | .. | padding + +0x2E6E | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x2AB8 | 42 FD FF FF | SOffset32 | 0xFFFFFD42 (-702) Loc: +0x2D76 | offset to vtable - +0x2ABC | 06 00 | uint16_t | 0x0006 (6) | table field `id` (UShort) - +0x2ABE | 10 00 | uint16_t | 0x0010 (16) | table field `offset` (UShort) - +0x2AC0 | 58 00 00 00 | UOffset32 | 0x00000058 (88) Loc: +0x2B18 | offset to field `name` (string) - +0x2AC4 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2B04 | offset to field `type` (table) - +0x2AC8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2AE0 | offset to field `attributes` (vector) - +0x2ACC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2ADC | offset to field `documentation` (vector) - +0x2AD0 | 08 00 00 00 00 00 00 00 | int64_t | 0x0000000000000008 (8) | table field `default_integer` (Long) - +0x2AD8 | 00 00 00 00 | uint8_t[4] | .... | padding + +0x2E70 | 42 FD FF FF | SOffset32 | 0xFFFFFD42 (-702) Loc: +0x312E | offset to vtable + +0x2E74 | 06 00 | uint16_t | 0x0006 (6) | table field `id` (UShort) + +0x2E76 | 10 00 | uint16_t | 0x0010 (16) | table field `offset` (UShort) + +0x2E78 | 58 00 00 00 | UOffset32 | 0x00000058 (88) Loc: +0x2ED0 | offset to field `name` (string) + +0x2E7C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2EBC | offset to field `type` (table) + +0x2E80 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2E98 | offset to field `attributes` (vector) + +0x2E84 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2E94 | offset to field `documentation` (vector) + +0x2E88 | 08 00 00 00 00 00 00 00 | int64_t | 0x0000000000000008 (8) | table field `default_integer` (Long) + +0x2E90 | 00 00 00 00 | uint8_t[4] | .... | padding vector (reflection.Field.documentation): - +0x2ADC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2E94 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2AE0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2AE4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2AE8 | offset to table[0] + +0x2E98 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2E9C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2EA0 | offset to table[0] table (reflection.KeyValue): - +0x2AE8 | 84 F5 FF FF | SOffset32 | 0xFFFFF584 (-2684) Loc: +0x3564 | offset to vtable - +0x2AEC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2AFC | offset to field `key` (string) - +0x2AF0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2AF4 | offset to field `value` (string) + +0x2EA0 | 84 F5 FF FF | SOffset32 | 0xFFFFF584 (-2684) Loc: +0x391C | offset to vtable + +0x2EA4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2EB4 | offset to field `key` (string) + +0x2EA8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2EAC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2AF4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2AF8 | 36 | char[1] | 6 | string literal - +0x2AF9 | 00 | char | 0x00 (0) | string terminator + +0x2EAC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2EB0 | 36 | char[1] | 6 | string literal + +0x2EB1 | 00 | char | 0x00 (0) | string terminator padding: - +0x2AFA | 00 00 | uint8_t[2] | .. | padding + +0x2EB2 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2AFC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2B00 | 69 64 | char[2] | id | string literal - +0x2B02 | 00 | char | 0x00 (0) | string terminator + +0x2EB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2EB8 | 69 64 | char[2] | id | string literal + +0x2EBA | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2B04 | 00 F5 FF FF | SOffset32 | 0xFFFFF500 (-2816) Loc: +0x3604 | offset to vtable - +0x2B08 | 00 00 00 | uint8_t[3] | ... | padding - +0x2B0B | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) - +0x2B0C | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x2B10 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x2B14 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2EBC | 00 F5 FF FF | SOffset32 | 0xFFFFF500 (-2816) Loc: +0x39BC | offset to vtable + +0x2EC0 | 00 00 00 | uint8_t[3] | ... | padding + +0x2EC3 | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) + +0x2EC4 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x2EC8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x2ECC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2B18 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x2B1C | 63 6F 6C 6F 72 | char[5] | color | string literal - +0x2B21 | 00 | char | 0x00 (0) | string terminator + +0x2ED0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x2ED4 | 63 6F 6C 6F 72 | char[5] | color | string literal + +0x2ED9 | 00 | char | 0x00 (0) | string terminator padding: - +0x2B22 | 00 00 | uint8_t[2] | .. | padding + +0x2EDA | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x2B24 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable - +0x2B26 | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x2B28 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x2B2A | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x2B2C | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) - +0x2B2E | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) - +0x2B30 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2B32 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2B34 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2B36 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2B38 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x2B3A | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) - +0x2B3C | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) - +0x2B3E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) + +0x2EDC | 1C 00 | uint16_t | 0x001C (28) | size of this vtable + +0x2EDE | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x2EE0 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x2EE2 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x2EE4 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) + +0x2EE6 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) + +0x2EE8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x2EEA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x2EEC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x2EEE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x2EF0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x2EF2 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) + +0x2EF4 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) + +0x2EF6 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) table (reflection.Field): - +0x2B40 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x2B24 | offset to vtable - +0x2B44 | 00 00 00 | uint8_t[3] | ... | padding - +0x2B47 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x2B48 | 05 00 | uint16_t | 0x0005 (5) | table field `id` (UShort) - +0x2B4A | 0E 00 | uint16_t | 0x000E (14) | table field `offset` (UShort) - +0x2B4C | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x2BA0 | offset to field `name` (string) - +0x2B50 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2B94 | offset to field `type` (table) - +0x2B54 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2B60 | offset to field `attributes` (vector) - +0x2B58 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B5C | offset to field `documentation` (vector) + +0x2EF8 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x2EDC | offset to vtable + +0x2EFC | 00 00 00 | uint8_t[3] | ... | padding + +0x2EFF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x2F00 | 05 00 | uint16_t | 0x0005 (5) | table field `id` (UShort) + +0x2F02 | 0E 00 | uint16_t | 0x000E (14) | table field `offset` (UShort) + +0x2F04 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x2F58 | offset to field `name` (string) + +0x2F08 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x2F4C | offset to field `type` (table) + +0x2F0C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2F18 | offset to field `attributes` (vector) + +0x2F10 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2F14 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2B5C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2F14 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2B60 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2B64 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B68 | offset to table[0] + +0x2F18 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x2F1C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2F20 | offset to table[0] table (reflection.KeyValue): - +0x2B68 | 04 F6 FF FF | SOffset32 | 0xFFFFF604 (-2556) Loc: +0x3564 | offset to vtable - +0x2B6C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2B7C | offset to field `key` (string) - +0x2B70 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2B74 | offset to field `value` (string) + +0x2F20 | 04 F6 FF FF | SOffset32 | 0xFFFFF604 (-2556) Loc: +0x391C | offset to vtable + +0x2F24 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2F34 | offset to field `key` (string) + +0x2F28 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2F2C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2B74 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2B78 | 35 | char[1] | 5 | string literal - +0x2B79 | 00 | char | 0x00 (0) | string terminator + +0x2F2C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2F30 | 35 | char[1] | 5 | string literal + +0x2F31 | 00 | char | 0x00 (0) | string terminator padding: - +0x2B7A | 00 00 | uint8_t[2] | .. | padding + +0x2F32 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2B7C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2B80 | 69 64 | char[2] | id | string literal - +0x2B82 | 00 | char | 0x00 (0) | string terminator + +0x2F34 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2F38 | 69 64 | char[2] | id | string literal + +0x2F3A | 00 | char | 0x00 (0) | string terminator vtable (reflection.Type): - +0x2B84 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x2B86 | 0C 00 | uint16_t | 0x000C (12) | size of referring table - +0x2B88 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `base_type` (id: 0) - +0x2B8A | 07 00 | VOffset16 | 0x0007 (7) | offset to field `element` (id: 1) - +0x2B8C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) - +0x2B8E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x2B90 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) - +0x2B92 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `element_size` (id: 5) + +0x2F3C | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x2F3E | 0C 00 | uint16_t | 0x000C (12) | size of referring table + +0x2F40 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `base_type` (id: 0) + +0x2F42 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `element` (id: 1) + +0x2F44 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) + +0x2F46 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x2F48 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) + +0x2F4A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x2B94 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x2B84 | offset to vtable - +0x2B98 | 00 00 | uint8_t[2] | .. | padding - +0x2B9A | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) - +0x2B9B | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) - +0x2B9C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x2F4C | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x2F3C | offset to vtable + +0x2F50 | 00 00 | uint8_t[2] | .. | padding + +0x2F52 | 0E | uint8_t | 0x0E (14) | table field `base_type` (Byte) + +0x2F53 | 04 | uint8_t | 0x04 (4) | table field `element` (Byte) + +0x2F54 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2BA0 | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string - +0x2BA4 | 69 6E 76 65 6E 74 6F 72 | char[9] | inventor | string literal - +0x2BAC | 79 | | y - +0x2BAD | 00 | char | 0x00 (0) | string terminator + +0x2F58 | 09 00 00 00 | uint32_t | 0x00000009 (9) | length of string + +0x2F5C | 69 6E 76 65 6E 74 6F 72 | char[9] | inventor | string literal + +0x2F64 | 79 | | y + +0x2F65 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x2BAE | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2BB0 | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x2BB2 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x2BB4 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x2BB6 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) - +0x2BB8 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) - +0x2BBA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2BBC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2BBE | 07 00 | VOffset16 | 0x0007 (7) | offset to field `deprecated` (id: 6) - +0x2BC0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2BC2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x2BC4 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) - +0x2BC6 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) + +0x2F66 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x2F68 | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x2F6A | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x2F6C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x2F6E | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) + +0x2F70 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) + +0x2F72 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x2F74 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x2F76 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `deprecated` (id: 6) + +0x2F78 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x2F7A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x2F7C | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) + +0x2F7E | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2BC8 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2BAE | offset to vtable - +0x2BCC | 00 00 00 | uint8_t[3] | ... | padding - +0x2BCF | 01 | uint8_t | 0x01 (1) | table field `deprecated` (Bool) - +0x2BD0 | 04 00 | uint16_t | 0x0004 (4) | table field `id` (UShort) - +0x2BD2 | 0C 00 | uint16_t | 0x000C (12) | table field `offset` (UShort) - +0x2BD4 | 98 00 00 00 | UOffset32 | 0x00000098 (152) Loc: +0x2C6C | offset to field `name` (string) - +0x2BD8 | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x2C5C | offset to field `type` (table) - +0x2BDC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2BE8 | offset to field `attributes` (vector) - +0x2BE0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2BE4 | offset to field `documentation` (vector) + +0x2F80 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2F66 | offset to vtable + +0x2F84 | 00 00 00 | uint8_t[3] | ... | padding + +0x2F87 | 01 | uint8_t | 0x01 (1) | table field `deprecated` (Bool) + +0x2F88 | 04 00 | uint16_t | 0x0004 (4) | table field `id` (UShort) + +0x2F8A | 0C 00 | uint16_t | 0x000C (12) | table field `offset` (UShort) + +0x2F8C | 98 00 00 00 | UOffset32 | 0x00000098 (152) Loc: +0x3024 | offset to field `name` (string) + +0x2F90 | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x3014 | offset to field `type` (table) + +0x2F94 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2FA0 | offset to field `attributes` (vector) + +0x2F98 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2F9C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2BE4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x2F9C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2BE8 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) - +0x2BEC | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x2C38 | offset to table[0] - +0x2BF0 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x2C1C | offset to table[1] - +0x2BF4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2BF8 | offset to table[2] + +0x2FA0 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) + +0x2FA4 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x2FF0 | offset to table[0] + +0x2FA8 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x2FD4 | offset to table[1] + +0x2FAC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FB0 | offset to table[2] table (reflection.KeyValue): - +0x2BF8 | 94 F6 FF FF | SOffset32 | 0xFFFFF694 (-2412) Loc: +0x3564 | offset to vtable - +0x2BFC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2C0C | offset to field `key` (string) - +0x2C00 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C04 | offset to field `value` (string) + +0x2FB0 | 94 F6 FF FF | SOffset32 | 0xFFFFF694 (-2412) Loc: +0x391C | offset to vtable + +0x2FB4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2FC4 | offset to field `key` (string) + +0x2FB8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FBC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2C04 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2C08 | 31 | char[1] | 1 | string literal - +0x2C09 | 00 | char | 0x00 (0) | string terminator + +0x2FBC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2FC0 | 31 | char[1] | 1 | string literal + +0x2FC1 | 00 | char | 0x00 (0) | string terminator padding: - +0x2C0A | 00 00 | uint8_t[2] | .. | padding + +0x2FC2 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2C0C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2C10 | 70 72 69 6F 72 69 74 79 | char[8] | priority | string literal - +0x2C18 | 00 | char | 0x00 (0) | string terminator + +0x2FC4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x2FC8 | 70 72 69 6F 72 69 74 79 | char[8] | priority | string literal + +0x2FD0 | 00 | char | 0x00 (0) | string terminator padding: - +0x2C19 | 00 00 00 | uint8_t[3] | ... | padding + +0x2FD1 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.KeyValue): - +0x2C1C | B8 F6 FF FF | SOffset32 | 0xFFFFF6B8 (-2376) Loc: +0x3564 | offset to vtable - +0x2C20 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2C30 | offset to field `key` (string) - +0x2C24 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C28 | offset to field `value` (string) + +0x2FD4 | B8 F6 FF FF | SOffset32 | 0xFFFFF6B8 (-2376) Loc: +0x391C | offset to vtable + +0x2FD8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2FE8 | offset to field `key` (string) + +0x2FDC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FE0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2C28 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2C2C | 34 | char[1] | 4 | string literal - +0x2C2D | 00 | char | 0x00 (0) | string terminator + +0x2FE0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x2FE4 | 34 | char[1] | 4 | string literal + +0x2FE5 | 00 | char | 0x00 (0) | string terminator padding: - +0x2C2E | 00 00 | uint8_t[2] | .. | padding + +0x2FE6 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2C30 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2C34 | 69 64 | char[2] | id | string literal - +0x2C36 | 00 | char | 0x00 (0) | string terminator + +0x2FE8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x2FEC | 69 64 | char[2] | id | string literal + +0x2FEE | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2C38 | D4 F6 FF FF | SOffset32 | 0xFFFFF6D4 (-2348) Loc: +0x3564 | offset to vtable - +0x2C3C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2C4C | offset to field `key` (string) - +0x2C40 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2C44 | offset to field `value` (string) + +0x2FF0 | D4 F6 FF FF | SOffset32 | 0xFFFFF6D4 (-2348) Loc: +0x391C | offset to vtable + +0x2FF4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3004 | offset to field `key` (string) + +0x2FF8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FFC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2C44 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2C48 | 30 | char[1] | 0 | string literal - +0x2C49 | 00 | char | 0x00 (0) | string terminator + +0x2FFC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3000 | 30 | char[1] | 0 | string literal + +0x3001 | 00 | char | 0x00 (0) | string terminator padding: - +0x2C4A | 00 00 | uint8_t[2] | .. | padding + +0x3002 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2C4C | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string - +0x2C50 | 64 65 70 72 65 63 61 74 | char[10] | deprecat | string literal - +0x2C58 | 65 64 | | ed - +0x2C5A | 00 | char | 0x00 (0) | string terminator + +0x3004 | 0A 00 00 00 | uint32_t | 0x0000000A (10) | length of string + +0x3008 | 64 65 70 72 65 63 61 74 | char[10] | deprecat | string literal + +0x3010 | 65 64 | | ed + +0x3012 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2C5C | 78 F5 FF FF | SOffset32 | 0xFFFFF578 (-2696) Loc: +0x36E4 | offset to vtable - +0x2C60 | 00 00 00 | uint8_t[3] | ... | padding - +0x2C63 | 02 | uint8_t | 0x02 (2) | table field `base_type` (Byte) - +0x2C64 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x2C68 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3014 | 78 F5 FF FF | SOffset32 | 0xFFFFF578 (-2696) Loc: +0x3A9C | offset to vtable + +0x3018 | 00 00 00 | uint8_t[3] | ... | padding + +0x301B | 02 | uint8_t | 0x02 (2) | table field `base_type` (Byte) + +0x301C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x3020 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2C6C | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2C70 | 66 72 69 65 6E 64 6C 79 | char[8] | friendly | string literal - +0x2C78 | 00 | char | 0x00 (0) | string terminator + +0x3024 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x3028 | 66 72 69 65 6E 64 6C 79 | char[8] | friendly | string literal + +0x3030 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x2C7A | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2C7C | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x2C7E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x2C80 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x2C82 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) - +0x2C84 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) - +0x2C86 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2C88 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2C8A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2C8C | 06 00 | VOffset16 | 0x0006 (6) | offset to field `required` (id: 7) - +0x2C8E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) - +0x2C90 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) - +0x2C92 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) + +0x3032 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3034 | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x3036 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x3038 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x303A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) + +0x303C | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) + +0x303E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3040 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3042 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3044 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `required` (id: 7) + +0x3046 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) + +0x3048 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) + +0x304A | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2C94 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2C7A | offset to vtable - +0x2C98 | 00 00 | uint8_t[2] | .. | padding - +0x2C9A | 01 | uint8_t | 0x01 (1) | table field `required` (Bool) - +0x2C9B | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) - +0x2C9C | 03 00 | uint16_t | 0x0003 (3) | table field `id` (UShort) - +0x2C9E | 0A 00 | uint16_t | 0x000A (10) | table field `offset` (UShort) - +0x2CA0 | 64 00 00 00 | UOffset32 | 0x00000064 (100) Loc: +0x2D04 | offset to field `name` (string) - +0x2CA4 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x2CF8 | offset to field `type` (table) - +0x2CA8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2CB4 | offset to field `attributes` (vector) - +0x2CAC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CB0 | offset to field `documentation` (vector) + +0x304C | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3032 | offset to vtable + +0x3050 | 00 00 | uint8_t[2] | .. | padding + +0x3052 | 01 | uint8_t | 0x01 (1) | table field `required` (Bool) + +0x3053 | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) + +0x3054 | 03 00 | uint16_t | 0x0003 (3) | table field `id` (UShort) + +0x3056 | 0A 00 | uint16_t | 0x000A (10) | table field `offset` (UShort) + +0x3058 | 64 00 00 00 | UOffset32 | 0x00000064 (100) Loc: +0x30BC | offset to field `name` (string) + +0x305C | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x30B0 | offset to field `type` (table) + +0x3060 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x306C | offset to field `attributes` (vector) + +0x3064 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3068 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2CB0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3068 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2CB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2CB8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2CDC | offset to table[0] - +0x2CBC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CC0 | offset to table[1] + +0x306C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x3070 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x3094 | offset to table[0] + +0x3074 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3078 | offset to table[1] table (reflection.KeyValue): - +0x2CC0 | 5C F7 FF FF | SOffset32 | 0xFFFFF75C (-2212) Loc: +0x3564 | offset to vtable - +0x2CC4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2CD4 | offset to field `key` (string) - +0x2CC8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CCC | offset to field `value` (string) + +0x3078 | 5C F7 FF FF | SOffset32 | 0xFFFFF75C (-2212) Loc: +0x391C | offset to vtable + +0x307C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x308C | offset to field `key` (string) + +0x3080 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3084 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2CCC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2CD0 | 30 | char[1] | 0 | string literal - +0x2CD1 | 00 | char | 0x00 (0) | string terminator + +0x3084 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3088 | 30 | char[1] | 0 | string literal + +0x3089 | 00 | char | 0x00 (0) | string terminator padding: - +0x2CD2 | 00 00 | uint8_t[2] | .. | padding + +0x308A | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2CD4 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x2CD8 | 6B 65 79 | char[3] | key | string literal - +0x2CDB | 00 | char | 0x00 (0) | string terminator + +0x308C | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x3090 | 6B 65 79 | char[3] | key | string literal + +0x3093 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2CDC | 78 F7 FF FF | SOffset32 | 0xFFFFF778 (-2184) Loc: +0x3564 | offset to vtable - +0x2CE0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2CF0 | offset to field `key` (string) - +0x2CE4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2CE8 | offset to field `value` (string) + +0x3094 | 78 F7 FF FF | SOffset32 | 0xFFFFF778 (-2184) Loc: +0x391C | offset to vtable + +0x3098 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x30A8 | offset to field `key` (string) + +0x309C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x30A0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2CE8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2CEC | 33 | char[1] | 3 | string literal - +0x2CED | 00 | char | 0x00 (0) | string terminator + +0x30A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x30A4 | 33 | char[1] | 3 | string literal + +0x30A5 | 00 | char | 0x00 (0) | string terminator padding: - +0x2CEE | 00 00 | uint8_t[2] | .. | padding + +0x30A6 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2CF0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2CF4 | 69 64 | char[2] | id | string literal - +0x2CF6 | 00 | char | 0x00 (0) | string terminator + +0x30A8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x30AC | 69 64 | char[2] | id | string literal + +0x30AE | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2CF8 | 5C F3 FF FF | SOffset32 | 0xFFFFF35C (-3236) Loc: +0x399C | offset to vtable - +0x2CFC | 00 00 00 | uint8_t[3] | ... | padding - +0x2CFF | 0D | uint8_t | 0x0D (13) | table field `base_type` (Byte) - +0x2D00 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x30B0 | 5C F3 FF FF | SOffset32 | 0xFFFFF35C (-3236) Loc: +0x3D54 | offset to vtable + +0x30B4 | 00 00 00 | uint8_t[3] | ... | padding + +0x30B7 | 0D | uint8_t | 0x0D (13) | table field `base_type` (Byte) + +0x30B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2D04 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2D08 | 6E 61 6D 65 | char[4] | name | string literal - +0x2D0C | 00 | char | 0x00 (0) | string terminator + +0x30BC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x30C0 | 6E 61 6D 65 | char[4] | name | string literal + +0x30C4 | 00 | char | 0x00 (0) | string terminator padding: - +0x2D0D | 00 00 00 | uint8_t[3] | ... | padding + +0x30C5 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Field): - +0x2D10 | 9A FF FF FF | SOffset32 | 0xFFFFFF9A (-102) Loc: +0x2D76 | offset to vtable - +0x2D14 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) - +0x2D16 | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) - +0x2D18 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x2D6C | offset to field `name` (string) - +0x2D1C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2D5C | offset to field `type` (table) - +0x2D20 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2D38 | offset to field `attributes` (vector) - +0x2D24 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2D34 | offset to field `documentation` (vector) - +0x2D28 | 64 00 00 00 00 00 00 00 | int64_t | 0x0000000000000064 (100) | table field `default_integer` (Long) - +0x2D30 | 00 00 00 00 | uint8_t[4] | .... | padding + +0x30C8 | 9A FF FF FF | SOffset32 | 0xFFFFFF9A (-102) Loc: +0x312E | offset to vtable + +0x30CC | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) + +0x30CE | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) + +0x30D0 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x3124 | offset to field `name` (string) + +0x30D4 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3114 | offset to field `type` (table) + +0x30D8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x30F0 | offset to field `attributes` (vector) + +0x30DC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x30EC | offset to field `documentation` (vector) + +0x30E0 | 64 00 00 00 00 00 00 00 | int64_t | 0x0000000000000064 (100) | table field `default_integer` (Long) + +0x30E8 | 00 00 00 00 | uint8_t[4] | .... | padding vector (reflection.Field.documentation): - +0x2D34 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x30EC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2D38 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2D3C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2D40 | offset to table[0] + +0x30F0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x30F4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x30F8 | offset to table[0] table (reflection.KeyValue): - +0x2D40 | DC F7 FF FF | SOffset32 | 0xFFFFF7DC (-2084) Loc: +0x3564 | offset to vtable - +0x2D44 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2D54 | offset to field `key` (string) - +0x2D48 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2D4C | offset to field `value` (string) + +0x30F8 | DC F7 FF FF | SOffset32 | 0xFFFFF7DC (-2084) Loc: +0x391C | offset to vtable + +0x30FC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x310C | offset to field `key` (string) + +0x3100 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3104 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2D4C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2D50 | 32 | char[1] | 2 | string literal - +0x2D51 | 00 | char | 0x00 (0) | string terminator + +0x3104 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3108 | 32 | char[1] | 2 | string literal + +0x3109 | 00 | char | 0x00 (0) | string terminator padding: - +0x2D52 | 00 00 | uint8_t[2] | .. | padding + +0x310A | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2D54 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2D58 | 69 64 | char[2] | id | string literal - +0x2D5A | 00 | char | 0x00 (0) | string terminator + +0x310C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x3110 | 69 64 | char[2] | id | string literal + +0x3112 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2D5C | 78 F6 FF FF | SOffset32 | 0xFFFFF678 (-2440) Loc: +0x36E4 | offset to vtable - +0x2D60 | 00 00 00 | uint8_t[3] | ... | padding - +0x2D63 | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) - +0x2D64 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) - +0x2D68 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3114 | 78 F6 FF FF | SOffset32 | 0xFFFFF678 (-2440) Loc: +0x3A9C | offset to vtable + +0x3118 | 00 00 00 | uint8_t[3] | ... | padding + +0x311B | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) + +0x311C | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) + +0x3120 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2D6C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2D70 | 68 70 | char[2] | hp | string literal - +0x2D72 | 00 | char | 0x00 (0) | string terminator + +0x3124 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x3128 | 68 70 | char[2] | hp | string literal + +0x312A | 00 | char | 0x00 (0) | string terminator padding: - +0x2D73 | 00 00 00 | uint8_t[3] | ... | padding + +0x312B | 00 00 00 | uint8_t[3] | ... | padding vtable (reflection.Field): - +0x2D76 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2D78 | 24 00 | uint16_t | 0x0024 (36) | size of referring table - +0x2D7A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x2D7C | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x2D7E | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) - +0x2D80 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x2D82 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_integer` (id: 4) - +0x2D84 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2D86 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2D88 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2D8A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x2D8C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x2D8E | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x312E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3130 | 24 00 | uint16_t | 0x0024 (36) | size of referring table + +0x3132 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3134 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x3136 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x3138 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x313A | 18 00 | VOffset16 | 0x0018 (24) | offset to field `default_integer` (id: 4) + +0x313C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x313E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3140 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3142 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3144 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x3146 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2D90 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2D76 | offset to vtable - +0x2D94 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x2D96 | 06 00 | uint16_t | 0x0006 (6) | table field `offset` (UShort) - +0x2D98 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x2DEC | offset to field `name` (string) - +0x2D9C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2DDC | offset to field `type` (table) - +0x2DA0 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2DB8 | offset to field `attributes` (vector) - +0x2DA4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2DB4 | offset to field `documentation` (vector) - +0x2DA8 | 96 00 00 00 00 00 00 00 | int64_t | 0x0000000000000096 (150) | table field `default_integer` (Long) - +0x2DB0 | 00 00 00 00 | uint8_t[4] | .... | padding + +0x3148 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x312E | offset to vtable + +0x314C | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x314E | 06 00 | uint16_t | 0x0006 (6) | table field `offset` (UShort) + +0x3150 | 54 00 00 00 | UOffset32 | 0x00000054 (84) Loc: +0x31A4 | offset to field `name` (string) + +0x3154 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3194 | offset to field `type` (table) + +0x3158 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x3170 | offset to field `attributes` (vector) + +0x315C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x316C | offset to field `documentation` (vector) + +0x3160 | 96 00 00 00 00 00 00 00 | int64_t | 0x0000000000000096 (150) | table field `default_integer` (Long) + +0x3168 | 00 00 00 00 | uint8_t[4] | .... | padding vector (reflection.Field.documentation): - +0x2DB4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x316C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2DB8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2DBC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2DC0 | offset to table[0] + +0x3170 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3174 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3178 | offset to table[0] table (reflection.KeyValue): - +0x2DC0 | 5C F8 FF FF | SOffset32 | 0xFFFFF85C (-1956) Loc: +0x3564 | offset to vtable - +0x2DC4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2DD4 | offset to field `key` (string) - +0x2DC8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2DCC | offset to field `value` (string) + +0x3178 | 5C F8 FF FF | SOffset32 | 0xFFFFF85C (-1956) Loc: +0x391C | offset to vtable + +0x317C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x318C | offset to field `key` (string) + +0x3180 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3184 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2DCC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2DD0 | 31 | char[1] | 1 | string literal - +0x2DD1 | 00 | char | 0x00 (0) | string terminator + +0x3184 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3188 | 31 | char[1] | 1 | string literal + +0x3189 | 00 | char | 0x00 (0) | string terminator padding: - +0x2DD2 | 00 00 | uint8_t[2] | .. | padding + +0x318A | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2DD4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2DD8 | 69 64 | char[2] | id | string literal - +0x2DDA | 00 | char | 0x00 (0) | string terminator + +0x318C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x3190 | 69 64 | char[2] | id | string literal + +0x3192 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2DDC | F8 F6 FF FF | SOffset32 | 0xFFFFF6F8 (-2312) Loc: +0x36E4 | offset to vtable - +0x2DE0 | 00 00 00 | uint8_t[3] | ... | padding - +0x2DE3 | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) - +0x2DE4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) - +0x2DE8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3194 | F8 F6 FF FF | SOffset32 | 0xFFFFF6F8 (-2312) Loc: +0x3A9C | offset to vtable + +0x3198 | 00 00 00 | uint8_t[3] | ... | padding + +0x319B | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) + +0x319C | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) + +0x31A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2DEC | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2DF0 | 6D 61 6E 61 | char[4] | mana | string literal - +0x2DF4 | 00 | char | 0x00 (0) | string terminator + +0x31A4 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x31A8 | 6D 61 6E 61 | char[4] | mana | string literal + +0x31AC | 00 | char | 0x00 (0) | string terminator padding: - +0x2DF5 | 00 00 00 | uint8_t[3] | ... | padding + +0x31AD | 00 00 00 | uint8_t[3] | ... | padding vtable (reflection.Field): - +0x2DF8 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable - +0x2DFA | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x2DFC | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x2DFE | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x2E00 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x2E02 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x2E04 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2E06 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2E08 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2E0A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2E0C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x2E0E | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x2E10 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) - +0x2E12 | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) + +0x31B0 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable + +0x31B2 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x31B4 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x31B6 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x31B8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x31BA | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x31BC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x31BE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x31C0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x31C2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x31C4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x31C6 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x31C8 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x31CA | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) table (reflection.Field): - +0x2E14 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x2DF8 | offset to vtable - +0x2E18 | 00 | uint8_t[1] | . | padding - +0x2E19 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x2E1A | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x2E1C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x2E64 | offset to field `name` (string) - +0x2E20 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2E54 | offset to field `type` (table) - +0x2E24 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2E30 | offset to field `attributes` (vector) - +0x2E28 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E2C | offset to field `documentation` (vector) + +0x31CC | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x31B0 | offset to vtable + +0x31D0 | 00 | uint8_t[1] | . | padding + +0x31D1 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x31D2 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x31D4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x321C | offset to field `name` (string) + +0x31D8 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x320C | offset to field `type` (table) + +0x31DC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x31E8 | offset to field `attributes` (vector) + +0x31E0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x31E4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2E2C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x31E4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2E30 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2E34 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E38 | offset to table[0] + +0x31E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x31EC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x31F0 | offset to table[0] table (reflection.KeyValue): - +0x2E38 | D4 F8 FF FF | SOffset32 | 0xFFFFF8D4 (-1836) Loc: +0x3564 | offset to vtable - +0x2E3C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2E4C | offset to field `key` (string) - +0x2E40 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2E44 | offset to field `value` (string) + +0x31F0 | D4 F8 FF FF | SOffset32 | 0xFFFFF8D4 (-1836) Loc: +0x391C | offset to vtable + +0x31F4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3204 | offset to field `key` (string) + +0x31F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x31FC | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2E44 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2E48 | 30 | char[1] | 0 | string literal - +0x2E49 | 00 | char | 0x00 (0) | string terminator + +0x31FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3200 | 30 | char[1] | 0 | string literal + +0x3201 | 00 | char | 0x00 (0) | string terminator padding: - +0x2E4A | 00 00 | uint8_t[2] | .. | padding + +0x3202 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2E4C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2E50 | 69 64 | char[2] | id | string literal - +0x2E52 | 00 | char | 0x00 (0) | string terminator + +0x3204 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x3208 | 69 64 | char[2] | id | string literal + +0x320A | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2E54 | 9C F5 FF FF | SOffset32 | 0xFFFFF59C (-2660) Loc: +0x38B8 | offset to vtable - +0x2E58 | 00 00 00 | uint8_t[3] | ... | padding - +0x2E5B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x2E5C | 09 00 00 00 | uint32_t | 0x00000009 (9) | table field `index` (Int) - +0x2E60 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x320C | 9C F5 FF FF | SOffset32 | 0xFFFFF59C (-2660) Loc: +0x3C70 | offset to vtable + +0x3210 | 00 00 00 | uint8_t[3] | ... | padding + +0x3213 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3214 | 09 00 00 00 | uint32_t | 0x00000009 (9) | table field `index` (Int) + +0x3218 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2E64 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x2E68 | 70 6F 73 | char[3] | pos | string literal - +0x2E6B | 00 | char | 0x00 (0) | string terminator + +0x321C | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x3220 | 70 6F 73 | char[3] | pos | string literal + +0x3223 | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x2E6C | 44 F6 FF FF | SOffset32 | 0xFFFFF644 (-2492) Loc: +0x3828 | offset to vtable - +0x2E70 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x2E90 | offset to field `name` (string) - +0x2E74 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2E88 | offset to field `fields` (vector) - +0x2E78 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x2E7C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x2E84 | offset to field `documentation` (vector) - +0x2E80 | E0 08 00 00 | UOffset32 | 0x000008E0 (2272) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x3224 | 44 F6 FF FF | SOffset32 | 0xFFFFF644 (-2492) Loc: +0x3BE0 | offset to vtable + +0x3228 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3248 | offset to field `name` (string) + +0x322C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3240 | offset to field `fields` (vector) + +0x3230 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3234 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x323C | offset to field `documentation` (vector) + +0x3238 | E0 08 00 00 | UOffset32 | 0x000008E0 (2272) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x2E84 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x323C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x2E88 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2E8C | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x2EC8 | offset to table[0] + +0x3240 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3244 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x3280 | offset to table[0] string (reflection.Object.name): - +0x2E90 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string - +0x2E94 | 4D 79 47 61 6D 65 2E 45 | char[25] | MyGame.E | string literal - +0x2E9C | 78 61 6D 70 6C 65 2E 52 | | xample.R - +0x2EA4 | 65 66 65 72 72 61 62 6C | | eferrabl - +0x2EAC | 65 | | e - +0x2EAD | 00 | char | 0x00 (0) | string terminator + +0x3248 | 19 00 00 00 | uint32_t | 0x00000019 (25) | length of string + +0x324C | 4D 79 47 61 6D 65 2E 45 | char[25] | MyGame.E | string literal + +0x3254 | 78 61 6D 70 6C 65 2E 52 | | xample.R + +0x325C | 65 66 65 72 72 61 62 6C | | eferrabl + +0x3264 | 65 | | e + +0x3265 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x2EAE | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2EB0 | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x2EB2 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x2EB4 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x2EB6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x2EB8 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x2EBA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2EBC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2EBE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2EC0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2EC2 | 05 00 | VOffset16 | 0x0005 (5) | offset to field `key` (id: 8) - +0x2EC4 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x2EC6 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x3266 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3268 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x326A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x326C | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x326E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x3270 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x3272 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3274 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3276 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3278 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x327A | 05 00 | VOffset16 | 0x0005 (5) | offset to field `key` (id: 8) + +0x327C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x327E | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2EC8 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2EAE | offset to vtable - +0x2ECC | 00 | uint8_t[1] | . | padding - +0x2ECD | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) - +0x2ECE | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x2ED0 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x2F44 | offset to field `name` (string) - +0x2ED4 | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x2F34 | offset to field `type` (table) - +0x2ED8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2EE4 | offset to field `attributes` (vector) - +0x2EDC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2EE0 | offset to field `documentation` (vector) + +0x3280 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3266 | offset to vtable + +0x3284 | 00 | uint8_t[1] | . | padding + +0x3285 | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) + +0x3286 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x3288 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x32FC | offset to field `name` (string) + +0x328C | 60 00 00 00 | UOffset32 | 0x00000060 (96) Loc: +0x32EC | offset to field `type` (table) + +0x3290 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x329C | offset to field `attributes` (vector) + +0x3294 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3298 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2EE0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3298 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2EE4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x2EE8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x2F0C | offset to table[0] - +0x2EEC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2EF0 | offset to table[1] + +0x329C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x32A0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x32C4 | offset to table[0] + +0x32A4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32A8 | offset to table[1] table (reflection.KeyValue): - +0x2EF0 | 8C F9 FF FF | SOffset32 | 0xFFFFF98C (-1652) Loc: +0x3564 | offset to vtable - +0x2EF4 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2F04 | offset to field `key` (string) - +0x2EF8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2EFC | offset to field `value` (string) + +0x32A8 | 8C F9 FF FF | SOffset32 | 0xFFFFF98C (-1652) Loc: +0x391C | offset to vtable + +0x32AC | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x32BC | offset to field `key` (string) + +0x32B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32B4 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2EFC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2F00 | 30 | char[1] | 0 | string literal - +0x2F01 | 00 | char | 0x00 (0) | string terminator + +0x32B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x32B8 | 30 | char[1] | 0 | string literal + +0x32B9 | 00 | char | 0x00 (0) | string terminator padding: - +0x2F02 | 00 00 | uint8_t[2] | .. | padding + +0x32BA | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2F04 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x2F08 | 6B 65 79 | char[3] | key | string literal - +0x2F0B | 00 | char | 0x00 (0) | string terminator + +0x32BC | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x32C0 | 6B 65 79 | char[3] | key | string literal + +0x32C3 | 00 | char | 0x00 (0) | string terminator table (reflection.KeyValue): - +0x2F0C | A8 F9 FF FF | SOffset32 | 0xFFFFF9A8 (-1624) Loc: +0x3564 | offset to vtable - +0x2F10 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x2F28 | offset to field `key` (string) - +0x2F14 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2F18 | offset to field `value` (string) + +0x32C4 | A8 F9 FF FF | SOffset32 | 0xFFFFF9A8 (-1624) Loc: +0x391C | offset to vtable + +0x32C8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x32E0 | offset to field `key` (string) + +0x32CC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32D0 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2F18 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x2F1C | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal - +0x2F24 | 00 | char | 0x00 (0) | string terminator + +0x32D0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x32D4 | 66 6E 76 31 61 5F 36 34 | char[8] | fnv1a_64 | string literal + +0x32DC | 00 | char | 0x00 (0) | string terminator padding: - +0x2F25 | 00 00 00 | uint8_t[3] | ... | padding + +0x32DD | 00 00 00 | uint8_t[3] | ... | padding string (reflection.KeyValue.key): - +0x2F28 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string - +0x2F2C | 68 61 73 68 | char[4] | hash | string literal - +0x2F30 | 00 | char | 0x00 (0) | string terminator + +0x32E0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string + +0x32E4 | 68 61 73 68 | char[4] | hash | string literal + +0x32E8 | 00 | char | 0x00 (0) | string terminator padding: - +0x2F31 | 00 00 00 | uint8_t[3] | ... | padding + +0x32E9 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Type): - +0x2F34 | 50 F8 FF FF | SOffset32 | 0xFFFFF850 (-1968) Loc: +0x36E4 | offset to vtable - +0x2F38 | 00 00 00 | uint8_t[3] | ... | padding - +0x2F3B | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) - +0x2F3C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x2F40 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x32EC | 50 F8 FF FF | SOffset32 | 0xFFFFF850 (-1968) Loc: +0x3A9C | offset to vtable + +0x32F0 | 00 00 00 | uint8_t[3] | ... | padding + +0x32F3 | 0A | uint8_t | 0x0A (10) | table field `base_type` (Byte) + +0x32F4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x32F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x2F44 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x2F48 | 69 64 | char[2] | id | string literal - +0x2F4A | 00 | char | 0x00 (0) | string terminator + +0x32FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x3300 | 69 64 | char[2] | id | string literal + +0x3302 | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x2F4C | 24 F7 FF FF | SOffset32 | 0xFFFFF724 (-2268) Loc: +0x3828 | offset to vtable - +0x2F50 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x2F78 | offset to field `name` (string) - +0x2F54 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x2F68 | offset to field `fields` (vector) - +0x2F58 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x2F5C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x2F64 | offset to field `documentation` (vector) - +0x2F60 | 00 08 00 00 | UOffset32 | 0x00000800 (2048) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x3304 | 24 F7 FF FF | SOffset32 | 0xFFFFF724 (-2268) Loc: +0x3BE0 | offset to vtable + +0x3308 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3330 | offset to field `name` (string) + +0x330C | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3320 | offset to field `fields` (vector) + +0x3310 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3314 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x331C | offset to field `documentation` (vector) + +0x3318 | 00 08 00 00 | UOffset32 | 0x00000800 (2048) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x2F64 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x331C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x2F68 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) - +0x2F6C | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x2FAC | offset to table[0] - +0x2F70 | CC 00 00 00 | UOffset32 | 0x000000CC (204) Loc: +0x303C | offset to table[1] - +0x2F74 | 98 00 00 00 | UOffset32 | 0x00000098 (152) Loc: +0x300C | offset to table[2] + +0x3320 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) + +0x3324 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3364 | offset to table[0] + +0x3328 | CC 00 00 00 | UOffset32 | 0x000000CC (204) Loc: +0x33F4 | offset to table[1] + +0x332C | 98 00 00 00 | UOffset32 | 0x00000098 (152) Loc: +0x33C4 | offset to table[2] string (reflection.Object.name): - +0x2F78 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string - +0x2F7C | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal - +0x2F84 | 78 61 6D 70 6C 65 2E 53 | | xample.S - +0x2F8C | 74 61 74 | | tat - +0x2F8F | 00 | char | 0x00 (0) | string terminator + +0x3330 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string + +0x3334 | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal + +0x333C | 78 61 6D 70 6C 65 2E 53 | | xample.S + +0x3344 | 74 61 74 | | tat + +0x3347 | 00 | char | 0x00 (0) | string terminator padding: - +0x2F90 | 00 00 | uint8_t[2] | .. | padding + +0x3348 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x2F92 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x2F94 | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x2F96 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x2F98 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x2F9A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) - +0x2F9C | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) - +0x2F9E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x2FA0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x2FA2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x2FA4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x2FA6 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) - +0x2FA8 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) - +0x2FAA | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) + +0x334A | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x334C | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x334E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x3350 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x3352 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) + +0x3354 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) + +0x3356 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3358 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x335A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x335C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x335E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) + +0x3360 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `attributes` (id: 9) + +0x3362 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x2FAC | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x2F92 | offset to vtable - +0x2FB0 | 00 00 00 | uint8_t[3] | ... | padding - +0x2FB3 | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) - +0x2FB4 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) - +0x2FB6 | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) - +0x2FB8 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x3000 | offset to field `name` (string) - +0x2FBC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x2FF0 | offset to field `type` (table) - +0x2FC0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x2FCC | offset to field `attributes` (vector) - +0x2FC4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FC8 | offset to field `documentation` (vector) + +0x3364 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x334A | offset to vtable + +0x3368 | 00 00 00 | uint8_t[3] | ... | padding + +0x336B | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) + +0x336C | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) + +0x336E | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) + +0x3370 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x33B8 | offset to field `name` (string) + +0x3374 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x33A8 | offset to field `type` (table) + +0x3378 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3384 | offset to field `attributes` (vector) + +0x337C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3380 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x2FC8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3380 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x2FCC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x2FD0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FD4 | offset to table[0] + +0x3384 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3388 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x338C | offset to table[0] table (reflection.KeyValue): - +0x2FD4 | 70 FA FF FF | SOffset32 | 0xFFFFFA70 (-1424) Loc: +0x3564 | offset to vtable - +0x2FD8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x2FE8 | offset to field `key` (string) - +0x2FDC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x2FE0 | offset to field `value` (string) + +0x338C | 70 FA FF FF | SOffset32 | 0xFFFFFA70 (-1424) Loc: +0x391C | offset to vtable + +0x3390 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x33A0 | offset to field `key` (string) + +0x3394 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3398 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x2FE0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x2FE4 | 30 | char[1] | 0 | string literal - +0x2FE5 | 00 | char | 0x00 (0) | string terminator + +0x3398 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x339C | 30 | char[1] | 0 | string literal + +0x339D | 00 | char | 0x00 (0) | string terminator padding: - +0x2FE6 | 00 00 | uint8_t[2] | .. | padding + +0x339E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x2FE8 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x2FEC | 6B 65 79 | char[3] | key | string literal - +0x2FEF | 00 | char | 0x00 (0) | string terminator + +0x33A0 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x33A4 | 6B 65 79 | char[3] | key | string literal + +0x33A7 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x2FF0 | 0C F9 FF FF | SOffset32 | 0xFFFFF90C (-1780) Loc: +0x36E4 | offset to vtable - +0x2FF4 | 00 00 00 | uint8_t[3] | ... | padding - +0x2FF7 | 06 | uint8_t | 0x06 (6) | table field `base_type` (Byte) - +0x2FF8 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) - +0x2FFC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x33A8 | 0C F9 FF FF | SOffset32 | 0xFFFFF90C (-1780) Loc: +0x3A9C | offset to vtable + +0x33AC | 00 00 00 | uint8_t[3] | ... | padding + +0x33AF | 06 | uint8_t | 0x06 (6) | table field `base_type` (Byte) + +0x33B0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) + +0x33B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3000 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x3004 | 63 6F 75 6E 74 | char[5] | count | string literal - +0x3009 | 00 | char | 0x00 (0) | string terminator + +0x33B8 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x33BC | 63 6F 75 6E 74 | char[5] | count | string literal + +0x33C1 | 00 | char | 0x00 (0) | string terminator padding: - +0x300A | 00 00 | uint8_t[2] | .. | padding + +0x33C2 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x300C | 76 FB FF FF | SOffset32 | 0xFFFFFB76 (-1162) Loc: +0x3496 | offset to vtable - +0x3010 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x3012 | 06 00 | uint16_t | 0x0006 (6) | table field `offset` (UShort) - +0x3014 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3034 | offset to field `name` (string) - +0x3018 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3024 | offset to field `type` (table) - +0x301C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3020 | offset to field `documentation` (vector) + +0x33C4 | 76 FB FF FF | SOffset32 | 0xFFFFFB76 (-1162) Loc: +0x384E | offset to vtable + +0x33C8 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x33CA | 06 00 | uint16_t | 0x0006 (6) | table field `offset` (UShort) + +0x33CC | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x33EC | offset to field `name` (string) + +0x33D0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x33DC | offset to field `type` (table) + +0x33D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x33D8 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3020 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x33D8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3024 | 40 F9 FF FF | SOffset32 | 0xFFFFF940 (-1728) Loc: +0x36E4 | offset to vtable - +0x3028 | 00 00 00 | uint8_t[3] | ... | padding - +0x302B | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) - +0x302C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x3030 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x33DC | 40 F9 FF FF | SOffset32 | 0xFFFFF940 (-1728) Loc: +0x3A9C | offset to vtable + +0x33E0 | 00 00 00 | uint8_t[3] | ... | padding + +0x33E3 | 09 | uint8_t | 0x09 (9) | table field `base_type` (Byte) + +0x33E4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x33E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3034 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x3038 | 76 61 6C | char[3] | val | string literal - +0x303B | 00 | char | 0x00 (0) | string terminator + +0x33EC | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x33F0 | 76 61 6C | char[3] | val | string literal + +0x33F3 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x303C | B8 F7 FF FF | SOffset32 | 0xFFFFF7B8 (-2120) Loc: +0x3884 | offset to vtable - +0x3040 | 00 | uint8_t[1] | . | padding - +0x3041 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x3042 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x3044 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3060 | offset to field `name` (string) - +0x3048 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3054 | offset to field `type` (table) - +0x304C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3050 | offset to field `documentation` (vector) + +0x33F4 | B8 F7 FF FF | SOffset32 | 0xFFFFF7B8 (-2120) Loc: +0x3C3C | offset to vtable + +0x33F8 | 00 | uint8_t[1] | . | padding + +0x33F9 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x33FA | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x33FC | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3418 | offset to field `name` (string) + +0x3400 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x340C | offset to field `type` (table) + +0x3404 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3408 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3050 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3408 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3054 | B8 F6 FF FF | SOffset32 | 0xFFFFF6B8 (-2376) Loc: +0x399C | offset to vtable - +0x3058 | 00 00 00 | uint8_t[3] | ... | padding - +0x305B | 0D | uint8_t | 0x0D (13) | table field `base_type` (Byte) - +0x305C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x340C | B8 F6 FF FF | SOffset32 | 0xFFFFF6B8 (-2376) Loc: +0x3D54 | offset to vtable + +0x3410 | 00 00 00 | uint8_t[3] | ... | padding + +0x3413 | 0D | uint8_t | 0x0D (13) | table field `base_type` (Byte) + +0x3414 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3060 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x3064 | 69 64 | char[2] | id | string literal - +0x3066 | 00 | char | 0x00 (0) | string terminator + +0x3418 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x341C | 69 64 | char[2] | id | string literal + +0x341E | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x3068 | 88 F7 FF FF | SOffset32 | 0xFFFFF788 (-2168) Loc: +0x38E0 | offset to vtable - +0x306C | 00 00 00 | uint8_t[3] | ... | padding - +0x306F | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x3070 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x3094 | offset to field `name` (string) - +0x3074 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x308C | offset to field `fields` (vector) - +0x3078 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) - +0x307C | 14 00 00 00 | uint32_t | 0x00000014 (20) | table field `bytesize` (Int) - +0x3080 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3088 | offset to field `documentation` (vector) - +0x3084 | DC 06 00 00 | UOffset32 | 0x000006DC (1756) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x3420 | 88 F7 FF FF | SOffset32 | 0xFFFFF788 (-2168) Loc: +0x3C98 | offset to vtable + +0x3424 | 00 00 00 | uint8_t[3] | ... | padding + +0x3427 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x3428 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x344C | offset to field `name` (string) + +0x342C | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x3444 | offset to field `fields` (vector) + +0x3430 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) + +0x3434 | 14 00 00 00 | uint32_t | 0x00000014 (20) | table field `bytesize` (Int) + +0x3438 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3440 | offset to field `documentation` (vector) + +0x343C | DC 06 00 00 | UOffset32 | 0x000006DC (1756) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3088 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3440 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x308C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x3090 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x30C0 | offset to table[0] + +0x3444 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3448 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3478 | offset to table[0] string (reflection.Object.name): - +0x3094 | 27 00 00 00 | uint32_t | 0x00000027 (39) | length of string - +0x3098 | 4D 79 47 61 6D 65 2E 45 | char[39] | MyGame.E | string literal - +0x30A0 | 78 61 6D 70 6C 65 2E 53 | | xample.S - +0x30A8 | 74 72 75 63 74 4F 66 53 | | tructOfS - +0x30B0 | 74 72 75 63 74 73 4F 66 | | tructsOf - +0x30B8 | 53 74 72 75 63 74 73 | | Structs - +0x30BF | 00 | char | 0x00 (0) | string terminator + +0x344C | 27 00 00 00 | uint32_t | 0x00000027 (39) | length of string + +0x3450 | 4D 79 47 61 6D 65 2E 45 | char[39] | MyGame.E | string literal + +0x3458 | 78 61 6D 70 6C 65 2E 53 | | xample.S + +0x3460 | 74 72 75 63 74 4F 66 53 | | tructOfS + +0x3468 | 74 72 75 63 74 73 4F 66 | | tructsOf + +0x3470 | 53 74 72 75 63 74 73 | | Structs + +0x3477 | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x30C0 | F4 FE FF FF | SOffset32 | 0xFFFFFEF4 (-268) Loc: +0x31CC | offset to vtable - +0x30C4 | 00 00 00 | uint8_t[3] | ... | padding - +0x30C7 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x30C8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x30E8 | offset to field `name` (string) - +0x30CC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x30D8 | offset to field `type` (table) - +0x30D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x30D4 | offset to field `documentation` (vector) + +0x3478 | F4 FE FF FF | SOffset32 | 0xFFFFFEF4 (-268) Loc: +0x3584 | offset to vtable + +0x347C | 00 00 00 | uint8_t[3] | ... | padding + +0x347F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x3480 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x34A0 | offset to field `name` (string) + +0x3484 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3490 | offset to field `type` (table) + +0x3488 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x348C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x30D4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x348C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x30D8 | 20 F8 FF FF | SOffset32 | 0xFFFFF820 (-2016) Loc: +0x38B8 | offset to vtable - +0x30DC | 00 00 00 | uint8_t[3] | ... | padding - +0x30DF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x30E0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) - +0x30E4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3490 | 20 F8 FF FF | SOffset32 | 0xFFFFF820 (-2016) Loc: +0x3C70 | offset to vtable + +0x3494 | 00 00 00 | uint8_t[3] | ... | padding + +0x3497 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3498 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `index` (Int) + +0x349C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x30E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x30EC | 61 | char[1] | a | string literal - +0x30ED | 00 | char | 0x00 (0) | string terminator + +0x34A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x34A4 | 61 | char[1] | a | string literal + +0x34A5 | 00 | char | 0x00 (0) | string terminator padding: - +0x30EE | 00 00 | uint8_t[2] | .. | padding + +0x34A6 | 00 00 | uint8_t[2] | .. | padding table (reflection.Object): - +0x30F0 | 10 F8 FF FF | SOffset32 | 0xFFFFF810 (-2032) Loc: +0x38E0 | offset to vtable - +0x30F4 | 00 00 00 | uint8_t[3] | ... | padding - +0x30F7 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x30F8 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x3124 | offset to field `name` (string) - +0x30FC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x3114 | offset to field `fields` (vector) - +0x3100 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) - +0x3104 | 14 00 00 00 | uint32_t | 0x00000014 (20) | table field `bytesize` (Int) - +0x3108 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3110 | offset to field `documentation` (vector) - +0x310C | 54 06 00 00 | UOffset32 | 0x00000654 (1620) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x34A8 | 10 F8 FF FF | SOffset32 | 0xFFFFF810 (-2032) Loc: +0x3C98 | offset to vtable + +0x34AC | 00 00 00 | uint8_t[3] | ... | padding + +0x34AF | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x34B0 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x34DC | offset to field `name` (string) + +0x34B4 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x34CC | offset to field `fields` (vector) + +0x34B8 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) + +0x34BC | 14 00 00 00 | uint32_t | 0x00000014 (20) | table field `bytesize` (Int) + +0x34C0 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x34C8 | offset to field `documentation` (vector) + +0x34C4 | 54 06 00 00 | UOffset32 | 0x00000654 (1620) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3110 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x34C8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x3114 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) - +0x3118 | D0 00 00 00 | UOffset32 | 0x000000D0 (208) Loc: +0x31E8 | offset to table[0] - +0x311C | 7C 00 00 00 | UOffset32 | 0x0000007C (124) Loc: +0x3198 | offset to table[1] - +0x3120 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3148 | offset to table[2] + +0x34CC | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of vector (# items) + +0x34D0 | D0 00 00 00 | UOffset32 | 0x000000D0 (208) Loc: +0x35A0 | offset to table[0] + +0x34D4 | 7C 00 00 00 | UOffset32 | 0x0000007C (124) Loc: +0x3550 | offset to table[1] + +0x34D8 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3500 | offset to table[2] string (reflection.Object.name): - +0x3124 | 1E 00 00 00 | uint32_t | 0x0000001E (30) | length of string - +0x3128 | 4D 79 47 61 6D 65 2E 45 | char[30] | MyGame.E | string literal - +0x3130 | 78 61 6D 70 6C 65 2E 53 | | xample.S - +0x3138 | 74 72 75 63 74 4F 66 53 | | tructOfS - +0x3140 | 74 72 75 63 74 73 | | tructs - +0x3146 | 00 | char | 0x00 (0) | string terminator + +0x34DC | 1E 00 00 00 | uint32_t | 0x0000001E (30) | length of string + +0x34E0 | 4D 79 47 61 6D 65 2E 45 | char[30] | MyGame.E | string literal + +0x34E8 | 78 61 6D 70 6C 65 2E 53 | | xample.S + +0x34F0 | 74 72 75 63 74 4F 66 53 | | tructOfS + +0x34F8 | 74 72 75 63 74 73 | | tructs + +0x34FE | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x3148 | CC FF FF FF | SOffset32 | 0xFFFFFFCC (-52) Loc: +0x317C | offset to vtable - +0x314C | 00 00 00 | uint8_t[3] | ... | padding - +0x314F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x3150 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) - +0x3152 | 0C 00 | uint16_t | 0x000C (12) | table field `offset` (UShort) - +0x3154 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3174 | offset to field `name` (string) - +0x3158 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3164 | offset to field `type` (table) - +0x315C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3160 | offset to field `documentation` (vector) + +0x3500 | CC FF FF FF | SOffset32 | 0xFFFFFFCC (-52) Loc: +0x3534 | offset to vtable + +0x3504 | 00 00 00 | uint8_t[3] | ... | padding + +0x3507 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x3508 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) + +0x350A | 0C 00 | uint16_t | 0x000C (12) | table field `offset` (UShort) + +0x350C | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x352C | offset to field `name` (string) + +0x3510 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x351C | offset to field `type` (table) + +0x3514 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3518 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3160 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3518 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3164 | AC F8 FF FF | SOffset32 | 0xFFFFF8AC (-1876) Loc: +0x38B8 | offset to vtable - +0x3168 | 00 00 00 | uint8_t[3] | ... | padding - +0x316B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x316C | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) - +0x3170 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x351C | AC F8 FF FF | SOffset32 | 0xFFFFF8AC (-1876) Loc: +0x3C70 | offset to vtable + +0x3520 | 00 00 00 | uint8_t[3] | ... | padding + +0x3523 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3524 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) + +0x3528 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3174 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3178 | 63 | char[1] | c | string literal - +0x3179 | 00 | char | 0x00 (0) | string terminator + +0x352C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3530 | 63 | char[1] | c | string literal + +0x3531 | 00 | char | 0x00 (0) | string terminator padding: - +0x317A | 00 00 | uint8_t[2] | .. | padding + +0x3532 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x317C | 1C 00 | uint16_t | 0x001C (28) | size of this vtable - +0x317E | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x3180 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x3182 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x3184 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) - +0x3186 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) - +0x3188 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x318A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x318C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x318E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x3190 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x3192 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x3194 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) - +0x3196 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) + +0x3534 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable + +0x3536 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x3538 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x353A | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x353C | 08 00 | VOffset16 | 0x0008 (8) | offset to field `id` (id: 2) + +0x353E | 0A 00 | VOffset16 | 0x000A (10) | offset to field `offset` (id: 3) + +0x3540 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3542 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3544 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3546 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3548 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x354A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x354C | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x354E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) table (reflection.Field): - +0x3198 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x317C | offset to vtable - +0x319C | 00 00 00 | uint8_t[3] | ... | padding - +0x319F | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x31A0 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x31A2 | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) - +0x31A4 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x31C4 | offset to field `name` (string) - +0x31A8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x31B4 | offset to field `type` (table) - +0x31AC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x31B0 | offset to field `documentation` (vector) + +0x3550 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x3534 | offset to vtable + +0x3554 | 00 00 00 | uint8_t[3] | ... | padding + +0x3557 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x3558 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x355A | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) + +0x355C | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x357C | offset to field `name` (string) + +0x3560 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x356C | offset to field `type` (table) + +0x3564 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3568 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x31B0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3568 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x31B4 | FC F8 FF FF | SOffset32 | 0xFFFFF8FC (-1796) Loc: +0x38B8 | offset to vtable - +0x31B8 | 00 00 00 | uint8_t[3] | ... | padding - +0x31BB | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x31BC | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) - +0x31C0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x356C | FC F8 FF FF | SOffset32 | 0xFFFFF8FC (-1796) Loc: +0x3C70 | offset to vtable + +0x3570 | 00 00 00 | uint8_t[3] | ... | padding + +0x3573 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3574 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) + +0x3578 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x31C4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x31C8 | 62 | char[1] | b | string literal - +0x31C9 | 00 | char | 0x00 (0) | string terminator + +0x357C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3580 | 62 | char[1] | b | string literal + +0x3581 | 00 | char | 0x00 (0) | string terminator padding: - +0x31CA | 00 00 | uint8_t[2] | .. | padding + +0x3582 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x31CC | 1C 00 | uint16_t | 0x001C (28) | size of this vtable - +0x31CE | 14 00 | uint16_t | 0x0014 (20) | size of referring table - +0x31D0 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x31D2 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x31D4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x31D6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) - +0x31D8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x31DA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x31DC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x31DE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x31E0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x31E2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x31E4 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) - +0x31E6 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) + +0x3584 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable + +0x3586 | 14 00 | uint16_t | 0x0014 (20) | size of referring table + +0x3588 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x358A | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x358C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x358E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) + +0x3590 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3592 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3594 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3596 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3598 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x359A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x359C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) + +0x359E | 07 00 | VOffset16 | 0x0007 (7) | offset to field `optional` (id: 11) table (reflection.Field): - +0x31E8 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x31CC | offset to vtable - +0x31EC | 00 00 00 | uint8_t[3] | ... | padding - +0x31EF | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x31F0 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3210 | offset to field `name` (string) - +0x31F4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3200 | offset to field `type` (table) - +0x31F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x31FC | offset to field `documentation` (vector) + +0x35A0 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x3584 | offset to vtable + +0x35A4 | 00 00 00 | uint8_t[3] | ... | padding + +0x35A7 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x35A8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x35C8 | offset to field `name` (string) + +0x35AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x35B8 | offset to field `type` (table) + +0x35B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x35B4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x31FC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x35B4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3200 | 48 F9 FF FF | SOffset32 | 0xFFFFF948 (-1720) Loc: +0x38B8 | offset to vtable - +0x3204 | 00 00 00 | uint8_t[3] | ... | padding - +0x3207 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x3208 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) - +0x320C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x35B8 | 48 F9 FF FF | SOffset32 | 0xFFFFF948 (-1720) Loc: +0x3C70 | offset to vtable + +0x35BC | 00 00 00 | uint8_t[3] | ... | padding + +0x35BF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x35C0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | table field `index` (Int) + +0x35C4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3210 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3214 | 61 | char[1] | a | string literal - +0x3215 | 00 | char | 0x00 (0) | string terminator + +0x35C8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x35CC | 61 | char[1] | a | string literal + +0x35CD | 00 | char | 0x00 (0) | string terminator padding: - +0x3216 | 00 00 | uint8_t[2] | .. | padding + +0x35CE | 00 00 | uint8_t[2] | .. | padding table (reflection.Object): - +0x3218 | 38 F9 FF FF | SOffset32 | 0xFFFFF938 (-1736) Loc: +0x38E0 | offset to vtable - +0x321C | 00 00 00 | uint8_t[3] | ... | padding - +0x321F | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x3220 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3248 | offset to field `name` (string) - +0x3224 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x323C | offset to field `fields` (vector) - +0x3228 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) - +0x322C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `bytesize` (Int) - +0x3230 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3238 | offset to field `documentation` (vector) - +0x3234 | 2C 05 00 00 | UOffset32 | 0x0000052C (1324) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x35D0 | 38 F9 FF FF | SOffset32 | 0xFFFFF938 (-1736) Loc: +0x3C98 | offset to vtable + +0x35D4 | 00 00 00 | uint8_t[3] | ... | padding + +0x35D7 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x35D8 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3600 | offset to field `name` (string) + +0x35DC | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x35F4 | offset to field `fields` (vector) + +0x35E0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) + +0x35E4 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `bytesize` (Int) + +0x35E8 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x35F0 | offset to field `documentation` (vector) + +0x35EC | 2C 05 00 00 | UOffset32 | 0x0000052C (1324) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3238 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x35F0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x323C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x3240 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x3264 | offset to table[0] - +0x3244 | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x32B0 | offset to table[1] + +0x35F4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x35F8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x361C | offset to table[0] + +0x35FC | 6C 00 00 00 | UOffset32 | 0x0000006C (108) Loc: +0x3668 | offset to table[1] string (reflection.Object.name): - +0x3248 | 16 00 00 00 | uint32_t | 0x00000016 (22) | length of string - +0x324C | 4D 79 47 61 6D 65 2E 45 | char[22] | MyGame.E | string literal - +0x3254 | 78 61 6D 70 6C 65 2E 41 | | xample.A - +0x325C | 62 69 6C 69 74 79 | | bility - +0x3262 | 00 | char | 0x00 (0) | string terminator + +0x3600 | 16 00 00 00 | uint32_t | 0x00000016 (22) | length of string + +0x3604 | 4D 79 47 61 6D 65 2E 45 | char[22] | MyGame.E | string literal + +0x360C | 78 61 6D 70 6C 65 2E 41 | | xample.A + +0x3614 | 62 69 6C 69 74 79 | | bility + +0x361A | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x3264 | CE FD FF FF | SOffset32 | 0xFFFFFDCE (-562) Loc: +0x3496 | offset to vtable - +0x3268 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x326A | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x326C | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3288 | offset to field `name` (string) - +0x3270 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x327C | offset to field `type` (table) - +0x3274 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3278 | offset to field `documentation` (vector) + +0x361C | CE FD FF FF | SOffset32 | 0xFFFFFDCE (-562) Loc: +0x384E | offset to vtable + +0x3620 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x3622 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x3624 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3640 | offset to field `name` (string) + +0x3628 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3634 | offset to field `type` (table) + +0x362C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3630 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3278 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3630 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x327C | E0 F8 FF FF | SOffset32 | 0xFFFFF8E0 (-1824) Loc: +0x399C | offset to vtable - +0x3280 | 00 00 00 | uint8_t[3] | ... | padding - +0x3283 | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) - +0x3284 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3634 | E0 F8 FF FF | SOffset32 | 0xFFFFF8E0 (-1824) Loc: +0x3D54 | offset to vtable + +0x3638 | 00 00 00 | uint8_t[3] | ... | padding + +0x363B | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) + +0x363C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3288 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string - +0x328C | 64 69 73 74 61 6E 63 65 | char[8] | distance | string literal - +0x3294 | 00 | char | 0x00 (0) | string terminator + +0x3640 | 08 00 00 00 | uint32_t | 0x00000008 (8) | length of string + +0x3644 | 64 69 73 74 61 6E 63 65 | char[8] | distance | string literal + +0x364C | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x3296 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x3298 | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x329A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x329C | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x329E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x32A0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) - +0x32A2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x32A4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x32A6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x32A8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x32AA | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) - +0x32AC | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) - +0x32AE | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x364E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3650 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x3652 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3654 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x3656 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x3658 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) + +0x365A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x365C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x365E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3660 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3662 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `key` (id: 8) + +0x3664 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 9) + +0x3666 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x32B0 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3296 | offset to vtable - +0x32B4 | 00 00 00 | uint8_t[3] | ... | padding - +0x32B7 | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) - +0x32B8 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x32FC | offset to field `name` (string) - +0x32BC | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x32F0 | offset to field `type` (table) - +0x32C0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x32CC | offset to field `attributes` (vector) - +0x32C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32C8 | offset to field `documentation` (vector) + +0x3668 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x364E | offset to vtable + +0x366C | 00 00 00 | uint8_t[3] | ... | padding + +0x366F | 01 | uint8_t | 0x01 (1) | table field `key` (Bool) + +0x3670 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x36B4 | offset to field `name` (string) + +0x3674 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x36A8 | offset to field `type` (table) + +0x3678 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3684 | offset to field `attributes` (vector) + +0x367C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3680 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x32C8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3680 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Field.attributes): - +0x32CC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x32D0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32D4 | offset to table[0] + +0x3684 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3688 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x368C | offset to table[0] table (reflection.KeyValue): - +0x32D4 | 70 FD FF FF | SOffset32 | 0xFFFFFD70 (-656) Loc: +0x3564 | offset to vtable - +0x32D8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x32E8 | offset to field `key` (string) - +0x32DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x32E0 | offset to field `value` (string) + +0x368C | 70 FD FF FF | SOffset32 | 0xFFFFFD70 (-656) Loc: +0x391C | offset to vtable + +0x3690 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x36A0 | offset to field `key` (string) + +0x3694 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3698 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x32E0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x32E4 | 30 | char[1] | 0 | string literal - +0x32E5 | 00 | char | 0x00 (0) | string terminator + +0x3698 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x369C | 30 | char[1] | 0 | string literal + +0x369D | 00 | char | 0x00 (0) | string terminator padding: - +0x32E6 | 00 00 | uint8_t[2] | .. | padding + +0x369E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x32E8 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string - +0x32EC | 6B 65 79 | char[3] | key | string literal - +0x32EF | 00 | char | 0x00 (0) | string terminator + +0x36A0 | 03 00 00 00 | uint32_t | 0x00000003 (3) | length of string + +0x36A4 | 6B 65 79 | char[3] | key | string literal + +0x36A7 | 00 | char | 0x00 (0) | string terminator table (reflection.Type): - +0x32F0 | 54 F9 FF FF | SOffset32 | 0xFFFFF954 (-1708) Loc: +0x399C | offset to vtable - +0x32F4 | 00 00 00 | uint8_t[3] | ... | padding - +0x32F7 | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) - +0x32F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x36A8 | 54 F9 FF FF | SOffset32 | 0xFFFFF954 (-1708) Loc: +0x3D54 | offset to vtable + +0x36AC | 00 00 00 | uint8_t[3] | ... | padding + +0x36AF | 08 | uint8_t | 0x08 (8) | table field `base_type` (Byte) + +0x36B0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x32FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string - +0x3300 | 69 64 | char[2] | id | string literal - +0x3302 | 00 | char | 0x00 (0) | string terminator + +0x36B4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of string + +0x36B8 | 69 64 | char[2] | id | string literal + +0x36BA | 00 | char | 0x00 (0) | string terminator vtable (reflection.Object): - +0x3304 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable - +0x3306 | 24 00 | uint16_t | 0x0024 (36) | size of referring table - +0x3308 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x330A | 0C 00 | VOffset16 | 0x000C (12) | offset to field `fields` (id: 1) - +0x330C | 07 00 | VOffset16 | 0x0007 (7) | offset to field `is_struct` (id: 2) - +0x330E | 10 00 | VOffset16 | 0x0010 (16) | offset to field `minalign` (id: 3) - +0x3310 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `bytesize` (id: 4) - +0x3312 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `attributes` (id: 5) - +0x3314 | 1C 00 | VOffset16 | 0x001C (28) | offset to field `documentation` (id: 6) - +0x3316 | 20 00 | VOffset16 | 0x0020 (32) | offset to field `declaration_file` (id: 7) + +0x36BC | 14 00 | uint16_t | 0x0014 (20) | size of this vtable + +0x36BE | 24 00 | uint16_t | 0x0024 (36) | size of referring table + +0x36C0 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x36C2 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `fields` (id: 1) + +0x36C4 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `is_struct` (id: 2) + +0x36C6 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `minalign` (id: 3) + +0x36C8 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `bytesize` (id: 4) + +0x36CA | 18 00 | VOffset16 | 0x0018 (24) | offset to field `attributes` (id: 5) + +0x36CC | 1C 00 | VOffset16 | 0x001C (28) | offset to field `documentation` (id: 6) + +0x36CE | 20 00 | VOffset16 | 0x0020 (32) | offset to field `declaration_file` (id: 7) table (reflection.Object): - +0x3318 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x3304 | offset to vtable - +0x331C | 00 00 00 | uint8_t[3] | ... | padding - +0x331F | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x3320 | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x3388 | offset to field `name` (string) - +0x3324 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x336C | offset to field `fields` (vector) - +0x3328 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `minalign` (Int) - +0x332C | 20 00 00 00 | uint32_t | 0x00000020 (32) | table field `bytesize` (Int) - +0x3330 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3340 | offset to field `attributes` (vector) - +0x3334 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x333C | offset to field `documentation` (vector) - +0x3338 | 28 04 00 00 | UOffset32 | 0x00000428 (1064) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x36D0 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x36BC | offset to vtable + +0x36D4 | 00 00 00 | uint8_t[3] | ... | padding + +0x36D7 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x36D8 | 68 00 00 00 | UOffset32 | 0x00000068 (104) Loc: +0x3740 | offset to field `name` (string) + +0x36DC | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x3724 | offset to field `fields` (vector) + +0x36E0 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `minalign` (Int) + +0x36E4 | 20 00 00 00 | uint32_t | 0x00000020 (32) | table field `bytesize` (Int) + +0x36E8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x36F8 | offset to field `attributes` (vector) + +0x36EC | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x36F4 | offset to field `documentation` (vector) + +0x36F0 | 28 04 00 00 | UOffset32 | 0x00000428 (1064) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x333C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x36F4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.attributes): - +0x3340 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x3344 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3348 | offset to table[0] + +0x36F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x36FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3700 | offset to table[0] table (reflection.KeyValue): - +0x3348 | E4 FD FF FF | SOffset32 | 0xFFFFFDE4 (-540) Loc: +0x3564 | offset to vtable - +0x334C | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x335C | offset to field `key` (string) - +0x3350 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3354 | offset to field `value` (string) + +0x3700 | E4 FD FF FF | SOffset32 | 0xFFFFFDE4 (-540) Loc: +0x391C | offset to vtable + +0x3704 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3714 | offset to field `key` (string) + +0x3708 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x370C | offset to field `value` (string) string (reflection.KeyValue.value): - +0x3354 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3358 | 38 | char[1] | 8 | string literal - +0x3359 | 00 | char | 0x00 (0) | string terminator + +0x370C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3710 | 38 | char[1] | 8 | string literal + +0x3711 | 00 | char | 0x00 (0) | string terminator padding: - +0x335A | 00 00 | uint8_t[2] | .. | padding + +0x3712 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x335C | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string - +0x3360 | 66 6F 72 63 65 5F 61 6C | char[11] | force_al | string literal - +0x3368 | 69 67 6E | | ign - +0x336B | 00 | char | 0x00 (0) | string terminator + +0x3714 | 0B 00 00 00 | uint32_t | 0x0000000B (11) | length of string + +0x3718 | 66 6F 72 63 65 5F 61 6C | char[11] | force_al | string literal + +0x3720 | 69 67 6E | | ign + +0x3723 | 00 | char | 0x00 (0) | string terminator vector (reflection.Object.fields): - +0x336C | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of vector (# items) - +0x3370 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x3434 | offset to table[0] - +0x3374 | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x33F8 | offset to table[1] - +0x3378 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x33C0 | offset to table[2] - +0x337C | 60 01 00 00 | UOffset32 | 0x00000160 (352) Loc: +0x34DC | offset to table[3] - +0x3380 | 30 01 00 00 | UOffset32 | 0x00000130 (304) Loc: +0x34B0 | offset to table[4] - +0x3384 | E4 00 00 00 | UOffset32 | 0x000000E4 (228) Loc: +0x3468 | offset to table[5] + +0x3724 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of vector (# items) + +0x3728 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x37EC | offset to table[0] + +0x372C | 84 00 00 00 | UOffset32 | 0x00000084 (132) Loc: +0x37B0 | offset to table[1] + +0x3730 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x3778 | offset to table[2] + +0x3734 | 60 01 00 00 | UOffset32 | 0x00000160 (352) Loc: +0x3894 | offset to table[3] + +0x3738 | 30 01 00 00 | UOffset32 | 0x00000130 (304) Loc: +0x3868 | offset to table[4] + +0x373C | E4 00 00 00 | UOffset32 | 0x000000E4 (228) Loc: +0x3820 | offset to table[5] string (reflection.Object.name): - +0x3388 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string - +0x338C | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal - +0x3394 | 78 61 6D 70 6C 65 2E 56 | | xample.V - +0x339C | 65 63 33 | | ec3 - +0x339F | 00 | char | 0x00 (0) | string terminator + +0x3740 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string + +0x3744 | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal + +0x374C | 78 61 6D 70 6C 65 2E 56 | | xample.V + +0x3754 | 65 63 33 | | ec3 + +0x3757 | 00 | char | 0x00 (0) | string terminator padding: - +0x33A0 | 00 00 | uint8_t[2] | .. | padding + +0x3758 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x33A2 | 1E 00 | uint16_t | 0x001E (30) | size of this vtable - +0x33A4 | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x33A6 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x33A8 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x33AA | 06 00 | VOffset16 | 0x0006 (6) | offset to field `id` (id: 2) - +0x33AC | 08 00 | VOffset16 | 0x0008 (8) | offset to field `offset` (id: 3) - +0x33AE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x33B0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x33B2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x33B4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x33B6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x33B8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x33BA | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) - +0x33BC | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) - +0x33BE | 0A 00 | VOffset16 | 0x000A (10) | offset to field `padding` (id: 12) + +0x375A | 1E 00 | uint16_t | 0x001E (30) | size of this vtable + +0x375C | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x375E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x3760 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x3762 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `id` (id: 2) + +0x3764 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `offset` (id: 3) + +0x3766 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3768 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x376A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x376C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x376E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3770 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x3772 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x3774 | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) + +0x3776 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `padding` (id: 12) table (reflection.Field): - +0x33C0 | 1E 00 00 00 | SOffset32 | 0x0000001E (30) Loc: +0x33A2 | offset to vtable - +0x33C4 | 00 | uint8_t[1] | . | padding - +0x33C5 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x33C6 | 05 00 | uint16_t | 0x0005 (5) | table field `id` (UShort) - +0x33C8 | 1A 00 | uint16_t | 0x001A (26) | table field `offset` (UShort) - +0x33CA | 02 00 | uint16_t | 0x0002 (2) | table field `padding` (UShort) - +0x33CC | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x33EC | offset to field `name` (string) - +0x33D0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x33DC | offset to field `type` (table) - +0x33D4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x33D8 | offset to field `documentation` (vector) + +0x3778 | 1E 00 00 00 | SOffset32 | 0x0000001E (30) Loc: +0x375A | offset to vtable + +0x377C | 00 | uint8_t[1] | . | padding + +0x377D | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x377E | 05 00 | uint16_t | 0x0005 (5) | table field `id` (UShort) + +0x3780 | 1A 00 | uint16_t | 0x001A (26) | table field `offset` (UShort) + +0x3782 | 02 00 | uint16_t | 0x0002 (2) | table field `padding` (UShort) + +0x3784 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x37A4 | offset to field `name` (string) + +0x3788 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3794 | offset to field `type` (table) + +0x378C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3790 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x33D8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3790 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x33DC | 24 FB FF FF | SOffset32 | 0xFFFFFB24 (-1244) Loc: +0x38B8 | offset to vtable - +0x33E0 | 00 00 00 | uint8_t[3] | ... | padding - +0x33E3 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x33E4 | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) - +0x33E8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3794 | 24 FB FF FF | SOffset32 | 0xFFFFFB24 (-1244) Loc: +0x3C70 | offset to vtable + +0x3798 | 00 00 00 | uint8_t[3] | ... | padding + +0x379B | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x379C | 06 00 00 00 | uint32_t | 0x00000006 (6) | table field `index` (Int) + +0x37A0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x33EC | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x33F0 | 74 65 73 74 33 | char[5] | test3 | string literal - +0x33F5 | 00 | char | 0x00 (0) | string terminator + +0x37A4 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x37A8 | 74 65 73 74 33 | char[5] | test3 | string literal + +0x37AD | 00 | char | 0x00 (0) | string terminator padding: - +0x33F6 | 00 00 | uint8_t[2] | .. | padding + +0x37AE | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x33F8 | 7A FD FF FF | SOffset32 | 0xFFFFFD7A (-646) Loc: +0x367E | offset to vtable - +0x33FC | 00 00 | uint8_t[2] | .. | padding - +0x33FE | 04 00 | uint16_t | 0x0004 (4) | table field `id` (UShort) - +0x3400 | 18 00 | uint16_t | 0x0018 (24) | table field `offset` (UShort) - +0x3402 | 01 00 | uint16_t | 0x0001 (1) | table field `padding` (UShort) - +0x3404 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x3428 | offset to field `name` (string) - +0x3408 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3414 | offset to field `type` (table) - +0x340C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3410 | offset to field `documentation` (vector) + +0x37B0 | 7A FD FF FF | SOffset32 | 0xFFFFFD7A (-646) Loc: +0x3A36 | offset to vtable + +0x37B4 | 00 00 | uint8_t[2] | .. | padding + +0x37B6 | 04 00 | uint16_t | 0x0004 (4) | table field `id` (UShort) + +0x37B8 | 18 00 | uint16_t | 0x0018 (24) | table field `offset` (UShort) + +0x37BA | 01 00 | uint16_t | 0x0001 (1) | table field `padding` (UShort) + +0x37BC | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x37E0 | offset to field `name` (string) + +0x37C0 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x37CC | offset to field `type` (table) + +0x37C4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x37C8 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3410 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x37C8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3414 | 10 FE FF FF | SOffset32 | 0xFFFFFE10 (-496) Loc: +0x3604 | offset to vtable - +0x3418 | 00 00 00 | uint8_t[3] | ... | padding - +0x341B | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) - +0x341C | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x3420 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x3424 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x37CC | 10 FE FF FF | SOffset32 | 0xFFFFFE10 (-496) Loc: +0x39BC | offset to vtable + +0x37D0 | 00 00 00 | uint8_t[3] | ... | padding + +0x37D3 | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) + +0x37D4 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x37D8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x37DC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3428 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x342C | 74 65 73 74 32 | char[5] | test2 | string literal - +0x3431 | 00 | char | 0x00 (0) | string terminator + +0x37E0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x37E4 | 74 65 73 74 32 | char[5] | test2 | string literal + +0x37E9 | 00 | char | 0x00 (0) | string terminator padding: - +0x3432 | 00 00 | uint8_t[2] | .. | padding + +0x37EA | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x3434 | 9E FF FF FF | SOffset32 | 0xFFFFFF9E (-98) Loc: +0x3496 | offset to vtable - +0x3438 | 03 00 | uint16_t | 0x0003 (3) | table field `id` (UShort) - +0x343A | 10 00 | uint16_t | 0x0010 (16) | table field `offset` (UShort) - +0x343C | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x345C | offset to field `name` (string) - +0x3440 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x344C | offset to field `type` (table) - +0x3444 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3448 | offset to field `documentation` (vector) + +0x37EC | 9E FF FF FF | SOffset32 | 0xFFFFFF9E (-98) Loc: +0x384E | offset to vtable + +0x37F0 | 03 00 | uint16_t | 0x0003 (3) | table field `id` (UShort) + +0x37F2 | 10 00 | uint16_t | 0x0010 (16) | table field `offset` (UShort) + +0x37F4 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3814 | offset to field `name` (string) + +0x37F8 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3804 | offset to field `type` (table) + +0x37FC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3800 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3448 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3800 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x344C | 68 FD FF FF | SOffset32 | 0xFFFFFD68 (-664) Loc: +0x36E4 | offset to vtable - +0x3450 | 00 00 00 | uint8_t[3] | ... | padding - +0x3453 | 0C | uint8_t | 0x0C (12) | table field `base_type` (Byte) - +0x3454 | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) - +0x3458 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3804 | 68 FD FF FF | SOffset32 | 0xFFFFFD68 (-664) Loc: +0x3A9C | offset to vtable + +0x3808 | 00 00 00 | uint8_t[3] | ... | padding + +0x380B | 0C | uint8_t | 0x0C (12) | table field `base_type` (Byte) + +0x380C | 08 00 00 00 | uint32_t | 0x00000008 (8) | table field `base_size` (UInt) + +0x3810 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x345C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x3460 | 74 65 73 74 31 | char[5] | test1 | string literal - +0x3465 | 00 | char | 0x00 (0) | string terminator + +0x3814 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x3818 | 74 65 73 74 31 | char[5] | test1 | string literal + +0x381D | 00 | char | 0x00 (0) | string terminator padding: - +0x3466 | 00 00 | uint8_t[2] | .. | padding + +0x381E | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x3468 | EA FD FF FF | SOffset32 | 0xFFFFFDEA (-534) Loc: +0x367E | offset to vtable - +0x346C | 00 00 | uint8_t[2] | .. | padding - +0x346E | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) - +0x3470 | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) - +0x3472 | 04 00 | uint16_t | 0x0004 (4) | table field `padding` (UShort) - +0x3474 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3490 | offset to field `name` (string) - +0x3478 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3484 | offset to field `type` (table) - +0x347C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3480 | offset to field `documentation` (vector) + +0x3820 | EA FD FF FF | SOffset32 | 0xFFFFFDEA (-534) Loc: +0x3A36 | offset to vtable + +0x3824 | 00 00 | uint8_t[2] | .. | padding + +0x3826 | 02 00 | uint16_t | 0x0002 (2) | table field `id` (UShort) + +0x3828 | 08 00 | uint16_t | 0x0008 (8) | table field `offset` (UShort) + +0x382A | 04 00 | uint16_t | 0x0004 (4) | table field `padding` (UShort) + +0x382C | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3848 | offset to field `name` (string) + +0x3830 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x383C | offset to field `type` (table) + +0x3834 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3838 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3480 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3838 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3484 | E8 FA FF FF | SOffset32 | 0xFFFFFAE8 (-1304) Loc: +0x399C | offset to vtable - +0x3488 | 00 00 00 | uint8_t[3] | ... | padding - +0x348B | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x348C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x383C | E8 FA FF FF | SOffset32 | 0xFFFFFAE8 (-1304) Loc: +0x3D54 | offset to vtable + +0x3840 | 00 00 00 | uint8_t[3] | ... | padding + +0x3843 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x3844 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3490 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3494 | 7A | char[1] | z | string literal - +0x3495 | 00 | char | 0x00 (0) | string terminator + +0x3848 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x384C | 7A | char[1] | z | string literal + +0x384D | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x3496 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x3498 | 14 00 | uint16_t | 0x0014 (20) | size of referring table - +0x349A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x349C | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x349E | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) - +0x34A0 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x34A2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x34A4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x34A6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x34A8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x34AA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x34AC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x34AE | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) + +0x384E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3850 | 14 00 | uint16_t | 0x0014 (20) | size of referring table + +0x3852 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3854 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x3856 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 2) + +0x3858 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x385A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x385C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x385E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3860 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3862 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3864 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x3866 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x34B0 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3496 | offset to vtable - +0x34B4 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x34B6 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x34B8 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x34D4 | offset to field `name` (string) - +0x34BC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x34C8 | offset to field `type` (table) - +0x34C0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x34C4 | offset to field `documentation` (vector) + +0x3868 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x384E | offset to vtable + +0x386C | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x386E | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x3870 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x388C | offset to field `name` (string) + +0x3874 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3880 | offset to field `type` (table) + +0x3878 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x387C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x34C4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x387C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x34C8 | 2C FB FF FF | SOffset32 | 0xFFFFFB2C (-1236) Loc: +0x399C | offset to vtable - +0x34CC | 00 00 00 | uint8_t[3] | ... | padding - +0x34CF | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x34D0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3880 | 2C FB FF FF | SOffset32 | 0xFFFFFB2C (-1236) Loc: +0x3D54 | offset to vtable + +0x3884 | 00 00 00 | uint8_t[3] | ... | padding + +0x3887 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x3888 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x34D4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x34D8 | 79 | char[1] | y | string literal - +0x34D9 | 00 | char | 0x00 (0) | string terminator + +0x388C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3890 | 79 | char[1] | y | string literal + +0x3891 | 00 | char | 0x00 (0) | string terminator padding: - +0x34DA | 00 00 | uint8_t[2] | .. | padding + +0x3892 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x34DC | 6E FB FF FF | SOffset32 | 0xFFFFFB6E (-1170) Loc: +0x396E | offset to vtable - +0x34E0 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x34FC | offset to field `name` (string) - +0x34E4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x34F0 | offset to field `type` (table) - +0x34E8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x34EC | offset to field `documentation` (vector) + +0x3894 | 6E FB FF FF | SOffset32 | 0xFFFFFB6E (-1170) Loc: +0x3D26 | offset to vtable + +0x3898 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x38B4 | offset to field `name` (string) + +0x389C | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x38A8 | offset to field `type` (table) + +0x38A0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x38A4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x34EC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x38A4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x34F0 | 54 FB FF FF | SOffset32 | 0xFFFFFB54 (-1196) Loc: +0x399C | offset to vtable - +0x34F4 | 00 00 00 | uint8_t[3] | ... | padding - +0x34F7 | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) - +0x34F8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x38A8 | 54 FB FF FF | SOffset32 | 0xFFFFFB54 (-1196) Loc: +0x3D54 | offset to vtable + +0x38AC | 00 00 00 | uint8_t[3] | ... | padding + +0x38AF | 0B | uint8_t | 0x0B (11) | table field `base_type` (Byte) + +0x38B0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x34FC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3500 | 78 | char[1] | x | string literal - +0x3501 | 00 | char | 0x00 (0) | string terminator + +0x38B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x38B8 | 78 | char[1] | x | string literal + +0x38B9 | 00 | char | 0x00 (0) | string terminator padding: - +0x3502 | 00 00 | uint8_t[2] | .. | padding + +0x38BA | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Object): - +0x3504 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable - +0x3506 | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x3508 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) - +0x350A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `fields` (id: 1) - +0x350C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `is_struct` (id: 2) (Bool) - +0x350E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `minalign` (id: 3) - +0x3510 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `bytesize` (id: 4) (Int) - +0x3512 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 5) - +0x3514 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 6) - +0x3516 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `declaration_file` (id: 7) + +0x38BC | 14 00 | uint16_t | 0x0014 (20) | size of this vtable + +0x38BE | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x38C0 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) + +0x38C2 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `fields` (id: 1) + +0x38C4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `is_struct` (id: 2) (Bool) + +0x38C6 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `minalign` (id: 3) + +0x38C8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `bytesize` (id: 4) (Int) + +0x38CA | 10 00 | VOffset16 | 0x0010 (16) | offset to field `attributes` (id: 5) + +0x38CC | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 6) + +0x38CE | 18 00 | VOffset16 | 0x0018 (24) | offset to field `declaration_file` (id: 7) table (reflection.Object): - +0x3518 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x3504 | offset to vtable - +0x351C | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x359C | offset to field `name` (string) - +0x3520 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x3594 | offset to field `fields` (vector) - +0x3524 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x3528 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3538 | offset to field `attributes` (vector) - +0x352C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3534 | offset to field `documentation` (vector) - +0x3530 | 30 02 00 00 | UOffset32 | 0x00000230 (560) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x38D0 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x38BC | offset to vtable + +0x38D4 | 80 00 00 00 | UOffset32 | 0x00000080 (128) Loc: +0x3954 | offset to field `name` (string) + +0x38D8 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x394C | offset to field `fields` (vector) + +0x38DC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x38E0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x38F0 | offset to field `attributes` (vector) + +0x38E4 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x38EC | offset to field `documentation` (vector) + +0x38E8 | 30 02 00 00 | UOffset32 | 0x00000230 (560) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3534 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x38EC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.attributes): - +0x3538 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x353C | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x356C | offset to table[0] - +0x3540 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3544 | offset to table[1] + +0x38F0 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x38F4 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3924 | offset to table[0] + +0x38F8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x38FC | offset to table[1] table (reflection.KeyValue): - +0x3544 | E0 FF FF FF | SOffset32 | 0xFFFFFFE0 (-32) Loc: +0x3564 | offset to vtable - +0x3548 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3558 | offset to field `key` (string) - +0x354C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3550 | offset to field `value` (string) + +0x38FC | E0 FF FF FF | SOffset32 | 0xFFFFFFE0 (-32) Loc: +0x391C | offset to vtable + +0x3900 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3910 | offset to field `key` (string) + +0x3904 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3908 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x3550 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3554 | 30 | char[1] | 0 | string literal - +0x3555 | 00 | char | 0x00 (0) | string terminator + +0x3908 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x390C | 30 | char[1] | 0 | string literal + +0x390D | 00 | char | 0x00 (0) | string terminator padding: - +0x3556 | 00 00 | uint8_t[2] | .. | padding + +0x390E | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x3558 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string - +0x355C | 70 72 69 76 61 74 65 | char[7] | private | string literal - +0x3563 | 00 | char | 0x00 (0) | string terminator + +0x3910 | 07 00 00 00 | uint32_t | 0x00000007 (7) | length of string + +0x3914 | 70 72 69 76 61 74 65 | char[7] | private | string literal + +0x391B | 00 | char | 0x00 (0) | string terminator vtable (reflection.KeyValue): - +0x3564 | 08 00 | uint16_t | 0x0008 (8) | size of this vtable - +0x3566 | 0C 00 | uint16_t | 0x000C (12) | size of referring table - +0x3568 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `key` (id: 0) - +0x356A | 08 00 | VOffset16 | 0x0008 (8) | offset to field `value` (id: 1) + +0x391C | 08 00 | uint16_t | 0x0008 (8) | size of this vtable + +0x391E | 0C 00 | uint16_t | 0x000C (12) | size of referring table + +0x3920 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `key` (id: 0) + +0x3922 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `value` (id: 1) table (reflection.KeyValue): - +0x356C | 08 00 00 00 | SOffset32 | 0x00000008 (8) Loc: +0x3564 | offset to vtable - +0x3570 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3580 | offset to field `key` (string) - +0x3574 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3578 | offset to field `value` (string) + +0x3924 | 08 00 00 00 | SOffset32 | 0x00000008 (8) Loc: +0x391C | offset to vtable + +0x3928 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3938 | offset to field `key` (string) + +0x392C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3930 | offset to field `value` (string) string (reflection.KeyValue.value): - +0x3578 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x357C | 30 | char[1] | 0 | string literal - +0x357D | 00 | char | 0x00 (0) | string terminator + +0x3930 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3934 | 30 | char[1] | 0 | string literal + +0x3935 | 00 | char | 0x00 (0) | string terminator padding: - +0x357E | 00 00 | uint8_t[2] | .. | padding + +0x3936 | 00 00 | uint8_t[2] | .. | padding string (reflection.KeyValue.key): - +0x3580 | 0E 00 00 00 | uint32_t | 0x0000000E (14) | length of string - +0x3584 | 63 73 68 61 72 70 5F 70 | char[14] | csharp_p | string literal - +0x358C | 61 72 74 69 61 6C | | artial - +0x3592 | 00 | char | 0x00 (0) | string terminator + +0x3938 | 0E 00 00 00 | uint32_t | 0x0000000E (14) | length of string + +0x393C | 63 73 68 61 72 70 5F 70 | char[14] | csharp_p | string literal + +0x3944 | 61 72 74 69 61 6C | | artial + +0x394A | 00 | char | 0x00 (0) | string terminator vector (reflection.Object.fields): - +0x3594 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x3598 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x35E4 | offset to table[0] + +0x394C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3950 | 4C 00 00 00 | UOffset32 | 0x0000004C (76) Loc: +0x399C | offset to table[0] string (reflection.Object.name): - +0x359C | 26 00 00 00 | uint32_t | 0x00000026 (38) | length of string - +0x35A0 | 4D 79 47 61 6D 65 2E 45 | char[38] | MyGame.E | string literal - +0x35A8 | 78 61 6D 70 6C 65 2E 54 | | xample.T - +0x35B0 | 65 73 74 53 69 6D 70 6C | | estSimpl - +0x35B8 | 65 54 61 62 6C 65 57 69 | | eTableWi - +0x35C0 | 74 68 45 6E 75 6D | | thEnum - +0x35C6 | 00 | char | 0x00 (0) | string terminator + +0x3954 | 26 00 00 00 | uint32_t | 0x00000026 (38) | length of string + +0x3958 | 4D 79 47 61 6D 65 2E 45 | char[38] | MyGame.E | string literal + +0x3960 | 78 61 6D 70 6C 65 2E 54 | | xample.T + +0x3968 | 65 73 74 53 69 6D 70 6C | | estSimpl + +0x3970 | 65 54 61 62 6C 65 57 69 | | eTableWi + +0x3978 | 74 68 45 6E 75 6D | | thEnum + +0x397E | 00 | char | 0x00 (0) | string terminator padding: - +0x35C7 | 00 00 00 | uint8_t[3] | ... | padding + +0x397F | 00 00 00 | uint8_t[3] | ... | padding vtable (reflection.Field): - +0x35CA | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x35CC | 1C 00 | uint16_t | 0x001C (28) | size of referring table - +0x35CE | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x35D0 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x35D2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x35D4 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x35D6 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `default_integer` (id: 4) - +0x35D8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x35DA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x35DC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x35DE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x35E0 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x35E2 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) + +0x3982 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3984 | 1C 00 | uint16_t | 0x001C (28) | size of referring table + +0x3986 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3988 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x398A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x398C | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x398E | 14 00 | VOffset16 | 0x0014 (20) | offset to field `default_integer` (id: 4) + +0x3990 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3992 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3994 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3996 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3998 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x399A | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x35E4 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x35CA | offset to vtable - +0x35E8 | 00 00 | uint8_t[2] | .. | padding - +0x35EA | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x35EC | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x3628 | offset to field `name` (string) - +0x35F0 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x3614 | offset to field `type` (table) - +0x35F4 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3600 | offset to field `documentation` (vector) - +0x35F8 | 02 00 00 00 00 00 00 00 | int64_t | 0x0000000000000002 (2) | table field `default_integer` (Long) + +0x399C | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3982 | offset to vtable + +0x39A0 | 00 00 | uint8_t[2] | .. | padding + +0x39A2 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x39A4 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x39E0 | offset to field `name` (string) + +0x39A8 | 24 00 00 00 | UOffset32 | 0x00000024 (36) Loc: +0x39CC | offset to field `type` (table) + +0x39AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x39B8 | offset to field `documentation` (vector) + +0x39B0 | 02 00 00 00 00 00 00 00 | int64_t | 0x0000000000000002 (2) | table field `default_integer` (Long) vector (reflection.Field.documentation): - +0x3600 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x39B8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vtable (reflection.Type): - +0x3604 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x3606 | 14 00 | uint16_t | 0x0014 (20) | size of referring table - +0x3608 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) - +0x360A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) - +0x360C | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) - +0x360E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x3610 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `base_size` (id: 4) - +0x3612 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `element_size` (id: 5) + +0x39BC | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x39BE | 14 00 | uint16_t | 0x0014 (20) | size of referring table + +0x39C0 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) + +0x39C2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) + +0x39C4 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) + +0x39C6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x39C8 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `base_size` (id: 4) + +0x39CA | 10 00 | VOffset16 | 0x0010 (16) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x3614 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x3604 | offset to vtable - +0x3618 | 00 00 00 | uint8_t[3] | ... | padding - +0x361B | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) - +0x361C | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) - +0x3620 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x3624 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x39CC | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x39BC | offset to vtable + +0x39D0 | 00 00 00 | uint8_t[3] | ... | padding + +0x39D3 | 04 | uint8_t | 0x04 (4) | table field `base_type` (Byte) + +0x39D4 | 03 00 00 00 | uint32_t | 0x00000003 (3) | table field `index` (Int) + +0x39D8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x39DC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3628 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string - +0x362C | 63 6F 6C 6F 72 | char[5] | color | string literal - +0x3631 | 00 | char | 0x00 (0) | string terminator + +0x39E0 | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string + +0x39E4 | 63 6F 6C 6F 72 | char[5] | color | string literal + +0x39E9 | 00 | char | 0x00 (0) | string terminator padding: - +0x3632 | 00 00 | uint8_t[2] | .. | padding + +0x39EA | 00 00 | uint8_t[2] | .. | padding table (reflection.Object): - +0x3634 | 54 FD FF FF | SOffset32 | 0xFFFFFD54 (-684) Loc: +0x38E0 | offset to vtable - +0x3638 | 00 00 00 | uint8_t[3] | ... | padding - +0x363B | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x363C | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3664 | offset to field `name` (string) - +0x3640 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x3658 | offset to field `fields` (vector) - +0x3644 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `minalign` (Int) - +0x3648 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `bytesize` (Int) - +0x364C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3654 | offset to field `documentation` (vector) - +0x3650 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x39EC | 54 FD FF FF | SOffset32 | 0xFFFFFD54 (-684) Loc: +0x3C98 | offset to vtable + +0x39F0 | 00 00 00 | uint8_t[3] | ... | padding + +0x39F3 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x39F4 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x3A1C | offset to field `name` (string) + +0x39F8 | 18 00 00 00 | UOffset32 | 0x00000018 (24) Loc: +0x3A10 | offset to field `fields` (vector) + +0x39FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `minalign` (Int) + +0x3A00 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `bytesize` (Int) + +0x3A04 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3A0C | offset to field `documentation` (vector) + +0x3A08 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3654 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3A0C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x3658 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) - +0x365C | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x36D0 | offset to table[0] - +0x3660 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x369C | offset to table[1] + +0x3A10 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items) + +0x3A14 | 74 00 00 00 | UOffset32 | 0x00000074 (116) Loc: +0x3A88 | offset to table[0] + +0x3A18 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x3A54 | offset to table[1] string (reflection.Object.name): - +0x3664 | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string - +0x3668 | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal - +0x3670 | 78 61 6D 70 6C 65 2E 54 | | xample.T - +0x3678 | 65 73 74 | | est - +0x367B | 00 | char | 0x00 (0) | string terminator + +0x3A1C | 13 00 00 00 | uint32_t | 0x00000013 (19) | length of string + +0x3A20 | 4D 79 47 61 6D 65 2E 45 | char[19] | MyGame.E | string literal + +0x3A28 | 78 61 6D 70 6C 65 2E 54 | | xample.T + +0x3A30 | 65 73 74 | | est + +0x3A33 | 00 | char | 0x00 (0) | string terminator padding: - +0x367C | 00 00 | uint8_t[2] | .. | padding + +0x3A34 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Field): - +0x367E | 1E 00 | uint16_t | 0x001E (30) | size of this vtable - +0x3680 | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x3682 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) - +0x3684 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) - +0x3686 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `id` (id: 2) - +0x3688 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `offset` (id: 3) - +0x368A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x368C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x368E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x3690 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x3692 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x3694 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x3696 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) - +0x3698 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `optional` (id: 11) (Bool) - +0x369A | 0A 00 | VOffset16 | 0x000A (10) | offset to field `padding` (id: 12) + +0x3A36 | 1E 00 | uint16_t | 0x001E (30) | size of this vtable + +0x3A38 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x3A3A | 0C 00 | VOffset16 | 0x000C (12) | offset to field `name` (id: 0) + +0x3A3C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `type` (id: 1) + +0x3A3E | 06 00 | VOffset16 | 0x0006 (6) | offset to field `id` (id: 2) + +0x3A40 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `offset` (id: 3) + +0x3A42 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3A44 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3A46 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3A48 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3A4A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3A4C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x3A4E | 14 00 | VOffset16 | 0x0014 (20) | offset to field `documentation` (id: 10) + +0x3A50 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `optional` (id: 11) (Bool) + +0x3A52 | 0A 00 | VOffset16 | 0x000A (10) | offset to field `padding` (id: 12) table (reflection.Field): - +0x369C | 1E 00 00 00 | SOffset32 | 0x0000001E (30) Loc: +0x367E | offset to vtable - +0x36A0 | 00 00 | uint8_t[2] | .. | padding - +0x36A2 | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) - +0x36A4 | 02 00 | uint16_t | 0x0002 (2) | table field `offset` (UShort) - +0x36A6 | 01 00 | uint16_t | 0x0001 (1) | table field `padding` (UShort) - +0x36A8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x36C8 | offset to field `name` (string) - +0x36AC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x36B8 | offset to field `type` (table) - +0x36B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x36B4 | offset to field `documentation` (vector) + +0x3A54 | 1E 00 00 00 | SOffset32 | 0x0000001E (30) Loc: +0x3A36 | offset to vtable + +0x3A58 | 00 00 | uint8_t[2] | .. | padding + +0x3A5A | 01 00 | uint16_t | 0x0001 (1) | table field `id` (UShort) + +0x3A5C | 02 00 | uint16_t | 0x0002 (2) | table field `offset` (UShort) + +0x3A5E | 01 00 | uint16_t | 0x0001 (1) | table field `padding` (UShort) + +0x3A60 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3A80 | offset to field `name` (string) + +0x3A64 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3A70 | offset to field `type` (table) + +0x3A68 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3A6C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x36B4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3A6C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x36B8 | D4 FF FF FF | SOffset32 | 0xFFFFFFD4 (-44) Loc: +0x36E4 | offset to vtable - +0x36BC | 00 00 00 | uint8_t[3] | ... | padding - +0x36BF | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) - +0x36C0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) - +0x36C4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3A70 | D4 FF FF FF | SOffset32 | 0xFFFFFFD4 (-44) Loc: +0x3A9C | offset to vtable + +0x3A74 | 00 00 00 | uint8_t[3] | ... | padding + +0x3A77 | 03 | uint8_t | 0x03 (3) | table field `base_type` (Byte) + +0x3A78 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `base_size` (UInt) + +0x3A7C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x36C8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x36CC | 62 | char[1] | b | string literal - +0x36CD | 00 | char | 0x00 (0) | string terminator + +0x3A80 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3A84 | 62 | char[1] | b | string literal + +0x3A85 | 00 | char | 0x00 (0) | string terminator padding: - +0x36CE | 00 00 | uint8_t[2] | .. | padding + +0x3A86 | 00 00 | uint8_t[2] | .. | padding table (reflection.Field): - +0x36D0 | 62 FD FF FF | SOffset32 | 0xFFFFFD62 (-670) Loc: +0x396E | offset to vtable - +0x36D4 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3704 | offset to field `name` (string) - +0x36D8 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x36F4 | offset to field `type` (table) - +0x36DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x36E0 | offset to field `documentation` (vector) + +0x3A88 | 62 FD FF FF | SOffset32 | 0xFFFFFD62 (-670) Loc: +0x3D26 | offset to vtable + +0x3A8C | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3ABC | offset to field `name` (string) + +0x3A90 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3AAC | offset to field `type` (table) + +0x3A94 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3A98 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x36E0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3A98 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vtable (reflection.Type): - +0x36E4 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x36E6 | 10 00 | uint16_t | 0x0010 (16) | size of referring table - +0x36E8 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) - +0x36EA | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) - +0x36EC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) - +0x36EE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x36F0 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `base_size` (id: 4) - +0x36F2 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) + +0x3A9C | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x3A9E | 10 00 | uint16_t | 0x0010 (16) | size of referring table + +0x3AA0 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) + +0x3AA2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) + +0x3AA4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) + +0x3AA6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x3AA8 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `base_size` (id: 4) + +0x3AAA | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x36F4 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x36E4 | offset to vtable - +0x36F8 | 00 00 00 | uint8_t[3] | ... | padding - +0x36FB | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) - +0x36FC | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) - +0x3700 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3AAC | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x3A9C | offset to vtable + +0x3AB0 | 00 00 00 | uint8_t[3] | ... | padding + +0x3AB3 | 05 | uint8_t | 0x05 (5) | table field `base_type` (Byte) + +0x3AB4 | 02 00 00 00 | uint32_t | 0x00000002 (2) | table field `base_size` (UInt) + +0x3AB8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3704 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3708 | 61 | char[1] | a | string literal - +0x3709 | 00 | char | 0x00 (0) | string terminator + +0x3ABC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3AC0 | 61 | char[1] | a | string literal + +0x3AC1 | 00 | char | 0x00 (0) | string terminator padding: - +0x370A | 00 00 | uint8_t[2] | .. | padding + +0x3AC2 | 00 00 | uint8_t[2] | .. | padding table (reflection.Object): - +0x370C | E4 FE FF FF | SOffset32 | 0xFFFFFEE4 (-284) Loc: +0x3828 | offset to vtable - +0x3710 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x372C | offset to field `name` (string) - +0x3714 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3728 | offset to field `fields` (vector) - +0x3718 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x371C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3724 | offset to field `documentation` (vector) - +0x3720 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x3AC4 | E4 FE FF FF | SOffset32 | 0xFFFFFEE4 (-284) Loc: +0x3BE0 | offset to vtable + +0x3AC8 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3AE4 | offset to field `name` (string) + +0x3ACC | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3AE0 | offset to field `fields` (vector) + +0x3AD0 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3AD4 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3ADC | offset to field `documentation` (vector) + +0x3AD8 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3B18 | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3724 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3ADC | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x3728 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3AE0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) string (reflection.Object.name): - +0x372C | 17 00 00 00 | uint32_t | 0x00000017 (23) | length of string - +0x3730 | 4D 79 47 61 6D 65 2E 45 | char[23] | MyGame.E | string literal - +0x3738 | 78 61 6D 70 6C 65 32 2E | | xample2. - +0x3740 | 4D 6F 6E 73 74 65 72 | | Monster - +0x3747 | 00 | char | 0x00 (0) | string terminator + +0x3AE4 | 17 00 00 00 | uint32_t | 0x00000017 (23) | length of string + +0x3AE8 | 4D 79 47 61 6D 65 2E 45 | char[23] | MyGame.E | string literal + +0x3AF0 | 78 61 6D 70 6C 65 32 2E | | xample2. + +0x3AF8 | 4D 6F 6E 73 74 65 72 | | Monster + +0x3AFF | 00 | char | 0x00 (0) | string terminator table (reflection.Object): - +0x3748 | 20 FF FF FF | SOffset32 | 0xFFFFFF20 (-224) Loc: +0x3828 | offset to vtable - +0x374C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x3780 | offset to field `name` (string) - +0x3750 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x377C | offset to field `fields` (vector) - +0x3754 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x3758 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3778 | offset to field `documentation` (vector) - +0x375C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3760 | offset to field `declaration_file` (string) + +0x3B00 | 20 FF FF FF | SOffset32 | 0xFFFFFF20 (-224) Loc: +0x3BE0 | offset to vtable + +0x3B04 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x3B38 | offset to field `name` (string) + +0x3B08 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x3B34 | offset to field `fields` (vector) + +0x3B0C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3B10 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3B30 | offset to field `documentation` (vector) + +0x3B14 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3B18 | offset to field `declaration_file` (string) string (reflection.Object.declaration_file): - +0x3760 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string - +0x3764 | 2F 2F 6D 6F 6E 73 74 65 | char[18] | //monste | string literal - +0x376C | 72 5F 74 65 73 74 2E 66 | | r_test.f - +0x3774 | 62 73 | | bs - +0x3776 | 00 | char | 0x00 (0) | string terminator + +0x3B18 | 12 00 00 00 | uint32_t | 0x00000012 (18) | length of string + +0x3B1C | 2F 2F 6D 6F 6E 73 74 65 | char[18] | //monste | string literal + +0x3B24 | 72 5F 74 65 73 74 2E 66 | | r_test.f + +0x3B2C | 62 73 | | bs + +0x3B2E | 00 | char | 0x00 (0) | string terminator vector (reflection.Object.documentation): - +0x3778 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3B30 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x377C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3B34 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) string (reflection.Object.name): - +0x3780 | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string - +0x3784 | 4D 79 47 61 6D 65 2E 49 | char[24] | MyGame.I | string literal - +0x378C | 6E 50 61 72 65 6E 74 4E | | nParentN - +0x3794 | 61 6D 65 73 70 61 63 65 | | amespace - +0x379C | 00 | char | 0x00 (0) | string terminator + +0x3B38 | 18 00 00 00 | uint32_t | 0x00000018 (24) | length of string + +0x3B3C | 4D 79 47 61 6D 65 2E 49 | char[24] | MyGame.I | string literal + +0x3B44 | 6E 50 61 72 65 6E 74 4E | | nParentN + +0x3B4C | 61 6D 65 73 70 61 63 65 | | amespace + +0x3B54 | 00 | char | 0x00 (0) | string terminator padding: - +0x379D | 00 00 00 | uint8_t[3] | ... | padding + +0x3B55 | 00 00 00 | uint8_t[3] | ... | padding table (reflection.Object): - +0x37A0 | 78 FF FF FF | SOffset32 | 0xFFFFFF78 (-136) Loc: +0x3828 | offset to vtable - +0x37A4 | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x37EC | offset to field `name` (string) - +0x37A8 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x37E4 | offset to field `fields` (vector) - +0x37AC | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x37B0 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x37E0 | offset to field `documentation` (vector) - +0x37B4 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x37B8 | offset to field `declaration_file` (string) + +0x3B58 | 78 FF FF FF | SOffset32 | 0xFFFFFF78 (-136) Loc: +0x3BE0 | offset to vtable + +0x3B5C | 48 00 00 00 | UOffset32 | 0x00000048 (72) Loc: +0x3BA4 | offset to field `name` (string) + +0x3B60 | 3C 00 00 00 | UOffset32 | 0x0000003C (60) Loc: +0x3B9C | offset to field `fields` (vector) + +0x3B64 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3B68 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3B98 | offset to field `documentation` (vector) + +0x3B6C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3B70 | offset to field `declaration_file` (string) string (reflection.Object.declaration_file): - +0x37B8 | 20 00 00 00 | uint32_t | 0x00000020 (32) | length of string - +0x37BC | 2F 2F 69 6E 63 6C 75 64 | char[32] | //includ | string literal - +0x37C4 | 65 5F 74 65 73 74 2F 69 | | e_test/i - +0x37CC | 6E 63 6C 75 64 65 5F 74 | | nclude_t - +0x37D4 | 65 73 74 31 2E 66 62 73 | | est1.fbs - +0x37DC | 00 | char | 0x00 (0) | string terminator + +0x3B70 | 20 00 00 00 | uint32_t | 0x00000020 (32) | length of string + +0x3B74 | 2F 2F 69 6E 63 6C 75 64 | char[32] | //includ | string literal + +0x3B7C | 65 5F 74 65 73 74 2F 69 | | e_test/i + +0x3B84 | 6E 63 6C 75 64 65 5F 74 | | nclude_t + +0x3B8C | 65 73 74 31 2E 66 62 73 | | est1.fbs + +0x3B94 | 00 | char | 0x00 (0) | string terminator padding: - +0x37DD | 00 00 00 | uint8_t[3] | ... | padding + +0x3B95 | 00 00 00 | uint8_t[3] | ... | padding vector (reflection.Object.documentation): - +0x37E0 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3B98 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x37E4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x37E8 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x37F8 | offset to table[0] + +0x3B9C | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3BA0 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x3BB0 | offset to table[0] string (reflection.Object.name): - +0x37EC | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string - +0x37F0 | 54 61 62 6C 65 41 | char[6] | TableA | string literal - +0x37F6 | 00 | char | 0x00 (0) | string terminator + +0x3BA4 | 06 00 00 00 | uint32_t | 0x00000006 (6) | length of string + +0x3BA8 | 54 61 62 6C 65 41 | char[6] | TableA | string literal + +0x3BAE | 00 | char | 0x00 (0) | string terminator table (reflection.Field): - +0x37F8 | 74 FF FF FF | SOffset32 | 0xFFFFFF74 (-140) Loc: +0x3884 | offset to vtable - +0x37FC | 00 | uint8_t[1] | . | padding - +0x37FD | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x37FE | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x3800 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3820 | offset to field `name` (string) - +0x3804 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3810 | offset to field `type` (table) - +0x3808 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x380C | offset to field `documentation` (vector) + +0x3BB0 | 74 FF FF FF | SOffset32 | 0xFFFFFF74 (-140) Loc: +0x3C3C | offset to vtable + +0x3BB4 | 00 | uint8_t[1] | . | padding + +0x3BB5 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x3BB6 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x3BB8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3BD8 | offset to field `name` (string) + +0x3BBC | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x3BC8 | offset to field `type` (table) + +0x3BC0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3BC4 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x380C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3BC4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) table (reflection.Type): - +0x3810 | 58 FF FF FF | SOffset32 | 0xFFFFFF58 (-168) Loc: +0x38B8 | offset to vtable - +0x3814 | 00 00 00 | uint8_t[3] | ... | padding - +0x3817 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x3818 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | table field `index` (Int) - +0x381C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3BC8 | 58 FF FF FF | SOffset32 | 0xFFFFFF58 (-168) Loc: +0x3C70 | offset to vtable + +0x3BCC | 00 00 00 | uint8_t[3] | ... | padding + +0x3BCF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3BD0 | 0C 00 00 00 | uint32_t | 0x0000000C (12) | table field `index` (Int) + +0x3BD4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x3820 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x3824 | 62 | char[1] | b | string literal - +0x3825 | 00 | char | 0x00 (0) | string terminator + +0x3BD8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3BDC | 62 | char[1] | b | string literal + +0x3BDD | 00 | char | 0x00 (0) | string terminator padding: - +0x3826 | 00 00 | uint8_t[2] | .. | padding + +0x3BDE | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Object): - +0x3828 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable - +0x382A | 18 00 | uint16_t | 0x0018 (24) | size of referring table - +0x382C | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) - +0x382E | 08 00 | VOffset16 | 0x0008 (8) | offset to field `fields` (id: 1) - +0x3830 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `is_struct` (id: 2) (Bool) - +0x3832 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `minalign` (id: 3) - +0x3834 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `bytesize` (id: 4) (Int) - +0x3836 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 5) (Vector) - +0x3838 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 6) - +0x383A | 14 00 | VOffset16 | 0x0014 (20) | offset to field `declaration_file` (id: 7) + +0x3BE0 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable + +0x3BE2 | 18 00 | uint16_t | 0x0018 (24) | size of referring table + +0x3BE4 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) + +0x3BE6 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `fields` (id: 1) + +0x3BE8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `is_struct` (id: 2) (Bool) + +0x3BEA | 0C 00 | VOffset16 | 0x000C (12) | offset to field `minalign` (id: 3) + +0x3BEC | 00 00 | VOffset16 | 0x0000 (0) | offset to field `bytesize` (id: 4) (Int) + +0x3BEE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 5) (Vector) + +0x3BF0 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 6) + +0x3BF2 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `declaration_file` (id: 7) table (reflection.Object): - +0x383C | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x3828 | offset to vtable - +0x3840 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3860 | offset to field `name` (string) - +0x3844 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3858 | offset to field `fields` (vector) - +0x3848 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) - +0x384C | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3854 | offset to field `documentation` (vector) - +0x3850 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x3914 | offset to field `declaration_file` (string) + +0x3BF4 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x3BE0 | offset to vtable + +0x3BF8 | 20 00 00 00 | UOffset32 | 0x00000020 (32) Loc: +0x3C18 | offset to field `name` (string) + +0x3BFC | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x3C10 | offset to field `fields` (vector) + +0x3C00 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `minalign` (Int) + +0x3C04 | 08 00 00 00 | UOffset32 | 0x00000008 (8) Loc: +0x3C0C | offset to field `documentation` (vector) + +0x3C08 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x3CCC | offset to field `declaration_file` (string) vector (reflection.Object.documentation): - +0x3854 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3C0C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x3858 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x385C | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x38A0 | offset to table[0] + +0x3C10 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3C14 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x3C58 | offset to table[0] string (reflection.Object.name): - +0x3860 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string - +0x3864 | 4D 79 47 61 6D 65 2E 4F | char[28] | MyGame.O | string literal - +0x386C | 74 68 65 72 4E 61 6D 65 | | therName - +0x3874 | 53 70 61 63 65 2E 54 61 | | Space.Ta - +0x387C | 62 6C 65 42 | | bleB - +0x3880 | 00 | char | 0x00 (0) | string terminator + +0x3C18 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string + +0x3C1C | 4D 79 47 61 6D 65 2E 4F | char[28] | MyGame.O | string literal + +0x3C24 | 74 68 65 72 4E 61 6D 65 | | therName + +0x3C2C | 53 70 61 63 65 2E 54 61 | | Space.Ta + +0x3C34 | 62 6C 65 42 | | bleB + +0x3C38 | 00 | char | 0x00 (0) | string terminator padding: - +0x3881 | 00 00 00 | uint8_t[3] | ... | padding + +0x3C39 | 00 00 00 | uint8_t[3] | ... | padding vtable (reflection.Field): - +0x3884 | 1C 00 | uint16_t | 0x001C (28) | size of this vtable - +0x3886 | 14 00 | uint16_t | 0x0014 (20) | size of referring table - +0x3888 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x388A | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) - +0x388C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x388E | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) - +0x3890 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x3892 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x3894 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x3896 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x3898 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x389A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x389C | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) - +0x389E | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) + +0x3C3C | 1C 00 | uint16_t | 0x001C (28) | size of this vtable + +0x3C3E | 14 00 | uint16_t | 0x0014 (20) | size of referring table + +0x3C40 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3C42 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `type` (id: 1) + +0x3C44 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x3C46 | 06 00 | VOffset16 | 0x0006 (6) | offset to field `offset` (id: 3) + +0x3C48 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3C4A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3C4C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3C4E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3C50 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3C52 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x3C54 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `documentation` (id: 10) + +0x3C56 | 05 00 | VOffset16 | 0x0005 (5) | offset to field `optional` (id: 11) table (reflection.Field): - +0x38A0 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x3884 | offset to vtable - +0x38A4 | 00 | uint8_t[1] | . | padding - +0x38A5 | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) - +0x38A6 | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) - +0x38A8 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x38D8 | offset to field `name` (string) - +0x38AC | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x38C8 | offset to field `type` (table) - +0x38B0 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x38B4 | offset to field `documentation` (vector) + +0x3C58 | 1C 00 00 00 | SOffset32 | 0x0000001C (28) Loc: +0x3C3C | offset to vtable + +0x3C5C | 00 | uint8_t[1] | . | padding + +0x3C5D | 01 | uint8_t | 0x01 (1) | table field `optional` (Bool) + +0x3C5E | 04 00 | uint16_t | 0x0004 (4) | table field `offset` (UShort) + +0x3C60 | 30 00 00 00 | UOffset32 | 0x00000030 (48) Loc: +0x3C90 | offset to field `name` (string) + +0x3C64 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3C80 | offset to field `type` (table) + +0x3C68 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3C6C | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x38B4 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3C6C | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vtable (reflection.Type): - +0x38B8 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x38BA | 10 00 | uint16_t | 0x0010 (16) | size of referring table - +0x38BC | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) - +0x38BE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) - +0x38C0 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) - +0x38C2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x38C4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) - +0x38C6 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) + +0x3C70 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x3C72 | 10 00 | uint16_t | 0x0010 (16) | size of referring table + +0x3C74 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) + +0x3C76 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) + +0x3C78 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `index` (id: 2) + +0x3C7A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x3C7C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) + +0x3C7E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x38C8 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x38B8 | offset to vtable - +0x38CC | 00 00 00 | uint8_t[3] | ... | padding - +0x38CF | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) - +0x38D0 | 0E 00 00 00 | uint32_t | 0x0000000E (14) | table field `index` (Int) - +0x38D4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3C80 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x3C70 | offset to vtable + +0x3C84 | 00 00 00 | uint8_t[3] | ... | padding + +0x3C87 | 0F | uint8_t | 0x0F (15) | table field `base_type` (Byte) + +0x3C88 | 0E 00 00 00 | uint32_t | 0x0000000E (14) | table field `index` (Int) + +0x3C8C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x38D8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x38DC | 61 | char[1] | a | string literal - +0x38DD | 00 | char | 0x00 (0) | string terminator + +0x3C90 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3C94 | 61 | char[1] | a | string literal + +0x3C95 | 00 | char | 0x00 (0) | string terminator padding: - +0x38DE | 00 00 | uint8_t[2] | .. | padding + +0x3C96 | 00 00 | uint8_t[2] | .. | padding vtable (reflection.Object): - +0x38E0 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable - +0x38E2 | 20 00 | uint16_t | 0x0020 (32) | size of referring table - +0x38E4 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) - +0x38E6 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `fields` (id: 1) - +0x38E8 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `is_struct` (id: 2) - +0x38EA | 10 00 | VOffset16 | 0x0010 (16) | offset to field `minalign` (id: 3) - +0x38EC | 14 00 | VOffset16 | 0x0014 (20) | offset to field `bytesize` (id: 4) - +0x38EE | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 5) (Vector) - +0x38F0 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 6) - +0x38F2 | 1C 00 | VOffset16 | 0x001C (28) | offset to field `declaration_file` (id: 7) + +0x3C98 | 14 00 | uint16_t | 0x0014 (20) | size of this vtable + +0x3C9A | 20 00 | uint16_t | 0x0020 (32) | size of referring table + +0x3C9C | 08 00 | VOffset16 | 0x0008 (8) | offset to field `name` (id: 0) + +0x3C9E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `fields` (id: 1) + +0x3CA0 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `is_struct` (id: 2) + +0x3CA2 | 10 00 | VOffset16 | 0x0010 (16) | offset to field `minalign` (id: 3) + +0x3CA4 | 14 00 | VOffset16 | 0x0014 (20) | offset to field `bytesize` (id: 4) + +0x3CA6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 5) (Vector) + +0x3CA8 | 18 00 | VOffset16 | 0x0018 (24) | offset to field `documentation` (id: 6) + +0x3CAA | 1C 00 | VOffset16 | 0x001C (28) | offset to field `declaration_file` (id: 7) table (reflection.Object): - +0x38F4 | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x38E0 | offset to vtable - +0x38F8 | 00 00 00 | uint8_t[3] | ... | padding - +0x38FB | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) - +0x38FC | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x394C | offset to field `name` (string) - +0x3900 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x3944 | offset to field `fields` (vector) - +0x3904 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) - +0x3908 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `bytesize` (Int) - +0x390C | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x3940 | offset to field `documentation` (vector) - +0x3910 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3914 | offset to field `declaration_file` (string) + +0x3CAC | 14 00 00 00 | SOffset32 | 0x00000014 (20) Loc: +0x3C98 | offset to vtable + +0x3CB0 | 00 00 00 | uint8_t[3] | ... | padding + +0x3CB3 | 01 | uint8_t | 0x01 (1) | table field `is_struct` (Bool) + +0x3CB4 | 50 00 00 00 | UOffset32 | 0x00000050 (80) Loc: +0x3D04 | offset to field `name` (string) + +0x3CB8 | 44 00 00 00 | UOffset32 | 0x00000044 (68) Loc: +0x3CFC | offset to field `fields` (vector) + +0x3CBC | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `minalign` (Int) + +0x3CC0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | table field `bytesize` (Int) + +0x3CC4 | 34 00 00 00 | UOffset32 | 0x00000034 (52) Loc: +0x3CF8 | offset to field `documentation` (vector) + +0x3CC8 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3CCC | offset to field `declaration_file` (string) string (reflection.Object.declaration_file): - +0x3914 | 24 00 00 00 | uint32_t | 0x00000024 (36) | length of string - +0x3918 | 2F 2F 69 6E 63 6C 75 64 | char[36] | //includ | string literal - +0x3920 | 65 5F 74 65 73 74 2F 73 | | e_test/s - +0x3928 | 75 62 2F 69 6E 63 6C 75 | | ub/inclu - +0x3930 | 64 65 5F 74 65 73 74 32 | | de_test2 - +0x3938 | 2E 66 62 73 | | .fbs - +0x393C | 00 | char | 0x00 (0) | string terminator + +0x3CCC | 24 00 00 00 | uint32_t | 0x00000024 (36) | length of string + +0x3CD0 | 2F 2F 69 6E 63 6C 75 64 | char[36] | //includ | string literal + +0x3CD8 | 65 5F 74 65 73 74 2F 73 | | e_test/s + +0x3CE0 | 75 62 2F 69 6E 63 6C 75 | | ub/inclu + +0x3CE8 | 64 65 5F 74 65 73 74 32 | | de_test2 + +0x3CF0 | 2E 66 62 73 | | .fbs + +0x3CF4 | 00 | char | 0x00 (0) | string terminator padding: - +0x393D | 00 00 00 | uint8_t[3] | ... | padding + +0x3CF5 | 00 00 00 | uint8_t[3] | ... | padding vector (reflection.Object.documentation): - +0x3940 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3CF8 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vector (reflection.Object.fields): - +0x3944 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) - +0x3948 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3988 | offset to table[0] + +0x3CFC | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of vector (# items) + +0x3D00 | 40 00 00 00 | UOffset32 | 0x00000040 (64) Loc: +0x3D40 | offset to table[0] string (reflection.Object.name): - +0x394C | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string - +0x3950 | 4D 79 47 61 6D 65 2E 4F | char[28] | MyGame.O | string literal - +0x3958 | 74 68 65 72 4E 61 6D 65 | | therName - +0x3960 | 53 70 61 63 65 2E 55 6E | | Space.Un - +0x3968 | 75 73 65 64 | | used - +0x396C | 00 | char | 0x00 (0) | string terminator + +0x3D04 | 1C 00 00 00 | uint32_t | 0x0000001C (28) | length of string + +0x3D08 | 4D 79 47 61 6D 65 2E 4F | char[28] | MyGame.O | string literal + +0x3D10 | 74 68 65 72 4E 61 6D 65 | | therName + +0x3D18 | 53 70 61 63 65 2E 55 6E | | Space.Un + +0x3D20 | 75 73 65 64 | | used + +0x3D24 | 00 | char | 0x00 (0) | string terminator vtable (reflection.Field): - +0x396E | 1A 00 | uint16_t | 0x001A (26) | size of this vtable - +0x3970 | 10 00 | uint16_t | 0x0010 (16) | size of referring table - +0x3972 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) - +0x3974 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `type` (id: 1) - +0x3976 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) - +0x3978 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) - +0x397A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) - +0x397C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) - +0x397E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) - +0x3980 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) - +0x3982 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) - +0x3984 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) - +0x3986 | 0C 00 | VOffset16 | 0x000C (12) | offset to field `documentation` (id: 10) + +0x3D26 | 1A 00 | uint16_t | 0x001A (26) | size of this vtable + +0x3D28 | 10 00 | uint16_t | 0x0010 (16) | size of referring table + +0x3D2A | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 0) + +0x3D2C | 08 00 | VOffset16 | 0x0008 (8) | offset to field `type` (id: 1) + +0x3D2E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `id` (id: 2) (UShort) + +0x3D30 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `offset` (id: 3) (UShort) + +0x3D32 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_integer` (id: 4) (Long) + +0x3D34 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `default_real` (id: 5) (Double) + +0x3D36 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `deprecated` (id: 6) (Bool) + +0x3D38 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `required` (id: 7) (Bool) + +0x3D3A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `key` (id: 8) (Bool) + +0x3D3C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `attributes` (id: 9) (Vector) + +0x3D3E | 0C 00 | VOffset16 | 0x000C (12) | offset to field `documentation` (id: 10) table (reflection.Field): - +0x3988 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x396E | offset to vtable - +0x398C | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x39B8 | offset to field `name` (string) - +0x3990 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x39AC | offset to field `type` (table) - +0x3994 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3998 | offset to field `documentation` (vector) + +0x3D40 | 1A 00 00 00 | SOffset32 | 0x0000001A (26) Loc: +0x3D26 | offset to vtable + +0x3D44 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x3D70 | offset to field `name` (string) + +0x3D48 | 1C 00 00 00 | UOffset32 | 0x0000001C (28) Loc: +0x3D64 | offset to field `type` (table) + +0x3D4C | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x3D50 | offset to field `documentation` (vector) vector (reflection.Field.documentation): - +0x3998 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) + +0x3D50 | 00 00 00 00 | uint32_t | 0x00000000 (0) | length of vector (# items) vtable (reflection.Type): - +0x399C | 10 00 | uint16_t | 0x0010 (16) | size of this vtable - +0x399E | 0C 00 | uint16_t | 0x000C (12) | size of referring table - +0x39A0 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) - +0x39A2 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) - +0x39A4 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) - +0x39A6 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) - +0x39A8 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) - +0x39AA | 08 00 | VOffset16 | 0x0008 (8) | offset to field `element_size` (id: 5) + +0x3D54 | 10 00 | uint16_t | 0x0010 (16) | size of this vtable + +0x3D56 | 0C 00 | uint16_t | 0x000C (12) | size of referring table + +0x3D58 | 07 00 | VOffset16 | 0x0007 (7) | offset to field `base_type` (id: 0) + +0x3D5A | 00 00 | VOffset16 | 0x0000 (0) | offset to field `element` (id: 1) (Byte) + +0x3D5C | 00 00 | VOffset16 | 0x0000 (0) | offset to field `index` (id: 2) (Int) + +0x3D5E | 00 00 | VOffset16 | 0x0000 (0) | offset to field `fixed_length` (id: 3) (UShort) + +0x3D60 | 00 00 | VOffset16 | 0x0000 (0) | offset to field `base_size` (id: 4) (UInt) + +0x3D62 | 08 00 | VOffset16 | 0x0008 (8) | offset to field `element_size` (id: 5) table (reflection.Type): - +0x39AC | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x399C | offset to vtable - +0x39B0 | 00 00 00 | uint8_t[3] | ... | padding - +0x39B3 | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) - +0x39B4 | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) + +0x3D64 | 10 00 00 00 | SOffset32 | 0x00000010 (16) Loc: +0x3D54 | offset to vtable + +0x3D68 | 00 00 00 | uint8_t[3] | ... | padding + +0x3D6B | 07 | uint8_t | 0x07 (7) | table field `base_type` (Byte) + +0x3D6C | 01 00 00 00 | uint32_t | 0x00000001 (1) | table field `element_size` (UInt) string (reflection.Field.name): - +0x39B8 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string - +0x39BC | 61 | char[1] | a | string literal - +0x39BD | 00 | char | 0x00 (0) | string terminator + +0x3D70 | 01 00 00 00 | uint32_t | 0x00000001 (1) | length of string + +0x3D74 | 61 | char[1] | a | string literal + +0x3D75 | 00 | char | 0x00 (0) | string terminator padding: - +0x39BE | 00 00 | uint8_t[2] | .. | padding + +0x3D76 | 00 00 | uint8_t[2] | .. | padding diff --git a/third_party/flatbuffers/tests/monster_test.bfbs b/third_party/flatbuffers/tests/monster_test.bfbs index d389aabf12..04a6d16d86 100644 Binary files a/third_party/flatbuffers/tests/monster_test.bfbs and b/third_party/flatbuffers/tests/monster_test.bfbs differ diff --git a/third_party/flatbuffers/tests/monster_test.cpp b/third_party/flatbuffers/tests/monster_test.cpp index 4fc9e143eb..f081dd92f5 100644 --- a/third_party/flatbuffers/tests/monster_test.cpp +++ b/third_party/flatbuffers/tests/monster_test.cpp @@ -1,5 +1,6 @@ #include "monster_test.h" +#include #include #include "flatbuffers/flatbuffer_builder.h" @@ -439,6 +440,16 @@ void MutateFlatBuffersTest(uint8_t *flatbuf, std::size_t length) { TEST_EQ(first->hp(), 0); first->mutate_hp(1000); + // Test for each loop over mutable entries + for (auto item: *tables) + { + TEST_EQ(item->hp(), 1000); + item->mutate_hp(0); + TEST_EQ(item->hp(), 0); + item->mutate_hp(1000); + break; // one iteration is enough, just testing compilation + } + // Mutate via LookupByKey TEST_NOTNULL(tables->MutableLookupByKey("Barney")); TEST_EQ(static_cast(nullptr), @@ -842,4 +853,4 @@ void UnPackTo(const uint8_t *flatbuf) { } } // namespace tests -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/monster_test.fbs b/third_party/flatbuffers/tests/monster_test.fbs index 14d34cb4ab..b40ecf58f9 100644 --- a/third_party/flatbuffers/tests/monster_test.fbs +++ b/third_party/flatbuffers/tests/monster_test.fbs @@ -141,6 +141,15 @@ table Monster { // enum value. long_enum_non_enum_default:LongEnum (id: 52); long_enum_normal_default:LongEnum = LongOne (id: 53); + // Test that default values nan and +/-inf work. + nan_default:float = nan (id: 54); + inf_default:float = inf (id: 55); + positive_inf_default:float = +inf (id: 56); + infinity_default:float = infinity (id: 57); + positive_infinity_default:float = +infinity (id: 58); + negative_inf_default:float = -inf (id: 59); + negative_infinity_default:float = -infinity (id: 60); + double_inf_default:double = inf (id: 61); } table TypeAliases { diff --git a/third_party/flatbuffers/tests/monster_test.schema.json b/third_party/flatbuffers/tests/monster_test.schema.json index 5e98ef4aa4..edcfbd9e24 100644 --- a/third_party/flatbuffers/tests/monster_test.schema.json +++ b/third_party/flatbuffers/tests/monster_test.schema.json @@ -340,6 +340,30 @@ }, "long_enum_normal_default" : { "$ref" : "#/definitions/MyGame_Example_LongEnum" + }, + "nan_default" : { + "type" : "number" + }, + "inf_default" : { + "type" : "number" + }, + "positive_inf_default" : { + "type" : "number" + }, + "infinity_default" : { + "type" : "number" + }, + "positive_infinity_default" : { + "type" : "number" + }, + "negative_inf_default" : { + "type" : "number" + }, + "negative_infinity_default" : { + "type" : "number" + }, + "double_inf_default" : { + "type" : "number" } }, "required" : ["name"], diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/ability_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/ability_generated.rs index d1f177c515..042df75f16 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/ability_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/ability_generated.rs @@ -28,39 +28,25 @@ impl core::fmt::Debug for Ability { } impl flatbuffers::SimpleToVerifyInSlice for Ability {} -impl flatbuffers::SafeSliceAccess for Ability {} impl<'a> flatbuffers::Follow<'a> for Ability { type Inner = &'a Ability; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Ability>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Ability { type Inner = &'a Ability; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Ability { type Output = Ability; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Ability as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Ability { - type Output = Ability; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Ability as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Ability as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -92,24 +78,30 @@ impl<'a> Ability { } pub fn id(&self) -> u32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_id(&mut self, x: u32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const u32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } @@ -125,24 +117,30 @@ impl<'a> Ability { key.cmp(&val) } pub fn distance(&self) -> u32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_distance(&mut self, x: u32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const u32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/any_ambiguous_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/any_ambiguous_aliases_generated.rs index ee8cba7cbe..8ff20919a7 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/any_ambiguous_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/any_ambiguous_aliases_generated.rs @@ -63,10 +63,8 @@ impl core::fmt::Debug for AnyAmbiguousAliases { impl<'a> flatbuffers::Follow<'a> for AnyAmbiguousAliases { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -74,21 +72,21 @@ impl<'a> flatbuffers::Follow<'a> for AnyAmbiguousAliases { impl flatbuffers::Push for AnyAmbiguousAliases { type Output = AnyAmbiguousAliases; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for AnyAmbiguousAliases { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/any_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/any_generated.rs index adddc10c52..d33337ad4b 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/any_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/any_generated.rs @@ -63,10 +63,8 @@ impl core::fmt::Debug for Any { impl<'a> flatbuffers::Follow<'a> for Any { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -74,21 +72,21 @@ impl<'a> flatbuffers::Follow<'a> for Any { impl flatbuffers::Push for Any { type Output = Any; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Any { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/any_unique_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/any_unique_aliases_generated.rs index 5142d0e590..726fa8e2ac 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/any_unique_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/any_unique_aliases_generated.rs @@ -63,10 +63,8 @@ impl core::fmt::Debug for AnyUniqueAliases { impl<'a> flatbuffers::Follow<'a> for AnyUniqueAliases { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -74,21 +72,21 @@ impl<'a> flatbuffers::Follow<'a> for AnyUniqueAliases { impl flatbuffers::Push for AnyUniqueAliases { type Output = AnyUniqueAliases; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for AnyUniqueAliases { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/color_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/color_generated.rs index 1b9287fd40..9cd348aa56 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/color_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/color_generated.rs @@ -29,32 +29,38 @@ pub use self::bitflags_color::Color; impl<'a> flatbuffers::Follow<'a> for Color { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - unsafe { Self::from_bits_unchecked(b) } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + Self::from_bits_unchecked(b) } } impl flatbuffers::Push for Color { type Output = Color; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.bits()); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.bits()); } } impl flatbuffers::EndianScalar for Color { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.bits()); - unsafe { Self::from_bits_unchecked(b) } + fn to_little_endian(self) -> u8 { + self.bits().to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.bits()); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 unsafe { Self::from_bits_unchecked(b) } } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/long_enum_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/long_enum_generated.rs index 6a24d74c4c..d7625269c4 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/long_enum_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/long_enum_generated.rs @@ -25,32 +25,38 @@ pub use self::bitflags_long_enum::LongEnum; impl<'a> flatbuffers::Follow<'a> for LongEnum { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - unsafe { Self::from_bits_unchecked(b) } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + Self::from_bits_unchecked(b) } } impl flatbuffers::Push for LongEnum { type Output = LongEnum; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.bits()); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.bits()); } } impl flatbuffers::EndianScalar for LongEnum { + type Scalar = u64; #[inline] - fn to_little_endian(self) -> Self { - let b = u64::to_le(self.bits()); - unsafe { Self::from_bits_unchecked(b) } + fn to_little_endian(self) -> u64 { + self.bits().to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u64::from_le(self.bits()); + fn from_little_endian(v: u64) -> Self { + let b = u64::from_le(v); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 unsafe { Self::from_bits_unchecked(b) } } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/monster_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/monster_generated.rs index dd325b28f3..67dfcb37ea 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/monster_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/monster_generated.rs @@ -20,8 +20,8 @@ pub struct Monster<'a> { impl<'a> flatbuffers::Follow<'a> for Monster<'a> { type Inner = Monster<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -79,13 +79,21 @@ impl<'a> Monster<'a> { pub const VT_NATIVE_INLINE: flatbuffers::VOffsetT = 106; pub const VT_LONG_ENUM_NON_ENUM_DEFAULT: flatbuffers::VOffsetT = 108; pub const VT_LONG_ENUM_NORMAL_DEFAULT: flatbuffers::VOffsetT = 110; + pub const VT_NAN_DEFAULT: flatbuffers::VOffsetT = 112; + pub const VT_INF_DEFAULT: flatbuffers::VOffsetT = 114; + pub const VT_POSITIVE_INF_DEFAULT: flatbuffers::VOffsetT = 116; + pub const VT_INFINITY_DEFAULT: flatbuffers::VOffsetT = 118; + pub const VT_POSITIVE_INFINITY_DEFAULT: flatbuffers::VOffsetT = 120; + pub const VT_NEGATIVE_INF_DEFAULT: flatbuffers::VOffsetT = 122; + pub const VT_NEGATIVE_INFINITY_DEFAULT: flatbuffers::VOffsetT = 124; + pub const VT_DOUBLE_INF_DEFAULT: flatbuffers::VOffsetT = 126; pub const fn get_fully_qualified_name() -> &'static str { "MyGame.Example.Monster" } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Monster { _tab: table } } #[allow(unused_mut)] @@ -94,6 +102,7 @@ impl<'a> Monster<'a> { args: &'args MonsterArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = MonsterBuilder::new(_fbb); + builder.add_double_inf_default(args.double_inf_default); builder.add_long_enum_normal_default(args.long_enum_normal_default); builder.add_long_enum_non_enum_default(args.long_enum_non_enum_default); builder.add_non_owning_reference(args.non_owning_reference); @@ -103,6 +112,13 @@ impl<'a> Monster<'a> { builder.add_testhashs64_fnv1a(args.testhashs64_fnv1a); builder.add_testhashu64_fnv1(args.testhashu64_fnv1); builder.add_testhashs64_fnv1(args.testhashs64_fnv1); + builder.add_negative_infinity_default(args.negative_infinity_default); + builder.add_negative_inf_default(args.negative_inf_default); + builder.add_positive_infinity_default(args.positive_infinity_default); + builder.add_infinity_default(args.infinity_default); + builder.add_positive_inf_default(args.positive_inf_default); + builder.add_inf_default(args.inf_default); + builder.add_nan_default(args.nan_default); if let Some(x) = args.native_inline { builder.add_native_inline(x); } if let Some(x) = args.scalar_key_sorted_tables { builder.add_scalar_key_sorted_tables(x); } if let Some(x) = args.testrequirednestedflatbuffer { builder.add_testrequirednestedflatbuffer(x); } @@ -161,7 +177,7 @@ impl<'a> Monster<'a> { x.to_string() }; let inventory = self.inventory().map(|x| { - x.to_vec() + x.into_iter().collect() }); let color = self.color(); let test = match self.test_type() { @@ -196,7 +212,7 @@ impl<'a> Monster<'a> { Box::new(x.unpack()) }); let testnestedflatbuffer = self.testnestedflatbuffer().map(|x| { - x.to_vec() + x.into_iter().collect() }); let testempty = self.testempty().map(|x| { Box::new(x.unpack()) @@ -211,7 +227,7 @@ impl<'a> Monster<'a> { let testhashs64_fnv1a = self.testhashs64_fnv1a(); let testhashu64_fnv1a = self.testhashu64_fnv1a(); let testarrayofbools = self.testarrayofbools().map(|x| { - x.to_vec() + x.into_iter().collect() }); let testf = self.testf(); let testf2 = self.testf2(); @@ -223,7 +239,7 @@ impl<'a> Monster<'a> { x.iter().map(|t| t.unpack()).collect() }); let flex = self.flex().map(|x| { - x.to_vec() + x.into_iter().collect() }); let test5 = self.test5().map(|x| { x.iter().map(|t| t.unpack()).collect() @@ -298,7 +314,7 @@ impl<'a> Monster<'a> { }); let signed_enum = self.signed_enum(); let testrequirednestedflatbuffer = self.testrequirednestedflatbuffer().map(|x| { - x.to_vec() + x.into_iter().collect() }); let scalar_key_sorted_tables = self.scalar_key_sorted_tables().map(|x| { x.iter().map(|t| t.unpack()).collect() @@ -308,6 +324,14 @@ impl<'a> Monster<'a> { }); let long_enum_non_enum_default = self.long_enum_non_enum_default(); let long_enum_normal_default = self.long_enum_normal_default(); + let nan_default = self.nan_default(); + let inf_default = self.inf_default(); + let positive_inf_default = self.positive_inf_default(); + let infinity_default = self.infinity_default(); + let positive_infinity_default = self.positive_infinity_default(); + let negative_inf_default = self.negative_inf_default(); + let negative_infinity_default = self.negative_infinity_default(); + let double_inf_default = self.double_inf_default(); MonsterT { pos, mana, @@ -359,24 +383,44 @@ impl<'a> Monster<'a> { native_inline, long_enum_non_enum_default, long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default, } } #[inline] pub fn pos(&self) -> Option<&'a Vec3> { - self._tab.get::(Monster::VT_POS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POS, None)} } #[inline] pub fn mana(&self) -> i16 { - self._tab.get::(Monster::VT_MANA, Some(150)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_MANA, Some(150)).unwrap()} } #[inline] pub fn hp(&self) -> i16 { - self._tab.get::(Monster::VT_HP, Some(100)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_HP, Some(100)).unwrap()} } #[inline] pub fn name(&self) -> &'a str { - self._tab.get::>(Monster::VT_NAME, None).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_NAME, None).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Monster) -> bool { @@ -389,220 +433,434 @@ impl<'a> Monster<'a> { key.cmp(val) } #[inline] - pub fn inventory(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_INVENTORY, None).map(|v| v.safe_slice()) + pub fn inventory(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_INVENTORY, None)} } #[inline] pub fn color(&self) -> Color { - self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap()} } #[inline] pub fn test_type(&self) -> Any { - self._tab.get::(Monster::VT_TEST_TYPE, Some(Any::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TEST_TYPE, Some(Any::NONE)).unwrap()} } #[inline] pub fn test(&self) -> Option> { - self._tab.get::>>(Monster::VT_TEST, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST, None)} } #[inline] - pub fn test4(&self) -> Option<&'a [Test]> { - self._tab.get::>>(Monster::VT_TEST4, None).map(|v| v.safe_slice()) + pub fn test4(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST4, None)} } #[inline] pub fn testarrayofstring(&self) -> Option>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING, None)} } /// an example documentation comment: this will end up in the generated code /// multiline too #[inline] pub fn testarrayoftables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFTABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFTABLES, None)} } #[inline] pub fn enemy(&self) -> Option> { - self._tab.get::>(Monster::VT_ENEMY, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_ENEMY, None)} } #[inline] - pub fn testnestedflatbuffer(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_TESTNESTEDFLATBUFFER, None).map(|v| v.safe_slice()) + pub fn testnestedflatbuffer(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTNESTEDFLATBUFFER, None)} } pub fn testnestedflatbuffer_nested_flatbuffer(&'a self) -> Option> { self.testnestedflatbuffer().map(|data| { use flatbuffers::Follow; - >>::follow(data, 0) + // Safety: + // Created from a valid Table for this object + // Which contains a valid flatbuffer in this slot + unsafe { >>::follow(data.bytes(), 0) } }) } #[inline] pub fn testempty(&self) -> Option> { - self._tab.get::>(Monster::VT_TESTEMPTY, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_TESTEMPTY, None)} } #[inline] pub fn testbool(&self) -> bool { - self._tab.get::(Monster::VT_TESTBOOL, Some(false)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTBOOL, Some(false)).unwrap()} } #[inline] pub fn testhashs32_fnv1(&self) -> i32 { - self._tab.get::(Monster::VT_TESTHASHS32_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS32_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashu32_fnv1(&self) -> u32 { - self._tab.get::(Monster::VT_TESTHASHU32_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU32_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashs64_fnv1(&self) -> i64 { - self._tab.get::(Monster::VT_TESTHASHS64_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS64_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashu64_fnv1(&self) -> u64 { - self._tab.get::(Monster::VT_TESTHASHU64_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU64_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashs32_fnv1a(&self) -> i32 { - self._tab.get::(Monster::VT_TESTHASHS32_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS32_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashu32_fnv1a(&self) -> u32 { - self._tab.get::(Monster::VT_TESTHASHU32_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU32_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashs64_fnv1a(&self) -> i64 { - self._tab.get::(Monster::VT_TESTHASHS64_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS64_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashu64_fnv1a(&self) -> u64 { - self._tab.get::(Monster::VT_TESTHASHU64_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU64_FNV1A, Some(0)).unwrap()} } #[inline] - pub fn testarrayofbools(&self) -> Option<&'a [bool]> { - self._tab.get::>>(Monster::VT_TESTARRAYOFBOOLS, None).map(|v| v.safe_slice()) + pub fn testarrayofbools(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTARRAYOFBOOLS, None)} } #[inline] pub fn testf(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF, Some(3.14159)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF, Some(3.14159)).unwrap()} } #[inline] pub fn testf2(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF2, Some(3.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF2, Some(3.0)).unwrap()} } #[inline] pub fn testf3(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF3, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF3, Some(0.0)).unwrap()} } #[inline] pub fn testarrayofstring2(&self) -> Option>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING2, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING2, None)} } #[inline] - pub fn testarrayofsortedstruct(&self) -> Option<&'a [Ability]> { - self._tab.get::>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, None).map(|v| v.safe_slice()) + pub fn testarrayofsortedstruct(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, None)} } #[inline] - pub fn flex(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_FLEX, None).map(|v| v.safe_slice()) + pub fn flex(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_FLEX, None)} } #[inline] - pub fn test5(&self) -> Option<&'a [Test]> { - self._tab.get::>>(Monster::VT_TEST5, None).map(|v| v.safe_slice()) + pub fn test5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST5, None)} } #[inline] pub fn vector_of_longs(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_LONGS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_LONGS, None)} } #[inline] pub fn vector_of_doubles(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_DOUBLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_DOUBLES, None)} } #[inline] pub fn parent_namespace_test(&self) -> Option> { - self._tab.get::>(Monster::VT_PARENT_NAMESPACE_TEST, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_PARENT_NAMESPACE_TEST, None)} } #[inline] pub fn vector_of_referrables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_VECTOR_OF_REFERRABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_VECTOR_OF_REFERRABLES, None)} } #[inline] pub fn single_weak_reference(&self) -> u64 { - self._tab.get::(Monster::VT_SINGLE_WEAK_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_SINGLE_WEAK_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_weak_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, None)} } #[inline] pub fn vector_of_strong_referrables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, None)} } #[inline] pub fn co_owning_reference(&self) -> u64 { - self._tab.get::(Monster::VT_CO_OWNING_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_CO_OWNING_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_co_owning_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, None)} } #[inline] pub fn non_owning_reference(&self) -> u64 { - self._tab.get::(Monster::VT_NON_OWNING_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NON_OWNING_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_non_owning_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, None)} } #[inline] pub fn any_unique_type(&self) -> AnyUniqueAliases { - self._tab.get::(Monster::VT_ANY_UNIQUE_TYPE, Some(AnyUniqueAliases::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_ANY_UNIQUE_TYPE, Some(AnyUniqueAliases::NONE)).unwrap()} } #[inline] pub fn any_unique(&self) -> Option> { - self._tab.get::>>(Monster::VT_ANY_UNIQUE, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_ANY_UNIQUE, None)} } #[inline] pub fn any_ambiguous_type(&self) -> AnyAmbiguousAliases { - self._tab.get::(Monster::VT_ANY_AMBIGUOUS_TYPE, Some(AnyAmbiguousAliases::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_ANY_AMBIGUOUS_TYPE, Some(AnyAmbiguousAliases::NONE)).unwrap()} } #[inline] pub fn any_ambiguous(&self) -> Option> { - self._tab.get::>>(Monster::VT_ANY_AMBIGUOUS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_ANY_AMBIGUOUS, None)} } #[inline] pub fn vector_of_enums(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_ENUMS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_ENUMS, None)} } #[inline] pub fn signed_enum(&self) -> Race { - self._tab.get::(Monster::VT_SIGNED_ENUM, Some(Race::None)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_SIGNED_ENUM, Some(Race::None)).unwrap()} } #[inline] - pub fn testrequirednestedflatbuffer(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_TESTREQUIREDNESTEDFLATBUFFER, None).map(|v| v.safe_slice()) + pub fn testrequirednestedflatbuffer(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTREQUIREDNESTEDFLATBUFFER, None)} } pub fn testrequirednestedflatbuffer_nested_flatbuffer(&'a self) -> Option> { self.testrequirednestedflatbuffer().map(|data| { use flatbuffers::Follow; - >>::follow(data, 0) + // Safety: + // Created from a valid Table for this object + // Which contains a valid flatbuffer in this slot + unsafe { >>::follow(data.bytes(), 0) } }) } #[inline] pub fn scalar_key_sorted_tables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_SCALAR_KEY_SORTED_TABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_SCALAR_KEY_SORTED_TABLES, None)} } #[inline] pub fn native_inline(&self) -> Option<&'a Test> { - self._tab.get::(Monster::VT_NATIVE_INLINE, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NATIVE_INLINE, None)} } #[inline] pub fn long_enum_non_enum_default(&self) -> LongEnum { - self._tab.get::(Monster::VT_LONG_ENUM_NON_ENUM_DEFAULT, Some(Default::default())).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_LONG_ENUM_NON_ENUM_DEFAULT, Some(Default::default())).unwrap()} } #[inline] pub fn long_enum_normal_default(&self) -> LongEnum { - self._tab.get::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, Some(LongEnum::LongOne)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, Some(LongEnum::LongOne)).unwrap()} + } + #[inline] + pub fn nan_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NAN_DEFAULT, Some(f32::NAN)).unwrap()} + } + #[inline] + pub fn inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_INF_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn positive_inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POSITIVE_INF_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_INFINITY_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn positive_infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POSITIVE_INFINITY_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn negative_inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NEGATIVE_INF_DEFAULT, Some(f32::NEG_INFINITY)).unwrap()} + } + #[inline] + pub fn negative_infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NEGATIVE_INFINITY_DEFAULT, Some(f32::NEG_INFINITY)).unwrap()} + } + #[inline] + pub fn double_inf_default(&self) -> f64 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_DOUBLE_INF_DEFAULT, Some(f64::INFINITY)).unwrap()} } #[inline] #[allow(non_snake_case)] pub fn test_as_monster(&self) -> Option> { if self.test_type() == Any::Monster { - self.test().map(Monster::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -612,7 +870,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn test_as_test_simple_table_with_enum(&self) -> Option> { if self.test_type() == Any::TestSimpleTableWithEnum { - self.test().map(TestSimpleTableWithEnum::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TestSimpleTableWithEnum::init_from_table(t) } + }) } else { None } @@ -622,7 +885,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn test_as_my_game_example_2_monster(&self) -> Option> { if self.test_type() == Any::MyGame_Example2_Monster { - self.test().map(super::example_2::Monster::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::example_2::Monster::init_from_table(t) } + }) } else { None } @@ -632,7 +900,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_m(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::M { - self.any_unique().map(Monster::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -642,7 +915,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_ts(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::TS { - self.any_unique().map(TestSimpleTableWithEnum::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TestSimpleTableWithEnum::init_from_table(t) } + }) } else { None } @@ -652,7 +930,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_m2(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::M2 { - self.any_unique().map(super::example_2::Monster::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::example_2::Monster::init_from_table(t) } + }) } else { None } @@ -662,7 +945,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m1(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M1 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -672,7 +960,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m2(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M2 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -682,7 +975,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m3(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M3 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -768,6 +1066,14 @@ impl flatbuffers::Verifiable for Monster<'_> { .visit_field::("native_inline", Self::VT_NATIVE_INLINE, false)? .visit_field::("long_enum_non_enum_default", Self::VT_LONG_ENUM_NON_ENUM_DEFAULT, false)? .visit_field::("long_enum_normal_default", Self::VT_LONG_ENUM_NORMAL_DEFAULT, false)? + .visit_field::("nan_default", Self::VT_NAN_DEFAULT, false)? + .visit_field::("inf_default", Self::VT_INF_DEFAULT, false)? + .visit_field::("positive_inf_default", Self::VT_POSITIVE_INF_DEFAULT, false)? + .visit_field::("infinity_default", Self::VT_INFINITY_DEFAULT, false)? + .visit_field::("positive_infinity_default", Self::VT_POSITIVE_INFINITY_DEFAULT, false)? + .visit_field::("negative_inf_default", Self::VT_NEGATIVE_INF_DEFAULT, false)? + .visit_field::("negative_infinity_default", Self::VT_NEGATIVE_INFINITY_DEFAULT, false)? + .visit_field::("double_inf_default", Self::VT_DOUBLE_INF_DEFAULT, false)? .finish(); Ok(()) } @@ -826,6 +1132,14 @@ pub struct MonsterArgs<'a> { pub native_inline: Option<&'a Test>, pub long_enum_non_enum_default: LongEnum, pub long_enum_normal_default: LongEnum, + pub nan_default: f32, + pub inf_default: f32, + pub positive_inf_default: f32, + pub infinity_default: f32, + pub positive_infinity_default: f32, + pub negative_inf_default: f32, + pub negative_infinity_default: f32, + pub double_inf_default: f64, } impl<'a> Default for MonsterArgs<'a> { #[inline] @@ -884,6 +1198,14 @@ impl<'a> Default for MonsterArgs<'a> { native_inline: None, long_enum_non_enum_default: Default::default(), long_enum_normal_default: LongEnum::LongOne, + nan_default: f32::NAN, + inf_default: f32::INFINITY, + positive_inf_default: f32::INFINITY, + infinity_default: f32::INFINITY, + positive_infinity_default: f32::INFINITY, + negative_inf_default: f32::NEG_INFINITY, + negative_infinity_default: f32::NEG_INFINITY, + double_inf_default: f64::INFINITY, } } } @@ -1106,6 +1428,38 @@ impl<'a: 'b, 'b> MonsterBuilder<'a, 'b> { self.fbb_.push_slot::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, long_enum_normal_default, LongEnum::LongOne); } #[inline] + pub fn add_nan_default(&mut self, nan_default: f32) { + self.fbb_.push_slot::(Monster::VT_NAN_DEFAULT, nan_default, f32::NAN); + } + #[inline] + pub fn add_inf_default(&mut self, inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_INF_DEFAULT, inf_default, f32::INFINITY); + } + #[inline] + pub fn add_positive_inf_default(&mut self, positive_inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, f32::INFINITY); + } + #[inline] + pub fn add_infinity_default(&mut self, infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_INFINITY_DEFAULT, infinity_default, f32::INFINITY); + } + #[inline] + pub fn add_positive_infinity_default(&mut self, positive_infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, f32::INFINITY); + } + #[inline] + pub fn add_negative_inf_default(&mut self, negative_inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, f32::NEG_INFINITY); + } + #[inline] + pub fn add_negative_infinity_default(&mut self, negative_infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, f32::NEG_INFINITY); + } + #[inline] + pub fn add_double_inf_default(&mut self, double_inf_default: f64) { + self.fbb_.push_slot::(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, f64::INFINITY); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b> { let start = _fbb.start_table(); MonsterBuilder { @@ -1255,6 +1609,14 @@ impl core::fmt::Debug for Monster<'_> { ds.field("native_inline", &self.native_inline()); ds.field("long_enum_non_enum_default", &self.long_enum_non_enum_default()); ds.field("long_enum_normal_default", &self.long_enum_normal_default()); + ds.field("nan_default", &self.nan_default()); + ds.field("inf_default", &self.inf_default()); + ds.field("positive_inf_default", &self.positive_inf_default()); + ds.field("infinity_default", &self.infinity_default()); + ds.field("positive_infinity_default", &self.positive_infinity_default()); + ds.field("negative_inf_default", &self.negative_inf_default()); + ds.field("negative_infinity_default", &self.negative_infinity_default()); + ds.field("double_inf_default", &self.double_inf_default()); ds.finish() } } @@ -1311,6 +1673,14 @@ pub struct MonsterT { pub native_inline: Option, pub long_enum_non_enum_default: LongEnum, pub long_enum_normal_default: LongEnum, + pub nan_default: f32, + pub inf_default: f32, + pub positive_inf_default: f32, + pub infinity_default: f32, + pub positive_infinity_default: f32, + pub negative_inf_default: f32, + pub negative_infinity_default: f32, + pub double_inf_default: f64, } impl Default for MonsterT { fn default() -> Self { @@ -1365,6 +1735,14 @@ impl Default for MonsterT { native_inline: None, long_enum_non_enum_default: Default::default(), long_enum_normal_default: LongEnum::LongOne, + nan_default: f32::NAN, + inf_default: f32::INFINITY, + positive_inf_default: f32::INFINITY, + infinity_default: f32::INFINITY, + positive_infinity_default: f32::INFINITY, + negative_inf_default: f32::NEG_INFINITY, + negative_infinity_default: f32::NEG_INFINITY, + double_inf_default: f64::INFINITY, } } } @@ -1391,7 +1769,7 @@ impl MonsterT { let w: Vec<_> = x.iter().map(|t| t.pack()).collect();_fbb.create_vector(&w) }); let testarrayofstring = self.testarrayofstring.as_ref().map(|x|{ - let w: Vec<_> = x.iter().map(|s| s.as_ref()).collect();_fbb.create_vector_of_strings(&w) + let w: Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();_fbb.create_vector(&w) }); let testarrayoftables = self.testarrayoftables.as_ref().map(|x|{ let w: Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w) @@ -1421,7 +1799,7 @@ impl MonsterT { let testf2 = self.testf2; let testf3 = self.testf3; let testarrayofstring2 = self.testarrayofstring2.as_ref().map(|x|{ - let w: Vec<_> = x.iter().map(|s| s.as_ref()).collect();_fbb.create_vector_of_strings(&w) + let w: Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();_fbb.create_vector(&w) }); let testarrayofsortedstruct = self.testarrayofsortedstruct.as_ref().map(|x|{ let w: Vec<_> = x.iter().map(|t| t.pack()).collect();_fbb.create_vector(&w) @@ -1477,6 +1855,14 @@ impl MonsterT { let native_inline = native_inline_tmp.as_ref(); let long_enum_non_enum_default = self.long_enum_non_enum_default; let long_enum_normal_default = self.long_enum_normal_default; + let nan_default = self.nan_default; + let inf_default = self.inf_default; + let positive_inf_default = self.positive_inf_default; + let infinity_default = self.infinity_default; + let positive_infinity_default = self.positive_infinity_default; + let negative_inf_default = self.negative_inf_default; + let negative_infinity_default = self.negative_infinity_default; + let double_inf_default = self.double_inf_default; Monster::create(_fbb, &MonsterArgs{ pos, mana, @@ -1531,21 +1917,17 @@ impl MonsterT { native_inline, long_enum_non_enum_default, long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default, }) } } -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::root_unchecked::>(buf) } -} - -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_size_prefixed_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::size_prefixed_root_unchecked::>(buf) } -} - #[inline] /// Verifies that a buffer of bytes contains a `Monster` /// and returns it. diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/race_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/race_generated.rs index 47f3855a06..dd48b4e1ee 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/race_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/race_generated.rs @@ -63,10 +63,8 @@ impl core::fmt::Debug for Race { impl<'a> flatbuffers::Follow<'a> for Race { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -74,21 +72,21 @@ impl<'a> flatbuffers::Follow<'a> for Race { impl flatbuffers::Push for Race { type Output = Race; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Race { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/referrable_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/referrable_generated.rs index 81a9d60bad..5a031cefae 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/referrable_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/referrable_generated.rs @@ -19,8 +19,8 @@ pub struct Referrable<'a> { impl<'a> flatbuffers::Follow<'a> for Referrable<'a> { type Inner = Referrable<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> Referrable<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Referrable { _tab: table } } #[allow(unused_mut)] @@ -54,7 +54,10 @@ impl<'a> Referrable<'a> { #[inline] pub fn id(&self) -> u64 { - self._tab.get::(Referrable::VT_ID, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Referrable::VT_ID, Some(0)).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Referrable) -> bool { diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/stat_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/stat_generated.rs index 98bc331718..3fd55f9a2a 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/stat_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/stat_generated.rs @@ -19,8 +19,8 @@ pub struct Stat<'a> { impl<'a> flatbuffers::Follow<'a> for Stat<'a> { type Inner = Stat<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -34,7 +34,7 @@ impl<'a> Stat<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Stat { _tab: table } } #[allow(unused_mut)] @@ -64,15 +64,24 @@ impl<'a> Stat<'a> { #[inline] pub fn id(&self) -> Option<&'a str> { - self._tab.get::>(Stat::VT_ID, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Stat::VT_ID, None)} } #[inline] pub fn val(&self) -> i64 { - self._tab.get::(Stat::VT_VAL, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Stat::VT_VAL, Some(0)).unwrap()} } #[inline] pub fn count(&self) -> u16 { - self._tab.get::(Stat::VT_COUNT, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Stat::VT_COUNT, Some(0)).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Stat) -> bool { diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_generated.rs index bc05c77f04..77410a6744 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_generated.rs @@ -29,39 +29,25 @@ impl core::fmt::Debug for StructOfStructs { } impl flatbuffers::SimpleToVerifyInSlice for StructOfStructs {} -impl flatbuffers::SafeSliceAccess for StructOfStructs {} impl<'a> flatbuffers::Follow<'a> for StructOfStructs { type Inner = &'a StructOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a StructOfStructs>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a StructOfStructs { type Inner = &'a StructOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for StructOfStructs { type Output = StructOfStructs; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const StructOfStructs as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b StructOfStructs { - type Output = StructOfStructs; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const StructOfStructs as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const StructOfStructs as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -95,6 +81,9 @@ impl<'a> StructOfStructs { } pub fn a(&self) -> &Ability { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[0..].as_ptr() as *const Ability) } } @@ -104,6 +93,9 @@ impl<'a> StructOfStructs { } pub fn b(&self) -> &Test { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[8..].as_ptr() as *const Test) } } @@ -113,6 +105,9 @@ impl<'a> StructOfStructs { } pub fn c(&self) -> &Ability { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[12..].as_ptr() as *const Ability) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_of_structs_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_of_structs_generated.rs index 9c7ae0b330..4e4597f7b1 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_of_structs_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/struct_of_structs_of_structs_generated.rs @@ -27,39 +27,25 @@ impl core::fmt::Debug for StructOfStructsOfStructs { } impl flatbuffers::SimpleToVerifyInSlice for StructOfStructsOfStructs {} -impl flatbuffers::SafeSliceAccess for StructOfStructsOfStructs {} impl<'a> flatbuffers::Follow<'a> for StructOfStructsOfStructs { type Inner = &'a StructOfStructsOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a StructOfStructsOfStructs>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a StructOfStructsOfStructs { type Inner = &'a StructOfStructsOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for StructOfStructsOfStructs { type Output = StructOfStructsOfStructs; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const StructOfStructsOfStructs as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b StructOfStructsOfStructs { - type Output = StructOfStructsOfStructs; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const StructOfStructsOfStructs as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const StructOfStructsOfStructs as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -89,6 +75,9 @@ impl<'a> StructOfStructsOfStructs { } pub fn a(&self) -> &StructOfStructs { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[0..].as_ptr() as *const StructOfStructs) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/test_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/test_generated.rs index 1b72ee6d6d..98494510b7 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/test_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/test_generated.rs @@ -28,39 +28,25 @@ impl core::fmt::Debug for Test { } impl flatbuffers::SimpleToVerifyInSlice for Test {} -impl flatbuffers::SafeSliceAccess for Test {} impl<'a> flatbuffers::Follow<'a> for Test { type Inner = &'a Test; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Test>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Test { type Inner = &'a Test; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Test { type Output = Test; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Test as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Test { - type Output = Test; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Test as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Test as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -92,47 +78,59 @@ impl<'a> Test { } pub fn a(&self) -> i16 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i16) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i16 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn b(&self) -> i8 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[2..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_b(&mut self, x: i8) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i8 as *const u8, + &x_le as *const _ as *const u8, self.0[2..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/test_simple_table_with_enum_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/test_simple_table_with_enum_generated.rs index e97dfa0a80..063392a35c 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/test_simple_table_with_enum_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/test_simple_table_with_enum_generated.rs @@ -19,8 +19,8 @@ pub struct TestSimpleTableWithEnum<'a> { impl<'a> flatbuffers::Follow<'a> for TestSimpleTableWithEnum<'a> { type Inner = TestSimpleTableWithEnum<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TestSimpleTableWithEnum<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TestSimpleTableWithEnum { _tab: table } } #[allow(unused_mut)] @@ -54,7 +54,10 @@ impl<'a> TestSimpleTableWithEnum<'a> { #[inline] pub fn color(&self) -> Color { - self._tab.get::(TestSimpleTableWithEnum::VT_COLOR, Some(Color::Green)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TestSimpleTableWithEnum::VT_COLOR, Some(Color::Green)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/type_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/type_aliases_generated.rs index dfa8d56d44..4c6eef7efc 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/type_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/type_aliases_generated.rs @@ -19,8 +19,8 @@ pub struct TypeAliases<'a> { impl<'a> flatbuffers::Follow<'a> for TypeAliases<'a> { type Inner = TypeAliases<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -43,7 +43,7 @@ impl<'a> TypeAliases<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TypeAliases { _tab: table } } #[allow(unused_mut)] @@ -79,7 +79,7 @@ impl<'a> TypeAliases<'a> { let f32_ = self.f32_(); let f64_ = self.f64_(); let v8 = self.v8().map(|x| { - x.to_vec() + x.into_iter().collect() }); let vf64 = self.vf64().map(|x| { x.into_iter().collect() @@ -102,51 +102,87 @@ impl<'a> TypeAliases<'a> { #[inline] pub fn i8_(&self) -> i8 { - self._tab.get::(TypeAliases::VT_I8_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I8_, Some(0)).unwrap()} } #[inline] pub fn u8_(&self) -> u8 { - self._tab.get::(TypeAliases::VT_U8_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U8_, Some(0)).unwrap()} } #[inline] pub fn i16_(&self) -> i16 { - self._tab.get::(TypeAliases::VT_I16_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I16_, Some(0)).unwrap()} } #[inline] pub fn u16_(&self) -> u16 { - self._tab.get::(TypeAliases::VT_U16_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U16_, Some(0)).unwrap()} } #[inline] pub fn i32_(&self) -> i32 { - self._tab.get::(TypeAliases::VT_I32_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I32_, Some(0)).unwrap()} } #[inline] pub fn u32_(&self) -> u32 { - self._tab.get::(TypeAliases::VT_U32_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U32_, Some(0)).unwrap()} } #[inline] pub fn i64_(&self) -> i64 { - self._tab.get::(TypeAliases::VT_I64_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I64_, Some(0)).unwrap()} } #[inline] pub fn u64_(&self) -> u64 { - self._tab.get::(TypeAliases::VT_U64_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U64_, Some(0)).unwrap()} } #[inline] pub fn f32_(&self) -> f32 { - self._tab.get::(TypeAliases::VT_F32_, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_F32_, Some(0.0)).unwrap()} } #[inline] pub fn f64_(&self) -> f64 { - self._tab.get::(TypeAliases::VT_F64_, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_F64_, Some(0.0)).unwrap()} } #[inline] - pub fn v8(&self) -> Option<&'a [i8]> { - self._tab.get::>>(TypeAliases::VT_V8, None).map(|v| v.safe_slice()) + pub fn v8(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(TypeAliases::VT_V8, None)} } #[inline] pub fn vf64(&self) -> Option> { - self._tab.get::>>(TypeAliases::VT_VF64, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(TypeAliases::VT_VF64, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example/vec_3_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example/vec_3_generated.rs index fa0ab53765..b4f076522e 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example/vec_3_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example/vec_3_generated.rs @@ -32,39 +32,25 @@ impl core::fmt::Debug for Vec3 { } impl flatbuffers::SimpleToVerifyInSlice for Vec3 {} -impl flatbuffers::SafeSliceAccess for Vec3 {} impl<'a> flatbuffers::Follow<'a> for Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Vec3>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Vec3 { type Output = Vec3; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Vec3 { - type Output = Vec3; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Vec3 as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -104,121 +90,154 @@ impl<'a> Vec3 { } pub fn x(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_x(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_y(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[8..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_z(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[8..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test1(&self) -> f64 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[16..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_test1(&mut self, x: f64) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f64 as *const u8, + &x_le as *const _ as *const u8, self.0[16..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test2(&self) -> Color { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[24..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_test2(&mut self, x: Color) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const Color as *const u8, + &x_le as *const _ as *const u8, self.0[24..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test3(&self) -> &Test { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[26..].as_ptr() as *const Test) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/example_2/monster_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/example_2/monster_generated.rs index 34e0db12a1..a358d3bba3 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/example_2/monster_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/example_2/monster_generated.rs @@ -19,8 +19,8 @@ pub struct Monster<'a> { impl<'a> flatbuffers::Follow<'a> for Monster<'a> { type Inner = Monster<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -31,7 +31,7 @@ impl<'a> Monster<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Monster { _tab: table } } #[allow(unused_mut)] diff --git a/third_party/flatbuffers/tests/monster_test/my_game/in_parent_namespace_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/in_parent_namespace_generated.rs index 263fae76cd..922048092b 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/in_parent_namespace_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/in_parent_namespace_generated.rs @@ -19,8 +19,8 @@ pub struct InParentNamespace<'a> { impl<'a> flatbuffers::Follow<'a> for InParentNamespace<'a> { type Inner = InParentNamespace<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -31,7 +31,7 @@ impl<'a> InParentNamespace<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { InParentNamespace { _tab: table } } #[allow(unused_mut)] diff --git a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/from_include_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/from_include_generated.rs index 3c5165d17e..70cb407c1e 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/from_include_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/from_include_generated.rs @@ -51,10 +51,8 @@ impl core::fmt::Debug for FromInclude { impl<'a> flatbuffers::Follow<'a> for FromInclude { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -62,21 +60,21 @@ impl<'a> flatbuffers::Follow<'a> for FromInclude { impl flatbuffers::Push for FromInclude { type Output = FromInclude; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for FromInclude { + type Scalar = i64; #[inline] - fn to_little_endian(self) -> Self { - let b = i64::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i64 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i64::from_le(self.0); + fn from_little_endian(v: i64) -> Self { + let b = i64::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/table_b_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/table_b_generated.rs index da7b9378b0..5652195b5f 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/table_b_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/table_b_generated.rs @@ -19,8 +19,8 @@ pub struct TableB<'a> { impl<'a> flatbuffers::Follow<'a> for TableB<'a> { type Inner = TableB<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableB<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableB { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableB<'a> { #[inline] pub fn a(&self) -> Option> { - self._tab.get::>(TableB::VT_A, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableB::VT_A, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/unused_generated.rs b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/unused_generated.rs index 1e4ad9c7bb..69be4869ee 100644 --- a/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/unused_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/my_game/other_name_space/unused_generated.rs @@ -27,39 +27,25 @@ impl core::fmt::Debug for Unused { } impl flatbuffers::SimpleToVerifyInSlice for Unused {} -impl flatbuffers::SafeSliceAccess for Unused {} impl<'a> flatbuffers::Follow<'a> for Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Unused>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Unused { type Output = Unused; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Unused { - type Output = Unused; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Unused as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -89,24 +75,30 @@ impl<'a> Unused { } pub fn a(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test/table_a_generated.rs b/third_party/flatbuffers/tests/monster_test/table_a_generated.rs index 0e6a78de14..fd979b092d 100644 --- a/third_party/flatbuffers/tests/monster_test/table_a_generated.rs +++ b/third_party/flatbuffers/tests/monster_test/table_a_generated.rs @@ -19,8 +19,8 @@ pub struct TableA<'a> { impl<'a> flatbuffers::Follow<'a> for TableA<'a> { type Inner = TableA<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableA<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableA { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TableA<'a> { #[inline] pub fn b(&self) -> Option> { - self._tab.get::>(TableA::VT_B, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableA::VT_B, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test_bfbs_generated.h b/third_party/flatbuffers/tests/monster_test_bfbs_generated.h index f8bc4aaa43..f244529590 100644 --- a/third_party/flatbuffers/tests/monster_test_bfbs_generated.h +++ b/third_party/flatbuffers/tests/monster_test_bfbs_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -19,101 +19,101 @@ namespace Example { struct MonsterBinarySchema { static const uint8_t *data() { // Buffer containing the binary schema. - static const uint8_t bfbsData[14784] = { + static const uint8_t bfbsData[15736] = { 0x1C,0x00,0x00,0x00,0x42,0x46,0x42,0x53,0x14,0x00,0x20,0x00,0x04,0x00,0x08,0x00,0x0C,0x00,0x10,0x00, 0x14,0x00,0x18,0x00,0x00,0x00,0x1C,0x00,0x14,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x34,0x00,0x00,0x00, 0x24,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xA0,0x0E,0x00,0x00,0x08,0x00,0x00,0x00,0x80,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0xDC,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6D,0x6F,0x6E,0x00,0x04,0x00,0x00,0x00, 0x4D,0x4F,0x4E,0x53,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4C,0x05,0x00,0x00,0xB8,0x02,0x00,0x00, 0xF8,0x03,0x00,0x00,0x04,0x09,0x00,0x00,0x90,0x06,0x00,0x00,0xBC,0x07,0x00,0x00,0xEC,0x0A,0x00,0x00, - 0x0F,0x00,0x00,0x00,0x9C,0x31,0x00,0x00,0x50,0x0E,0x00,0x00,0xE8,0x2D,0x00,0x00,0xC4,0x2E,0x00,0x00, - 0x64,0x30,0x00,0x00,0xD8,0x2F,0x00,0x00,0xA0,0x35,0x00,0x00,0x80,0x34,0x00,0x00,0x70,0x0B,0x00,0x00, - 0x78,0x32,0x00,0x00,0x68,0x36,0x00,0x00,0xA0,0x36,0x00,0x00,0x90,0x37,0x00,0x00,0x44,0x38,0x00,0x00, - 0xEC,0x36,0x00,0x00,0x03,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x64,0xCB,0xFF,0xFF,0x94,0x36,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xE0,0x36,0x00,0x00, - 0x78,0xCB,0xFF,0xFF,0x34,0x38,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xCC,0x36,0x00,0x00, - 0x24,0x38,0x00,0x00,0x90,0xCB,0xFF,0xFF,0xC0,0x36,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0xB4,0x36,0x00,0x00,0x0C,0x38,0x00,0x00,0x00,0x00,0x0E,0x00,0x14,0x00,0x04,0x00,0x08,0x00,0x00,0x00, + 0x0F,0x00,0x00,0x00,0x54,0x35,0x00,0x00,0x50,0x0E,0x00,0x00,0xA0,0x31,0x00,0x00,0x7C,0x32,0x00,0x00, + 0x1C,0x34,0x00,0x00,0x90,0x33,0x00,0x00,0x58,0x39,0x00,0x00,0x38,0x38,0x00,0x00,0x70,0x0B,0x00,0x00, + 0x30,0x36,0x00,0x00,0x20,0x3A,0x00,0x00,0x58,0x3A,0x00,0x00,0x48,0x3B,0x00,0x00,0xFC,0x3B,0x00,0x00, + 0xA4,0x3A,0x00,0x00,0x03,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0xAC,0xC7,0xFF,0xFF,0x4C,0x3A,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x98,0x3A,0x00,0x00, + 0xC0,0xC7,0xFF,0xFF,0xEC,0x3B,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x84,0x3A,0x00,0x00, + 0xDC,0x3B,0x00,0x00,0xD8,0xC7,0xFF,0xFF,0x78,0x3A,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x6C,0x3A,0x00,0x00,0xC4,0x3B,0x00,0x00,0x00,0x00,0x0E,0x00,0x14,0x00,0x04,0x00,0x08,0x00,0x00,0x00, 0x0C,0x00,0x10,0x00,0x0E,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x34,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x88,0x01,0x00,0x00,0xF4,0x00,0x00,0x00, + 0xEC,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x88,0x01,0x00,0x00,0xF4,0x00,0x00,0x00, 0x90,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45, 0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x53,0x74,0x6F,0x72,0x61,0x67, - 0x65,0x00,0x00,0x00,0xBA,0xFE,0xFF,0xFF,0x48,0x00,0x00,0x00,0x5C,0x0D,0x00,0x00,0xD4,0x2D,0x00,0x00, + 0x65,0x00,0x00,0x00,0xBA,0xFE,0xFF,0xFF,0x48,0x00,0x00,0x00,0x5C,0x0D,0x00,0x00,0x8C,0x31,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x2C,0xCC,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x62,0x69,0x64,0x69, + 0x74,0xC8,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x62,0x69,0x64,0x69, 0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x73,0x74,0x72,0x65,0x61,0x6D,0x69,0x6E,0x67,0x00,0x00,0x00, 0x12,0x00,0x00,0x00,0x47,0x65,0x74,0x4D,0x69,0x6E,0x4D,0x61,0x78,0x48,0x69,0x74,0x50,0x6F,0x69,0x6E, - 0x74,0x73,0x00,0x00,0x1E,0xFF,0xFF,0xFF,0x48,0x00,0x00,0x00,0xF8,0x0C,0x00,0x00,0x70,0x2D,0x00,0x00, + 0x74,0x73,0x00,0x00,0x1E,0xFF,0xFF,0xFF,0x48,0x00,0x00,0x00,0xF8,0x0C,0x00,0x00,0x28,0x31,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x90,0xCC,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x63,0x6C,0x69,0x65, + 0xD8,0xC8,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x63,0x6C,0x69,0x65, 0x6E,0x74,0x00,0x00,0x09,0x00,0x00,0x00,0x73,0x74,0x72,0x65,0x61,0x6D,0x69,0x6E,0x67,0x00,0x00,0x00, 0x0E,0x00,0x00,0x00,0x47,0x65,0x74,0x4D,0x61,0x78,0x48,0x69,0x74,0x50,0x6F,0x69,0x6E,0x74,0x00,0x00, - 0x7E,0xFF,0xFF,0xFF,0x70,0x00,0x00,0x00,0x14,0x2D,0x00,0x00,0x94,0x0C,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x7E,0xFF,0xFF,0xFF,0x70,0x00,0x00,0x00,0xCC,0x30,0x00,0x00,0x94,0x0C,0x00,0x00,0x0C,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0xF4,0xCC,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x73,0x65,0x72,0x76, + 0x3C,0xC9,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x73,0x65,0x72,0x76, 0x65,0x72,0x00,0x00,0x09,0x00,0x00,0x00,0x73,0x74,0x72,0x65,0x61,0x6D,0x69,0x6E,0x67,0x00,0x00,0x00, - 0x1C,0xCD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, + 0x64,0xC9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, 0x0A,0x00,0x00,0x00,0x69,0x64,0x65,0x6D,0x70,0x6F,0x74,0x65,0x6E,0x74,0x00,0x00,0x08,0x00,0x00,0x00, 0x52,0x65,0x74,0x72,0x69,0x65,0x76,0x65,0x00,0x00,0x0E,0x00,0x18,0x00,0x04,0x00,0x08,0x00,0x0C,0x00, - 0x10,0x00,0x14,0x00,0x0E,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x08,0x0C,0x00,0x00,0x80,0x2C,0x00,0x00, + 0x10,0x00,0x14,0x00,0x0E,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x08,0x0C,0x00,0x00,0x38,0x30,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x80,0xCD,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6E,0x6F,0x6E,0x65, + 0xC8,0xC9,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6E,0x6F,0x6E,0x65, 0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x73,0x74,0x72,0x65,0x61,0x6D,0x69,0x6E,0x67,0x00,0x00,0x00, 0x05,0x00,0x00,0x00,0x53,0x74,0x6F,0x72,0x65,0x00,0x00,0x00,0x82,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x40,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x30,0x34,0x00,0x00, - 0x00,0x00,0x00,0x00,0x34,0xCD,0xFF,0xFF,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x40,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE8,0x37,0x00,0x00, + 0x00,0x00,0x00,0x00,0x7C,0xC9,0xFF,0xFF,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0xA4,0x00,0x00,0x00,0x68,0x00,0x00,0x00, 0x2C,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, 0x6C,0x65,0x2E,0x41,0x6E,0x79,0x41,0x6D,0x62,0x69,0x67,0x75,0x6F,0x75,0x73,0x41,0x6C,0x69,0x61,0x73, 0x65,0x73,0x00,0x00,0x7E,0xF8,0xFF,0xFF,0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xCA,0xFF,0xFF, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xC7,0xFF,0xFF, 0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x4D,0x33,0x00,0x00, 0xB6,0xF8,0xFF,0xFF,0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0xCB,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xC7,0xFF,0xFF,0x00,0x00,0x00,0x0F, 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x4D,0x32,0x00,0x00,0xEE,0xF8,0xFF,0xFF, 0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xCB,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA8,0xC7,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x4D,0x31,0x00,0x00,0x72,0xF8,0xFF,0xFF,0x1C,0x00,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0xF8,0xFF,0xFF,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x4E,0x4F,0x4E,0x45,0x00,0x00,0x00,0x00,0xC6,0xFE,0xFF,0xFF, 0x00,0x00,0x00,0x01,0x40,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0xEC,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xCE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00, + 0xA4,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xCA,0xFF,0xFF,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD8,0x00,0x00,0x00,0xA0,0x00,0x00,0x00, 0x64,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45, 0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x41,0x6E,0x79,0x55,0x6E,0x69,0x71,0x75,0x65,0x41,0x6C,0x69,0x61, 0x73,0x65,0x73,0x00,0xBE,0xF9,0xFF,0xFF,0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xCC,0xFF,0xFF, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xC8,0xFF,0xFF, 0x00,0x00,0x00,0x0F,0x0A,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x4D,0x32,0x00,0x00, 0xF6,0xF9,0xFF,0xFF,0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0xCC,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0xC8,0xFF,0xFF,0x00,0x00,0x00,0x0F, 0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x54,0x53,0x00,0x00,0x1E,0xFC,0xFF,0xFF, 0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x9C,0xCC,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xE4,0xC8,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x4D,0x00,0x00,0x00,0xAE,0xF9,0xFF,0xFF,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0xF9,0xFF,0xFF,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x4E,0x4F,0x4E,0x45,0x00,0x00,0x12,0x00,0x1C,0x00,0x08,0x00,0x0C,0x00,0x07,0x00, 0x10,0x00,0x00,0x00,0x14,0x00,0x18,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x40,0x00,0x00,0x00, - 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA0,0x31,0x00,0x00,0x00,0x00,0x00,0x00, - 0xC4,0xCF,0xFF,0xFF,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x58,0x35,0x00,0x00,0x00,0x00,0x00,0x00, + 0x0C,0xCC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, 0x12,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x41, 0x6E,0x79,0x00,0x00,0xEE,0xFC,0xFF,0xFF,0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0xCD,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB4,0xC9,0xFF,0xFF,0x00,0x00,0x00,0x0F, 0x0A,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x5F,0x45, 0x78,0x61,0x6D,0x70,0x6C,0x65,0x32,0x5F,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x36,0xFD,0xFF,0xFF, 0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xB4,0xCD,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xFC,0xC9,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x17,0x00,0x00,0x00,0x54,0x65,0x73,0x74,0x53,0x69,0x6D,0x70,0x6C,0x65,0x54,0x61,0x62,0x6C,0x65,0x57, 0x69,0x74,0x68,0x45,0x6E,0x75,0x6D,0x00,0x7E,0xFD,0xFF,0xFF,0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xCD,0xFF,0xFF, + 0x0C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0xCA,0xFF,0xFF, 0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4D,0x6F,0x6E,0x73, 0x74,0x65,0x72,0x00,0x12,0xFB,0xFF,0xFF,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x04,0xFB,0xFF,0xFF,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, 0x4E,0x4F,0x4E,0x45,0x00,0x00,0x00,0x00,0xA2,0xFD,0xFF,0xFF,0x6C,0x00,0x00,0x00,0x58,0x00,0x00,0x00, - 0x40,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x4C,0x30,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xC0,0xD1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x40,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x04,0x34,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0xCE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x62,0x69,0x74,0x5F,0x66,0x6C,0x61,0x67, - 0x73,0x00,0x00,0x00,0x44,0xD1,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, + 0x73,0x00,0x00,0x00,0x8C,0xCD,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x20,0x00,0x00,0x00, 0x17,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x4C, 0x6F,0x6E,0x67,0x45,0x6E,0x75,0x6D,0x00,0x7E,0xFC,0xFF,0xFF,0x28,0x00,0x00,0x00,0x18,0x00,0x00,0x00, @@ -125,8 +125,8 @@ struct MonsterBinarySchema { 0xDE,0xFE,0xFF,0xFF,0x24,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0xFC,0xFF,0xFF,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x07,0x00,0x00,0x00,0x4C,0x6F,0x6E,0x67,0x4F,0x6E,0x65,0x00,0xDE,0xFC,0xFF,0xFF,0x40,0x00,0x00,0x00, - 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x20,0x2F,0x00,0x00,0x00,0x00,0x00,0x00, - 0x44,0xD2,0xFF,0xFF,0x00,0x00,0x00,0x03,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xD8,0x32,0x00,0x00,0x00,0x00,0x00,0x00, + 0x8C,0xCE,0xFF,0xFF,0x00,0x00,0x00,0x03,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, 0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x52, 0x61,0x63,0x65,0x00,0x6E,0xFF,0xFF,0xFF,0x24,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, @@ -141,12 +141,12 @@ struct MonsterBinarySchema { 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x64,0xFD,0xFF,0xFF,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x4E,0x6F,0x6E,0x65,0x00,0x00,0x12,0x00,0x1C,0x00,0x04,0x00, 0x08,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x12,0x00,0x00,0x00,0x9C,0x00,0x00,0x00, - 0x88,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xDC,0x2D,0x00,0x00, + 0x88,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x94,0x31,0x00,0x00, 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x20,0x43,0x6F,0x6D,0x70,0x6F,0x73,0x69, 0x74,0x65,0x20,0x63,0x6F,0x6D,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x73,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x6E, 0x73,0x74,0x65,0x72,0x20,0x63,0x6F,0x6C,0x6F,0x72,0x2E,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x60,0xD4,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, - 0x09,0x00,0x00,0x00,0x62,0x69,0x74,0x5F,0x66,0x6C,0x61,0x67,0x73,0x00,0x00,0x00,0xE4,0xD3,0xFF,0xFF, + 0xA8,0xD0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, + 0x09,0x00,0x00,0x00,0x62,0x69,0x74,0x5F,0x66,0x6C,0x61,0x67,0x73,0x00,0x00,0x00,0x2C,0xD0,0xFF,0xFF, 0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, 0x18,0x01,0x00,0x00,0x84,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x43,0x6F,0x6C,0x6F,0x72,0x00,0x00,0x00,0x00, @@ -166,605 +166,652 @@ struct MonsterBinarySchema { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x52,0x65,0x64,0x00,0x00,0x00,0x12,0x00,0x18,0x00,0x04,0x00, 0x08,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x12,0x00,0x00,0x00,0x34,0x00,0x00,0x00, - 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xA0,0x2D,0x00,0x00,0x00,0x00,0x00,0x00, - 0x78,0xD5,0xFF,0xFF,0x00,0x00,0x00,0x09,0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x28,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x58,0x31,0x00,0x00,0x00,0x00,0x00,0x00, + 0xC0,0xD1,0xFF,0xFF,0x00,0x00,0x00,0x09,0x06,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x4F, 0x74,0x68,0x65,0x72,0x4E,0x61,0x6D,0x65,0x53,0x70,0x61,0x63,0x65,0x2E,0x46,0x72,0x6F,0x6D,0x49,0x6E, 0x63,0x6C,0x75,0x64,0x65,0x00,0x0E,0x00,0x10,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0C,0x00, 0x0E,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x10,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x49,0x6E,0x63,0x6C,0x75,0x64,0x65,0x56, - 0x61,0x6C,0x00,0x00,0xE4,0xD3,0xFF,0xFF,0x4C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x08,0x00,0x00,0x00,0x40,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00, + 0x61,0x6C,0x00,0x00,0x2C,0xD0,0xFF,0xFF,0x4C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0xF8,0x2E,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xE4,0x00,0x00,0x00, 0xB0,0x00,0x00,0x00,0xF0,0x01,0x00,0x00,0x90,0x01,0x00,0x00,0x30,0x01,0x00,0x00,0x60,0x02,0x00,0x00, 0xB0,0x01,0x00,0x00,0x54,0x01,0x00,0x00,0xF0,0x00,0x00,0x00,0x04,0x02,0x00,0x00,0x5C,0x00,0x00,0x00, 0x24,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, - 0x6C,0x65,0x2E,0x54,0x79,0x70,0x65,0x41,0x6C,0x69,0x61,0x73,0x65,0x73,0x00,0x00,0x00,0xDB,0xFF,0xFF, + 0x6C,0x65,0x2E,0x54,0x79,0x70,0x65,0x41,0x6C,0x69,0x61,0x73,0x65,0x73,0x00,0x00,0x48,0xD7,0xFF,0xFF, 0x00,0x00,0x00,0x01,0x0B,0x00,0x1A,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x14,0xE1,0xFF,0xFF,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x76,0x66,0x36,0x34,0x00,0x00,0x00,0x00,0x34,0xDB,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0A,0x00,0x18,0x00, - 0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xE1,0xFF,0xFF, - 0x00,0x00,0x0E,0x03,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x76,0x38,0x00,0x00,0x4A,0xD8,0xFF,0xFF, + 0x00,0x00,0x00,0x00,0x5C,0xDD,0xFF,0xFF,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x76,0x66,0x36,0x34,0x00,0x00,0x00,0x00,0x7C,0xD7,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0A,0x00,0x18,0x00, + 0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0xDD,0xFF,0xFF, + 0x00,0x00,0x0E,0x03,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x76,0x38,0x00,0x00,0x92,0xD4,0xFF,0xFF, 0x09,0x00,0x16,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x14,0xD6,0xFF,0xFF,0x00,0x00,0x00,0x0C,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x66,0x36,0x34,0x00,0x7A,0xD8,0xFF,0xFF,0x08,0x00,0x14,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0xD3,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x66,0x33,0x32,0x00,0xA6,0xD8,0xFF,0xFF,0x07,0x00,0x12,0x00,0x20,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xD6,0xFF,0xFF,0x00,0x00,0x00,0x0A, - 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x75,0x36,0x34,0x00,0xD6,0xD8,0xFF,0xFF, + 0x5C,0xD2,0xFF,0xFF,0x00,0x00,0x00,0x0C,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0x66,0x36,0x34,0x00,0xC2,0xD4,0xFF,0xFF,0x08,0x00,0x14,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD4,0xCF,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x66,0x33,0x32,0x00,0xEE,0xD4,0xFF,0xFF,0x07,0x00,0x12,0x00,0x20,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB8,0xD2,0xFF,0xFF,0x00,0x00,0x00,0x0A, + 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x75,0x36,0x34,0x00,0x1E,0xD5,0xFF,0xFF, 0x06,0x00,0x10,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xA0,0xD6,0xFF,0xFF,0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x69,0x36,0x34,0x00,0x06,0xD9,0xFF,0xFF,0x05,0x00,0x0E,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xD4,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x75,0x33,0x32,0x00,0x32,0xD9,0xFF,0xFF,0x04,0x00,0x0C,0x00,0x1C,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0xD4,0xFF,0xFF,0x00,0x00,0x00,0x07, - 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x69,0x33,0x32,0x00,0x5E,0xD9,0xFF,0xFF,0x03,0x00,0x0A,0x00, - 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0xD7,0xFF,0xFF, + 0xE8,0xD2,0xFF,0xFF,0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0x69,0x36,0x34,0x00,0x4E,0xD5,0xFF,0xFF,0x05,0x00,0x0E,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xD0,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x75,0x33,0x32,0x00,0x7A,0xD5,0xFF,0xFF,0x04,0x00,0x0C,0x00,0x1C,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0xD0,0xFF,0xFF,0x00,0x00,0x00,0x07, + 0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x69,0x33,0x32,0x00,0xA6,0xD5,0xFF,0xFF,0x03,0x00,0x0A,0x00, + 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xD3,0xFF,0xFF, 0x00,0x00,0x00,0x06,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x75,0x31,0x36,0x00, - 0x8E,0xD9,0xFF,0xFF,0x02,0x00,0x08,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x58,0xD7,0xFF,0xFF,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x69,0x31,0x36,0x00,0xBE,0xD9,0xFF,0xFF,0x01,0x00,0x06,0x00,0x20,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0xD7,0xFF,0xFF,0x00,0x00,0x00,0x04, + 0xD6,0xD5,0xFF,0xFF,0x02,0x00,0x08,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xA0,0xD3,0xFF,0xFF,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x69,0x31,0x36,0x00,0x06,0xD6,0xFF,0xFF,0x01,0x00,0x06,0x00,0x20,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD0,0xD3,0xFF,0xFF,0x00,0x00,0x00,0x04, 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x75,0x38,0x00,0x00,0x00,0x00,0x1A,0x00, 0x14,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x10,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD4,0xD7,0xFF,0xFF,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x38,0x00,0x00,0xA8,0xD6,0xFF,0xFF,0x30,0x01,0x00,0x00, - 0x50,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x7C,0x28,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0xD4,0xFF,0xFF,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x38,0x00,0x00,0xF0,0xD2,0xFF,0xFF,0x50,0x01,0x00,0x00, + 0x50,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x34,0x2C,0x00,0x00,0x01,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x20,0x61,0x6E,0x20,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x20, 0x64,0x6F,0x63,0x75,0x6D,0x65,0x6E,0x74,0x61,0x74,0x69,0x6F,0x6E,0x20,0x63,0x6F,0x6D,0x6D,0x65,0x6E, 0x74,0x3A,0x20,0x22,0x6D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x20,0x6F,0x62,0x6A,0x65,0x63,0x74,0x22,0x00, - 0x36,0x00,0x00,0x00,0x80,0x04,0x00,0x00,0xE4,0x04,0x00,0x00,0x4C,0x05,0x00,0x00,0xAC,0x05,0x00,0x00, - 0xA8,0x09,0x00,0x00,0x78,0x1B,0x00,0x00,0x88,0x18,0x00,0x00,0x44,0x0F,0x00,0x00,0x7C,0x1C,0x00,0x00, - 0xC0,0x1D,0x00,0x00,0xEC,0x1B,0x00,0x00,0x44,0x01,0x00,0x00,0xC4,0x00,0x00,0x00,0x30,0x1E,0x00,0x00, - 0x30,0x1D,0x00,0x00,0xA8,0x01,0x00,0x00,0x10,0x07,0x00,0x00,0x80,0x0D,0x00,0x00,0xA0,0x1E,0x00,0x00, - 0x2C,0x02,0x00,0x00,0x5C,0x03,0x00,0x00,0x08,0x0C,0x00,0x00,0x58,0x1A,0x00,0x00,0xE4,0x19,0x00,0x00, - 0xA0,0x0E,0x00,0x00,0xC4,0x1A,0x00,0x00,0x90,0x11,0x00,0x00,0x78,0x0F,0x00,0x00,0x68,0x19,0x00,0x00, - 0xE0,0x0F,0x00,0x00,0x88,0x18,0x00,0x00,0xC0,0x16,0x00,0x00,0x1C,0x17,0x00,0x00,0x10,0x11,0x00,0x00, - 0x8C,0x10,0x00,0x00,0x30,0x10,0x00,0x00,0x20,0x16,0x00,0x00,0xE0,0x13,0x00,0x00,0xFC,0x14,0x00,0x00, - 0x58,0x12,0x00,0x00,0x84,0x15,0x00,0x00,0xE4,0x12,0x00,0x00,0x5C,0x14,0x00,0x00,0xB4,0x11,0x00,0x00, - 0x50,0x17,0x00,0x00,0x38,0x02,0x00,0x00,0xC0,0x07,0x00,0x00,0x78,0x0D,0x00,0x00,0x58,0x03,0x00,0x00, - 0xD8,0x0D,0x00,0x00,0x58,0x05,0x00,0x00,0x88,0x0C,0x00,0x00,0xDC,0x09,0x00,0x00,0x8C,0x0A,0x00,0x00, - 0x16,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x4D, - 0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x00,0x62,0xFD,0xFF,0xFF,0x35,0x00,0x6E,0x00,0x54,0x00,0x00,0x00, - 0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE8,0xDA,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x64,0xDA,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x6C,0x6F,0x6E,0x67,0x5F,0x65,0x6E,0x75,0x6D,0x5F,0x6E,0x6F,0x72,0x6D,0x61,0x6C, - 0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0x00,0x62,0xE6,0xFF,0xFF,0x34,0x00,0x6C,0x00, - 0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xDB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x35,0x32,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xD8,0xDA,0xFF,0xFF, - 0x00,0x00,0x00,0x0A,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1A,0x00,0x00,0x00, - 0x6C,0x6F,0x6E,0x67,0x5F,0x65,0x6E,0x75,0x6D,0x5F,0x6E,0x6F,0x6E,0x5F,0x65,0x6E,0x75,0x6D,0x5F,0x64, - 0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0xEC,0xE5,0xFF,0xFF,0x00,0x00,0x00,0x01,0x33,0x00,0x6A,0x00, - 0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD8,0xDB,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x6E,0x61,0x74,0x69, - 0x76,0x65,0x5F,0x69,0x6E,0x6C,0x69,0x6E,0x65,0x00,0x00,0x00,0x00,0xDC,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xC8,0xD8,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0D,0x00,0x00,0x00, - 0x6E,0x61,0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x6C,0x69,0x6E,0x65,0x00,0x00,0x00,0x80,0xE6,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x32,0x00,0x68,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0xDC,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x30,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x38,0xE8,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x73,0x63,0x61,0x6C,0x61,0x72,0x5F,0x6B,0x65,0x79,0x5F,0x73,0x6F,0x72,0x74,0x65, - 0x64,0x5F,0x74,0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0x00,0xF4,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x31,0x00,0x66,0x00,0x78,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE0,0xDC,0xFF,0xFF, - 0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00, - 0x11,0x00,0x00,0x00,0x6E,0x65,0x73,0x74,0x65,0x64,0x5F,0x66,0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65, - 0x72,0x00,0x00,0x00,0x10,0xDD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x34,0x39,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x0C,0xE7,0xFF,0xFF,0x00,0x00,0x0E,0x04, - 0x01,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x64, - 0x6E,0x65,0x73,0x74,0x65,0x64,0x66,0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x1A,0x00, - 0x20,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x30,0x00,0x64,0x00,0x54,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, - 0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA0,0xDD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x34,0x38,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x1C,0xDD,0xFF,0xFF, - 0x00,0x00,0x00,0x03,0x05,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0B,0x00,0x00,0x00, - 0x73,0x69,0x67,0x6E,0x65,0x64,0x5F,0x65,0x6E,0x75,0x6D,0x00,0x20,0xE8,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x2F,0x00,0x62,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0xDE,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xD8,0xE9,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0F,0x00,0x00,0x00, - 0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x65,0x6E,0x75,0x6D,0x73,0x00,0x88,0xE8,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x2E,0x00,0x60,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x70,0xDE,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x36,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x38,0xDB,0xFF,0xFF,0x00,0x00,0x00,0x10,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x0D,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F,0x61,0x6D,0x62,0x69,0x67,0x75,0x6F,0x75,0x73,0x00,0x00,0x00, - 0xDA,0xE9,0xFF,0xFF,0x2D,0x00,0x5E,0x00,0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD4,0xDE,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x35,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x50,0xDE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F,0x61,0x6D,0x62,0x69,0x67,0x75,0x6F,0x75, - 0x73,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x5C,0xE9,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2C,0x00,0x5C,0x00, + 0x3E,0x00,0x00,0x00,0x38,0x08,0x00,0x00,0x9C,0x08,0x00,0x00,0x04,0x09,0x00,0x00,0x64,0x09,0x00,0x00, + 0x60,0x0D,0x00,0x00,0x30,0x1F,0x00,0x00,0xFC,0x00,0x00,0x00,0x3C,0x1C,0x00,0x00,0xF8,0x12,0x00,0x00, + 0x30,0x20,0x00,0x00,0x74,0x21,0x00,0x00,0xB0,0x03,0x00,0x00,0xB4,0x02,0x00,0x00,0x98,0x1F,0x00,0x00, + 0xF0,0x04,0x00,0x00,0x70,0x04,0x00,0x00,0xDC,0x21,0x00,0x00,0xDC,0x20,0x00,0x00,0xFC,0x03,0x00,0x00, + 0x50,0x05,0x00,0x00,0xAC,0x01,0x00,0x00,0x30,0x01,0x00,0x00,0xB0,0x0A,0x00,0x00,0x20,0x11,0x00,0x00, + 0x40,0x22,0x00,0x00,0x08,0x03,0x00,0x00,0x04,0x02,0x00,0x00,0xC4,0x05,0x00,0x00,0xF4,0x06,0x00,0x00, + 0xA0,0x0F,0x00,0x00,0xF0,0x1D,0x00,0x00,0x7C,0x1D,0x00,0x00,0x38,0x12,0x00,0x00,0x5C,0x1E,0x00,0x00, + 0x28,0x15,0x00,0x00,0x10,0x13,0x00,0x00,0x00,0x1D,0x00,0x00,0x78,0x13,0x00,0x00,0x20,0x1C,0x00,0x00, + 0x58,0x1A,0x00,0x00,0xB4,0x1A,0x00,0x00,0xA8,0x14,0x00,0x00,0x24,0x14,0x00,0x00,0xC8,0x13,0x00,0x00, + 0xB8,0x19,0x00,0x00,0x78,0x17,0x00,0x00,0x94,0x18,0x00,0x00,0xF0,0x15,0x00,0x00,0x1C,0x19,0x00,0x00, + 0x7C,0x16,0x00,0x00,0xF4,0x17,0x00,0x00,0x4C,0x15,0x00,0x00,0xE8,0x1A,0x00,0x00,0xD0,0x05,0x00,0x00, + 0x58,0x0B,0x00,0x00,0x10,0x11,0x00,0x00,0xF0,0x06,0x00,0x00,0x70,0x11,0x00,0x00,0xF0,0x08,0x00,0x00, + 0x20,0x10,0x00,0x00,0x74,0x0D,0x00,0x00,0x24,0x0E,0x00,0x00,0x16,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, + 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x00, + 0xC2,0xFD,0xFF,0xFF,0x3D,0x00,0x7E,0x00,0x50,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x50,0xD7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x36,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xEC,0xD5,0xFF,0xFF,0x00,0x00,0x00,0x0C, + 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x64,0x6F,0x75,0x62,0x6C,0x65,0x5F,0x69, + 0x6E,0x66,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x52,0xEC,0xFF,0xFF,0x3C,0x00,0x7C,0x00, + 0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xF0,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0xC4,0xD7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x36,0x30,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xA8,0xD3,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00, + 0x19,0x00,0x00,0x00,0x6E,0x65,0x67,0x61,0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x66,0x69,0x6E,0x69,0x74, + 0x79,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0xAA,0xFE,0xFF,0xFF,0x3B,0x00,0x7A,0x00, + 0x4C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xF0,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x38,0xD8,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x39,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x1C,0xD4,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x6E,0x65,0x67,0x61,0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x66,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74, + 0x00,0x00,0x00,0x00,0x3A,0xED,0xFF,0xFF,0x3A,0x00,0x78,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xAC,0xD8,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x38,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x90,0xD4,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x70,0x6F,0x73,0x69, + 0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x66,0x69,0x6E,0x69,0x74,0x79,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C, + 0x74,0x00,0x00,0x00,0xB2,0xED,0xFF,0xFF,0x39,0x00,0x76,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x24,0xD9,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x08,0xD5,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x69,0x6E,0x66,0x69, + 0x6E,0x69,0x74,0x79,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x1A,0x00,0x20,0x00,0x08,0x00, + 0x0C,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00, + 0x1A,0x00,0x00,0x00,0x38,0x00,0x74,0x00,0x4C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xA8,0xD9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x35,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x8C,0xD5,0xFF,0xFF,0x00,0x00,0x00,0x0B, + 0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x70,0x6F,0x73,0x69,0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x66, + 0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00,0x00,0x00,0xAA,0xEE,0xFF,0xFF,0x37,0x00,0x72,0x00, + 0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xF0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x1C,0xDA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x35,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x00,0xD6,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00, + 0x0B,0x00,0x00,0x00,0x69,0x6E,0x66,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x12,0xEF,0xFF,0xFF, + 0x36,0x00,0x70,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x84,0xDA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x35,0x34,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x68,0xD6,0xFF,0xFF,0x00,0x00,0x00,0x0B, + 0x01,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x6E,0x61,0x6E,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00, + 0x62,0xFD,0xFF,0xFF,0x35,0x00,0x6E,0x00,0x54,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xE8,0xDA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x35,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x64,0xDA,0xFF,0xFF,0x00,0x00,0x00,0x0A, + 0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x6C,0x6F,0x6E,0x67, + 0x5F,0x65,0x6E,0x75,0x6D,0x5F,0x6E,0x6F,0x72,0x6D,0x61,0x6C,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74, + 0x00,0x00,0x00,0x00,0x62,0xE6,0xFF,0xFF,0x34,0x00,0x6C,0x00,0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x5C,0xDB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x35,0x32,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xD8,0xDA,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x04,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x6C,0x6F,0x6E,0x67,0x5F,0x65,0x6E,0x75, + 0x6D,0x5F,0x6E,0x6F,0x6E,0x5F,0x65,0x6E,0x75,0x6D,0x5F,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x00,0x00, + 0xEC,0xE5,0xFF,0xFF,0x00,0x00,0x00,0x01,0x33,0x00,0x6A,0x00,0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x30,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xD8,0xDB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x6E,0x61,0x74,0x69,0x76,0x65,0x5F,0x69,0x6E,0x6C,0x69,0x6E, + 0x65,0x00,0x00,0x00,0x00,0xDC,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x35,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xC8,0xD8,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x6E,0x61,0x74,0x69,0x76,0x65,0x5F,0x69, + 0x6E,0x6C,0x69,0x6E,0x65,0x00,0x00,0x00,0x80,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x01,0x32,0x00,0x68,0x00, 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x44,0xDF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x34,0x34,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x0C,0xDC,0xFF,0xFF, - 0x00,0x00,0x00,0x10,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F, - 0x75,0x6E,0x69,0x71,0x75,0x65,0x00,0x00,0xAA,0xEA,0xFF,0xFF,0x2B,0x00,0x5A,0x00,0x4C,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0xDC,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x35,0x30,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x38,0xE8,0xFF,0xFF, + 0x00,0x00,0x0E,0x0F,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x73,0x63,0x61,0x6C, + 0x61,0x72,0x5F,0x6B,0x65,0x79,0x5F,0x73,0x6F,0x72,0x74,0x65,0x64,0x5F,0x74,0x61,0x62,0x6C,0x65,0x73, + 0x00,0x00,0x00,0x00,0xF4,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x01,0x31,0x00,0x66,0x00,0x78,0x00,0x00,0x00, + 0x68,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x38,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE0,0xDC,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x11,0x00,0x00,0x00,0x6E,0x65,0x73,0x74, + 0x65,0x64,0x5F,0x66,0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x00,0x10,0xDD,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x39,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x0C,0xE7,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x72,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x6E,0x65,0x73,0x74,0x65,0x64,0x66,0x6C, + 0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x1A,0x00,0x20,0x00,0x08,0x00,0x0C,0x00,0x04,0x00, + 0x06,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, + 0x30,0x00,0x64,0x00,0x54,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0xA0,0xDD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x38,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x1C,0xDD,0xFF,0xFF,0x00,0x00,0x00,0x03,0x05,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x73,0x69,0x67,0x6E,0x65,0x64,0x5F,0x65, + 0x6E,0x75,0x6D,0x00,0x20,0xE8,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2F,0x00,0x62,0x00,0x48,0x00,0x00,0x00, 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xA4,0xDF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x34,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x20,0xDF,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F, - 0x75,0x6E,0x69,0x71,0x75,0x65,0x5F,0x74,0x79,0x70,0x65,0x00,0x28,0xEA,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x2A,0x00,0x58,0x00,0x00,0x01,0x00,0x00,0xF0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0xE0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x34,0x32,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x3C,0xE0,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x64,0xE0,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62, - 0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, - 0x90,0xE0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x5F,0x67,0x65,0x74, - 0x00,0x00,0x00,0x00,0xBC,0xE0,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00, - 0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F, - 0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xC8,0xEA,0xFF,0xFF,0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00, - 0x1F,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x6E,0x6F,0x6E,0x5F,0x6F,0x77, - 0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x73,0x00,0x42,0xEC,0xFF,0xFF, - 0x29,0x00,0x56,0x00,0x04,0x01,0x00,0x00,0xF0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xB0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x4C,0xE1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x34,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x68,0xE1,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x90,0xE1,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62, - 0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, - 0xBC,0xE1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x5F,0x67,0x65,0x74, - 0x00,0x00,0x00,0x00,0xE8,0xE1,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x08,0xDE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x34,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xD8,0xE9,0xFF,0xFF,0x00,0x00,0x0E,0x04, + 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F, + 0x66,0x5F,0x65,0x6E,0x75,0x6D,0x73,0x00,0x88,0xE8,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2E,0x00,0x60,0x00, + 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x70,0xDE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x34,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x38,0xDB,0xFF,0xFF, + 0x00,0x00,0x00,0x10,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F, + 0x61,0x6D,0x62,0x69,0x67,0x75,0x6F,0x75,0x73,0x00,0x00,0x00,0xDA,0xE9,0xFF,0xFF,0x2D,0x00,0x5E,0x00, + 0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD4,0xDE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x34,0x35,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x50,0xDE,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x00,0x00,0x00, + 0x61,0x6E,0x79,0x5F,0x61,0x6D,0x62,0x69,0x67,0x75,0x6F,0x75,0x73,0x5F,0x74,0x79,0x70,0x65,0x00,0x00, + 0x5C,0xE9,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2C,0x00,0x5C,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x44,0xDF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x34,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x0C,0xDC,0xFF,0xFF,0x00,0x00,0x00,0x10,0x02,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F,0x75,0x6E,0x69,0x71,0x75,0x65,0x00,0x00, + 0xAA,0xEA,0xFF,0xFF,0x2B,0x00,0x5A,0x00,0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA4,0xDF,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x33,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x20,0xDF,0xFF,0xFF,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x61,0x6E,0x79,0x5F,0x75,0x6E,0x69,0x71,0x75,0x65,0x5F,0x74, + 0x79,0x70,0x65,0x00,0x28,0xEA,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2A,0x00,0x58,0x00,0x00,0x01,0x00,0x00, + 0xF0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0xB0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x20,0xE0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x32,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x3C,0xE0,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x64,0xE0,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x90,0xE0,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x63,0x70,0x70,0x5F, + 0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x5F,0x67,0x65,0x74,0x00,0x00,0x00,0x00,0xBC,0xE0,0xFF,0xFF, + 0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, + 0xC8,0xEA,0xFF,0xFF,0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x76,0x65,0x63,0x74, + 0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x6E,0x6F,0x6E,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65,0x66, + 0x65,0x72,0x65,0x6E,0x63,0x65,0x73,0x00,0x42,0xEC,0xFF,0xFF,0x29,0x00,0x56,0x00,0x04,0x01,0x00,0x00, + 0xF0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0xB0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x4C,0xE1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x31,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x68,0xE1,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x90,0xE1,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xBC,0xE1,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x63,0x70,0x70,0x5F, + 0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x5F,0x67,0x65,0x74,0x00,0x00,0x00,0x00,0xE8,0xE1,0xFF,0xFF, + 0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, + 0x94,0xE0,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x6E,0x6F,0x6E,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65, + 0x00,0x00,0x00,0x00,0x80,0xEC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x28,0x00,0x54,0x00,0x10,0x01,0x00,0x00, + 0x00,0x01,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0xB4,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x78,0xE2,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x34,0x30,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x94,0xE2,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xBC,0xE2,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xE8,0xE2,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x2E,0x67,0x65,0x74,0x28,0x29,0x00,0x00,0x10,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x5F,0x67,0x65,0x74,0x00,0x00,0x00,0x00, + 0x18,0xE3,0xFF,0xFF,0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x64,0x65,0x66,0x61, + 0x75,0x6C,0x74,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x30,0xED,0xFF,0xFF, + 0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F, + 0x66,0x5F,0x63,0x6F,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63, + 0x65,0x73,0x00,0x00,0xAA,0xEE,0xFF,0xFF,0x27,0x00,0x52,0x00,0xD4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x00,0x00, + 0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xB0,0xE3,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x39,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0xCC,0xE3,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31, + 0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00, + 0xF4,0xE3,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65, + 0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65, + 0x00,0x00,0x00,0x00,0x20,0xE4,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00, 0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F, - 0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x94,0xE0,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x6E,0x6F,0x6E,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72, - 0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x00,0x00,0x00,0x00,0x80,0xEC,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x28,0x00,0x54,0x00,0x10,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x78,0xE2,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x34,0x30,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x94,0xE2,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xBC,0xE2,0xFF,0xFF, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62, - 0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, - 0xE8,0xE2,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x2E,0x67,0x65,0x74, - 0x28,0x29,0x00,0x00,0x10,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x5F,0x67,0x65,0x74,0x00,0x00,0x00,0x00,0x18,0xE3,0xFF,0xFF,0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x10,0x00,0x00,0x00,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0x30,0xED,0xFF,0xFF,0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00,0x1E,0x00,0x00,0x00, - 0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x63,0x6F,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F, - 0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x73,0x00,0x00,0xAA,0xEE,0xFF,0xFF,0x27,0x00,0x52,0x00, - 0xD4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xCC,0xE2,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x63,0x6F,0x5F,0x6F,0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65, + 0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x00,0xB4,0xEE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x26,0x00,0x50,0x00, + 0x84,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA0,0xE4,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x38,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0xBC,0xE4,0xFF,0xFF,0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x64,0x65,0x66,0x61, + 0x75,0x6C,0x74,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xA8,0xF0,0xFF,0xFF, + 0x00,0x00,0x0E,0x0F,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x76,0x65,0x63,0x74, + 0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x73,0x74,0x72,0x6F,0x6E,0x67,0x5F,0x72,0x65,0x66,0x65,0x72,0x72,0x61, + 0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0x00,0x68,0xEF,0xFF,0xFF,0x00,0x00,0x00,0x01,0x25,0x00,0x4E,0x00, + 0xD0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0xB0,0xE3,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x39,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xCC,0xE3,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x5C,0xE5,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x37,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x78,0xE5,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xF4,0xE3,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xA0,0xE5,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, 0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00, - 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x20,0xE4,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xCC,0xE5,0xFF,0xFF,0x14,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xCC,0xE2,0xFF,0xFF, - 0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x63,0x6F,0x5F,0x6F, - 0x77,0x6E,0x69,0x6E,0x67,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x00,0xB4,0xEE,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x26,0x00,0x50,0x00,0x84,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0xA0,0xE4,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x38,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xBC,0xE4,0xFF,0xFF,0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x10,0x00,0x00,0x00,0x64,0x65,0x66,0x61,0x75,0x6C,0x74,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0xA8,0xF0,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x1C,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x73,0x74,0x72,0x6F,0x6E,0x67, - 0x5F,0x72,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0x00,0x68,0xEF,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x25,0x00,0x4E,0x00,0xD0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xD8,0xEF,0xFF,0xFF, + 0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F, + 0x66,0x5F,0x77,0x65,0x61,0x6B,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x73,0x00,0x00,0x00, + 0x4E,0xF1,0xFF,0xFF,0x24,0x00,0x4C,0x00,0xD4,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xE5,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x33,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x78,0xE5,0xFF,0xFF, + 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x54,0xE6,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x33,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x70,0xE6,0xFF,0xFF, 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xA0,0xE5,0xFF,0xFF, + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x98,0xE6,0xFF,0xFF, 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62, 0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, - 0xCC,0xE5,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65, + 0xC4,0xE6,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65, 0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0xD8,0xEF,0xFF,0xFF,0x00,0x00,0x0E,0x0A,0x08,0x00,0x00,0x00,0x19,0x00,0x00,0x00, - 0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x77,0x65,0x61,0x6B,0x5F,0x72,0x65,0x66,0x65,0x72, - 0x65,0x6E,0x63,0x65,0x73,0x00,0x00,0x00,0x4E,0xF1,0xFF,0xFF,0x24,0x00,0x4C,0x00,0xD4,0x00,0x00,0x00, - 0xC0,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x80,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x54,0xE6,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x36,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x70,0xE6,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68, - 0x00,0x00,0x00,0x00,0x98,0xE6,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0B,0x00,0x00,0x00, - 0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x54,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F, - 0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xC4,0xE6,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F, - 0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0x70,0xE5,0xFF,0xFF,0x00,0x00,0x00,0x0A, - 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x73,0x69,0x6E,0x67,0x6C,0x65,0x5F,0x77, - 0x65,0x61,0x6B,0x5F,0x72,0x65,0x66,0x65,0x72,0x65,0x6E,0x63,0x65,0x00,0x00,0x00,0x5C,0xF1,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x23,0x00,0x4A,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x44,0xE7,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x35,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x14,0xF3,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x15,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x72,0x65,0x66,0x65,0x72,0x72, - 0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0xCC,0xF1,0xFF,0xFF,0x00,0x00,0x00,0x01,0x22,0x00,0x48,0x00, + 0x00,0x00,0x00,0x00,0x70,0xE5,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x15,0x00,0x00,0x00,0x73,0x69,0x6E,0x67,0x6C,0x65,0x5F,0x77,0x65,0x61,0x6B,0x5F,0x72,0x65,0x66,0x65, + 0x72,0x65,0x6E,0x63,0x65,0x00,0x00,0x00,0x5C,0xF1,0xFF,0xFF,0x00,0x00,0x00,0x01,0x23,0x00,0x4A,0x00, 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xB4,0xE7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x33,0x34,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x7C,0xE4,0xFF,0xFF, - 0x00,0x00,0x00,0x0F,0x0B,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x70,0x61,0x72,0x65, - 0x6E,0x74,0x5F,0x6E,0x61,0x6D,0x65,0x73,0x70,0x61,0x63,0x65,0x5F,0x74,0x65,0x73,0x74,0x00,0x00,0x00, - 0x3C,0xF2,0xFF,0xFF,0x00,0x00,0x00,0x01,0x21,0x00,0x46,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x44,0xE7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x33,0x35,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x14,0xF3,0xFF,0xFF, + 0x00,0x00,0x0E,0x0F,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x76,0x65,0x63,0x74, + 0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x72,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00, + 0xCC,0xF1,0xFF,0xFF,0x00,0x00,0x00,0x01,0x22,0x00,0x48,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x24,0xE8,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x33,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x20,0xF2,0xFF,0xFF,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x00, - 0x11,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x64,0x6F,0x75,0x62,0x6C,0x65, - 0x73,0x00,0x00,0x00,0xA4,0xF2,0xFF,0xFF,0x00,0x00,0x00,0x01,0x20,0x00,0x44,0x00,0x44,0x00,0x00,0x00, + 0xB4,0xE7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x34,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x7C,0xE4,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x0B,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x70,0x61,0x72,0x65,0x6E,0x74,0x5F,0x6E,0x61,0x6D,0x65,0x73, + 0x70,0x61,0x63,0x65,0x5F,0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x3C,0xF2,0xFF,0xFF,0x00,0x00,0x00,0x01, + 0x21,0x00,0x46,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x24,0xE8,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x20,0xF2,0xFF,0xFF,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x76,0x65,0x63,0x74, + 0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x64,0x6F,0x75,0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0xA4,0xF2,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x20,0x00,0x44,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x8C,0xE8,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x32,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x88,0xF2,0xFF,0xFF,0x00,0x00,0x0E,0x09,0x08,0x00,0x00,0x00,0x0F,0x00,0x00,0x00, + 0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x6C,0x6F,0x6E,0x67,0x73,0x00,0x08,0xF3,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x1F,0x00,0x42,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xF0,0xE8,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x31,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0xC0,0xF4,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x35,0x00,0x00,0x00,0x68,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x01, + 0x1E,0x00,0x40,0x00,0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x54,0xE9,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x70,0xE9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x66,0x6C,0x65,0x78,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00, + 0x74,0xF3,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x66,0x6C,0x65,0x78, + 0x00,0x00,0x00,0x00,0xEC,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x01,0x1D,0x00,0x3E,0x00,0x48,0x00,0x00,0x00, 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x8C,0xE8,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x33,0x32,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x88,0xF2,0xFF,0xFF,0x00,0x00,0x0E,0x09, - 0x08,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x76,0x65,0x63,0x74,0x6F,0x72,0x5F,0x6F,0x66,0x5F,0x6C,0x6F, - 0x6E,0x67,0x73,0x00,0x08,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x01,0x1F,0x00,0x42,0x00,0x48,0x00,0x00,0x00, - 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xF0,0xE8,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x33,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xC0,0xF4,0xFF,0xFF,0x00,0x00,0x0E,0x0F, - 0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x35,0x00,0x00,0x00, - 0x68,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x01,0x1E,0x00,0x40,0x00,0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x54,0xE9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x33,0x30,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x70,0xE9,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x66,0x6C,0x65,0x78, - 0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x74,0xF3,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x66,0x6C,0x65,0x78,0x00,0x00,0x00,0x00,0xEC,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x1D,0x00,0x3E,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD4,0xE9,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x39,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xA4,0xF5,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x17,0x00,0x00,0x00, - 0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x73,0x6F,0x72,0x74,0x65,0x64,0x73,0x74,0x72, - 0x75,0x63,0x74,0x00,0x5C,0xF4,0xFF,0xFF,0x00,0x00,0x00,0x01,0x1C,0x00,0x3C,0x00,0x44,0x00,0x00,0x00, - 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x44,0xEA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x32,0x38,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x40,0xF4,0xFF,0xFF,0x00,0x00,0x0E,0x0D, - 0x04,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x73, - 0x74,0x72,0x69,0x6E,0x67,0x32,0x00,0x00,0xAE,0xF5,0xFF,0xFF,0x1B,0x00,0x3A,0x00,0x44,0x00,0x00,0x00, - 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xA8,0xEA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x32,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x8C,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x0B, - 0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x66,0x33,0x00,0x00,0x9A,0xFF,0xFF,0xFF, - 0x1A,0x00,0x38,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x0C,0xEB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x32,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xF0,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x0B, - 0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x66,0x32,0x00,0x00,0x00,0x00,0x1A,0x00, - 0x24,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x19,0x00,0x36,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x6E,0x86,0x1B,0xF0,0xF9,0x21,0x09,0x40,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x8C,0xEB,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x35,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x70,0xE7,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x66,0x00,0x00,0x00,0x00,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x01,0x18,0x00,0x34,0x00,0x44,0x00,0x00,0x00, - 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xE8,0xEB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x32,0x34,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xE4,0xF5,0xFF,0xFF,0x00,0x00,0x0E,0x02, - 0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x62, - 0x6F,0x6F,0x6C,0x73,0x00,0x00,0x00,0x00,0x52,0xF7,0xFF,0xFF,0x17,0x00,0x32,0x00,0x74,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xD4,0xE9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x32,0x39,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xA4,0xF5,0xFF,0xFF,0x00,0x00,0x0E,0x0F, + 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61, + 0x79,0x6F,0x66,0x73,0x6F,0x72,0x74,0x65,0x64,0x73,0x74,0x72,0x75,0x63,0x74,0x00,0x5C,0xF4,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x1C,0x00,0x3C,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x44,0xEA,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x38,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x40,0xF4,0xFF,0xFF,0x00,0x00,0x0E,0x0D,0x04,0x00,0x00,0x00,0x12,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x73,0x74,0x72,0x69,0x6E,0x67,0x32,0x00,0x00, + 0xAE,0xF5,0xFF,0xFF,0x1B,0x00,0x3A,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA8,0xEA,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x37,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x8C,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x66,0x33,0x00,0x00,0x9A,0xFF,0xFF,0xFF,0x1A,0x00,0x38,0x00,0x50,0x00,0x00,0x00, + 0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0C,0xEB,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x36,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0xF0,0xE6,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x66,0x32,0x00,0x00,0x00,0x00,0x1A,0x00,0x24,0x00,0x08,0x00,0x0C,0x00,0x04,0x00, + 0x06,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, + 0x19,0x00,0x36,0x00,0x50,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x6E,0x86,0x1B,0xF0,0xF9,0x21,0x09,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x8C,0xEB,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x32,0x35,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x70,0xE7,0xFF,0xFF,0x00,0x00,0x00,0x0B, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x66,0x00,0x00,0x00,0x00,0xF6,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x18,0x00,0x34,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE8,0xEB,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x34,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0xE4,0xF5,0xFF,0xFF,0x00,0x00,0x0E,0x02,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x62,0x6F,0x6F,0x6C,0x73,0x00,0x00,0x00,0x00, + 0x52,0xF7,0xFF,0xFF,0x17,0x00,0x32,0x00,0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x50,0xEC,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x33,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x6C,0xEC,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x14,0xEB,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x75,0x36,0x34,0x5F, + 0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00,0xE6,0xF7,0xFF,0xFF,0x16,0x00,0x30,0x00,0x74,0x00,0x00,0x00, 0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x50,0xEC,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x32,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x6C,0xEC,0xFF,0xFF, + 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE4,0xEC,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x32,0x32,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x00,0xED,0xFF,0xFF, 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x14,0xEB,0xFF,0xFF, - 0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x68,0x61,0x73,0x68,0x75,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00,0xE6,0xF7,0xFF,0xFF, - 0x16,0x00,0x30,0x00,0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE4,0xEC,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x32,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x00,0xED,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68, - 0x00,0x00,0x00,0x00,0xA8,0xEB,0xFF,0xFF,0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x73,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31, - 0x61,0x00,0x00,0x00,0x7A,0xF8,0xFF,0xFF,0x15,0x00,0x2E,0x00,0xCC,0x00,0x00,0x00,0xBC,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x7C,0x00,0x00,0x00, - 0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0xED,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x9C,0xED,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31, + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xA8,0xEB,0xFF,0xFF, + 0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x68,0x61,0x73,0x68,0x73,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00,0x7A,0xF8,0xFF,0xFF, + 0x15,0x00,0x2E,0x00,0xCC,0x00,0x00,0x00,0xBC,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x24,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x80,0xED,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x32,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x9C,0xED,0xFF,0xFF,0x18,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x33,0x32,0x00,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xC4,0xED,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x53,0x74,0x61,0x74,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xEC,0xED,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65,0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00,0xE0,0xE9,0xFF,0xFF, + 0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68, + 0x75,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00,0x66,0xF9,0xFF,0xFF,0x14,0x00,0x2C,0x00, + 0x70,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x64,0xEE,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x30,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x80,0xEE,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31, 0x61,0x5F,0x33,0x32,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00, - 0xC4,0xED,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x53,0x74,0x61,0x74, - 0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x00, - 0xEC,0xED,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x6E,0x61,0x6B,0x65, - 0x64,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x63,0x70,0x70,0x5F,0x70,0x74,0x72,0x5F,0x74,0x79,0x70,0x65, - 0x00,0x00,0x00,0x00,0xE0,0xE9,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00, - 0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x75,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00, - 0x66,0xF9,0xFF,0xFF,0x14,0x00,0x2C,0x00,0x70,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x70,0xEA,0xFF,0xFF,0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x68,0x61,0x73,0x68,0x73,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31,0x61,0x00,0x00,0x00,0xF6,0xF9,0xFF,0xFF, + 0x13,0x00,0x2A,0x00,0x70,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xF4,0xEE,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x39,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x10,0xEF,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00, + 0x66,0x6E,0x76,0x31,0x5F,0x36,0x34,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00, + 0xB4,0xED,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x75,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31,0x00,0x00,0x00,0x00, + 0x86,0xFA,0xFF,0xFF,0x12,0x00,0x28,0x00,0x70,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x64,0xEE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x32,0x30,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x80,0xEE,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x33,0x32,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x70,0xEA,0xFF,0xFF,0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00, - 0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x73,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31, - 0x61,0x00,0x00,0x00,0xF6,0xF9,0xFF,0xFF,0x13,0x00,0x2A,0x00,0x70,0x00,0x00,0x00,0x5C,0x00,0x00,0x00, + 0x84,0xEF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x38,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xA0,0xEF,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x5F,0x36,0x34,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68, + 0x00,0x00,0x00,0x00,0x44,0xEE,0xFF,0xFF,0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x73,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31, + 0x00,0x00,0x00,0x00,0x16,0xFB,0xFF,0xFF,0x11,0x00,0x26,0x00,0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xF4,0xEE,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x31,0x39,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x10,0xEF,0xFF,0xFF,0x14,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x5F,0x36,0x34,0x00,0x04,0x00,0x00,0x00, - 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xB4,0xED,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x75,0x36,0x34,0x5F, - 0x66,0x6E,0x76,0x31,0x00,0x00,0x00,0x00,0x86,0xFA,0xFF,0xFF,0x12,0x00,0x28,0x00,0x70,0x00,0x00,0x00, - 0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x84,0xEF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x31,0x38,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xA0,0xEF,0xFF,0xFF, - 0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x5F,0x36,0x34,0x00, - 0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x44,0xEE,0xFF,0xFF,0x00,0x00,0x00,0x09, - 0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68, - 0x73,0x36,0x34,0x5F,0x66,0x6E,0x76,0x31,0x00,0x00,0x00,0x00,0x16,0xFB,0xFF,0xFF,0x11,0x00,0x26,0x00, - 0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x14,0xF0,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x30,0xF0,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31, - 0x5F,0x33,0x32,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x1C,0xEC,0xFF,0xFF, - 0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68, - 0x75,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31,0x00,0x00,0x00,0x00,0xA2,0xFB,0xFF,0xFF,0x10,0x00,0x24,0x00, - 0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA0,0xF0,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xBC,0xF0,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31, - 0x5F,0x33,0x32,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xA8,0xEC,0xFF,0xFF, - 0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68, - 0x73,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31,0x00,0x00,0x00,0x00,0x2E,0xFC,0xFF,0xFF,0x0F,0x00,0x22,0x00, - 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x28,0xF1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x31,0x35,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xC4,0xEF,0xFF,0xFF, - 0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x62,0x6F,0x6F,0x6C,0x00,0x00,0x00,0x00,0xA4,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0E,0x00,0x20,0x00, - 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x8C,0xF1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x31,0x34,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x54,0xEE,0xFF,0xFF, - 0x00,0x00,0x00,0x0F,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x65,0x6D,0x70,0x74,0x79,0x00,0x00,0x00,0x08,0xFC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0D,0x00,0x1E,0x00, - 0x78,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xF4,0xF1,0xFF,0xFF,0x14,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x11,0x00,0x00,0x00, - 0x6E,0x65,0x73,0x74,0x65,0x64,0x5F,0x66,0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x00, - 0x24,0xF2,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x33,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x20,0xFC,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00, - 0x14,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x6E,0x65,0x73,0x74,0x65,0x64,0x66,0x6C,0x61,0x74,0x62,0x75, - 0x66,0x66,0x65,0x72,0x00,0x00,0x00,0x00,0xA8,0xFC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0C,0x00,0x1C,0x00, - 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x90,0xF2,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x31,0x32,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x58,0xEF,0xFF,0xFF, - 0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x65,0x6E,0x65,0x6D, - 0x79,0x00,0x00,0x00,0x08,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0B,0x00,0x1A,0x00,0xB4,0x00,0x00,0x00, - 0xA0,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x20,0x6D,0x75,0x6C,0x74,0x69,0x6C,0x69,0x6E,0x65,0x20,0x74, - 0x6F,0x6F,0x00,0x00,0x49,0x00,0x00,0x00,0x20,0x61,0x6E,0x20,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x20, - 0x64,0x6F,0x63,0x75,0x6D,0x65,0x6E,0x74,0x61,0x74,0x69,0x6F,0x6E,0x20,0x63,0x6F,0x6D,0x6D,0x65,0x6E, - 0x74,0x3A,0x20,0x74,0x68,0x69,0x73,0x20,0x77,0x69,0x6C,0x6C,0x20,0x65,0x6E,0x64,0x20,0x75,0x70,0x20, - 0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x67,0x65,0x6E,0x65,0x72,0x61,0x74,0x65,0x64,0x20,0x63,0x6F,0x64, - 0x65,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xF3,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x2C,0xFF,0xFF,0xFF,0x00,0x00,0x0E,0x0F,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x11,0x00,0x00,0x00, - 0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x74,0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00, - 0xE0,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0A,0x00,0x18,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x14,0xF0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x31,0x37,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x30,0xF0,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x5F,0x33,0x32,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x1C,0xEC,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x75,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31, + 0x00,0x00,0x00,0x00,0xA2,0xFB,0xFF,0xFF,0x10,0x00,0x24,0x00,0x6C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xA0,0xF0,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x31,0x36,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xBC,0xF0,0xFF,0xFF,0x14,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x5F,0x33,0x32,0x00,0x04,0x00,0x00,0x00, + 0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0xA8,0xEC,0xFF,0xFF,0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x68,0x61,0x73,0x68,0x73,0x33,0x32,0x5F,0x66,0x6E,0x76,0x31, + 0x00,0x00,0x00,0x00,0x2E,0xFC,0xFF,0xFF,0x0F,0x00,0x22,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00, 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0xC8,0xF3,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x30,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xC4,0xFD,0xFF,0xFF,0x00,0x00,0x0E,0x0D,0x04,0x00,0x00,0x00, - 0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x73,0x74,0x72,0x69,0x6E, - 0x67,0x00,0x00,0x00,0x48,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x09,0x00,0x16,0x00,0x58,0x00,0x00,0x00, + 0x28,0xF1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x35,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xC4,0xEF,0xFF,0xFF,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x62,0x6F,0x6F,0x6C,0x00,0x00,0x00,0x00, + 0xA4,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0E,0x00,0x20,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x8C,0xF1,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x34,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x54,0xEE,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x03,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x65,0x6D,0x70,0x74,0x79,0x00,0x00,0x00, + 0x08,0xFC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0D,0x00,0x1E,0x00,0x78,0x00,0x00,0x00,0x68,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x38,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xF4,0xF1,0xFF,0xFF,0x14,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x07,0x00,0x00,0x00, + 0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x11,0x00,0x00,0x00,0x6E,0x65,0x73,0x74,0x65,0x64,0x5F,0x66, + 0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x00,0x24,0xF2,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x33,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x20,0xFC,0xFF,0xFF,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x6E,0x65,0x73,0x74,0x65,0x64,0x66,0x6C,0x61,0x74,0x62,0x75,0x66,0x66,0x65,0x72,0x00,0x00,0x00,0x00, + 0xA8,0xFC,0xFF,0xFF,0x00,0x00,0x00,0x01,0x0C,0x00,0x1C,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x90,0xF2,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x32,0x00,0x00, + 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x58,0xEF,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x65,0x6E,0x65,0x6D,0x79,0x00,0x00,0x00,0x08,0xFD,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x0B,0x00,0x1A,0x00,0xB4,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x78,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x0E,0x00,0x00,0x00, + 0x20,0x6D,0x75,0x6C,0x74,0x69,0x6C,0x69,0x6E,0x65,0x20,0x74,0x6F,0x6F,0x00,0x00,0x49,0x00,0x00,0x00, + 0x20,0x61,0x6E,0x20,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x20,0x64,0x6F,0x63,0x75,0x6D,0x65,0x6E,0x74, + 0x61,0x74,0x69,0x6F,0x6E,0x20,0x63,0x6F,0x6D,0x6D,0x65,0x6E,0x74,0x3A,0x20,0x74,0x68,0x69,0x73,0x20, + 0x77,0x69,0x6C,0x6C,0x20,0x65,0x6E,0x64,0x20,0x75,0x70,0x20,0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x67, + 0x65,0x6E,0x65,0x72,0x61,0x74,0x65,0x64,0x20,0x63,0x6F,0x64,0x65,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x5C,0xF3,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x31,0x31,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x2C,0xFF,0xFF,0xFF,0x00,0x00,0x0E,0x0F, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x61,0x72,0x72,0x61, + 0x79,0x6F,0x66,0x74,0x61,0x62,0x6C,0x65,0x73,0x00,0x00,0x00,0xE0,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x01, + 0x0A,0x00,0x18,0x00,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xC8,0xF3,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x31,0x30,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0xC4,0xFD,0xFF,0xFF,0x00,0x00,0x0E,0x0D,0x04,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x61,0x72,0x72,0x61,0x79,0x6F,0x66,0x73,0x74,0x72,0x69,0x6E,0x67,0x00,0x00,0x00,0x48,0xFE,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x09,0x00,0x16,0x00,0x58,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x30,0xF4,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x10,0x00,0x10,0x00,0x06,0x00,0x07,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x0C,0x00, + 0x10,0x00,0x00,0x00,0x00,0x00,0x0E,0x0F,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x34,0x00,0x00,0x00,0xB8,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x08,0x00,0x14,0x00, + 0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA0,0xF4,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x68,0xF1,0xFF,0xFF, + 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x00,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x07,0x00,0x12,0x00,0x4C,0x00,0x00,0x00, + 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x14,0xF5,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x37,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x90,0xF4,0xFF,0xFF,0x00,0x00,0x00,0x01, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x74,0x65,0x73,0x74, + 0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x42,0xFD,0xFF,0xFF,0x06,0x00,0x10,0x00,0x58,0x00,0x00,0x00, + 0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x84,0xF5,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x00,0xF5,0xFF,0xFF,0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x63,0x6F,0x6C,0x6F,0x72,0x00,0x00,0x00,0x1C,0x00,0x1C,0x00, + 0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00, + 0x18,0x00,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x00,0x0E,0x00,0x54,0x00,0x00,0x00, 0x44,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x30,0xF4,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x39,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x10,0x00,0x10,0x00,0x06,0x00,0x07,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0E,0x0F,0x06,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x34,0x00,0x00,0x00,0xB8,0xFE,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x08,0x00,0x14,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xA0,0xF4,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x69,0x64,0x00,0x00,0x68,0xF1,0xFF,0xFF,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x00,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x04,0x00, - 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, - 0x07,0x00,0x12,0x00,0x4C,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x14,0xF5,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x90,0xF4,0xFF,0xFF,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x09,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x5F,0x74,0x79,0x70,0x65,0x00,0x00,0x00,0x42,0xFD,0xFF,0xFF, - 0x06,0x00,0x10,0x00,0x58,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x84,0xF5,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x36,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x00,0xF5,0xFF,0xFF,0x00,0x00,0x00,0x04, - 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x63,0x6F,0x6C,0x6F, - 0x72,0x00,0x00,0x00,0x1C,0x00,0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x18,0x00,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x01, - 0x05,0x00,0x0E,0x00,0x54,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x10,0x00,0x0C,0x00,0x06,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00, - 0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x69,0x6E,0x76,0x65,0x6E,0x74,0x6F,0x72, - 0x79,0x00,0x1A,0x00,0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x07,0x00, - 0x00,0x00,0x00,0x00,0x14,0x00,0x18,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x0C,0x00, - 0x98,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x94,0xF6,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x70,0x72,0x69,0x6F,0x72,0x69,0x74,0x79,0x00,0x00,0x00,0x00,0xB8,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xD4,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, - 0x0A,0x00,0x00,0x00,0x64,0x65,0x70,0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x00,0x00,0x78,0xF5,0xFF,0xFF, - 0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x72,0x69,0x65, - 0x6E,0x64,0x6C,0x79,0x00,0x00,0x1A,0x00,0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x06,0x00,0x07,0x00,0x14,0x00,0x18,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x01,0x01, - 0x03,0x00,0x0A,0x00,0x64,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xF7,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x6B,0x65,0x79,0x00,0x78,0xF7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x33,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x5C,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x0D, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6E,0x61,0x6D,0x65,0x00,0x00,0x00,0x00,0x9A,0xFF,0xFF,0xFF, - 0x02,0x00,0x08,0x00,0x54,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, - 0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0xDC,0xF7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x32,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x78,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x05, - 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x68,0x70,0x00,0x00,0x00,0x00,0x1A,0x00, - 0x24,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x01,0x00,0x06,0x00,0x54,0x00,0x00,0x00,0x40,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xF8,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0xF8,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x6D,0x61,0x6E,0x61,0x00,0x00,0x00,0x00,0x1C,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x05,0x00,0x1C,0x00,0x00,0x00, - 0x00,0x01,0x04,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xD4,0xF8,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x9C,0xF5,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x09,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x70,0x6F,0x73,0x00,0x44,0xF6,0xFF,0xFF,0x20,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x08,0x00,0x00,0x00,0xE0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, - 0x19,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x52, - 0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C,0x65,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00, - 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, - 0x00,0x01,0x04,0x00,0x74,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x8C,0xF9,0xFF,0xFF, + 0x04,0x00,0x00,0x00,0x04,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x35,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x10,0x00,0x0C,0x00,0x06,0x00,0x07,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0E,0x04,0x01,0x00,0x00,0x00, + 0x09,0x00,0x00,0x00,0x69,0x6E,0x76,0x65,0x6E,0x74,0x6F,0x72,0x79,0x00,0x1A,0x00,0x1C,0x00,0x0C,0x00, + 0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x18,0x00, + 0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x0C,0x00,0x98,0x00,0x00,0x00,0x84,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, + 0x2C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x94,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x70,0x72,0x69,0x6F,0x72,0x69,0x74,0x79, + 0x00,0x00,0x00,0x00,0xB8,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x34,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xD4,0xF6,0xFF,0xFF,0x10,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x64,0x65,0x70,0x72, + 0x65,0x63,0x61,0x74,0x65,0x64,0x00,0x00,0x78,0xF5,0xFF,0xFF,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x72,0x69,0x65,0x6E,0x64,0x6C,0x79,0x00,0x00,0x1A,0x00, + 0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x07,0x00, + 0x14,0x00,0x18,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x00,0x0A,0x00,0x64,0x00,0x00,0x00, + 0x54,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5C,0xF7,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6B,0x65,0x79,0x00,0x78,0xF7,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x5C,0xF3,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x6E,0x61,0x6D,0x65,0x00,0x00,0x00,0x00,0x9A,0xFF,0xFF,0xFF,0x02,0x00,0x08,0x00,0x54,0x00,0x00,0x00, + 0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xDC,0xF7,0xFF,0xFF, + 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x78,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x02,0x00,0x00,0x00,0x68,0x70,0x00,0x00,0x00,0x00,0x1A,0x00,0x24,0x00,0x08,0x00,0x0C,0x00,0x04,0x00, + 0x06,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, + 0x01,0x00,0x06,0x00,0x54,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x5C,0xF8,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x31,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0xF8,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x05, + 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x6D,0x61,0x6E,0x61,0x00,0x00,0x00,0x00, + 0x1C,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x10,0x00,0x14,0x00,0x05,0x00,0x1C,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x48,0x00,0x00,0x00, + 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0xD4,0xF8,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x9C,0xF5,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x09,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x70,0x6F,0x73,0x00,0x44,0xF6,0xFF,0xFF, + 0x20,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xE0,0x08,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, + 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x52,0x65,0x66,0x65,0x72,0x72,0x61,0x62,0x6C, + 0x65,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x05,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x74,0x00,0x00,0x00, + 0x60,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x24,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x8C,0xF9,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6B,0x65,0x79,0x00,0xA8,0xF9,0xFF,0xFF, + 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34, + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68,0x00,0x00,0x00,0x00,0x50,0xF8,0xFF,0xFF, + 0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, + 0x24,0xF7,0xFF,0xFF,0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00, + 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xCC,0x00,0x00,0x00, + 0x98,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, + 0x6C,0x65,0x2E,0x53,0x74,0x61,0x74,0x00,0x00,0x00,0x1A,0x00,0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00, + 0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x14,0x00,0x18,0x00,0x1A,0x00,0x00,0x00, + 0x00,0x00,0x00,0x01,0x02,0x00,0x08,0x00,0x48,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x70,0xFA,0xFF,0xFF, 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x6B,0x65,0x79,0x00,0xA8,0xF9,0xFF,0xFF,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x66,0x6E,0x76,0x31,0x61,0x5F,0x36,0x34,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x68,0x61,0x73,0x68, - 0x00,0x00,0x00,0x00,0x50,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x0A,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x24,0xF7,0xFF,0xFF,0x28,0x00,0x00,0x00,0x14,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0x40,0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x98,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, - 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x53,0x74,0x61,0x74,0x00,0x00,0x00,0x1A,0x00, - 0x1C,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00, - 0x14,0x00,0x18,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x08,0x00,0x48,0x00,0x00,0x00, + 0x6B,0x65,0x79,0x00,0x0C,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x06,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x05,0x00,0x00,0x00,0x63,0x6F,0x75,0x6E,0x74,0x00,0x00,0x00,0x76,0xFB,0xFF,0xFF,0x01,0x00,0x06,0x00, + 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xF9,0xFF,0xFF, + 0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x76,0x61,0x6C,0x00, + 0xB8,0xF7,0xFF,0xFF,0x00,0x01,0x04,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xB8,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x0D,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x69,0x64,0x00,0x00,0x88,0xF7,0xFF,0xFF,0x00,0x00,0x00,0x01,0x24,0x00,0x00,0x00,0x18,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xDC,0x06,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45, + 0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x53,0x74,0x72,0x75,0x63,0x74,0x4F,0x66,0x53,0x74,0x72,0x75,0x63, + 0x74,0x73,0x4F,0x66,0x53,0x74,0x72,0x75,0x63,0x74,0x73,0x00,0xF4,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x01, + 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xF8,0xFF,0xFF, + 0x00,0x00,0x00,0x0F,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00, + 0x10,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x14,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x54,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, + 0xD0,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, + 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x53,0x74,0x72,0x75,0x63,0x74,0x4F,0x66,0x53, + 0x74,0x72,0x75,0x63,0x74,0x73,0x00,0x00,0xCC,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x01,0x02,0x00,0x0C,0x00, + 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xF8,0xFF,0xFF, + 0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x63,0x00,0x00,0x00, + 0x1C,0x00,0x18,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x14,0x00,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x08,0x00, + 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xF8,0xFF,0xFF, + 0x00,0x00,0x00,0x0F,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x62,0x00,0x00,0x00, + 0x1C,0x00,0x14,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00, + 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x0F, + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x38,0xF9,0xFF,0xFF, + 0x00,0x00,0x00,0x01,0x28,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x2C,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00, + 0x6C,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, + 0x6C,0x65,0x2E,0x41,0x62,0x69,0x6C,0x69,0x74,0x79,0x00,0x00,0xCE,0xFD,0xFF,0xFF,0x01,0x00,0x04,0x00, + 0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0xFF,0xFF, + 0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x64,0x69,0x73,0x74,0x61,0x6E,0x63,0x65, + 0x00,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x07,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x44,0x00,0x00,0x00, 0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x70,0xFA,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6B,0x65,0x79,0x00,0x0C,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x06, - 0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x63,0x6F,0x75,0x6E,0x74,0x00,0x00,0x00, - 0x76,0xFB,0xFF,0xFF,0x01,0x00,0x06,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x40,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x09,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x76,0x61,0x6C,0x00,0xB8,0xF7,0xFF,0xFF,0x00,0x01,0x04,0x00,0x1C,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB8,0xF6,0xFF,0xFF,0x00,0x00,0x00,0x0D, - 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x88,0xF7,0xFF,0xFF,0x00,0x00,0x00,0x01, - 0x24,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0xDC,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x27,0x00,0x00,0x00, - 0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x53,0x74,0x72,0x75,0x63, - 0x74,0x4F,0x66,0x53,0x74,0x72,0x75,0x63,0x74,0x73,0x4F,0x66,0x53,0x74,0x72,0x75,0x63,0x74,0x73,0x00, - 0xF4,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x20,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x10,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x01,0x2C,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x54,0x06,0x00,0x00, - 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x28,0x00,0x00,0x00, - 0x1E,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x53, - 0x74,0x72,0x75,0x63,0x74,0x4F,0x66,0x53,0x74,0x72,0x75,0x63,0x74,0x73,0x00,0x00,0xCC,0xFF,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x02,0x00,0x0C,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xAC,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x63,0x00,0x00,0x00,0x1C,0x00,0x18,0x00,0x0C,0x00,0x10,0x00,0x08,0x00,0x0A,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x07,0x00,0x1C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x01,0x01,0x00,0x08,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xFC,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x1C,0x00,0x14,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x07,0x00,0x1C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x48,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x61,0x00,0x00,0x00,0x38,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x01,0x28,0x00,0x00,0x00,0x18,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x2C,0x05,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x6C,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, - 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x41,0x62,0x69,0x6C,0x69,0x74,0x79,0x00,0x00, - 0xCE,0xFD,0xFF,0xFF,0x01,0x00,0x04,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xE0,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x64,0x69,0x73,0x74,0x61,0x6E,0x63,0x65,0x00,0x00,0x1A,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x10,0x00,0x14,0x00,0x1A,0x00,0x00,0x00, - 0x00,0x00,0x00,0x01,0x44,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x70,0xFD,0xFF,0xFF,0x10,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6B,0x65,0x79,0x00, - 0x54,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00, - 0x14,0x00,0x24,0x00,0x08,0x00,0x0C,0x00,0x07,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x1C,0x00,0x20,0x00, - 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x68,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x20,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x28,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE4,0xFD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x66,0x6F,0x72,0x63,0x65,0x5F,0x61,0x6C, - 0x69,0x67,0x6E,0x00,0x06,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x48,0x00,0x00,0x00, - 0x60,0x01,0x00,0x00,0x30,0x01,0x00,0x00,0xE4,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, - 0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x56,0x65,0x63,0x33,0x00,0x00,0x00,0x1E,0x00, - 0x18,0x00,0x0C,0x00,0x10,0x00,0x06,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x14,0x00,0x05,0x00,0x0A,0x00,0x1E,0x00,0x00,0x00,0x00,0x01,0x05,0x00,0x1A,0x00,0x02,0x00, - 0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0xFB,0xFF,0xFF, - 0x00,0x00,0x00,0x0F,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x33,0x00,0x00,0x00,0x7A,0xFD,0xFF,0xFF,0x00,0x00,0x04,0x00,0x18,0x00,0x01,0x00,0x24,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x04, - 0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74, - 0x32,0x00,0x00,0x00,0x9E,0xFF,0xFF,0xFF,0x03,0x00,0x10,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x0C,0x08,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x31,0x00,0x00,0x00,0xEA,0xFD,0xFF,0xFF, - 0x00,0x00,0x02,0x00,0x08,0x00,0x04,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xE8,0xFA,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x7A,0x00,0x1A,0x00,0x14,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x1A,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x1C,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x0B, - 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x79,0x00,0x00,0x00,0x6E,0xFB,0xFF,0xFF,0x1C,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x0B, - 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x14,0x00,0x1C,0x00,0x04,0x00,0x08,0x00, - 0x00,0x00,0x0C,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x14,0x00,0x00,0x00,0x80,0x00,0x00,0x00, - 0x74,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x30,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE0,0xFF,0xFF,0xFF, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x07,0x00,0x00,0x00, - 0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x00,0x08,0x00,0x0C,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x00,0x00, - 0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0E,0x00,0x00,0x00, - 0x63,0x73,0x68,0x61,0x72,0x70,0x5F,0x70,0x61,0x72,0x74,0x69,0x61,0x6C,0x00,0x00,0x01,0x00,0x00,0x00, - 0x4C,0x00,0x00,0x00,0x26,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, - 0x6C,0x65,0x2E,0x54,0x65,0x73,0x74,0x53,0x69,0x6D,0x70,0x6C,0x65,0x54,0x61,0x62,0x6C,0x65,0x57,0x69, - 0x74,0x68,0x45,0x6E,0x75,0x6D,0x00,0x00,0x00,0x00,0x1A,0x00,0x1C,0x00,0x08,0x00,0x0C,0x00,0x00,0x00, - 0x06,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x1A,0x00,0x00,0x00, - 0x00,0x00,0x04,0x00,0x3C,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00, - 0x0C,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x63,0x6F,0x6C,0x6F,0x72,0x00,0x00,0x00,0x54,0xFD,0xFF,0xFF, - 0x00,0x00,0x00,0x01,0x28,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x08,0x00,0x00,0x00,0x10,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x74,0x00,0x00,0x00, - 0x3C,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, - 0x6C,0x65,0x2E,0x54,0x65,0x73,0x74,0x00,0x00,0x00,0x1E,0x00,0x18,0x00,0x0C,0x00,0x10,0x00,0x06,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0A,0x00, - 0x1E,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x01,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD4,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x62,0xFD,0xFF,0xFF,0x30,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x70,0xFD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x6B,0x65,0x79,0x00,0x54,0xF9,0xFF,0xFF,0x00,0x00,0x00,0x08, + 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x69,0x64,0x00,0x00,0x14,0x00,0x24,0x00,0x08,0x00,0x0C,0x00, + 0x07,0x00,0x10,0x00,0x14,0x00,0x18,0x00,0x1C,0x00,0x20,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x68,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x10,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x28,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0xE4,0xFD,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x00, + 0x0B,0x00,0x00,0x00,0x66,0x6F,0x72,0x63,0x65,0x5F,0x61,0x6C,0x69,0x67,0x6E,0x00,0x06,0x00,0x00,0x00, + 0xC4,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x60,0x01,0x00,0x00,0x30,0x01,0x00,0x00, + 0xE4,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, + 0x6C,0x65,0x2E,0x56,0x65,0x63,0x33,0x00,0x00,0x00,0x1E,0x00,0x18,0x00,0x0C,0x00,0x10,0x00,0x06,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x05,0x00,0x0A,0x00, + 0x1E,0x00,0x00,0x00,0x00,0x01,0x05,0x00,0x1A,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x06,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x33,0x00,0x00,0x00,0x7A,0xFD,0xFF,0xFF, + 0x00,0x00,0x04,0x00,0x18,0x00,0x01,0x00,0x24,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0xFE,0xFF,0xFF,0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x74,0x65,0x73,0x74,0x32,0x00,0x00,0x00,0x9E,0xFF,0xFF,0xFF, + 0x03,0x00,0x10,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x68,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x0C,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0x74,0x65,0x73,0x74,0x31,0x00,0x00,0x00,0xEA,0xFD,0xFF,0xFF,0x00,0x00,0x02,0x00,0x08,0x00,0x04,0x00, + 0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE8,0xFA,0xFF,0xFF, + 0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x7A,0x00,0x1A,0x00,0x14,0x00,0x08,0x00, + 0x0C,0x00,0x04,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00, + 0x1A,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x2C,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x79,0x00,0x00,0x00,0x6E,0xFB,0xFF,0xFF,0x1C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x54,0xFB,0xFF,0xFF,0x00,0x00,0x00,0x0B,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x78,0x00,0x00,0x00,0x14,0x00,0x1C,0x00,0x04,0x00,0x08,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x10,0x00, + 0x14,0x00,0x18,0x00,0x14,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x30,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, + 0x30,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xE0,0xFF,0xFF,0xFF,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x00, + 0x08,0x00,0x0C,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x63,0x73,0x68,0x61,0x72,0x70,0x5F,0x70, + 0x61,0x72,0x74,0x69,0x61,0x6C,0x00,0x00,0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x26,0x00,0x00,0x00, + 0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x54,0x65,0x73,0x74,0x53, + 0x69,0x6D,0x70,0x6C,0x65,0x54,0x61,0x62,0x6C,0x65,0x57,0x69,0x74,0x68,0x45,0x6E,0x75,0x6D,0x00,0x00, + 0x00,0x00,0x1A,0x00,0x1C,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00,0x14,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x3C,0x00,0x00,0x00, + 0x24,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x14,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x10,0x00,0x00,0x00, + 0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00, + 0x63,0x6F,0x6C,0x6F,0x72,0x00,0x00,0x00,0x54,0xFD,0xFF,0xFF,0x00,0x00,0x00,0x01,0x28,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x10,0x01,0x00,0x00, + 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x74,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x13,0x00,0x00,0x00, + 0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x2E,0x54,0x65,0x73,0x74,0x00, + 0x00,0x00,0x1E,0x00,0x18,0x00,0x0C,0x00,0x10,0x00,0x06,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x0A,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x01,0x00, + 0x02,0x00,0x01,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xD4,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x62,0x00,0x00,0x00,0x62,0xFD,0xFF,0xFF,0x30,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x0C,0x00, + 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x61,0x00,0x00,0x00,0xE4,0xFE,0xFF,0xFF,0x1C,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x08,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x00,0x00,0x00, + 0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70,0x6C,0x65,0x32,0x2E,0x4D,0x6F,0x6E,0x73, + 0x74,0x65,0x72,0x00,0x20,0xFF,0xFF,0xFF,0x34,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x2F,0x2F,0x6D,0x6F,0x6E,0x73,0x74,0x65, + 0x72,0x5F,0x74,0x65,0x73,0x74,0x2E,0x66,0x62,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x18,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x49,0x6E,0x50,0x61,0x72,0x65,0x6E,0x74,0x4E, + 0x61,0x6D,0x65,0x73,0x70,0x61,0x63,0x65,0x00,0x00,0x00,0x00,0x78,0xFF,0xFF,0xFF,0x48,0x00,0x00,0x00, + 0x3C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x2F,0x2F,0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x2F,0x69,0x6E,0x63,0x6C,0x75, + 0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x31,0x2E,0x66,0x62,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x54,0x61,0x62,0x6C,0x65,0x41,0x00,0x00, + 0x74,0xFF,0xFF,0xFF,0x00,0x01,0x04,0x00,0x20,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x58,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0F,0x0C,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x14,0x00,0x18,0x00,0x04,0x00,0x08,0x00,0x00,0x00,0x0C,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x14,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x14,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x44,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x4F,0x74,0x68,0x65,0x72, + 0x4E,0x61,0x6D,0x65,0x53,0x70,0x61,0x63,0x65,0x2E,0x54,0x61,0x62,0x6C,0x65,0x42,0x00,0x00,0x00,0x00, + 0x1C,0x00,0x14,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x10,0x00,0x05,0x00,0x1C,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x30,0x00,0x00,0x00, 0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x07,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x08,0x00,0x0C,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x02,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0xE4,0xFE,0xFF,0xFF,0x1C,0x00,0x00,0x00, - 0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x45,0x78,0x61,0x6D,0x70, - 0x6C,0x65,0x32,0x2E,0x4D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x00,0x20,0xFF,0xFF,0xFF,0x34,0x00,0x00,0x00, - 0x2C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x00,0x00,0x00, - 0x2F,0x2F,0x6D,0x6F,0x6E,0x73,0x74,0x65,0x72,0x5F,0x74,0x65,0x73,0x74,0x2E,0x66,0x62,0x73,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x49, - 0x6E,0x50,0x61,0x72,0x65,0x6E,0x74,0x4E,0x61,0x6D,0x65,0x73,0x70,0x61,0x63,0x65,0x00,0x00,0x00,0x00, - 0x78,0xFF,0xFF,0xFF,0x48,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x2F,0x2F,0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65, - 0x73,0x74,0x2F,0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x31,0x2E,0x66,0x62,0x73, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x06,0x00,0x00,0x00, - 0x54,0x61,0x62,0x6C,0x65,0x41,0x00,0x00,0x74,0xFF,0xFF,0xFF,0x00,0x01,0x04,0x00,0x20,0x00,0x00,0x00, - 0x0C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x0F, - 0x0C,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x62,0x00,0x00,0x00,0x14,0x00,0x18,0x00, - 0x04,0x00,0x08,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x14,0x00,0x14,0x00,0x00,0x00, - 0x20,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0xC4,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x4D,0x79,0x47,0x61, - 0x6D,0x65,0x2E,0x4F,0x74,0x68,0x65,0x72,0x4E,0x61,0x6D,0x65,0x53,0x70,0x61,0x63,0x65,0x2E,0x54,0x61, - 0x62,0x6C,0x65,0x42,0x00,0x00,0x00,0x00,0x1C,0x00,0x14,0x00,0x08,0x00,0x0C,0x00,0x00,0x00,0x06,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x05,0x00,0x1C,0x00,0x00,0x00, - 0x00,0x01,0x04,0x00,0x30,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x10,0x00,0x07,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0F,0x0E,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00, - 0x14,0x00,0x20,0x00,0x08,0x00,0x0C,0x00,0x07,0x00,0x10,0x00,0x14,0x00,0x00,0x00,0x18,0x00,0x1C,0x00, - 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x50,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x2F,0x2F,0x69,0x6E, - 0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x2F,0x73,0x75,0x62,0x2F,0x69,0x6E,0x63,0x6C,0x75, - 0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x32,0x2E,0x66,0x62,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x4F, - 0x74,0x68,0x65,0x72,0x4E,0x61,0x6D,0x65,0x53,0x70,0x61,0x63,0x65,0x2E,0x55,0x6E,0x75,0x73,0x65,0x64, - 0x00,0x00,0x1A,0x00,0x10,0x00,0x04,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x1A,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x0C,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, - 0x61,0x00,0x00,0x00 + 0x08,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0E,0x00,0x00,0x00, + 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x14,0x00,0x20,0x00,0x08,0x00,0x0C,0x00, + 0x07,0x00,0x10,0x00,0x14,0x00,0x00,0x00,0x18,0x00,0x1C,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + 0x50,0x00,0x00,0x00,0x44,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x34,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x2F,0x2F,0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65, + 0x73,0x74,0x2F,0x73,0x75,0x62,0x2F,0x69,0x6E,0x63,0x6C,0x75,0x64,0x65,0x5F,0x74,0x65,0x73,0x74,0x32, + 0x2E,0x66,0x62,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00, + 0x1C,0x00,0x00,0x00,0x4D,0x79,0x47,0x61,0x6D,0x65,0x2E,0x4F,0x74,0x68,0x65,0x72,0x4E,0x61,0x6D,0x65, + 0x53,0x70,0x61,0x63,0x65,0x2E,0x55,0x6E,0x75,0x73,0x65,0x64,0x00,0x00,0x1A,0x00,0x10,0x00,0x04,0x00, + 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00, + 0x1A,0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x10,0x00,0x0C,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00, + 0x00,0x00,0x00,0x07,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x61,0x00,0x00,0x00 }; return bfbsData; } static size_t size() { - return 14784; + return 15736; } const uint8_t *begin() { return data(); diff --git a/third_party/flatbuffers/tests/monster_test_generated.h b/third_party/flatbuffers/tests/monster_test_generated.h index deab77be2c..ce5acf8357 100644 --- a/third_party/flatbuffers/tests/monster_test_generated.h +++ b/third_party/flatbuffers/tests/monster_test_generated.h @@ -10,9 +10,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -1309,6 +1309,14 @@ struct MonsterT : public flatbuffers::NativeTable { MyGame::Example::Test native_inline{}; MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0); MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne; + float nan_default = std::numeric_limits::quiet_NaN(); + float inf_default = std::numeric_limits::infinity(); + float positive_inf_default = std::numeric_limits::infinity(); + float infinity_default = std::numeric_limits::infinity(); + float positive_infinity_default = std::numeric_limits::infinity(); + float negative_inf_default = -std::numeric_limits::infinity(); + float negative_infinity_default = -std::numeric_limits::infinity(); + double double_inf_default = std::numeric_limits::infinity(); MonsterT() = default; MonsterT(const MonsterT &o); MonsterT(MonsterT&&) FLATBUFFERS_NOEXCEPT = default; @@ -1375,7 +1383,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_SCALAR_KEY_SORTED_TABLES = 104, VT_NATIVE_INLINE = 106, VT_LONG_ENUM_NON_ENUM_DEFAULT = 108, - VT_LONG_ENUM_NORMAL_DEFAULT = 110 + VT_LONG_ENUM_NORMAL_DEFAULT = 110, + VT_NAN_DEFAULT = 112, + VT_INF_DEFAULT = 114, + VT_POSITIVE_INF_DEFAULT = 116, + VT_INFINITY_DEFAULT = 118, + VT_POSITIVE_INFINITY_DEFAULT = 120, + VT_NEGATIVE_INF_DEFAULT = 122, + VT_NEGATIVE_INFINITY_DEFAULT = 124, + VT_DOUBLE_INF_DEFAULT = 126 }; const MyGame::Example::Vec3 *pos() const { return GetStruct(VT_POS); @@ -1732,6 +1748,54 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool mutate_long_enum_normal_default(MyGame::Example::LongEnum _long_enum_normal_default = static_cast(2ULL)) { return SetField(VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(_long_enum_normal_default), 2ULL); } + float nan_default() const { + return GetField(VT_NAN_DEFAULT, std::numeric_limits::quiet_NaN()); + } + bool mutate_nan_default(float _nan_default = std::numeric_limits::quiet_NaN()) { + return SetField(VT_NAN_DEFAULT, _nan_default, std::numeric_limits::quiet_NaN()); + } + float inf_default() const { + return GetField(VT_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_inf_default(float _inf_default = std::numeric_limits::infinity()) { + return SetField(VT_INF_DEFAULT, _inf_default, std::numeric_limits::infinity()); + } + float positive_inf_default() const { + return GetField(VT_POSITIVE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_inf_default(float _positive_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INF_DEFAULT, _positive_inf_default, std::numeric_limits::infinity()); + } + float infinity_default() const { + return GetField(VT_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_infinity_default(float _infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_INFINITY_DEFAULT, _infinity_default, std::numeric_limits::infinity()); + } + float positive_infinity_default() const { + return GetField(VT_POSITIVE_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_infinity_default(float _positive_infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INFINITY_DEFAULT, _positive_infinity_default, std::numeric_limits::infinity()); + } + float negative_inf_default() const { + return GetField(VT_NEGATIVE_INF_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_inf_default(float _negative_inf_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INF_DEFAULT, _negative_inf_default, -std::numeric_limits::infinity()); + } + float negative_infinity_default() const { + return GetField(VT_NEGATIVE_INFINITY_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_infinity_default(float _negative_infinity_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INFINITY_DEFAULT, _negative_infinity_default, -std::numeric_limits::infinity()); + } + double double_inf_default() const { + return GetField(VT_DOUBLE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_double_inf_default(double _double_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_DOUBLE_INF_DEFAULT, _double_inf_default, std::numeric_limits::infinity()); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_POS, 8) && @@ -1823,6 +1887,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_NATIVE_INLINE, 2) && VerifyField(verifier, VT_LONG_ENUM_NON_ENUM_DEFAULT, 8) && VerifyField(verifier, VT_LONG_ENUM_NORMAL_DEFAULT, 8) && + VerifyField(verifier, VT_NAN_DEFAULT, 4) && + VerifyField(verifier, VT_INF_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_DOUBLE_INF_DEFAULT, 8) && verifier.EndTable(); } MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -2017,6 +2089,30 @@ struct MonsterBuilder { void add_long_enum_normal_default(MyGame::Example::LongEnum long_enum_normal_default) { fbb_.AddElement(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(long_enum_normal_default), 2ULL); } + void add_nan_default(float nan_default) { + fbb_.AddElement(Monster::VT_NAN_DEFAULT, nan_default, std::numeric_limits::quiet_NaN()); + } + void add_inf_default(float inf_default) { + fbb_.AddElement(Monster::VT_INF_DEFAULT, inf_default, std::numeric_limits::infinity()); + } + void add_positive_inf_default(float positive_inf_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, std::numeric_limits::infinity()); + } + void add_infinity_default(float infinity_default) { + fbb_.AddElement(Monster::VT_INFINITY_DEFAULT, infinity_default, std::numeric_limits::infinity()); + } + void add_positive_infinity_default(float positive_infinity_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, std::numeric_limits::infinity()); + } + void add_negative_inf_default(float negative_inf_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, -std::numeric_limits::infinity()); + } + void add_negative_infinity_default(float negative_infinity_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, -std::numeric_limits::infinity()); + } + void add_double_inf_default(double double_inf_default) { + fbb_.AddElement(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, std::numeric_limits::infinity()); + } explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -2083,8 +2179,17 @@ inline flatbuffers::Offset CreateMonster( flatbuffers::Offset>> scalar_key_sorted_tables = 0, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { MonsterBuilder builder_(_fbb); + builder_.add_double_inf_default(double_inf_default); builder_.add_long_enum_normal_default(long_enum_normal_default); builder_.add_long_enum_non_enum_default(long_enum_non_enum_default); builder_.add_non_owning_reference(non_owning_reference); @@ -2094,6 +2199,13 @@ inline flatbuffers::Offset CreateMonster( builder_.add_testhashs64_fnv1a(testhashs64_fnv1a); builder_.add_testhashu64_fnv1(testhashu64_fnv1); builder_.add_testhashs64_fnv1(testhashs64_fnv1); + builder_.add_negative_infinity_default(negative_infinity_default); + builder_.add_negative_inf_default(negative_inf_default); + builder_.add_positive_infinity_default(positive_infinity_default); + builder_.add_infinity_default(infinity_default); + builder_.add_positive_inf_default(positive_inf_default); + builder_.add_inf_default(inf_default); + builder_.add_nan_default(nan_default); builder_.add_native_inline(native_inline); builder_.add_scalar_key_sorted_tables(scalar_key_sorted_tables); builder_.add_testrequirednestedflatbuffer(testrequirednestedflatbuffer); @@ -2195,7 +2307,15 @@ inline flatbuffers::Offset CreateMonsterDirect( std::vector> *scalar_key_sorted_tables = nullptr, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { auto name__ = name ? _fbb.CreateString(name) : 0; auto inventory__ = inventory ? _fbb.CreateVector(*inventory) : 0; auto test4__ = test4 ? _fbb.CreateVectorOfStructs(*test4) : 0; @@ -2271,7 +2391,15 @@ inline flatbuffers::Offset CreateMonsterDirect( scalar_key_sorted_tables__, native_inline, long_enum_non_enum_default, - long_enum_normal_default); + long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default); } flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); @@ -2767,7 +2895,15 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) { (lhs.scalar_key_sorted_tables.size() == rhs.scalar_key_sorted_tables.size() && std::equal(lhs.scalar_key_sorted_tables.cbegin(), lhs.scalar_key_sorted_tables.cend(), rhs.scalar_key_sorted_tables.cbegin(), [](flatbuffers::unique_ptr const &a, flatbuffers::unique_ptr const &b) { return (a == b) || (a && b && *a == *b); })) && (lhs.native_inline == rhs.native_inline) && (lhs.long_enum_non_enum_default == rhs.long_enum_non_enum_default) && - (lhs.long_enum_normal_default == rhs.long_enum_normal_default); + (lhs.long_enum_normal_default == rhs.long_enum_normal_default) && + (lhs.nan_default == rhs.nan_default) && + (lhs.inf_default == rhs.inf_default) && + (lhs.positive_inf_default == rhs.positive_inf_default) && + (lhs.infinity_default == rhs.infinity_default) && + (lhs.positive_infinity_default == rhs.positive_infinity_default) && + (lhs.negative_inf_default == rhs.negative_inf_default) && + (lhs.negative_infinity_default == rhs.negative_infinity_default) && + (lhs.double_inf_default == rhs.double_inf_default); } inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) { @@ -2820,7 +2956,15 @@ inline MonsterT::MonsterT(const MonsterT &o) testrequirednestedflatbuffer(o.testrequirednestedflatbuffer), native_inline(o.native_inline), long_enum_non_enum_default(o.long_enum_non_enum_default), - long_enum_normal_default(o.long_enum_normal_default) { + long_enum_normal_default(o.long_enum_normal_default), + nan_default(o.nan_default), + inf_default(o.inf_default), + positive_inf_default(o.positive_inf_default), + infinity_default(o.infinity_default), + positive_infinity_default(o.positive_infinity_default), + negative_inf_default(o.negative_inf_default), + negative_infinity_default(o.negative_infinity_default), + double_inf_default(o.double_inf_default) { testarrayoftables.reserve(o.testarrayoftables.size()); for (const auto &testarrayoftables_ : o.testarrayoftables) { testarrayoftables.emplace_back((testarrayoftables_) ? new MyGame::Example::MonsterT(*testarrayoftables_) : nullptr); } vector_of_referrables.reserve(o.vector_of_referrables.size()); @@ -2884,6 +3028,14 @@ inline MonsterT &MonsterT::operator=(MonsterT o) FLATBUFFERS_NOEXCEPT { std::swap(native_inline, o.native_inline); std::swap(long_enum_non_enum_default, o.long_enum_non_enum_default); std::swap(long_enum_normal_default, o.long_enum_normal_default); + std::swap(nan_default, o.nan_default); + std::swap(inf_default, o.inf_default); + std::swap(positive_inf_default, o.positive_inf_default); + std::swap(infinity_default, o.infinity_default); + std::swap(positive_infinity_default, o.positive_infinity_default); + std::swap(negative_inf_default, o.negative_inf_default); + std::swap(negative_infinity_default, o.negative_infinity_default); + std::swap(double_inf_default, o.double_inf_default); return *this; } @@ -2949,6 +3101,14 @@ inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function { auto _e = native_inline(); if (_e) _o->native_inline = *_e; } { auto _e = long_enum_non_enum_default(); _o->long_enum_non_enum_default = _e; } { auto _e = long_enum_normal_default(); _o->long_enum_normal_default = _e; } + { auto _e = nan_default(); _o->nan_default = _e; } + { auto _e = inf_default(); _o->inf_default = _e; } + { auto _e = positive_inf_default(); _o->positive_inf_default = _e; } + { auto _e = infinity_default(); _o->infinity_default = _e; } + { auto _e = positive_infinity_default(); _o->positive_infinity_default = _e; } + { auto _e = negative_inf_default(); _o->negative_inf_default = _e; } + { auto _e = negative_infinity_default(); _o->negative_infinity_default = _e; } + { auto _e = double_inf_default(); _o->double_inf_default = _e; } } inline flatbuffers::Offset Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) { @@ -3012,6 +3172,14 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder auto _native_inline = &_o->native_inline; auto _long_enum_non_enum_default = _o->long_enum_non_enum_default; auto _long_enum_normal_default = _o->long_enum_normal_default; + auto _nan_default = _o->nan_default; + auto _inf_default = _o->inf_default; + auto _positive_inf_default = _o->positive_inf_default; + auto _infinity_default = _o->infinity_default; + auto _positive_infinity_default = _o->positive_infinity_default; + auto _negative_inf_default = _o->negative_inf_default; + auto _negative_infinity_default = _o->negative_infinity_default; + auto _double_inf_default = _o->double_inf_default; return MyGame::Example::CreateMonster( _fbb, _pos, @@ -3066,7 +3234,15 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder _scalar_key_sorted_tables, _native_inline, _long_enum_non_enum_default, - _long_enum_normal_default); + _long_enum_normal_default, + _nan_default, + _inf_default, + _positive_inf_default, + _infinity_default, + _positive_infinity_default, + _negative_inf_default, + _negative_infinity_default, + _double_inf_default); } @@ -3846,7 +4022,15 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { { flatbuffers::ET_SEQUENCE, 1, 5 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_ULONG, 0, 12 }, - { flatbuffers::ET_ULONG, 0, 12 } + { flatbuffers::ET_ULONG, 0, 12 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_DOUBLE, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { MyGame::Example::Vec3TypeTable, @@ -3917,10 +4101,18 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; static const flatbuffers::TypeTable tt = { - flatbuffers::ST_TABLE, 54, type_codes, type_refs, nullptr, nullptr, names + flatbuffers::ST_TABLE, 62, type_codes, type_refs, nullptr, nullptr, names }; return &tt; } diff --git a/third_party/flatbuffers/tests/monster_test_generated.lobster b/third_party/flatbuffers/tests/monster_test_generated.lobster index c3ee785e75..d6390fd8b1 100644 --- a/third_party/flatbuffers/tests/monster_test_generated.lobster +++ b/third_party/flatbuffers/tests/monster_test_generated.lobster @@ -425,13 +425,29 @@ class Monster : flatbuffers_handle return LongEnum(buf_.flatbuffers_field_uint64(pos_, 108, 0)) def long_enum_normal_default() -> LongEnum: return LongEnum(buf_.flatbuffers_field_uint64(pos_, 110, 2)) + def nan_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 112, nan) + def inf_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 114, inf) + def positive_inf_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 116, +inf) + def infinity_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 118, infinity) + def positive_infinity_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 120, +infinity) + def negative_inf_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 122, -inf) + def negative_infinity_default() -> float: + return buf_.flatbuffers_field_float32(pos_, 124, -infinity) + def double_inf_default() -> float: + return buf_.flatbuffers_field_float64(pos_, 126, inf) def GetRootAsMonster(buf:string): return Monster { buf, buf.flatbuffers_indirect(0) } struct MonsterBuilder: b_:flatbuffers_builder def start(): - b_.StartObject(54) + b_.StartObject(62) return this def add_pos(pos:flatbuffers_offset): b_.PrependStructSlot(0, pos) @@ -592,6 +608,30 @@ struct MonsterBuilder: def add_long_enum_normal_default(long_enum_normal_default:LongEnum): b_.PrependUint64Slot(53, long_enum_normal_default, 2) return this + def add_nan_default(nan_default:float): + b_.PrependFloat32Slot(54, nan_default, nan) + return this + def add_inf_default(inf_default:float): + b_.PrependFloat32Slot(55, inf_default, inf) + return this + def add_positive_inf_default(positive_inf_default:float): + b_.PrependFloat32Slot(56, positive_inf_default, +inf) + return this + def add_infinity_default(infinity_default:float): + b_.PrependFloat32Slot(57, infinity_default, infinity) + return this + def add_positive_infinity_default(positive_infinity_default:float): + b_.PrependFloat32Slot(58, positive_infinity_default, +infinity) + return this + def add_negative_inf_default(negative_inf_default:float): + b_.PrependFloat32Slot(59, negative_inf_default, -inf) + return this + def add_negative_infinity_default(negative_infinity_default:float): + b_.PrependFloat32Slot(60, negative_infinity_default, -infinity) + return this + def add_double_inf_default(double_inf_default:float): + b_.PrependFloat64Slot(61, double_inf_default, inf) + return this def end(): return b_.EndObject() diff --git a/third_party/flatbuffers/tests/monster_test_generated.py b/third_party/flatbuffers/tests/monster_test_generated.py index 0fa2140560..b70c31a2fb 100644 --- a/third_party/flatbuffers/tests/monster_test_generated.py +++ b/third_party/flatbuffers/tests/monster_test_generated.py @@ -124,6 +124,11 @@ def InitFromBuf(cls, buf, pos): inParentNamespace.Init(buf, pos) return cls.InitFromObj(inParentNamespace) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, inParentNamespace): x = InParentNamespaceT() @@ -180,6 +185,11 @@ def InitFromBuf(cls, buf, pos): monster.Init(buf, pos) return cls.InitFromObj(monster) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, monster): x = MonsterT() @@ -235,6 +245,11 @@ def InitFromBuf(cls, buf, pos): test.Init(buf, pos) return cls.InitFromObj(test) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, test): x = TestT() @@ -299,6 +314,11 @@ def InitFromBuf(cls, buf, pos): testSimpleTableWithEnum.Init(buf, pos) return cls.InitFromObj(testSimpleTableWithEnum) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, testSimpleTableWithEnum): x = TestSimpleTableWithEnumT() @@ -384,6 +404,11 @@ def InitFromBuf(cls, buf, pos): vec3.Init(buf, pos) return cls.InitFromObj(vec3) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, vec3): x = Vec3T() @@ -443,6 +468,11 @@ def InitFromBuf(cls, buf, pos): ability.Init(buf, pos) return cls.InitFromObj(ability) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, ability): x = AbilityT() @@ -521,6 +551,11 @@ def InitFromBuf(cls, buf, pos): structOfStructs.Init(buf, pos) return cls.InitFromObj(structOfStructs) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, structOfStructs): x = StructOfStructsT() @@ -592,6 +627,11 @@ def InitFromBuf(cls, buf, pos): structOfStructsOfStructs.Init(buf, pos) return cls.InitFromObj(structOfStructsOfStructs) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, structOfStructsOfStructs): x = StructOfStructsOfStructsT() @@ -674,6 +714,11 @@ def InitFromBuf(cls, buf, pos): stat.Init(buf, pos) return cls.InitFromObj(stat) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, stat): x = StatT() @@ -747,6 +792,11 @@ def InitFromBuf(cls, buf, pos): referrable.Init(buf, pos) return cls.InitFromObj(referrable) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, referrable): x = ReferrableT() @@ -1565,7 +1615,63 @@ def LongEnumNormalDefault(self): return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) return 2 -def MonsterStart(builder): builder.StartObject(54) + # Monster + def NanDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(112)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('nan') + + # Monster + def InfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(114)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def PositiveInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(116)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def InfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(118)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def PositiveInfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(120)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('inf') + + # Monster + def NegativeInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(122)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('-inf') + + # Monster + def NegativeInfinityDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(124)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) + return float('-inf') + + # Monster + def DoubleInfDefault(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(126)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return float('inf') + +def MonsterStart(builder): builder.StartObject(62) def MonsterAddPos(builder, pos): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0) def MonsterAddMana(builder, mana): builder.PrependInt16Slot(1, mana, 150) def MonsterAddHp(builder, hp): builder.PrependInt16Slot(2, hp, 100) @@ -1649,6 +1755,14 @@ def MonsterStartScalarKeySortedTablesVector(builder, numElems): return builder.S def MonsterAddNativeInline(builder, nativeInline): builder.PrependStructSlot(51, flatbuffers.number_types.UOffsetTFlags.py_type(nativeInline), 0) def MonsterAddLongEnumNonEnumDefault(builder, longEnumNonEnumDefault): builder.PrependUint64Slot(52, longEnumNonEnumDefault, 0) def MonsterAddLongEnumNormalDefault(builder, longEnumNormalDefault): builder.PrependUint64Slot(53, longEnumNormalDefault, 2) +def MonsterAddNanDefault(builder, nanDefault): builder.PrependFloat32Slot(54, nanDefault, float('nan')) +def MonsterAddInfDefault(builder, infDefault): builder.PrependFloat32Slot(55, infDefault, float('inf')) +def MonsterAddPositiveInfDefault(builder, positiveInfDefault): builder.PrependFloat32Slot(56, positiveInfDefault, float('inf')) +def MonsterAddInfinityDefault(builder, infinityDefault): builder.PrependFloat32Slot(57, infinityDefault, float('inf')) +def MonsterAddPositiveInfinityDefault(builder, positiveInfinityDefault): builder.PrependFloat32Slot(58, positiveInfinityDefault, float('inf')) +def MonsterAddNegativeInfDefault(builder, negativeInfDefault): builder.PrependFloat32Slot(59, negativeInfDefault, float('-inf')) +def MonsterAddNegativeInfinityDefault(builder, negativeInfinityDefault): builder.PrependFloat32Slot(60, negativeInfinityDefault, float('-inf')) +def MonsterAddDoubleInfDefault(builder, doubleInfDefault): builder.PrependFloat64Slot(61, doubleInfDefault, float('inf')) def MonsterEnd(builder): return builder.EndObject() try: @@ -1713,6 +1827,14 @@ def __init__(self): self.nativeInline = None # type: Optional[TestT] self.longEnumNonEnumDefault = 0 # type: int self.longEnumNormalDefault = 2 # type: int + self.nanDefault = float('nan') # type: float + self.infDefault = float('inf') # type: float + self.positiveInfDefault = float('inf') # type: float + self.infinityDefault = float('inf') # type: float + self.positiveInfinityDefault = float('inf') # type: float + self.negativeInfDefault = float('-inf') # type: float + self.negativeInfinityDefault = float('-inf') # type: float + self.doubleInfDefault = float('inf') # type: float @classmethod def InitFromBuf(cls, buf, pos): @@ -1720,6 +1842,11 @@ def InitFromBuf(cls, buf, pos): monster.Init(buf, pos) return cls.InitFromObj(monster) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, monster): x = MonsterT() @@ -1909,6 +2036,14 @@ def _UnPack(self, monster): self.nativeInline = TestT.InitFromObj(monster.NativeInline()) self.longEnumNonEnumDefault = monster.LongEnumNonEnumDefault() self.longEnumNormalDefault = monster.LongEnumNormalDefault() + self.nanDefault = monster.NanDefault() + self.infDefault = monster.InfDefault() + self.positiveInfDefault = monster.PositiveInfDefault() + self.infinityDefault = monster.InfinityDefault() + self.positiveInfinityDefault = monster.PositiveInfinityDefault() + self.negativeInfDefault = monster.NegativeInfDefault() + self.negativeInfinityDefault = monster.NegativeInfinityDefault() + self.doubleInfDefault = monster.DoubleInfDefault() # MonsterT def Pack(self, builder): @@ -2162,6 +2297,14 @@ def Pack(self, builder): MonsterAddNativeInline(builder, nativeInline) MonsterAddLongEnumNonEnumDefault(builder, self.longEnumNonEnumDefault) MonsterAddLongEnumNormalDefault(builder, self.longEnumNormalDefault) + MonsterAddNanDefault(builder, self.nanDefault) + MonsterAddInfDefault(builder, self.infDefault) + MonsterAddPositiveInfDefault(builder, self.positiveInfDefault) + MonsterAddInfinityDefault(builder, self.infinityDefault) + MonsterAddPositiveInfinityDefault(builder, self.positiveInfinityDefault) + MonsterAddNegativeInfDefault(builder, self.negativeInfDefault) + MonsterAddNegativeInfinityDefault(builder, self.negativeInfinityDefault) + MonsterAddDoubleInfDefault(builder, self.doubleInfDefault) monster = MonsterEnd(builder) return monster @@ -2357,6 +2500,11 @@ def InitFromBuf(cls, buf, pos): typeAliases.Init(buf, pos) return cls.InitFromObj(typeAliases) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, typeAliases): x = TypeAliasesT() diff --git a/third_party/flatbuffers/tests/monster_test_my_game.example_generated.dart b/third_party/flatbuffers/tests/monster_test_my_game.example_generated.dart index 174fe1d8dd..a9e9e812ac 100644 --- a/third_party/flatbuffers/tests/monster_test_my_game.example_generated.dart +++ b/third_party/flatbuffers/tests/monster_test_my_game.example_generated.dart @@ -1258,10 +1258,18 @@ class Monster { Test? get nativeInline => Test.reader.vTableGetNullable(_bc, _bcOffset, 106); LongEnum get longEnumNonEnumDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 108, 0)); LongEnum get longEnumNormalDefault => LongEnum.fromValue(const fb.Uint64Reader().vTableGet(_bc, _bcOffset, 110, 2)); + double get nanDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 112, double.nan); + double get infDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 114, double.infinity); + double get positiveInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 116, double.infinity); + double get infinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 118, double.infinity); + double get positiveInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 120, double.infinity); + double get negativeInfDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 122, double.negativeInfinity); + double get negativeInfinityDefault => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 124, double.negativeInfinity); + double get doubleInfDefault => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 126, double.infinity); @override String toString() { - return 'Monster{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}'; + return 'Monster{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}, nanDefault: ${nanDefault}, infDefault: ${infDefault}, positiveInfDefault: ${positiveInfDefault}, infinityDefault: ${infinityDefault}, positiveInfinityDefault: ${positiveInfinityDefault}, negativeInfDefault: ${negativeInfDefault}, negativeInfinityDefault: ${negativeInfinityDefault}, doubleInfDefault: ${doubleInfDefault}}'; } MonsterT unpack() => MonsterT( @@ -1317,7 +1325,15 @@ class Monster { scalarKeySortedTables: scalarKeySortedTables?.map((e) => e.unpack()).toList(), nativeInline: nativeInline?.unpack(), longEnumNonEnumDefault: longEnumNonEnumDefault, - longEnumNormalDefault: longEnumNormalDefault); + longEnumNormalDefault: longEnumNormalDefault, + nanDefault: nanDefault, + infDefault: infDefault, + positiveInfDefault: positiveInfDefault, + infinityDefault: infinityDefault, + positiveInfinityDefault: positiveInfinityDefault, + negativeInfDefault: negativeInfDefault, + negativeInfinityDefault: negativeInfinityDefault, + doubleInfDefault: doubleInfDefault); static int pack(fb.Builder fbBuilder, MonsterT? object) { if (object == null) return 0; @@ -1382,6 +1398,14 @@ class MonsterT implements fb.Packable { TestT? nativeInline; LongEnum longEnumNonEnumDefault; LongEnum longEnumNormalDefault; + double nanDefault; + double infDefault; + double positiveInfDefault; + double infinityDefault; + double positiveInfinityDefault; + double negativeInfDefault; + double negativeInfinityDefault; + double doubleInfDefault; MonsterT({ this.pos, @@ -1436,7 +1460,15 @@ class MonsterT implements fb.Packable { this.scalarKeySortedTables, this.nativeInline, this.longEnumNonEnumDefault = const LongEnum._(0), - this.longEnumNormalDefault = LongEnum.LongOne}); + this.longEnumNormalDefault = LongEnum.LongOne, + this.nanDefault = double.nan, + this.infDefault = double.infinity, + this.positiveInfDefault = double.infinity, + this.infinityDefault = double.infinity, + this.positiveInfinityDefault = double.infinity, + this.negativeInfDefault = double.negativeInfinity, + this.negativeInfinityDefault = double.negativeInfinity, + this.doubleInfDefault = double.infinity}); @override int pack(fb.Builder fbBuilder) { @@ -1497,7 +1529,7 @@ class MonsterT implements fb.Packable { : fbBuilder.writeListUint8(testrequirednestedflatbuffer!); final int? scalarKeySortedTablesOffset = scalarKeySortedTables == null ? null : fbBuilder.writeList(scalarKeySortedTables!.map((b) => b.pack(fbBuilder)).toList()); - fbBuilder.startTable(54); + fbBuilder.startTable(62); if (pos != null) { fbBuilder.addStruct(0, pos!.pack(fbBuilder)); } @@ -1555,12 +1587,20 @@ class MonsterT implements fb.Packable { } fbBuilder.addUint64(52, longEnumNonEnumDefault.value); fbBuilder.addUint64(53, longEnumNormalDefault.value); + fbBuilder.addFloat32(54, nanDefault); + fbBuilder.addFloat32(55, infDefault); + fbBuilder.addFloat32(56, positiveInfDefault); + fbBuilder.addFloat32(57, infinityDefault); + fbBuilder.addFloat32(58, positiveInfinityDefault); + fbBuilder.addFloat32(59, negativeInfDefault); + fbBuilder.addFloat32(60, negativeInfinityDefault); + fbBuilder.addFloat64(61, doubleInfDefault); return fbBuilder.endTable(); } @override String toString() { - return 'MonsterT{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}}'; + return 'MonsterT{pos: ${pos}, mana: ${mana}, hp: ${hp}, name: ${name}, inventory: ${inventory}, color: ${color}, testType: ${testType}, test: ${test}, test4: ${test4}, testarrayofstring: ${testarrayofstring}, testarrayoftables: ${testarrayoftables}, enemy: ${enemy}, testnestedflatbuffer: ${testnestedflatbuffer}, testempty: ${testempty}, testbool: ${testbool}, testhashs32Fnv1: ${testhashs32Fnv1}, testhashu32Fnv1: ${testhashu32Fnv1}, testhashs64Fnv1: ${testhashs64Fnv1}, testhashu64Fnv1: ${testhashu64Fnv1}, testhashs32Fnv1a: ${testhashs32Fnv1a}, testhashu32Fnv1a: ${testhashu32Fnv1a}, testhashs64Fnv1a: ${testhashs64Fnv1a}, testhashu64Fnv1a: ${testhashu64Fnv1a}, testarrayofbools: ${testarrayofbools}, testf: ${testf}, testf2: ${testf2}, testf3: ${testf3}, testarrayofstring2: ${testarrayofstring2}, testarrayofsortedstruct: ${testarrayofsortedstruct}, flex: ${flex}, test5: ${test5}, vectorOfLongs: ${vectorOfLongs}, vectorOfDoubles: ${vectorOfDoubles}, parentNamespaceTest: ${parentNamespaceTest}, vectorOfReferrables: ${vectorOfReferrables}, singleWeakReference: ${singleWeakReference}, vectorOfWeakReferences: ${vectorOfWeakReferences}, vectorOfStrongReferrables: ${vectorOfStrongReferrables}, coOwningReference: ${coOwningReference}, vectorOfCoOwningReferences: ${vectorOfCoOwningReferences}, nonOwningReference: ${nonOwningReference}, vectorOfNonOwningReferences: ${vectorOfNonOwningReferences}, anyUniqueType: ${anyUniqueType}, anyUnique: ${anyUnique}, anyAmbiguousType: ${anyAmbiguousType}, anyAmbiguous: ${anyAmbiguous}, vectorOfEnums: ${vectorOfEnums}, signedEnum: ${signedEnum}, testrequirednestedflatbuffer: ${testrequirednestedflatbuffer}, scalarKeySortedTables: ${scalarKeySortedTables}, nativeInline: ${nativeInline}, longEnumNonEnumDefault: ${longEnumNonEnumDefault}, longEnumNormalDefault: ${longEnumNormalDefault}, nanDefault: ${nanDefault}, infDefault: ${infDefault}, positiveInfDefault: ${positiveInfDefault}, infinityDefault: ${infinityDefault}, positiveInfinityDefault: ${positiveInfinityDefault}, negativeInfDefault: ${negativeInfDefault}, negativeInfinityDefault: ${negativeInfinityDefault}, doubleInfDefault: ${doubleInfDefault}}'; } } @@ -1578,7 +1618,7 @@ class MonsterBuilder { final fb.Builder fbBuilder; void begin() { - fbBuilder.startTable(54); + fbBuilder.startTable(62); } int addPos(int offset) { @@ -1793,6 +1833,38 @@ class MonsterBuilder { fbBuilder.addUint64(53, longEnumNormalDefault?.value); return fbBuilder.offset; } + int addNanDefault(double? nanDefault) { + fbBuilder.addFloat32(54, nanDefault); + return fbBuilder.offset; + } + int addInfDefault(double? infDefault) { + fbBuilder.addFloat32(55, infDefault); + return fbBuilder.offset; + } + int addPositiveInfDefault(double? positiveInfDefault) { + fbBuilder.addFloat32(56, positiveInfDefault); + return fbBuilder.offset; + } + int addInfinityDefault(double? infinityDefault) { + fbBuilder.addFloat32(57, infinityDefault); + return fbBuilder.offset; + } + int addPositiveInfinityDefault(double? positiveInfinityDefault) { + fbBuilder.addFloat32(58, positiveInfinityDefault); + return fbBuilder.offset; + } + int addNegativeInfDefault(double? negativeInfDefault) { + fbBuilder.addFloat32(59, negativeInfDefault); + return fbBuilder.offset; + } + int addNegativeInfinityDefault(double? negativeInfinityDefault) { + fbBuilder.addFloat32(60, negativeInfinityDefault); + return fbBuilder.offset; + } + int addDoubleInfDefault(double? doubleInfDefault) { + fbBuilder.addFloat64(61, doubleInfDefault); + return fbBuilder.offset; + } int finish() { return fbBuilder.endTable(); @@ -1853,6 +1925,14 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { final TestObjectBuilder? _nativeInline; final LongEnum? _longEnumNonEnumDefault; final LongEnum? _longEnumNormalDefault; + final double? _nanDefault; + final double? _infDefault; + final double? _positiveInfDefault; + final double? _infinityDefault; + final double? _positiveInfinityDefault; + final double? _negativeInfDefault; + final double? _negativeInfinityDefault; + final double? _doubleInfDefault; MonsterObjectBuilder({ Vec3ObjectBuilder? pos, @@ -1908,6 +1988,14 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { TestObjectBuilder? nativeInline, LongEnum? longEnumNonEnumDefault, LongEnum? longEnumNormalDefault, + double? nanDefault, + double? infDefault, + double? positiveInfDefault, + double? infinityDefault, + double? positiveInfinityDefault, + double? negativeInfDefault, + double? negativeInfinityDefault, + double? doubleInfDefault, }) : _pos = pos, _mana = mana, @@ -1961,7 +2049,15 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { _scalarKeySortedTables = scalarKeySortedTables, _nativeInline = nativeInline, _longEnumNonEnumDefault = longEnumNonEnumDefault, - _longEnumNormalDefault = longEnumNormalDefault; + _longEnumNormalDefault = longEnumNormalDefault, + _nanDefault = nanDefault, + _infDefault = infDefault, + _positiveInfDefault = positiveInfDefault, + _infinityDefault = infinityDefault, + _positiveInfinityDefault = positiveInfinityDefault, + _negativeInfDefault = negativeInfDefault, + _negativeInfinityDefault = negativeInfinityDefault, + _doubleInfDefault = doubleInfDefault; /// Finish building, and store into the [fbBuilder]. @override @@ -2014,7 +2110,7 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { : fbBuilder.writeListUint8(_testrequirednestedflatbuffer!); final int? scalarKeySortedTablesOffset = _scalarKeySortedTables == null ? null : fbBuilder.writeList(_scalarKeySortedTables!.map((b) => b.getOrCreateOffset(fbBuilder)).toList()); - fbBuilder.startTable(54); + fbBuilder.startTable(62); if (_pos != null) { fbBuilder.addStruct(0, _pos!.finish(fbBuilder)); } @@ -2072,6 +2168,14 @@ class MonsterObjectBuilder extends fb.ObjectBuilder { } fbBuilder.addUint64(52, _longEnumNonEnumDefault?.value); fbBuilder.addUint64(53, _longEnumNormalDefault?.value); + fbBuilder.addFloat32(54, _nanDefault); + fbBuilder.addFloat32(55, _infDefault); + fbBuilder.addFloat32(56, _positiveInfDefault); + fbBuilder.addFloat32(57, _infinityDefault); + fbBuilder.addFloat32(58, _positiveInfinityDefault); + fbBuilder.addFloat32(59, _negativeInfDefault); + fbBuilder.addFloat32(60, _negativeInfinityDefault); + fbBuilder.addFloat64(61, _doubleInfDefault); return fbBuilder.endTable(); } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/ability_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/ability_generated.rs index 5c8bcf815d..46d24bfeed 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/ability_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/ability_generated.rs @@ -30,39 +30,25 @@ impl core::fmt::Debug for Ability { } impl flatbuffers::SimpleToVerifyInSlice for Ability {} -impl flatbuffers::SafeSliceAccess for Ability {} impl<'a> flatbuffers::Follow<'a> for Ability { type Inner = &'a Ability; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Ability>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Ability { type Inner = &'a Ability; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Ability { type Output = Ability; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Ability as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Ability { - type Output = Ability; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Ability as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Ability as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -106,24 +92,30 @@ impl<'a> Ability { } pub fn id(&self) -> u32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_id(&mut self, x: u32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const u32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } @@ -139,24 +131,30 @@ impl<'a> Ability { key.cmp(&val) } pub fn distance(&self) -> u32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_distance(&mut self, x: u32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const u32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_ambiguous_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_ambiguous_aliases_generated.rs index b278ca1c8c..2e4a861f3e 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_ambiguous_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_ambiguous_aliases_generated.rs @@ -74,10 +74,8 @@ impl Serialize for AnyAmbiguousAliases { impl<'a> flatbuffers::Follow<'a> for AnyAmbiguousAliases { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -85,21 +83,21 @@ impl<'a> flatbuffers::Follow<'a> for AnyAmbiguousAliases { impl flatbuffers::Push for AnyAmbiguousAliases { type Output = AnyAmbiguousAliases; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for AnyAmbiguousAliases { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_generated.rs index f67392db2d..e889cf5d31 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_generated.rs @@ -74,10 +74,8 @@ impl Serialize for Any { impl<'a> flatbuffers::Follow<'a> for Any { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -85,21 +83,21 @@ impl<'a> flatbuffers::Follow<'a> for Any { impl flatbuffers::Push for Any { type Output = Any; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Any { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_unique_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_unique_aliases_generated.rs index 1b3d091761..5e6fe2d5b5 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_unique_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/any_unique_aliases_generated.rs @@ -74,10 +74,8 @@ impl Serialize for AnyUniqueAliases { impl<'a> flatbuffers::Follow<'a> for AnyUniqueAliases { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -85,21 +83,21 @@ impl<'a> flatbuffers::Follow<'a> for AnyUniqueAliases { impl flatbuffers::Push for AnyUniqueAliases { type Output = AnyUniqueAliases; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for AnyUniqueAliases { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/color_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/color_generated.rs index e001d43995..0f9887952d 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/color_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/color_generated.rs @@ -40,32 +40,38 @@ impl Serialize for Color { impl<'a> flatbuffers::Follow<'a> for Color { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - unsafe { Self::from_bits_unchecked(b) } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + Self::from_bits_unchecked(b) } } impl flatbuffers::Push for Color { type Output = Color; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.bits()); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.bits()); } } impl flatbuffers::EndianScalar for Color { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.bits()); - unsafe { Self::from_bits_unchecked(b) } + fn to_little_endian(self) -> u8 { + self.bits().to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.bits()); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 unsafe { Self::from_bits_unchecked(b) } } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/long_enum_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/long_enum_generated.rs index b29b97f0fc..1f56c6fb86 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/long_enum_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/long_enum_generated.rs @@ -36,32 +36,38 @@ impl Serialize for LongEnum { impl<'a> flatbuffers::Follow<'a> for LongEnum { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - unsafe { Self::from_bits_unchecked(b) } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 + Self::from_bits_unchecked(b) } } impl flatbuffers::Push for LongEnum { type Output = LongEnum; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.bits()); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.bits()); } } impl flatbuffers::EndianScalar for LongEnum { + type Scalar = u64; #[inline] - fn to_little_endian(self) -> Self { - let b = u64::to_le(self.bits()); - unsafe { Self::from_bits_unchecked(b) } + fn to_little_endian(self) -> u64 { + self.bits().to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u64::from_le(self.bits()); + fn from_little_endian(v: u64) -> Self { + let b = u64::from_le(v); + // Safety: + // This is safe because we know bitflags is implemented with a repr transparent uint of the correct size. + // from_bits_unchecked will be replaced by an equivalent but safe from_bits_retain in bitflags 2.0 + // https://github.com/bitflags/bitflags/issues/262 unsafe { Self::from_bits_unchecked(b) } } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/monster_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/monster_generated.rs index 7aa3ec7760..4c01eed1d8 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/monster_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/monster_generated.rs @@ -22,8 +22,8 @@ pub struct Monster<'a> { impl<'a> flatbuffers::Follow<'a> for Monster<'a> { type Inner = Monster<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -81,13 +81,21 @@ impl<'a> Monster<'a> { pub const VT_NATIVE_INLINE: flatbuffers::VOffsetT = 106; pub const VT_LONG_ENUM_NON_ENUM_DEFAULT: flatbuffers::VOffsetT = 108; pub const VT_LONG_ENUM_NORMAL_DEFAULT: flatbuffers::VOffsetT = 110; + pub const VT_NAN_DEFAULT: flatbuffers::VOffsetT = 112; + pub const VT_INF_DEFAULT: flatbuffers::VOffsetT = 114; + pub const VT_POSITIVE_INF_DEFAULT: flatbuffers::VOffsetT = 116; + pub const VT_INFINITY_DEFAULT: flatbuffers::VOffsetT = 118; + pub const VT_POSITIVE_INFINITY_DEFAULT: flatbuffers::VOffsetT = 120; + pub const VT_NEGATIVE_INF_DEFAULT: flatbuffers::VOffsetT = 122; + pub const VT_NEGATIVE_INFINITY_DEFAULT: flatbuffers::VOffsetT = 124; + pub const VT_DOUBLE_INF_DEFAULT: flatbuffers::VOffsetT = 126; pub const fn get_fully_qualified_name() -> &'static str { "MyGame.Example.Monster" } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Monster { _tab: table } } #[allow(unused_mut)] @@ -96,6 +104,7 @@ impl<'a> Monster<'a> { args: &'args MonsterArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = MonsterBuilder::new(_fbb); + builder.add_double_inf_default(args.double_inf_default); builder.add_long_enum_normal_default(args.long_enum_normal_default); builder.add_long_enum_non_enum_default(args.long_enum_non_enum_default); builder.add_non_owning_reference(args.non_owning_reference); @@ -105,6 +114,13 @@ impl<'a> Monster<'a> { builder.add_testhashs64_fnv1a(args.testhashs64_fnv1a); builder.add_testhashu64_fnv1(args.testhashu64_fnv1); builder.add_testhashs64_fnv1(args.testhashs64_fnv1); + builder.add_negative_infinity_default(args.negative_infinity_default); + builder.add_negative_inf_default(args.negative_inf_default); + builder.add_positive_infinity_default(args.positive_infinity_default); + builder.add_infinity_default(args.infinity_default); + builder.add_positive_inf_default(args.positive_inf_default); + builder.add_inf_default(args.inf_default); + builder.add_nan_default(args.nan_default); if let Some(x) = args.native_inline { builder.add_native_inline(x); } if let Some(x) = args.scalar_key_sorted_tables { builder.add_scalar_key_sorted_tables(x); } if let Some(x) = args.testrequirednestedflatbuffer { builder.add_testrequirednestedflatbuffer(x); } @@ -163,7 +179,7 @@ impl<'a> Monster<'a> { x.to_string() }; let inventory = self.inventory().map(|x| { - x.to_vec() + x.into_iter().collect() }); let color = self.color(); let test = match self.test_type() { @@ -198,7 +214,7 @@ impl<'a> Monster<'a> { Box::new(x.unpack()) }); let testnestedflatbuffer = self.testnestedflatbuffer().map(|x| { - x.to_vec() + x.into_iter().collect() }); let testempty = self.testempty().map(|x| { Box::new(x.unpack()) @@ -213,7 +229,7 @@ impl<'a> Monster<'a> { let testhashs64_fnv1a = self.testhashs64_fnv1a(); let testhashu64_fnv1a = self.testhashu64_fnv1a(); let testarrayofbools = self.testarrayofbools().map(|x| { - x.to_vec() + x.into_iter().collect() }); let testf = self.testf(); let testf2 = self.testf2(); @@ -225,7 +241,7 @@ impl<'a> Monster<'a> { x.iter().map(|t| t.unpack()).collect() }); let flex = self.flex().map(|x| { - x.to_vec() + x.into_iter().collect() }); let test5 = self.test5().map(|x| { x.iter().map(|t| t.unpack()).collect() @@ -300,7 +316,7 @@ impl<'a> Monster<'a> { }); let signed_enum = self.signed_enum(); let testrequirednestedflatbuffer = self.testrequirednestedflatbuffer().map(|x| { - x.to_vec() + x.into_iter().collect() }); let scalar_key_sorted_tables = self.scalar_key_sorted_tables().map(|x| { x.iter().map(|t| t.unpack()).collect() @@ -310,6 +326,14 @@ impl<'a> Monster<'a> { }); let long_enum_non_enum_default = self.long_enum_non_enum_default(); let long_enum_normal_default = self.long_enum_normal_default(); + let nan_default = self.nan_default(); + let inf_default = self.inf_default(); + let positive_inf_default = self.positive_inf_default(); + let infinity_default = self.infinity_default(); + let positive_infinity_default = self.positive_infinity_default(); + let negative_inf_default = self.negative_inf_default(); + let negative_infinity_default = self.negative_infinity_default(); + let double_inf_default = self.double_inf_default(); MonsterT { pos, mana, @@ -361,24 +385,44 @@ impl<'a> Monster<'a> { native_inline, long_enum_non_enum_default, long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default, } } #[inline] pub fn pos(&self) -> Option<&'a Vec3> { - self._tab.get::(Monster::VT_POS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POS, None)} } #[inline] pub fn mana(&self) -> i16 { - self._tab.get::(Monster::VT_MANA, Some(150)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_MANA, Some(150)).unwrap()} } #[inline] pub fn hp(&self) -> i16 { - self._tab.get::(Monster::VT_HP, Some(100)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_HP, Some(100)).unwrap()} } #[inline] pub fn name(&self) -> &'a str { - self._tab.get::>(Monster::VT_NAME, None).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_NAME, None).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Monster) -> bool { @@ -391,220 +435,434 @@ impl<'a> Monster<'a> { key.cmp(val) } #[inline] - pub fn inventory(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_INVENTORY, None).map(|v| v.safe_slice()) + pub fn inventory(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_INVENTORY, None)} } #[inline] pub fn color(&self) -> Color { - self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_COLOR, Some(Color::Blue)).unwrap()} } #[inline] pub fn test_type(&self) -> Any { - self._tab.get::(Monster::VT_TEST_TYPE, Some(Any::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TEST_TYPE, Some(Any::NONE)).unwrap()} } #[inline] pub fn test(&self) -> Option> { - self._tab.get::>>(Monster::VT_TEST, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST, None)} } #[inline] - pub fn test4(&self) -> Option<&'a [Test]> { - self._tab.get::>>(Monster::VT_TEST4, None).map(|v| v.safe_slice()) + pub fn test4(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST4, None)} } #[inline] pub fn testarrayofstring(&self) -> Option>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING, None)} } /// an example documentation comment: this will end up in the generated code /// multiline too #[inline] pub fn testarrayoftables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFTABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFTABLES, None)} } #[inline] pub fn enemy(&self) -> Option> { - self._tab.get::>(Monster::VT_ENEMY, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_ENEMY, None)} } #[inline] - pub fn testnestedflatbuffer(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_TESTNESTEDFLATBUFFER, None).map(|v| v.safe_slice()) + pub fn testnestedflatbuffer(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTNESTEDFLATBUFFER, None)} } pub fn testnestedflatbuffer_nested_flatbuffer(&'a self) -> Option> { self.testnestedflatbuffer().map(|data| { use flatbuffers::Follow; - >>::follow(data, 0) + // Safety: + // Created from a valid Table for this object + // Which contains a valid flatbuffer in this slot + unsafe { >>::follow(data.bytes(), 0) } }) } #[inline] pub fn testempty(&self) -> Option> { - self._tab.get::>(Monster::VT_TESTEMPTY, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_TESTEMPTY, None)} } #[inline] pub fn testbool(&self) -> bool { - self._tab.get::(Monster::VT_TESTBOOL, Some(false)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTBOOL, Some(false)).unwrap()} } #[inline] pub fn testhashs32_fnv1(&self) -> i32 { - self._tab.get::(Monster::VT_TESTHASHS32_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS32_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashu32_fnv1(&self) -> u32 { - self._tab.get::(Monster::VT_TESTHASHU32_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU32_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashs64_fnv1(&self) -> i64 { - self._tab.get::(Monster::VT_TESTHASHS64_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS64_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashu64_fnv1(&self) -> u64 { - self._tab.get::(Monster::VT_TESTHASHU64_FNV1, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU64_FNV1, Some(0)).unwrap()} } #[inline] pub fn testhashs32_fnv1a(&self) -> i32 { - self._tab.get::(Monster::VT_TESTHASHS32_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS32_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashu32_fnv1a(&self) -> u32 { - self._tab.get::(Monster::VT_TESTHASHU32_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU32_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashs64_fnv1a(&self) -> i64 { - self._tab.get::(Monster::VT_TESTHASHS64_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHS64_FNV1A, Some(0)).unwrap()} } #[inline] pub fn testhashu64_fnv1a(&self) -> u64 { - self._tab.get::(Monster::VT_TESTHASHU64_FNV1A, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTHASHU64_FNV1A, Some(0)).unwrap()} } #[inline] - pub fn testarrayofbools(&self) -> Option<&'a [bool]> { - self._tab.get::>>(Monster::VT_TESTARRAYOFBOOLS, None).map(|v| v.safe_slice()) + pub fn testarrayofbools(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTARRAYOFBOOLS, None)} } #[inline] pub fn testf(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF, Some(3.14159)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF, Some(3.14159)).unwrap()} } #[inline] pub fn testf2(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF2, Some(3.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF2, Some(3.0)).unwrap()} } #[inline] pub fn testf3(&self) -> f32 { - self._tab.get::(Monster::VT_TESTF3, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_TESTF3, Some(0.0)).unwrap()} } #[inline] pub fn testarrayofstring2(&self) -> Option>> { - self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING2, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_TESTARRAYOFSTRING2, None)} } #[inline] - pub fn testarrayofsortedstruct(&self) -> Option<&'a [Ability]> { - self._tab.get::>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, None).map(|v| v.safe_slice()) + pub fn testarrayofsortedstruct(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTARRAYOFSORTEDSTRUCT, None)} } #[inline] - pub fn flex(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_FLEX, None).map(|v| v.safe_slice()) + pub fn flex(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_FLEX, None)} } #[inline] - pub fn test5(&self) -> Option<&'a [Test]> { - self._tab.get::>>(Monster::VT_TEST5, None).map(|v| v.safe_slice()) + pub fn test5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TEST5, None)} } #[inline] pub fn vector_of_longs(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_LONGS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_LONGS, None)} } #[inline] pub fn vector_of_doubles(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_DOUBLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_DOUBLES, None)} } #[inline] pub fn parent_namespace_test(&self) -> Option> { - self._tab.get::>(Monster::VT_PARENT_NAMESPACE_TEST, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Monster::VT_PARENT_NAMESPACE_TEST, None)} } #[inline] pub fn vector_of_referrables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_VECTOR_OF_REFERRABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_VECTOR_OF_REFERRABLES, None)} } #[inline] pub fn single_weak_reference(&self) -> u64 { - self._tab.get::(Monster::VT_SINGLE_WEAK_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_SINGLE_WEAK_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_weak_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_WEAK_REFERENCES, None)} } #[inline] pub fn vector_of_strong_referrables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, None)} } #[inline] pub fn co_owning_reference(&self) -> u64 { - self._tab.get::(Monster::VT_CO_OWNING_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_CO_OWNING_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_co_owning_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, None)} } #[inline] pub fn non_owning_reference(&self) -> u64 { - self._tab.get::(Monster::VT_NON_OWNING_REFERENCE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NON_OWNING_REFERENCE, Some(0)).unwrap()} } #[inline] pub fn vector_of_non_owning_references(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, None)} } #[inline] pub fn any_unique_type(&self) -> AnyUniqueAliases { - self._tab.get::(Monster::VT_ANY_UNIQUE_TYPE, Some(AnyUniqueAliases::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_ANY_UNIQUE_TYPE, Some(AnyUniqueAliases::NONE)).unwrap()} } #[inline] pub fn any_unique(&self) -> Option> { - self._tab.get::>>(Monster::VT_ANY_UNIQUE, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_ANY_UNIQUE, None)} } #[inline] pub fn any_ambiguous_type(&self) -> AnyAmbiguousAliases { - self._tab.get::(Monster::VT_ANY_AMBIGUOUS_TYPE, Some(AnyAmbiguousAliases::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_ANY_AMBIGUOUS_TYPE, Some(AnyAmbiguousAliases::NONE)).unwrap()} } #[inline] pub fn any_ambiguous(&self) -> Option> { - self._tab.get::>>(Monster::VT_ANY_AMBIGUOUS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_ANY_AMBIGUOUS, None)} } #[inline] pub fn vector_of_enums(&self) -> Option> { - self._tab.get::>>(Monster::VT_VECTOR_OF_ENUMS, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_VECTOR_OF_ENUMS, None)} } #[inline] pub fn signed_enum(&self) -> Race { - self._tab.get::(Monster::VT_SIGNED_ENUM, Some(Race::None)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_SIGNED_ENUM, Some(Race::None)).unwrap()} } #[inline] - pub fn testrequirednestedflatbuffer(&self) -> Option<&'a [u8]> { - self._tab.get::>>(Monster::VT_TESTREQUIREDNESTEDFLATBUFFER, None).map(|v| v.safe_slice()) + pub fn testrequirednestedflatbuffer(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(Monster::VT_TESTREQUIREDNESTEDFLATBUFFER, None)} } pub fn testrequirednestedflatbuffer_nested_flatbuffer(&'a self) -> Option> { self.testrequirednestedflatbuffer().map(|data| { use flatbuffers::Follow; - >>::follow(data, 0) + // Safety: + // Created from a valid Table for this object + // Which contains a valid flatbuffer in this slot + unsafe { >>::follow(data.bytes(), 0) } }) } #[inline] pub fn scalar_key_sorted_tables(&self) -> Option>>> { - self._tab.get::>>>(Monster::VT_SCALAR_KEY_SORTED_TABLES, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Monster::VT_SCALAR_KEY_SORTED_TABLES, None)} } #[inline] pub fn native_inline(&self) -> Option<&'a Test> { - self._tab.get::(Monster::VT_NATIVE_INLINE, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NATIVE_INLINE, None)} } #[inline] pub fn long_enum_non_enum_default(&self) -> LongEnum { - self._tab.get::(Monster::VT_LONG_ENUM_NON_ENUM_DEFAULT, Some(Default::default())).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_LONG_ENUM_NON_ENUM_DEFAULT, Some(Default::default())).unwrap()} } #[inline] pub fn long_enum_normal_default(&self) -> LongEnum { - self._tab.get::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, Some(LongEnum::LongOne)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, Some(LongEnum::LongOne)).unwrap()} + } + #[inline] + pub fn nan_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NAN_DEFAULT, Some(f32::NAN)).unwrap()} + } + #[inline] + pub fn inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_INF_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn positive_inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POSITIVE_INF_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_INFINITY_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn positive_infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_POSITIVE_INFINITY_DEFAULT, Some(f32::INFINITY)).unwrap()} + } + #[inline] + pub fn negative_inf_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NEGATIVE_INF_DEFAULT, Some(f32::NEG_INFINITY)).unwrap()} + } + #[inline] + pub fn negative_infinity_default(&self) -> f32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_NEGATIVE_INFINITY_DEFAULT, Some(f32::NEG_INFINITY)).unwrap()} + } + #[inline] + pub fn double_inf_default(&self) -> f64 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Monster::VT_DOUBLE_INF_DEFAULT, Some(f64::INFINITY)).unwrap()} } #[inline] #[allow(non_snake_case)] pub fn test_as_monster(&self) -> Option> { if self.test_type() == Any::Monster { - self.test().map(Monster::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -614,7 +872,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn test_as_test_simple_table_with_enum(&self) -> Option> { if self.test_type() == Any::TestSimpleTableWithEnum { - self.test().map(TestSimpleTableWithEnum::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TestSimpleTableWithEnum::init_from_table(t) } + }) } else { None } @@ -624,7 +887,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn test_as_my_game_example_2_monster(&self) -> Option> { if self.test_type() == Any::MyGame_Example2_Monster { - self.test().map(super::example_2::Monster::init_from_table) + self.test().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::example_2::Monster::init_from_table(t) } + }) } else { None } @@ -634,7 +902,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_m(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::M { - self.any_unique().map(Monster::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -644,7 +917,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_ts(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::TS { - self.any_unique().map(TestSimpleTableWithEnum::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TestSimpleTableWithEnum::init_from_table(t) } + }) } else { None } @@ -654,7 +932,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_unique_as_m2(&self) -> Option> { if self.any_unique_type() == AnyUniqueAliases::M2 { - self.any_unique().map(super::example_2::Monster::init_from_table) + self.any_unique().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { super::example_2::Monster::init_from_table(t) } + }) } else { None } @@ -664,7 +947,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m1(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M1 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -674,7 +962,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m2(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M2 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -684,7 +977,12 @@ impl<'a> Monster<'a> { #[allow(non_snake_case)] pub fn any_ambiguous_as_m3(&self) -> Option> { if self.any_ambiguous_type() == AnyAmbiguousAliases::M3 { - self.any_ambiguous().map(Monster::init_from_table) + self.any_ambiguous().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { Monster::init_from_table(t) } + }) } else { None } @@ -770,6 +1068,14 @@ impl flatbuffers::Verifiable for Monster<'_> { .visit_field::("native_inline", Self::VT_NATIVE_INLINE, false)? .visit_field::("long_enum_non_enum_default", Self::VT_LONG_ENUM_NON_ENUM_DEFAULT, false)? .visit_field::("long_enum_normal_default", Self::VT_LONG_ENUM_NORMAL_DEFAULT, false)? + .visit_field::("nan_default", Self::VT_NAN_DEFAULT, false)? + .visit_field::("inf_default", Self::VT_INF_DEFAULT, false)? + .visit_field::("positive_inf_default", Self::VT_POSITIVE_INF_DEFAULT, false)? + .visit_field::("infinity_default", Self::VT_INFINITY_DEFAULT, false)? + .visit_field::("positive_infinity_default", Self::VT_POSITIVE_INFINITY_DEFAULT, false)? + .visit_field::("negative_inf_default", Self::VT_NEGATIVE_INF_DEFAULT, false)? + .visit_field::("negative_infinity_default", Self::VT_NEGATIVE_INFINITY_DEFAULT, false)? + .visit_field::("double_inf_default", Self::VT_DOUBLE_INF_DEFAULT, false)? .finish(); Ok(()) } @@ -828,6 +1134,14 @@ pub struct MonsterArgs<'a> { pub native_inline: Option<&'a Test>, pub long_enum_non_enum_default: LongEnum, pub long_enum_normal_default: LongEnum, + pub nan_default: f32, + pub inf_default: f32, + pub positive_inf_default: f32, + pub infinity_default: f32, + pub positive_infinity_default: f32, + pub negative_inf_default: f32, + pub negative_infinity_default: f32, + pub double_inf_default: f64, } impl<'a> Default for MonsterArgs<'a> { #[inline] @@ -886,6 +1200,14 @@ impl<'a> Default for MonsterArgs<'a> { native_inline: None, long_enum_non_enum_default: Default::default(), long_enum_normal_default: LongEnum::LongOne, + nan_default: f32::NAN, + inf_default: f32::INFINITY, + positive_inf_default: f32::INFINITY, + infinity_default: f32::INFINITY, + positive_infinity_default: f32::INFINITY, + negative_inf_default: f32::NEG_INFINITY, + negative_infinity_default: f32::NEG_INFINITY, + double_inf_default: f64::INFINITY, } } } @@ -895,7 +1217,7 @@ impl Serialize for Monster<'_> { where S: Serializer, { - let mut s = serializer.serialize_struct("Monster", 54)?; + let mut s = serializer.serialize_struct("Monster", 62)?; if let Some(f) = self.pos() { s.serialize_field("pos", &f)?; } else { @@ -1103,6 +1425,14 @@ impl Serialize for Monster<'_> { } s.serialize_field("long_enum_non_enum_default", &self.long_enum_non_enum_default())?; s.serialize_field("long_enum_normal_default", &self.long_enum_normal_default())?; + s.serialize_field("nan_default", &self.nan_default())?; + s.serialize_field("inf_default", &self.inf_default())?; + s.serialize_field("positive_inf_default", &self.positive_inf_default())?; + s.serialize_field("infinity_default", &self.infinity_default())?; + s.serialize_field("positive_infinity_default", &self.positive_infinity_default())?; + s.serialize_field("negative_inf_default", &self.negative_inf_default())?; + s.serialize_field("negative_infinity_default", &self.negative_infinity_default())?; + s.serialize_field("double_inf_default", &self.double_inf_default())?; s.end() } } @@ -1325,6 +1655,38 @@ impl<'a: 'b, 'b> MonsterBuilder<'a, 'b> { self.fbb_.push_slot::(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, long_enum_normal_default, LongEnum::LongOne); } #[inline] + pub fn add_nan_default(&mut self, nan_default: f32) { + self.fbb_.push_slot::(Monster::VT_NAN_DEFAULT, nan_default, f32::NAN); + } + #[inline] + pub fn add_inf_default(&mut self, inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_INF_DEFAULT, inf_default, f32::INFINITY); + } + #[inline] + pub fn add_positive_inf_default(&mut self, positive_inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, f32::INFINITY); + } + #[inline] + pub fn add_infinity_default(&mut self, infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_INFINITY_DEFAULT, infinity_default, f32::INFINITY); + } + #[inline] + pub fn add_positive_infinity_default(&mut self, positive_infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, f32::INFINITY); + } + #[inline] + pub fn add_negative_inf_default(&mut self, negative_inf_default: f32) { + self.fbb_.push_slot::(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, f32::NEG_INFINITY); + } + #[inline] + pub fn add_negative_infinity_default(&mut self, negative_infinity_default: f32) { + self.fbb_.push_slot::(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, f32::NEG_INFINITY); + } + #[inline] + pub fn add_double_inf_default(&mut self, double_inf_default: f64) { + self.fbb_.push_slot::(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, f64::INFINITY); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MonsterBuilder<'a, 'b> { let start = _fbb.start_table(); MonsterBuilder { @@ -1474,6 +1836,14 @@ impl core::fmt::Debug for Monster<'_> { ds.field("native_inline", &self.native_inline()); ds.field("long_enum_non_enum_default", &self.long_enum_non_enum_default()); ds.field("long_enum_normal_default", &self.long_enum_normal_default()); + ds.field("nan_default", &self.nan_default()); + ds.field("inf_default", &self.inf_default()); + ds.field("positive_inf_default", &self.positive_inf_default()); + ds.field("infinity_default", &self.infinity_default()); + ds.field("positive_infinity_default", &self.positive_infinity_default()); + ds.field("negative_inf_default", &self.negative_inf_default()); + ds.field("negative_infinity_default", &self.negative_infinity_default()); + ds.field("double_inf_default", &self.double_inf_default()); ds.finish() } } @@ -1530,6 +1900,14 @@ pub struct MonsterT { pub native_inline: Option, pub long_enum_non_enum_default: LongEnum, pub long_enum_normal_default: LongEnum, + pub nan_default: f32, + pub inf_default: f32, + pub positive_inf_default: f32, + pub infinity_default: f32, + pub positive_infinity_default: f32, + pub negative_inf_default: f32, + pub negative_infinity_default: f32, + pub double_inf_default: f64, } impl Default for MonsterT { fn default() -> Self { @@ -1584,6 +1962,14 @@ impl Default for MonsterT { native_inline: None, long_enum_non_enum_default: Default::default(), long_enum_normal_default: LongEnum::LongOne, + nan_default: f32::NAN, + inf_default: f32::INFINITY, + positive_inf_default: f32::INFINITY, + infinity_default: f32::INFINITY, + positive_infinity_default: f32::INFINITY, + negative_inf_default: f32::NEG_INFINITY, + negative_infinity_default: f32::NEG_INFINITY, + double_inf_default: f64::INFINITY, } } } @@ -1610,7 +1996,7 @@ impl MonsterT { let w: Vec<_> = x.iter().map(|t| t.pack()).collect();_fbb.create_vector(&w) }); let testarrayofstring = self.testarrayofstring.as_ref().map(|x|{ - let w: Vec<_> = x.iter().map(|s| s.as_ref()).collect();_fbb.create_vector_of_strings(&w) + let w: Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();_fbb.create_vector(&w) }); let testarrayoftables = self.testarrayoftables.as_ref().map(|x|{ let w: Vec<_> = x.iter().map(|t| t.pack(_fbb)).collect();_fbb.create_vector(&w) @@ -1640,7 +2026,7 @@ impl MonsterT { let testf2 = self.testf2; let testf3 = self.testf3; let testarrayofstring2 = self.testarrayofstring2.as_ref().map(|x|{ - let w: Vec<_> = x.iter().map(|s| s.as_ref()).collect();_fbb.create_vector_of_strings(&w) + let w: Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();_fbb.create_vector(&w) }); let testarrayofsortedstruct = self.testarrayofsortedstruct.as_ref().map(|x|{ let w: Vec<_> = x.iter().map(|t| t.pack()).collect();_fbb.create_vector(&w) @@ -1696,6 +2082,14 @@ impl MonsterT { let native_inline = native_inline_tmp.as_ref(); let long_enum_non_enum_default = self.long_enum_non_enum_default; let long_enum_normal_default = self.long_enum_normal_default; + let nan_default = self.nan_default; + let inf_default = self.inf_default; + let positive_inf_default = self.positive_inf_default; + let infinity_default = self.infinity_default; + let positive_infinity_default = self.positive_infinity_default; + let negative_inf_default = self.negative_inf_default; + let negative_infinity_default = self.negative_infinity_default; + let double_inf_default = self.double_inf_default; Monster::create(_fbb, &MonsterArgs{ pos, mana, @@ -1750,21 +2144,17 @@ impl MonsterT { native_inline, long_enum_non_enum_default, long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default, }) } } -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::root_unchecked::>(buf) } -} - -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_size_prefixed_root_as_monster<'a>(buf: &'a [u8]) -> Monster<'a> { - unsafe { flatbuffers::size_prefixed_root_unchecked::>(buf) } -} - #[inline] /// Verifies that a buffer of bytes contains a `Monster` /// and returns it. diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/race_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/race_generated.rs index a1a6749831..fe57ce0a04 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/race_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/race_generated.rs @@ -74,10 +74,8 @@ impl Serialize for Race { impl<'a> flatbuffers::Follow<'a> for Race { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -85,21 +83,21 @@ impl<'a> flatbuffers::Follow<'a> for Race { impl flatbuffers::Push for Race { type Output = Race; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Race { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/referrable_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/referrable_generated.rs index 9992293b6f..d3f65ad56c 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/referrable_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/referrable_generated.rs @@ -21,8 +21,8 @@ pub struct Referrable<'a> { impl<'a> flatbuffers::Follow<'a> for Referrable<'a> { type Inner = Referrable<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -34,7 +34,7 @@ impl<'a> Referrable<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Referrable { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> Referrable<'a> { #[inline] pub fn id(&self) -> u64 { - self._tab.get::(Referrable::VT_ID, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Referrable::VT_ID, Some(0)).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Referrable) -> bool { diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/stat_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/stat_generated.rs index fbd7ce8d79..856d9b89d5 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/stat_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/stat_generated.rs @@ -21,8 +21,8 @@ pub struct Stat<'a> { impl<'a> flatbuffers::Follow<'a> for Stat<'a> { type Inner = Stat<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -36,7 +36,7 @@ impl<'a> Stat<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Stat { _tab: table } } #[allow(unused_mut)] @@ -66,15 +66,24 @@ impl<'a> Stat<'a> { #[inline] pub fn id(&self) -> Option<&'a str> { - self._tab.get::>(Stat::VT_ID, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Stat::VT_ID, None)} } #[inline] pub fn val(&self) -> i64 { - self._tab.get::(Stat::VT_VAL, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Stat::VT_VAL, Some(0)).unwrap()} } #[inline] pub fn count(&self) -> u16 { - self._tab.get::(Stat::VT_COUNT, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Stat::VT_COUNT, Some(0)).unwrap()} } #[inline] pub fn key_compare_less_than(&self, o: &Stat) -> bool { diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_generated.rs index 0046447e22..669a6c8651 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_generated.rs @@ -31,39 +31,25 @@ impl core::fmt::Debug for StructOfStructs { } impl flatbuffers::SimpleToVerifyInSlice for StructOfStructs {} -impl flatbuffers::SafeSliceAccess for StructOfStructs {} impl<'a> flatbuffers::Follow<'a> for StructOfStructs { type Inner = &'a StructOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a StructOfStructs>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a StructOfStructs { type Inner = &'a StructOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for StructOfStructs { type Output = StructOfStructs; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const StructOfStructs as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b StructOfStructs { - type Output = StructOfStructs; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const StructOfStructs as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const StructOfStructs as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -110,6 +96,9 @@ impl<'a> StructOfStructs { } pub fn a(&self) -> &Ability { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[0..].as_ptr() as *const Ability) } } @@ -119,6 +108,9 @@ impl<'a> StructOfStructs { } pub fn b(&self) -> &Test { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[8..].as_ptr() as *const Test) } } @@ -128,6 +120,9 @@ impl<'a> StructOfStructs { } pub fn c(&self) -> &Ability { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[12..].as_ptr() as *const Ability) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_of_structs_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_of_structs_generated.rs index 234eb919e5..2cb1b5e023 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_of_structs_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/struct_of_structs_of_structs_generated.rs @@ -29,39 +29,25 @@ impl core::fmt::Debug for StructOfStructsOfStructs { } impl flatbuffers::SimpleToVerifyInSlice for StructOfStructsOfStructs {} -impl flatbuffers::SafeSliceAccess for StructOfStructsOfStructs {} impl<'a> flatbuffers::Follow<'a> for StructOfStructsOfStructs { type Inner = &'a StructOfStructsOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a StructOfStructsOfStructs>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a StructOfStructsOfStructs { type Inner = &'a StructOfStructsOfStructs; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for StructOfStructsOfStructs { type Output = StructOfStructsOfStructs; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const StructOfStructsOfStructs as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b StructOfStructsOfStructs { - type Output = StructOfStructsOfStructs; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const StructOfStructsOfStructs as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const StructOfStructsOfStructs as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -102,6 +88,9 @@ impl<'a> StructOfStructsOfStructs { } pub fn a(&self) -> &StructOfStructs { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[0..].as_ptr() as *const StructOfStructs) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_generated.rs index 472bff9071..835a905455 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_generated.rs @@ -30,39 +30,25 @@ impl core::fmt::Debug for Test { } impl flatbuffers::SimpleToVerifyInSlice for Test {} -impl flatbuffers::SafeSliceAccess for Test {} impl<'a> flatbuffers::Follow<'a> for Test { type Inner = &'a Test; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Test>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Test { type Inner = &'a Test; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Test { type Output = Test; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Test as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Test { - type Output = Test; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Test as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Test as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -106,47 +92,59 @@ impl<'a> Test { } pub fn a(&self) -> i16 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i16) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i16 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn b(&self) -> i8 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[2..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_b(&mut self, x: i8) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i8 as *const u8, + &x_le as *const _ as *const u8, self.0[2..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_simple_table_with_enum_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_simple_table_with_enum_generated.rs index 8a7b6271a9..65f1598374 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_simple_table_with_enum_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/test_simple_table_with_enum_generated.rs @@ -21,8 +21,8 @@ pub struct TestSimpleTableWithEnum<'a> { impl<'a> flatbuffers::Follow<'a> for TestSimpleTableWithEnum<'a> { type Inner = TestSimpleTableWithEnum<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -34,7 +34,7 @@ impl<'a> TestSimpleTableWithEnum<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TestSimpleTableWithEnum { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> TestSimpleTableWithEnum<'a> { #[inline] pub fn color(&self) -> Color { - self._tab.get::(TestSimpleTableWithEnum::VT_COLOR, Some(Color::Green)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TestSimpleTableWithEnum::VT_COLOR, Some(Color::Green)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/type_aliases_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/type_aliases_generated.rs index f6f7bb7b16..8cfa4ced87 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/type_aliases_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/type_aliases_generated.rs @@ -21,8 +21,8 @@ pub struct TypeAliases<'a> { impl<'a> flatbuffers::Follow<'a> for TypeAliases<'a> { type Inner = TypeAliases<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -45,7 +45,7 @@ impl<'a> TypeAliases<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TypeAliases { _tab: table } } #[allow(unused_mut)] @@ -81,7 +81,7 @@ impl<'a> TypeAliases<'a> { let f32_ = self.f32_(); let f64_ = self.f64_(); let v8 = self.v8().map(|x| { - x.to_vec() + x.into_iter().collect() }); let vf64 = self.vf64().map(|x| { x.into_iter().collect() @@ -104,51 +104,87 @@ impl<'a> TypeAliases<'a> { #[inline] pub fn i8_(&self) -> i8 { - self._tab.get::(TypeAliases::VT_I8_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I8_, Some(0)).unwrap()} } #[inline] pub fn u8_(&self) -> u8 { - self._tab.get::(TypeAliases::VT_U8_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U8_, Some(0)).unwrap()} } #[inline] pub fn i16_(&self) -> i16 { - self._tab.get::(TypeAliases::VT_I16_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I16_, Some(0)).unwrap()} } #[inline] pub fn u16_(&self) -> u16 { - self._tab.get::(TypeAliases::VT_U16_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U16_, Some(0)).unwrap()} } #[inline] pub fn i32_(&self) -> i32 { - self._tab.get::(TypeAliases::VT_I32_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I32_, Some(0)).unwrap()} } #[inline] pub fn u32_(&self) -> u32 { - self._tab.get::(TypeAliases::VT_U32_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U32_, Some(0)).unwrap()} } #[inline] pub fn i64_(&self) -> i64 { - self._tab.get::(TypeAliases::VT_I64_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_I64_, Some(0)).unwrap()} } #[inline] pub fn u64_(&self) -> u64 { - self._tab.get::(TypeAliases::VT_U64_, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_U64_, Some(0)).unwrap()} } #[inline] pub fn f32_(&self) -> f32 { - self._tab.get::(TypeAliases::VT_F32_, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_F32_, Some(0.0)).unwrap()} } #[inline] pub fn f64_(&self) -> f64 { - self._tab.get::(TypeAliases::VT_F64_, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TypeAliases::VT_F64_, Some(0.0)).unwrap()} } #[inline] - pub fn v8(&self) -> Option<&'a [i8]> { - self._tab.get::>>(TypeAliases::VT_V8, None).map(|v| v.safe_slice()) + pub fn v8(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(TypeAliases::VT_V8, None)} } #[inline] pub fn vf64(&self) -> Option> { - self._tab.get::>>(TypeAliases::VT_VF64, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(TypeAliases::VT_VF64, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/vec_3_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/vec_3_generated.rs index ebbe94c9b3..c080dd7429 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/vec_3_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example/vec_3_generated.rs @@ -34,39 +34,25 @@ impl core::fmt::Debug for Vec3 { } impl flatbuffers::SimpleToVerifyInSlice for Vec3 {} -impl flatbuffers::SafeSliceAccess for Vec3 {} impl<'a> flatbuffers::Follow<'a> for Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Vec3>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Vec3 { type Inner = &'a Vec3; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Vec3 { type Output = Vec3; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Vec3 { - type Output = Vec3; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Vec3 as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -122,121 +108,154 @@ impl<'a> Vec3 { } pub fn x(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_x(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_y(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[8..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_z(&mut self, x: f32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, + &x_le as *const _ as *const u8, self.0[8..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test1(&self) -> f64 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[16..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_test1(&mut self, x: f64) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const f64 as *const u8, + &x_le as *const _ as *const u8, self.0[16..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test2(&self) -> Color { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[24..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_test2(&mut self, x: Color) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const Color as *const u8, + &x_le as *const _ as *const u8, self.0[24..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn test3(&self) -> &Test { + // Safety: + // Created from a valid Table for this object + // Which contains a valid struct in this slot unsafe { &*(self.0[26..].as_ptr() as *const Test) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example_2/monster_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example_2/monster_generated.rs index 9422b573bf..8e1ce3aa0e 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/example_2/monster_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/example_2/monster_generated.rs @@ -21,8 +21,8 @@ pub struct Monster<'a> { impl<'a> flatbuffers::Follow<'a> for Monster<'a> { type Inner = Monster<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -33,7 +33,7 @@ impl<'a> Monster<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Monster { _tab: table } } #[allow(unused_mut)] diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/in_parent_namespace_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/in_parent_namespace_generated.rs index 71ceaa0be6..7fbc0deb78 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/in_parent_namespace_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/in_parent_namespace_generated.rs @@ -21,8 +21,8 @@ pub struct InParentNamespace<'a> { impl<'a> flatbuffers::Follow<'a> for InParentNamespace<'a> { type Inner = InParentNamespace<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -33,7 +33,7 @@ impl<'a> InParentNamespace<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { InParentNamespace { _tab: table } } #[allow(unused_mut)] diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/from_include_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/from_include_generated.rs index de5e5e2272..1536644014 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/from_include_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/from_include_generated.rs @@ -62,10 +62,8 @@ impl Serialize for FromInclude { impl<'a> flatbuffers::Follow<'a> for FromInclude { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -73,21 +71,21 @@ impl<'a> flatbuffers::Follow<'a> for FromInclude { impl flatbuffers::Push for FromInclude { type Output = FromInclude; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for FromInclude { + type Scalar = i64; #[inline] - fn to_little_endian(self) -> Self { - let b = i64::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i64 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i64::from_le(self.0); + fn from_little_endian(v: i64) -> Self { + let b = i64::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/table_b_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/table_b_generated.rs index e593299c08..27f9eb6d7f 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/table_b_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/table_b_generated.rs @@ -21,8 +21,8 @@ pub struct TableB<'a> { impl<'a> flatbuffers::Follow<'a> for TableB<'a> { type Inner = TableB<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -34,7 +34,7 @@ impl<'a> TableB<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableB { _tab: table } } #[allow(unused_mut)] @@ -58,7 +58,10 @@ impl<'a> TableB<'a> { #[inline] pub fn a(&self) -> Option> { - self._tab.get::>(TableB::VT_A, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableB::VT_A, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/unused_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/unused_generated.rs index 2991781c98..b676318f7c 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/unused_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/my_game/other_name_space/unused_generated.rs @@ -29,39 +29,25 @@ impl core::fmt::Debug for Unused { } impl flatbuffers::SimpleToVerifyInSlice for Unused {} -impl flatbuffers::SafeSliceAccess for Unused {} impl<'a> flatbuffers::Follow<'a> for Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Unused>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Unused { type Inner = &'a Unused; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Unused { type Output = Unused; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Unused { - type Output = Unused; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Unused as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Unused as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -102,24 +88,30 @@ impl<'a> Unused { } pub fn a(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/monster_test_serialize/table_a_generated.rs b/third_party/flatbuffers/tests/monster_test_serialize/table_a_generated.rs index c4bbd6925c..36e7390954 100644 --- a/third_party/flatbuffers/tests/monster_test_serialize/table_a_generated.rs +++ b/third_party/flatbuffers/tests/monster_test_serialize/table_a_generated.rs @@ -21,8 +21,8 @@ pub struct TableA<'a> { impl<'a> flatbuffers::Follow<'a> for TableA<'a> { type Inner = TableA<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -34,7 +34,7 @@ impl<'a> TableA<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableA { _tab: table } } #[allow(unused_mut)] @@ -58,7 +58,10 @@ impl<'a> TableA<'a> { #[inline] pub fn b(&self) -> Option> { - self._tab.get::>(TableA::VT_B, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableA::VT_B, None)} } } diff --git a/third_party/flatbuffers/tests/monster_test_suffix/ext_only/monster_test_generated.hpp b/third_party/flatbuffers/tests/monster_test_suffix/ext_only/monster_test_generated.hpp index deab77be2c..ce5acf8357 100644 --- a/third_party/flatbuffers/tests/monster_test_suffix/ext_only/monster_test_generated.hpp +++ b/third_party/flatbuffers/tests/monster_test_suffix/ext_only/monster_test_generated.hpp @@ -10,9 +10,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -1309,6 +1309,14 @@ struct MonsterT : public flatbuffers::NativeTable { MyGame::Example::Test native_inline{}; MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0); MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne; + float nan_default = std::numeric_limits::quiet_NaN(); + float inf_default = std::numeric_limits::infinity(); + float positive_inf_default = std::numeric_limits::infinity(); + float infinity_default = std::numeric_limits::infinity(); + float positive_infinity_default = std::numeric_limits::infinity(); + float negative_inf_default = -std::numeric_limits::infinity(); + float negative_infinity_default = -std::numeric_limits::infinity(); + double double_inf_default = std::numeric_limits::infinity(); MonsterT() = default; MonsterT(const MonsterT &o); MonsterT(MonsterT&&) FLATBUFFERS_NOEXCEPT = default; @@ -1375,7 +1383,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_SCALAR_KEY_SORTED_TABLES = 104, VT_NATIVE_INLINE = 106, VT_LONG_ENUM_NON_ENUM_DEFAULT = 108, - VT_LONG_ENUM_NORMAL_DEFAULT = 110 + VT_LONG_ENUM_NORMAL_DEFAULT = 110, + VT_NAN_DEFAULT = 112, + VT_INF_DEFAULT = 114, + VT_POSITIVE_INF_DEFAULT = 116, + VT_INFINITY_DEFAULT = 118, + VT_POSITIVE_INFINITY_DEFAULT = 120, + VT_NEGATIVE_INF_DEFAULT = 122, + VT_NEGATIVE_INFINITY_DEFAULT = 124, + VT_DOUBLE_INF_DEFAULT = 126 }; const MyGame::Example::Vec3 *pos() const { return GetStruct(VT_POS); @@ -1732,6 +1748,54 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool mutate_long_enum_normal_default(MyGame::Example::LongEnum _long_enum_normal_default = static_cast(2ULL)) { return SetField(VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(_long_enum_normal_default), 2ULL); } + float nan_default() const { + return GetField(VT_NAN_DEFAULT, std::numeric_limits::quiet_NaN()); + } + bool mutate_nan_default(float _nan_default = std::numeric_limits::quiet_NaN()) { + return SetField(VT_NAN_DEFAULT, _nan_default, std::numeric_limits::quiet_NaN()); + } + float inf_default() const { + return GetField(VT_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_inf_default(float _inf_default = std::numeric_limits::infinity()) { + return SetField(VT_INF_DEFAULT, _inf_default, std::numeric_limits::infinity()); + } + float positive_inf_default() const { + return GetField(VT_POSITIVE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_inf_default(float _positive_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INF_DEFAULT, _positive_inf_default, std::numeric_limits::infinity()); + } + float infinity_default() const { + return GetField(VT_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_infinity_default(float _infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_INFINITY_DEFAULT, _infinity_default, std::numeric_limits::infinity()); + } + float positive_infinity_default() const { + return GetField(VT_POSITIVE_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_infinity_default(float _positive_infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INFINITY_DEFAULT, _positive_infinity_default, std::numeric_limits::infinity()); + } + float negative_inf_default() const { + return GetField(VT_NEGATIVE_INF_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_inf_default(float _negative_inf_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INF_DEFAULT, _negative_inf_default, -std::numeric_limits::infinity()); + } + float negative_infinity_default() const { + return GetField(VT_NEGATIVE_INFINITY_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_infinity_default(float _negative_infinity_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INFINITY_DEFAULT, _negative_infinity_default, -std::numeric_limits::infinity()); + } + double double_inf_default() const { + return GetField(VT_DOUBLE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_double_inf_default(double _double_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_DOUBLE_INF_DEFAULT, _double_inf_default, std::numeric_limits::infinity()); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_POS, 8) && @@ -1823,6 +1887,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_NATIVE_INLINE, 2) && VerifyField(verifier, VT_LONG_ENUM_NON_ENUM_DEFAULT, 8) && VerifyField(verifier, VT_LONG_ENUM_NORMAL_DEFAULT, 8) && + VerifyField(verifier, VT_NAN_DEFAULT, 4) && + VerifyField(verifier, VT_INF_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_DOUBLE_INF_DEFAULT, 8) && verifier.EndTable(); } MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -2017,6 +2089,30 @@ struct MonsterBuilder { void add_long_enum_normal_default(MyGame::Example::LongEnum long_enum_normal_default) { fbb_.AddElement(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(long_enum_normal_default), 2ULL); } + void add_nan_default(float nan_default) { + fbb_.AddElement(Monster::VT_NAN_DEFAULT, nan_default, std::numeric_limits::quiet_NaN()); + } + void add_inf_default(float inf_default) { + fbb_.AddElement(Monster::VT_INF_DEFAULT, inf_default, std::numeric_limits::infinity()); + } + void add_positive_inf_default(float positive_inf_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, std::numeric_limits::infinity()); + } + void add_infinity_default(float infinity_default) { + fbb_.AddElement(Monster::VT_INFINITY_DEFAULT, infinity_default, std::numeric_limits::infinity()); + } + void add_positive_infinity_default(float positive_infinity_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, std::numeric_limits::infinity()); + } + void add_negative_inf_default(float negative_inf_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, -std::numeric_limits::infinity()); + } + void add_negative_infinity_default(float negative_infinity_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, -std::numeric_limits::infinity()); + } + void add_double_inf_default(double double_inf_default) { + fbb_.AddElement(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, std::numeric_limits::infinity()); + } explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -2083,8 +2179,17 @@ inline flatbuffers::Offset CreateMonster( flatbuffers::Offset>> scalar_key_sorted_tables = 0, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { MonsterBuilder builder_(_fbb); + builder_.add_double_inf_default(double_inf_default); builder_.add_long_enum_normal_default(long_enum_normal_default); builder_.add_long_enum_non_enum_default(long_enum_non_enum_default); builder_.add_non_owning_reference(non_owning_reference); @@ -2094,6 +2199,13 @@ inline flatbuffers::Offset CreateMonster( builder_.add_testhashs64_fnv1a(testhashs64_fnv1a); builder_.add_testhashu64_fnv1(testhashu64_fnv1); builder_.add_testhashs64_fnv1(testhashs64_fnv1); + builder_.add_negative_infinity_default(negative_infinity_default); + builder_.add_negative_inf_default(negative_inf_default); + builder_.add_positive_infinity_default(positive_infinity_default); + builder_.add_infinity_default(infinity_default); + builder_.add_positive_inf_default(positive_inf_default); + builder_.add_inf_default(inf_default); + builder_.add_nan_default(nan_default); builder_.add_native_inline(native_inline); builder_.add_scalar_key_sorted_tables(scalar_key_sorted_tables); builder_.add_testrequirednestedflatbuffer(testrequirednestedflatbuffer); @@ -2195,7 +2307,15 @@ inline flatbuffers::Offset CreateMonsterDirect( std::vector> *scalar_key_sorted_tables = nullptr, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { auto name__ = name ? _fbb.CreateString(name) : 0; auto inventory__ = inventory ? _fbb.CreateVector(*inventory) : 0; auto test4__ = test4 ? _fbb.CreateVectorOfStructs(*test4) : 0; @@ -2271,7 +2391,15 @@ inline flatbuffers::Offset CreateMonsterDirect( scalar_key_sorted_tables__, native_inline, long_enum_non_enum_default, - long_enum_normal_default); + long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default); } flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); @@ -2767,7 +2895,15 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) { (lhs.scalar_key_sorted_tables.size() == rhs.scalar_key_sorted_tables.size() && std::equal(lhs.scalar_key_sorted_tables.cbegin(), lhs.scalar_key_sorted_tables.cend(), rhs.scalar_key_sorted_tables.cbegin(), [](flatbuffers::unique_ptr const &a, flatbuffers::unique_ptr const &b) { return (a == b) || (a && b && *a == *b); })) && (lhs.native_inline == rhs.native_inline) && (lhs.long_enum_non_enum_default == rhs.long_enum_non_enum_default) && - (lhs.long_enum_normal_default == rhs.long_enum_normal_default); + (lhs.long_enum_normal_default == rhs.long_enum_normal_default) && + (lhs.nan_default == rhs.nan_default) && + (lhs.inf_default == rhs.inf_default) && + (lhs.positive_inf_default == rhs.positive_inf_default) && + (lhs.infinity_default == rhs.infinity_default) && + (lhs.positive_infinity_default == rhs.positive_infinity_default) && + (lhs.negative_inf_default == rhs.negative_inf_default) && + (lhs.negative_infinity_default == rhs.negative_infinity_default) && + (lhs.double_inf_default == rhs.double_inf_default); } inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) { @@ -2820,7 +2956,15 @@ inline MonsterT::MonsterT(const MonsterT &o) testrequirednestedflatbuffer(o.testrequirednestedflatbuffer), native_inline(o.native_inline), long_enum_non_enum_default(o.long_enum_non_enum_default), - long_enum_normal_default(o.long_enum_normal_default) { + long_enum_normal_default(o.long_enum_normal_default), + nan_default(o.nan_default), + inf_default(o.inf_default), + positive_inf_default(o.positive_inf_default), + infinity_default(o.infinity_default), + positive_infinity_default(o.positive_infinity_default), + negative_inf_default(o.negative_inf_default), + negative_infinity_default(o.negative_infinity_default), + double_inf_default(o.double_inf_default) { testarrayoftables.reserve(o.testarrayoftables.size()); for (const auto &testarrayoftables_ : o.testarrayoftables) { testarrayoftables.emplace_back((testarrayoftables_) ? new MyGame::Example::MonsterT(*testarrayoftables_) : nullptr); } vector_of_referrables.reserve(o.vector_of_referrables.size()); @@ -2884,6 +3028,14 @@ inline MonsterT &MonsterT::operator=(MonsterT o) FLATBUFFERS_NOEXCEPT { std::swap(native_inline, o.native_inline); std::swap(long_enum_non_enum_default, o.long_enum_non_enum_default); std::swap(long_enum_normal_default, o.long_enum_normal_default); + std::swap(nan_default, o.nan_default); + std::swap(inf_default, o.inf_default); + std::swap(positive_inf_default, o.positive_inf_default); + std::swap(infinity_default, o.infinity_default); + std::swap(positive_infinity_default, o.positive_infinity_default); + std::swap(negative_inf_default, o.negative_inf_default); + std::swap(negative_infinity_default, o.negative_infinity_default); + std::swap(double_inf_default, o.double_inf_default); return *this; } @@ -2949,6 +3101,14 @@ inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function { auto _e = native_inline(); if (_e) _o->native_inline = *_e; } { auto _e = long_enum_non_enum_default(); _o->long_enum_non_enum_default = _e; } { auto _e = long_enum_normal_default(); _o->long_enum_normal_default = _e; } + { auto _e = nan_default(); _o->nan_default = _e; } + { auto _e = inf_default(); _o->inf_default = _e; } + { auto _e = positive_inf_default(); _o->positive_inf_default = _e; } + { auto _e = infinity_default(); _o->infinity_default = _e; } + { auto _e = positive_infinity_default(); _o->positive_infinity_default = _e; } + { auto _e = negative_inf_default(); _o->negative_inf_default = _e; } + { auto _e = negative_infinity_default(); _o->negative_infinity_default = _e; } + { auto _e = double_inf_default(); _o->double_inf_default = _e; } } inline flatbuffers::Offset Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) { @@ -3012,6 +3172,14 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder auto _native_inline = &_o->native_inline; auto _long_enum_non_enum_default = _o->long_enum_non_enum_default; auto _long_enum_normal_default = _o->long_enum_normal_default; + auto _nan_default = _o->nan_default; + auto _inf_default = _o->inf_default; + auto _positive_inf_default = _o->positive_inf_default; + auto _infinity_default = _o->infinity_default; + auto _positive_infinity_default = _o->positive_infinity_default; + auto _negative_inf_default = _o->negative_inf_default; + auto _negative_infinity_default = _o->negative_infinity_default; + auto _double_inf_default = _o->double_inf_default; return MyGame::Example::CreateMonster( _fbb, _pos, @@ -3066,7 +3234,15 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder _scalar_key_sorted_tables, _native_inline, _long_enum_non_enum_default, - _long_enum_normal_default); + _long_enum_normal_default, + _nan_default, + _inf_default, + _positive_inf_default, + _infinity_default, + _positive_infinity_default, + _negative_inf_default, + _negative_infinity_default, + _double_inf_default); } @@ -3846,7 +4022,15 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { { flatbuffers::ET_SEQUENCE, 1, 5 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_ULONG, 0, 12 }, - { flatbuffers::ET_ULONG, 0, 12 } + { flatbuffers::ET_ULONG, 0, 12 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_DOUBLE, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { MyGame::Example::Vec3TypeTable, @@ -3917,10 +4101,18 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; static const flatbuffers::TypeTable tt = { - flatbuffers::ST_TABLE, 54, type_codes, type_refs, nullptr, nullptr, names + flatbuffers::ST_TABLE, 62, type_codes, type_refs, nullptr, nullptr, names }; return &tt; } diff --git a/third_party/flatbuffers/tests/monster_test_suffix/filesuffix_only/monster_test_suffix.h b/third_party/flatbuffers/tests/monster_test_suffix/filesuffix_only/monster_test_suffix.h index deab77be2c..ce5acf8357 100644 --- a/third_party/flatbuffers/tests/monster_test_suffix/filesuffix_only/monster_test_suffix.h +++ b/third_party/flatbuffers/tests/monster_test_suffix/filesuffix_only/monster_test_suffix.h @@ -10,9 +10,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -1309,6 +1309,14 @@ struct MonsterT : public flatbuffers::NativeTable { MyGame::Example::Test native_inline{}; MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0); MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne; + float nan_default = std::numeric_limits::quiet_NaN(); + float inf_default = std::numeric_limits::infinity(); + float positive_inf_default = std::numeric_limits::infinity(); + float infinity_default = std::numeric_limits::infinity(); + float positive_infinity_default = std::numeric_limits::infinity(); + float negative_inf_default = -std::numeric_limits::infinity(); + float negative_infinity_default = -std::numeric_limits::infinity(); + double double_inf_default = std::numeric_limits::infinity(); MonsterT() = default; MonsterT(const MonsterT &o); MonsterT(MonsterT&&) FLATBUFFERS_NOEXCEPT = default; @@ -1375,7 +1383,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_SCALAR_KEY_SORTED_TABLES = 104, VT_NATIVE_INLINE = 106, VT_LONG_ENUM_NON_ENUM_DEFAULT = 108, - VT_LONG_ENUM_NORMAL_DEFAULT = 110 + VT_LONG_ENUM_NORMAL_DEFAULT = 110, + VT_NAN_DEFAULT = 112, + VT_INF_DEFAULT = 114, + VT_POSITIVE_INF_DEFAULT = 116, + VT_INFINITY_DEFAULT = 118, + VT_POSITIVE_INFINITY_DEFAULT = 120, + VT_NEGATIVE_INF_DEFAULT = 122, + VT_NEGATIVE_INFINITY_DEFAULT = 124, + VT_DOUBLE_INF_DEFAULT = 126 }; const MyGame::Example::Vec3 *pos() const { return GetStruct(VT_POS); @@ -1732,6 +1748,54 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool mutate_long_enum_normal_default(MyGame::Example::LongEnum _long_enum_normal_default = static_cast(2ULL)) { return SetField(VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(_long_enum_normal_default), 2ULL); } + float nan_default() const { + return GetField(VT_NAN_DEFAULT, std::numeric_limits::quiet_NaN()); + } + bool mutate_nan_default(float _nan_default = std::numeric_limits::quiet_NaN()) { + return SetField(VT_NAN_DEFAULT, _nan_default, std::numeric_limits::quiet_NaN()); + } + float inf_default() const { + return GetField(VT_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_inf_default(float _inf_default = std::numeric_limits::infinity()) { + return SetField(VT_INF_DEFAULT, _inf_default, std::numeric_limits::infinity()); + } + float positive_inf_default() const { + return GetField(VT_POSITIVE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_inf_default(float _positive_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INF_DEFAULT, _positive_inf_default, std::numeric_limits::infinity()); + } + float infinity_default() const { + return GetField(VT_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_infinity_default(float _infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_INFINITY_DEFAULT, _infinity_default, std::numeric_limits::infinity()); + } + float positive_infinity_default() const { + return GetField(VT_POSITIVE_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_infinity_default(float _positive_infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INFINITY_DEFAULT, _positive_infinity_default, std::numeric_limits::infinity()); + } + float negative_inf_default() const { + return GetField(VT_NEGATIVE_INF_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_inf_default(float _negative_inf_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INF_DEFAULT, _negative_inf_default, -std::numeric_limits::infinity()); + } + float negative_infinity_default() const { + return GetField(VT_NEGATIVE_INFINITY_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_infinity_default(float _negative_infinity_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INFINITY_DEFAULT, _negative_infinity_default, -std::numeric_limits::infinity()); + } + double double_inf_default() const { + return GetField(VT_DOUBLE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_double_inf_default(double _double_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_DOUBLE_INF_DEFAULT, _double_inf_default, std::numeric_limits::infinity()); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_POS, 8) && @@ -1823,6 +1887,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_NATIVE_INLINE, 2) && VerifyField(verifier, VT_LONG_ENUM_NON_ENUM_DEFAULT, 8) && VerifyField(verifier, VT_LONG_ENUM_NORMAL_DEFAULT, 8) && + VerifyField(verifier, VT_NAN_DEFAULT, 4) && + VerifyField(verifier, VT_INF_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_DOUBLE_INF_DEFAULT, 8) && verifier.EndTable(); } MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -2017,6 +2089,30 @@ struct MonsterBuilder { void add_long_enum_normal_default(MyGame::Example::LongEnum long_enum_normal_default) { fbb_.AddElement(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(long_enum_normal_default), 2ULL); } + void add_nan_default(float nan_default) { + fbb_.AddElement(Monster::VT_NAN_DEFAULT, nan_default, std::numeric_limits::quiet_NaN()); + } + void add_inf_default(float inf_default) { + fbb_.AddElement(Monster::VT_INF_DEFAULT, inf_default, std::numeric_limits::infinity()); + } + void add_positive_inf_default(float positive_inf_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, std::numeric_limits::infinity()); + } + void add_infinity_default(float infinity_default) { + fbb_.AddElement(Monster::VT_INFINITY_DEFAULT, infinity_default, std::numeric_limits::infinity()); + } + void add_positive_infinity_default(float positive_infinity_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, std::numeric_limits::infinity()); + } + void add_negative_inf_default(float negative_inf_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, -std::numeric_limits::infinity()); + } + void add_negative_infinity_default(float negative_infinity_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, -std::numeric_limits::infinity()); + } + void add_double_inf_default(double double_inf_default) { + fbb_.AddElement(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, std::numeric_limits::infinity()); + } explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -2083,8 +2179,17 @@ inline flatbuffers::Offset CreateMonster( flatbuffers::Offset>> scalar_key_sorted_tables = 0, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { MonsterBuilder builder_(_fbb); + builder_.add_double_inf_default(double_inf_default); builder_.add_long_enum_normal_default(long_enum_normal_default); builder_.add_long_enum_non_enum_default(long_enum_non_enum_default); builder_.add_non_owning_reference(non_owning_reference); @@ -2094,6 +2199,13 @@ inline flatbuffers::Offset CreateMonster( builder_.add_testhashs64_fnv1a(testhashs64_fnv1a); builder_.add_testhashu64_fnv1(testhashu64_fnv1); builder_.add_testhashs64_fnv1(testhashs64_fnv1); + builder_.add_negative_infinity_default(negative_infinity_default); + builder_.add_negative_inf_default(negative_inf_default); + builder_.add_positive_infinity_default(positive_infinity_default); + builder_.add_infinity_default(infinity_default); + builder_.add_positive_inf_default(positive_inf_default); + builder_.add_inf_default(inf_default); + builder_.add_nan_default(nan_default); builder_.add_native_inline(native_inline); builder_.add_scalar_key_sorted_tables(scalar_key_sorted_tables); builder_.add_testrequirednestedflatbuffer(testrequirednestedflatbuffer); @@ -2195,7 +2307,15 @@ inline flatbuffers::Offset CreateMonsterDirect( std::vector> *scalar_key_sorted_tables = nullptr, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { auto name__ = name ? _fbb.CreateString(name) : 0; auto inventory__ = inventory ? _fbb.CreateVector(*inventory) : 0; auto test4__ = test4 ? _fbb.CreateVectorOfStructs(*test4) : 0; @@ -2271,7 +2391,15 @@ inline flatbuffers::Offset CreateMonsterDirect( scalar_key_sorted_tables__, native_inline, long_enum_non_enum_default, - long_enum_normal_default); + long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default); } flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); @@ -2767,7 +2895,15 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) { (lhs.scalar_key_sorted_tables.size() == rhs.scalar_key_sorted_tables.size() && std::equal(lhs.scalar_key_sorted_tables.cbegin(), lhs.scalar_key_sorted_tables.cend(), rhs.scalar_key_sorted_tables.cbegin(), [](flatbuffers::unique_ptr const &a, flatbuffers::unique_ptr const &b) { return (a == b) || (a && b && *a == *b); })) && (lhs.native_inline == rhs.native_inline) && (lhs.long_enum_non_enum_default == rhs.long_enum_non_enum_default) && - (lhs.long_enum_normal_default == rhs.long_enum_normal_default); + (lhs.long_enum_normal_default == rhs.long_enum_normal_default) && + (lhs.nan_default == rhs.nan_default) && + (lhs.inf_default == rhs.inf_default) && + (lhs.positive_inf_default == rhs.positive_inf_default) && + (lhs.infinity_default == rhs.infinity_default) && + (lhs.positive_infinity_default == rhs.positive_infinity_default) && + (lhs.negative_inf_default == rhs.negative_inf_default) && + (lhs.negative_infinity_default == rhs.negative_infinity_default) && + (lhs.double_inf_default == rhs.double_inf_default); } inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) { @@ -2820,7 +2956,15 @@ inline MonsterT::MonsterT(const MonsterT &o) testrequirednestedflatbuffer(o.testrequirednestedflatbuffer), native_inline(o.native_inline), long_enum_non_enum_default(o.long_enum_non_enum_default), - long_enum_normal_default(o.long_enum_normal_default) { + long_enum_normal_default(o.long_enum_normal_default), + nan_default(o.nan_default), + inf_default(o.inf_default), + positive_inf_default(o.positive_inf_default), + infinity_default(o.infinity_default), + positive_infinity_default(o.positive_infinity_default), + negative_inf_default(o.negative_inf_default), + negative_infinity_default(o.negative_infinity_default), + double_inf_default(o.double_inf_default) { testarrayoftables.reserve(o.testarrayoftables.size()); for (const auto &testarrayoftables_ : o.testarrayoftables) { testarrayoftables.emplace_back((testarrayoftables_) ? new MyGame::Example::MonsterT(*testarrayoftables_) : nullptr); } vector_of_referrables.reserve(o.vector_of_referrables.size()); @@ -2884,6 +3028,14 @@ inline MonsterT &MonsterT::operator=(MonsterT o) FLATBUFFERS_NOEXCEPT { std::swap(native_inline, o.native_inline); std::swap(long_enum_non_enum_default, o.long_enum_non_enum_default); std::swap(long_enum_normal_default, o.long_enum_normal_default); + std::swap(nan_default, o.nan_default); + std::swap(inf_default, o.inf_default); + std::swap(positive_inf_default, o.positive_inf_default); + std::swap(infinity_default, o.infinity_default); + std::swap(positive_infinity_default, o.positive_infinity_default); + std::swap(negative_inf_default, o.negative_inf_default); + std::swap(negative_infinity_default, o.negative_infinity_default); + std::swap(double_inf_default, o.double_inf_default); return *this; } @@ -2949,6 +3101,14 @@ inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function { auto _e = native_inline(); if (_e) _o->native_inline = *_e; } { auto _e = long_enum_non_enum_default(); _o->long_enum_non_enum_default = _e; } { auto _e = long_enum_normal_default(); _o->long_enum_normal_default = _e; } + { auto _e = nan_default(); _o->nan_default = _e; } + { auto _e = inf_default(); _o->inf_default = _e; } + { auto _e = positive_inf_default(); _o->positive_inf_default = _e; } + { auto _e = infinity_default(); _o->infinity_default = _e; } + { auto _e = positive_infinity_default(); _o->positive_infinity_default = _e; } + { auto _e = negative_inf_default(); _o->negative_inf_default = _e; } + { auto _e = negative_infinity_default(); _o->negative_infinity_default = _e; } + { auto _e = double_inf_default(); _o->double_inf_default = _e; } } inline flatbuffers::Offset Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) { @@ -3012,6 +3172,14 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder auto _native_inline = &_o->native_inline; auto _long_enum_non_enum_default = _o->long_enum_non_enum_default; auto _long_enum_normal_default = _o->long_enum_normal_default; + auto _nan_default = _o->nan_default; + auto _inf_default = _o->inf_default; + auto _positive_inf_default = _o->positive_inf_default; + auto _infinity_default = _o->infinity_default; + auto _positive_infinity_default = _o->positive_infinity_default; + auto _negative_inf_default = _o->negative_inf_default; + auto _negative_infinity_default = _o->negative_infinity_default; + auto _double_inf_default = _o->double_inf_default; return MyGame::Example::CreateMonster( _fbb, _pos, @@ -3066,7 +3234,15 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder _scalar_key_sorted_tables, _native_inline, _long_enum_non_enum_default, - _long_enum_normal_default); + _long_enum_normal_default, + _nan_default, + _inf_default, + _positive_inf_default, + _infinity_default, + _positive_infinity_default, + _negative_inf_default, + _negative_infinity_default, + _double_inf_default); } @@ -3846,7 +4022,15 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { { flatbuffers::ET_SEQUENCE, 1, 5 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_ULONG, 0, 12 }, - { flatbuffers::ET_ULONG, 0, 12 } + { flatbuffers::ET_ULONG, 0, 12 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_DOUBLE, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { MyGame::Example::Vec3TypeTable, @@ -3917,10 +4101,18 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; static const flatbuffers::TypeTable tt = { - flatbuffers::ST_TABLE, 54, type_codes, type_refs, nullptr, nullptr, names + flatbuffers::ST_TABLE, 62, type_codes, type_refs, nullptr, nullptr, names }; return &tt; } diff --git a/third_party/flatbuffers/tests/monster_test_suffix/monster_test_suffix.hpp b/third_party/flatbuffers/tests/monster_test_suffix/monster_test_suffix.hpp index deab77be2c..ce5acf8357 100644 --- a/third_party/flatbuffers/tests/monster_test_suffix/monster_test_suffix.hpp +++ b/third_party/flatbuffers/tests/monster_test_suffix/monster_test_suffix.hpp @@ -10,9 +10,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace MyGame { @@ -1309,6 +1309,14 @@ struct MonsterT : public flatbuffers::NativeTable { MyGame::Example::Test native_inline{}; MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0); MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne; + float nan_default = std::numeric_limits::quiet_NaN(); + float inf_default = std::numeric_limits::infinity(); + float positive_inf_default = std::numeric_limits::infinity(); + float infinity_default = std::numeric_limits::infinity(); + float positive_infinity_default = std::numeric_limits::infinity(); + float negative_inf_default = -std::numeric_limits::infinity(); + float negative_infinity_default = -std::numeric_limits::infinity(); + double double_inf_default = std::numeric_limits::infinity(); MonsterT() = default; MonsterT(const MonsterT &o); MonsterT(MonsterT&&) FLATBUFFERS_NOEXCEPT = default; @@ -1375,7 +1383,15 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_SCALAR_KEY_SORTED_TABLES = 104, VT_NATIVE_INLINE = 106, VT_LONG_ENUM_NON_ENUM_DEFAULT = 108, - VT_LONG_ENUM_NORMAL_DEFAULT = 110 + VT_LONG_ENUM_NORMAL_DEFAULT = 110, + VT_NAN_DEFAULT = 112, + VT_INF_DEFAULT = 114, + VT_POSITIVE_INF_DEFAULT = 116, + VT_INFINITY_DEFAULT = 118, + VT_POSITIVE_INFINITY_DEFAULT = 120, + VT_NEGATIVE_INF_DEFAULT = 122, + VT_NEGATIVE_INFINITY_DEFAULT = 124, + VT_DOUBLE_INF_DEFAULT = 126 }; const MyGame::Example::Vec3 *pos() const { return GetStruct(VT_POS); @@ -1732,6 +1748,54 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { bool mutate_long_enum_normal_default(MyGame::Example::LongEnum _long_enum_normal_default = static_cast(2ULL)) { return SetField(VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(_long_enum_normal_default), 2ULL); } + float nan_default() const { + return GetField(VT_NAN_DEFAULT, std::numeric_limits::quiet_NaN()); + } + bool mutate_nan_default(float _nan_default = std::numeric_limits::quiet_NaN()) { + return SetField(VT_NAN_DEFAULT, _nan_default, std::numeric_limits::quiet_NaN()); + } + float inf_default() const { + return GetField(VT_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_inf_default(float _inf_default = std::numeric_limits::infinity()) { + return SetField(VT_INF_DEFAULT, _inf_default, std::numeric_limits::infinity()); + } + float positive_inf_default() const { + return GetField(VT_POSITIVE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_inf_default(float _positive_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INF_DEFAULT, _positive_inf_default, std::numeric_limits::infinity()); + } + float infinity_default() const { + return GetField(VT_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_infinity_default(float _infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_INFINITY_DEFAULT, _infinity_default, std::numeric_limits::infinity()); + } + float positive_infinity_default() const { + return GetField(VT_POSITIVE_INFINITY_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_positive_infinity_default(float _positive_infinity_default = std::numeric_limits::infinity()) { + return SetField(VT_POSITIVE_INFINITY_DEFAULT, _positive_infinity_default, std::numeric_limits::infinity()); + } + float negative_inf_default() const { + return GetField(VT_NEGATIVE_INF_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_inf_default(float _negative_inf_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INF_DEFAULT, _negative_inf_default, -std::numeric_limits::infinity()); + } + float negative_infinity_default() const { + return GetField(VT_NEGATIVE_INFINITY_DEFAULT, -std::numeric_limits::infinity()); + } + bool mutate_negative_infinity_default(float _negative_infinity_default = -std::numeric_limits::infinity()) { + return SetField(VT_NEGATIVE_INFINITY_DEFAULT, _negative_infinity_default, -std::numeric_limits::infinity()); + } + double double_inf_default() const { + return GetField(VT_DOUBLE_INF_DEFAULT, std::numeric_limits::infinity()); + } + bool mutate_double_inf_default(double _double_inf_default = std::numeric_limits::infinity()) { + return SetField(VT_DOUBLE_INF_DEFAULT, _double_inf_default, std::numeric_limits::infinity()); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_POS, 8) && @@ -1823,6 +1887,14 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyField(verifier, VT_NATIVE_INLINE, 2) && VerifyField(verifier, VT_LONG_ENUM_NON_ENUM_DEFAULT, 8) && VerifyField(verifier, VT_LONG_ENUM_NORMAL_DEFAULT, 8) && + VerifyField(verifier, VT_NAN_DEFAULT, 4) && + VerifyField(verifier, VT_INF_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_POSITIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INF_DEFAULT, 4) && + VerifyField(verifier, VT_NEGATIVE_INFINITY_DEFAULT, 4) && + VerifyField(verifier, VT_DOUBLE_INF_DEFAULT, 8) && verifier.EndTable(); } MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; @@ -2017,6 +2089,30 @@ struct MonsterBuilder { void add_long_enum_normal_default(MyGame::Example::LongEnum long_enum_normal_default) { fbb_.AddElement(Monster::VT_LONG_ENUM_NORMAL_DEFAULT, static_cast(long_enum_normal_default), 2ULL); } + void add_nan_default(float nan_default) { + fbb_.AddElement(Monster::VT_NAN_DEFAULT, nan_default, std::numeric_limits::quiet_NaN()); + } + void add_inf_default(float inf_default) { + fbb_.AddElement(Monster::VT_INF_DEFAULT, inf_default, std::numeric_limits::infinity()); + } + void add_positive_inf_default(float positive_inf_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INF_DEFAULT, positive_inf_default, std::numeric_limits::infinity()); + } + void add_infinity_default(float infinity_default) { + fbb_.AddElement(Monster::VT_INFINITY_DEFAULT, infinity_default, std::numeric_limits::infinity()); + } + void add_positive_infinity_default(float positive_infinity_default) { + fbb_.AddElement(Monster::VT_POSITIVE_INFINITY_DEFAULT, positive_infinity_default, std::numeric_limits::infinity()); + } + void add_negative_inf_default(float negative_inf_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INF_DEFAULT, negative_inf_default, -std::numeric_limits::infinity()); + } + void add_negative_infinity_default(float negative_infinity_default) { + fbb_.AddElement(Monster::VT_NEGATIVE_INFINITY_DEFAULT, negative_infinity_default, -std::numeric_limits::infinity()); + } + void add_double_inf_default(double double_inf_default) { + fbb_.AddElement(Monster::VT_DOUBLE_INF_DEFAULT, double_inf_default, std::numeric_limits::infinity()); + } explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -2083,8 +2179,17 @@ inline flatbuffers::Offset CreateMonster( flatbuffers::Offset>> scalar_key_sorted_tables = 0, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { MonsterBuilder builder_(_fbb); + builder_.add_double_inf_default(double_inf_default); builder_.add_long_enum_normal_default(long_enum_normal_default); builder_.add_long_enum_non_enum_default(long_enum_non_enum_default); builder_.add_non_owning_reference(non_owning_reference); @@ -2094,6 +2199,13 @@ inline flatbuffers::Offset CreateMonster( builder_.add_testhashs64_fnv1a(testhashs64_fnv1a); builder_.add_testhashu64_fnv1(testhashu64_fnv1); builder_.add_testhashs64_fnv1(testhashs64_fnv1); + builder_.add_negative_infinity_default(negative_infinity_default); + builder_.add_negative_inf_default(negative_inf_default); + builder_.add_positive_infinity_default(positive_infinity_default); + builder_.add_infinity_default(infinity_default); + builder_.add_positive_inf_default(positive_inf_default); + builder_.add_inf_default(inf_default); + builder_.add_nan_default(nan_default); builder_.add_native_inline(native_inline); builder_.add_scalar_key_sorted_tables(scalar_key_sorted_tables); builder_.add_testrequirednestedflatbuffer(testrequirednestedflatbuffer); @@ -2195,7 +2307,15 @@ inline flatbuffers::Offset CreateMonsterDirect( std::vector> *scalar_key_sorted_tables = nullptr, const MyGame::Example::Test *native_inline = nullptr, MyGame::Example::LongEnum long_enum_non_enum_default = static_cast(0), - MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne) { + MyGame::Example::LongEnum long_enum_normal_default = MyGame::Example::LongEnum_LongOne, + float nan_default = std::numeric_limits::quiet_NaN(), + float inf_default = std::numeric_limits::infinity(), + float positive_inf_default = std::numeric_limits::infinity(), + float infinity_default = std::numeric_limits::infinity(), + float positive_infinity_default = std::numeric_limits::infinity(), + float negative_inf_default = -std::numeric_limits::infinity(), + float negative_infinity_default = -std::numeric_limits::infinity(), + double double_inf_default = std::numeric_limits::infinity()) { auto name__ = name ? _fbb.CreateString(name) : 0; auto inventory__ = inventory ? _fbb.CreateVector(*inventory) : 0; auto test4__ = test4 ? _fbb.CreateVectorOfStructs(*test4) : 0; @@ -2271,7 +2391,15 @@ inline flatbuffers::Offset CreateMonsterDirect( scalar_key_sorted_tables__, native_inline, long_enum_non_enum_default, - long_enum_normal_default); + long_enum_normal_default, + nan_default, + inf_default, + positive_inf_default, + infinity_default, + positive_infinity_default, + negative_inf_default, + negative_infinity_default, + double_inf_default); } flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); @@ -2767,7 +2895,15 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) { (lhs.scalar_key_sorted_tables.size() == rhs.scalar_key_sorted_tables.size() && std::equal(lhs.scalar_key_sorted_tables.cbegin(), lhs.scalar_key_sorted_tables.cend(), rhs.scalar_key_sorted_tables.cbegin(), [](flatbuffers::unique_ptr const &a, flatbuffers::unique_ptr const &b) { return (a == b) || (a && b && *a == *b); })) && (lhs.native_inline == rhs.native_inline) && (lhs.long_enum_non_enum_default == rhs.long_enum_non_enum_default) && - (lhs.long_enum_normal_default == rhs.long_enum_normal_default); + (lhs.long_enum_normal_default == rhs.long_enum_normal_default) && + (lhs.nan_default == rhs.nan_default) && + (lhs.inf_default == rhs.inf_default) && + (lhs.positive_inf_default == rhs.positive_inf_default) && + (lhs.infinity_default == rhs.infinity_default) && + (lhs.positive_infinity_default == rhs.positive_infinity_default) && + (lhs.negative_inf_default == rhs.negative_inf_default) && + (lhs.negative_infinity_default == rhs.negative_infinity_default) && + (lhs.double_inf_default == rhs.double_inf_default); } inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) { @@ -2820,7 +2956,15 @@ inline MonsterT::MonsterT(const MonsterT &o) testrequirednestedflatbuffer(o.testrequirednestedflatbuffer), native_inline(o.native_inline), long_enum_non_enum_default(o.long_enum_non_enum_default), - long_enum_normal_default(o.long_enum_normal_default) { + long_enum_normal_default(o.long_enum_normal_default), + nan_default(o.nan_default), + inf_default(o.inf_default), + positive_inf_default(o.positive_inf_default), + infinity_default(o.infinity_default), + positive_infinity_default(o.positive_infinity_default), + negative_inf_default(o.negative_inf_default), + negative_infinity_default(o.negative_infinity_default), + double_inf_default(o.double_inf_default) { testarrayoftables.reserve(o.testarrayoftables.size()); for (const auto &testarrayoftables_ : o.testarrayoftables) { testarrayoftables.emplace_back((testarrayoftables_) ? new MyGame::Example::MonsterT(*testarrayoftables_) : nullptr); } vector_of_referrables.reserve(o.vector_of_referrables.size()); @@ -2884,6 +3028,14 @@ inline MonsterT &MonsterT::operator=(MonsterT o) FLATBUFFERS_NOEXCEPT { std::swap(native_inline, o.native_inline); std::swap(long_enum_non_enum_default, o.long_enum_non_enum_default); std::swap(long_enum_normal_default, o.long_enum_normal_default); + std::swap(nan_default, o.nan_default); + std::swap(inf_default, o.inf_default); + std::swap(positive_inf_default, o.positive_inf_default); + std::swap(infinity_default, o.infinity_default); + std::swap(positive_infinity_default, o.positive_infinity_default); + std::swap(negative_inf_default, o.negative_inf_default); + std::swap(negative_infinity_default, o.negative_infinity_default); + std::swap(double_inf_default, o.double_inf_default); return *this; } @@ -2949,6 +3101,14 @@ inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function { auto _e = native_inline(); if (_e) _o->native_inline = *_e; } { auto _e = long_enum_non_enum_default(); _o->long_enum_non_enum_default = _e; } { auto _e = long_enum_normal_default(); _o->long_enum_normal_default = _e; } + { auto _e = nan_default(); _o->nan_default = _e; } + { auto _e = inf_default(); _o->inf_default = _e; } + { auto _e = positive_inf_default(); _o->positive_inf_default = _e; } + { auto _e = infinity_default(); _o->infinity_default = _e; } + { auto _e = positive_infinity_default(); _o->positive_infinity_default = _e; } + { auto _e = negative_inf_default(); _o->negative_inf_default = _e; } + { auto _e = negative_infinity_default(); _o->negative_infinity_default = _e; } + { auto _e = double_inf_default(); _o->double_inf_default = _e; } } inline flatbuffers::Offset Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) { @@ -3012,6 +3172,14 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder auto _native_inline = &_o->native_inline; auto _long_enum_non_enum_default = _o->long_enum_non_enum_default; auto _long_enum_normal_default = _o->long_enum_normal_default; + auto _nan_default = _o->nan_default; + auto _inf_default = _o->inf_default; + auto _positive_inf_default = _o->positive_inf_default; + auto _infinity_default = _o->infinity_default; + auto _positive_infinity_default = _o->positive_infinity_default; + auto _negative_inf_default = _o->negative_inf_default; + auto _negative_infinity_default = _o->negative_infinity_default; + auto _double_inf_default = _o->double_inf_default; return MyGame::Example::CreateMonster( _fbb, _pos, @@ -3066,7 +3234,15 @@ inline flatbuffers::Offset CreateMonster(flatbuffers::FlatBufferBuilder _scalar_key_sorted_tables, _native_inline, _long_enum_non_enum_default, - _long_enum_normal_default); + _long_enum_normal_default, + _nan_default, + _inf_default, + _positive_inf_default, + _infinity_default, + _positive_infinity_default, + _negative_inf_default, + _negative_infinity_default, + _double_inf_default); } @@ -3846,7 +4022,15 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { { flatbuffers::ET_SEQUENCE, 1, 5 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_ULONG, 0, 12 }, - { flatbuffers::ET_ULONG, 0, 12 } + { flatbuffers::ET_ULONG, 0, 12 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_FLOAT, 0, -1 }, + { flatbuffers::ET_DOUBLE, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { MyGame::Example::Vec3TypeTable, @@ -3917,10 +4101,18 @@ inline const flatbuffers::TypeTable *MonsterTypeTable() { "scalar_key_sorted_tables", "native_inline", "long_enum_non_enum_default", - "long_enum_normal_default" + "long_enum_normal_default", + "nan_default", + "inf_default", + "positive_inf_default", + "infinity_default", + "positive_infinity_default", + "negative_inf_default", + "negative_infinity_default", + "double_inf_default" }; static const flatbuffers::TypeTable tt = { - flatbuffers::ST_TABLE, 54, type_codes, type_refs, nullptr, nullptr, names + flatbuffers::ST_TABLE, 62, type_codes, type_refs, nullptr, nullptr, names }; return &tt; } diff --git a/third_party/flatbuffers/tests/more_defaults/abc_generated.rs b/third_party/flatbuffers/tests/more_defaults/abc_generated.rs index f2bdbad4a0..cff89ca72c 100644 --- a/third_party/flatbuffers/tests/more_defaults/abc_generated.rs +++ b/third_party/flatbuffers/tests/more_defaults/abc_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for ABC { impl<'a> flatbuffers::Follow<'a> for ABC { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for ABC { impl flatbuffers::Push for ABC { type Output = ABC; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for ABC { + type Scalar = i32; #[inline] - fn to_little_endian(self) -> Self { - let b = i32::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i32 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i32::from_le(self.0); + fn from_little_endian(v: i32) -> Self { + let b = i32::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/more_defaults/more_defaults_generated.rs b/third_party/flatbuffers/tests/more_defaults/more_defaults_generated.rs index 27fa65ca28..99444b85c7 100644 --- a/third_party/flatbuffers/tests/more_defaults/more_defaults_generated.rs +++ b/third_party/flatbuffers/tests/more_defaults/more_defaults_generated.rs @@ -19,8 +19,8 @@ pub struct MoreDefaults<'a> { impl<'a> flatbuffers::Follow<'a> for MoreDefaults<'a> { type Inner = MoreDefaults<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -37,7 +37,7 @@ impl<'a> MoreDefaults<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { MoreDefaults { _tab: table } } #[allow(unused_mut)] @@ -78,7 +78,7 @@ impl<'a> MoreDefaults<'a> { }; let bools = { let x = self.bools(); - x.to_vec() + x.into_iter().collect() }; MoreDefaultsT { ints, @@ -92,27 +92,45 @@ impl<'a> MoreDefaults<'a> { #[inline] pub fn ints(&self) -> flatbuffers::Vector<'a, i32> { - self._tab.get::>>(MoreDefaults::VT_INTS, Some(Default::default())).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MoreDefaults::VT_INTS, Some(Default::default())).unwrap()} } #[inline] pub fn floats(&self) -> flatbuffers::Vector<'a, f32> { - self._tab.get::>>(MoreDefaults::VT_FLOATS, Some(Default::default())).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MoreDefaults::VT_FLOATS, Some(Default::default())).unwrap()} } #[inline] pub fn empty_string(&self) -> &'a str { - self._tab.get::>(MoreDefaults::VT_EMPTY_STRING, Some(&"")).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(MoreDefaults::VT_EMPTY_STRING, Some(&"")).unwrap()} } #[inline] pub fn some_string(&self) -> &'a str { - self._tab.get::>(MoreDefaults::VT_SOME_STRING, Some(&"some")).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(MoreDefaults::VT_SOME_STRING, Some(&"some")).unwrap()} } #[inline] pub fn abcs(&self) -> flatbuffers::Vector<'a, ABC> { - self._tab.get::>>(MoreDefaults::VT_ABCS, Some(Default::default())).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MoreDefaults::VT_ABCS, Some(Default::default())).unwrap()} } #[inline] - pub fn bools(&self) -> &'a [bool] { - self._tab.get::>>(MoreDefaults::VT_BOOLS, Some(Default::default())).map(|v| v.safe_slice()).unwrap() + pub fn bools(&self) -> flatbuffers::Vector<'a, bool> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MoreDefaults::VT_BOOLS, Some(Default::default())).unwrap()} } } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs index fab8e02000..00cd478d37 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs @@ -13,7 +13,7 @@ public struct TableInNestedNS : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static TableInNestedNS GetRootAsTableInNestedNS(ByteBuffer _bb) { return GetRootAsTableInNestedNS(_bb, new TableInNestedNS()); } public static TableInNestedNS GetRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java index e185e4b447..211d1c4985 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class TableInNestedNS extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb) { return getRootAsTableInNestedNS(_bb, new TableInNestedNS()); } public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt index 0fbbba87c5..4d9c9feaa5 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.kt @@ -32,7 +32,7 @@ class TableInNestedNS : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsTableInNestedNS(_bb: ByteBuffer): TableInNestedNS = getRootAsTableInNestedNS(_bb, TableInNestedNS()) fun getRootAsTableInNestedNS(_bb: ByteBuffer, obj: TableInNestedNS): TableInNestedNS { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.cs b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.cs index 9db2226029..894c29cdb4 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.cs +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.cs @@ -13,7 +13,7 @@ public struct SecondTableInA : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static SecondTableInA GetRootAsSecondTableInA(ByteBuffer _bb) { return GetRootAsSecondTableInA(_bb, new SecondTableInA()); } public static SecondTableInA GetRootAsSecondTableInA(ByteBuffer _bb, SecondTableInA obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.java b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.java index f2e65d4f64..0294af85f0 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.java +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class SecondTableInA extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb) { return getRootAsSecondTableInA(_bb, new SecondTableInA()); } public static SecondTableInA getRootAsSecondTableInA(ByteBuffer _bb, SecondTableInA obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.kt b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.kt index 50d02df5cc..4bcea93c13 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.kt +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/SecondTableInA.kt @@ -27,7 +27,7 @@ class SecondTableInA : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsSecondTableInA(_bb: ByteBuffer): SecondTableInA = getRootAsSecondTableInA(_bb, SecondTableInA()) fun getRootAsSecondTableInA(_bb: ByteBuffer, obj: SecondTableInA): SecondTableInA { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.cs b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.cs index ad72eee482..d3ab94d456 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.cs +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.cs @@ -13,7 +13,7 @@ public struct TableInFirstNS : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb) { return GetRootAsTableInFirstNS(_bb, new TableInFirstNS()); } public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.java b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.java index 809ece2ddb..415f083709 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.java +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class TableInFirstNS extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb) { return getRootAsTableInFirstNS(_bb, new TableInFirstNS()); } public static TableInFirstNS getRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.kt b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.kt index 4ae9368bc7..a5cb7528d2 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.kt +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceA/TableInFirstNS.kt @@ -67,7 +67,7 @@ class TableInFirstNS : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsTableInFirstNS(_bb: ByteBuffer): TableInFirstNS = getRootAsTableInFirstNS(_bb, TableInFirstNS()) fun getRootAsTableInFirstNS(_bb: ByteBuffer, obj: TableInFirstNS): TableInFirstNS { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.cs b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.cs index 50ca3e4a34..4ad9eafde2 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.cs +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.cs @@ -13,7 +13,7 @@ public struct TableInC : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static TableInC GetRootAsTableInC(ByteBuffer _bb) { return GetRootAsTableInC(_bb, new TableInC()); } public static TableInC GetRootAsTableInC(ByteBuffer _bb, TableInC obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.java b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.java index 7af762071d..e139cbbcda 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.java +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class TableInC extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static TableInC getRootAsTableInC(ByteBuffer _bb) { return getRootAsTableInC(_bb, new TableInC()); } public static TableInC getRootAsTableInC(ByteBuffer _bb, TableInC obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.kt b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.kt index b195c6c11b..cc90e58fc4 100644 --- a/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.kt +++ b/third_party/flatbuffers/tests/namespace_test/NamespaceC/TableInC.kt @@ -36,7 +36,7 @@ class TableInC : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsTableInC(_bb: ByteBuffer): TableInC = getRootAsTableInC(_bb, TableInC()) fun getRootAsTableInC(_bb: ByteBuffer, obj: TableInC): TableInC { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/enum_in_nested_ns_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/enum_in_nested_ns_generated.rs index 246d28f5fa..59277bd408 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/enum_in_nested_ns_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/enum_in_nested_ns_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for EnumInNestedNS { impl<'a> flatbuffers::Follow<'a> for EnumInNestedNS { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for EnumInNestedNS { impl flatbuffers::Push for EnumInNestedNS { type Output = EnumInNestedNS; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for EnumInNestedNS { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/struct_in_nested_ns_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/struct_in_nested_ns_generated.rs index dc13b0cfaa..f2a15f4bed 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/struct_in_nested_ns_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/struct_in_nested_ns_generated.rs @@ -28,39 +28,25 @@ impl core::fmt::Debug for StructInNestedNS { } impl flatbuffers::SimpleToVerifyInSlice for StructInNestedNS {} -impl flatbuffers::SafeSliceAccess for StructInNestedNS {} impl<'a> flatbuffers::Follow<'a> for StructInNestedNS { type Inner = &'a StructInNestedNS; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a StructInNestedNS>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a StructInNestedNS { type Inner = &'a StructInNestedNS; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for StructInNestedNS { type Output = StructInNestedNS; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const StructInNestedNS as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b StructInNestedNS { - type Output = StructInNestedNS; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const StructInNestedNS as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const StructInNestedNS as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -92,47 +78,59 @@ impl<'a> StructInNestedNS { } pub fn a(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_a(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } pub fn b(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[4..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_b(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[4..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/table_in_nested_ns_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/table_in_nested_ns_generated.rs index 76744f9f0e..5d6957a010 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/table_in_nested_ns_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/table_in_nested_ns_generated.rs @@ -19,8 +19,8 @@ pub struct TableInNestedNS<'a> { impl<'a> flatbuffers::Follow<'a> for TableInNestedNS<'a> { type Inner = TableInNestedNS<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> TableInNestedNS<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableInNestedNS { _tab: table } } #[allow(unused_mut)] @@ -54,7 +54,10 @@ impl<'a> TableInNestedNS<'a> { #[inline] pub fn foo(&self) -> i32 { - self._tab.get::(TableInNestedNS::VT_FOO, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TableInNestedNS::VT_FOO, Some(0)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/union_in_nested_ns_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/union_in_nested_ns_generated.rs index a77108f289..4256cc88ec 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/union_in_nested_ns_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/namespace_b/union_in_nested_ns_generated.rs @@ -55,10 +55,8 @@ impl core::fmt::Debug for UnionInNestedNS { impl<'a> flatbuffers::Follow<'a> for UnionInNestedNS { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -66,21 +64,21 @@ impl<'a> flatbuffers::Follow<'a> for UnionInNestedNS { impl flatbuffers::Push for UnionInNestedNS { type Output = UnionInNestedNS; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for UnionInNestedNS { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/second_table_in_a_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/second_table_in_a_generated.rs index c32fdc0c1f..92b11c9b12 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/second_table_in_a_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/second_table_in_a_generated.rs @@ -19,8 +19,8 @@ pub struct SecondTableInA<'a> { impl<'a> flatbuffers::Follow<'a> for SecondTableInA<'a> { type Inner = SecondTableInA<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> SecondTableInA<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { SecondTableInA { _tab: table } } #[allow(unused_mut)] @@ -56,7 +56,10 @@ impl<'a> SecondTableInA<'a> { #[inline] pub fn refer_to_c(&self) -> Option> { - self._tab.get::>(SecondTableInA::VT_REFER_TO_C, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SecondTableInA::VT_REFER_TO_C, None)} } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_a/table_in_first_ns_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_a/table_in_first_ns_generated.rs index ab46d7e6ad..b7bd1c7112 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_a/table_in_first_ns_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_a/table_in_first_ns_generated.rs @@ -19,8 +19,8 @@ pub struct TableInFirstNS<'a> { impl<'a> flatbuffers::Follow<'a> for TableInFirstNS<'a> { type Inner = TableInFirstNS<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -36,7 +36,7 @@ impl<'a> TableInFirstNS<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableInFirstNS { _tab: table } } #[allow(unused_mut)] @@ -80,29 +80,49 @@ impl<'a> TableInFirstNS<'a> { #[inline] pub fn foo_table(&self) -> Option> { - self._tab.get::>(TableInFirstNS::VT_FOO_TABLE, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableInFirstNS::VT_FOO_TABLE, None)} } #[inline] pub fn foo_enum(&self) -> namespace_b::EnumInNestedNS { - self._tab.get::(TableInFirstNS::VT_FOO_ENUM, Some(namespace_b::EnumInNestedNS::A)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TableInFirstNS::VT_FOO_ENUM, Some(namespace_b::EnumInNestedNS::A)).unwrap()} } #[inline] pub fn foo_union_type(&self) -> namespace_b::UnionInNestedNS { - self._tab.get::(TableInFirstNS::VT_FOO_UNION_TYPE, Some(namespace_b::UnionInNestedNS::NONE)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TableInFirstNS::VT_FOO_UNION_TYPE, Some(namespace_b::UnionInNestedNS::NONE)).unwrap()} } #[inline] pub fn foo_union(&self) -> Option> { - self._tab.get::>>(TableInFirstNS::VT_FOO_UNION, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(TableInFirstNS::VT_FOO_UNION, None)} } #[inline] pub fn foo_struct(&self) -> Option<&'a namespace_b::StructInNestedNS> { - self._tab.get::(TableInFirstNS::VT_FOO_STRUCT, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TableInFirstNS::VT_FOO_STRUCT, None)} } #[inline] #[allow(non_snake_case)] pub fn foo_union_as_table_in_nested_ns(&self) -> Option> { if self.foo_union_type() == namespace_b::UnionInNestedNS::TableInNestedNS { - self.foo_union().map(namespace_b::TableInNestedNS::init_from_table) + self.foo_union().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { namespace_b::TableInNestedNS::init_from_table(t) } + }) } else { None } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_c/table_in_c_generated.rs b/third_party/flatbuffers/tests/namespace_test/namespace_c/table_in_c_generated.rs index a6ba7bfae6..63b84d113d 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_c/table_in_c_generated.rs +++ b/third_party/flatbuffers/tests/namespace_test/namespace_c/table_in_c_generated.rs @@ -19,8 +19,8 @@ pub struct TableInC<'a> { impl<'a> flatbuffers::Follow<'a> for TableInC<'a> { type Inner = TableInC<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -33,7 +33,7 @@ impl<'a> TableInC<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { TableInC { _tab: table } } #[allow(unused_mut)] @@ -62,11 +62,17 @@ impl<'a> TableInC<'a> { #[inline] pub fn refer_to_a1(&self) -> Option> { - self._tab.get::>(TableInC::VT_REFER_TO_A1, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableInC::VT_REFER_TO_A1, None)} } #[inline] pub fn refer_to_a2(&self) -> Option> { - self._tab.get::>(TableInC::VT_REFER_TO_A2, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(TableInC::VT_REFER_TO_A2, None)} } } diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_test1_generated.h b/third_party/flatbuffers/tests/namespace_test/namespace_test1_generated.h index c2af28eb25..da40591a7e 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_test1_generated.h +++ b/third_party/flatbuffers/tests/namespace_test/namespace_test1_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace NamespaceA { diff --git a/third_party/flatbuffers/tests/namespace_test/namespace_test2_generated.h b/third_party/flatbuffers/tests/namespace_test/namespace_test2_generated.h index 85dc12fd88..3d55c5e3cd 100644 --- a/third_party/flatbuffers/tests/namespace_test/namespace_test2_generated.h +++ b/third_party/flatbuffers/tests/namespace_test/namespace_test2_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace NamespaceA { diff --git a/third_party/flatbuffers/tests/native_inline_table_test_generated.h b/third_party/flatbuffers/tests/native_inline_table_test_generated.h index 950266308c..80626b888d 100644 --- a/third_party/flatbuffers/tests/native_inline_table_test_generated.h +++ b/third_party/flatbuffers/tests/native_inline_table_test_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); struct NativeInlineTable; diff --git a/third_party/flatbuffers/tests/native_type_test_generated.h b/third_party/flatbuffers/tests/native_type_test_generated.h index 63304f14fa..766286210f 100644 --- a/third_party/flatbuffers/tests/native_type_test_generated.h +++ b/third_party/flatbuffers/tests/native_type_test_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); #include "native_type_test_impl.h" diff --git a/third_party/flatbuffers/tests/nested_namespace_test/nested_namespace_test3_generated.cs b/third_party/flatbuffers/tests/nested_namespace_test/nested_namespace_test3_generated.cs index 85040c5f9c..b59013c2d0 100644 --- a/third_party/flatbuffers/tests/nested_namespace_test/nested_namespace_test3_generated.cs +++ b/third_party/flatbuffers/tests/nested_namespace_test/nested_namespace_test3_generated.cs @@ -13,7 +13,7 @@ public struct ColorTestTable : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static ColorTestTable GetRootAsColorTestTable(ByteBuffer _bb) { return GetRootAsColorTestTable(_bb, new ColorTestTable()); } public static ColorTestTable GetRootAsColorTestTable(ByteBuffer _bb, ColorTestTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/nested_union_test.fbs b/third_party/flatbuffers/tests/nested_union_test.fbs new file mode 100644 index 0000000000..daa6048b56 --- /dev/null +++ b/third_party/flatbuffers/tests/nested_union_test.fbs @@ -0,0 +1,36 @@ +namespace MyGame.Example.NestedUnion; + +/// Composite components of Monster color. +enum Color:ubyte (bit_flags) { + Red = 0, // color Red = (1u << 0) + /// \brief color Green + /// Green is bit_flag with value (1u << 1) + Green, + /// \brief color Blue (1u << 3) + Blue = 3, +} + +table TestSimpleTableWithEnum (csharp_partial, private) { + color: Color = Green; +} + +struct Test { a:short; b:byte; } + +table Vec3 { + x:double; + y:double; + z:double; + test1:double; + test2:Color; + test3:Test; +} + +union Any { Vec3, TestSimpleTableWithEnum } + +table NestedUnionTest { + name:string; + data:Any; + id:short; +} + +root_type NestedUnionTest; \ No newline at end of file diff --git a/third_party/flatbuffers/tests/nim/testnim.py b/third_party/flatbuffers/tests/nim/testnim.py new file mode 100644 index 0000000000..2a54cf3d34 --- /dev/null +++ b/third_party/flatbuffers/tests/nim/testnim.py @@ -0,0 +1,22 @@ +import glob +import os +import shutil +import subprocess +from pathlib import Path + +test_nim_dir = Path(__file__).absolute().parent +test_dir = test_nim_dir.parent + + +def main(): + try: + subprocess.check_call("testament --megatest:off all".split()) + finally: + shutil.rmtree(test_nim_dir / "nimcache") + shutil.rmtree(test_nim_dir / "testresults") + for f in glob.glob(str(test_nim_dir / "tests" / "*" / "test")): + os.remove(f) + + +if __name__ == "__main__": + main() diff --git a/third_party/flatbuffers/tests/nim/tests/moredefaults/test.nim b/third_party/flatbuffers/tests/nim/tests/moredefaults/test.nim new file mode 100644 index 0000000000..b49dc169dc --- /dev/null +++ b/third_party/flatbuffers/tests/nim/tests/moredefaults/test.nim @@ -0,0 +1,27 @@ +discard """ + action: "run" + exitcode: 0 + timeout: 60.0 +""" +import std/unittest +import flatbuffers +import ../../../MoreDefaults + +suite "TestMoreDefaults": + + test "testFlatbuffersObject": + var fbb = newBuilder(0) + fbb.MoreDefaultsStart() + let root = fbb.MoreDefaultsEnd() + fbb.Finish(root) + + var defaults: MoreDefaults + defaults.GetRootAs(fbb.FinishedBytes(), 0) + check(defaults.emptyString == "") + check(defaults.ints == []) + check(defaults.floats == []) + check(defaults.bools == []) + check(defaults.intsLength == 0) + check(defaults.floatsLength == 0) + check(defaults.abcsLength == 0) + check(defaults.boolsLength == 0) diff --git a/third_party/flatbuffers/tests/nim/tests/mutatingbool/test.nim b/third_party/flatbuffers/tests/nim/tests/mutatingbool/test.nim new file mode 100644 index 0000000000..b079cbf484 --- /dev/null +++ b/third_party/flatbuffers/tests/nim/tests/mutatingbool/test.nim @@ -0,0 +1,39 @@ +discard """ + action: "run" + exitcode: 0 + timeout: 60.0 +""" +import std/unittest +import std/options +import flatbuffers +import ../../../TestMutatingBool +import ../../../Property + +suite "TestMutatingBool": + + test "MutatingBool": + var builder = newBuilder(1024) + builder.TestMutatingBoolStart() + builder.TestMutatingBoolAddB(builder.PropertyCreate(false)) + let root = builder.TestMutatingBoolEnd() + builder.Finish(root) + + var test_mutating_bool: TestMutatingBool + GetRootAs(test_mutating_bool, builder.FinishedBytes(), 0) + check(test_mutating_bool.b.isSome) + var prop2 = test_mutating_bool.b.get() + check(prop2.property == false) + discard (prop2.property = false) + check(prop2.property == false) + discard (prop2.property = true) + check(prop2.property == true) + + test "EmptyBool": + var builder = newBuilder(1024) + builder.TestMutatingBoolStart() + let root = builder.TestMutatingBoolEnd() + builder.Finish(root) + + var test_mutating_bool: TestMutatingBool + GetRootAs(test_mutating_bool, builder.FinishedBytes(), 0) + check(test_mutating_bool.b.isNone) diff --git a/third_party/flatbuffers/tests/nim/tests/mygame/test.nim b/third_party/flatbuffers/tests/nim/tests/mygame/test.nim new file mode 100644 index 0000000000..c971d6079d --- /dev/null +++ b/third_party/flatbuffers/tests/nim/tests/mygame/test.nim @@ -0,0 +1,207 @@ +discard """ + action: "run" + exitcode: 0 + timeout: 60.0 +""" +import std/unittest +import std/options +import flatbuffers +import ../../../MyGame/Example/Test +import ../../../MyGame/Example/Monster +import ../../../MyGame/Example/Vec3 +import ../../../MyGame/Example/Color as ColorMod +import ../../../MyGame/Example/Any as AnyMod + +proc verifyMonster(monster: var Monster) = + check(monster.hp == 80) + check(monster.mana == 150) + check(monster.name == "MyMonster") + check(monster.pos.isSome) + let pos = monster.pos.get() + check(pos.x == 1) + check(pos.y == 2) + check(pos.z == 3) + check(pos.test1 == 3) + check(pos.test2 == Color.Green) + check(pos.test3.a == 5) + check(pos.test3.b == 6) + check(monster.testType == Any.Monster) + check(monster.test.isSome) + let monster2 = Monster(tab: monster.test.get()) + check(monster2.name == "Fred") + check((monster.mana = 10) == false) + check(monster.mana == 150) + check(monster.inventoryLength == 5) + var sum: uint8 = 0 + for item in monster.inventory: + sum += item + check(sum == 10) + check(monster.test4Length == 2) + + let test0 = monster.test4(0) + let test1 = monster.test4(1) + var sum0 = test0.a + test0.b + var sum1 = test1.a + test1.b + check(sum0 + sum1 == 100) + + check(monster.testarrayofstringLength == 2) + check(monster.testarrayofstring(0) == "test1") + check(monster.testarrayofstring(1) == "test2") + check(monster.testbool == true) + + +suite "TestMyGame": + + test "testData": + let data: seq[byte] = @[byte(48), 0, 0, 0, 77, 79, 78, 83, 0, 0, 0, 0, 36, + 0, 72, 0, 40, 0, 0, 0, 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, + 16, 0, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 164, 0, 0, 0, + 0, 0, 0, 1, 60, 0, 0, 0, 68, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 1, 88, 0, 0, + 0, 120, 0, 0, 0, 0, 0, 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 2, 0, 0, 0, + 64, 0, 0, 0, 48, 0, 0, 0, 2, 0, 0, 0, 30, 0, 40, 0, 10, 0, 20, 0, 152, + 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, 70, 114, 101, 100, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 50, 0, + 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, + 77, 111, 110, 115, 116, 101, 114, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 36, + 0, 0, 0, 4, 0, 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, + 255, 36, 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, + 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, + 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0] + var monster: Monster + GetRootAs(monster, data, 0) + verifyMonster(monster) + + test "testCreateString": + var fbb = newBuilder(0) + let name = fbb.Create("Frodo") + fbb.Finish(name) + check(fbb.FinishedBytes() == @[byte(4), 0, 0, 0, 5, 0, 0, 0, 70, 114, 111, + 100, 111, 0, 0, 0]) + + test "testCreateVector": + var fbb = newBuilder(0) + let vec = fbb.Create(@[byte(0), 1, 2, 3, 4]) + fbb.Finish(vec) + check(fbb.FinishedBytes() == @[byte(4), 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, + 0, 0, 0]) + + test "createSimpleMonster": + var fbb = newBuilder(0) + let names = [ + fbb.Create("Frodo"), + fbb.Create("Barney"), + fbb.Create("Wilma"), + ] + fbb.MonsterStart() + fbb.MonsterAddName(names[0]) + let monster = fbb.MonsterEnd() + fbb.Finish(monster) + check(fbb.FinishedBytes() == @[byte(16), 0, 0, 0, 12, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, 0, 87, 105, 108, 109, 97, + 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, 121, 0, 0, 5, 0, 0, 0, 70, + 114, 111, 100, 111, 0, 0, 0]) + + test "testCreateTestVector": + var fbb = newBuilder(0) + fbb.MonsterStartTest4Vector(2) + discard fbb.TestCreate(a = 30, b = 40) + discard fbb.TestCreate(a = 10, b = 20) + let test4 = fbb.EndVector() + fbb.Finish(test4) + check(fbb.FinishedBytes() == @[byte(4), 0, 0, 0, 2, 0, 0, 0, 10, 0, 20, 0, + 30, 0, 40, 0]) + + test "testTableWithStruct": + var fbb = newBuilder(0) + fbb.MonsterStart() + fbb.MonsterAddPos(fbb.Vec3Create(x = 1, + y = 2, + z = 3, + test1 = 3, + test2 = Color.Green, + test3_a = 5, test3_b = 6)) + + let monster_end = fbb.MonsterEnd() + fbb.Finish(monster_end) + check(fbb.FinishedBytes() == @[byte(12), 0, 0, 0, 0, 0, 6, 0, 36, 0, 4, 0, + 6, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0]) + + test "testCreateMonster": + var fbb = newBuilder(0) + let names = [ + fbb.Create("Frodo"), + fbb.Create("Barney"), + fbb.Create("Wilma"), + ] + + var offsets: seq[uoffset] = @[] + fbb.MonsterStart() + fbb.MonsterAddName(names[0]) + offsets.add(fbb.MonsterEnd()) + fbb.MonsterStart() + fbb.MonsterAddName(names[1]) + offsets.add(fbb.MonsterEnd()) + fbb.MonsterStart() + fbb.MonsterAddName(names[2]) + offsets.add(fbb.MonsterEnd()) + + let str = fbb.Create("MyMonster") + let test1 = fbb.Create("test1") + let test2 = fbb.Create("test2") + let inv = fbb.Create(@[byte(0), 1, 2, 3, 4]) + let fred = fbb.Create("Fred") + fbb.MonsterStart() + fbb.MonsterAddName(fred) + let mon2 = fbb.MonsterEnd() + + fbb.MonsterStartTest4Vector(2) + discard fbb.TestCreate(a = 30, b = 40) + discard fbb.TestCreate(a = 10, b = 20) + let test4 = fbb.EndVector() + + fbb.MonsterStartTestarrayofstringVector(2) + fbb.PrependOffsetRelative(test1) + fbb.PrependOffsetRelative(test2) + let stringTestVector = fbb.EndVector() + + fbb.MonsterStartTestarrayoftablesVector(3) + fbb.PrependOffsetRelative(offsets[0]) + fbb.PrependOffsetRelative(offsets[1]) + fbb.PrependOffsetRelative(offsets[2]) + let tableTestVector = fbb.EndVector() + + fbb.MonsterStart() + fbb.MonsterAddPos(fbb.Vec3Create(x = 1, + y = 2, + z = 3, + test1 = 3, + test2 = Color.Green, + test3_a = 5, test3_b = 6)) + fbb.MonsterAddHp(80) + fbb.MonsterAddName(str) + fbb.MonsterAddInventory(inv) + fbb.MonsterAddTestType(Any.Monster.uint8) + fbb.MonsterAddTest(mon2) + fbb.MonsterAddTest4(test4) + fbb.MonsterAddTestarrayofstring(stringTestVector) + fbb.MonsterAddTestbool(true) + fbb.MonsterAddTestarrayoftables(tableTestVector) + let monster_end = fbb.MonsterEnd() + fbb.Finish(monster_end) + check(fbb.FinishedBytes() == @[byte(40), 0, 0, 0, 36, 0, 72, 0, 40, 0, 0, 0, + 38, 0, 32, 0, 0, 0, 28, 0, 0, 0, 27, 0, 20, 0, 16, 0, 12, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 36, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 1, 76, 0, 0, 0, + 84, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 1, 104, 0, 0, 0, 136, 0, 0, 0, 0, 0, + 80, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 64, 2, 0, 5, 0, 6, 0, 0, 0, 3, 0, 0, 0, 108, 0, 0, 0, 112, 0, + 0, 0, 128, 0, 0, 0, 2, 0, 0, 0, 52, 0, 0, 0, 60, 0, 0, 0, 2, 0, 0, 0, + 10, 0, 20, 0, 30, 0, 40, 0, 168, 255, 255, 255, 4, 0, 0, 0, 4, 0, 0, 0, + 70, 114, 101, 100, 0, 0, 0, 0, 5, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 5, 0, + 0, 0, 116, 101, 115, 116, 50, 0, 0, 0, 5, 0, 0, 0, 116, 101, 115, 116, + 49, 0, 0, 0, 9, 0, 0, 0, 77, 121, 77, 111, 110, 115, 116, 101, 114, 0, + 0, 0, 240, 255, 255, 255, 32, 0, 0, 0, 248, 255, 255, 255, 36, 0, 0, 0, + 12, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 28, 0, 0, 0, 5, 0, 0, + 0, 87, 105, 108, 109, 97, 0, 0, 0, 6, 0, 0, 0, 66, 97, 114, 110, 101, + 121, 0, 0, 5, 0, 0, 0, 70, 114, 111, 100, 111, 0, 0, 0]) diff --git a/third_party/flatbuffers/tests/nim/tests/optional_scalars/test.nim b/third_party/flatbuffers/tests/nim/tests/optional_scalars/test.nim new file mode 100644 index 0000000000..1e02c59e05 --- /dev/null +++ b/third_party/flatbuffers/tests/nim/tests/optional_scalars/test.nim @@ -0,0 +1,29 @@ +discard """ + action: "run" + exitcode: 0 + timeout: 60.0 +""" +import std/unittest +import std/options +import flatbuffers +import ../../../optional_scalars/ScalarStuff + + +suite "TestOptionalScalars": + + test "OptionalScalars": + var builder = newBuilder(1024) + builder.ScalarStuffStart() + let root = builder.ScalarStuffEnd() + builder.Finish(root) + + var optionals: ScalarStuff + optionals.GetRootAs(builder.FinishedBytes(), 0) + + # Creates a flatbuffer with optional values. + check(optionals.justI8 == 0) + check(optionals.maybeF32.isNone) + check(optionals.defaultBool == true) + check(optionals.justU16 == 0) + check(optionals.maybeEnum.isNone) + check(optionals.defaultU64 == 42) diff --git a/third_party/flatbuffers/tests/optional_scalars/OptionalByte.nim b/third_party/flatbuffers/tests/optional_scalars/OptionalByte.nim new file mode 100644 index 0000000000..8a4e23c8dd --- /dev/null +++ b/third_party/flatbuffers/tests/optional_scalars/OptionalByte.nim @@ -0,0 +1,14 @@ +#[ optional_scalars.OptionalByte + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : optional_scalars.ScalarStuff () +]# + +type OptionalByte*{.pure.} = enum + None = 0.int8, + One = 1.int8, + Two = 2.int8, diff --git a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.cs b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.cs index 85c1672502..f1a6517480 100644 --- a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.cs +++ b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.cs @@ -13,7 +13,7 @@ public struct ScalarStuff : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static ScalarStuff GetRootAsScalarStuff(ByteBuffer _bb) { return GetRootAsScalarStuff(_bb, new ScalarStuff()); } public static ScalarStuff GetRootAsScalarStuff(ByteBuffer _bb, ScalarStuff obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public static bool ScalarStuffBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "NULL"); } diff --git a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.java b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.java index f4890b10e2..f8adf64dd0 100644 --- a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.java +++ b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.java @@ -9,7 +9,7 @@ @SuppressWarnings("unused") public final class ScalarStuff extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static ScalarStuff getRootAsScalarStuff(ByteBuffer _bb) { return getRootAsScalarStuff(_bb, new ScalarStuff()); } public static ScalarStuff getRootAsScalarStuff(ByteBuffer _bb, ScalarStuff obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public static boolean ScalarStuffBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "NULL"); } diff --git a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.kt b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.kt index e9067bb22a..22d179614e 100644 --- a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.kt +++ b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.kt @@ -197,7 +197,7 @@ class ScalarStuff : Table() { return if(o != 0) bb.get(o + bb_pos) else 1 } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsScalarStuff(_bb: ByteBuffer): ScalarStuff = getRootAsScalarStuff(_bb, ScalarStuff()) fun getRootAsScalarStuff(_bb: ByteBuffer, obj: ScalarStuff): ScalarStuff { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.nim b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.nim new file mode 100644 index 0000000000..6df14036ce --- /dev/null +++ b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.nim @@ -0,0 +1,331 @@ +#[ optional_scalars.ScalarStuff + Automatically generated by the FlatBuffers compiler, do not modify. + Or modify. I'm a message, not a cop. + + flatc version: 22.10.26 + + Declared by : + Rooting type : optional_scalars.ScalarStuff () +]# + +import OptionalByte as optional_scalars_OptionalByte +import flatbuffers +import std/options + +type ScalarStuff* = object of FlatObj +func justI8*(self: ScalarStuff): int8 = + let o = self.tab.Offset(4) + if o != 0: + return Get[int8](self.tab, self.tab.Pos + o) + return 0 +func `justI8=`*(self: var ScalarStuff, n: int8): bool = + return self.tab.MutateSlot(4, n) +func maybeI8*(self: ScalarStuff): Option[int8] = + let o = self.tab.Offset(6) + if o != 0: + return some(Get[int8](self.tab, self.tab.Pos + o)) +func `maybeI8=`*(self: var ScalarStuff, n: Option[int8]): bool = + return self.tab.MutateSlot(6, n) +func defaultI8*(self: ScalarStuff): int8 = + let o = self.tab.Offset(8) + if o != 0: + return Get[int8](self.tab, self.tab.Pos + o) + return 42 +func `defaultI8=`*(self: var ScalarStuff, n: int8): bool = + return self.tab.MutateSlot(8, n) +func justU8*(self: ScalarStuff): uint8 = + let o = self.tab.Offset(10) + if o != 0: + return Get[uint8](self.tab, self.tab.Pos + o) + return 0 +func `justU8=`*(self: var ScalarStuff, n: uint8): bool = + return self.tab.MutateSlot(10, n) +func maybeU8*(self: ScalarStuff): Option[uint8] = + let o = self.tab.Offset(12) + if o != 0: + return some(Get[uint8](self.tab, self.tab.Pos + o)) +func `maybeU8=`*(self: var ScalarStuff, n: Option[uint8]): bool = + return self.tab.MutateSlot(12, n) +func defaultU8*(self: ScalarStuff): uint8 = + let o = self.tab.Offset(14) + if o != 0: + return Get[uint8](self.tab, self.tab.Pos + o) + return 42 +func `defaultU8=`*(self: var ScalarStuff, n: uint8): bool = + return self.tab.MutateSlot(14, n) +func justI16*(self: ScalarStuff): int16 = + let o = self.tab.Offset(16) + if o != 0: + return Get[int16](self.tab, self.tab.Pos + o) + return 0 +func `justI16=`*(self: var ScalarStuff, n: int16): bool = + return self.tab.MutateSlot(16, n) +func maybeI16*(self: ScalarStuff): Option[int16] = + let o = self.tab.Offset(18) + if o != 0: + return some(Get[int16](self.tab, self.tab.Pos + o)) +func `maybeI16=`*(self: var ScalarStuff, n: Option[int16]): bool = + return self.tab.MutateSlot(18, n) +func defaultI16*(self: ScalarStuff): int16 = + let o = self.tab.Offset(20) + if o != 0: + return Get[int16](self.tab, self.tab.Pos + o) + return 42 +func `defaultI16=`*(self: var ScalarStuff, n: int16): bool = + return self.tab.MutateSlot(20, n) +func justU16*(self: ScalarStuff): uint16 = + let o = self.tab.Offset(22) + if o != 0: + return Get[uint16](self.tab, self.tab.Pos + o) + return 0 +func `justU16=`*(self: var ScalarStuff, n: uint16): bool = + return self.tab.MutateSlot(22, n) +func maybeU16*(self: ScalarStuff): Option[uint16] = + let o = self.tab.Offset(24) + if o != 0: + return some(Get[uint16](self.tab, self.tab.Pos + o)) +func `maybeU16=`*(self: var ScalarStuff, n: Option[uint16]): bool = + return self.tab.MutateSlot(24, n) +func defaultU16*(self: ScalarStuff): uint16 = + let o = self.tab.Offset(26) + if o != 0: + return Get[uint16](self.tab, self.tab.Pos + o) + return 42 +func `defaultU16=`*(self: var ScalarStuff, n: uint16): bool = + return self.tab.MutateSlot(26, n) +func justI32*(self: ScalarStuff): int32 = + let o = self.tab.Offset(28) + if o != 0: + return Get[int32](self.tab, self.tab.Pos + o) + return 0 +func `justI32=`*(self: var ScalarStuff, n: int32): bool = + return self.tab.MutateSlot(28, n) +func maybeI32*(self: ScalarStuff): Option[int32] = + let o = self.tab.Offset(30) + if o != 0: + return some(Get[int32](self.tab, self.tab.Pos + o)) +func `maybeI32=`*(self: var ScalarStuff, n: Option[int32]): bool = + return self.tab.MutateSlot(30, n) +func defaultI32*(self: ScalarStuff): int32 = + let o = self.tab.Offset(32) + if o != 0: + return Get[int32](self.tab, self.tab.Pos + o) + return 42 +func `defaultI32=`*(self: var ScalarStuff, n: int32): bool = + return self.tab.MutateSlot(32, n) +func justU32*(self: ScalarStuff): uint32 = + let o = self.tab.Offset(34) + if o != 0: + return Get[uint32](self.tab, self.tab.Pos + o) + return 0 +func `justU32=`*(self: var ScalarStuff, n: uint32): bool = + return self.tab.MutateSlot(34, n) +func maybeU32*(self: ScalarStuff): Option[uint32] = + let o = self.tab.Offset(36) + if o != 0: + return some(Get[uint32](self.tab, self.tab.Pos + o)) +func `maybeU32=`*(self: var ScalarStuff, n: Option[uint32]): bool = + return self.tab.MutateSlot(36, n) +func defaultU32*(self: ScalarStuff): uint32 = + let o = self.tab.Offset(38) + if o != 0: + return Get[uint32](self.tab, self.tab.Pos + o) + return 42 +func `defaultU32=`*(self: var ScalarStuff, n: uint32): bool = + return self.tab.MutateSlot(38, n) +func justI64*(self: ScalarStuff): int64 = + let o = self.tab.Offset(40) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 0 +func `justI64=`*(self: var ScalarStuff, n: int64): bool = + return self.tab.MutateSlot(40, n) +func maybeI64*(self: ScalarStuff): Option[int64] = + let o = self.tab.Offset(42) + if o != 0: + return some(Get[int64](self.tab, self.tab.Pos + o)) +func `maybeI64=`*(self: var ScalarStuff, n: Option[int64]): bool = + return self.tab.MutateSlot(42, n) +func defaultI64*(self: ScalarStuff): int64 = + let o = self.tab.Offset(44) + if o != 0: + return Get[int64](self.tab, self.tab.Pos + o) + return 42 +func `defaultI64=`*(self: var ScalarStuff, n: int64): bool = + return self.tab.MutateSlot(44, n) +func justU64*(self: ScalarStuff): uint64 = + let o = self.tab.Offset(46) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 0 +func `justU64=`*(self: var ScalarStuff, n: uint64): bool = + return self.tab.MutateSlot(46, n) +func maybeU64*(self: ScalarStuff): Option[uint64] = + let o = self.tab.Offset(48) + if o != 0: + return some(Get[uint64](self.tab, self.tab.Pos + o)) +func `maybeU64=`*(self: var ScalarStuff, n: Option[uint64]): bool = + return self.tab.MutateSlot(48, n) +func defaultU64*(self: ScalarStuff): uint64 = + let o = self.tab.Offset(50) + if o != 0: + return Get[uint64](self.tab, self.tab.Pos + o) + return 42 +func `defaultU64=`*(self: var ScalarStuff, n: uint64): bool = + return self.tab.MutateSlot(50, n) +func justF32*(self: ScalarStuff): float32 = + let o = self.tab.Offset(52) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 0.0 +func `justF32=`*(self: var ScalarStuff, n: float32): bool = + return self.tab.MutateSlot(52, n) +func maybeF32*(self: ScalarStuff): Option[float32] = + let o = self.tab.Offset(54) + if o != 0: + return some(Get[float32](self.tab, self.tab.Pos + o)) +func `maybeF32=`*(self: var ScalarStuff, n: Option[float32]): bool = + return self.tab.MutateSlot(54, n) +func defaultF32*(self: ScalarStuff): float32 = + let o = self.tab.Offset(56) + if o != 0: + return Get[float32](self.tab, self.tab.Pos + o) + return 42.0 +func `defaultF32=`*(self: var ScalarStuff, n: float32): bool = + return self.tab.MutateSlot(56, n) +func justF64*(self: ScalarStuff): float64 = + let o = self.tab.Offset(58) + if o != 0: + return Get[float64](self.tab, self.tab.Pos + o) + return 0.0 +func `justF64=`*(self: var ScalarStuff, n: float64): bool = + return self.tab.MutateSlot(58, n) +func maybeF64*(self: ScalarStuff): Option[float64] = + let o = self.tab.Offset(60) + if o != 0: + return some(Get[float64](self.tab, self.tab.Pos + o)) +func `maybeF64=`*(self: var ScalarStuff, n: Option[float64]): bool = + return self.tab.MutateSlot(60, n) +func defaultF64*(self: ScalarStuff): float64 = + let o = self.tab.Offset(62) + if o != 0: + return Get[float64](self.tab, self.tab.Pos + o) + return 42.0 +func `defaultF64=`*(self: var ScalarStuff, n: float64): bool = + return self.tab.MutateSlot(62, n) +func justBool*(self: ScalarStuff): bool = + let o = self.tab.Offset(64) + if o != 0: + return Get[bool](self.tab, self.tab.Pos + o) + return false +func `justBool=`*(self: var ScalarStuff, n: bool): bool = + return self.tab.MutateSlot(64, n) +func maybeBool*(self: ScalarStuff): Option[bool] = + let o = self.tab.Offset(66) + if o != 0: + return some(Get[bool](self.tab, self.tab.Pos + o)) +func `maybeBool=`*(self: var ScalarStuff, n: Option[bool]): bool = + return self.tab.MutateSlot(66, n) +func defaultBool*(self: ScalarStuff): bool = + let o = self.tab.Offset(68) + if o != 0: + return Get[bool](self.tab, self.tab.Pos + o) + return true +func `defaultBool=`*(self: var ScalarStuff, n: bool): bool = + return self.tab.MutateSlot(68, n) +func justEnum*(self: ScalarStuff): optional_scalars_OptionalByte.OptionalByte = + let o = self.tab.Offset(70) + if o != 0: + return optional_scalars_OptionalByte.OptionalByte(Get[int8](self.tab, self.tab.Pos + o)) + return type(result)(0) +func `justEnum=`*(self: var ScalarStuff, n: optional_scalars_OptionalByte.OptionalByte): bool = + return self.tab.MutateSlot(70, n) +func maybeEnum*(self: ScalarStuff): Option[optional_scalars_OptionalByte.OptionalByte] = + let o = self.tab.Offset(72) + if o != 0: + return some(optional_scalars_OptionalByte.OptionalByte(Get[int8](self.tab, self.tab.Pos + o))) +func `maybeEnum=`*(self: var ScalarStuff, n: Option[optional_scalars_OptionalByte.OptionalByte]): bool = + return self.tab.MutateSlot(72, n) +func defaultEnum*(self: ScalarStuff): optional_scalars_OptionalByte.OptionalByte = + let o = self.tab.Offset(74) + if o != 0: + return optional_scalars_OptionalByte.OptionalByte(Get[int8](self.tab, self.tab.Pos + o)) + return type(result)(1) +func `defaultEnum=`*(self: var ScalarStuff, n: optional_scalars_OptionalByte.OptionalByte): bool = + return self.tab.MutateSlot(74, n) +proc ScalarStuffStart*(builder: var Builder) = + builder.StartObject(36) +proc ScalarStuffAddjustI8*(builder: var Builder, justI8: int8) = + builder.PrependSlot(0, justI8, default(int8)) +proc ScalarStuffAddmaybeI8*(builder: var Builder, maybeI8: int8) = + builder.PrependSlot(1, maybeI8, default(int8)) +proc ScalarStuffAdddefaultI8*(builder: var Builder, defaultI8: int8) = + builder.PrependSlot(2, defaultI8, default(int8)) +proc ScalarStuffAddjustU8*(builder: var Builder, justU8: uint8) = + builder.PrependSlot(3, justU8, default(uint8)) +proc ScalarStuffAddmaybeU8*(builder: var Builder, maybeU8: uint8) = + builder.PrependSlot(4, maybeU8, default(uint8)) +proc ScalarStuffAdddefaultU8*(builder: var Builder, defaultU8: uint8) = + builder.PrependSlot(5, defaultU8, default(uint8)) +proc ScalarStuffAddjustI16*(builder: var Builder, justI16: int16) = + builder.PrependSlot(6, justI16, default(int16)) +proc ScalarStuffAddmaybeI16*(builder: var Builder, maybeI16: int16) = + builder.PrependSlot(7, maybeI16, default(int16)) +proc ScalarStuffAdddefaultI16*(builder: var Builder, defaultI16: int16) = + builder.PrependSlot(8, defaultI16, default(int16)) +proc ScalarStuffAddjustU16*(builder: var Builder, justU16: uint16) = + builder.PrependSlot(9, justU16, default(uint16)) +proc ScalarStuffAddmaybeU16*(builder: var Builder, maybeU16: uint16) = + builder.PrependSlot(10, maybeU16, default(uint16)) +proc ScalarStuffAdddefaultU16*(builder: var Builder, defaultU16: uint16) = + builder.PrependSlot(11, defaultU16, default(uint16)) +proc ScalarStuffAddjustI32*(builder: var Builder, justI32: int32) = + builder.PrependSlot(12, justI32, default(int32)) +proc ScalarStuffAddmaybeI32*(builder: var Builder, maybeI32: int32) = + builder.PrependSlot(13, maybeI32, default(int32)) +proc ScalarStuffAdddefaultI32*(builder: var Builder, defaultI32: int32) = + builder.PrependSlot(14, defaultI32, default(int32)) +proc ScalarStuffAddjustU32*(builder: var Builder, justU32: uint32) = + builder.PrependSlot(15, justU32, default(uint32)) +proc ScalarStuffAddmaybeU32*(builder: var Builder, maybeU32: uint32) = + builder.PrependSlot(16, maybeU32, default(uint32)) +proc ScalarStuffAdddefaultU32*(builder: var Builder, defaultU32: uint32) = + builder.PrependSlot(17, defaultU32, default(uint32)) +proc ScalarStuffAddjustI64*(builder: var Builder, justI64: int64) = + builder.PrependSlot(18, justI64, default(int64)) +proc ScalarStuffAddmaybeI64*(builder: var Builder, maybeI64: int64) = + builder.PrependSlot(19, maybeI64, default(int64)) +proc ScalarStuffAdddefaultI64*(builder: var Builder, defaultI64: int64) = + builder.PrependSlot(20, defaultI64, default(int64)) +proc ScalarStuffAddjustU64*(builder: var Builder, justU64: uint64) = + builder.PrependSlot(21, justU64, default(uint64)) +proc ScalarStuffAddmaybeU64*(builder: var Builder, maybeU64: uint64) = + builder.PrependSlot(22, maybeU64, default(uint64)) +proc ScalarStuffAdddefaultU64*(builder: var Builder, defaultU64: uint64) = + builder.PrependSlot(23, defaultU64, default(uint64)) +proc ScalarStuffAddjustF32*(builder: var Builder, justF32: float32) = + builder.PrependSlot(24, justF32, default(float32)) +proc ScalarStuffAddmaybeF32*(builder: var Builder, maybeF32: float32) = + builder.PrependSlot(25, maybeF32, default(float32)) +proc ScalarStuffAdddefaultF32*(builder: var Builder, defaultF32: float32) = + builder.PrependSlot(26, defaultF32, default(float32)) +proc ScalarStuffAddjustF64*(builder: var Builder, justF64: float64) = + builder.PrependSlot(27, justF64, default(float64)) +proc ScalarStuffAddmaybeF64*(builder: var Builder, maybeF64: float64) = + builder.PrependSlot(28, maybeF64, default(float64)) +proc ScalarStuffAdddefaultF64*(builder: var Builder, defaultF64: float64) = + builder.PrependSlot(29, defaultF64, default(float64)) +proc ScalarStuffAddjustBool*(builder: var Builder, justBool: bool) = + builder.PrependSlot(30, justBool, default(bool)) +proc ScalarStuffAddmaybeBool*(builder: var Builder, maybeBool: bool) = + builder.PrependSlot(31, maybeBool, default(bool)) +proc ScalarStuffAdddefaultBool*(builder: var Builder, defaultBool: bool) = + builder.PrependSlot(32, defaultBool, default(bool)) +proc ScalarStuffAddjustEnum*(builder: var Builder, justEnum: int8) = + builder.PrependSlot(33, justEnum, default(int8)) +proc ScalarStuffAddmaybeEnum*(builder: var Builder, maybeEnum: int8) = + builder.PrependSlot(34, maybeEnum, default(int8)) +proc ScalarStuffAdddefaultEnum*(builder: var Builder, defaultEnum: int8) = + builder.PrependSlot(35, defaultEnum, default(int8)) +proc ScalarStuffEnd*(builder: var Builder): uoffset = + return builder.EndObject() diff --git a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.py b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.py index 4dea123be9..ca7c253a64 100644 --- a/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.py +++ b/third_party/flatbuffers/tests/optional_scalars/ScalarStuff.py @@ -442,6 +442,11 @@ def InitFromBuf(cls, buf, pos): scalarStuff.Init(buf, pos) return cls.InitFromObj(scalarStuff) + @classmethod + def InitFromPackedBuf(cls, buf, pos=0): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, pos) + return cls.InitFromBuf(buf, pos+n) + @classmethod def InitFromObj(cls, scalarStuff): x = ScalarStuffT() diff --git a/third_party/flatbuffers/tests/optional_scalars/optional_scalars/optional_byte_generated.rs b/third_party/flatbuffers/tests/optional_scalars/optional_scalars/optional_byte_generated.rs index dae13668e7..9cb47c699f 100644 --- a/third_party/flatbuffers/tests/optional_scalars/optional_scalars/optional_byte_generated.rs +++ b/third_party/flatbuffers/tests/optional_scalars/optional_scalars/optional_byte_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for OptionalByte { impl<'a> flatbuffers::Follow<'a> for OptionalByte { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for OptionalByte { impl flatbuffers::Push for OptionalByte { type Output = OptionalByte; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for OptionalByte { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/optional_scalars/optional_scalars/scalar_stuff_generated.rs b/third_party/flatbuffers/tests/optional_scalars/optional_scalars/scalar_stuff_generated.rs index e201cc0b3c..8916932b89 100644 --- a/third_party/flatbuffers/tests/optional_scalars/optional_scalars/scalar_stuff_generated.rs +++ b/third_party/flatbuffers/tests/optional_scalars/optional_scalars/scalar_stuff_generated.rs @@ -19,8 +19,8 @@ pub struct ScalarStuff<'a> { impl<'a> flatbuffers::Follow<'a> for ScalarStuff<'a> { type Inner = ScalarStuff<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -67,7 +67,7 @@ impl<'a> ScalarStuff<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ScalarStuff { _tab: table } } #[allow(unused_mut)] @@ -194,147 +194,255 @@ impl<'a> ScalarStuff<'a> { #[inline] pub fn just_i8(&self) -> i8 { - self._tab.get::(ScalarStuff::VT_JUST_I8, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_I8, Some(0)).unwrap()} } #[inline] pub fn maybe_i8(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_I8, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_I8, None)} } #[inline] pub fn default_i8(&self) -> i8 { - self._tab.get::(ScalarStuff::VT_DEFAULT_I8, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_I8, Some(42)).unwrap()} } #[inline] pub fn just_u8(&self) -> u8 { - self._tab.get::(ScalarStuff::VT_JUST_U8, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_U8, Some(0)).unwrap()} } #[inline] pub fn maybe_u8(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_U8, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_U8, None)} } #[inline] pub fn default_u8(&self) -> u8 { - self._tab.get::(ScalarStuff::VT_DEFAULT_U8, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_U8, Some(42)).unwrap()} } #[inline] pub fn just_i16(&self) -> i16 { - self._tab.get::(ScalarStuff::VT_JUST_I16, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_I16, Some(0)).unwrap()} } #[inline] pub fn maybe_i16(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_I16, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_I16, None)} } #[inline] pub fn default_i16(&self) -> i16 { - self._tab.get::(ScalarStuff::VT_DEFAULT_I16, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_I16, Some(42)).unwrap()} } #[inline] pub fn just_u16(&self) -> u16 { - self._tab.get::(ScalarStuff::VT_JUST_U16, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_U16, Some(0)).unwrap()} } #[inline] pub fn maybe_u16(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_U16, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_U16, None)} } #[inline] pub fn default_u16(&self) -> u16 { - self._tab.get::(ScalarStuff::VT_DEFAULT_U16, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_U16, Some(42)).unwrap()} } #[inline] pub fn just_i32(&self) -> i32 { - self._tab.get::(ScalarStuff::VT_JUST_I32, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_I32, Some(0)).unwrap()} } #[inline] pub fn maybe_i32(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_I32, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_I32, None)} } #[inline] pub fn default_i32(&self) -> i32 { - self._tab.get::(ScalarStuff::VT_DEFAULT_I32, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_I32, Some(42)).unwrap()} } #[inline] pub fn just_u32(&self) -> u32 { - self._tab.get::(ScalarStuff::VT_JUST_U32, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_U32, Some(0)).unwrap()} } #[inline] pub fn maybe_u32(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_U32, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_U32, None)} } #[inline] pub fn default_u32(&self) -> u32 { - self._tab.get::(ScalarStuff::VT_DEFAULT_U32, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_U32, Some(42)).unwrap()} } #[inline] pub fn just_i64(&self) -> i64 { - self._tab.get::(ScalarStuff::VT_JUST_I64, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_I64, Some(0)).unwrap()} } #[inline] pub fn maybe_i64(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_I64, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_I64, None)} } #[inline] pub fn default_i64(&self) -> i64 { - self._tab.get::(ScalarStuff::VT_DEFAULT_I64, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_I64, Some(42)).unwrap()} } #[inline] pub fn just_u64(&self) -> u64 { - self._tab.get::(ScalarStuff::VT_JUST_U64, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_U64, Some(0)).unwrap()} } #[inline] pub fn maybe_u64(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_U64, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_U64, None)} } #[inline] pub fn default_u64(&self) -> u64 { - self._tab.get::(ScalarStuff::VT_DEFAULT_U64, Some(42)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_U64, Some(42)).unwrap()} } #[inline] pub fn just_f32(&self) -> f32 { - self._tab.get::(ScalarStuff::VT_JUST_F32, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_F32, Some(0.0)).unwrap()} } #[inline] pub fn maybe_f32(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_F32, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_F32, None)} } #[inline] pub fn default_f32(&self) -> f32 { - self._tab.get::(ScalarStuff::VT_DEFAULT_F32, Some(42.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_F32, Some(42.0)).unwrap()} } #[inline] pub fn just_f64(&self) -> f64 { - self._tab.get::(ScalarStuff::VT_JUST_F64, Some(0.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_F64, Some(0.0)).unwrap()} } #[inline] pub fn maybe_f64(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_F64, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_F64, None)} } #[inline] pub fn default_f64(&self) -> f64 { - self._tab.get::(ScalarStuff::VT_DEFAULT_F64, Some(42.0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_F64, Some(42.0)).unwrap()} } #[inline] pub fn just_bool(&self) -> bool { - self._tab.get::(ScalarStuff::VT_JUST_BOOL, Some(false)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_BOOL, Some(false)).unwrap()} } #[inline] pub fn maybe_bool(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_BOOL, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_BOOL, None)} } #[inline] pub fn default_bool(&self) -> bool { - self._tab.get::(ScalarStuff::VT_DEFAULT_BOOL, Some(true)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_BOOL, Some(true)).unwrap()} } #[inline] pub fn just_enum(&self) -> OptionalByte { - self._tab.get::(ScalarStuff::VT_JUST_ENUM, Some(OptionalByte::None)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_JUST_ENUM, Some(OptionalByte::None)).unwrap()} } #[inline] pub fn maybe_enum(&self) -> Option { - self._tab.get::(ScalarStuff::VT_MAYBE_ENUM, None) + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_MAYBE_ENUM, None)} } #[inline] pub fn default_enum(&self) -> OptionalByte { - self._tab.get::(ScalarStuff::VT_DEFAULT_ENUM, Some(OptionalByte::One)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(ScalarStuff::VT_DEFAULT_ENUM, Some(OptionalByte::One)).unwrap()} } } @@ -836,18 +944,6 @@ impl ScalarStuffT { }) } } -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_root_as_scalar_stuff<'a>(buf: &'a [u8]) -> ScalarStuff<'a> { - unsafe { flatbuffers::root_unchecked::>(buf) } -} - -#[inline] -#[deprecated(since="2.0.0", note="Deprecated in favor of `root_as...` methods.")] -pub fn get_size_prefixed_root_as_scalar_stuff<'a>(buf: &'a [u8]) -> ScalarStuff<'a> { - unsafe { flatbuffers::size_prefixed_root_unchecked::>(buf) } -} - #[inline] /// Verifies that a buffer of bytes contains a `ScalarStuff` /// and returns it. diff --git a/third_party/flatbuffers/tests/optional_scalars_generated.h b/third_party/flatbuffers/tests/optional_scalars_generated.h index f71f98df8f..0beb7927b1 100644 --- a/third_party/flatbuffers/tests/optional_scalars_generated.h +++ b/third_party/flatbuffers/tests/optional_scalars_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); namespace optional_scalars { diff --git a/third_party/flatbuffers/tests/parser_test.cpp b/third_party/flatbuffers/tests/parser_test.cpp index 1a43504457..4d9e0762bc 100644 --- a/third_party/flatbuffers/tests/parser_test.cpp +++ b/third_party/flatbuffers/tests/parser_test.cpp @@ -1,6 +1,7 @@ #include "parser_test.h" #include +#include #include #include "flatbuffers/idl.h" diff --git a/third_party/flatbuffers/tests/private_annotation_test/ab_generated.rs b/third_party/flatbuffers/tests/private_annotation_test/ab_generated.rs index 6ed88504ca..f2246488f8 100644 --- a/third_party/flatbuffers/tests/private_annotation_test/ab_generated.rs +++ b/third_party/flatbuffers/tests/private_annotation_test/ab_generated.rs @@ -55,10 +55,8 @@ impl core::fmt::Debug for AB { impl<'a> flatbuffers::Follow<'a> for AB { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -66,21 +64,21 @@ impl<'a> flatbuffers::Follow<'a> for AB { impl flatbuffers::Push for AB { type Output = AB; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for AB { + type Scalar = i8; #[inline] - fn to_little_endian(self) -> Self { - let b = i8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> i8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = i8::from_le(self.0); + fn from_little_endian(v: i8) -> Self { + let b = i8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/private_annotation_test/annotations_generated.rs b/third_party/flatbuffers/tests/private_annotation_test/annotations_generated.rs index 7c5166b681..c8b4925e6d 100644 --- a/third_party/flatbuffers/tests/private_annotation_test/annotations_generated.rs +++ b/third_party/flatbuffers/tests/private_annotation_test/annotations_generated.rs @@ -19,8 +19,8 @@ pub(crate) struct Annotations<'a> { impl<'a> flatbuffers::Follow<'a> for Annotations<'a> { type Inner = Annotations<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> Annotations<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Annotations { _tab: table } } #[allow(unused_mut)] @@ -54,7 +54,10 @@ impl<'a> Annotations<'a> { #[inline] pub fn value(&self) -> i32 { - self._tab.get::(Annotations::VT_VALUE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Annotations::VT_VALUE, Some(0)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/private_annotation_test/any_generated.rs b/third_party/flatbuffers/tests/private_annotation_test/any_generated.rs index c3049a08dd..552c38f031 100644 --- a/third_party/flatbuffers/tests/private_annotation_test/any_generated.rs +++ b/third_party/flatbuffers/tests/private_annotation_test/any_generated.rs @@ -59,10 +59,8 @@ impl core::fmt::Debug for Any { impl<'a> flatbuffers::Follow<'a> for Any { type Inner = Self; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } @@ -70,21 +68,21 @@ impl<'a> flatbuffers::Follow<'a> for Any { impl flatbuffers::Push for Any { type Output = Any; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); } } impl flatbuffers::EndianScalar for Any { + type Scalar = u8; #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) + fn to_little_endian(self) -> u8 { + self.0.to_le() } #[inline] #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); + fn from_little_endian(v: u8) -> Self { + let b = u8::from_le(v); Self(b) } } diff --git a/third_party/flatbuffers/tests/private_annotation_test/game_generated.rs b/third_party/flatbuffers/tests/private_annotation_test/game_generated.rs index e69661120c..9ded51f876 100644 --- a/third_party/flatbuffers/tests/private_annotation_test/game_generated.rs +++ b/third_party/flatbuffers/tests/private_annotation_test/game_generated.rs @@ -19,8 +19,8 @@ pub(crate) struct Game<'a> { impl<'a> flatbuffers::Follow<'a> for Game<'a> { type Inner = Game<'a>; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } } } @@ -32,7 +32,7 @@ impl<'a> Game<'a> { } #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Game { _tab: table } } #[allow(unused_mut)] @@ -54,7 +54,10 @@ impl<'a> Game<'a> { #[inline] pub fn value(&self) -> i32 { - self._tab.get::(Game::VT_VALUE, Some(0)).unwrap() + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Game::VT_VALUE, Some(0)).unwrap()} } } diff --git a/third_party/flatbuffers/tests/private_annotation_test/object_generated.rs b/third_party/flatbuffers/tests/private_annotation_test/object_generated.rs index 64419a9e04..cb93412f3d 100644 --- a/third_party/flatbuffers/tests/private_annotation_test/object_generated.rs +++ b/third_party/flatbuffers/tests/private_annotation_test/object_generated.rs @@ -27,39 +27,25 @@ impl core::fmt::Debug for Object { } impl flatbuffers::SimpleToVerifyInSlice for Object {} -impl flatbuffers::SafeSliceAccess for Object {} impl<'a> flatbuffers::Follow<'a> for Object { type Inner = &'a Object; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a Object>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a Object { type Inner = &'a Object; #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } impl<'b> flatbuffers::Push for Object { type Output = Object; #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Object as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Object { - type Output = Object; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Object as *const u8, Self::size()) - }; + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(self as *const Object as *const u8, Self::size()); dst.copy_from_slice(src); } } @@ -89,24 +75,30 @@ impl<'a> Object { } pub fn value(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { core::ptr::copy_nonoverlapping( self.0[0..].as_ptr(), mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); mem.assume_init() - }.from_little_endian() + }) } pub fn set_value(&mut self, x: i32) { let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot unsafe { core::ptr::copy_nonoverlapping( - &x_le as *const i32 as *const u8, + &x_le as *const _ as *const u8, self.0[0..].as_mut_ptr(), - core::mem::size_of::(), + core::mem::size_of::<::Scalar>(), ); } } diff --git a/third_party/flatbuffers/tests/proto_test.cpp b/third_party/flatbuffers/tests/proto_test.cpp index 7281c2cc68..1d1c98ac53 100644 --- a/third_party/flatbuffers/tests/proto_test.cpp +++ b/third_party/flatbuffers/tests/proto_test.cpp @@ -201,4 +201,4 @@ void ParseProtoBufAsciiTest() { } } // namespace tests -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/prototest/GenerateProtoGoldens.sh b/third_party/flatbuffers/tests/prototest/GenerateProtoGoldens.sh new file mode 100755 index 0000000000..8cf24f9181 --- /dev/null +++ b/third_party/flatbuffers/tests/prototest/GenerateProtoGoldens.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2022 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +pushd "$(dirname $0)" >/dev/null + +./../../flatc --proto test.proto && mv test.fbs test_include.golden +./../../flatc --proto --gen-all test.proto && mv test.fbs test.golden +./../../flatc --proto --oneof-union test.proto && mv test.fbs test_union_include.golden +./../../flatc --proto --gen-all --oneof-union test.proto && mv test.fbs test_union.golden +./../../flatc --proto --gen-all --proto-namespace-suffix test_namespace_suffix test.proto && mv test.fbs test_suffix.golden +./../../flatc --proto --gen-all --proto-namespace-suffix test_namespace_suffix --oneof-union test.proto && mv test.fbs test_union_suffix.golden diff --git a/third_party/flatbuffers/tests/prototest/test.golden b/third_party/flatbuffers/tests/prototest/test.golden index 949a003d5c..4484b49821 100644 --- a/third_party/flatbuffers/tests/prototest/test.golden +++ b/third_party/flatbuffers/tests/prototest/test.golden @@ -54,6 +54,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.ProtoMessage_; @@ -73,3 +75,13 @@ table Anonymous0 { t:proto.test.ProtoMessage_.OtherMessage; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/prototest/test.proto b/third_party/flatbuffers/tests/prototest/test.proto index 71ec8d51d7..98c92f88ad 100644 --- a/third_party/flatbuffers/tests/prototest/test.proto +++ b/third_party/flatbuffers/tests/prototest/test.proto @@ -71,4 +71,7 @@ message ProtoMessage { optional float u = 34 [default = inf]; optional float v = 35 [default = +inf]; optional float w = 36 [default = -inf]; + + map grades = 37; + map other_message_map = 38; } diff --git a/third_party/flatbuffers/tests/prototest/test_include.golden b/third_party/flatbuffers/tests/prototest/test_include.golden index b98de44fb9..791f7f7b5c 100644 --- a/third_party/flatbuffers/tests/prototest/test_include.golden +++ b/third_party/flatbuffers/tests/prototest/test_include.golden @@ -52,6 +52,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.ProtoMessage_; @@ -71,3 +73,13 @@ table Anonymous0 { t:proto.test.ProtoMessage_.OtherMessage; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/prototest/test_suffix.golden b/third_party/flatbuffers/tests/prototest/test_suffix.golden index 4ab2146c57..b76acb7fbc 100644 --- a/third_party/flatbuffers/tests/prototest/test_suffix.golden +++ b/third_party/flatbuffers/tests/prototest/test_suffix.golden @@ -54,6 +54,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.test_namespace_suffix.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.test_namespace_suffix.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.test_namespace_suffix.ProtoMessage_; @@ -73,3 +75,13 @@ table Anonymous0 { t:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/prototest/test_union.golden b/third_party/flatbuffers/tests/prototest/test_union.golden index 241f3491b3..15d365b54b 100644 --- a/third_party/flatbuffers/tests/prototest/test_union.golden +++ b/third_party/flatbuffers/tests/prototest/test_union.golden @@ -64,6 +64,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.ProtoMessage_; @@ -75,3 +77,13 @@ table OtherMessage { foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/prototest/test_union_include.golden b/third_party/flatbuffers/tests/prototest/test_union_include.golden index 1fdb2acbc3..ce36463567 100644 --- a/third_party/flatbuffers/tests/prototest/test_union_include.golden +++ b/third_party/flatbuffers/tests/prototest/test_union_include.golden @@ -62,6 +62,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.ProtoMessage_; @@ -73,3 +75,13 @@ table OtherMessage { foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/prototest/test_union_suffix.golden b/third_party/flatbuffers/tests/prototest/test_union_suffix.golden index 2278edd2c3..0c0c5e586c 100644 --- a/third_party/flatbuffers/tests/prototest/test_union_suffix.golden +++ b/third_party/flatbuffers/tests/prototest/test_union_suffix.golden @@ -64,6 +64,8 @@ table ProtoMessage { u:float = +inf; v:float = +inf; w:float = -inf; + grades:[proto.test.test_namespace_suffix.ProtoMessage_.GradesEntry]; + other_message_map:[proto.test.test_namespace_suffix.ProtoMessage_.OtherMessageMapEntry]; } namespace proto.test.test_namespace_suffix.ProtoMessage_; @@ -75,3 +77,13 @@ table OtherMessage { foo_bar_baz:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage_.ProtoEnum; } +table GradesEntry { + key:string (key); + value:float; +} + +table OtherMessageMapEntry { + key:string (key); + value:proto.test.test_namespace_suffix.ProtoMessage_.OtherMessage; +} + diff --git a/third_party/flatbuffers/tests/py_test.py b/third_party/flatbuffers/tests/py_test.py index 5e3c54735b..fe3d10e553 100644 --- a/third_party/flatbuffers/tests/py_test.py +++ b/third_party/flatbuffers/tests/py_test.py @@ -47,6 +47,11 @@ import MyGame.Example.ArrayStruct # refers to generated code import MyGame.Example.NestedStruct # refers to generated code import MyGame.Example.TestEnum # refers to generated code +import MyGame.Example.NestedUnion.NestedUnionTest # refers to generated code +import MyGame.Example.NestedUnion.Vec3 # refers to generated code +import MyGame.Example.NestedUnion.Any # refers to generated code +import MyGame.Example.NestedUnion.Test # refers to generated code +import MyGame.Example.NestedUnion.Color # refers to generated code import monster_test_generated # the one-file version import optional_scalars import optional_scalars.ScalarStuff @@ -978,6 +983,48 @@ def test_2xuint16_vector(self): b.EndVector() self.assertBuilderEquals(b, [2, 0, 0, 0, 0xBA, 0xDC, 0xCD, 0xAB]) + def test_create_ascii_shared_string(self): + b = flatbuffers.Builder(0) + b.CreateSharedString(u'foo', encoding='ascii') + b.CreateSharedString(u'foo', encoding='ascii') + + # 0-terminated, no pad: + self.assertBuilderEquals(b, [3, 0, 0, 0, 'f', 'o', 'o', 0]) + b.CreateSharedString(u'moop', encoding='ascii') + b.CreateSharedString(u'moop', encoding='ascii') + # 0-terminated, 3-byte pad: + self.assertBuilderEquals(b, [ + 4, 0, 0, 0, 'm', 'o', 'o', 'p', 0, 0, 0, 0, 3, 0, 0, 0, 'f', 'o', 'o', 0 + ]) + + def test_create_utf8_shared_string(self): + b = flatbuffers.Builder(0) + b.CreateSharedString(u'Цлїςσδε') + b.CreateSharedString(u'Цлїςσδε') + self.assertBuilderEquals(b, '\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \ + '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00') + + b.CreateSharedString(u'フムアムカモケモ') + b.CreateSharedString(u'フムアムカモケモ') + self.assertBuilderEquals(b, '\x18\x00\x00\x00\xef\xbe\x8c\xef\xbe\x91' \ + '\xef\xbd\xb1\xef\xbe\x91\xef\xbd\xb6\xef\xbe\x93\xef\xbd\xb9\xef' \ + '\xbe\x93\x00\x00\x00\x00\x0e\x00\x00\x00\xd0\xa6\xd0\xbb\xd1\x97' \ + '\xcf\x82\xcf\x83\xce\xb4\xce\xb5\x00\x00') + + def test_create_arbitrary_shared_string(self): + b = flatbuffers.Builder(0) + s = '\x01\x02\x03' + b.CreateSharedString(s) # Default encoding is utf-8. + b.CreateSharedString(s) + # 0-terminated, no pad: + self.assertBuilderEquals(b, [3, 0, 0, 0, 1, 2, 3, 0]) + s2 = '\x04\x05\x06\x07' + b.CreateSharedString(s2) # Default encoding is utf-8. + b.CreateSharedString(s2) + # 0-terminated, 3-byte pad: + self.assertBuilderEquals( + b, [4, 0, 0, 0, 4, 5, 6, 7, 0, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0]) + def test_create_ascii_string(self): b = flatbuffers.Builder(0) b.CreateString(u'foo', encoding='ascii') @@ -2583,6 +2630,13 @@ def test_unreachable_error(self): assertRaises(self, lambda: b.PrependUOffsetTRelative(1), flatbuffers.builder.OffsetArithmeticError) + def test_create_shared_string_is_nested_error(self): + b = flatbuffers.Builder(0) + b.StartObject(0) + s = 'test1' + assertRaises(self, lambda: b.CreateSharedString(s), + flatbuffers.builder.IsNestedError) + def test_create_string_is_nested_error(self): b = flatbuffers.Builder(0) b.StartObject(0) @@ -2642,22 +2696,84 @@ def test_fixed_length_array(self): self.assertEqual(table.A().B(), \ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) self.assertEqual(table.A().C(), 1) - self.assertEqual(table.A().D(nested, 0).A(), [1, 2]) - self.assertEqual(table.A().D(nested, 1).A(), [3, 4]) - self.assertEqual(table.A().D(nested, 0).B(), \ + self.assertEqual(table.A().D(0).A(), [1, 2]) + self.assertEqual(table.A().D(1).A(), [3, 4]) + self.assertEqual(table.A().D(0).B(), \ MyGame.Example.TestEnum.TestEnum.B) - self.assertEqual(table.A().D(nested, 1).B(), \ + self.assertEqual(table.A().D(1).B(), \ MyGame.Example.TestEnum.TestEnum.C) - self.assertEqual(table.A().D(nested, 0).C(), \ + self.assertEqual(table.A().D(0).C(), \ [MyGame.Example.TestEnum.TestEnum.A, \ MyGame.Example.TestEnum.TestEnum.B]) - self.assertEqual(table.A().D(nested, 1).C(), \ + self.assertEqual(table.A().D(1).C(), \ [MyGame.Example.TestEnum.TestEnum.C, \ MyGame.Example.TestEnum.TestEnum.B]) - self.assertEqual(table.A().D(nested, 0).D(), [-1, 1]) - self.assertEqual(table.A().D(nested, 1).D(), [-2, 2]) + self.assertEqual(table.A().D(0).D(), [-1, 1]) + self.assertEqual(table.A().D(1).D(), [-2, 2]) self.assertEqual(table.A().E(), 2) self.assertEqual(table.A().F(), [-1, 1]) + self.assertEqual(table.A().D(0).D(0), -1) + self.assertEqual(table.A().D(0).D(1), 1) + self.assertEqual(table.A().D(1).D(0), -2) + self.assertEqual(table.A().D(1).D(1), 2) + +class TestNestedUnionTables(unittest.TestCase): + + def test_nested_union_tables(self): + nestUnion = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT() + nestUnion.name = b"testUnion1" + nestUnion.id = 1 + nestUnion.data = MyGame.Example.NestedUnion.Vec3.Vec3T() + nestUnion.dataType = MyGame.Example.NestedUnion.Any.Any.Vec3 + nestUnion.data.x = 4.278975356 + nestUnion.data.y = 5.32 + nestUnion.data.z = -6.464 + nestUnion.data.test1 = 0.9 + nestUnion.data.test2 = MyGame.Example.NestedUnion.Color.Color.Red + nestUnion.data.test3 = MyGame.Example.NestedUnion.Test.TestT() + nestUnion.data.test3.a = 5 + nestUnion.data.test3.b = 2 + + b = flatbuffers.Builder(0) + b.Finish(nestUnion.Pack(b)) + + nestUnionDecode = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTest.GetRootAs(b.Bytes, b.Head()) + nestUnionDecodeT = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromObj(nestUnionDecode) + self.assertEqual(nestUnionDecodeT.name, nestUnion.name) + self.assertEqual(nestUnionDecodeT.id, nestUnion.id) + self.assertEqual(nestUnionDecodeT.dataType, nestUnion.dataType) + self.assertEqual(nestUnionDecodeT.data.x, nestUnion.data.x) + self.assertEqual(nestUnionDecodeT.data.y, nestUnion.data.y) + self.assertEqual(nestUnionDecodeT.data.z, nestUnion.data.z) + self.assertEqual(nestUnionDecodeT.data.test1, nestUnion.data.test1) + self.assertEqual(nestUnionDecodeT.data.test2, nestUnion.data.test2) + self.assertEqual(nestUnionDecodeT.data.test3.a, nestUnion.data.test3.a) + self.assertEqual(nestUnionDecodeT.data.test3.b, nestUnion.data.test3.b) + + nestUnionDecodeTFromBuf = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(b.Bytes, b.Head()) + self.assertEqual(nestUnionDecodeTFromBuf.name, nestUnion.name) + self.assertEqual(nestUnionDecodeTFromBuf.id, nestUnion.id) + self.assertEqual(nestUnionDecodeTFromBuf.dataType, nestUnion.dataType) + self.assertEqual(nestUnionDecodeTFromBuf.data.x, nestUnion.data.x) + self.assertEqual(nestUnionDecodeTFromBuf.data.y, nestUnion.data.y) + self.assertEqual(nestUnionDecodeTFromBuf.data.z, nestUnion.data.z) + self.assertEqual(nestUnionDecodeTFromBuf.data.test1, nestUnion.data.test1) + self.assertEqual(nestUnionDecodeTFromBuf.data.test2, nestUnion.data.test2) + self.assertEqual(nestUnionDecodeTFromBuf.data.test3.a, nestUnion.data.test3.a) + self.assertEqual(nestUnionDecodeTFromBuf.data.test3.b, nestUnion.data.test3.b) + + + nestUnionDecodeTFromBuf2 = MyGame.Example.NestedUnion.NestedUnionTest.NestedUnionTestT.InitFromPackedBuf(b.Output()) + self.assertEqual(nestUnionDecodeTFromBuf2.name, nestUnion.name) + self.assertEqual(nestUnionDecodeTFromBuf2.id, nestUnion.id) + self.assertEqual(nestUnionDecodeTFromBuf2.dataType, nestUnion.dataType) + self.assertEqual(nestUnionDecodeTFromBuf2.data.x, nestUnion.data.x) + self.assertEqual(nestUnionDecodeTFromBuf2.data.y, nestUnion.data.y) + self.assertEqual(nestUnionDecodeTFromBuf2.data.z, nestUnion.data.z) + self.assertEqual(nestUnionDecodeTFromBuf2.data.test1, nestUnion.data.test1) + self.assertEqual(nestUnionDecodeTFromBuf2.data.test2, nestUnion.data.test2) + self.assertEqual(nestUnionDecodeTFromBuf2.data.test3.a, nestUnion.data.test3.a) + self.assertEqual(nestUnionDecodeTFromBuf2.data.test3.b, nestUnion.data.test3.b) def CheckAgainstGoldDataGo(): diff --git a/third_party/flatbuffers/tests/reflection_test.cpp b/third_party/flatbuffers/tests/reflection_test.cpp index b48bd81983..9f92689519 100644 --- a/third_party/flatbuffers/tests/reflection_test.cpp +++ b/third_party/flatbuffers/tests/reflection_test.cpp @@ -266,10 +266,14 @@ void MiniReflectFlatBuffersTest(uint8_t *flatbuf) { "}, " "{ name: \"Wilma\" } ], " // TODO(wvo): should really print this nested buffer correctly. - "testnestedflatbuffer: [ 20, 0, 0, 0, 77, 79, 78, 83, 12, 0, 12, 0, 0, " - "0, " - "4, 0, 6, 0, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 13, 0, 0, 0, 78, " - "101, 115, 116, 101, 100, 77, 111, 110, 115, 116, 101, 114, 0, 0, 0 ], " + "testnestedflatbuffer: [ 124, 0, 0, 0, 77, 79, 78, 83, 0, 0, 114, 0, 16, " + "0, 0, 0, 4, 0, 6, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 114, 0, 0, 0, 0, 0, 0, 0, " + "8, 0, 0, 0, 0, 0, 192, 127, 13, 0, 0, 0, 78, 101, 115, 116, 101, 100, " + "77, 111, 110, 115, 116, 101, 114, 0, 0, 0 ], " "testarrayofstring2: [ \"jane\", \"mary\" ], " "testarrayofsortedstruct: [ { id: 0, distance: 0 }, " "{ id: 2, distance: 20 }, { id: 3, distance: 30 }, " @@ -277,7 +281,8 @@ void MiniReflectFlatBuffersTest(uint8_t *flatbuf) { "flex: [ 210, 4, 5, 2 ], " "test5: [ { a: 10, b: 20 }, { a: 30, b: 40 } ], " "vector_of_enums: [ Blue, Green ], " - "scalar_key_sorted_tables: [ { id: \"miss\" } ] " + "scalar_key_sorted_tables: [ { id: \"miss\" } ], " + "nan_default: nan " "}"); Test test(16, 32); @@ -317,4 +322,4 @@ void MiniReflectFixedLengthArrayTest() { } } // namespace tests -} // namespace flatbuffers \ No newline at end of file +} // namespace flatbuffers diff --git a/third_party/flatbuffers/tests/rust_no_std_compilation_test/.cargo/config.toml b/third_party/flatbuffers/tests/rust_no_std_compilation_test/.cargo/config.toml new file mode 100644 index 0000000000..4fc6b9a91e --- /dev/null +++ b/third_party/flatbuffers/tests/rust_no_std_compilation_test/.cargo/config.toml @@ -0,0 +1,5 @@ +[build] +target = "thumbv7m-none-eabi" + +[unstable] +build-std = ["core", "alloc"] diff --git a/third_party/flatbuffers/tests/rust_no_std_compilation_test/Cargo.toml b/third_party/flatbuffers/tests/rust_no_std_compilation_test/Cargo.toml new file mode 100644 index 0000000000..86e650a26d --- /dev/null +++ b/third_party/flatbuffers/tests/rust_no_std_compilation_test/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "rust_test_no_std_compilation" +version = "0.1.0" +edition = "2021" + +[dependencies] +flatbuffers = { path = "../../rust/flatbuffers", default-features = false } + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" diff --git a/third_party/flatbuffers/tests/rust_no_std_compilation_test/src/main.rs b/third_party/flatbuffers/tests/rust_no_std_compilation_test/src/main.rs new file mode 100644 index 0000000000..0430599dbe --- /dev/null +++ b/third_party/flatbuffers/tests/rust_no_std_compilation_test/src/main.rs @@ -0,0 +1,34 @@ +#![no_std] +#![no_main] +#![feature(default_alloc_error_handler)] + +// Include flatbuffers purely to check that it compiles in a no_std binary +#[allow(unused_imports)] +use flatbuffers; + +// The rest is just no_std boilerplate + +use core::alloc::{GlobalAlloc, Layout}; + +struct NullAllocator; +unsafe impl GlobalAlloc for NullAllocator { + unsafe fn alloc(&self, _lt: Layout) -> *mut u8 { + core::ptr::null_mut() + } + unsafe fn dealloc(&self, _ptr: *mut u8, _lt: Layout) { + panic!("won't deallocate: we never allocated!"); + } +} + +#[global_allocator] +static A: NullAllocator = NullAllocator; + +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} + +#[no_mangle] +pub extern "C" fn main(_argc: i32, _argv: *const *const u8) -> i32 { + 0 +} diff --git a/third_party/flatbuffers/tests/rust_serialize_test/src/main.rs b/third_party/flatbuffers/tests/rust_serialize_test/src/main.rs index d67cc208b8..e6bdce6fb1 100644 --- a/third_party/flatbuffers/tests/rust_serialize_test/src/main.rs +++ b/third_party/flatbuffers/tests/rust_serialize_test/src/main.rs @@ -36,8 +36,8 @@ fn create_serialized_example_with_generated_code(builder: &mut flatbuffers::Flat ) .as_union_value(), ), - inventory: Some(builder.create_vector_direct(&[0u8, 1, 2, 3, 4][..])), - test4: Some(builder.create_vector_direct(&[ + inventory: Some(builder.create_vector(&[0u8, 1, 2, 3, 4])), + test4: Some(builder.create_vector(&[ my_game::example::Test::new(10, 20), my_game::example::Test::new(30, 40), ])), diff --git a/third_party/flatbuffers/tests/rust_usage_test/Cargo.toml b/third_party/flatbuffers/tests/rust_usage_test/Cargo.toml index d5731e7d20..5b7152b9c5 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/Cargo.toml +++ b/third_party/flatbuffers/tests/rust_usage_test/Cargo.toml @@ -16,7 +16,7 @@ libc_alloc = { version = "1.0.3", optional = true } [features] default = ["flatbuffers/default"] -no_std = ["flatbuffers/no_std", "libc_alloc"] +no_std = ["libc_alloc"] [[bin]] name = "monster_example" diff --git a/third_party/flatbuffers/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs b/third_party/flatbuffers/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs index 7d72501812..3ab3b56aa4 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/benches/flatbuffers_benchmarks.rs @@ -86,8 +86,8 @@ fn create_serialized_example_with_generated_code( let mon = { let name = builder.create_string("MyMonster"); let fred_name = builder.create_string("Fred"); - let inventory = builder.create_vector_direct(&[0u8, 1, 2, 3, 4]); - let test4 = builder.create_vector_direct(&[ + let inventory = builder.create_vector(&[0u8, 1, 2, 3, 4]); + let test4 = builder.create_vector(&[ my_game::example::Test::new(10, 20), my_game::example::Test::new(30, 40), ]); @@ -156,7 +156,7 @@ fn traverse_serialized_example_with_generated_code(bytes: &[u8]) { blackbox(pos_test3.b()); blackbox(m.test_type()); let table2 = m.test().unwrap(); - let monster2 = my_game::example::Monster::init_from_table(table2); + let monster2 = unsafe { my_game::example::Monster::init_from_table(table2) }; blackbox(monster2.name()); blackbox(m.inventory()); blackbox(m.test4()); @@ -228,7 +228,7 @@ fn create_byte_vector_100_optimal(bench: &mut Bencher) { let mut i = 0; bench.iter(|| { - builder.create_vector_direct(v); + builder.create_vector(v); i += 1; if i == 10000 { builder.reset(); diff --git a/third_party/flatbuffers/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs b/third_party/flatbuffers/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs index 418783c652..8a77c0e0e5 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/bin/flatbuffers_alloc_check.rs @@ -3,6 +3,7 @@ // global variable). use std::alloc::{GlobalAlloc, Layout, System}; + static mut N_ALLOCS: usize = 0; struct TrackingAllocator; @@ -12,6 +13,7 @@ impl TrackingAllocator { unsafe { N_ALLOCS } } } + unsafe impl GlobalAlloc for TrackingAllocator { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { N_ALLOCS += 1; @@ -28,31 +30,34 @@ static A: TrackingAllocator = TrackingAllocator; // import the flatbuffers generated code: extern crate flatbuffers; -#[allow(dead_code, unused_imports)] + +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../include_test1/mod.rs"] pub mod include_test1_generated; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../include_test2/mod.rs"] pub mod include_test2_generated; -#[allow(dead_code, unused_imports, clippy::approx_constant)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../monster_test/mod.rs"] mod monster_test_generated; + pub use monster_test_generated::my_game; // verbatim from the test suite: fn create_serialized_example_with_generated_code(builder: &mut flatbuffers::FlatBufferBuilder) { let mon = { - let _ = builder.create_vector_of_strings(&[ - "these", - "unused", - "strings", - "check", - "the", - "create_vector_of_strings", - "function", - ]); + let strings = [ + builder.create_string("these"), + builder.create_string("unused"), + builder.create_string("strings"), + builder.create_string("check"), + builder.create_string("the"), + builder.create_string("create_vector_of_strings"), + builder.create_string("function") + ]; + let _ = builder.create_vector(&strings); let s0 = builder.create_string("test1"); let s1 = builder.create_string("test2"); @@ -83,10 +88,10 @@ fn create_serialized_example_with_generated_code(builder: &mut flatbuffers::Flat ..Default::default() }, ) - .as_union_value(), + .as_union_value(), ), - inventory: Some(builder.create_vector_direct(&[0u8, 1, 2, 3, 4][..])), - test4: Some(builder.create_vector_direct(&[ + inventory: Some(builder.create_vector(&[0u8, 1, 2, 3, 4])), + test4: Some(builder.create_vector(&[ my_game::example::Test::new(10, 20), my_game::example::Test::new(30, 40), ])), @@ -151,7 +156,7 @@ fn main() { assert_eq!(pos_test3.b(), 6i8); assert_eq!(m.test_type(), my_game::example::Any::Monster); let table2 = m.test().unwrap(); - let m2 = my_game::example::Monster::init_from_table(table2); + let m2 = unsafe { my_game::example::Monster::init_from_table(table2) }; assert_eq!(m2.name(), "Fred"); @@ -162,10 +167,10 @@ fn main() { let test4 = m.test4().unwrap(); assert_eq!(test4.len(), 2); assert_eq!( - i32::from(test4[0].a()) - + i32::from(test4[1].a()) - + i32::from(test4[0].b()) - + i32::from(test4[1].b()), + i32::from(test4.get(0).a()) + + i32::from(test4.get(1).a()) + + i32::from(test4.get(0).b()) + + i32::from(test4.get(1).b()), 100 ); diff --git a/third_party/flatbuffers/tests/rust_usage_test/bin/monster_example.rs b/third_party/flatbuffers/tests/rust_usage_test/bin/monster_example.rs index 17ce0e0f83..f50003f876 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/bin/monster_example.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/bin/monster_example.rs @@ -1,5 +1,7 @@ +#![allow(clippy::derivable_impls, clippy::all)] extern crate flatbuffers; + #[allow(dead_code, unused_imports)] #[path = "../../include_test1/mod.rs"] pub mod include_test1_generated; diff --git a/third_party/flatbuffers/tests/rust_usage_test/outdir/build.rs b/third_party/flatbuffers/tests/rust_usage_test/outdir/build.rs index 046282887f..efd036b063 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/outdir/build.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/outdir/build.rs @@ -32,6 +32,7 @@ fn main() { .arg("-o") .arg(&out_dir) .arg("--rust") + .arg("--rust-module-root-file") .arg(&sample_schema) .output() .expect("Failed to generate file"); diff --git a/third_party/flatbuffers/tests/rust_usage_test/tests/arrays_test.rs b/third_party/flatbuffers/tests/rust_usage_test/tests/arrays_test.rs index e92e862458..1b4cc64cb0 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/tests/arrays_test.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/tests/arrays_test.rs @@ -6,14 +6,18 @@ extern crate std; extern crate alloc; extern crate array_init; + #[allow(dead_code, unused_imports)] #[path = "../../arrays_test/mod.rs"] mod arrays_test_generated; + use alloc::format; use core::fmt::Debug; use crate::arrays_test_generated::my_game::example::*; + extern crate quickcheck; + use array_init::array_init; use core::mem::size_of; use quickcheck::{Arbitrary, Gen}; @@ -60,6 +64,7 @@ fn serialized_example_is_accessible_and_correct( } else { array_table_buffer_has_identifier(bytes) }; + assert_eq!(correct, true); } @@ -175,7 +180,7 @@ fn object_api_defaults() { a: [0, 0], b: TestEnum::default(), c: [TestEnum::default(), TestEnum::default()], - d: [0, 0] + d: [0, 0], } ); @@ -187,7 +192,7 @@ fn object_api_defaults() { c: 0, d: [NestedStructT::default(), NestedStructT::default()], e: 0, - f: [0, 0] + f: [0, 0], } ); } @@ -213,14 +218,14 @@ fn generated_code_debug_prints_correctly() { #[should_panic] fn assert_on_too_small_array_buf() { let a = [0u8; 19]; - flatbuffers::Array::::new(&a); + unsafe { flatbuffers::Array::::new(&a) }; } #[test] #[should_panic] fn assert_on_too_big_array_buf() { let a = [0u8; 21]; - flatbuffers::Array::::new(&a); + unsafe { flatbuffers::Array::::new(&a) }; } #[test] @@ -251,10 +256,10 @@ impl Arbitrary for FakeArray ( fn $fn_name(xs: FakeArray<$ty, ARRAY_SIZE>) { let mut test_buf = [0 as u8; 1024]; - flatbuffers::emplace_scalar_array(&mut test_buf, 0, &xs.0); - let arr: flatbuffers::Array<$ty, ARRAY_SIZE> = flatbuffers::Array::follow(&test_buf, 0); + let arr: flatbuffers::Array<$ty, ARRAY_SIZE> = unsafe { + flatbuffers::emplace_scalar_array(&mut test_buf, 0, &xs.0); + flatbuffers::Array::follow(&test_buf, 0) + }; let got: [$ty; ARRAY_SIZE] = arr.into(); assert_eq!(got, xs.0); } @@ -308,7 +316,7 @@ mod array_fuzz { fn arbitrary(g: &mut G) -> NestedStructWrapper { let mut x = NestedStruct::default(); x.0 = FakeArray::::arbitrary(g).0; - NestedStructWrapper{0: x} + NestedStructWrapper { 0: x } } } @@ -317,16 +325,16 @@ mod array_fuzz { let native_struct_array: [&NestedStruct; ARRAY_SIZE] = array_init::from_iter(xs.0.iter().map(|x| &x.0)).unwrap(); for i in 0..ARRAY_SIZE { let offset = i * NESTED_STRUCT_SIZE; - native_struct_array[i].push(&mut test_buf[offset..offset + NESTED_STRUCT_SIZE], &[]); + unsafe { native_struct_array[i].push(&mut test_buf[offset..offset + NESTED_STRUCT_SIZE], 0) }; } - let arr: flatbuffers::Array = flatbuffers::Array::follow(&test_buf, 0); + let arr: flatbuffers::Array = unsafe { flatbuffers::Array::follow(&test_buf, 0) }; let got: [&NestedStruct; ARRAY_SIZE] = arr.into(); assert_eq!(got, native_struct_array); } #[test] #[cfg(not(miri))] // slow. - fn test_struct() { + fn test_struct() { quickcheck::QuickCheck::new().max_tests(MAX_TESTS).quickcheck(prop_struct as fn(FakeArray)); } } diff --git a/third_party/flatbuffers/tests/rust_usage_test/tests/integration_test.rs b/third_party/flatbuffers/tests/rust_usage_test/tests/integration_test.rs index 73d4a1f370..fd92da3855 100644 --- a/third_party/flatbuffers/tests/rust_usage_test/tests/integration_test.rs +++ b/third_party/flatbuffers/tests/rust_usage_test/tests/integration_test.rs @@ -48,28 +48,28 @@ mod flexbuffers_tests; mod more_defaults_test; mod optional_scalars_test; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../include_test1/mod.rs"] pub mod include_test1_generated; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../include_test2/mod.rs"] pub mod include_test2_generated; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../namespace_test/mod.rs"] pub mod namespace_test_generated; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../monster_test/mod.rs"] mod monster_test_generated; pub use monster_test_generated::my_game; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../optional_scalars/mod.rs"] mod optional_scalars_generated; -#[allow(dead_code, unused_imports)] +#[allow(dead_code, unused_imports, clippy::all)] #[path = "../../arrays_test/mod.rs"] mod arrays_test_generated; @@ -152,8 +152,10 @@ fn object_api_defaults() { b: 0 } }); + let mut default_without_nan = MonsterT::default(); + default_without_nan.nan_default = 0.0; assert_eq!( - MonsterT::default(), + default_without_nan, MonsterT { pos: None, hp: 100, @@ -205,6 +207,14 @@ fn object_api_defaults() { native_inline: None, long_enum_non_enum_default: Default::default(), long_enum_normal_default: LongEnum::LongOne, + nan_default: 0.0, + inf_default: f32::INFINITY, + positive_inf_default: f32::INFINITY, + infinity_default: f32::INFINITY, + positive_infinity_default: f32::INFINITY, + negative_inf_default: f32::NEG_INFINITY, + negative_infinity_default: f32::NEG_INFINITY, + double_inf_default: f64::INFINITY, } ); } @@ -229,8 +239,8 @@ fn create_serialized_example_with_generated_code(builder: &mut flatbuffers::Flat name: Some(fred_name), ..Default::default() }).as_union_value()), - inventory: Some(builder.create_vector_direct(&[0u8, 1, 2, 3, 4][..])), - test4: Some(builder.create_vector_direct(&[my_game::example::Test::new(10, 20), + inventory: Some(builder.create_vector(&[0u8, 1, 2, 3, 4])), + test4: Some(builder.create_vector(&[my_game::example::Test::new(10, 20), my_game::example::Test::new(30, 40)])), testarrayofstring: Some(builder.create_vector(&[s0, s1])), ..Default::default() @@ -254,7 +264,11 @@ fn create_serialized_example_with_library_code(builder: &mut flatbuffers::FlatBu my_game::example::Test::new(30, 40)][..]); let name = builder.create_string("MyMonster"); - let testarrayofstring = builder.create_vector_of_strings(&["test1", "test2"][..]); + + let test1 = builder.create_string("test1"); + let test2 = builder.create_string("test2"); + + let testarrayofstring = builder.create_vector(&[test1, test2]); // begin building @@ -306,7 +320,7 @@ fn serialized_example_is_accessible_and_correct(bytes: &[u8], identifier_require check_eq!(m.test_type(), my_game::example::Any::Monster)?; check_is_some!(m.test())?; let table2 = m.test().unwrap(); - let monster2 = my_game::example::Monster::init_from_table(table2); + let monster2 = unsafe { my_game::example::Monster::init_from_table(table2) }; check_eq!(monster2.name(), "Fred")?; @@ -319,8 +333,8 @@ fn serialized_example_is_accessible_and_correct(bytes: &[u8], identifier_require check_is_some!(m.test4())?; let test4 = m.test4().unwrap(); check_eq!(test4.len(), 2)?; - check_eq!(test4[0].a() as i32 + test4[0].b() as i32 + - test4[1].a() as i32 + test4[1].b() as i32, 100)?; + check_eq!(test4.get(0).a() as i32 + test4.get(0).b() as i32 + + test4.get(1).a() as i32 + test4.get(1).b() as i32, 100)?; check_is_some!(m.testarrayofstring())?; let testarrayofstring = m.testarrayofstring().unwrap(); @@ -463,7 +477,7 @@ fn verifier_apparent_size_too_large() { }); b.finish(m, None); let data = b.finished_data(); - assert!(data.len() < 5100); // est 4000 for the vector + 1000 for the string + 100 overhead. + assert!(data.len() < 5200); // est 4000 for the vector + 1000 for the string + 200 overhead. let mut opts = flatbuffers::VerifierOptions::default(); opts.max_apparent_size = 1_000_000; @@ -572,16 +586,16 @@ mod lifetime_correctness { // make sure values retrieved from the 'static buffer are themselves 'static let monster: my_game::example::Monster<'static> = my_game::example::root_as_monster(slice).unwrap(); // this line should compile: - let name: Option<&'static str> = monster._tab.get::>(my_game::example::Monster::VT_NAME, None); + let name: Option<&'static str> = unsafe { monster._tab.get::>(my_game::example::Monster::VT_NAME, None) }; assert_eq!(name, Some("MyMonster")); } #[test] fn table_get_field_from_static_buffer_2() { static DATA: [u8; 4] = [0, 0, 0, 0]; // some binary data - let table: flatbuffers::Table<'static> = flatbuffers::Table::new(&DATA, 0); + let table: flatbuffers::Table<'static> = unsafe { flatbuffers::Table::new(&DATA, 0) }; // this line should compile: - table.get::<&'static str>(0, None); + unsafe { table.get::<&'static str>(0, None) }; } #[test] @@ -696,8 +710,8 @@ mod roundtrip_generated_code { let mon = my_game::example::root_as_monster(b.finished_data()).unwrap(); assert_eq!(mon.name(), "bar"); assert_eq!(mon.test_type(), my_game::example::Any::Monster); - assert_eq!(my_game::example::Monster::init_from_table(mon.test().unwrap()).name(), - "foo"); + let name = unsafe { my_game::example::Monster::init_from_table(mon.test().unwrap()).name() }; + assert_eq!(name, "foo"); assert_eq!(mon.test_as_monster().unwrap().name(), "foo"); assert_eq!(mon.test_as_test_simple_table_with_enum(), None); assert_eq!(mon.test_as_my_game_example_2_monster(), None); @@ -799,9 +813,9 @@ mod roundtrip_generated_code { let m = my_game::example::root_as_monster(b1.finished_data()).unwrap(); assert!(m.testnestedflatbuffer().is_some()); - assert_eq!(m.testnestedflatbuffer().unwrap(), b0.finished_data()); + assert_eq!(m.testnestedflatbuffer().unwrap().bytes(), b0.finished_data()); - let m2_a = my_game::example::root_as_monster(m.testnestedflatbuffer().unwrap()).unwrap(); + let m2_a = my_game::example::root_as_monster(m.testnestedflatbuffer().unwrap().bytes()).unwrap(); assert_eq!(m2_a.hp(), 123); assert_eq!(m2_a.name(), "foobar"); @@ -821,7 +835,8 @@ mod roundtrip_generated_code { #[test] fn vector_of_string_store_helper_build() { let mut b = flatbuffers::FlatBufferBuilder::new(); - let v = b.create_vector_of_strings(&["foobar", "baz"]); + let strings = &[b.create_string("foobar"), b.create_string("baz")]; + let v = b.create_vector(strings); let name = b.create_string("foo"); let m = build_mon(&mut b, &my_game::example::MonsterArgs{ name: Some(name), @@ -874,8 +889,9 @@ mod roundtrip_generated_code { let name = b.create_string("foo"); let m = build_mon(&mut b, &my_game::example::MonsterArgs{ name: Some(name), - inventory: Some(v), ..Default::default()}); - assert_eq!(m.inventory().unwrap(), &[123, 234][..]); + inventory: Some(v), ..Default::default() + }); + assert_eq!(m.inventory().unwrap().bytes(), &[123, 234]); } #[test] fn vector_of_bool_store() { @@ -885,14 +901,13 @@ mod roundtrip_generated_code { let m = build_mon(&mut b, &my_game::example::MonsterArgs{ name: Some(name), testarrayofbools: Some(v), ..Default::default()}); - assert_eq!(m.testarrayofbools().unwrap(), &[false, true, false, true][..]); let rust_vec_inst = m.testarrayofbools().unwrap(); let rust_vec_iter_collect = rust_vec_inst.iter().collect::>(); - assert_eq!(rust_vec_iter_collect, &[&false, &true, &false, &true][..]); + assert_eq!(&rust_vec_iter_collect, &[false, true, false, true]); let rust_vec_iter_rev_collect = rust_vec_inst.iter().rev().collect::>(); - assert_eq!(rust_vec_iter_rev_collect, &[&true, &false, &true, &false][..]); + assert_eq!(&rust_vec_iter_rev_collect, &[true, false, true, false]); } #[test] fn vector_of_f64_store() { @@ -922,7 +937,6 @@ mod roundtrip_generated_code { let m = build_mon(&mut b, &my_game::example::MonsterArgs{ name: Some(name), test4: Some(v), ..Default::default()}); - assert_eq!(m.test4().unwrap(), &[my_game::example::Test::new(127, -128), my_game::example::Test::new(3, 123)][..]); let rust_vec_inst = m.test4().unwrap(); let rust_vec_iter_collect = rust_vec_inst.iter().collect::>(); @@ -941,7 +955,8 @@ mod roundtrip_generated_code { let m = build_mon(&mut b, &my_game::example::MonsterArgs{ name: Some(name), test4: Some(v), ..Default::default()}); - assert_eq!(m.test4().unwrap(), &[my_game::example::Test::new(127, -128), my_game::example::Test::new(3, 123), my_game::example::Test::new(100, 101)][..]); + let vals: Vec<_> = m.test4().unwrap().iter().collect::>(); + assert_eq!(vals, vec![&my_game::example::Test::new(127, -128), &my_game::example::Test::new(3, 123), &my_game::example::Test::new(100, 101)]); } #[test] fn vector_of_enums_store() { @@ -1088,56 +1103,6 @@ mod generated_code_alignment_and_padding { } } -#[cfg(test)] -mod roundtrip_byteswap { - #[cfg(not(miri))] // slow. - extern crate quickcheck; - extern crate flatbuffers; - - const N: u64 = 10000; - - fn palindrome_32(x: f32) -> bool { - x == f32::from_bits(x.to_bits().swap_bytes()) - } - fn palindrome_64(x: f64) -> bool { - x == f64::from_bits(x.to_bits().swap_bytes()) - } - - fn prop_f32(x: f32) { - use flatbuffers::byte_swap_f32; - - let there = byte_swap_f32(x); - - let back_again = byte_swap_f32(there); - - if !palindrome_32(x) { - assert!(x != there); - } - - assert_eq!(x, back_again); - } - - fn prop_f64(x: f64) { - use flatbuffers::byte_swap_f64; - - let there = byte_swap_f64(x); - let back_again = byte_swap_f64(there); - - if !palindrome_64(x) { - assert!(x != there); - } - - assert_eq!(x, back_again); - } - - // TODO(rw): Replace the implementations with the new stdlib endian-conversion functions. - // TODO(rw): Re-enable these tests (currently, rare CI failures occur that seem spurious). - // #[test] - // fn fuzz_f32() { quickcheck::QuickCheck::new().max_tests(N).quickcheck(prop_f32 as fn(f32)); } - // #[test] - // fn fuzz_f64() { quickcheck::QuickCheck::new().max_tests(N).quickcheck(prop_f64 as fn(f64)); } -} - #[cfg(not(miri))] quickcheck! { fn struct_of_structs( @@ -1204,7 +1169,7 @@ mod roundtrip_vectors { let buf = b.finished_data(); - let got = >>::follow(&buf[..], 0); + let got = unsafe { >>::follow(&buf[..], 0) }; let mut result_vec: Vec = Vec::with_capacity(got.len()); for i in 0..got.len() { result_vec.push(got.get(i)); @@ -1252,54 +1217,6 @@ mod roundtrip_vectors { fn fuzz_f64() { quickcheck::QuickCheck::new().max_tests(N).quickcheck(prop:: as fn(Vec<_>)); } } - #[cfg(test)] - mod create_vector_direct { - #[cfg(not(miri))] // slow. - extern crate quickcheck; - extern crate flatbuffers; - - const N: u64 = 20; - - // This uses a macro because lifetimes for the trait-bounded function get too - // complicated. - macro_rules! impl_prop { - ($test_name:ident, $fn_name:ident, $ty:ident) => ( - fn $fn_name(xs: alloc::vec::Vec<$ty>) { - use flatbuffers::Follow; - - let mut b = flatbuffers::FlatBufferBuilder::new(); - b.create_vector_direct(&xs[..]); - let buf = b.unfinished_data(); - - let got = >::follow(&buf[..], 0).safe_slice(); - assert_eq!(got, &xs[..]); - } - #[test] - fn $test_name() { quickcheck::QuickCheck::new().max_tests(N).quickcheck($fn_name as fn(alloc::vec::Vec<_>)); } - ) - } - - impl_prop!(test_bool, prop_bool, bool); - impl_prop!(test_u8, prop_u8, u8); - impl_prop!(test_i8, prop_i8, i8); - - #[cfg(test)] - #[cfg(target_endian = "little")] - mod host_is_le { - const N: u64 = 20; - use super::flatbuffers; - use super::quickcheck; - impl_prop!(test_u16, prop_u16, u16); - impl_prop!(test_u32, prop_u32, u32); - impl_prop!(test_u64, prop_u64, u64); - impl_prop!(test_i16, prop_i16, i16); - impl_prop!(test_i32, prop_i32, i32); - impl_prop!(test_i64, prop_i64, i64); - impl_prop!(test_f32, prop_f32, f32); - impl_prop!(test_f64, prop_f64, f64); - } - } - #[cfg(test)] mod string_manual_build { #[cfg(not(miri))] // slow. @@ -1327,7 +1244,7 @@ mod roundtrip_vectors { b.finish_minimal(vecend); let buf = b.finished_data(); - let got = >>>::follow(buf, 0); + let got = unsafe { >>>::follow(buf, 0) }; assert_eq!(got.len(), xs.len()); for i in 0..xs.len() { @@ -1351,21 +1268,20 @@ mod roundtrip_vectors { use alloc::vec::Vec; fn prop(input: Vec) { - let xs: Vec<&str> = input.iter().map(|s: &String| &s[..]).collect(); - use flatbuffers::Follow; let mut b = flatbuffers::FlatBufferBuilder::new(); - let vecend = b.create_vector_of_strings(&xs[..]); + let xs: Vec<_> = input.iter().map(|s: &String| b.create_string(s)).collect(); + let vecend = b.create_vector(&xs); b.finish_minimal(vecend); let buf = b.finished_data(); - let got = >>>::follow(buf, 0); + let got = unsafe { >>>::follow(buf, 0) }; assert_eq!(got.len(), xs.len()); - for i in 0..xs.len() { - assert_eq!(got.get(i), &xs[i][..]); + for (idx, s) in input.iter().enumerate() { + assert_eq!(got.get(idx), s); } } @@ -1516,7 +1432,7 @@ mod roundtrip_table { let table = { let buf = builder.unfinished_data(); let loc = buf.len() as flatbuffers::UOffsetT - objects[i]; - flatbuffers::Table::new(buf, loc as usize) + unsafe { flatbuffers::Table::new(buf, loc as usize) } }; let fields_per_object = (lcg.next() % (max_fields_per_object as u64)) as flatbuffers::VOffsetT; @@ -1528,19 +1444,21 @@ mod roundtrip_table { let f = flatbuffers::field_index_to_field_offset(j); - match choice { - 0 => { assert_eq!(bool_val, table.get::(f, Some(false)).unwrap()); } - 1 => { assert_eq!(char_val, table.get::(f, Some(0)).unwrap()); } - 2 => { assert_eq!(uchar_val, table.get::(f, Some(0)).unwrap()); } - 3 => { assert_eq!(short_val, table.get::(f, Some(0)).unwrap()); } - 4 => { assert_eq!(ushort_val, table.get::(f, Some(0)).unwrap()); } - 5 => { assert_eq!(int_val, table.get::(f, Some(0)).unwrap()); } - 6 => { assert_eq!(uint_val, table.get::(f, Some(0)).unwrap()); } - 7 => { assert_eq!(long_val, table.get::(f, Some(0)).unwrap()); } - 8 => { assert_eq!(ulong_val, table.get::(f, Some(0)).unwrap()); } - 9 => { assert_eq!(float_val, table.get::(f, Some(0.0)).unwrap()); } - 10 => { assert_eq!(double_val, table.get::(f, Some(0.0)).unwrap()); } - _ => { panic!("unknown choice: {}", choice); } + unsafe { + match choice { + 0 => { assert_eq!(bool_val, table.get::(f, Some(false)).unwrap()); } + 1 => { assert_eq!(char_val, table.get::(f, Some(0)).unwrap()); } + 2 => { assert_eq!(uchar_val, table.get::(f, Some(0)).unwrap()); } + 3 => { assert_eq!(short_val, table.get::(f, Some(0)).unwrap()); } + 4 => { assert_eq!(ushort_val, table.get::(f, Some(0)).unwrap()); } + 5 => { assert_eq!(int_val, table.get::(f, Some(0)).unwrap()); } + 6 => { assert_eq!(uint_val, table.get::(f, Some(0)).unwrap()); } + 7 => { assert_eq!(long_val, table.get::(f, Some(0)).unwrap()); } + 8 => { assert_eq!(ulong_val, table.get::(f, Some(0)).unwrap()); } + 9 => { assert_eq!(float_val, table.get::(f, Some(0.0)).unwrap()); } + 10 => { assert_eq!(double_val, table.get::(f, Some(0.0)).unwrap()); } + _ => { panic!("unknown choice: {}", choice); } + } } } } @@ -1576,13 +1494,13 @@ mod roundtrip_table { // use let buf = b.finished_data(); - let tab = >::follow(buf, 0); + let tab = unsafe { >::follow(buf, 0) }; for i in 0..xs.len() { - let v = tab.get::>>(fi2fo(i as flatbuffers::VOffsetT), None); + let v = unsafe { tab.get::>>(fi2fo(i as flatbuffers::VOffsetT), None) }; assert!(v.is_some()); - let v2 = v.unwrap().safe_slice(); - assert_eq!(v2, &xs[i][..]); + let v2 = v.unwrap(); + assert_eq!(v2.bytes(), &xs[i]); } } prop(vec![vec![1,2,3]]); @@ -1613,10 +1531,10 @@ mod roundtrip_table { // use let buf = b.finished_data(); - let tab = >::follow(buf, 0); + let tab = unsafe { >::follow(buf, 0) }; for i in 0..xs.len() { - let v = tab.get::>(fi2fo(i as flatbuffers::VOffsetT), None); + let v = unsafe { tab.get::>(fi2fo(i as flatbuffers::VOffsetT), None) }; assert_eq!(v, Some(&xs[i][..])); } } @@ -1669,10 +1587,10 @@ mod roundtrip_table { // use let buf = b.finished_data(); - let tab = >::follow(buf, 0); + let tab = unsafe { >::follow(buf, 0) }; for i in 0..vecs.len() { - let got = tab.get::>>(fi2fo(i as flatbuffers::VOffsetT), None); + let got = unsafe { tab.get::>>(fi2fo(i as flatbuffers::VOffsetT), None) }; assert!(got.is_some()); let got2 = got.unwrap(); let mut got3: Vec = Vec::with_capacity(got2.len()); @@ -1774,9 +1692,9 @@ mod roundtrip_push_follow_scalars { ($fn_name:ident, $ty:ident) => ( fn $fn_name(x: $ty) { let mut buf = vec![0u8; ::core::mem::size_of::<$ty>()]; - x.push(&mut buf[..], &[][..]); + unsafe { x.push(&mut buf[..], 0) }; let fs: flatbuffers::FollowStart<$ty> = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&buf[..], 0), x); + assert_eq!(unsafe { fs.self_follow(&buf[..], 0) }, x); } ) } @@ -1866,7 +1784,10 @@ mod write_and_read_examples { vector_of_enums: None, signed_enum: None, \ testrequirednestedflatbuffer: None, scalar_key_sorted_tables: None, \ native_inline: None, long_enum_non_enum_default: (empty), \ - long_enum_normal_default: LongOne }, \ + long_enum_normal_default: LongOne, nan_default: NaN, inf_default: \ + inf, positive_inf_default: inf, infinity_default: inf, \ + positive_infinity_default: inf, negative_inf_default: -inf, \ + negative_infinity_default: -inf, double_inf_default: inf }, \ test4: Some([Test { a: 10, b: 20 }, Test { a: 30, b: 40 }]), \ testarrayofstring: Some([\"test1\", \"test2\"]), \ testarrayoftables: None, enemy: None, testnestedflatbuffer: None, \ @@ -1886,7 +1807,10 @@ mod write_and_read_examples { vector_of_enums: None, signed_enum: None, \ testrequirednestedflatbuffer: None, scalar_key_sorted_tables: None, \ native_inline: None, long_enum_non_enum_default: (empty), \ - long_enum_normal_default: LongOne }" + long_enum_normal_default: LongOne, nan_default: NaN, inf_default: \ + inf, positive_inf_default: inf, infinity_default: inf, \ + positive_infinity_default: inf, negative_inf_default: -inf, \ + negative_infinity_default: -inf, double_inf_default: inf }" ); } @@ -2120,7 +2044,7 @@ mod builder_asserts { struct foo { } impl<'b> flatbuffers::Push for &'b foo { type Output = foo; - fn push<'a>(&'a self, _dst: &'a mut [u8], _rest: &'a [u8]) { } + unsafe fn push<'a>(&'a self, _dst: &'a mut [u8], _written_len: usize) { } } let mut b = flatbuffers::FlatBufferBuilder::new(); b.push_slot_always(0, &foo{}); @@ -2173,18 +2097,17 @@ mod follow_impls { } } } - impl flatbuffers::SafeSliceAccess for FooStruct {} impl<'a> flatbuffers::Follow<'a> for FooStruct { type Inner = &'a FooStruct; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { <&'a FooStruct>::follow(buf, loc) } } impl<'a> flatbuffers::Follow<'a> for &'a FooStruct { type Inner = &'a FooStruct; #[inline(always)] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { flatbuffers::follow_cast_ref::(buf, loc) } } @@ -2193,88 +2116,67 @@ mod follow_impls { fn to_u8() { let vec: Vec = vec![255, 3]; let fs: flatbuffers::FollowStart = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&vec[..], 1), 3); + assert_eq!(unsafe { fs.self_follow(&vec[..], 1) }, 3); } #[test] fn to_u16() { let vec: Vec = vec![255, 255, 3, 4]; let fs: flatbuffers::FollowStart = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&vec[..], 2), 1027); + assert_eq!(unsafe { fs.self_follow(&vec[..], 2) }, 1027); } #[test] fn to_f32() { let vec: Vec = vec![255, 255, 255, 255, /* start of value */ 208, 15, 73, 64]; let fs: flatbuffers::FollowStart = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&vec[..], 4), 3.14159); + assert_eq!(unsafe { fs.self_follow(&vec[..], 4) }, 3.14159); } #[test] fn to_string() { let vec: Vec = vec![255,255,255,255, 3, 0, 0, 0, 'f' as u8, 'o' as u8, 'o' as u8, 0]; let off: flatbuffers::FollowStart<&str> = flatbuffers::FollowStart::new(); - assert_eq!(off.self_follow(&vec[..], 4), "foo"); + assert_eq!(unsafe { off.self_follow(&vec[..], 4) }, "foo"); } #[test] fn to_byte_slice() { let vec: Vec = vec![255, 255, 255, 255, 4, 0, 0, 0, 1, 2, 3, 4]; let off: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(off.self_follow(&vec[..], 4).safe_slice(), &[1, 2, 3, 4][..]); - } - - #[test] - fn to_byte_vector() { - let vec: Vec = vec![255, 255, 255, 255, 4, 0, 0, 0, 1, 2, 3, 4]; - let off: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(off.self_follow(&vec[..], 4).safe_slice(), &[1, 2, 3, 4][..]); - } - - #[test] - fn to_byte_string_zero_teriminated() { - let vec: Vec = vec![255, 255, 255, 255, 3, 0, 0, 0, 1, 2, 3, 0]; - let off: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(off.self_follow(&vec[..], 4).safe_slice(), &[1, 2, 3][..]); + assert_eq!(unsafe { off.self_follow(&vec[..], 4).bytes() }, &[1, 2, 3, 4][..]); } #[test] fn to_vector_of_u16() { let vec: Vec = vec![255, 255, 255, 255, 2, 0, 0, 0, 1, 2, 3, 4]; let off: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(off.self_follow(&vec[..], 4).len(), 2); - assert_eq!(off.self_follow(&vec[..], 4).get(0), 513); - assert_eq!(off.self_follow(&vec[..], 4).get(1), 1027); + assert_eq!(unsafe { off.self_follow(&vec[..], 4).len() }, 2); + assert_eq!(unsafe { off.self_follow(&vec[..], 4).get(0) }, 513); + assert_eq!(unsafe { off.self_follow(&vec[..], 4).get(1) }, 1027); } #[test] fn to_struct() { let vec: Vec = vec![255, 255, 255, 255, 1, 2, 3, 4]; let off: flatbuffers::FollowStart<&FooStruct> = flatbuffers::FollowStart::new(); - assert_eq!(*off.self_follow(&vec[..], 4), FooStruct::new(1, 2, 1027)); + assert_eq!(unsafe { *off.self_follow(&vec[..], 4) }, FooStruct::new(1, 2, 1027)); } #[test] fn to_vector_of_offset_to_string_elements() { let buf: Vec = vec![/* vec len */ 1, 0, 0, 0, /* offset to string */ 4, 0, 0, 0, /* str length */ 3, 0, 0, 0, 'f' as u8, 'o' as u8, 'o' as u8, 0]; let s: flatbuffers::FollowStart>> = flatbuffers::FollowStart::new(); - assert_eq!(s.self_follow(&buf[..], 0).len(), 1); - assert_eq!(s.self_follow(&buf[..], 0).get(0), "foo"); - } - - #[test] - fn to_slice_of_struct_elements() { - let buf: Vec = vec![1, 0, 0, 0, /* struct data */ 1, 2, 3, 4]; - let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&buf[..], 0).safe_slice(), &vec![FooStruct::new(1, 2, 1027)][..]); + assert_eq!(unsafe {s.self_follow(&buf[..], 0).len() }, 1); + assert_eq!(unsafe { s.self_follow(&buf[..], 0).get(0) }, "foo"); } #[test] fn to_vector_of_struct_elements() { let buf: Vec = vec![1, 0, 0, 0, /* struct data */ 1, 2, 3, 4]; let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&buf[..], 0).len(), 1); - assert_eq!(fs.self_follow(&buf[..], 0).get(0), &FooStruct::new(1, 2, 1027)); + assert_eq!(unsafe { fs.self_follow(&buf[..], 0).len() }, 1); + assert_eq!(unsafe { fs.self_follow(&buf[..], 0).get(0) }, &FooStruct::new(1, 2, 1027)); } #[test] @@ -2288,8 +2190,10 @@ mod follow_impls { // enter table 8, 0, 0, 0, // vtable location ]; - let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - assert_eq!(fs.self_follow(&buf[..], 0), flatbuffers::Table::new(&buf[..], 12)); + unsafe { + let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); + assert_eq!(fs.self_follow(&buf[..], 0), flatbuffers::Table::new(&buf[..], 12)); + } } #[test] @@ -2305,9 +2209,11 @@ mod follow_impls { 10, 0, 0, 0, // vtable location 0, 99 // value (with padding) ]; - let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - let tab = fs.self_follow(&buf[..], 0); - assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(99)); + unsafe { + let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); + let tab = fs.self_follow(&buf[..], 0); + assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(99)); + } } #[test] @@ -2321,9 +2227,11 @@ mod follow_impls { // enter table 8, 0, 0, 0, // vtable location ]; - let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - let tab = fs.self_follow(&buf[..], 0); - assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(123)); + unsafe { + let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); + let tab = fs.self_follow(&buf[..], 0); + assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(123)); + } } #[test] @@ -2338,9 +2246,11 @@ mod follow_impls { // enter table 10, 0, 0, 0, // vtable location ]; - let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); - let tab = fs.self_follow(&buf[..], 0); - assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(123)); + unsafe { + let fs: flatbuffers::FollowStart> = flatbuffers::FollowStart::new(); + let tab = fs.self_follow(&buf[..], 0); + assert_eq!(tab.get::(fi2fo(0), Some(123)), Some(123)); + } } #[test] @@ -2360,15 +2270,17 @@ mod follow_impls { // enter string 3, 0, 0, 0, 109, 111, 111, 0 // string length and contents ]; - let tab = >::follow(&buf[..], 0); - assert_eq!(tab.get::>(fi2fo(0), None), Some("moo")); - let byte_vec = tab.get::>>(fi2fo(0), None).unwrap().safe_slice(); - assert_eq!(byte_vec, &vec![109, 111, 111][..]); - let v = tab.get::>>(fi2fo(0), None).unwrap(); - assert_eq!(v.len(), 3); - assert_eq!(v.get(0), 109); - assert_eq!(v.get(1), 111); - assert_eq!(v.get(2), 111); + unsafe { + let tab = >::follow(&buf[..], 0); + assert_eq!(tab.get::>(fi2fo(0), None), Some("moo")); + let byte_vec = tab.get::>>(fi2fo(0), None).unwrap().bytes(); + assert_eq!(byte_vec, &vec![109, 111, 111][..]); + let v = tab.get::>>(fi2fo(0), None).unwrap(); + assert_eq!(v.len(), 3); + assert_eq!(v.get(0), 109); + assert_eq!(v.get(1), 111); + assert_eq!(v.get(2), 111); + } } #[test] @@ -2382,20 +2294,23 @@ mod follow_impls { // enter table 8, 0, 0, 0, // vtable location ]; - let tab = >::follow(&buf[..], 0); - assert_eq!(tab.get::>(fi2fo(0), Some("abc")), Some("abc")); - #[cfg(target_endian = "little")] - { - assert_eq!(tab.get::>(fi2fo(0), Some(&vec![70, 71, 72][..])), Some(&vec![70, 71, 72][..])); - } - let default_vec_buf: Vec = vec![3, 0, 0, 0, 70, 71, 72, 0]; - let default_vec = flatbuffers::Vector::new(&default_vec_buf[..], 0); - let v = tab.get::>>(fi2fo(0), Some(default_vec)).unwrap(); - assert_eq!(v.len(), 3); - assert_eq!(v.get(0), 70); - assert_eq!(v.get(1), 71); - assert_eq!(v.get(2), 72); + unsafe { + let tab = >::follow(&buf[..], 0); + assert_eq!(tab.get::>(fi2fo(0), Some("abc")), Some("abc")); + #[cfg(target_endian = "little")] + { + assert_eq!(tab.get::>(fi2fo(0), Some(&vec![70, 71, 72][..])), Some(&vec![70, 71, 72][..])); + } + + let default_vec_buf: Vec = vec![3, 0, 0, 0, 70, 71, 72, 0]; + let default_vec = flatbuffers::Vector::new(&default_vec_buf[..], 0); + let v = tab.get::>>(fi2fo(0), Some(default_vec)).unwrap(); + assert_eq!(v.len(), 3); + assert_eq!(v.get(0), 70); + assert_eq!(v.get(1), 71); + assert_eq!(v.get(2), 72); + } } #[test] @@ -2410,20 +2325,22 @@ mod follow_impls { // enter table 10, 0, 0, 0, // vtable location ]; - let tab = >::follow(&buf[..], 0); - assert_eq!(tab.get::>(fi2fo(0), Some("abc")), Some("abc")); - #[cfg(target_endian = "little")] - { - assert_eq!(tab.get::>(fi2fo(0), Some(&vec![70, 71, 72][..])), Some(&vec![70, 71, 72][..])); - } + unsafe { + let tab = >::follow(&buf[..], 0); + assert_eq!(tab.get::>(fi2fo(0), Some("abc")), Some("abc")); + #[cfg(target_endian = "little")] + { + assert_eq!(tab.get::>(fi2fo(0), Some(&vec![70, 71, 72][..])), Some(&vec![70, 71, 72][..])); + } - let default_vec_buf: Vec = vec![3, 0, 0, 0, 70, 71, 72, 0]; - let default_vec = flatbuffers::Vector::new(&default_vec_buf[..], 0); - let v = tab.get::>>(fi2fo(0), Some(default_vec)).unwrap(); - assert_eq!(v.len(), 3); - assert_eq!(v.get(0), 70); - assert_eq!(v.get(1), 71); - assert_eq!(v.get(2), 72); + let default_vec_buf: Vec = vec![3, 0, 0, 0, 70, 71, 72, 0]; + let default_vec = flatbuffers::Vector::new(&default_vec_buf[..], 0); + let v = tab.get::>>(fi2fo(0), Some(default_vec)).unwrap(); + assert_eq!(v.len(), 3); + assert_eq!(v.get(0), 70); + assert_eq!(v.get(1), 71); + assert_eq!(v.get(2), 72); + } } } @@ -2923,10 +2840,8 @@ mod byte_layouts { assert_eq!(::core::mem::size_of::(), 16); impl<'b> flatbuffers::Push for &'b foo { type Output = foo; - fn push<'a>(&'a self, dst: &'a mut [u8], _rest: &'a [u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const foo as *const u8, ::core::mem::size_of::()) - }; + unsafe fn push<'a>(&'a self, dst: &'a mut [u8], _written_len: usize) { + let src = ::core::slice::from_raw_parts(*self as *const foo as *const u8, ::core::mem::size_of::()); dst.copy_from_slice(src); } } diff --git a/third_party/flatbuffers/tests/swift/Wasm.tests/Package.swift b/third_party/flatbuffers/tests/swift/Wasm.tests/Package.swift index 6d3b1645a6..bd32307ef1 100644 --- a/third_party/flatbuffers/tests/swift/Wasm.tests/Package.swift +++ b/third_party/flatbuffers/tests/swift/Wasm.tests/Package.swift @@ -23,7 +23,7 @@ let package = Package( .macOS(.v10_14), ], dependencies: [ - .package(path: "../../../swift"), + .package(path: "../../.."), ], targets: [ .target( diff --git a/third_party/flatbuffers/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/monster_test_generated.swift b/third_party/flatbuffers/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/monster_test_generated.swift index d37a5bb782..ef7d697a85 100644 --- a/third_party/flatbuffers/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/monster_test_generated.swift +++ b/third_party/flatbuffers/tests/swift/Wasm.tests/Tests/FlatBuffers.Test.Swift.WasmTests/monster_test_generated.swift @@ -237,7 +237,7 @@ public struct MyGame_Example_AnyAmbiguousAliasesUnion { } public struct MyGame_Example_Test: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: Int16 private var _b: Int8 @@ -291,7 +291,7 @@ extension MyGame_Example_Test: Encodable { public struct MyGame_Example_Test_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -318,7 +318,7 @@ public struct MyGame_Example_Test_Mutable: FlatBufferObject { public struct MyGame_Example_Vec3: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _x: Float32 private var _y: Float32 @@ -413,7 +413,7 @@ extension MyGame_Example_Vec3: Encodable { public struct MyGame_Example_Vec3_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -447,7 +447,7 @@ public struct MyGame_Example_Vec3_Mutable: FlatBufferObject { public struct MyGame_Example_Ability: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _id: UInt32 private var _distance: UInt32 @@ -500,7 +500,7 @@ extension MyGame_Example_Ability: Encodable { public struct MyGame_Example_Ability_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -527,7 +527,7 @@ public struct MyGame_Example_Ability_Mutable: FlatBufferObject { public struct MyGame_Example_StructOfStructs: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: MyGame_Example_Ability private var _b: MyGame_Example_Test @@ -587,7 +587,7 @@ extension MyGame_Example_StructOfStructs: Encodable { public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -613,7 +613,7 @@ public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject { public struct MyGame_Example_StructOfStructsOfStructs: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: MyGame_Example_StructOfStructs @@ -655,7 +655,7 @@ extension MyGame_Example_StructOfStructsOfStructs: Encodable { public struct MyGame_Example_StructOfStructsOfStructs_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -679,7 +679,7 @@ public struct MyGame_Example_StructOfStructsOfStructs_Mutable: FlatBufferObject public struct MyGame_InParentNamespace: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -733,7 +733,7 @@ public class MyGame_InParentNamespaceT: NativeObject { } public struct MyGame_Example2_Monster: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -787,7 +787,7 @@ public class MyGame_Example2_MonsterT: NativeObject { } internal struct MyGame_Example_TestSimpleTableWithEnum: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } internal var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -870,7 +870,7 @@ internal class MyGame_Example_TestSimpleTableWithEnumT: NativeObject { } public struct MyGame_Example_Stat: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -1011,7 +1011,7 @@ public class MyGame_Example_StatT: NativeObject { } public struct MyGame_Example_Referrable: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -1119,7 +1119,7 @@ public class MyGame_Example_ReferrableT: NativeObject { /// an example documentation comment: "monster object" public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -2297,7 +2297,7 @@ public class MyGame_Example_MonsterT: NativeObject { } public struct MyGame_Example_TypeAliases: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/benchmarks/Package.swift b/third_party/flatbuffers/tests/swift/benchmarks/Package.swift index d7114932b7..c4913b784a 100644 --- a/third_party/flatbuffers/tests/swift/benchmarks/Package.swift +++ b/third_party/flatbuffers/tests/swift/benchmarks/Package.swift @@ -23,7 +23,7 @@ let package = Package( .macOS(.v10_14), ], dependencies: [ - .package(path: "../../../swift"), + .package(path: "../../.."), .package(url: "https://github.com/google/swift-benchmark", from: "0.1.0"), ], targets: [ diff --git a/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_import_generated.swift b/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_import_generated.swift index 4e160ca1fd..dbc4cf7854 100644 --- a/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_import_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_import_generated.swift @@ -6,7 +6,7 @@ internal struct Message: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } internal var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_no_include_generated.swift b/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_no_include_generated.swift index 3348b051c7..3b52d1adb9 100644 --- a/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_no_include_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/CodeGenerationTests/test_no_include_generated.swift @@ -4,7 +4,7 @@ public struct BytesCount: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _x: Int64 @@ -47,7 +47,7 @@ extension BytesCount: Encodable { public struct BytesCount_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -72,7 +72,7 @@ public struct BytesCount_Mutable: FlatBufferObject { public struct InternalMessage: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -157,7 +157,7 @@ public class InternalMessageT: NativeObject { } public struct Message: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Package.swift b/third_party/flatbuffers/tests/swift/tests/Package.swift index 64fcd54029..8b91712b4d 100644 --- a/third_party/flatbuffers/tests/swift/tests/Package.swift +++ b/third_party/flatbuffers/tests/swift/tests/Package.swift @@ -24,7 +24,7 @@ let package = Package( .macOS(.v10_14), ], dependencies: [ - .package(path: "../../../swift"), + .package(path: "../../.."), .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.4.1"), ], targets: [ diff --git a/third_party/flatbuffers/tests/swift/tests/Sources/SwiftFlatBuffers/fuzzer_generated.swift b/third_party/flatbuffers/tests/swift/tests/Sources/SwiftFlatBuffers/fuzzer_generated.swift index fe7ca0b00b..a0338642c1 100644 --- a/third_party/flatbuffers/tests/swift/tests/Sources/SwiftFlatBuffers/fuzzer_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Sources/SwiftFlatBuffers/fuzzer_generated.swift @@ -32,7 +32,7 @@ extension Color: Encodable { public struct Test: NativeStruct, Verifiable, FlatbuffersInitializable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: Int16 private var _b: Int8 @@ -81,7 +81,7 @@ extension Test: Encodable { public struct Test_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -93,7 +93,7 @@ public struct Test_Mutable: FlatBufferObject { public struct Vec3: NativeStruct, Verifiable, FlatbuffersInitializable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _x: Float32 private var _y: Float32 @@ -178,7 +178,7 @@ extension Vec3: Encodable { public struct Vec3_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -195,7 +195,7 @@ public struct Vec3_Mutable: FlatBufferObject { /// an example documentation comment: "monster object" public struct Monster: FlatBufferObject, Verifiable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/MutatingBool_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/MutatingBool_generated.swift index 4c243d9302..ff37e3b4ae 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/MutatingBool_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/MutatingBool_generated.swift @@ -6,7 +6,7 @@ import FlatBuffers public struct Property: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _property: Bool @@ -49,7 +49,7 @@ extension Property: Encodable { public struct Property_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -74,7 +74,7 @@ public struct Property_Mutable: FlatBufferObject { public struct TestMutatingBool: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/monster_test_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/monster_test_generated.swift index d37a5bb782..18d227f923 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/monster_test_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/monster_test_generated.swift @@ -237,7 +237,7 @@ public struct MyGame_Example_AnyAmbiguousAliasesUnion { } public struct MyGame_Example_Test: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: Int16 private var _b: Int8 @@ -291,7 +291,7 @@ extension MyGame_Example_Test: Encodable { public struct MyGame_Example_Test_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -318,7 +318,7 @@ public struct MyGame_Example_Test_Mutable: FlatBufferObject { public struct MyGame_Example_Vec3: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _x: Float32 private var _y: Float32 @@ -413,7 +413,7 @@ extension MyGame_Example_Vec3: Encodable { public struct MyGame_Example_Vec3_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -447,7 +447,7 @@ public struct MyGame_Example_Vec3_Mutable: FlatBufferObject { public struct MyGame_Example_Ability: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _id: UInt32 private var _distance: UInt32 @@ -500,7 +500,7 @@ extension MyGame_Example_Ability: Encodable { public struct MyGame_Example_Ability_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -527,7 +527,7 @@ public struct MyGame_Example_Ability_Mutable: FlatBufferObject { public struct MyGame_Example_StructOfStructs: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: MyGame_Example_Ability private var _b: MyGame_Example_Test @@ -587,7 +587,7 @@ extension MyGame_Example_StructOfStructs: Encodable { public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -613,7 +613,7 @@ public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject { public struct MyGame_Example_StructOfStructsOfStructs: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _a: MyGame_Example_StructOfStructs @@ -655,7 +655,7 @@ extension MyGame_Example_StructOfStructsOfStructs: Encodable { public struct MyGame_Example_StructOfStructsOfStructs_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -679,7 +679,7 @@ public struct MyGame_Example_StructOfStructsOfStructs_Mutable: FlatBufferObject public struct MyGame_InParentNamespace: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -733,7 +733,7 @@ public class MyGame_InParentNamespaceT: NativeObject { } public struct MyGame_Example2_Monster: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -787,7 +787,7 @@ public class MyGame_Example2_MonsterT: NativeObject { } internal struct MyGame_Example_TestSimpleTableWithEnum: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } internal var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -870,7 +870,7 @@ internal class MyGame_Example_TestSimpleTableWithEnumT: NativeObject { } public struct MyGame_Example_Stat: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -1011,7 +1011,7 @@ public class MyGame_Example_StatT: NativeObject { } public struct MyGame_Example_Referrable: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -1119,7 +1119,7 @@ public class MyGame_Example_ReferrableT: NativeObject { /// an example documentation comment: "monster object" public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -1184,6 +1184,14 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac case nativeInline = 106 case longEnumNonEnumDefault = 108 case longEnumNormalDefault = 110 + case nanDefault = 112 + case infDefault = 114 + case positiveInfDefault = 116 + case infinityDefault = 118 + case positiveInfinityDefault = 120 + case negativeInfDefault = 122 + case negativeInfinityDefault = 124 + case doubleInfDefault = 126 var v: Int32 { Int32(self.rawValue) } var p: VOffset { self.rawValue } } @@ -1334,7 +1342,23 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac @discardableResult public func mutate(longEnumNonEnumDefault: MyGame_Example_LongEnum) -> Bool {let o = _accessor.offset(VTOFFSET.longEnumNonEnumDefault.v); return _accessor.mutate(longEnumNonEnumDefault.rawValue, index: o) } public var longEnumNormalDefault: MyGame_Example_LongEnum { let o = _accessor.offset(VTOFFSET.longEnumNormalDefault.v); return o == 0 ? .longone : MyGame_Example_LongEnum(rawValue: _accessor.readBuffer(of: UInt64.self, at: o)) ?? .longone } @discardableResult public func mutate(longEnumNormalDefault: MyGame_Example_LongEnum) -> Bool {let o = _accessor.offset(VTOFFSET.longEnumNormalDefault.v); return _accessor.mutate(longEnumNormalDefault.rawValue, index: o) } - public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 54) } + public var nanDefault: Float32 { let o = _accessor.offset(VTOFFSET.nanDefault.v); return o == 0 ? nan : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(nanDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.nanDefault.v); return _accessor.mutate(nanDefault, index: o) } + public var infDefault: Float32 { let o = _accessor.offset(VTOFFSET.infDefault.v); return o == 0 ? inf : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(infDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.infDefault.v); return _accessor.mutate(infDefault, index: o) } + public var positiveInfDefault: Float32 { let o = _accessor.offset(VTOFFSET.positiveInfDefault.v); return o == 0 ? +inf : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(positiveInfDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.positiveInfDefault.v); return _accessor.mutate(positiveInfDefault, index: o) } + public var infinityDefault: Float32 { let o = _accessor.offset(VTOFFSET.infinityDefault.v); return o == 0 ? infinity : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(infinityDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.infinityDefault.v); return _accessor.mutate(infinityDefault, index: o) } + public var positiveInfinityDefault: Float32 { let o = _accessor.offset(VTOFFSET.positiveInfinityDefault.v); return o == 0 ? +infinity : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(positiveInfinityDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.positiveInfinityDefault.v); return _accessor.mutate(positiveInfinityDefault, index: o) } + public var negativeInfDefault: Float32 { let o = _accessor.offset(VTOFFSET.negativeInfDefault.v); return o == 0 ? -inf : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(negativeInfDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.negativeInfDefault.v); return _accessor.mutate(negativeInfDefault, index: o) } + public var negativeInfinityDefault: Float32 { let o = _accessor.offset(VTOFFSET.negativeInfinityDefault.v); return o == 0 ? -infinity : _accessor.readBuffer(of: Float32.self, at: o) } + @discardableResult public func mutate(negativeInfinityDefault: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.negativeInfinityDefault.v); return _accessor.mutate(negativeInfinityDefault, index: o) } + public var doubleInfDefault: Double { let o = _accessor.offset(VTOFFSET.doubleInfDefault.v); return o == 0 ? inf : _accessor.readBuffer(of: Double.self, at: o) } + @discardableResult public func mutate(doubleInfDefault: Double) -> Bool {let o = _accessor.offset(VTOFFSET.doubleInfDefault.v); return _accessor.mutate(doubleInfDefault, index: o) } + public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 62) } public static func add(pos: MyGame_Example_Vec3?, _ fbb: inout FlatBufferBuilder) { guard let pos = pos else { return }; fbb.create(struct: pos, position: VTOFFSET.pos.p) } public static func add(mana: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: mana, def: 150, at: VTOFFSET.mana.p) } public static func add(hp: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: hp, def: 100, at: VTOFFSET.hp.p) } @@ -1398,6 +1422,14 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac public static func add(nativeInline: MyGame_Example_Test?, _ fbb: inout FlatBufferBuilder) { guard let nativeInline = nativeInline else { return }; fbb.create(struct: nativeInline, position: VTOFFSET.nativeInline.p) } public static func add(longEnumNonEnumDefault: MyGame_Example_LongEnum, _ fbb: inout FlatBufferBuilder) { fbb.add(element: longEnumNonEnumDefault.rawValue, def: 0, at: VTOFFSET.longEnumNonEnumDefault.p) } public static func add(longEnumNormalDefault: MyGame_Example_LongEnum, _ fbb: inout FlatBufferBuilder) { fbb.add(element: longEnumNormalDefault.rawValue, def: 2, at: VTOFFSET.longEnumNormalDefault.p) } + public static func add(nanDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: nanDefault, def: nan, at: VTOFFSET.nanDefault.p) } + public static func add(infDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: infDefault, def: inf, at: VTOFFSET.infDefault.p) } + public static func add(positiveInfDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: positiveInfDefault, def: +inf, at: VTOFFSET.positiveInfDefault.p) } + public static func add(infinityDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: infinityDefault, def: infinity, at: VTOFFSET.infinityDefault.p) } + public static func add(positiveInfinityDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: positiveInfinityDefault, def: +infinity, at: VTOFFSET.positiveInfinityDefault.p) } + public static func add(negativeInfDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: negativeInfDefault, def: -inf, at: VTOFFSET.negativeInfDefault.p) } + public static func add(negativeInfinityDefault: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: negativeInfinityDefault, def: -infinity, at: VTOFFSET.negativeInfinityDefault.p) } + public static func add(doubleInfDefault: Double, _ fbb: inout FlatBufferBuilder) { fbb.add(element: doubleInfDefault, def: inf, at: VTOFFSET.doubleInfDefault.p) } public static func endMonster(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [10]); return end } public static func createMonster( _ fbb: inout FlatBufferBuilder, @@ -1453,7 +1485,15 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac scalarKeySortedTablesVectorOffset scalarKeySortedTables: Offset = Offset(), nativeInline: MyGame_Example_Test? = nil, longEnumNonEnumDefault: MyGame_Example_LongEnum = .longone, - longEnumNormalDefault: MyGame_Example_LongEnum = .longone + longEnumNormalDefault: MyGame_Example_LongEnum = .longone, + nanDefault: Float32 = nan, + infDefault: Float32 = inf, + positiveInfDefault: Float32 = +inf, + infinityDefault: Float32 = infinity, + positiveInfinityDefault: Float32 = +infinity, + negativeInfDefault: Float32 = -inf, + negativeInfinityDefault: Float32 = -infinity, + doubleInfDefault: Double = inf ) -> Offset { let __start = MyGame_Example_Monster.startMonster(&fbb) MyGame_Example_Monster.add(pos: pos, &fbb) @@ -1509,6 +1549,14 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac MyGame_Example_Monster.add(nativeInline: nativeInline, &fbb) MyGame_Example_Monster.add(longEnumNonEnumDefault: longEnumNonEnumDefault, &fbb) MyGame_Example_Monster.add(longEnumNormalDefault: longEnumNormalDefault, &fbb) + MyGame_Example_Monster.add(nanDefault: nanDefault, &fbb) + MyGame_Example_Monster.add(infDefault: infDefault, &fbb) + MyGame_Example_Monster.add(positiveInfDefault: positiveInfDefault, &fbb) + MyGame_Example_Monster.add(infinityDefault: infinityDefault, &fbb) + MyGame_Example_Monster.add(positiveInfinityDefault: positiveInfinityDefault, &fbb) + MyGame_Example_Monster.add(negativeInfDefault: negativeInfDefault, &fbb) + MyGame_Example_Monster.add(negativeInfinityDefault: negativeInfinityDefault, &fbb) + MyGame_Example_Monster.add(doubleInfDefault: doubleInfDefault, &fbb) return MyGame_Example_Monster.endMonster(&fbb, start: __start) } public static func sortVectorOfMonster(offsets:[Offset], _ fbb: inout FlatBufferBuilder) -> Offset { @@ -1668,6 +1716,14 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac MyGame_Example_Monster.add(nativeInline: obj.nativeInline, &builder) MyGame_Example_Monster.add(longEnumNonEnumDefault: obj.longEnumNonEnumDefault, &builder) MyGame_Example_Monster.add(longEnumNormalDefault: obj.longEnumNormalDefault, &builder) + MyGame_Example_Monster.add(nanDefault: obj.nanDefault, &builder) + MyGame_Example_Monster.add(infDefault: obj.infDefault, &builder) + MyGame_Example_Monster.add(positiveInfDefault: obj.positiveInfDefault, &builder) + MyGame_Example_Monster.add(infinityDefault: obj.infinityDefault, &builder) + MyGame_Example_Monster.add(positiveInfinityDefault: obj.positiveInfinityDefault, &builder) + MyGame_Example_Monster.add(negativeInfDefault: obj.negativeInfDefault, &builder) + MyGame_Example_Monster.add(negativeInfinityDefault: obj.negativeInfinityDefault, &builder) + MyGame_Example_Monster.add(doubleInfDefault: obj.doubleInfDefault, &builder) return MyGame_Example_Monster.endMonster(&builder, start: __root) } @@ -1756,6 +1812,14 @@ public struct MyGame_Example_Monster: FlatBufferObject, Verifiable, ObjectAPIPac try _v.visit(field: VTOFFSET.nativeInline.p, fieldName: "nativeInline", required: false, type: MyGame_Example_Test.self) try _v.visit(field: VTOFFSET.longEnumNonEnumDefault.p, fieldName: "longEnumNonEnumDefault", required: false, type: MyGame_Example_LongEnum.self) try _v.visit(field: VTOFFSET.longEnumNormalDefault.p, fieldName: "longEnumNormalDefault", required: false, type: MyGame_Example_LongEnum.self) + try _v.visit(field: VTOFFSET.nanDefault.p, fieldName: "nanDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.infDefault.p, fieldName: "infDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.positiveInfDefault.p, fieldName: "positiveInfDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.infinityDefault.p, fieldName: "infinityDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.positiveInfinityDefault.p, fieldName: "positiveInfinityDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.negativeInfDefault.p, fieldName: "negativeInfDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.negativeInfinityDefault.p, fieldName: "negativeInfinityDefault", required: false, type: Float32.self) + try _v.visit(field: VTOFFSET.doubleInfDefault.p, fieldName: "doubleInfDefault", required: false, type: Double.self) _v.finish() } } @@ -1816,6 +1880,14 @@ extension MyGame_Example_Monster: Encodable { case nativeInline = "native_inline" case longEnumNonEnumDefault = "long_enum_non_enum_default" case longEnumNormalDefault = "long_enum_normal_default" + case nanDefault = "nan_default" + case infDefault = "inf_default" + case positiveInfDefault = "positive_inf_default" + case infinityDefault = "infinity_default" + case positiveInfinityDefault = "positive_infinity_default" + case negativeInfDefault = "negative_inf_default" + case negativeInfinityDefault = "negative_infinity_default" + case doubleInfDefault = "double_inf_default" } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) @@ -2033,6 +2105,30 @@ extension MyGame_Example_Monster: Encodable { if longEnumNormalDefault != .longone { try container.encodeIfPresent(longEnumNormalDefault, forKey: .longEnumNormalDefault) } + if nanDefault != nan { + try container.encodeIfPresent(nanDefault, forKey: .nanDefault) + } + if infDefault != inf { + try container.encodeIfPresent(infDefault, forKey: .infDefault) + } + if positiveInfDefault != +inf { + try container.encodeIfPresent(positiveInfDefault, forKey: .positiveInfDefault) + } + if infinityDefault != infinity { + try container.encodeIfPresent(infinityDefault, forKey: .infinityDefault) + } + if positiveInfinityDefault != +infinity { + try container.encodeIfPresent(positiveInfinityDefault, forKey: .positiveInfinityDefault) + } + if negativeInfDefault != -inf { + try container.encodeIfPresent(negativeInfDefault, forKey: .negativeInfDefault) + } + if negativeInfinityDefault != -infinity { + try container.encodeIfPresent(negativeInfinityDefault, forKey: .negativeInfinityDefault) + } + if doubleInfDefault != inf { + try container.encodeIfPresent(doubleInfDefault, forKey: .doubleInfDefault) + } } } @@ -2088,6 +2184,14 @@ public class MyGame_Example_MonsterT: NativeObject { public var nativeInline: MyGame_Example_Test? public var longEnumNonEnumDefault: MyGame_Example_LongEnum public var longEnumNormalDefault: MyGame_Example_LongEnum + public var nanDefault: Float32 + public var infDefault: Float32 + public var positiveInfDefault: Float32 + public var infinityDefault: Float32 + public var positiveInfinityDefault: Float32 + public var negativeInfDefault: Float32 + public var negativeInfinityDefault: Float32 + public var doubleInfDefault: Double public init(_ _t: inout MyGame_Example_Monster) { pos = _t.pos @@ -2240,6 +2344,14 @@ public class MyGame_Example_MonsterT: NativeObject { nativeInline = _t.nativeInline longEnumNonEnumDefault = _t.longEnumNonEnumDefault longEnumNormalDefault = _t.longEnumNormalDefault + nanDefault = _t.nanDefault + infDefault = _t.infDefault + positiveInfDefault = _t.positiveInfDefault + infinityDefault = _t.infinityDefault + positiveInfinityDefault = _t.positiveInfinityDefault + negativeInfDefault = _t.negativeInfDefault + negativeInfinityDefault = _t.negativeInfinityDefault + doubleInfDefault = _t.doubleInfDefault } public init() { @@ -2290,6 +2402,14 @@ public class MyGame_Example_MonsterT: NativeObject { nativeInline = MyGame_Example_Test() longEnumNonEnumDefault = .longone longEnumNormalDefault = .longone + nanDefault = nan + infDefault = inf + positiveInfDefault = +inf + infinityDefault = infinity + positiveInfinityDefault = +infinity + negativeInfDefault = -inf + negativeInfinityDefault = -infinity + doubleInfDefault = inf } public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_Monster.self) } @@ -2297,7 +2417,7 @@ public class MyGame_Example_MonsterT: NativeObject { } public struct MyGame_Example_TypeAliases: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/more_defaults_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/more_defaults_generated.swift index f6692c9555..d5885fbb00 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/more_defaults_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/more_defaults_generated.swift @@ -29,7 +29,7 @@ extension ABC: Encodable { public struct MoreDefaults: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/optional_scalars_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/optional_scalars_generated.swift index 565bbd4dc0..c82904b729 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/optional_scalars_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/optional_scalars_generated.swift @@ -29,7 +29,7 @@ extension optional_scalars_OptionalByte: Encodable { public struct optional_scalars_ScalarStuff: FlatBufferObject, Verifiable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/union_vector_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/union_vector_generated.swift index ce3d37f363..801ea13fe3 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/union_vector_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/union_vector_generated.swift @@ -120,7 +120,7 @@ public struct GadgetUnion { } public struct Rapunzel: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _hairLength: Int32 @@ -163,7 +163,7 @@ extension Rapunzel: Encodable { public struct Rapunzel_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -188,7 +188,7 @@ public struct Rapunzel_Mutable: FlatBufferObject { public struct BookReader: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _booksRead: Int32 @@ -231,7 +231,7 @@ extension BookReader: Encodable { public struct BookReader_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -256,7 +256,7 @@ public struct BookReader_Mutable: FlatBufferObject { public struct FallingTub: NativeStruct, Verifiable, FlatbuffersInitializable, NativeObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } private var _weight: Int32 @@ -299,7 +299,7 @@ extension FallingTub: Encodable { public struct FallingTub_Mutable: FlatBufferObject { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Struct @@ -324,7 +324,7 @@ public struct FallingTub_Mutable: FlatBufferObject { public struct Attacker: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -407,7 +407,7 @@ public class AttackerT: NativeObject { } public struct HandFan: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table @@ -490,7 +490,7 @@ public class HandFanT: NativeObject { } public struct Movie: FlatBufferObject, Verifiable, ObjectAPIPacker { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/vector_has_test_generated.swift b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/vector_has_test_generated.swift index dc292f3ac9..c065b9f435 100644 --- a/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/vector_has_test_generated.swift +++ b/third_party/flatbuffers/tests/swift/tests/Tests/FlatBuffers.Test.SwiftTests/vector_has_test_generated.swift @@ -6,7 +6,7 @@ import FlatBuffers public struct Swift_Tests_Vectors: FlatBufferObject, Verifiable { - static func validateVersion() { FlatBuffersVersion_2_0_8() } + static func validateVersion() { FlatBuffersVersion_22_10_26() } public var __buffer: ByteBuffer! { return _accessor.bb } private var _accessor: Table diff --git a/third_party/flatbuffers/tests/test.cpp b/third_party/flatbuffers/tests/test.cpp index 7e05c08ff2..65198a67a4 100644 --- a/third_party/flatbuffers/tests/test.cpp +++ b/third_party/flatbuffers/tests/test.cpp @@ -16,10 +16,12 @@ #include #include +#include #include #include #include "evolution_test.h" +#include "alignment_test.h" #include "flatbuffers/flatbuffers.h" #include "flatbuffers/idl.h" #include "flatbuffers/minireflect.h" @@ -82,6 +84,8 @@ void TriviallyCopyableTest() { // clang-format on } +// Guard against -Wunused-function on platforms without file tests. +#ifndef FLATBUFFERS_NO_FILE_TESTS void GenerateTableTextTest(const std::string &tests_data_path) { std::string schemafile; std::string jsonfile; @@ -376,6 +380,7 @@ void UnionVectorTest(const std::string &tests_data_path) { true); TEST_EQ(parser2.Parse("{a_type:Bool,a:{b:true}}"), true); } +#endif void EndianSwapTest() { TEST_EQ(flatbuffers::EndianSwap(static_cast(0x1234)), 0x3412); @@ -419,6 +424,12 @@ void UninitializedVectorTest() { void EqualOperatorTest() { MonsterT a; MonsterT b; + // We have to reset the fields that are NaN to zero to allow the equality + // to evaluate to true. + TEST_EQ(std::isnan(a.nan_default), true); + TEST_EQ(std::isnan(b.nan_default), true); + a.nan_default = 0; + b.nan_default = 0; TEST_EQ(b == a, true); TEST_EQ(b != a, false); @@ -437,12 +448,14 @@ void EqualOperatorTest() { TEST_EQ(b != a, false); a.enemy.reset(new MonsterT()); + a.enemy->nan_default = 0; TEST_EQ(b != a, true); a.enemy->mana = 33; TEST_EQ(b == a, false); TEST_EQ(b != a, true); b.enemy.reset(new MonsterT()); + b.enemy->nan_default = 0; TEST_EQ(b == a, false); TEST_EQ(b != a, true); b.enemy->mana = 33; @@ -456,6 +469,7 @@ void EqualOperatorTest() { TEST_EQ(b == a, false); TEST_EQ(b != a, true); a.enemy.reset(new MonsterT()); + a.enemy->nan_default = 0; TEST_EQ(b == a, true); TEST_EQ(b != a, false); @@ -469,23 +483,29 @@ void EqualOperatorTest() { { // Two tables are equal by default. MonsterT a, b; + a.nan_default = 0; + b.nan_default = 0; TEST_EQ(a == b, true); // Adding only a table to one of the monster vectors should make it not // equal (due to size mistmatch). a.testarrayoftables.push_back( flatbuffers::unique_ptr(new MonsterT)); + a.testarrayoftables.back()->nan_default = 0; TEST_EQ(a == b, false); // Adding an equalivant table to the other monster vector should make it // equal again. b.testarrayoftables.push_back( flatbuffers::unique_ptr(new MonsterT)); + b.testarrayoftables.back()->nan_default = 0; TEST_EQ(a == b, true); // Create two new monsters that are different. auto c = flatbuffers::unique_ptr(new MonsterT); auto d = flatbuffers::unique_ptr(new MonsterT); + c->nan_default = 0; + d->nan_default = 0; c->hp = 1; d->hp = 2; TEST_EQ(c == d, false); @@ -840,6 +860,8 @@ void NativeTypeTest() { } } +// Guard against -Wunused-function on platforms without file tests. +#ifndef FLATBUFFERS_NO_FILE_TESTS // VS10 does not support typed enums, exclude from tests #if !defined(_MSC_VER) || _MSC_VER >= 1700 void FixedLengthArrayJsonTest(const std::string &tests_data_path, bool binary) { @@ -1030,6 +1052,7 @@ void TestEmbeddedBinarySchema(const std::string &tests_data_path) { parserOrg.builder_.GetSize()), 0); } +#endif void NestedVerifierTest() { // Create a nested monster. @@ -1395,6 +1418,49 @@ void NativeInlineTableVectorTest() { TEST_ASSERT(unpacked.t == test.t); } +void DoNotRequireEofTest(const std::string& tests_data_path) { + std::string schemafile; + bool ok = flatbuffers::LoadFile( + (tests_data_path + "monster_test.fbs").c_str(), false, &schemafile); + TEST_EQ(ok, true); + auto include_test_path = + flatbuffers::ConCatPathFileName(tests_data_path, "include_test"); + const char *include_directories[] = { tests_data_path.c_str(), + include_test_path.c_str(), nullptr }; + flatbuffers::IDLOptions opt; + opt.require_json_eof = false; + flatbuffers::Parser parser(opt); + ok = parser.Parse(schemafile.c_str(), include_directories); + TEST_EQ(ok, true); + + const char *str = R"(This string contains two monsters, the first one is { + "name": "Blob", + "hp": 5 + } + and the second one is { + "name": "Imp", + "hp": 10 + } + )"; + const char *tableStart = std::strchr(str, '{'); + ok = parser.ParseJson(tableStart); + TEST_EQ(ok, true); + + const Monster *monster = GetMonster(parser.builder_.GetBufferPointer()); + TEST_EQ_STR(monster->name()->c_str(), "Blob"); + TEST_EQ(monster->hp(), 5); + + tableStart += parser.BytesConsumed(); + + tableStart = std::strchr(tableStart + 1, '{'); + ok = parser.ParseJson(tableStart); + TEST_EQ(ok, true); + + monster = GetMonster(parser.builder_.GetBufferPointer()); + TEST_EQ_STR(monster->name()->c_str(), "Imp"); + TEST_EQ(monster->hp(), 10); +} + int FlatBufferTests(const std::string &tests_data_path) { // Run our various test suites: @@ -1416,6 +1482,8 @@ int FlatBufferTests(const std::string &tests_data_path) { SizePrefixedTest(); + AlignmentTest(); + #ifndef FLATBUFFERS_NO_FILE_TESTS ParseAndGenerateTextTest(tests_data_path, false); ParseAndGenerateTextTest(tests_data_path, true); @@ -1439,6 +1507,7 @@ int FlatBufferTests(const std::string &tests_data_path) { TestMonsterExtraFloats(tests_data_path); ParseIncorrectMonsterJsonTest(tests_data_path); FixedLengthArraySpanTest(tests_data_path); + DoNotRequireEofTest(tests_data_path); #endif UtilConvertCase(); diff --git a/third_party/flatbuffers/tests/ts/JavaScriptComplexArraysTest.js b/third_party/flatbuffers/tests/ts/JavaScriptComplexArraysTest.js new file mode 100644 index 0000000000..f8601edfbe --- /dev/null +++ b/third_party/flatbuffers/tests/ts/JavaScriptComplexArraysTest.js @@ -0,0 +1,129 @@ +/* global BigInt */ + +import assert from 'assert'; +import { readFileSync, writeFileSync } from 'fs'; +import * as flatbuffers from 'flatbuffers'; +import { + ArrayStructT, + ArrayTable, + ArrayTableT, + InnerStructT, + NestedStructT, + OuterStructT, + TestEnum, +} from './arrays_test_complex/arrays_test_complex_generated.js'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +BigInt.prototype.toJSON = function () { + return this.toString(); +}; +function fbObjToObj(fbObj) { + const ret = {}; + for (const propName of Object.keys(fbObj)) { + const key = propName; + const prop = fbObj[key]; + if (prop.valueOf) { + ret[key] = prop.valueOf(); + } else if (typeof prop === 'object') { + ret[key] = fbObjToObj(prop); + } + } + return ret; +} +function testBuild(monFile, jsFile) { + const arrayTable = new ArrayTableT( + 'Complex Array Test', + new ArrayStructT( + 221.139008, + [-700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700], + 13, + [ + new NestedStructT( + [233, -123], + TestEnum.B, + [TestEnum.A, TestEnum.C], + [ + new OuterStructT( + false, + 123.456, + new InnerStructT( + 123456792.0, + [13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], + 91, + BigInt('9007199254740999') + ), + [ + new InnerStructT( + -987654321.9876, + [255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243], + 123, + BigInt('9007199254741000') + ), + new InnerStructT( + 123000987.9876, + [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], + -123, + BigInt('9007199254741000') + ), + ], + new InnerStructT( + 987654321.9876, + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + 19, + BigInt('9007199254741000') + ), + [111000111.222, 222000222.111, 333000333.333, 444000444.444] + ), + ] + ), + ], + -123456789 + ) + ); + const builder = new flatbuffers.Builder(); + builder.finish(arrayTable.pack(builder)); + if (jsFile) { + const obj = fbObjToObj(arrayTable); + writeFileSync(jsFile, `export default ${JSON.stringify(obj, null, 2)}`); + } + if (monFile) { + writeFileSync(monFile, builder.asUint8Array()); + } + return builder.asUint8Array(); +} +function testParse(monFile, jsFile, buffer) { + if (!buffer) { + if (!monFile) { + console.log(`Please specify mon file read the buffer from.`); + process.exit(1); + } + buffer = readFileSync(monFile); + } + const byteBuffer = new flatbuffers.ByteBuffer(new Uint8Array(buffer)); + const arrayTable = ArrayTable.getRootAsArrayTable(byteBuffer).unpack(); + const json = JSON.stringify(arrayTable, null, 2); + if (jsFile) { + writeFileSync(jsFile, `export default ${json}`); + } + return arrayTable; +} +if (process.argv[2] === 'build') { + testBuild(process.argv[3], process.argv[4]); +} else if (process.argv[2] === 'parse') { + testParse(process.argv[3], process.argv[4], null); +} else { + const arr = testBuild(null, null); + const parsed = testParse(null, null, Buffer.from(arr)); + assert.strictEqual(parsed.a, 'Complex Array Test', 'String Test'); + assert.strictEqual(parsed?.cUnderscore?.aUnderscore, 221.13900756835938, 'Float Test'); + assert.deepEqual(parsed?.cUnderscore?.bUnderscore, [-700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700], 'Array of signed integers'); + assert.strictEqual(parsed?.cUnderscore.d?.[0].dOuter[0].d[1].a, 123000987.9876, 'Float in deep'); + assert.deepEqual(parsed?.cUnderscore?.d[0].dOuter?.[0]?.e, { + a: 987654321.9876, + b: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + c: 19, + dUnderscore: '9007199254741000', + }, 'Object in deep'); + assert.deepEqual(parsed?.cUnderscore.g, ['0', '0'], 'Last object'); + + console.log('Arrays test: completed successfully'); +} diff --git a/third_party/flatbuffers/tests/ts/TypeScriptTest.py b/third_party/flatbuffers/tests/ts/TypeScriptTest.py index c95ed72261..bb8dfcad43 100755 --- a/third_party/flatbuffers/tests/ts/TypeScriptTest.py +++ b/third_party/flatbuffers/tests/ts/TypeScriptTest.py @@ -61,7 +61,7 @@ def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path) print("Invoking flatc...") flatc( - options=["--ts", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], + options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], schema="../monster_test.fbs", include="../include_test", ) @@ -74,18 +74,18 @@ def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path) ) flatc( - options=["--ts", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], + options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], schema="../union_vector/union_vector.fbs", prefix="union_vector", ) flatc( - options=["--ts", "--gen-name-strings"], + options=["--ts", "--reflect-names", "--gen-name-strings"], schema="../optional_scalars.fbs", ) flatc( - options=["--ts", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], + options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api"], schema=[ "typescript_keywords.fbs", "test_dir/typescript_include.fbs", @@ -95,9 +95,16 @@ def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path) include="../../", ) +flatc( + options=["--ts", "--reflect-names", "--ts-flat-files", "--gen-name-strings", "--gen-object-api"], + schema="arrays_test_complex/arrays_test_complex.fbs", + prefix="arrays_test_complex" +) + flatc( options=[ "--ts", + "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", @@ -120,4 +127,5 @@ def flatc(options, schema, prefix=None, include=None, data=None, cwd=tests_path) print("Running TypeScript Tests...") check_call(NODE_CMD + ["JavaScriptTest"]) check_call(NODE_CMD + ["JavaScriptUnionVectorTest"]) -check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"]) \ No newline at end of file +check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"]) +check_call(NODE_CMD + ["JavaScriptComplexArraysTest"]) \ No newline at end of file diff --git a/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex.fbs b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex.fbs new file mode 100644 index 0000000000..3ef5915052 --- /dev/null +++ b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex.fbs @@ -0,0 +1,46 @@ +namespace MyGame.Example; + +enum TestEnum : byte { A, B, C } + +struct InnerStruct { + a:float64; + b:[ubyte:13]; + c:int8; + d_underscore:int64; +} + +struct OuterStruct { + a:bool; + b:double; + c_underscore:InnerStruct; + d:[InnerStruct:3]; + e:InnerStruct; + f:[float64:4]; +} + +struct NestedStruct{ + a:[int:2]; + b:TestEnum; + c_underscore:[TestEnum:2]; + d_outer:[OuterStruct:5]; + e:[int64:2]; +} + +struct ArrayStruct{ + a_underscore:float; + b_underscore:[int:0xF]; + c:byte; + d:[NestedStruct:2]; + e:int32; + f:[OuterStruct:2]; + g:[int64:2]; +} + +table ArrayTable{ + a:string; + c_underscore:ArrayStruct; +} + +root_type ArrayTable; +file_identifier "RHUB"; +file_extension "mon"; \ No newline at end of file diff --git a/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.js b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.js new file mode 100644 index 0000000000..7530e84633 --- /dev/null +++ b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.js @@ -0,0 +1,409 @@ +// automatically generated by the FlatBuffers compiler, do not modify +import * as flatbuffers from 'flatbuffers'; +export var TestEnum; +(function (TestEnum) { + TestEnum[TestEnum["A"] = 0] = "A"; + TestEnum[TestEnum["B"] = 1] = "B"; + TestEnum[TestEnum["C"] = 2] = "C"; +})(TestEnum || (TestEnum = {})); +export class InnerStruct { + constructor() { + this.bb = null; + this.bb_pos = 0; + } + __init(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; + } + a() { + return this.bb.readFloat64(this.bb_pos); + } + b(index) { + return this.bb.readUint8(this.bb_pos + 8 + index); + } + c() { + return this.bb.readInt8(this.bb_pos + 21); + } + dUnderscore() { + return this.bb.readInt64(this.bb_pos + 24); + } + static getFullyQualifiedName() { + return 'MyGame_Example_InnerStruct'; + } + static sizeOf() { + return 32; + } + static createInnerStruct(builder, a, b, c, d_underscore) { + var _a; + builder.prep(8, 32); + builder.writeInt64(BigInt(d_underscore !== null && d_underscore !== void 0 ? d_underscore : 0)); + builder.pad(2); + builder.writeInt8(c); + for (let i = 12; i >= 0; --i) { + builder.writeInt8(((_a = b === null || b === void 0 ? void 0 : b[i]) !== null && _a !== void 0 ? _a : 0)); + } + builder.writeFloat64(a); + return builder.offset(); + } + unpack() { + return new InnerStructT(this.a(), this.bb.createScalarList(this.b.bind(this), 13), this.c(), this.dUnderscore()); + } + unpackTo(_o) { + _o.a = this.a(); + _o.b = this.bb.createScalarList(this.b.bind(this), 13); + _o.c = this.c(); + _o.dUnderscore = this.dUnderscore(); + } +} +export class InnerStructT { + constructor(a = 0.0, b = [], c = 0, dUnderscore = BigInt('0')) { + this.a = a; + this.b = b; + this.c = c; + this.dUnderscore = dUnderscore; + } + pack(builder) { + return InnerStruct.createInnerStruct(builder, this.a, this.b, this.c, this.dUnderscore); + } +} +export class OuterStruct { + constructor() { + this.bb = null; + this.bb_pos = 0; + } + __init(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; + } + a() { + return !!this.bb.readInt8(this.bb_pos); + } + b() { + return this.bb.readFloat64(this.bb_pos + 8); + } + cUnderscore(obj) { + return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb); + } + d(index, obj) { + return (obj || new InnerStruct()).__init(this.bb_pos + 48 + index * 32, this.bb); + } + e(obj) { + return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb); + } + f(index) { + return this.bb.readFloat64(this.bb_pos + 176 + index * 8); + } + static getFullyQualifiedName() { + return 'MyGame_Example_OuterStruct'; + } + static sizeOf() { + return 208; + } + static createOuterStruct(builder, a, b, c_underscore_a, c_underscore_b, c_underscore_c, c_underscore_d_underscore, d, e_a, e_b, e_c, e_d_underscore, f) { + var _a, _b, _c; + builder.prep(8, 208); + for (let i = 3; i >= 0; --i) { + builder.writeFloat64(((_a = f === null || f === void 0 ? void 0 : f[i]) !== null && _a !== void 0 ? _a : 0)); + } + builder.prep(8, 32); + builder.writeInt64(BigInt(e_d_underscore !== null && e_d_underscore !== void 0 ? e_d_underscore : 0)); + builder.pad(2); + builder.writeInt8(e_c); + for (let i = 12; i >= 0; --i) { + builder.writeInt8(((_b = e_b === null || e_b === void 0 ? void 0 : e_b[i]) !== null && _b !== void 0 ? _b : 0)); + } + builder.writeFloat64(e_a); + for (let i = 2; i >= 0; --i) { + const item = d === null || d === void 0 ? void 0 : d[i]; + if (item instanceof InnerStructT) { + item.pack(builder); + continue; + } + InnerStruct.createInnerStruct(builder, item === null || item === void 0 ? void 0 : item.a, item === null || item === void 0 ? void 0 : item.b, item === null || item === void 0 ? void 0 : item.c, item === null || item === void 0 ? void 0 : item.dUnderscore); + } + builder.prep(8, 32); + builder.writeInt64(BigInt(c_underscore_d_underscore !== null && c_underscore_d_underscore !== void 0 ? c_underscore_d_underscore : 0)); + builder.pad(2); + builder.writeInt8(c_underscore_c); + for (let i = 12; i >= 0; --i) { + builder.writeInt8(((_c = c_underscore_b === null || c_underscore_b === void 0 ? void 0 : c_underscore_b[i]) !== null && _c !== void 0 ? _c : 0)); + } + builder.writeFloat64(c_underscore_a); + builder.writeFloat64(b); + builder.pad(7); + builder.writeInt8(Number(Boolean(a))); + return builder.offset(); + } + unpack() { + return new OuterStructT(this.a(), this.b(), (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null), this.bb.createObjList(this.d.bind(this), 3), (this.e() !== null ? this.e().unpack() : null), this.bb.createScalarList(this.f.bind(this), 4)); + } + unpackTo(_o) { + _o.a = this.a(); + _o.b = this.b(); + _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null); + _o.d = this.bb.createObjList(this.d.bind(this), 3); + _o.e = (this.e() !== null ? this.e().unpack() : null); + _o.f = this.bb.createScalarList(this.f.bind(this), 4); + } +} +export class OuterStructT { + constructor(a = false, b = 0.0, cUnderscore = null, d = [], e = null, f = []) { + this.a = a; + this.b = b; + this.cUnderscore = cUnderscore; + this.d = d; + this.e = e; + this.f = f; + } + pack(builder) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _p, _q, _r, _s; + return OuterStruct.createOuterStruct(builder, this.a, this.b, ((_b = (_a = this.cUnderscore) === null || _a === void 0 ? void 0 : _a.a) !== null && _b !== void 0 ? _b : 0), ((_d = (_c = this.cUnderscore) === null || _c === void 0 ? void 0 : _c.b) !== null && _d !== void 0 ? _d : []), ((_f = (_e = this.cUnderscore) === null || _e === void 0 ? void 0 : _e.c) !== null && _f !== void 0 ? _f : 0), ((_h = (_g = this.cUnderscore) === null || _g === void 0 ? void 0 : _g.dUnderscore) !== null && _h !== void 0 ? _h : BigInt(0)), this.d, ((_k = (_j = this.e) === null || _j === void 0 ? void 0 : _j.a) !== null && _k !== void 0 ? _k : 0), ((_m = (_l = this.e) === null || _l === void 0 ? void 0 : _l.b) !== null && _m !== void 0 ? _m : []), ((_q = (_p = this.e) === null || _p === void 0 ? void 0 : _p.c) !== null && _q !== void 0 ? _q : 0), ((_s = (_r = this.e) === null || _r === void 0 ? void 0 : _r.dUnderscore) !== null && _s !== void 0 ? _s : BigInt(0)), this.f); + } +} +export class NestedStruct { + constructor() { + this.bb = null; + this.bb_pos = 0; + } + __init(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; + } + a(index) { + return this.bb.readInt32(this.bb_pos + 0 + index * 4); + } + b() { + return this.bb.readInt8(this.bb_pos + 8); + } + cUnderscore(index) { + return this.bb.readInt8(this.bb_pos + 9 + index); + } + dOuter(index, obj) { + return (obj || new OuterStruct()).__init(this.bb_pos + 16 + index * 208, this.bb); + } + e(index) { + return this.bb.readInt64(this.bb_pos + 1056 + index * 8); + } + static getFullyQualifiedName() { + return 'MyGame_Example_NestedStruct'; + } + static sizeOf() { + return 1072; + } + static createNestedStruct(builder, a, b, c_underscore, d_outer, e) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _p, _q, _r, _s, _t, _u, _v; + builder.prep(8, 1072); + for (let i = 1; i >= 0; --i) { + builder.writeInt64(BigInt((_a = e === null || e === void 0 ? void 0 : e[i]) !== null && _a !== void 0 ? _a : 0)); + } + for (let i = 4; i >= 0; --i) { + const item = d_outer === null || d_outer === void 0 ? void 0 : d_outer[i]; + if (item instanceof OuterStructT) { + item.pack(builder); + continue; + } + OuterStruct.createOuterStruct(builder, item === null || item === void 0 ? void 0 : item.a, item === null || item === void 0 ? void 0 : item.b, ((_c = (_b = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _b === void 0 ? void 0 : _b.a) !== null && _c !== void 0 ? _c : 0), ((_e = (_d = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _d === void 0 ? void 0 : _d.b) !== null && _e !== void 0 ? _e : []), ((_g = (_f = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _f === void 0 ? void 0 : _f.c) !== null && _g !== void 0 ? _g : 0), ((_j = (_h = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _h === void 0 ? void 0 : _h.dUnderscore) !== null && _j !== void 0 ? _j : BigInt(0)), item === null || item === void 0 ? void 0 : item.d, ((_l = (_k = item === null || item === void 0 ? void 0 : item.e) === null || _k === void 0 ? void 0 : _k.a) !== null && _l !== void 0 ? _l : 0), ((_p = (_m = item === null || item === void 0 ? void 0 : item.e) === null || _m === void 0 ? void 0 : _m.b) !== null && _p !== void 0 ? _p : []), ((_r = (_q = item === null || item === void 0 ? void 0 : item.e) === null || _q === void 0 ? void 0 : _q.c) !== null && _r !== void 0 ? _r : 0), ((_t = (_s = item === null || item === void 0 ? void 0 : item.e) === null || _s === void 0 ? void 0 : _s.dUnderscore) !== null && _t !== void 0 ? _t : BigInt(0)), item === null || item === void 0 ? void 0 : item.f); + } + builder.pad(5); + for (let i = 1; i >= 0; --i) { + builder.writeInt8(((_u = c_underscore === null || c_underscore === void 0 ? void 0 : c_underscore[i]) !== null && _u !== void 0 ? _u : 0)); + } + builder.writeInt8(b); + for (let i = 1; i >= 0; --i) { + builder.writeInt32(((_v = a === null || a === void 0 ? void 0 : a[i]) !== null && _v !== void 0 ? _v : 0)); + } + return builder.offset(); + } + unpack() { + return new NestedStructT(this.bb.createScalarList(this.a.bind(this), 2), this.b(), this.bb.createScalarList(this.cUnderscore.bind(this), 2), this.bb.createObjList(this.dOuter.bind(this), 5), this.bb.createScalarList(this.e.bind(this), 2)); + } + unpackTo(_o) { + _o.a = this.bb.createScalarList(this.a.bind(this), 2); + _o.b = this.b(); + _o.cUnderscore = this.bb.createScalarList(this.cUnderscore.bind(this), 2); + _o.dOuter = this.bb.createObjList(this.dOuter.bind(this), 5); + _o.e = this.bb.createScalarList(this.e.bind(this), 2); + } +} +export class NestedStructT { + constructor(a = [], b = TestEnum.A, cUnderscore = [TestEnum.A, TestEnum.A], dOuter = [], e = []) { + this.a = a; + this.b = b; + this.cUnderscore = cUnderscore; + this.dOuter = dOuter; + this.e = e; + } + pack(builder) { + return NestedStruct.createNestedStruct(builder, this.a, this.b, this.cUnderscore, this.dOuter, this.e); + } +} +export class ArrayStruct { + constructor() { + this.bb = null; + this.bb_pos = 0; + } + __init(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; + } + aUnderscore() { + return this.bb.readFloat32(this.bb_pos); + } + bUnderscore(index) { + return this.bb.readInt32(this.bb_pos + 4 + index * 4); + } + c() { + return this.bb.readInt8(this.bb_pos + 64); + } + d(index, obj) { + return (obj || new NestedStruct()).__init(this.bb_pos + 72 + index * 1072, this.bb); + } + e() { + return this.bb.readInt32(this.bb_pos + 2216); + } + f(index, obj) { + return (obj || new OuterStruct()).__init(this.bb_pos + 2224 + index * 208, this.bb); + } + g(index) { + return this.bb.readInt64(this.bb_pos + 2640 + index * 8); + } + static getFullyQualifiedName() { + return 'MyGame_Example_ArrayStruct'; + } + static sizeOf() { + return 2656; + } + static createArrayStruct(builder, a_underscore, b_underscore, c, d, e, f, g) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _p, _q, _r, _s, _t, _u; + builder.prep(8, 2656); + for (let i = 1; i >= 0; --i) { + builder.writeInt64(BigInt((_a = g === null || g === void 0 ? void 0 : g[i]) !== null && _a !== void 0 ? _a : 0)); + } + for (let i = 1; i >= 0; --i) { + const item = f === null || f === void 0 ? void 0 : f[i]; + if (item instanceof OuterStructT) { + item.pack(builder); + continue; + } + OuterStruct.createOuterStruct(builder, item === null || item === void 0 ? void 0 : item.a, item === null || item === void 0 ? void 0 : item.b, ((_c = (_b = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _b === void 0 ? void 0 : _b.a) !== null && _c !== void 0 ? _c : 0), ((_e = (_d = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _d === void 0 ? void 0 : _d.b) !== null && _e !== void 0 ? _e : []), ((_g = (_f = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _f === void 0 ? void 0 : _f.c) !== null && _g !== void 0 ? _g : 0), ((_j = (_h = item === null || item === void 0 ? void 0 : item.cUnderscore) === null || _h === void 0 ? void 0 : _h.dUnderscore) !== null && _j !== void 0 ? _j : BigInt(0)), item === null || item === void 0 ? void 0 : item.d, ((_l = (_k = item === null || item === void 0 ? void 0 : item.e) === null || _k === void 0 ? void 0 : _k.a) !== null && _l !== void 0 ? _l : 0), ((_p = (_m = item === null || item === void 0 ? void 0 : item.e) === null || _m === void 0 ? void 0 : _m.b) !== null && _p !== void 0 ? _p : []), ((_r = (_q = item === null || item === void 0 ? void 0 : item.e) === null || _q === void 0 ? void 0 : _q.c) !== null && _r !== void 0 ? _r : 0), ((_t = (_s = item === null || item === void 0 ? void 0 : item.e) === null || _s === void 0 ? void 0 : _s.dUnderscore) !== null && _t !== void 0 ? _t : BigInt(0)), item === null || item === void 0 ? void 0 : item.f); + } + builder.pad(4); + builder.writeInt32(e); + for (let i = 1; i >= 0; --i) { + const item = d === null || d === void 0 ? void 0 : d[i]; + if (item instanceof NestedStructT) { + item.pack(builder); + continue; + } + NestedStruct.createNestedStruct(builder, item === null || item === void 0 ? void 0 : item.a, item === null || item === void 0 ? void 0 : item.b, item === null || item === void 0 ? void 0 : item.cUnderscore, item === null || item === void 0 ? void 0 : item.dOuter, item === null || item === void 0 ? void 0 : item.e); + } + builder.pad(7); + builder.writeInt8(c); + for (let i = 14; i >= 0; --i) { + builder.writeInt32(((_u = b_underscore === null || b_underscore === void 0 ? void 0 : b_underscore[i]) !== null && _u !== void 0 ? _u : 0)); + } + builder.writeFloat32(a_underscore); + return builder.offset(); + } + unpack() { + return new ArrayStructT(this.aUnderscore(), this.bb.createScalarList(this.bUnderscore.bind(this), 15), this.c(), this.bb.createObjList(this.d.bind(this), 2), this.e(), this.bb.createObjList(this.f.bind(this), 2), this.bb.createScalarList(this.g.bind(this), 2)); + } + unpackTo(_o) { + _o.aUnderscore = this.aUnderscore(); + _o.bUnderscore = this.bb.createScalarList(this.bUnderscore.bind(this), 15); + _o.c = this.c(); + _o.d = this.bb.createObjList(this.d.bind(this), 2); + _o.e = this.e(); + _o.f = this.bb.createObjList(this.f.bind(this), 2); + _o.g = this.bb.createScalarList(this.g.bind(this), 2); + } +} +export class ArrayStructT { + constructor(aUnderscore = 0.0, bUnderscore = [], c = 0, d = [], e = 0, f = [], g = []) { + this.aUnderscore = aUnderscore; + this.bUnderscore = bUnderscore; + this.c = c; + this.d = d; + this.e = e; + this.f = f; + this.g = g; + } + pack(builder) { + return ArrayStruct.createArrayStruct(builder, this.aUnderscore, this.bUnderscore, this.c, this.d, this.e, this.f, this.g); + } +} +export class ArrayTable { + constructor() { + this.bb = null; + this.bb_pos = 0; + } + __init(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; + } + static getRootAsArrayTable(bb, obj) { + return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); + } + static getSizePrefixedRootAsArrayTable(bb, obj) { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); + } + static bufferHasIdentifier(bb) { + return bb.__has_identifier('RHUB'); + } + a(optionalEncoding) { + const offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; + } + cUnderscore(obj) { + const offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb) : null; + } + static getFullyQualifiedName() { + return 'MyGame_Example_ArrayTable'; + } + static startArrayTable(builder) { + builder.startObject(2); + } + static addA(builder, aOffset) { + builder.addFieldOffset(0, aOffset, 0); + } + static addCUnderscore(builder, cUnderscoreOffset) { + builder.addFieldStruct(1, cUnderscoreOffset, 0); + } + static endArrayTable(builder) { + const offset = builder.endObject(); + return offset; + } + static finishArrayTableBuffer(builder, offset) { + builder.finish(offset, 'RHUB'); + } + static finishSizePrefixedArrayTableBuffer(builder, offset) { + builder.finish(offset, 'RHUB', true); + } + unpack() { + return new ArrayTableT(this.a(), (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null)); + } + unpackTo(_o) { + _o.a = this.a(); + _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore().unpack() : null); + } +} +export class ArrayTableT { + constructor(a = null, cUnderscore = null) { + this.a = a; + this.cUnderscore = cUnderscore; + } + pack(builder) { + const a = (this.a !== null ? builder.createString(this.a) : 0); + ArrayTable.startArrayTable(builder); + ArrayTable.addA(builder, a); + ArrayTable.addCUnderscore(builder, (this.cUnderscore !== null ? this.cUnderscore.pack(builder) : 0)); + return ArrayTable.endArrayTable(builder); + } +} diff --git a/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts new file mode 100644 index 0000000000..eea0ed996d --- /dev/null +++ b/third_party/flatbuffers/tests/ts/arrays_test_complex/arrays_test_complex_generated.ts @@ -0,0 +1,626 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + +export enum TestEnum { + A = 0, + B = 1, + C = 2 +} + +export class InnerStruct implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):InnerStruct { + this.bb_pos = i; + this.bb = bb; + return this; +} + +a():number { + return this.bb!.readFloat64(this.bb_pos); +} + +b(index: number):number|null { + return this.bb!.readUint8(this.bb_pos + 8 + index); +} + +c():number { + return this.bb!.readInt8(this.bb_pos + 21); +} + +dUnderscore():bigint { + return this.bb!.readInt64(this.bb_pos + 24); +} + +static getFullyQualifiedName():string { + return 'MyGame_Example_InnerStruct'; +} + +static sizeOf():number { + return 32; +} + +static createInnerStruct(builder:flatbuffers.Builder, a: number, b: number[]|null, c: number, d_underscore: bigint):flatbuffers.Offset { + builder.prep(8, 32); + builder.writeInt64(BigInt(d_underscore ?? 0)); + builder.pad(2); + builder.writeInt8(c); + + for (let i = 12; i >= 0; --i) { + builder.writeInt8((b?.[i] ?? 0)); + + } + + builder.writeFloat64(a); + return builder.offset(); +} + + +unpack(): InnerStructT { + return new InnerStructT( + this.a(), + this.bb!.createScalarList(this.b.bind(this), 13), + this.c(), + this.dUnderscore() + ); +} + + +unpackTo(_o: InnerStructT): void { + _o.a = this.a(); + _o.b = this.bb!.createScalarList(this.b.bind(this), 13); + _o.c = this.c(); + _o.dUnderscore = this.dUnderscore(); +} +} + +export class InnerStructT implements flatbuffers.IGeneratedObject { +constructor( + public a: number = 0.0, + public b: (number)[] = [], + public c: number = 0, + public dUnderscore: bigint = BigInt('0') +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return InnerStruct.createInnerStruct(builder, + this.a, + this.b, + this.c, + this.dUnderscore + ); +} +} + +export class OuterStruct implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):OuterStruct { + this.bb_pos = i; + this.bb = bb; + return this; +} + +a():boolean { + return !!this.bb!.readInt8(this.bb_pos); +} + +b():number { + return this.bb!.readFloat64(this.bb_pos + 8); +} + +cUnderscore(obj?:InnerStruct):InnerStruct|null { + return (obj || new InnerStruct()).__init(this.bb_pos + 16, this.bb!); +} + +d(index: number, obj?:InnerStruct):InnerStruct|null { + return (obj || new InnerStruct()).__init(this.bb_pos + 48 + index * 32, this.bb!); +} + +e(obj?:InnerStruct):InnerStruct|null { + return (obj || new InnerStruct()).__init(this.bb_pos + 144, this.bb!); +} + +f(index: number):number|null { + return this.bb!.readFloat64(this.bb_pos + 176 + index * 8); +} + +static getFullyQualifiedName():string { + return 'MyGame_Example_OuterStruct'; +} + +static sizeOf():number { + return 208; +} + +static createOuterStruct(builder:flatbuffers.Builder, a: boolean, b: number, c_underscore_a: number, c_underscore_b: number[]|null, c_underscore_c: number, c_underscore_d_underscore: bigint, d: (any|InnerStructT)[]|null, e_a: number, e_b: number[]|null, e_c: number, e_d_underscore: bigint, f: number[]|null):flatbuffers.Offset { + builder.prep(8, 208); + + for (let i = 3; i >= 0; --i) { + builder.writeFloat64((f?.[i] ?? 0)); + + } + + builder.prep(8, 32); + builder.writeInt64(BigInt(e_d_underscore ?? 0)); + builder.pad(2); + builder.writeInt8(e_c); + + for (let i = 12; i >= 0; --i) { + builder.writeInt8((e_b?.[i] ?? 0)); + + } + + builder.writeFloat64(e_a); + + for (let i = 2; i >= 0; --i) { + const item = d?.[i]; + + if (item instanceof InnerStructT) { + item.pack(builder); + continue; + } + + InnerStruct.createInnerStruct(builder, + item?.a, + item?.b, + item?.c, + item?.dUnderscore + ); + } + + builder.prep(8, 32); + builder.writeInt64(BigInt(c_underscore_d_underscore ?? 0)); + builder.pad(2); + builder.writeInt8(c_underscore_c); + + for (let i = 12; i >= 0; --i) { + builder.writeInt8((c_underscore_b?.[i] ?? 0)); + + } + + builder.writeFloat64(c_underscore_a); + builder.writeFloat64(b); + builder.pad(7); + builder.writeInt8(Number(Boolean(a))); + return builder.offset(); +} + + +unpack(): OuterStructT { + return new OuterStructT( + this.a(), + this.b(), + (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null), + this.bb!.createObjList(this.d.bind(this), 3), + (this.e() !== null ? this.e()!.unpack() : null), + this.bb!.createScalarList(this.f.bind(this), 4) + ); +} + + +unpackTo(_o: OuterStructT): void { + _o.a = this.a(); + _o.b = this.b(); + _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null); + _o.d = this.bb!.createObjList(this.d.bind(this), 3); + _o.e = (this.e() !== null ? this.e()!.unpack() : null); + _o.f = this.bb!.createScalarList(this.f.bind(this), 4); +} +} + +export class OuterStructT implements flatbuffers.IGeneratedObject { +constructor( + public a: boolean = false, + public b: number = 0.0, + public cUnderscore: InnerStructT|null = null, + public d: (InnerStructT)[] = [], + public e: InnerStructT|null = null, + public f: (number)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OuterStruct.createOuterStruct(builder, + this.a, + this.b, + (this.cUnderscore?.a ?? 0), + (this.cUnderscore?.b ?? []), + (this.cUnderscore?.c ?? 0), + (this.cUnderscore?.dUnderscore ?? BigInt(0)), + this.d, + (this.e?.a ?? 0), + (this.e?.b ?? []), + (this.e?.c ?? 0), + (this.e?.dUnderscore ?? BigInt(0)), + this.f + ); +} +} + +export class NestedStruct implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):NestedStruct { + this.bb_pos = i; + this.bb = bb; + return this; +} + +a(index: number):number|null { + return this.bb!.readInt32(this.bb_pos + 0 + index * 4); +} + +b():TestEnum { + return this.bb!.readInt8(this.bb_pos + 8); +} + +cUnderscore(index: number):TestEnum|null { + return this.bb!.readInt8(this.bb_pos + 9 + index); +} + +dOuter(index: number, obj?:OuterStruct):OuterStruct|null { + return (obj || new OuterStruct()).__init(this.bb_pos + 16 + index * 208, this.bb!); +} + +e(index: number):bigint|null { + return this.bb!.readInt64(this.bb_pos + 1056 + index * 8); +} + +static getFullyQualifiedName():string { + return 'MyGame_Example_NestedStruct'; +} + +static sizeOf():number { + return 1072; +} + +static createNestedStruct(builder:flatbuffers.Builder, a: number[]|null, b: TestEnum, c_underscore: number[]|null, d_outer: (any|OuterStructT)[]|null, e: bigint[]|null):flatbuffers.Offset { + builder.prep(8, 1072); + + for (let i = 1; i >= 0; --i) { + builder.writeInt64(BigInt(e?.[i] ?? 0)); + } + + + for (let i = 4; i >= 0; --i) { + const item = d_outer?.[i]; + + if (item instanceof OuterStructT) { + item.pack(builder); + continue; + } + + OuterStruct.createOuterStruct(builder, + item?.a, + item?.b, + (item?.cUnderscore?.a ?? 0), + (item?.cUnderscore?.b ?? []), + (item?.cUnderscore?.c ?? 0), + (item?.cUnderscore?.dUnderscore ?? BigInt(0)), + item?.d, + (item?.e?.a ?? 0), + (item?.e?.b ?? []), + (item?.e?.c ?? 0), + (item?.e?.dUnderscore ?? BigInt(0)), + item?.f + ); + } + + builder.pad(5); + + for (let i = 1; i >= 0; --i) { + builder.writeInt8((c_underscore?.[i] ?? 0)); + + } + + builder.writeInt8(b); + + for (let i = 1; i >= 0; --i) { + builder.writeInt32((a?.[i] ?? 0)); + + } + + return builder.offset(); +} + + +unpack(): NestedStructT { + return new NestedStructT( + this.bb!.createScalarList(this.a.bind(this), 2), + this.b(), + this.bb!.createScalarList(this.cUnderscore.bind(this), 2), + this.bb!.createObjList(this.dOuter.bind(this), 5), + this.bb!.createScalarList(this.e.bind(this), 2) + ); +} + + +unpackTo(_o: NestedStructT): void { + _o.a = this.bb!.createScalarList(this.a.bind(this), 2); + _o.b = this.b(); + _o.cUnderscore = this.bb!.createScalarList(this.cUnderscore.bind(this), 2); + _o.dOuter = this.bb!.createObjList(this.dOuter.bind(this), 5); + _o.e = this.bb!.createScalarList(this.e.bind(this), 2); +} +} + +export class NestedStructT implements flatbuffers.IGeneratedObject { +constructor( + public a: (number)[] = [], + public b: TestEnum = TestEnum.A, + public cUnderscore: (TestEnum)[] = [TestEnum.A, TestEnum.A], + public dOuter: (OuterStructT)[] = [], + public e: (bigint)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return NestedStruct.createNestedStruct(builder, + this.a, + this.b, + this.cUnderscore, + this.dOuter, + this.e + ); +} +} + +export class ArrayStruct implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ArrayStruct { + this.bb_pos = i; + this.bb = bb; + return this; +} + +aUnderscore():number { + return this.bb!.readFloat32(this.bb_pos); +} + +bUnderscore(index: number):number|null { + return this.bb!.readInt32(this.bb_pos + 4 + index * 4); +} + +c():number { + return this.bb!.readInt8(this.bb_pos + 64); +} + +d(index: number, obj?:NestedStruct):NestedStruct|null { + return (obj || new NestedStruct()).__init(this.bb_pos + 72 + index * 1072, this.bb!); +} + +e():number { + return this.bb!.readInt32(this.bb_pos + 2216); +} + +f(index: number, obj?:OuterStruct):OuterStruct|null { + return (obj || new OuterStruct()).__init(this.bb_pos + 2224 + index * 208, this.bb!); +} + +g(index: number):bigint|null { + return this.bb!.readInt64(this.bb_pos + 2640 + index * 8); +} + +static getFullyQualifiedName():string { + return 'MyGame_Example_ArrayStruct'; +} + +static sizeOf():number { + return 2656; +} + +static createArrayStruct(builder:flatbuffers.Builder, a_underscore: number, b_underscore: number[]|null, c: number, d: (any|NestedStructT)[]|null, e: number, f: (any|OuterStructT)[]|null, g: bigint[]|null):flatbuffers.Offset { + builder.prep(8, 2656); + + for (let i = 1; i >= 0; --i) { + builder.writeInt64(BigInt(g?.[i] ?? 0)); + } + + + for (let i = 1; i >= 0; --i) { + const item = f?.[i]; + + if (item instanceof OuterStructT) { + item.pack(builder); + continue; + } + + OuterStruct.createOuterStruct(builder, + item?.a, + item?.b, + (item?.cUnderscore?.a ?? 0), + (item?.cUnderscore?.b ?? []), + (item?.cUnderscore?.c ?? 0), + (item?.cUnderscore?.dUnderscore ?? BigInt(0)), + item?.d, + (item?.e?.a ?? 0), + (item?.e?.b ?? []), + (item?.e?.c ?? 0), + (item?.e?.dUnderscore ?? BigInt(0)), + item?.f + ); + } + + builder.pad(4); + builder.writeInt32(e); + + for (let i = 1; i >= 0; --i) { + const item = d?.[i]; + + if (item instanceof NestedStructT) { + item.pack(builder); + continue; + } + + NestedStruct.createNestedStruct(builder, + item?.a, + item?.b, + item?.cUnderscore, + item?.dOuter, + item?.e + ); + } + + builder.pad(7); + builder.writeInt8(c); + + for (let i = 14; i >= 0; --i) { + builder.writeInt32((b_underscore?.[i] ?? 0)); + + } + + builder.writeFloat32(a_underscore); + return builder.offset(); +} + + +unpack(): ArrayStructT { + return new ArrayStructT( + this.aUnderscore(), + this.bb!.createScalarList(this.bUnderscore.bind(this), 15), + this.c(), + this.bb!.createObjList(this.d.bind(this), 2), + this.e(), + this.bb!.createObjList(this.f.bind(this), 2), + this.bb!.createScalarList(this.g.bind(this), 2) + ); +} + + +unpackTo(_o: ArrayStructT): void { + _o.aUnderscore = this.aUnderscore(); + _o.bUnderscore = this.bb!.createScalarList(this.bUnderscore.bind(this), 15); + _o.c = this.c(); + _o.d = this.bb!.createObjList(this.d.bind(this), 2); + _o.e = this.e(); + _o.f = this.bb!.createObjList(this.f.bind(this), 2); + _o.g = this.bb!.createScalarList(this.g.bind(this), 2); +} +} + +export class ArrayStructT implements flatbuffers.IGeneratedObject { +constructor( + public aUnderscore: number = 0.0, + public bUnderscore: (number)[] = [], + public c: number = 0, + public d: (NestedStructT)[] = [], + public e: number = 0, + public f: (OuterStructT)[] = [], + public g: (bigint)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ArrayStruct.createArrayStruct(builder, + this.aUnderscore, + this.bUnderscore, + this.c, + this.d, + this.e, + this.f, + this.g + ); +} +} + +export class ArrayTable implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ArrayTable { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsArrayTable(bb:flatbuffers.ByteBuffer, obj?:ArrayTable):ArrayTable { + return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsArrayTable(bb:flatbuffers.ByteBuffer, obj?:ArrayTable):ArrayTable { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ArrayTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean { + return bb.__has_identifier('RHUB'); +} + +a():string|null +a(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +a(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +cUnderscore(obj?:ArrayStruct):ArrayStruct|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new ArrayStruct()).__init(this.bb_pos + offset, this.bb!) : null; +} + +static getFullyQualifiedName():string { + return 'MyGame_Example_ArrayTable'; +} + +static startArrayTable(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addA(builder:flatbuffers.Builder, aOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, aOffset, 0); +} + +static addCUnderscore(builder:flatbuffers.Builder, cUnderscoreOffset:flatbuffers.Offset) { + builder.addFieldStruct(1, cUnderscoreOffset, 0); +} + +static endArrayTable(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static finishArrayTableBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) { + builder.finish(offset, 'RHUB'); +} + +static finishSizePrefixedArrayTableBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) { + builder.finish(offset, 'RHUB', true); +} + + +unpack(): ArrayTableT { + return new ArrayTableT( + this.a(), + (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null) + ); +} + + +unpackTo(_o: ArrayTableT): void { + _o.a = this.a(); + _o.cUnderscore = (this.cUnderscore() !== null ? this.cUnderscore()!.unpack() : null); +} +} + +export class ArrayTableT implements flatbuffers.IGeneratedObject { +constructor( + public a: string|Uint8Array|null = null, + public cUnderscore: ArrayStructT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const a = (this.a !== null ? builder.createString(this.a!) : 0); + + ArrayTable.startArrayTable(builder); + ArrayTable.addA(builder, a); + ArrayTable.addCUnderscore(builder, (this.cUnderscore !== null ? this.cUnderscore!.pack(builder) : 0)); + + return ArrayTable.endArrayTable(builder); +} +} + diff --git a/third_party/flatbuffers/tests/ts/monsterdata_javascript_wire.mon b/third_party/flatbuffers/tests/ts/monsterdata_javascript_wire.mon index c6020a2eb2..8e270b35b2 100644 Binary files a/third_party/flatbuffers/tests/ts/monsterdata_javascript_wire.mon and b/third_party/flatbuffers/tests/ts/monsterdata_javascript_wire.mon differ diff --git a/third_party/flatbuffers/tests/ts/my-game/example/ability.ts b/third_party/flatbuffers/tests/ts/my-game/example/ability.ts index 36b0eb8105..b0bea8fe84 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/ability.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/ability.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Ability { +export class Ability implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Ability { @@ -61,7 +61,7 @@ unpackTo(_o: AbilityT): void { } } -export class AbilityT { +export class AbilityT implements flatbuffers.IGeneratedObject { constructor( public id: number = 0, public distance: number = 0 diff --git a/third_party/flatbuffers/tests/ts/my-game/example/monster.js b/third_party/flatbuffers/tests/ts/my-game/example/monster.js index e4ef970ab6..97c93991c8 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/monster.js +++ b/third_party/flatbuffers/tests/ts/my-game/example/monster.js @@ -526,11 +526,95 @@ export class Monster { this.bb.writeUint64(this.bb_pos + offset, value); return true; } + nanDefault() { + const offset = this.bb.__offset(this.bb_pos, 112); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : NaN; + } + mutate_nan_default(value) { + const offset = this.bb.__offset(this.bb_pos, 112); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + infDefault() { + const offset = this.bb.__offset(this.bb_pos, 114); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity; + } + mutate_inf_default(value) { + const offset = this.bb.__offset(this.bb_pos, 114); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + positiveInfDefault() { + const offset = this.bb.__offset(this.bb_pos, 116); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity; + } + mutate_positive_inf_default(value) { + const offset = this.bb.__offset(this.bb_pos, 116); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + infinityDefault() { + const offset = this.bb.__offset(this.bb_pos, 118); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity; + } + mutate_infinity_default(value) { + const offset = this.bb.__offset(this.bb_pos, 118); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + positiveInfinityDefault() { + const offset = this.bb.__offset(this.bb_pos, 120); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity; + } + mutate_positive_infinity_default(value) { + const offset = this.bb.__offset(this.bb_pos, 120); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + negativeInfDefault() { + const offset = this.bb.__offset(this.bb_pos, 122); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity; + } + mutate_negative_inf_default(value) { + const offset = this.bb.__offset(this.bb_pos, 122); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } + negativeInfinityDefault() { + const offset = this.bb.__offset(this.bb_pos, 124); + return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity; + } + mutate_negative_infinity_default(value) { + const offset = this.bb.__offset(this.bb_pos, 124); + if (offset === 0) { + return false; + } + this.bb.writeFloat32(this.bb_pos + offset, value); + return true; + } static getFullyQualifiedName() { return 'MyGame_Example_Monster'; } static startMonster(builder) { - builder.startObject(54); + builder.startObject(61); } static addPos(builder, posOffset) { builder.addFieldStruct(0, posOffset, 0); @@ -870,6 +954,27 @@ export class Monster { static addLongEnumNormalDefault(builder, longEnumNormalDefault) { builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2')); } + static addNanDefault(builder, nanDefault) { + builder.addFieldFloat32(54, nanDefault, NaN); + } + static addInfDefault(builder, infDefault) { + builder.addFieldFloat32(55, infDefault, Infinity); + } + static addPositiveInfDefault(builder, positiveInfDefault) { + builder.addFieldFloat32(56, positiveInfDefault, Infinity); + } + static addInfinityDefault(builder, infinityDefault) { + builder.addFieldFloat32(57, infinityDefault, Infinity); + } + static addPositiveInfinityDefault(builder, positiveInfinityDefault) { + builder.addFieldFloat32(58, positiveInfinityDefault, Infinity); + } + static addNegativeInfDefault(builder, negativeInfDefault) { + builder.addFieldFloat32(59, negativeInfDefault, -Infinity); + } + static addNegativeInfinityDefault(builder, negativeInfinityDefault) { + builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity); + } static endMonster(builder) { const offset = builder.endObject(); builder.requiredField(offset, 10); // name @@ -889,24 +994,24 @@ export class Monster { } unpack() { return new MonsterT((this.pos() !== null ? this.pos().unpack() : null), this.mana(), this.hp(), this.name(), this.bb.createScalarList(this.inventory.bind(this), this.inventoryLength()), this.color(), this.testType(), (() => { - let temp = unionToAny(this.testType(), this.test.bind(this)); + const temp = unionToAny(this.testType(), this.test.bind(this)); if (temp === null) { return null; } return temp.unpack(); })(), this.bb.createObjList(this.test4.bind(this), this.test4Length()), this.bb.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()), this.bb.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()), (this.enemy() !== null ? this.enemy().unpack() : null), this.bb.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()), (this.testempty() !== null ? this.testempty().unpack() : null), this.testbool(), this.testhashs32Fnv1(), this.testhashu32Fnv1(), this.testhashs64Fnv1(), this.testhashu64Fnv1(), this.testhashs32Fnv1a(), this.testhashu32Fnv1a(), this.testhashs64Fnv1a(), this.testhashu64Fnv1a(), this.bb.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()), this.testf(), this.testf2(), this.testf3(), this.bb.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()), this.bb.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()), this.bb.createScalarList(this.flex.bind(this), this.flexLength()), this.bb.createObjList(this.test5.bind(this), this.test5Length()), this.bb.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()), this.bb.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()), (this.parentNamespaceTest() !== null ? this.parentNamespaceTest().unpack() : null), this.bb.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()), this.singleWeakReference(), this.bb.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()), this.bb.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()), this.coOwningReference(), this.bb.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()), this.nonOwningReference(), this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()), this.anyUniqueType(), (() => { - let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); + const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); if (temp === null) { return null; } return temp.unpack(); })(), this.anyAmbiguousType(), (() => { - let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); + const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); if (temp === null) { return null; } return temp.unpack(); - })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault()); + })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault(), this.nanDefault(), this.infDefault(), this.positiveInfDefault(), this.infinityDefault(), this.positiveInfinityDefault(), this.negativeInfDefault(), this.negativeInfinityDefault()); } unpackTo(_o) { _o.pos = (this.pos() !== null ? this.pos().unpack() : null); @@ -917,7 +1022,7 @@ export class Monster { _o.color = this.color(); _o.testType = this.testType(); _o.test = (() => { - let temp = unionToAny(this.testType(), this.test.bind(this)); + const temp = unionToAny(this.testType(), this.test.bind(this)); if (temp === null) { return null; } @@ -959,7 +1064,7 @@ export class Monster { _o.vectorOfNonOwningReferences = this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()); _o.anyUniqueType = this.anyUniqueType(); _o.anyUnique = (() => { - let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); + const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); if (temp === null) { return null; } @@ -967,7 +1072,7 @@ export class Monster { })(); _o.anyAmbiguousType = this.anyAmbiguousType(); _o.anyAmbiguous = (() => { - let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); + const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); if (temp === null) { return null; } @@ -980,10 +1085,17 @@ export class Monster { _o.nativeInline = (this.nativeInline() !== null ? this.nativeInline().unpack() : null); _o.longEnumNonEnumDefault = this.longEnumNonEnumDefault(); _o.longEnumNormalDefault = this.longEnumNormalDefault(); + _o.nanDefault = this.nanDefault(); + _o.infDefault = this.infDefault(); + _o.positiveInfDefault = this.positiveInfDefault(); + _o.infinityDefault = this.infinityDefault(); + _o.positiveInfinityDefault = this.positiveInfinityDefault(); + _o.negativeInfDefault = this.negativeInfDefault(); + _o.negativeInfinityDefault = this.negativeInfinityDefault(); } } export class MonsterT { - constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2')) { + constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2'), nanDefault = NaN, infDefault = Infinity, positiveInfDefault = Infinity, infinityDefault = Infinity, positiveInfinityDefault = Infinity, negativeInfDefault = -Infinity, negativeInfinityDefault = -Infinity) { this.pos = pos; this.mana = mana; this.hp = hp; @@ -1037,6 +1149,13 @@ export class MonsterT { this.nativeInline = nativeInline; this.longEnumNonEnumDefault = longEnumNonEnumDefault; this.longEnumNormalDefault = longEnumNormalDefault; + this.nanDefault = nanDefault; + this.infDefault = infDefault; + this.positiveInfDefault = positiveInfDefault; + this.infinityDefault = infinityDefault; + this.positiveInfinityDefault = positiveInfinityDefault; + this.negativeInfDefault = negativeInfDefault; + this.negativeInfinityDefault = negativeInfinityDefault; } pack(builder) { const name = (this.name !== null ? builder.createString(this.name) : 0); @@ -1120,6 +1239,13 @@ export class MonsterT { Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline.pack(builder) : 0)); Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault); Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault); + Monster.addNanDefault(builder, this.nanDefault); + Monster.addInfDefault(builder, this.infDefault); + Monster.addPositiveInfDefault(builder, this.positiveInfDefault); + Monster.addInfinityDefault(builder, this.infinityDefault); + Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault); + Monster.addNegativeInfDefault(builder, this.negativeInfDefault); + Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault); return Monster.endMonster(builder); } } diff --git a/third_party/flatbuffers/tests/ts/my-game/example/monster.ts b/third_party/flatbuffers/tests/ts/my-game/example/monster.ts index 63e5768e58..7e205ee195 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/monster.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/monster.ts @@ -20,7 +20,7 @@ import { InParentNamespace, InParentNamespaceT } from '../../my-game/in-parent-n /** * an example documentation comment: "monster object" */ -export class Monster { +export class Monster implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Monster { @@ -683,12 +683,140 @@ mutate_long_enum_normal_default(value:bigint):boolean { return true; } +nanDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 112); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : NaN; +} + +mutate_nan_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 112); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +infDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 114); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +mutate_inf_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 114); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +positiveInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 116); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +mutate_positive_inf_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 116); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +infinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 118); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +mutate_infinity_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 118); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +positiveInfinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 120); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +mutate_positive_infinity_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 120); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +negativeInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 122); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity; +} + +mutate_negative_inf_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 122); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +negativeInfinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 124); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity; +} + +mutate_negative_infinity_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 124); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat32(this.bb_pos + offset, value); + return true; +} + +doubleInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 126); + return offset ? this.bb!.readFloat64(this.bb_pos + offset) : Infinity; +} + +mutate_double_inf_default(value:number):boolean { + const offset = this.bb!.__offset(this.bb_pos, 126); + + if (offset === 0) { + return false; + } + + this.bb!.writeFloat64(this.bb_pos + offset, value); + return true; +} + static getFullyQualifiedName():string { return 'MyGame_Example_Monster'; } static startMonster(builder:flatbuffers.Builder) { - builder.startObject(54); + builder.startObject(62); } static addPos(builder:flatbuffers.Builder, posOffset:flatbuffers.Offset) { @@ -1124,6 +1252,38 @@ static addLongEnumNormalDefault(builder:flatbuffers.Builder, longEnumNormalDefau builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2')); } +static addNanDefault(builder:flatbuffers.Builder, nanDefault:number) { + builder.addFieldFloat32(54, nanDefault, NaN); +} + +static addInfDefault(builder:flatbuffers.Builder, infDefault:number) { + builder.addFieldFloat32(55, infDefault, Infinity); +} + +static addPositiveInfDefault(builder:flatbuffers.Builder, positiveInfDefault:number) { + builder.addFieldFloat32(56, positiveInfDefault, Infinity); +} + +static addInfinityDefault(builder:flatbuffers.Builder, infinityDefault:number) { + builder.addFieldFloat32(57, infinityDefault, Infinity); +} + +static addPositiveInfinityDefault(builder:flatbuffers.Builder, positiveInfinityDefault:number) { + builder.addFieldFloat32(58, positiveInfinityDefault, Infinity); +} + +static addNegativeInfDefault(builder:flatbuffers.Builder, negativeInfDefault:number) { + builder.addFieldFloat32(59, negativeInfDefault, -Infinity); +} + +static addNegativeInfinityDefault(builder:flatbuffers.Builder, negativeInfinityDefault:number) { + builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity); +} + +static addDoubleInfDefault(builder:flatbuffers.Builder, doubleInfDefault:number) { + builder.addFieldFloat64(61, doubleInfDefault, Infinity); +} + static endMonster(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); builder.requiredField(offset, 10) // name @@ -1153,19 +1313,19 @@ unpack(): MonsterT { this.mana(), this.hp(), this.name(), - this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()), + this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()), this.color(), this.testType(), (() => { - let temp = unionToAny(this.testType(), this.test.bind(this)); + const temp = unionToAny(this.testType(), this.test.bind(this)); if(temp === null) { return null; } return temp.unpack() })(), - this.bb!.createObjList(this.test4.bind(this), this.test4Length()), - this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()), - this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()), + this.bb!.createObjList(this.test4.bind(this), this.test4Length()), + this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()), + this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()), (this.enemy() !== null ? this.enemy()!.unpack() : null), - this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()), + this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()), (this.testempty() !== null ? this.testempty()!.unpack() : null), this.testbool(), this.testhashs32Fnv1(), @@ -1176,44 +1336,52 @@ unpack(): MonsterT { this.testhashu32Fnv1a(), this.testhashs64Fnv1a(), this.testhashu64Fnv1a(), - this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()), + this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()), this.testf(), this.testf2(), this.testf3(), - this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()), - this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()), - this.bb!.createScalarList(this.flex.bind(this), this.flexLength()), - this.bb!.createObjList(this.test5.bind(this), this.test5Length()), - this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()), - this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()), + this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()), + this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()), + this.bb!.createScalarList(this.flex.bind(this), this.flexLength()), + this.bb!.createObjList(this.test5.bind(this), this.test5Length()), + this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()), + this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()), (this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null), - this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()), + this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()), this.singleWeakReference(), - this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()), - this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()), + this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()), + this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()), this.coOwningReference(), - this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()), + this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()), this.nonOwningReference(), - this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()), + this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()), this.anyUniqueType(), (() => { - let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); + const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); if(temp === null) { return null; } return temp.unpack() })(), this.anyAmbiguousType(), (() => { - let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); + const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); if(temp === null) { return null; } return temp.unpack() })(), - this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), + this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), - this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), - this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), + this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), + this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline()!.unpack() : null), this.longEnumNonEnumDefault(), - this.longEnumNormalDefault() + this.longEnumNormalDefault(), + this.nanDefault(), + this.infDefault(), + this.positiveInfDefault(), + this.infinityDefault(), + this.positiveInfinityDefault(), + this.negativeInfDefault(), + this.negativeInfinityDefault(), + this.doubleInfDefault() ); } @@ -1223,19 +1391,19 @@ unpackTo(_o: MonsterT): void { _o.mana = this.mana(); _o.hp = this.hp(); _o.name = this.name(); - _o.inventory = this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()); + _o.inventory = this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()); _o.color = this.color(); _o.testType = this.testType(); _o.test = (() => { - let temp = unionToAny(this.testType(), this.test.bind(this)); + const temp = unionToAny(this.testType(), this.test.bind(this)); if(temp === null) { return null; } return temp.unpack() })(); - _o.test4 = this.bb!.createObjList(this.test4.bind(this), this.test4Length()); - _o.testarrayofstring = this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()); - _o.testarrayoftables = this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()); + _o.test4 = this.bb!.createObjList(this.test4.bind(this), this.test4Length()); + _o.testarrayofstring = this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()); + _o.testarrayoftables = this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()); _o.enemy = (this.enemy() !== null ? this.enemy()!.unpack() : null); - _o.testnestedflatbuffer = this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()); + _o.testnestedflatbuffer = this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()); _o.testempty = (this.testempty() !== null ? this.testempty()!.unpack() : null); _o.testbool = this.testbool(); _o.testhashs32Fnv1 = this.testhashs32Fnv1(); @@ -1246,48 +1414,56 @@ unpackTo(_o: MonsterT): void { _o.testhashu32Fnv1a = this.testhashu32Fnv1a(); _o.testhashs64Fnv1a = this.testhashs64Fnv1a(); _o.testhashu64Fnv1a = this.testhashu64Fnv1a(); - _o.testarrayofbools = this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()); + _o.testarrayofbools = this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()); _o.testf = this.testf(); _o.testf2 = this.testf2(); _o.testf3 = this.testf3(); - _o.testarrayofstring2 = this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()); - _o.testarrayofsortedstruct = this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()); - _o.flex = this.bb!.createScalarList(this.flex.bind(this), this.flexLength()); - _o.test5 = this.bb!.createObjList(this.test5.bind(this), this.test5Length()); - _o.vectorOfLongs = this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()); - _o.vectorOfDoubles = this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()); + _o.testarrayofstring2 = this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()); + _o.testarrayofsortedstruct = this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()); + _o.flex = this.bb!.createScalarList(this.flex.bind(this), this.flexLength()); + _o.test5 = this.bb!.createObjList(this.test5.bind(this), this.test5Length()); + _o.vectorOfLongs = this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()); + _o.vectorOfDoubles = this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()); _o.parentNamespaceTest = (this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null); - _o.vectorOfReferrables = this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()); + _o.vectorOfReferrables = this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()); _o.singleWeakReference = this.singleWeakReference(); - _o.vectorOfWeakReferences = this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()); - _o.vectorOfStrongReferrables = this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()); + _o.vectorOfWeakReferences = this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()); + _o.vectorOfStrongReferrables = this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()); _o.coOwningReference = this.coOwningReference(); - _o.vectorOfCoOwningReferences = this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()); + _o.vectorOfCoOwningReferences = this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()); _o.nonOwningReference = this.nonOwningReference(); - _o.vectorOfNonOwningReferences = this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()); + _o.vectorOfNonOwningReferences = this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()); _o.anyUniqueType = this.anyUniqueType(); _o.anyUnique = (() => { - let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); + const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this)); if(temp === null) { return null; } return temp.unpack() })(); _o.anyAmbiguousType = this.anyAmbiguousType(); _o.anyAmbiguous = (() => { - let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); + const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this)); if(temp === null) { return null; } return temp.unpack() })(); - _o.vectorOfEnums = this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()); + _o.vectorOfEnums = this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()); _o.signedEnum = this.signedEnum(); - _o.testrequirednestedflatbuffer = this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()); - _o.scalarKeySortedTables = this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()); + _o.testrequirednestedflatbuffer = this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()); + _o.scalarKeySortedTables = this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()); _o.nativeInline = (this.nativeInline() !== null ? this.nativeInline()!.unpack() : null); _o.longEnumNonEnumDefault = this.longEnumNonEnumDefault(); _o.longEnumNormalDefault = this.longEnumNormalDefault(); + _o.nanDefault = this.nanDefault(); + _o.infDefault = this.infDefault(); + _o.positiveInfDefault = this.positiveInfDefault(); + _o.infinityDefault = this.infinityDefault(); + _o.positiveInfinityDefault = this.positiveInfinityDefault(); + _o.negativeInfDefault = this.negativeInfDefault(); + _o.negativeInfinityDefault = this.negativeInfinityDefault(); + _o.doubleInfDefault = this.doubleInfDefault(); } } -export class MonsterT { +export class MonsterT implements flatbuffers.IGeneratedObject { constructor( public pos: Vec3T|null = null, public mana: number = 150, @@ -1341,7 +1517,15 @@ constructor( public scalarKeySortedTables: (StatT)[] = [], public nativeInline: TestT|null = null, public longEnumNonEnumDefault: bigint = BigInt('0'), - public longEnumNormalDefault: bigint = BigInt('2') + public longEnumNormalDefault: bigint = BigInt('2'), + public nanDefault: number = NaN, + public infDefault: number = Infinity, + public positiveInfDefault: number = Infinity, + public infinityDefault: number = Infinity, + public positiveInfinityDefault: number = Infinity, + public negativeInfDefault: number = -Infinity, + public negativeInfinityDefault: number = -Infinity, + public doubleInfDefault: number = Infinity ){} @@ -1428,6 +1612,14 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline!.pack(builder) : 0)); Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault); Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault); + Monster.addNanDefault(builder, this.nanDefault); + Monster.addInfDefault(builder, this.infDefault); + Monster.addPositiveInfDefault(builder, this.positiveInfDefault); + Monster.addInfinityDefault(builder, this.infinityDefault); + Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault); + Monster.addNegativeInfDefault(builder, this.negativeInfDefault); + Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault); + Monster.addDoubleInfDefault(builder, this.doubleInfDefault); return Monster.endMonster(builder); } diff --git a/third_party/flatbuffers/tests/ts/my-game/example/referrable.ts b/third_party/flatbuffers/tests/ts/my-game/example/referrable.ts index ec02980037..52603629aa 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/referrable.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/referrable.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Referrable { +export class Referrable implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Referrable { @@ -81,7 +81,7 @@ unpackTo(_o: ReferrableT): void { } } -export class ReferrableT { +export class ReferrableT implements flatbuffers.IGeneratedObject { constructor( public id: bigint = BigInt('0') ){} diff --git a/third_party/flatbuffers/tests/ts/my-game/example/stat.ts b/third_party/flatbuffers/tests/ts/my-game/example/stat.ts index e45259950a..c1597b2a91 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/stat.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/stat.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Stat { +export class Stat implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Stat { @@ -118,7 +118,7 @@ unpackTo(_o: StatT): void { } } -export class StatT { +export class StatT implements flatbuffers.IGeneratedObject { constructor( public id: string|Uint8Array|null = null, public val: bigint = BigInt('0'), diff --git a/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs-of-structs.ts b/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs-of-structs.ts index 52efc12054..fa17939b87 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs-of-structs.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs-of-structs.ts @@ -5,7 +5,7 @@ import * as flatbuffers from 'flatbuffers'; import { StructOfStructs, StructOfStructsT } from '../../my-game/example/struct-of-structs.js'; -export class StructOfStructsOfStructs { +export class StructOfStructsOfStructs implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructsOfStructs { @@ -55,7 +55,7 @@ unpackTo(_o: StructOfStructsOfStructsT): void { } } -export class StructOfStructsOfStructsT { +export class StructOfStructsOfStructsT implements flatbuffers.IGeneratedObject { constructor( public a: StructOfStructsT|null = null ){} diff --git a/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs.ts b/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs.ts index 749a73cb1d..10d3607f15 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/struct-of-structs.ts @@ -6,7 +6,7 @@ import { Ability, AbilityT } from '../../my-game/example/ability.js'; import { Test, TestT } from '../../my-game/example/test.js'; -export class StructOfStructs { +export class StructOfStructs implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructs { @@ -67,7 +67,7 @@ unpackTo(_o: StructOfStructsT): void { } } -export class StructOfStructsT { +export class StructOfStructsT implements flatbuffers.IGeneratedObject { constructor( public a: AbilityT|null = null, public b: TestT|null = null, diff --git a/third_party/flatbuffers/tests/ts/my-game/example/test-simple-table-with-enum.ts b/third_party/flatbuffers/tests/ts/my-game/example/test-simple-table-with-enum.ts index cfca00b4a1..903ab99cbf 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/test-simple-table-with-enum.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/test-simple-table-with-enum.ts @@ -5,7 +5,7 @@ import * as flatbuffers from 'flatbuffers'; import { Color } from '../../my-game/example/color.js'; -export class TestSimpleTableWithEnum { +export class TestSimpleTableWithEnum implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):TestSimpleTableWithEnum { @@ -82,7 +82,7 @@ unpackTo(_o: TestSimpleTableWithEnumT): void { } } -export class TestSimpleTableWithEnumT { +export class TestSimpleTableWithEnumT implements flatbuffers.IGeneratedObject { constructor( public color: Color = Color.Green ){} diff --git a/third_party/flatbuffers/tests/ts/my-game/example/test.ts b/third_party/flatbuffers/tests/ts/my-game/example/test.ts index b3d84eece9..7484f2c158 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/test.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/test.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Test { +export class Test implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Test { @@ -62,7 +62,7 @@ unpackTo(_o: TestT): void { } } -export class TestT { +export class TestT implements flatbuffers.IGeneratedObject { constructor( public a: number = 0, public b: number = 0 diff --git a/third_party/flatbuffers/tests/ts/my-game/example/type-aliases.ts b/third_party/flatbuffers/tests/ts/my-game/example/type-aliases.ts index 805c8cf3fc..93262d702f 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/type-aliases.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/type-aliases.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class TypeAliases { +export class TypeAliases implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):TypeAliases { @@ -344,8 +344,8 @@ unpack(): TypeAliasesT { this.u64(), this.f32(), this.f64(), - this.bb!.createScalarList(this.v8.bind(this), this.v8Length()), - this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length()) + this.bb!.createScalarList(this.v8.bind(this), this.v8Length()), + this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length()) ); } @@ -361,12 +361,12 @@ unpackTo(_o: TypeAliasesT): void { _o.u64 = this.u64(); _o.f32 = this.f32(); _o.f64 = this.f64(); - _o.v8 = this.bb!.createScalarList(this.v8.bind(this), this.v8Length()); - _o.vf64 = this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length()); + _o.v8 = this.bb!.createScalarList(this.v8.bind(this), this.v8Length()); + _o.vf64 = this.bb!.createScalarList(this.vf64.bind(this), this.vf64Length()); } } -export class TypeAliasesT { +export class TypeAliasesT implements flatbuffers.IGeneratedObject { constructor( public i8: number = 0, public u8: number = 0, diff --git a/third_party/flatbuffers/tests/ts/my-game/example/vec3.ts b/third_party/flatbuffers/tests/ts/my-game/example/vec3.ts index bc4c473320..84516e09cc 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example/vec3.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example/vec3.ts @@ -6,7 +6,7 @@ import { Color } from '../../my-game/example/color.js'; import { Test, TestT } from '../../my-game/example/test.js'; -export class Vec3 { +export class Vec3 implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Vec3 { @@ -112,7 +112,7 @@ unpackTo(_o: Vec3T): void { } } -export class Vec3T { +export class Vec3T implements flatbuffers.IGeneratedObject { constructor( public x: number = 0.0, public y: number = 0.0, diff --git a/third_party/flatbuffers/tests/ts/my-game/example2/monster.ts b/third_party/flatbuffers/tests/ts/my-game/example2/monster.ts index 7240476bef..071448699b 100644 --- a/third_party/flatbuffers/tests/ts/my-game/example2/monster.ts +++ b/third_party/flatbuffers/tests/ts/my-game/example2/monster.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Monster { +export class Monster implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Monster { @@ -56,7 +56,7 @@ unpack(): MonsterT { unpackTo(_o: MonsterT): void {} } -export class MonsterT { +export class MonsterT implements flatbuffers.IGeneratedObject { constructor(){} diff --git a/third_party/flatbuffers/tests/ts/my-game/in-parent-namespace.ts b/third_party/flatbuffers/tests/ts/my-game/in-parent-namespace.ts index 0de94df5e6..0e2f412876 100644 --- a/third_party/flatbuffers/tests/ts/my-game/in-parent-namespace.ts +++ b/third_party/flatbuffers/tests/ts/my-game/in-parent-namespace.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class InParentNamespace { +export class InParentNamespace implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):InParentNamespace { @@ -56,7 +56,7 @@ unpack(): InParentNamespaceT { unpackTo(_o: InParentNamespaceT): void {} } -export class InParentNamespaceT { +export class InParentNamespaceT implements flatbuffers.IGeneratedObject { constructor(){} diff --git a/third_party/flatbuffers/tests/ts/reflection/enum-val.js b/third_party/flatbuffers/tests/ts/reflection/enum-val.js index f2ce03d1f1..93926a61ae 100644 --- a/third_party/flatbuffers/tests/ts/reflection/enum-val.js +++ b/third_party/flatbuffers/tests/ts/reflection/enum-val.js @@ -1,5 +1,6 @@ // automatically generated by the FlatBuffers compiler, do not modify import * as flatbuffers from 'flatbuffers'; +import { KeyValue } from '../reflection/key-value.js'; import { Type } from '../reflection/type.js'; export class EnumVal { constructor() { @@ -46,11 +47,19 @@ export class EnumVal { const offset = this.bb.__offset(this.bb_pos, 12); return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } + attributes(index, obj) { + const offset = this.bb.__offset(this.bb_pos, 14); + return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; + } + attributesLength() { + const offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; + } static getFullyQualifiedName() { return 'reflection_EnumVal'; } static startEnumVal(builder) { - builder.startObject(5); + builder.startObject(6); } static addName(builder, nameOffset) { builder.addFieldOffset(0, nameOffset, 0); @@ -74,37 +83,54 @@ export class EnumVal { static startDocumentationVector(builder, numElems) { builder.startVector(4, numElems, 4); } + static addAttributes(builder, attributesOffset) { + builder.addFieldOffset(5, attributesOffset, 0); + } + static createAttributesVector(builder, data) { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); + } + static startAttributesVector(builder, numElems) { + builder.startVector(4, numElems, 4); + } static endEnumVal(builder) { const offset = builder.endObject(); builder.requiredField(offset, 4); // name return offset; } unpack() { - return new EnumValT(this.name(), this.value(), (this.unionType() !== null ? this.unionType().unpack() : null), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength())); + return new EnumValT(this.name(), this.value(), (this.unionType() !== null ? this.unionType().unpack() : null), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.bb.createObjList(this.attributes.bind(this), this.attributesLength())); } unpackTo(_o) { _o.name = this.name(); _o.value = this.value(); _o.unionType = (this.unionType() !== null ? this.unionType().unpack() : null); _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength()); } } export class EnumValT { - constructor(name = null, value = BigInt('0'), unionType = null, documentation = []) { + constructor(name = null, value = BigInt('0'), unionType = null, documentation = [], attributes = []) { this.name = name; this.value = value; this.unionType = unionType; this.documentation = documentation; + this.attributes = attributes; } pack(builder) { const name = (this.name !== null ? builder.createString(this.name) : 0); const unionType = (this.unionType !== null ? this.unionType.pack(builder) : 0); const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation)); + const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes)); EnumVal.startEnumVal(builder); EnumVal.addName(builder, name); EnumVal.addValue(builder, this.value); EnumVal.addUnionType(builder, unionType); EnumVal.addDocumentation(builder, documentation); + EnumVal.addAttributes(builder, attributes); return EnumVal.endEnumVal(builder); } } diff --git a/third_party/flatbuffers/tests/ts/reflection/enum-val.ts b/third_party/flatbuffers/tests/ts/reflection/enum-val.ts index 85278327b8..3119a20638 100644 --- a/third_party/flatbuffers/tests/ts/reflection/enum-val.ts +++ b/third_party/flatbuffers/tests/ts/reflection/enum-val.ts @@ -2,10 +2,11 @@ import * as flatbuffers from 'flatbuffers'; +import { KeyValue, KeyValueT } from '../reflection/key-value.js'; import { Type, TypeT } from '../reflection/type.js'; -export class EnumVal { +export class EnumVal implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):EnumVal { @@ -63,12 +64,22 @@ documentationLength():number { return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; } +attributes(index: number, obj?:KeyValue):KeyValue|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +attributesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + static getFullyQualifiedName():string { return 'reflection_EnumVal'; } static startEnumVal(builder:flatbuffers.Builder) { - builder.startObject(5); + builder.startObject(6); } static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { @@ -99,6 +110,22 @@ static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) { builder.startVector(4, numElems, 4); } +static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) { + builder.addFieldOffset(5, attributesOffset, 0); +} + +static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]!); + } + return builder.endVector(); +} + +static startAttributesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + static endEnumVal(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); builder.requiredField(offset, 4) // name @@ -111,7 +138,8 @@ unpack(): EnumValT { this.name(), this.value(), (this.unionType() !== null ? this.unionType()!.unpack() : null), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()) ); } @@ -120,16 +148,18 @@ unpackTo(_o: EnumValT): void { _o.name = this.name(); _o.value = this.value(); _o.unionType = (this.unionType() !== null ? this.unionType()!.unpack() : null); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); } } -export class EnumValT { +export class EnumValT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public value: bigint = BigInt('0'), public unionType: TypeT|null = null, - public documentation: (string)[] = [] + public documentation: (string)[] = [], + public attributes: (KeyValueT)[] = [] ){} @@ -137,12 +167,14 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const name = (this.name !== null ? builder.createString(this.name!) : 0); const unionType = (this.unionType !== null ? this.unionType!.pack(builder) : 0); const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation)); + const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes)); EnumVal.startEnumVal(builder); EnumVal.addName(builder, name); EnumVal.addValue(builder, this.value); EnumVal.addUnionType(builder, unionType); EnumVal.addDocumentation(builder, documentation); + EnumVal.addAttributes(builder, attributes); return EnumVal.endEnumVal(builder); } diff --git a/third_party/flatbuffers/tests/ts/reflection/enum.ts b/third_party/flatbuffers/tests/ts/reflection/enum.ts index 7bba354ffa..34d137757e 100644 --- a/third_party/flatbuffers/tests/ts/reflection/enum.ts +++ b/third_party/flatbuffers/tests/ts/reflection/enum.ts @@ -7,7 +7,7 @@ import { KeyValue, KeyValueT } from '../reflection/key-value.js'; import { Type, TypeT } from '../reflection/type.js'; -export class Enum { +export class Enum implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Enum { @@ -179,11 +179,11 @@ static endEnum(builder:flatbuffers.Builder):flatbuffers.Offset { unpack(): EnumT { return new EnumT( this.name(), - this.bb!.createObjList(this.values.bind(this), this.valuesLength()), + this.bb!.createObjList(this.values.bind(this), this.valuesLength()), this.isUnion(), (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -191,16 +191,16 @@ unpack(): EnumT { unpackTo(_o: EnumT): void { _o.name = this.name(); - _o.values = this.bb!.createObjList(this.values.bind(this), this.valuesLength()); + _o.values = this.bb!.createObjList(this.values.bind(this), this.valuesLength()); _o.isUnion = this.isUnion(); _o.underlyingType = (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class EnumT { +export class EnumT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public values: (EnumValT)[] = [], diff --git a/third_party/flatbuffers/tests/ts/reflection/field.ts b/third_party/flatbuffers/tests/ts/reflection/field.ts index 48c1bed16e..9734fbab5e 100644 --- a/third_party/flatbuffers/tests/ts/reflection/field.ts +++ b/third_party/flatbuffers/tests/ts/reflection/field.ts @@ -6,7 +6,7 @@ import { KeyValue, KeyValueT } from '../reflection/key-value.js'; import { Type, TypeT } from '../reflection/type.js'; -export class Field { +export class Field implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Field { @@ -308,8 +308,8 @@ unpack(): FieldT { this.deprecated(), this.required(), this.key(), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.optional(), this.padding() ); @@ -326,14 +326,14 @@ unpackTo(_o: FieldT): void { _o.deprecated = this.deprecated(); _o.required = this.required(); _o.key = this.key(); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.optional = this.optional(); _o.padding = this.padding(); } } -export class FieldT { +export class FieldT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public type: TypeT|null = null, diff --git a/third_party/flatbuffers/tests/ts/reflection/key-value.ts b/third_party/flatbuffers/tests/ts/reflection/key-value.ts index 736766b972..93262f42f6 100644 --- a/third_party/flatbuffers/tests/ts/reflection/key-value.ts +++ b/third_party/flatbuffers/tests/ts/reflection/key-value.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class KeyValue { +export class KeyValue implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):KeyValue { @@ -79,7 +79,7 @@ unpackTo(_o: KeyValueT): void { } } -export class KeyValueT { +export class KeyValueT implements flatbuffers.IGeneratedObject { constructor( public key: string|Uint8Array|null = null, public value: string|Uint8Array|null = null diff --git a/third_party/flatbuffers/tests/ts/reflection/object.ts b/third_party/flatbuffers/tests/ts/reflection/object.ts index 1e14f039be..fbe7006158 100644 --- a/third_party/flatbuffers/tests/ts/reflection/object.ts +++ b/third_party/flatbuffers/tests/ts/reflection/object.ts @@ -6,7 +6,7 @@ import { Field, FieldT } from '../reflection/field.js'; import { KeyValue, KeyValueT } from '../reflection/key-value.js'; -export class Object_ { +export class Object_ implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Object_ { @@ -220,12 +220,12 @@ static createObject(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, unpack(): Object_T { return new Object_T( this.name(), - this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()), + this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()), this.isStruct(), this.minalign(), this.bytesize(), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -233,17 +233,17 @@ unpack(): Object_T { unpackTo(_o: Object_T): void { _o.name = this.name(); - _o.fields = this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()); + _o.fields = this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()); _o.isStruct = this.isStruct(); _o.minalign = this.minalign(); _o.bytesize = this.bytesize(); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class Object_T { +export class Object_T implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public fields: (FieldT)[] = [], diff --git a/third_party/flatbuffers/tests/ts/reflection/rpccall.ts b/third_party/flatbuffers/tests/ts/reflection/rpccall.ts index 151d7b1bc8..320de51695 100644 --- a/third_party/flatbuffers/tests/ts/reflection/rpccall.ts +++ b/third_party/flatbuffers/tests/ts/reflection/rpccall.ts @@ -6,7 +6,7 @@ import { KeyValue, KeyValueT } from '../reflection/key-value.js'; import { Object_, Object_T } from '../reflection/object.js'; -export class RPCCall { +export class RPCCall implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):RPCCall { @@ -129,8 +129,8 @@ unpack(): RPCCallT { this.name(), (this.request() !== null ? this.request()!.unpack() : null), (this.response() !== null ? this.response()!.unpack() : null), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) ); } @@ -139,12 +139,12 @@ unpackTo(_o: RPCCallT): void { _o.name = this.name(); _o.request = (this.request() !== null ? this.request()!.unpack() : null); _o.response = (this.response() !== null ? this.response()!.unpack() : null); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); } } -export class RPCCallT { +export class RPCCallT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public request: Object_T|null = null, diff --git a/third_party/flatbuffers/tests/ts/reflection/schema-file.ts b/third_party/flatbuffers/tests/ts/reflection/schema-file.ts index e1f50357dd..eda23dede0 100644 --- a/third_party/flatbuffers/tests/ts/reflection/schema-file.ts +++ b/third_party/flatbuffers/tests/ts/reflection/schema-file.ts @@ -9,7 +9,7 @@ import * as flatbuffers from 'flatbuffers'; * Symbols declared within a file may be recovered by iterating over all * symbols and examining the `declaration_file` field. */ -export class SchemaFile { +export class SchemaFile implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):SchemaFile { @@ -96,18 +96,18 @@ static createSchemaFile(builder:flatbuffers.Builder, filenameOffset:flatbuffers. unpack(): SchemaFileT { return new SchemaFileT( this.filename(), - this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()) + this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()) ); } unpackTo(_o: SchemaFileT): void { _o.filename = this.filename(); - _o.includedFilenames = this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()); + _o.includedFilenames = this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()); } } -export class SchemaFileT { +export class SchemaFileT implements flatbuffers.IGeneratedObject { constructor( public filename: string|Uint8Array|null = null, public includedFilenames: (string)[] = [] diff --git a/third_party/flatbuffers/tests/ts/reflection/schema.ts b/third_party/flatbuffers/tests/ts/reflection/schema.ts index d1839c7cb1..c99652226d 100644 --- a/third_party/flatbuffers/tests/ts/reflection/schema.ts +++ b/third_party/flatbuffers/tests/ts/reflection/schema.ts @@ -8,7 +8,7 @@ import { SchemaFile, SchemaFileT } from '../reflection/schema-file.js'; import { Service, ServiceT } from '../reflection/service.js'; -export class Schema { +export class Schema implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Schema { @@ -215,31 +215,31 @@ static finishSizePrefixedSchemaBuffer(builder:flatbuffers.Builder, offset:flatbu unpack(): SchemaT { return new SchemaT( - this.bb!.createObjList(this.objects.bind(this), this.objectsLength()), - this.bb!.createObjList(this.enums.bind(this), this.enumsLength()), + this.bb!.createObjList(this.objects.bind(this), this.objectsLength()), + this.bb!.createObjList(this.enums.bind(this), this.enumsLength()), this.fileIdent(), this.fileExt(), (this.rootTable() !== null ? this.rootTable()!.unpack() : null), - this.bb!.createObjList(this.services.bind(this), this.servicesLength()), + this.bb!.createObjList(this.services.bind(this), this.servicesLength()), this.advancedFeatures(), - this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()) + this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()) ); } unpackTo(_o: SchemaT): void { - _o.objects = this.bb!.createObjList(this.objects.bind(this), this.objectsLength()); - _o.enums = this.bb!.createObjList(this.enums.bind(this), this.enumsLength()); + _o.objects = this.bb!.createObjList(this.objects.bind(this), this.objectsLength()); + _o.enums = this.bb!.createObjList(this.enums.bind(this), this.enumsLength()); _o.fileIdent = this.fileIdent(); _o.fileExt = this.fileExt(); _o.rootTable = (this.rootTable() !== null ? this.rootTable()!.unpack() : null); - _o.services = this.bb!.createObjList(this.services.bind(this), this.servicesLength()); + _o.services = this.bb!.createObjList(this.services.bind(this), this.servicesLength()); _o.advancedFeatures = this.advancedFeatures(); - _o.fbsFiles = this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()); + _o.fbsFiles = this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()); } } -export class SchemaT { +export class SchemaT implements flatbuffers.IGeneratedObject { constructor( public objects: (Object_T)[] = [], public enums: (EnumT)[] = [], diff --git a/third_party/flatbuffers/tests/ts/reflection/service.ts b/third_party/flatbuffers/tests/ts/reflection/service.ts index c083cae0b4..c0ad8adbe6 100644 --- a/third_party/flatbuffers/tests/ts/reflection/service.ts +++ b/third_party/flatbuffers/tests/ts/reflection/service.ts @@ -6,7 +6,7 @@ import { KeyValue, KeyValueT } from '../reflection/key-value.js'; import { RPCCall, RPCCallT } from '../reflection/rpccall.js'; -export class Service { +export class Service implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Service { @@ -156,9 +156,9 @@ static createService(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, unpack(): ServiceT { return new ServiceT( this.name(), - this.bb!.createObjList(this.calls.bind(this), this.callsLength()), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.calls.bind(this), this.callsLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -166,14 +166,14 @@ unpack(): ServiceT { unpackTo(_o: ServiceT): void { _o.name = this.name(); - _o.calls = this.bb!.createObjList(this.calls.bind(this), this.callsLength()); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.calls = this.bb!.createObjList(this.calls.bind(this), this.callsLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class ServiceT { +export class ServiceT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public calls: (RPCCallT)[] = [], diff --git a/third_party/flatbuffers/tests/ts/reflection/type.ts b/third_party/flatbuffers/tests/ts/reflection/type.ts index e831e21dd4..37316959d5 100644 --- a/third_party/flatbuffers/tests/ts/reflection/type.ts +++ b/third_party/flatbuffers/tests/ts/reflection/type.ts @@ -5,7 +5,7 @@ import * as flatbuffers from 'flatbuffers'; import { BaseType } from '../reflection/base-type.js'; -export class Type { +export class Type implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Type { @@ -195,7 +195,7 @@ unpackTo(_o: TypeT): void { } } -export class TypeT { +export class TypeT implements flatbuffers.IGeneratedObject { constructor( public baseType: BaseType = BaseType.None, public element: BaseType = BaseType.None, diff --git a/third_party/flatbuffers/tests/ts/reflection_generated.js b/third_party/flatbuffers/tests/ts/reflection_generated.js index dd686cc9d6..e0ed0076a8 100644 --- a/third_party/flatbuffers/tests/ts/reflection_generated.js +++ b/third_party/flatbuffers/tests/ts/reflection_generated.js @@ -302,11 +302,19 @@ export class EnumVal { const offset = this.bb.__offset(this.bb_pos, 12); return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; } + attributes(index, obj) { + const offset = this.bb.__offset(this.bb_pos, 14); + return offset ? (obj || new KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; + } + attributesLength() { + const offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; + } static getFullyQualifiedName() { return 'reflection_EnumVal'; } static startEnumVal(builder) { - builder.startObject(5); + builder.startObject(6); } static addName(builder, nameOffset) { builder.addFieldOffset(0, nameOffset, 0); @@ -330,37 +338,54 @@ export class EnumVal { static startDocumentationVector(builder, numElems) { builder.startVector(4, numElems, 4); } + static addAttributes(builder, attributesOffset) { + builder.addFieldOffset(5, attributesOffset, 0); + } + static createAttributesVector(builder, data) { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); + } + static startAttributesVector(builder, numElems) { + builder.startVector(4, numElems, 4); + } static endEnumVal(builder) { const offset = builder.endObject(); builder.requiredField(offset, 4); // name return offset; } unpack() { - return new EnumValT(this.name(), this.value(), (this.unionType() !== null ? this.unionType().unpack() : null), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength())); + return new EnumValT(this.name(), this.value(), (this.unionType() !== null ? this.unionType().unpack() : null), this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()), this.bb.createObjList(this.attributes.bind(this), this.attributesLength())); } unpackTo(_o) { _o.name = this.name(); _o.value = this.value(); _o.unionType = (this.unionType() !== null ? this.unionType().unpack() : null); _o.documentation = this.bb.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb.createObjList(this.attributes.bind(this), this.attributesLength()); } } export class EnumValT { - constructor(name = null, value = BigInt('0'), unionType = null, documentation = []) { + constructor(name = null, value = BigInt('0'), unionType = null, documentation = [], attributes = []) { this.name = name; this.value = value; this.unionType = unionType; this.documentation = documentation; + this.attributes = attributes; } pack(builder) { const name = (this.name !== null ? builder.createString(this.name) : 0); const unionType = (this.unionType !== null ? this.unionType.pack(builder) : 0); const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation)); + const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes)); EnumVal.startEnumVal(builder); EnumVal.addName(builder, name); EnumVal.addValue(builder, this.value); EnumVal.addUnionType(builder, unionType); EnumVal.addDocumentation(builder, documentation); + EnumVal.addAttributes(builder, attributes); return EnumVal.endEnumVal(builder); } } diff --git a/third_party/flatbuffers/tests/ts/reflection_generated.ts b/third_party/flatbuffers/tests/ts/reflection_generated.ts index 4bb1222084..6b553b1a06 100644 --- a/third_party/flatbuffers/tests/ts/reflection_generated.ts +++ b/third_party/flatbuffers/tests/ts/reflection_generated.ts @@ -35,7 +35,7 @@ export enum AdvancedFeatures { DefaultVectorsAndStrings = '8' } -export class Type { +export class Type implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Type { @@ -225,7 +225,7 @@ unpackTo(_o: TypeT): void { } } -export class TypeT { +export class TypeT implements flatbuffers.IGeneratedObject { constructor( public baseType: BaseType = BaseType.None, public element: BaseType = BaseType.None, @@ -248,7 +248,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class KeyValue { +export class KeyValue implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):KeyValue { @@ -323,7 +323,7 @@ unpackTo(_o: KeyValueT): void { } } -export class KeyValueT { +export class KeyValueT implements flatbuffers.IGeneratedObject { constructor( public key: string|Uint8Array|null = null, public value: string|Uint8Array|null = null @@ -341,7 +341,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class EnumVal { +export class EnumVal implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):EnumVal { @@ -399,12 +399,22 @@ documentationLength():number { return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; } +attributes(index: number, obj?:KeyValue):KeyValue|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? (obj || new KeyValue()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +attributesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + static getFullyQualifiedName():string { return 'reflection_EnumVal'; } static startEnumVal(builder:flatbuffers.Builder) { - builder.startObject(5); + builder.startObject(6); } static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { @@ -435,6 +445,22 @@ static startDocumentationVector(builder:flatbuffers.Builder, numElems:number) { builder.startVector(4, numElems, 4); } +static addAttributes(builder:flatbuffers.Builder, attributesOffset:flatbuffers.Offset) { + builder.addFieldOffset(5, attributesOffset, 0); +} + +static createAttributesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]!); + } + return builder.endVector(); +} + +static startAttributesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + static endEnumVal(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); builder.requiredField(offset, 4) // name @@ -447,7 +473,8 @@ unpack(): EnumValT { this.name(), this.value(), (this.unionType() !== null ? this.unionType()!.unpack() : null), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()) ); } @@ -456,16 +483,18 @@ unpackTo(_o: EnumValT): void { _o.name = this.name(); _o.value = this.value(); _o.unionType = (this.unionType() !== null ? this.unionType()!.unpack() : null); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); } } -export class EnumValT { +export class EnumValT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public value: bigint = BigInt('0'), public unionType: TypeT|null = null, - public documentation: (string)[] = [] + public documentation: (string)[] = [], + public attributes: (KeyValueT)[] = [] ){} @@ -473,18 +502,20 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const name = (this.name !== null ? builder.createString(this.name!) : 0); const unionType = (this.unionType !== null ? this.unionType!.pack(builder) : 0); const documentation = EnumVal.createDocumentationVector(builder, builder.createObjectOffsetList(this.documentation)); + const attributes = EnumVal.createAttributesVector(builder, builder.createObjectOffsetList(this.attributes)); EnumVal.startEnumVal(builder); EnumVal.addName(builder, name); EnumVal.addValue(builder, this.value); EnumVal.addUnionType(builder, unionType); EnumVal.addDocumentation(builder, documentation); + EnumVal.addAttributes(builder, attributes); return EnumVal.endEnumVal(builder); } } -export class Enum { +export class Enum implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Enum { @@ -656,11 +687,11 @@ static endEnum(builder:flatbuffers.Builder):flatbuffers.Offset { unpack(): EnumT { return new EnumT( this.name(), - this.bb!.createObjList(this.values.bind(this), this.valuesLength()), + this.bb!.createObjList(this.values.bind(this), this.valuesLength()), this.isUnion(), (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -668,16 +699,16 @@ unpack(): EnumT { unpackTo(_o: EnumT): void { _o.name = this.name(); - _o.values = this.bb!.createObjList(this.values.bind(this), this.valuesLength()); + _o.values = this.bb!.createObjList(this.values.bind(this), this.valuesLength()); _o.isUnion = this.isUnion(); _o.underlyingType = (this.underlyingType() !== null ? this.underlyingType()!.unpack() : null); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class EnumT { +export class EnumT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public values: (EnumValT)[] = [], @@ -710,7 +741,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class Field { +export class Field implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Field { @@ -1012,8 +1043,8 @@ unpack(): FieldT { this.deprecated(), this.required(), this.key(), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.optional(), this.padding() ); @@ -1030,14 +1061,14 @@ unpackTo(_o: FieldT): void { _o.deprecated = this.deprecated(); _o.required = this.required(); _o.key = this.key(); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.optional = this.optional(); _o.padding = this.padding(); } } -export class FieldT { +export class FieldT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public type: TypeT|null = null, @@ -1080,7 +1111,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class Object_ { +export class Object_ implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Object_ { @@ -1294,12 +1325,12 @@ static createObject(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, unpack(): Object_T { return new Object_T( this.name(), - this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()), + this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()), this.isStruct(), this.minalign(), this.bytesize(), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -1307,17 +1338,17 @@ unpack(): Object_T { unpackTo(_o: Object_T): void { _o.name = this.name(); - _o.fields = this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()); + _o.fields = this.bb!.createObjList(this.fields.bind(this), this.fieldsLength()); _o.isStruct = this.isStruct(); _o.minalign = this.minalign(); _o.bytesize = this.bytesize(); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class Object_T { +export class Object_T implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public fields: (FieldT)[] = [], @@ -1350,7 +1381,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class RPCCall { +export class RPCCall implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):RPCCall { @@ -1473,8 +1504,8 @@ unpack(): RPCCallT { this.name(), (this.request() !== null ? this.request()!.unpack() : null), (this.response() !== null ? this.response()!.unpack() : null), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()) ); } @@ -1483,12 +1514,12 @@ unpackTo(_o: RPCCallT): void { _o.name = this.name(); _o.request = (this.request() !== null ? this.request()!.unpack() : null); _o.response = (this.response() !== null ? this.response()!.unpack() : null); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); } } -export class RPCCallT { +export class RPCCallT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public request: Object_T|null = null, @@ -1516,7 +1547,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class Service { +export class Service implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Service { @@ -1666,9 +1697,9 @@ static createService(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, unpack(): ServiceT { return new ServiceT( this.name(), - this.bb!.createObjList(this.calls.bind(this), this.callsLength()), - this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), - this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), + this.bb!.createObjList(this.calls.bind(this), this.callsLength()), + this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()), + this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()), this.declarationFile() ); } @@ -1676,14 +1707,14 @@ unpack(): ServiceT { unpackTo(_o: ServiceT): void { _o.name = this.name(); - _o.calls = this.bb!.createObjList(this.calls.bind(this), this.callsLength()); - _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); - _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); + _o.calls = this.bb!.createObjList(this.calls.bind(this), this.callsLength()); + _o.attributes = this.bb!.createObjList(this.attributes.bind(this), this.attributesLength()); + _o.documentation = this.bb!.createScalarList(this.documentation.bind(this), this.documentationLength()); _o.declarationFile = this.declarationFile(); } } -export class ServiceT { +export class ServiceT implements flatbuffers.IGeneratedObject { constructor( public name: string|Uint8Array|null = null, public calls: (RPCCallT)[] = [], @@ -1715,7 +1746,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { * Symbols declared within a file may be recovered by iterating over all * symbols and examining the `declaration_file` field. */ -export class SchemaFile { +export class SchemaFile implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):SchemaFile { @@ -1802,18 +1833,18 @@ static createSchemaFile(builder:flatbuffers.Builder, filenameOffset:flatbuffers. unpack(): SchemaFileT { return new SchemaFileT( this.filename(), - this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()) + this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()) ); } unpackTo(_o: SchemaFileT): void { _o.filename = this.filename(); - _o.includedFilenames = this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()); + _o.includedFilenames = this.bb!.createScalarList(this.includedFilenames.bind(this), this.includedFilenamesLength()); } } -export class SchemaFileT { +export class SchemaFileT implements flatbuffers.IGeneratedObject { constructor( public filename: string|Uint8Array|null = null, public includedFilenames: (string)[] = [] @@ -1831,7 +1862,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { } } -export class Schema { +export class Schema implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Schema { @@ -2038,31 +2069,31 @@ static finishSizePrefixedSchemaBuffer(builder:flatbuffers.Builder, offset:flatbu unpack(): SchemaT { return new SchemaT( - this.bb!.createObjList(this.objects.bind(this), this.objectsLength()), - this.bb!.createObjList(this.enums.bind(this), this.enumsLength()), + this.bb!.createObjList(this.objects.bind(this), this.objectsLength()), + this.bb!.createObjList(this.enums.bind(this), this.enumsLength()), this.fileIdent(), this.fileExt(), (this.rootTable() !== null ? this.rootTable()!.unpack() : null), - this.bb!.createObjList(this.services.bind(this), this.servicesLength()), + this.bb!.createObjList(this.services.bind(this), this.servicesLength()), this.advancedFeatures(), - this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()) + this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()) ); } unpackTo(_o: SchemaT): void { - _o.objects = this.bb!.createObjList(this.objects.bind(this), this.objectsLength()); - _o.enums = this.bb!.createObjList(this.enums.bind(this), this.enumsLength()); + _o.objects = this.bb!.createObjList(this.objects.bind(this), this.objectsLength()); + _o.enums = this.bb!.createObjList(this.enums.bind(this), this.enumsLength()); _o.fileIdent = this.fileIdent(); _o.fileExt = this.fileExt(); _o.rootTable = (this.rootTable() !== null ? this.rootTable()!.unpack() : null); - _o.services = this.bb!.createObjList(this.services.bind(this), this.servicesLength()); + _o.services = this.bb!.createObjList(this.services.bind(this), this.servicesLength()); _o.advancedFeatures = this.advancedFeatures(); - _o.fbsFiles = this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()); + _o.fbsFiles = this.bb!.createObjList(this.fbsFiles.bind(this), this.fbsFilesLength()); } } -export class SchemaT { +export class SchemaT implements flatbuffers.IGeneratedObject { constructor( public objects: (Object_T)[] = [], public enums: (EnumT)[] = [], diff --git a/third_party/flatbuffers/tests/ts/ts-flat-files/monster_test_generated.ts b/third_party/flatbuffers/tests/ts/ts-flat-files/monster_test_generated.ts index 8a768f2e83..f1566c61d2 100644 --- a/third_party/flatbuffers/tests/ts/ts-flat-files/monster_test_generated.ts +++ b/third_party/flatbuffers/tests/ts/ts-flat-files/monster_test_generated.ts @@ -1152,8 +1152,48 @@ longEnumNormalDefault():bigint { return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('2'); } +nanDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 112); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : NaN; +} + +infDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 114); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +positiveInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 116); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +infinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 118); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +positiveInfinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 120); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity; +} + +negativeInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 122); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity; +} + +negativeInfinityDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 124); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity; +} + +doubleInfDefault():number { + const offset = this.bb!.__offset(this.bb_pos, 126); + return offset ? this.bb!.readFloat64(this.bb_pos + offset) : Infinity; +} + static startMonster(builder:flatbuffers.Builder) { - builder.startObject(54); + builder.startObject(62); } static addPos(builder:flatbuffers.Builder, posOffset:flatbuffers.Offset) { @@ -1589,6 +1629,38 @@ static addLongEnumNormalDefault(builder:flatbuffers.Builder, longEnumNormalDefau builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2')); } +static addNanDefault(builder:flatbuffers.Builder, nanDefault:number) { + builder.addFieldFloat32(54, nanDefault, NaN); +} + +static addInfDefault(builder:flatbuffers.Builder, infDefault:number) { + builder.addFieldFloat32(55, infDefault, Infinity); +} + +static addPositiveInfDefault(builder:flatbuffers.Builder, positiveInfDefault:number) { + builder.addFieldFloat32(56, positiveInfDefault, Infinity); +} + +static addInfinityDefault(builder:flatbuffers.Builder, infinityDefault:number) { + builder.addFieldFloat32(57, infinityDefault, Infinity); +} + +static addPositiveInfinityDefault(builder:flatbuffers.Builder, positiveInfinityDefault:number) { + builder.addFieldFloat32(58, positiveInfinityDefault, Infinity); +} + +static addNegativeInfDefault(builder:flatbuffers.Builder, negativeInfDefault:number) { + builder.addFieldFloat32(59, negativeInfDefault, -Infinity); +} + +static addNegativeInfinityDefault(builder:flatbuffers.Builder, negativeInfinityDefault:number) { + builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity); +} + +static addDoubleInfDefault(builder:flatbuffers.Builder, doubleInfDefault:number) { + builder.addFieldFloat64(61, doubleInfDefault, Infinity); +} + static endMonster(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); builder.requiredField(offset, 10) // name diff --git a/third_party/flatbuffers/tests/ts/tsconfig.json b/third_party/flatbuffers/tests/ts/tsconfig.json index 27196b3561..4678c63e6c 100644 --- a/third_party/flatbuffers/tests/ts/tsconfig.json +++ b/third_party/flatbuffers/tests/ts/tsconfig.json @@ -20,6 +20,7 @@ "typescript/**/*.ts", "optional_scalars/**/*.ts", "namespace_test/**/*.ts", - "union_vector/**/*.ts" + "union_vector/**/*.ts", + "arrays_test_complex/**/*.ts" ] } diff --git a/third_party/flatbuffers/tests/ts/typescript/object.ts b/third_party/flatbuffers/tests/ts/typescript/object.ts index 041b660938..5baf6ed3b8 100644 --- a/third_party/flatbuffers/tests/ts/typescript/object.ts +++ b/third_party/flatbuffers/tests/ts/typescript/object.ts @@ -8,7 +8,7 @@ import { Schema, SchemaT } from '../reflection/schema.js'; import { class_ } from '../typescript/class.js'; -export class Object_ { +export class Object_ implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Object_ { @@ -193,7 +193,7 @@ unpackTo(_o: Object_T): void { } } -export class Object_T { +export class Object_T implements flatbuffers.IGeneratedObject { constructor( public return_: number = 0, public if_: number = 0, diff --git a/third_party/flatbuffers/tests/ts/typescript_keywords_generated.ts b/third_party/flatbuffers/tests/ts/typescript_keywords_generated.ts index 4272425309..bcc61102dd 100644 --- a/third_party/flatbuffers/tests/ts/typescript_keywords_generated.ts +++ b/third_party/flatbuffers/tests/ts/typescript_keywords_generated.ts @@ -11,7 +11,7 @@ export enum class_ { instanceof_ = 1 } -export class Object_ { +export class Object_ implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Object_ { @@ -196,7 +196,7 @@ unpackTo(_o: Object_T): void { } } -export class Object_T { +export class Object_T implements flatbuffers.IGeneratedObject { constructor( public return_: number = 0, public if_: number = 0, diff --git a/third_party/flatbuffers/tests/ts/union_vector/attacker.ts b/third_party/flatbuffers/tests/ts/union_vector/attacker.ts index 6b3fc0fc14..0d3ca4be66 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/attacker.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/attacker.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Attacker { +export class Attacker implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Attacker { @@ -73,7 +73,7 @@ unpackTo(_o: AttackerT): void { } } -export class AttackerT { +export class AttackerT implements flatbuffers.IGeneratedObject { constructor( public swordAttackDamage: number = 0 ){} diff --git a/third_party/flatbuffers/tests/ts/union_vector/book-reader.ts b/third_party/flatbuffers/tests/ts/union_vector/book-reader.ts index 7a31278125..29a9b50176 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/book-reader.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/book-reader.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class BookReader { +export class BookReader implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):BookReader { @@ -49,7 +49,7 @@ unpackTo(_o: BookReaderT): void { } } -export class BookReaderT { +export class BookReaderT implements flatbuffers.IGeneratedObject { constructor( public booksRead: number = 0 ){} diff --git a/third_party/flatbuffers/tests/ts/union_vector/falling-tub.ts b/third_party/flatbuffers/tests/ts/union_vector/falling-tub.ts index b32f99d0ff..eeb9f721b4 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/falling-tub.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/falling-tub.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class FallingTub { +export class FallingTub implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):FallingTub { @@ -49,7 +49,7 @@ unpackTo(_o: FallingTubT): void { } } -export class FallingTubT { +export class FallingTubT implements flatbuffers.IGeneratedObject { constructor( public weight: number = 0 ){} diff --git a/third_party/flatbuffers/tests/ts/union_vector/hand-fan.ts b/third_party/flatbuffers/tests/ts/union_vector/hand-fan.ts index f90b4dd319..dd687baa3f 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/hand-fan.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/hand-fan.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class HandFan { +export class HandFan implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):HandFan { @@ -73,7 +73,7 @@ unpackTo(_o: HandFanT): void { } } -export class HandFanT { +export class HandFanT implements flatbuffers.IGeneratedObject { constructor( public length: number = 0 ){} diff --git a/third_party/flatbuffers/tests/ts/union_vector/movie.js b/third_party/flatbuffers/tests/ts/union_vector/movie.js index 0245a43844..53374ebd66 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/movie.js +++ b/third_party/flatbuffers/tests/ts/union_vector/movie.js @@ -107,7 +107,7 @@ export class Movie { } unpack() { return new MovieT(this.mainCharacterType(), (() => { - let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); + const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); if (temp === null) { return null; } @@ -116,13 +116,13 @@ export class Movie { } return temp.unpack(); })(), this.bb.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()), (() => { - let ret = []; + const ret = []; for (let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) { - let targetEnum = this.charactersType(targetEnumIndex); + const targetEnum = this.charactersType(targetEnumIndex); if (targetEnum === null || Character[targetEnum] === 'NONE') { continue; } - let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); + const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); if (temp === null) { continue; } @@ -138,7 +138,7 @@ export class Movie { unpackTo(_o) { _o.mainCharacterType = this.mainCharacterType(); _o.mainCharacter = (() => { - let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); + const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); if (temp === null) { return null; } @@ -149,13 +149,13 @@ export class Movie { })(); _o.charactersType = this.bb.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()); _o.characters = (() => { - let ret = []; + const ret = []; for (let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) { - let targetEnum = this.charactersType(targetEnumIndex); + const targetEnum = this.charactersType(targetEnumIndex); if (targetEnum === null || Character[targetEnum] === 'NONE') { continue; } - let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); + const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); if (temp === null) { continue; } diff --git a/third_party/flatbuffers/tests/ts/union_vector/movie.ts b/third_party/flatbuffers/tests/ts/union_vector/movie.ts index 6edeb53cbe..a9f7553a43 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/movie.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/movie.ts @@ -8,7 +8,7 @@ import { Character, unionToCharacter, unionListToCharacter } from './character.j import { Rapunzel, RapunzelT } from './rapunzel.js'; -export class Movie { +export class Movie implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Movie { @@ -139,19 +139,19 @@ unpack(): MovieT { return new MovieT( this.mainCharacterType(), (() => { - let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); + const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); if(temp === null) { return null; } if(typeof temp === 'string') { return temp; } return temp.unpack() })(), - this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()), + this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()), (() => { - let ret = []; + const ret: (AttackerT|BookReaderT|RapunzelT|string)[] = []; for(let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) { - let targetEnum = this.charactersType(targetEnumIndex); + const targetEnum = this.charactersType(targetEnumIndex); if(targetEnum === null || Character[targetEnum!] === 'NONE') { continue; } - let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); + const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); if(temp === null) { continue; } if(typeof temp === 'string') { ret.push(temp); continue; } ret.push(temp.unpack()); @@ -165,19 +165,19 @@ unpack(): MovieT { unpackTo(_o: MovieT): void { _o.mainCharacterType = this.mainCharacterType(); _o.mainCharacter = (() => { - let temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); + const temp = unionToCharacter(this.mainCharacterType(), this.mainCharacter.bind(this)); if(temp === null) { return null; } if(typeof temp === 'string') { return temp; } return temp.unpack() })(); - _o.charactersType = this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()); + _o.charactersType = this.bb!.createScalarList(this.charactersType.bind(this), this.charactersTypeLength()); _o.characters = (() => { - let ret = []; + const ret: (AttackerT|BookReaderT|RapunzelT|string)[] = []; for(let targetEnumIndex = 0; targetEnumIndex < this.charactersTypeLength(); ++targetEnumIndex) { - let targetEnum = this.charactersType(targetEnumIndex); + const targetEnum = this.charactersType(targetEnumIndex); if(targetEnum === null || Character[targetEnum!] === 'NONE') { continue; } - let temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); + const temp = unionListToCharacter(targetEnum, this.characters.bind(this), targetEnumIndex); if(temp === null) { continue; } if(typeof temp === 'string') { ret.push(temp); continue; } ret.push(temp.unpack()); @@ -187,7 +187,7 @@ unpackTo(_o: MovieT): void { } } -export class MovieT { +export class MovieT implements flatbuffers.IGeneratedObject { constructor( public mainCharacterType: Character = Character.NONE, public mainCharacter: AttackerT|BookReaderT|RapunzelT|string|null = null, diff --git a/third_party/flatbuffers/tests/ts/union_vector/rapunzel.ts b/third_party/flatbuffers/tests/ts/union_vector/rapunzel.ts index e1dc63ddf5..20ca497152 100644 --- a/third_party/flatbuffers/tests/ts/union_vector/rapunzel.ts +++ b/third_party/flatbuffers/tests/ts/union_vector/rapunzel.ts @@ -4,7 +4,7 @@ import * as flatbuffers from 'flatbuffers'; -export class Rapunzel { +export class Rapunzel implements flatbuffers.IUnpackableObject { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Rapunzel { @@ -49,7 +49,7 @@ unpackTo(_o: RapunzelT): void { } } -export class RapunzelT { +export class RapunzelT implements flatbuffers.IGeneratedObject { constructor( public hairLength: number = 0 ){} diff --git a/third_party/flatbuffers/tests/type_field_collsion/Collision.cs b/third_party/flatbuffers/tests/type_field_collsion/Collision.cs index 2fc24f36e5..a0a4df7bcc 100644 --- a/third_party/flatbuffers/tests/type_field_collsion/Collision.cs +++ b/third_party/flatbuffers/tests/type_field_collsion/Collision.cs @@ -13,7 +13,7 @@ public struct Collision : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Collision GetRootAsCollision(ByteBuffer _bb) { return GetRootAsCollision(_bb, new Collision()); } public static Collision GetRootAsCollision(ByteBuffer _bb, Collision obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/union_vector/Attacker.cs b/third_party/flatbuffers/tests/union_vector/Attacker.cs index 57c32fa139..c7337473d8 100644 --- a/third_party/flatbuffers/tests/union_vector/Attacker.cs +++ b/third_party/flatbuffers/tests/union_vector/Attacker.cs @@ -10,7 +10,7 @@ public struct Attacker : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Attacker GetRootAsAttacker(ByteBuffer _bb) { return GetRootAsAttacker(_bb, new Attacker()); } public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/union_vector/Attacker.java b/third_party/flatbuffers/tests/union_vector/Attacker.java index e1564447c4..0f9c28e75a 100644 --- a/third_party/flatbuffers/tests/union_vector/Attacker.java +++ b/third_party/flatbuffers/tests/union_vector/Attacker.java @@ -7,7 +7,7 @@ @SuppressWarnings("unused") public final class Attacker extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Attacker getRootAsAttacker(ByteBuffer _bb) { return getRootAsAttacker(_bb, new Attacker()); } public static Attacker getRootAsAttacker(ByteBuffer _bb, Attacker obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/union_vector/Attacker.kt b/third_party/flatbuffers/tests/union_vector/Attacker.kt index 6942bad931..94042aa1ca 100644 --- a/third_party/flatbuffers/tests/union_vector/Attacker.kt +++ b/third_party/flatbuffers/tests/union_vector/Attacker.kt @@ -29,7 +29,7 @@ class Attacker : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsAttacker(_bb: ByteBuffer): Attacker = getRootAsAttacker(_bb, Attacker()) fun getRootAsAttacker(_bb: ByteBuffer, obj: Attacker): Attacker { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/union_vector/HandFan.cs b/third_party/flatbuffers/tests/union_vector/HandFan.cs index 52e3e747d9..b57a20479a 100644 --- a/third_party/flatbuffers/tests/union_vector/HandFan.cs +++ b/third_party/flatbuffers/tests/union_vector/HandFan.cs @@ -10,7 +10,7 @@ public struct HandFan : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static HandFan GetRootAsHandFan(ByteBuffer _bb) { return GetRootAsHandFan(_bb, new HandFan()); } public static HandFan GetRootAsHandFan(ByteBuffer _bb, HandFan obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } diff --git a/third_party/flatbuffers/tests/union_vector/HandFan.java b/third_party/flatbuffers/tests/union_vector/HandFan.java index 641da84fd7..5184b4cef6 100644 --- a/third_party/flatbuffers/tests/union_vector/HandFan.java +++ b/third_party/flatbuffers/tests/union_vector/HandFan.java @@ -7,7 +7,7 @@ @SuppressWarnings("unused") public final class HandFan extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static HandFan getRootAsHandFan(ByteBuffer _bb) { return getRootAsHandFan(_bb, new HandFan()); } public static HandFan getRootAsHandFan(ByteBuffer _bb, HandFan obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } diff --git a/third_party/flatbuffers/tests/union_vector/HandFan.kt b/third_party/flatbuffers/tests/union_vector/HandFan.kt index 8304d1f30e..4c3a44817e 100644 --- a/third_party/flatbuffers/tests/union_vector/HandFan.kt +++ b/third_party/flatbuffers/tests/union_vector/HandFan.kt @@ -29,7 +29,7 @@ class HandFan : Table() { } } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsHandFan(_bb: ByteBuffer): HandFan = getRootAsHandFan(_bb, HandFan()) fun getRootAsHandFan(_bb: ByteBuffer, obj: HandFan): HandFan { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/union_vector/Movie.cs b/third_party/flatbuffers/tests/union_vector/Movie.cs index 9bc2d9a3cb..6411645b8b 100644 --- a/third_party/flatbuffers/tests/union_vector/Movie.cs +++ b/third_party/flatbuffers/tests/union_vector/Movie.cs @@ -10,7 +10,7 @@ public struct Movie : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } - public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); } public static Movie GetRootAsMovie(ByteBuffer _bb) { return GetRootAsMovie(_bb, new Movie()); } public static Movie GetRootAsMovie(ByteBuffer _bb, Movie obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public static bool MovieBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "MOVI"); } diff --git a/third_party/flatbuffers/tests/union_vector/Movie.java b/third_party/flatbuffers/tests/union_vector/Movie.java index 2cf162205a..63797ddcfc 100644 --- a/third_party/flatbuffers/tests/union_vector/Movie.java +++ b/third_party/flatbuffers/tests/union_vector/Movie.java @@ -7,7 +7,7 @@ @SuppressWarnings("unused") public final class Movie extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); } + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } public static Movie getRootAsMovie(ByteBuffer _bb) { return getRootAsMovie(_bb, new Movie()); } public static Movie getRootAsMovie(ByteBuffer _bb, Movie obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public static boolean MovieBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MOVI"); } diff --git a/third_party/flatbuffers/tests/union_vector/Movie.kt b/third_party/flatbuffers/tests/union_vector/Movie.kt index ee26a59d6e..faec8e40c1 100644 --- a/third_party/flatbuffers/tests/union_vector/Movie.kt +++ b/third_party/flatbuffers/tests/union_vector/Movie.kt @@ -67,7 +67,7 @@ class Movie : Table() { val o = __offset(10); return if (o != 0) __vector_len(o) else 0 } companion object { - fun validateVersion() = Constants.FLATBUFFERS_2_0_8() + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() fun getRootAsMovie(_bb: ByteBuffer): Movie = getRootAsMovie(_bb, Movie()) fun getRootAsMovie(_bb: ByteBuffer, obj: Movie): Movie { _bb.order(ByteOrder.LITTLE_ENDIAN) diff --git a/third_party/flatbuffers/tests/union_vector/union_vector_generated.h b/third_party/flatbuffers/tests/union_vector/union_vector_generated.h index 8f60272a3f..920c13a4f2 100644 --- a/third_party/flatbuffers/tests/union_vector/union_vector_generated.h +++ b/third_party/flatbuffers/tests/union_vector/union_vector_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 8, +static_assert(FLATBUFFERS_VERSION_MAJOR == 22 && + FLATBUFFERS_VERSION_MINOR == 10 && + FLATBUFFERS_VERSION_REVISION == 26, "Non-compatible flatbuffers version included"); struct Attacker; diff --git a/third_party/flatbuffers/tests/util_test.cpp b/third_party/flatbuffers/tests/util_test.cpp index d6db91673d..f2821a40ce 100644 --- a/third_party/flatbuffers/tests/util_test.cpp +++ b/third_party/flatbuffers/tests/util_test.cpp @@ -149,11 +149,19 @@ void UtilConvertCase() { cases.push_back({ flatbuffers::Case::kUpperCamel, "tHe_qUiCk_BrOwN_fOx", flatbuffers::Case::kKeep, "tHe_qUiCk_BrOwN_fOx" }); cases.push_back({ flatbuffers::Case::kLowerCamel, "theQuick12345Fox", - flatbuffers::Case::kSnake, "the_quick_12345fox" }); + flatbuffers::Case::kSnake, "the_quick_12345_fox" }); cases.push_back({ flatbuffers::Case::kLowerCamel, "a12b34c45", flatbuffers::Case::kSnake, "a_12b_34c_45" }); cases.push_back({ flatbuffers::Case::kLowerCamel, "a12b34c45", flatbuffers::Case::kSnake2, "a12_b34_c45" }); + cases.push_back({ flatbuffers::Case::kUpperCamel, "Int32Stamped", + flatbuffers::Case::kSnake, "int_32_stamped" }); + cases.push_back({ flatbuffers::Case::kUpperCamel, "101DogsTest", + flatbuffers::Case::kSnake, "101_dogs_test" }); + cases.push_back({ flatbuffers::Case::kUpperCamel, "Int32Stamped", + flatbuffers::Case::kScreamingSnake, "INT_32_STAMPED" }); + cases.push_back({ flatbuffers::Case::kUpperCamel, "101DogsTest", + flatbuffers::Case::kScreamingSnake, "101_DOGS_TEST" }); for (auto &test_case : cases) { TEST_EQ(test_case.expected_output, diff --git a/third_party/flatbuffers/ts/builder.ts b/third_party/flatbuffers/ts/builder.ts index 85f5726275..f1a2b419a4 100644 --- a/third_party/flatbuffers/ts/builder.ts +++ b/third_party/flatbuffers/ts/builder.ts @@ -549,7 +549,7 @@ export class Builder { * * @returns offset of obj */ - createObjectOffset(obj: string | any): Offset { + createObjectOffset(obj: string | IGeneratedObject | null): Offset { if(obj === null) { return 0 } @@ -566,7 +566,7 @@ export class Builder { * * @returns list of offsets of each non null object */ - createObjectOffsetList(list: string[] | any[]): Offset[] { + createObjectOffsetList(list: (string | IGeneratedObject)[]): Offset[] { const ret: number[] = []; for(let i = 0; i < list.length; ++i) { @@ -583,7 +583,7 @@ export class Builder { return ret; } - createStructOffsetList(list: string[] | any[], startFunc: (builder: Builder, length: number) => void): Offset { + createStructOffsetList(list: (string | IGeneratedObject)[], startFunc: (builder: Builder, length: number) => void): Offset { startFunc(this, list.length); this.createObjectOffsetList(list.slice().reverse()); return this.endVector(); diff --git a/third_party/flatbuffers/ts/byte-buffer.ts b/third_party/flatbuffers/ts/byte-buffer.ts index 09c55ad744..90a1a4dfa7 100644 --- a/third_party/flatbuffers/ts/byte-buffer.ts +++ b/third_party/flatbuffers/ts/byte-buffer.ts @@ -1,6 +1,6 @@ import { FILE_IDENTIFIER_LENGTH, SIZEOF_INT } from "./constants.js"; import { int32, isLittleEndian, float32, float64 } from "./utils.js"; -import { Offset, Table, IGeneratedObject } from "./types.js"; +import { Offset, Table, IGeneratedObject, IUnpackableObject } from "./types.js"; import { Encoding } from "./encoding.js"; export class ByteBuffer { @@ -257,33 +257,31 @@ export class ByteBuffer { /** * A helper function for generating list for obj api */ - createScalarList(listAccessor: (i: number) => unknown, listLength: number): any[] { - const ret: any[] = []; + createScalarList(listAccessor: (i: number) => T | null, listLength: number): T[] { + const ret: T[] = []; for(let i = 0; i < listLength; ++i) { - if(listAccessor(i) !== null) { - ret.push(listAccessor(i)); + const val = listAccessor(i); + if(val !== null) { + ret.push(val); } } - return ret; } - + /** * A helper function for generating list for obj api * @param listAccessor function that accepts an index and return data at that index * @param listLength listLength * @param res result list */ - createObjList(listAccessor: (i: number) => unknown, listLength: number): any[] { - const ret: any[] = []; + createObjList, T2 extends IGeneratedObject>(listAccessor: (i: number) => T1 | null, listLength: number): T2[] { + const ret: T2[] = []; for(let i = 0; i < listLength; ++i) { const val = listAccessor(i); if(val !== null) { - ret.push((val as IGeneratedObject).unpack()); + ret.push(val.unpack()); } } - return ret; } - } diff --git a/third_party/flatbuffers/ts/flatbuffers.ts b/third_party/flatbuffers/ts/flatbuffers.ts new file mode 100644 index 0000000000..7c0010bf06 --- /dev/null +++ b/third_party/flatbuffers/ts/flatbuffers.ts @@ -0,0 +1 @@ +export * as flatbuffers from './index.js' \ No newline at end of file diff --git a/third_party/flatbuffers/ts/index.ts b/third_party/flatbuffers/ts/index.ts index 19f44e6f30..a608512451 100644 --- a/third_party/flatbuffers/ts/index.ts +++ b/third_party/flatbuffers/ts/index.ts @@ -3,7 +3,7 @@ export { SIZEOF_INT } from './constants.js' export { FILE_IDENTIFIER_LENGTH } from './constants.js' export { SIZE_PREFIX_LENGTH } from './constants.js' -export { Table, Offset } from './types.js' +export { Table, Offset, IGeneratedObject, IUnpackableObject } from './types.js' export { int32, float32, float64, isLittleEndian } from './utils.js' diff --git a/third_party/flatbuffers/ts/types.ts b/third_party/flatbuffers/ts/types.ts index 31fefc1014..851486c210 100644 --- a/third_party/flatbuffers/ts/types.ts +++ b/third_party/flatbuffers/ts/types.ts @@ -10,5 +10,8 @@ export type Table = { export interface IGeneratedObject { pack(builder:Builder): Offset - unpack(): IGeneratedObject +} + +export interface IUnpackableObject { + unpack(): T } \ No newline at end of file