flatbuffers/tests/MyGame
lu-wang-g 65f8703572 Flatbuffers Python Object API (#5616)
* Flatbuffers Python Object API

Implement the logic to generate the Python object API that can
unpack the data from a buf class into an object class, and pack
the data of an object class to a buf class.

* Fix the build issues

Remove unused parameters and replace auto in the for-loop statement
with std::string to make it compatible with VS2010.

* Fix the build issues.

* Add support for Array type

Added logic to handle Array type in Python Object API. Updated the
generated code accordingly.

* Fix the old style casting from int to char

* Fixed another conversion from int to char

* Fixed the import for typing

Importing typing may cause errors when a machine do not have the
moduel typing installed. This PR fixes the issue by guarding
"import typing" with the "try/except" statement.

* Fix issue of iterating the vector of import list

* Update the generated examples using generate_code.sh

* Fix the import order for typing

The import list was stored in unordered_set, so that each generated
codes may have different import order. Therefore, it failed in the
consistency test where two generated copies need to have exactly the
same apperance.

* Optimize unpack using numpy

Use numpy to unpack vector whenever it is possible to improve unpack
performance.

Also, added codegen command for Python specificly in generate_code.sh,
because --no-includes cannot be turn on for Python.

* Fix the import order

* Update generate_code.bat for windows accordingly

* Replace error message with pass

Avoid printing error message for every Python2 users about typing.
Replace it with pass.
2019-12-02 14:11:28 -08:00
..
Example Flatbuffers Python Object API (#5616) 2019-12-02 14:11:28 -08:00
Example2 Flatbuffers Python Object API (#5616) 2019-12-02 14:11:28 -08:00
InParentNamespace.cs Add FLATBUFFERS_COMPATIBILITY string (#5381) 2019-06-17 19:16:21 +02:00
InParentNamespace.go [Go] Add UnPackTo functions (#5598) 2019-11-04 12:12:25 -08:00
InParentNamespace.java Java: Added access object for vector of struct and vector of tables. (#5233) 2019-09-23 09:22:43 -07:00
InParentNamespace.kt Add basic Kotlin support (#5409) 2019-07-22 16:05:15 -07:00
InParentNamespace.lua Lua (5.3) Language addition (#4804) 2018-07-05 15:55:57 -07:00
InParentNamespace.php Cleaned up namespace handling. 2017-08-24 13:39:45 -07:00
InParentNamespace.py Flatbuffers Python Object API (#5616) 2019-12-02 14:11:28 -08:00
MonsterExtra.cs Add element size parameter to __vector_as_arraysegment [c#] (#5512) 2019-09-10 17:07:46 -07:00
MonsterExtra.java Java: Added access object for vector of struct and vector of tables. (#5233) 2019-09-23 09:22:43 -07:00
MonsterExtra.kt Added missing Kotlin generated code change. 2019-07-25 11:08:06 -07:00
MonsterExtra.py Flatbuffers Python Object API (#5616) 2019-12-02 14:11:28 -08:00
__init__.py Port FlatBuffers to Python. 2015-05-12 15:40:29 -07:00