mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Roll Chromium from 14fa1a826dad to 2e0371f07e01 (1224 revisions)
Manually update third_party/flatbuffers14fa1a826d..2e0371f07eIf this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/chromium-angle-autoroll Please CC angle-team@google.com,solti@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Chromium: https://bugs.chromium.org/p/chromium/issues/entry To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Changed dependencies * build:4438010153..e4262406c0* buildtools:ad9b993f2f..f089c59d7c* buildtools/third_party/libc++/trunk:745104ff4a..b272a1c128* testing:75c78f8f64..46c0754180* third_party/abseil-cpp:8f8f07bdce..66a5ea107e* third_party/android_build_tools:3b0115d9f8..4cb10f1315* third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/{catapult_..1a0894f20f * third_party/depot_tools:98d3bb27f0..f0fba1d307* third_party/flatbuffers/src:13fc75cb6b..28861d1d7d* third_party/fuchsia-sdk/sdk: version:13.20230622.3.1..version:13.20230626.3.1 * tools/android:9b4ea9e0d4..5c2008090e* tools/clang:ff9b9e9ce2..053092c268* tools/perf:31a576a999..daed2f7981No update to Clang. Bug: None Tbr: solti@google.com Change-Id: I7bf9a5c427845ac28e9cc70051c9b07381313cc9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4649047 Reviewed-by: Solti Ho <solti@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
committed by
Angle LUCI CQ
parent
0e8a8e0f16
commit
bcfc214f91
28
DEPS
28
DEPS
@@ -43,7 +43,7 @@ vars = {
|
||||
'checkout_angle_mesa': False,
|
||||
|
||||
# Version of Chromium our Chromium-based DEPS are mirrored from.
|
||||
'chromium_revision': '14fa1a826dad66a9768abc9e4c540c335fcc8b9f',
|
||||
'chromium_revision': '2e0371f07e014fd1bd239de3bff370634bf9b670',
|
||||
# We never want to checkout chromium,
|
||||
# but need a dummy DEPS entry for the autoroller
|
||||
'dummy_checkout_chromium': False,
|
||||
@@ -88,11 +88,11 @@ vars = {
|
||||
# Three lines of non-changing comments so that
|
||||
# the commit queue can handle CLs rolling catapult
|
||||
# and whatever else without interference from each other.
|
||||
'catapult_revision': '143fef4b4133aa4ca6792ff40ea5fe91dc9d0bcb',
|
||||
'catapult_revision': '1a0894f20f76f23a74868611da8f2a7950b50f57',
|
||||
|
||||
# the commit queue can handle CLs rolling Fuchsia sdk
|
||||
# and whatever else without interference from each other.
|
||||
'fuchsia_version': 'version:13.20230622.3.1',
|
||||
'fuchsia_version': 'version:13.20230626.3.1',
|
||||
|
||||
# Three lines of non-changing comments so that
|
||||
# the commit queue can handle CLs rolling luci-go
|
||||
@@ -140,12 +140,12 @@ vars = {
|
||||
deps = {
|
||||
|
||||
'build': {
|
||||
'url': '{chromium_git}/chromium/src/build.git@443801015374aafde0164593de4beb7cb0828f99',
|
||||
'url': '{chromium_git}/chromium/src/build.git@e4262406c0647b2700a831189ec996127d1c97ab',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
'buildtools': {
|
||||
'url': '{chromium_git}/chromium/src/buildtools.git@ad9b993f2fe38882d924c7e41bfe3b0349c73e00',
|
||||
'url': '{chromium_git}/chromium/src/buildtools.git@f089c59d7ce75760e364e7dac8044048d86974d5',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -177,7 +177,7 @@ deps = {
|
||||
},
|
||||
|
||||
'buildtools/third_party/libc++/trunk': {
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@745104ff4a78628aba4dfe9f8bafbade1c169c71',
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@b272a1c128aae14ac6f77836a4df86dd353fd57e',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -203,17 +203,17 @@ deps = {
|
||||
},
|
||||
|
||||
'testing': {
|
||||
'url': '{chromium_git}/chromium/src/testing@75c78f8f648ce27d909879d212b14fa7b53e0bc6',
|
||||
'url': '{chromium_git}/chromium/src/testing@46c07541805fcc371e417c7636a70d84b775a545',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
'third_party/abseil-cpp': {
|
||||
'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@8f8f07bdce19a71ef3f189e29d45abf75ddf36a9',
|
||||
'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@66a5ea107e9e0366516f497f0f5a8e06592ea2e5',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
'third_party/android_build_tools': {
|
||||
'url': '{chromium_git}/chromium/src/third_party/android_build_tools@3b0115d9f835ce4c68e7afadc808f52299acd1dd',
|
||||
'url': '{chromium_git}/chromium/src/third_party/android_build_tools@4cb10f1315af33267265a92c79bbe891e7913e5f',
|
||||
'condition': 'checkout_android and not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -391,7 +391,7 @@ deps = {
|
||||
},
|
||||
|
||||
'third_party/depot_tools': {
|
||||
'url': '{chromium_git}/chromium/tools/depot_tools.git@98d3bb27f08135a49722ff8702dbf551b18267b5',
|
||||
'url': '{chromium_git}/chromium/tools/depot_tools.git@f0fba1d307d511620e29c9d2b623abc6904e794c',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -408,7 +408,7 @@ deps = {
|
||||
},
|
||||
|
||||
'third_party/flatbuffers/src': {
|
||||
'url': '{chromium_git}/external/github.com/google/flatbuffers.git@13fc75cb6b7b44793f3f5b4ba025ff403d012c9f',
|
||||
'url': '{chromium_git}/external/github.com/google/flatbuffers.git@28861d1d7d5ec6ce34d4bbdc10bec4aace341167',
|
||||
'condition': 'checkout_android and not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -653,12 +653,12 @@ deps = {
|
||||
},
|
||||
|
||||
'tools/android': {
|
||||
'url': '{chromium_git}/chromium/src/tools/android@9b4ea9e0d4276b4350f4b009980a8829f0b814c4',
|
||||
'url': '{chromium_git}/chromium/src/tools/android@5c2008090ecb41c3c3861fce9e682031dc30e685',
|
||||
'condition': 'checkout_android and not build_with_chromium',
|
||||
},
|
||||
|
||||
'tools/clang': {
|
||||
'url': '{chromium_git}/chromium/src/tools/clang.git@ff9b9e9ce251cae2c3b5d617d78a66fbdb5dfe0f',
|
||||
'url': '{chromium_git}/chromium/src/tools/clang.git@053092c26813cd7f793c6c49ed573458d1c8322d',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
@@ -704,7 +704,7 @@ deps = {
|
||||
},
|
||||
|
||||
'tools/perf': {
|
||||
'url': '{chromium_git}/chromium/src/tools/perf@31a576a9999c180fe6c5eabb91bce75ef1989e73',
|
||||
'url': '{chromium_git}/chromium/src/tools/perf@daed2f7981e83e74b7bc7cc8dd48de91d95ea4df',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
14
third_party/flatbuffers/BUILD.gn
vendored
14
third_party/flatbuffers/BUILD.gn
vendored
@@ -9,11 +9,20 @@ config("flatbuffers_config") {
|
||||
include_dirs = [
|
||||
"src/include",
|
||||
"src/src",
|
||||
"src",
|
||||
"generated",
|
||||
]
|
||||
|
||||
# Required to prevent static initialization of locale
|
||||
# in util.cpp
|
||||
defines = [ "FLATBUFFERS_LOCALE_INDEPENDENT=0" ]
|
||||
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
"-Wno-constant-conversion",
|
||||
"-Wno-shorten-64-to-32",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# The part of FlatBuffers that Chrome is interested in.
|
||||
@@ -95,10 +104,9 @@ source_set("compiler_files") {
|
||||
"src/src/idl_gen_json_schema.h",
|
||||
"src/src/idl_gen_kotlin.cpp",
|
||||
"src/src/idl_gen_kotlin.h",
|
||||
"src/src/idl_gen_kotlin_kmp.cpp",
|
||||
"src/src/idl_gen_lobster.cpp",
|
||||
"src/src/idl_gen_lobster.h",
|
||||
"src/src/idl_gen_lua.cpp",
|
||||
"src/src/idl_gen_lua.h",
|
||||
"src/src/idl_gen_php.cpp",
|
||||
"src/src/idl_gen_php.h",
|
||||
"src/src/idl_gen_python.cpp",
|
||||
@@ -186,6 +194,8 @@ source_set("flatbuffers_test_files") {
|
||||
|
||||
test("flatbuffers_unittests") {
|
||||
sources = [
|
||||
"src/tests/64bit/offset64_test.cpp",
|
||||
"src/tests/64bit/offset64_test.h",
|
||||
"src/tests/alignment_test.cpp",
|
||||
"src/tests/alignment_test.h",
|
||||
"src/tests/evolution_test.cpp",
|
||||
|
||||
4
third_party/flatbuffers/DEPS
vendored
Normal file
4
third_party/flatbuffers/DEPS
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# checkdeps.py shouldn't check include paths for files in these dirs:
|
||||
skip_child_includes = [
|
||||
'generated',
|
||||
]
|
||||
4
third_party/flatbuffers/README.chromium
vendored
4
third_party/flatbuffers/README.chromium
vendored
@@ -1,8 +1,8 @@
|
||||
Name: FlatBuffers
|
||||
Short Name: flatbuffers
|
||||
URL: https://github.com/google/flatbuffers
|
||||
Version: 13fc75cb6b7b44793f3f5b4ba025ff403d012c9f
|
||||
Date: 2023-06-05
|
||||
Version: 28861d1d7d5ec6ce34d4bbdc10bec4aace341167
|
||||
Date: 2023/06/22
|
||||
License: Apache 2.0
|
||||
License File: LICENSE
|
||||
Security Critical: yes
|
||||
|
||||
2
third_party/flatbuffers/flatbuffer.gni
vendored
2
third_party/flatbuffers/flatbuffer.gni
vendored
@@ -139,7 +139,7 @@ template("flatbuffer") {
|
||||
# This will link any libraries in the deps (the use of invoker.deps in the
|
||||
# action won't link it).
|
||||
if (defined(invoker.deps)) {
|
||||
deps += invoker.deps
|
||||
deps = invoker.deps
|
||||
}
|
||||
|
||||
# Same for public_deps.
|
||||
|
||||
579
third_party/flatbuffers/generated/tests/alignment_test_generated.h
vendored
Normal file
579
third_party/flatbuffers/generated/tests/alignment_test_generated.h
vendored
Normal file
@@ -0,0 +1,579 @@
|
||||
// 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 == 23 && FLATBUFFERS_VERSION_MINOR == 5 &&
|
||||
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(1)
|
||||
BadAlignmentSmall FLATBUFFERS_FINAL_CLASS
|
||||
{
|
||||
private:
|
||||
uint8_t var_0_;
|
||||
uint8_t var_1_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable()
|
||||
{
|
||||
return BadAlignmentSmallTypeTable();
|
||||
}
|
||||
BadAlignmentSmall() : var_0_(0), var_1_(0) {}
|
||||
BadAlignmentSmall(uint8_t _var_0, uint8_t _var_1)
|
||||
: var_0_(::flatbuffers::EndianScalar(_var_0)), var_1_(::flatbuffers::EndianScalar(_var_1))
|
||||
{}
|
||||
uint8_t var_0() const
|
||||
{
|
||||
return ::flatbuffers::EndianScalar(var_0_);
|
||||
}
|
||||
void mutate_var_0(uint8_t _var_0)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&var_0_, _var_0);
|
||||
}
|
||||
uint8_t var_1() const
|
||||
{
|
||||
return ::flatbuffers::EndianScalar(var_1_);
|
||||
}
|
||||
void mutate_var_1(uint8_t _var_1)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&var_1_, _var_1);
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(BadAlignmentSmall, 2);
|
||||
|
||||
inline bool operator==(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs)
|
||||
{
|
||||
return (lhs.var_0() == rhs.var_0()) && (lhs.var_1() == rhs.var_1());
|
||||
}
|
||||
|
||||
inline bool operator!=(const BadAlignmentSmall &lhs, const BadAlignmentSmall &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
struct BadAlignmentSmall::Traits
|
||||
{
|
||||
using type = BadAlignmentSmall;
|
||||
};
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8)
|
||||
BadAlignmentLarge FLATBUFFERS_FINAL_CLASS
|
||||
{
|
||||
private:
|
||||
uint64_t var_0_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
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 BadAlignmentLarge::Traits
|
||||
{
|
||||
using type = BadAlignmentLarge;
|
||||
};
|
||||
|
||||
struct OuterLargeT : public ::flatbuffers::NativeTable
|
||||
{
|
||||
typedef OuterLarge TableType;
|
||||
std::unique_ptr<BadAlignmentLarge> 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;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { return OuterLargeTypeTable(); }
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE
|
||||
{
|
||||
VT_LARGE = 4
|
||||
};
|
||||
const BadAlignmentLarge *large() const
|
||||
{
|
||||
return GetStruct<const BadAlignmentLarge *>(VT_LARGE);
|
||||
}
|
||||
BadAlignmentLarge *mutable_large() { return GetStruct<BadAlignmentLarge *>(VT_LARGE); }
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const
|
||||
{
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<BadAlignmentLarge>(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<OuterLarge> 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<OuterLarge> Finish()
|
||||
{
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<OuterLarge>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<OuterLarge> CreateOuterLarge(::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const BadAlignmentLarge *large = nullptr)
|
||||
{
|
||||
OuterLargeBuilder builder_(_fbb);
|
||||
builder_.add_large(large);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct OuterLarge::Traits
|
||||
{
|
||||
using type = OuterLarge;
|
||||
static auto constexpr Create = CreateOuterLarge;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<OuterLarge> CreateOuterLarge(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const OuterLargeT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct BadAlignmentRootT : public ::flatbuffers::NativeTable
|
||||
{
|
||||
typedef BadAlignmentRoot TableType;
|
||||
std::unique_ptr<OuterLargeT> large{};
|
||||
std::vector<BadAlignmentSmall> 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;
|
||||
struct Traits;
|
||||
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<const OuterLarge *>(VT_LARGE); }
|
||||
OuterLarge *mutable_large() { return GetPointer<OuterLarge *>(VT_LARGE); }
|
||||
const ::flatbuffers::Vector<const BadAlignmentSmall *> *small() const
|
||||
{
|
||||
return GetPointer<const ::flatbuffers::Vector<const BadAlignmentSmall *> *>(VT_SMALL);
|
||||
}
|
||||
::flatbuffers::Vector<const BadAlignmentSmall *> *mutable_small()
|
||||
{
|
||||
return GetPointer<::flatbuffers::Vector<const BadAlignmentSmall *> *>(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<BadAlignmentRoot> 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<OuterLarge> large)
|
||||
{
|
||||
fbb_.AddOffset(BadAlignmentRoot::VT_LARGE, large);
|
||||
}
|
||||
void add_small(::flatbuffers::Offset<::flatbuffers::Vector<const BadAlignmentSmall *>> small)
|
||||
{
|
||||
fbb_.AddOffset(BadAlignmentRoot::VT_SMALL, small);
|
||||
}
|
||||
explicit BadAlignmentRootBuilder(::flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb)
|
||||
{
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<BadAlignmentRoot> Finish()
|
||||
{
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<BadAlignmentRoot>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<BadAlignmentRoot> CreateBadAlignmentRoot(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<OuterLarge> large = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<const BadAlignmentSmall *>> small = 0)
|
||||
{
|
||||
BadAlignmentRootBuilder builder_(_fbb);
|
||||
builder_.add_small(small);
|
||||
builder_.add_large(large);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct BadAlignmentRoot::Traits
|
||||
{
|
||||
using type = BadAlignmentRoot;
|
||||
static auto constexpr Create = CreateBadAlignmentRoot;
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<BadAlignmentRoot> CreateBadAlignmentRootDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<OuterLarge> large = 0,
|
||||
const std::vector<BadAlignmentSmall> *small = nullptr)
|
||||
{
|
||||
auto small__ = small ? _fbb.CreateVectorOfStructs<BadAlignmentSmall>(*small) : 0;
|
||||
return CreateBadAlignmentRoot(_fbb, large, small__);
|
||||
}
|
||||
|
||||
::flatbuffers::Offset<BadAlignmentRoot> 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::make_unique<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 = std::unique_ptr<BadAlignmentLarge>(new BadAlignmentLarge(*_e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<OuterLarge> OuterLarge::Pack(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const OuterLargeT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher)
|
||||
{
|
||||
return CreateOuterLarge(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<OuterLarge> 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::make_unique<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 = std::unique_ptr<OuterLargeT>(_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> BadAlignmentRoot::Pack(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const BadAlignmentRootT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher)
|
||||
{
|
||||
return CreateBadAlignmentRoot(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<BadAlignmentRoot> 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_UCHAR, 0, -1},
|
||||
{::flatbuffers::ET_UCHAR, 0, -1}};
|
||||
static const int64_t values[] = {0, 1, 2};
|
||||
static const char *const names[] = {"var_0", "var_1"};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 2, 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<BadAlignmentRoot>(buf);
|
||||
}
|
||||
|
||||
inline const BadAlignmentRoot *GetSizePrefixedBadAlignmentRoot(const void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetSizePrefixedRoot<BadAlignmentRoot>(buf);
|
||||
}
|
||||
|
||||
inline BadAlignmentRoot *GetMutableBadAlignmentRoot(void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetMutableRoot<BadAlignmentRoot>(buf);
|
||||
}
|
||||
|
||||
inline BadAlignmentRoot *GetMutableSizePrefixedBadAlignmentRoot(void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetMutableSizePrefixedRoot<BadAlignmentRoot>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyBadAlignmentRootBuffer(::flatbuffers::Verifier &verifier)
|
||||
{
|
||||
return verifier.VerifyBuffer<BadAlignmentRoot>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedBadAlignmentRootBuffer(::flatbuffers::Verifier &verifier)
|
||||
{
|
||||
return verifier.VerifySizePrefixedBuffer<BadAlignmentRoot>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishBadAlignmentRootBuffer(::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<BadAlignmentRoot> root)
|
||||
{
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedBadAlignmentRootBuffer(::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<BadAlignmentRoot> root)
|
||||
{
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline std::unique_ptr<BadAlignmentRootT> UnPackBadAlignmentRoot(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr)
|
||||
{
|
||||
return std::unique_ptr<BadAlignmentRootT>(GetBadAlignmentRoot(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline std::unique_ptr<BadAlignmentRootT> UnPackSizePrefixedBadAlignmentRoot(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr)
|
||||
{
|
||||
return std::unique_ptr<BadAlignmentRootT>(GetSizePrefixedBadAlignmentRoot(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ALIGNMENTTEST_H_
|
||||
594
third_party/flatbuffers/generated/tests/arrays_test_generated.h
vendored
Normal file
594
third_party/flatbuffers/generated/tests/arrays_test_generated.h
vendored
Normal file
@@ -0,0 +1,594 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_H_
|
||||
#define FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_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 == 23 && FLATBUFFERS_VERSION_MINOR == 5 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 26,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
namespace MyGame
|
||||
{
|
||||
namespace Example
|
||||
{
|
||||
|
||||
struct NestedStruct;
|
||||
|
||||
struct ArrayStruct;
|
||||
|
||||
struct ArrayTable;
|
||||
struct ArrayTableBuilder;
|
||||
struct ArrayTableT;
|
||||
|
||||
bool operator==(const NestedStruct &lhs, const NestedStruct &rhs);
|
||||
bool operator!=(const NestedStruct &lhs, const NestedStruct &rhs);
|
||||
bool operator==(const ArrayStruct &lhs, const ArrayStruct &rhs);
|
||||
bool operator!=(const ArrayStruct &lhs, const ArrayStruct &rhs);
|
||||
bool operator==(const ArrayTableT &lhs, const ArrayTableT &rhs);
|
||||
bool operator!=(const ArrayTableT &lhs, const ArrayTableT &rhs);
|
||||
|
||||
inline const ::flatbuffers::TypeTable *NestedStructTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *ArrayStructTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *ArrayTableTypeTable();
|
||||
|
||||
enum class TestEnum : int8_t
|
||||
{
|
||||
A = 0,
|
||||
B = 1,
|
||||
C = 2,
|
||||
MIN = A,
|
||||
MAX = C
|
||||
};
|
||||
|
||||
inline const TestEnum (&EnumValuesTestEnum())[3]
|
||||
{
|
||||
static const TestEnum values[] = {TestEnum::A, TestEnum::B, TestEnum::C};
|
||||
return values;
|
||||
}
|
||||
|
||||
inline const char *const *EnumNamesTestEnum()
|
||||
{
|
||||
static const char *const names[4] = {"A", "B", "C", nullptr};
|
||||
return names;
|
||||
}
|
||||
|
||||
inline const char *EnumNameTestEnum(TestEnum e)
|
||||
{
|
||||
if (::flatbuffers::IsOutRange(e, TestEnum::A, TestEnum::C))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
const size_t index = static_cast<size_t>(e);
|
||||
return EnumNamesTestEnum()[index];
|
||||
}
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) NestedStruct FLATBUFFERS_FINAL_CLASS
|
||||
{
|
||||
private:
|
||||
int32_t a_[2];
|
||||
int8_t b_;
|
||||
int8_t c_[2];
|
||||
int8_t padding0__;
|
||||
int32_t padding1__;
|
||||
int64_t d_[2];
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable()
|
||||
{
|
||||
return NestedStructTypeTable();
|
||||
}
|
||||
NestedStruct() : a_(), b_(0), c_(), padding0__(0), padding1__(0), d_()
|
||||
{
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
}
|
||||
NestedStruct(MyGame::Example::TestEnum _b)
|
||||
: a_(),
|
||||
b_(::flatbuffers::EndianScalar(static_cast<int8_t>(_b))),
|
||||
c_(),
|
||||
padding0__(0),
|
||||
padding1__(0),
|
||||
d_()
|
||||
{
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
}
|
||||
NestedStruct(::flatbuffers::span<const int32_t, 2> _a, MyGame::Example::TestEnum _b,
|
||||
::flatbuffers::span<const MyGame::Example::TestEnum, 2> _c,
|
||||
::flatbuffers::span<const int64_t, 2> _d)
|
||||
: b_(::flatbuffers::EndianScalar(static_cast<int8_t>(_b))), padding0__(0), padding1__(0)
|
||||
{
|
||||
::flatbuffers::CastToArray(a_).CopyFromSpan(_a);
|
||||
::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_).CopyFromSpan(_c);
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
::flatbuffers::CastToArray(d_).CopyFromSpan(_d);
|
||||
}
|
||||
const ::flatbuffers::Array<int32_t, 2> *a() const
|
||||
{
|
||||
return &::flatbuffers::CastToArray(a_);
|
||||
}
|
||||
::flatbuffers::Array<int32_t, 2> *mutable_a()
|
||||
{
|
||||
return &::flatbuffers::CastToArray(a_);
|
||||
}
|
||||
MyGame::Example::TestEnum b() const
|
||||
{
|
||||
return static_cast<MyGame::Example::TestEnum>(::flatbuffers::EndianScalar(b_));
|
||||
}
|
||||
void mutate_b(MyGame::Example::TestEnum _b)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&b_, static_cast<int8_t>(_b));
|
||||
}
|
||||
const ::flatbuffers::Array<MyGame::Example::TestEnum, 2> *c() const
|
||||
{
|
||||
return &::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_);
|
||||
}
|
||||
::flatbuffers::Array<MyGame::Example::TestEnum, 2> *mutable_c()
|
||||
{
|
||||
return &::flatbuffers::CastToArrayOfEnum<MyGame::Example::TestEnum>(c_);
|
||||
}
|
||||
const ::flatbuffers::Array<int64_t, 2> *d() const
|
||||
{
|
||||
return &::flatbuffers::CastToArray(d_);
|
||||
}
|
||||
::flatbuffers::Array<int64_t, 2> *mutable_d()
|
||||
{
|
||||
return &::flatbuffers::CastToArray(d_);
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(NestedStruct, 32);
|
||||
|
||||
inline bool operator==(const NestedStruct &lhs, const NestedStruct &rhs)
|
||||
{
|
||||
return (*lhs.a() == *rhs.a()) && (lhs.b() == rhs.b()) && (*lhs.c() == *rhs.c()) &&
|
||||
(*lhs.d() == *rhs.d());
|
||||
}
|
||||
|
||||
inline bool operator!=(const NestedStruct &lhs, const NestedStruct &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
struct NestedStruct::Traits
|
||||
{
|
||||
using type = NestedStruct;
|
||||
};
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) ArrayStruct FLATBUFFERS_FINAL_CLASS
|
||||
{
|
||||
private:
|
||||
float a_;
|
||||
int32_t b_[15];
|
||||
int8_t c_;
|
||||
int8_t padding0__;
|
||||
int16_t padding1__;
|
||||
int32_t padding2__;
|
||||
MyGame::Example::NestedStruct d_[2];
|
||||
int32_t e_;
|
||||
int32_t padding3__;
|
||||
int64_t f_[2];
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable()
|
||||
{
|
||||
return ArrayStructTypeTable();
|
||||
}
|
||||
ArrayStruct()
|
||||
: a_(0),
|
||||
b_(),
|
||||
c_(0),
|
||||
padding0__(0),
|
||||
padding1__(0),
|
||||
padding2__(0),
|
||||
d_(),
|
||||
e_(0),
|
||||
padding3__(0),
|
||||
f_()
|
||||
{
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
(void)padding2__;
|
||||
(void)padding3__;
|
||||
}
|
||||
ArrayStruct(float _a, int8_t _c, int32_t _e)
|
||||
: a_(::flatbuffers::EndianScalar(_a)),
|
||||
b_(),
|
||||
c_(::flatbuffers::EndianScalar(_c)),
|
||||
padding0__(0),
|
||||
padding1__(0),
|
||||
padding2__(0),
|
||||
d_(),
|
||||
e_(::flatbuffers::EndianScalar(_e)),
|
||||
padding3__(0),
|
||||
f_()
|
||||
{
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
(void)padding2__;
|
||||
(void)padding3__;
|
||||
}
|
||||
ArrayStruct(float _a, ::flatbuffers::span<const int32_t, 15> _b, int8_t _c,
|
||||
::flatbuffers::span<const MyGame::Example::NestedStruct, 2> _d, int32_t _e,
|
||||
::flatbuffers::span<const int64_t, 2> _f)
|
||||
: a_(::flatbuffers::EndianScalar(_a)),
|
||||
c_(::flatbuffers::EndianScalar(_c)),
|
||||
padding0__(0),
|
||||
padding1__(0),
|
||||
padding2__(0),
|
||||
e_(::flatbuffers::EndianScalar(_e)),
|
||||
padding3__(0)
|
||||
{
|
||||
::flatbuffers::CastToArray(b_).CopyFromSpan(_b);
|
||||
(void)padding0__;
|
||||
(void)padding1__;
|
||||
(void)padding2__;
|
||||
::flatbuffers::CastToArray(d_).CopyFromSpan(_d);
|
||||
(void)padding3__;
|
||||
::flatbuffers::CastToArray(f_).CopyFromSpan(_f);
|
||||
}
|
||||
float a() const
|
||||
{
|
||||
return ::flatbuffers::EndianScalar(a_);
|
||||
}
|
||||
void mutate_a(float _a)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&a_, _a);
|
||||
}
|
||||
const ::flatbuffers::Array<int32_t, 15> *b() const
|
||||
{
|
||||
return &::flatbuffers::CastToArray(b_);
|
||||
}
|
||||
::flatbuffers::Array<int32_t, 15> *mutable_b()
|
||||
{
|
||||
return &::flatbuffers::CastToArray(b_);
|
||||
}
|
||||
int8_t c() const
|
||||
{
|
||||
return ::flatbuffers::EndianScalar(c_);
|
||||
}
|
||||
void mutate_c(int8_t _c)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&c_, _c);
|
||||
}
|
||||
const ::flatbuffers::Array<MyGame::Example::NestedStruct, 2> *d() const
|
||||
{
|
||||
return &::flatbuffers::CastToArray(d_);
|
||||
}
|
||||
::flatbuffers::Array<MyGame::Example::NestedStruct, 2> *mutable_d()
|
||||
{
|
||||
return &::flatbuffers::CastToArray(d_);
|
||||
}
|
||||
int32_t e() const
|
||||
{
|
||||
return ::flatbuffers::EndianScalar(e_);
|
||||
}
|
||||
void mutate_e(int32_t _e)
|
||||
{
|
||||
::flatbuffers::WriteScalar(&e_, _e);
|
||||
}
|
||||
const ::flatbuffers::Array<int64_t, 2> *f() const
|
||||
{
|
||||
return &::flatbuffers::CastToArray(f_);
|
||||
}
|
||||
::flatbuffers::Array<int64_t, 2> *mutable_f()
|
||||
{
|
||||
return &::flatbuffers::CastToArray(f_);
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(ArrayStruct, 160);
|
||||
|
||||
inline bool operator==(const ArrayStruct &lhs, const ArrayStruct &rhs)
|
||||
{
|
||||
return (lhs.a() == rhs.a()) && (*lhs.b() == *rhs.b()) && (lhs.c() == rhs.c()) &&
|
||||
(*lhs.d() == *rhs.d()) && (lhs.e() == rhs.e()) && (*lhs.f() == *rhs.f());
|
||||
}
|
||||
|
||||
inline bool operator!=(const ArrayStruct &lhs, const ArrayStruct &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
struct ArrayStruct::Traits
|
||||
{
|
||||
using type = ArrayStruct;
|
||||
};
|
||||
|
||||
struct ArrayTableT : public ::flatbuffers::NativeTable
|
||||
{
|
||||
typedef ArrayTable TableType;
|
||||
std::unique_ptr<MyGame::Example::ArrayStruct> a{};
|
||||
ArrayTableT() = default;
|
||||
ArrayTableT(const ArrayTableT &o);
|
||||
ArrayTableT(ArrayTableT &&) FLATBUFFERS_NOEXCEPT = default;
|
||||
ArrayTableT &operator=(ArrayTableT o) FLATBUFFERS_NOEXCEPT;
|
||||
};
|
||||
|
||||
struct ArrayTable FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table
|
||||
{
|
||||
typedef ArrayTableT NativeTableType;
|
||||
typedef ArrayTableBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { return ArrayTableTypeTable(); }
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE
|
||||
{
|
||||
VT_A = 4
|
||||
};
|
||||
const MyGame::Example::ArrayStruct *a() const
|
||||
{
|
||||
return GetStruct<const MyGame::Example::ArrayStruct *>(VT_A);
|
||||
}
|
||||
MyGame::Example::ArrayStruct *mutable_a()
|
||||
{
|
||||
return GetStruct<MyGame::Example::ArrayStruct *>(VT_A);
|
||||
}
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const
|
||||
{
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<MyGame::Example::ArrayStruct>(verifier, VT_A, 8) && verifier.EndTable();
|
||||
}
|
||||
ArrayTableT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(ArrayTableT *_o,
|
||||
const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<ArrayTable> Pack(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const ArrayTableT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct ArrayTableBuilder
|
||||
{
|
||||
typedef ArrayTable Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_a(const MyGame::Example::ArrayStruct *a) { fbb_.AddStruct(ArrayTable::VT_A, a); }
|
||||
explicit ArrayTableBuilder(::flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb)
|
||||
{
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<ArrayTable> Finish()
|
||||
{
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<ArrayTable>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<ArrayTable> CreateArrayTable(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const MyGame::Example::ArrayStruct *a = nullptr)
|
||||
{
|
||||
ArrayTableBuilder builder_(_fbb);
|
||||
builder_.add_a(a);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct ArrayTable::Traits
|
||||
{
|
||||
using type = ArrayTable;
|
||||
static auto constexpr Create = CreateArrayTable;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<ArrayTable> CreateArrayTable(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const ArrayTableT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline bool operator==(const ArrayTableT &lhs, const ArrayTableT &rhs)
|
||||
{
|
||||
return ((lhs.a == rhs.a) || (lhs.a && rhs.a && *lhs.a == *rhs.a));
|
||||
}
|
||||
|
||||
inline bool operator!=(const ArrayTableT &lhs, const ArrayTableT &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline ArrayTableT::ArrayTableT(const ArrayTableT &o)
|
||||
: a((o.a) ? new MyGame::Example::ArrayStruct(*o.a) : nullptr)
|
||||
{}
|
||||
|
||||
inline ArrayTableT &ArrayTableT::operator=(ArrayTableT o) FLATBUFFERS_NOEXCEPT
|
||||
{
|
||||
std::swap(a, o.a);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline ArrayTableT *ArrayTable::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const
|
||||
{
|
||||
auto _o = std::make_unique<ArrayTableT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void ArrayTable::UnPackTo(ArrayTableT *_o,
|
||||
const ::flatbuffers::resolver_function_t *_resolver) const
|
||||
{
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{
|
||||
auto _e = a();
|
||||
if (_e)
|
||||
{
|
||||
_o->a = std::unique_ptr<MyGame::Example::ArrayStruct>(
|
||||
new MyGame::Example::ArrayStruct(*_e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<ArrayTable> ArrayTable::Pack(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const ArrayTableT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher)
|
||||
{
|
||||
return CreateArrayTable(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<ArrayTable> CreateArrayTable(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const ArrayTableT *_o,
|
||||
const ::flatbuffers::rehasher_function_t *_rehasher)
|
||||
{
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs
|
||||
{
|
||||
::flatbuffers::FlatBufferBuilder *__fbb;
|
||||
const ArrayTableT *__o;
|
||||
const ::flatbuffers::rehasher_function_t *__rehasher;
|
||||
} _va = {&_fbb, _o, _rehasher};
|
||||
(void)_va;
|
||||
auto _a = _o->a ? _o->a.get() : nullptr;
|
||||
return MyGame::Example::CreateArrayTable(_fbb, _a);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *TestEnumTypeTable()
|
||||
{
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {{::flatbuffers::ET_CHAR, 0, 0},
|
||||
{::flatbuffers::ET_CHAR, 0, 0},
|
||||
{::flatbuffers::ET_CHAR, 0, 0}};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {MyGame::Example::TestEnumTypeTable};
|
||||
static const char *const names[] = {"A", "B", "C"};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *NestedStructTypeTable()
|
||||
{
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {{::flatbuffers::ET_INT, 1, -1},
|
||||
{::flatbuffers::ET_CHAR, 0, 0},
|
||||
{::flatbuffers::ET_CHAR, 1, 0},
|
||||
{::flatbuffers::ET_LONG, 1, -1}};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {MyGame::Example::TestEnumTypeTable};
|
||||
static const int16_t array_sizes[] = {
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
};
|
||||
static const int64_t values[] = {0, 8, 9, 16, 32};
|
||||
static const char *const names[] = {"a", "b", "c", "d"};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 4, type_codes, type_refs, array_sizes, values, names};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *ArrayStructTypeTable()
|
||||
{
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{::flatbuffers::ET_FLOAT, 0, -1}, {::flatbuffers::ET_INT, 1, -1},
|
||||
{::flatbuffers::ET_CHAR, 0, -1}, {::flatbuffers::ET_SEQUENCE, 1, 0},
|
||||
{::flatbuffers::ET_INT, 0, -1}, {::flatbuffers::ET_LONG, 1, -1}};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {MyGame::Example::NestedStructTypeTable};
|
||||
static const int16_t array_sizes[] = {
|
||||
15,
|
||||
2,
|
||||
2,
|
||||
};
|
||||
static const int64_t values[] = {0, 4, 64, 72, 136, 144, 160};
|
||||
static const char *const names[] = {"a", "b", "c", "d", "e", "f"};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 6, type_codes, type_refs, array_sizes, values, names};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *ArrayTableTypeTable()
|
||||
{
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {{::flatbuffers::ET_SEQUENCE, 0, 0}};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {MyGame::Example::ArrayStructTypeTable};
|
||||
static const char *const names[] = {"a"};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const MyGame::Example::ArrayTable *GetArrayTable(const void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetRoot<MyGame::Example::ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline const MyGame::Example::ArrayTable *GetSizePrefixedArrayTable(const void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetSizePrefixedRoot<MyGame::Example::ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline ArrayTable *GetMutableArrayTable(void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetMutableRoot<ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline MyGame::Example::ArrayTable *GetMutableSizePrefixedArrayTable(void *buf)
|
||||
{
|
||||
return ::flatbuffers::GetMutableSizePrefixedRoot<MyGame::Example::ArrayTable>(buf);
|
||||
}
|
||||
|
||||
inline const char *ArrayTableIdentifier()
|
||||
{
|
||||
return "ARRT";
|
||||
}
|
||||
|
||||
inline bool ArrayTableBufferHasIdentifier(const void *buf)
|
||||
{
|
||||
return ::flatbuffers::BufferHasIdentifier(buf, ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline bool SizePrefixedArrayTableBufferHasIdentifier(const void *buf)
|
||||
{
|
||||
return ::flatbuffers::BufferHasIdentifier(buf, ArrayTableIdentifier(), true);
|
||||
}
|
||||
|
||||
inline bool VerifyArrayTableBuffer(::flatbuffers::Verifier &verifier)
|
||||
{
|
||||
return verifier.VerifyBuffer<MyGame::Example::ArrayTable>(ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedArrayTableBuffer(::flatbuffers::Verifier &verifier)
|
||||
{
|
||||
return verifier.VerifySizePrefixedBuffer<MyGame::Example::ArrayTable>(ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline const char *ArrayTableExtension()
|
||||
{
|
||||
return "mon";
|
||||
}
|
||||
|
||||
inline void FinishArrayTableBuffer(::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<MyGame::Example::ArrayTable> root)
|
||||
{
|
||||
fbb.Finish(root, ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedArrayTableBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<MyGame::Example::ArrayTable> root)
|
||||
{
|
||||
fbb.FinishSizePrefixed(root, ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackArrayTable(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr)
|
||||
{
|
||||
return std::unique_ptr<MyGame::Example::ArrayTableT>(GetArrayTable(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackSizePrefixedArrayTable(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr)
|
||||
{
|
||||
return std::unique_ptr<MyGame::Example::ArrayTableT>(
|
||||
GetSizePrefixedArrayTable(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Example
|
||||
} // namespace MyGame
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ARRAYSTEST_MYGAME_EXAMPLE_H_
|
||||
Reference in New Issue
Block a user