flatbuffers/tests/MyGame/Example
lu-wang-g fd4ff23da0
Keep methods with struct name and switch them to default (#6879)
* Keep methods with struct name and switch them to default

This PR can help fix the following two issues:
1): A set of simplified API (without struct name) was added in
https://github.com/google/flatbuffers/pull/6336. It causes name
conflict when merging all generated python file into a single one
(the primary usage senario in Google).
2): Flatbuffers 2.0 generates absolute import path, which may cause
name space conflicts. See more details in
https://github.com/google/flatbuffers/issues/5840.

The solution for both is to generate the merged Python code, similar
C++. The merged code will not contain the simplied API, but only the
method with struct name. For issue (1), it will mimic the exactly
usage pattern for Google internal. For issue (2), users can generate
the merged flatbuffer code, without worrying about the imports.

The above idea will be implemented in the following steps:
Step 1 (this PR): revert changes in https://github.com/google/flatbuffers/pull/6336
that set the simplified API as default. Remove statements that the
original API will be deprecated, and reset the original API as default.
Step 2 (the following PR): create a flag to generate the merged code.
The Simplified API will be removed from the merged code, otherwise it
will cause name conflict.

* Update the generated sample code

* Update the generated example code

* Reverst the changes of GetRootAs

* Update examples from grpc/example/generate.sh
2021-11-04 15:12:25 -07:00
..
__init__.py
Ability.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Ability.go
Ability.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Ability.kt
Ability.lua
Ability.php
Ability.py [Python/JS/TS] Codegen SizeOf method for structs (#6136) 2020-09-28 08:54:50 -07:00
AbilityT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Any.cs [C#] Add Union Constructor Utility for ObjectAPI. (#6105) 2021-07-26 10:01:41 -07:00
Any.go
Any.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Any.kt
Any.lua
Any.php
Any.py
AnyAmbiguousAliases.cs [C#] Add Union Constructor Utility for ObjectAPI. (#6105) 2021-07-26 10:01:41 -07:00
AnyAmbiguousAliases.go
AnyAmbiguousAliases.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
AnyAmbiguousAliases.kt
AnyAmbiguousAliases.lua
AnyAmbiguousAliases.php
AnyAmbiguousAliases.py
AnyAmbiguousAliasesUnion.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
AnyUnion.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
AnyUniqueAliases.cs [C#] Add Union Constructor Utility for ObjectAPI. (#6105) 2021-07-26 10:01:41 -07:00
AnyUniqueAliases.go
AnyUniqueAliases.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
AnyUniqueAliases.kt
AnyUniqueAliases.lua
AnyUniqueAliases.php
AnyUniqueAliases.py
AnyUniqueAliasesUnion.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
ArrayStruct.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
ArrayStruct.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
ArrayStruct.py [Python/JS/TS] Codegen SizeOf method for structs (#6136) 2020-09-28 08:54:50 -07:00
ArrayStructT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
ArrayTable.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
ArrayTable.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
ArrayTable.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
ArrayTableT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Color.cs
Color.go
Color.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Color.kt
Color.lua
Color.php
Color.py
Monster.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Monster.go [C++, JSON] Fix nullptr access when reading a key with a default value. (#6375) 2021-01-07 11:24:59 -08:00
Monster.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Monster.kt C#/Java generated code version updates 2021-05-10 11:17:31 -07:00
Monster.lua [Lua] manipulate byte array as string (#6624) 2021-05-07 22:57:13 -07:00
Monster.php [C++, JSON] Fix nullptr access when reading a key with a default value. (#6375) 2021-01-07 11:24:59 -08:00
Monster.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
monster_test_grpc_fb.py
MonsterStorage_grpc.go [Go] Working on a go example plus fixing go grpc code (#6448) 2021-02-19 12:47:59 +03:00
MonsterStorageGrpc.java C++/Rust version changes 2021-05-10 11:29:32 -07:00
MonsterT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
NestedStruct.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
NestedStruct.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
NestedStruct.py [Python/JS/TS] Codegen SizeOf method for structs (#6136) 2020-09-28 08:54:50 -07:00
NestedStructT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Race.cs
Race.go
Race.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Race.kt
Race.lua
Race.php
Race.py
Referrable.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Referrable.go Support size-prefixed buffers and add tests for size-prefixed messages (#6232) 2020-11-05 11:23:56 -08:00
Referrable.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Referrable.kt C#/Java generated code version updates 2021-05-10 11:17:31 -07:00
Referrable.lua [Lua] GetRootAs can accept strings. Made Luatest Benchmarks optional (#6593) 2021-04-27 13:02:13 -07:00
Referrable.php
Referrable.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
ReferrableT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Stat.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Stat.go Support size-prefixed buffers and add tests for size-prefixed messages (#6232) 2020-11-05 11:23:56 -08:00
Stat.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Stat.kt C#/Java generated code version updates 2021-05-10 11:17:31 -07:00
Stat.lua [Lua] GetRootAs can accept strings. Made Luatest Benchmarks optional (#6593) 2021-04-27 13:02:13 -07:00
Stat.php
Stat.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
StatT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
StructOfStructs.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
StructOfStructs.go Rust structz (#6539) 2021-03-29 19:56:45 -04:00
StructOfStructs.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
StructOfStructs.kt Rust structz (#6539) 2021-03-29 19:56:45 -04:00
StructOfStructs.lua Rust structz (#6539) 2021-03-29 19:56:45 -04:00
StructOfStructs.php Rust structz (#6539) 2021-03-29 19:56:45 -04:00
StructOfStructs.py Rust structz (#6539) 2021-03-29 19:56:45 -04:00
StructOfStructsT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Test.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Test.go
Test.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Test.kt
Test.lua
Test.php
Test.py [Python/JS/TS] Codegen SizeOf method for structs (#6136) 2020-09-28 08:54:50 -07:00
TestEnum.cs
TestEnum.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
TestEnum.kt
TestEnum.py
TestSimpleTableWithEnum.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
TestSimpleTableWithEnum.go Support size-prefixed buffers and add tests for size-prefixed messages (#6232) 2020-11-05 11:23:56 -08:00
TestSimpleTableWithEnum.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
TestSimpleTableWithEnum.kt C#/Java generated code version updates 2021-05-10 11:17:31 -07:00
TestSimpleTableWithEnum.lua [Lua] GetRootAs can accept strings. Made Luatest Benchmarks optional (#6593) 2021-04-27 13:02:13 -07:00
TestSimpleTableWithEnum.php
TestSimpleTableWithEnum.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
TestSimpleTableWithEnumT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
TestT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
TypeAliases.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
TypeAliases.go Support size-prefixed buffers and add tests for size-prefixed messages (#6232) 2020-11-05 11:23:56 -08:00
TypeAliases.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
TypeAliases.kt C#/Java generated code version updates 2021-05-10 11:17:31 -07:00
TypeAliases.lua [Lua] manipulate byte array as string (#6624) 2021-05-07 22:57:13 -07:00
TypeAliases.php
TypeAliases.py Keep methods with struct name and switch them to default (#6879) 2021-11-04 15:12:25 -07:00
TypeAliasesT.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Vec3.cs [C#] Remove superfluous semicolon in C# structs (#6791) 2021-08-17 11:02:57 -04:00
Vec3.go
Vec3.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00
Vec3.kt
Vec3.lua
Vec3.php
Vec3.py [Python/JS/TS] Codegen SizeOf method for structs (#6136) 2020-09-28 08:54:50 -07:00
Vec3T.java [Java] ObjectAPI implementation (#6521) (#6582) 2021-06-03 14:17:40 -07:00