Age | Commit message (Collapse) | Author |
|
This reverts commit 420a0a2f2f9474aa5aaa0a877985401539edf1c9.
Exempt-From-Owner-Approval: upgrade
|
|
Revert "Fix the API for new flatbuffer"
Revert submission 1258647-flatbuffer
Reason for revert: It broke ab/androidx-master-dev
Reverted Changes:
Ia8bdf90e3:Fix the API for new flatbuffer
Iae8aa73e8:Upgrade flatbuffers to v1.12.0
Change-Id: I68ed60bbe33742dea85c8a704b21f37414576445
|
|
* [Flatbuffer] Generate code for force_align with CreateXDirect and Pack functions.
* Fixed Visual Studio 10.0 compile error for std::to_string.
* Fixed Visual Studio 10.0 compile error for std::to_string.
|
|
Change-Id: Ib3ffbdf51ef6af1f5c8267b84b84dceed9d4a838
|
|
* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case.
* Added --filename-suffix and --filename-ext to flatc
* Fixed typo and added example generation of suffix and extension for C++
* Removed extra ;
* Removed clang-format block from a region that didn't need it. Fixed an auto format of another clang-format block
* Added docs, fixed pointer alignment, removed suffix test file
|
|
* support json serialization
* fix invalid json format.
* string must be written with double quotes.
* remove commma after the last object member.
* fix indent
* Revert "fix invalid json format."
This reverts commit d6820ed50c8e3d3cda3aa1849b3079f853608619.
* quated string value.
* add cs-gen-json-serializer flag.
* fix preprocessor indent
* ENABLE_JSON_SERIALIZATION -> ENABLE_JSON_SERIALIZATION_TEST
* share TestBuffer method
* remove ENABLE_JSON_SERIALIZATION
* remove duplicated test data
* [windows] add nuget restore and copy test data.
* [docker mono] share msbuild settings with windows. add nuget restore and copy test data.
* add some note for json api.
|
|
* [C#] support Object API
* fix sign-compare
* fix indent
* add new line before for loop.
* using auto whenever possible
* reduce the amout of blank lines.
* wip: support vectors of union
* done: support unions of vectors
* set C# version to 4.0
* remove null propagation operator
* remove auto property initializer
* remove expression-bodied method
* remove pattern matching
* add Example2 to NetTest.sh
* separate JavaUsage.md and CsharpUsage.md from JavaCsharpUsage.md
* add C# Object based API notes.
* support vs2010.
* remove range based for loop.
* remove System.Linq
* fix indent
* CreateSharedString to CreateString
* check shared attribute
* snake case
|
|
|
|
* Add vcpkg installation instructions
* Update comments
|
|
Fixed the create functions and updated the test cases in swift
Removes unneeded code
Updated documentation
|
|
* Implemented the swift version of Flatbuffers
Implemented serailzing, reading, and mutating data from object monster
Fixes mis-aligned pointer issue
Fixes issue when shared strings are removed from table
Adds swift enum, structs code gen
Fixed namespace issues + started implementing the table gen
Added Mutate function to the code generator
Generated linux test cases
Fixed an issue with bools, and structs readers in table writer
Swift docker image added
Updated the test cases, and removed a method parameters in swift
Fixed createVector api when called with scalars
Fixed issues with scalar arrays, and fixed the code gen namespaces, added sample_binary.swift
Cleaned up project
Added enum vectors, and their readers
Refactored code
Added swift into the support document
Added documentation in docs, and fixed a small issue with Data() not being returned correctly
Fixes Lowercase issue, and prevents generating lookups for deprecated keys
* Made all the required funcs to have const + removed unneeded code + fix lowercase func
* Removed transform from lowercased and moved it to function
* Fixes an issue with iOS allocation from read
* Refactored cpp code to be more readable
* casts position into int for position
* Fix enums issue, moves scalar writer code to use memcpy
* Removed c_str from struct function
* Fixed script to generate new objects when ran on travis ci: fix
* Handles deallocating space allocated for structs
* Updated the test cases to adhere to the fileprivate lookup, no mutation for unions, and updated the names of the vector functions
|
|
https://github.com/google/flatbuffers/issues/5688
|
|
Change-Id: Ie34ff580eb2f41ff35f85271b10865f4a14d0dca
|
|
* Add flatc '--cpp_std' switch and sandbox for C++17 code generator
- Added 'flac --cpp_std legacy' for compatibility with old compilers (VS2010);
- Added experimental switch 'flac --cpp_std c++17' for future development;
- Added C++17 sandbox test_cpp17.cpp;
- C++ code generator generates enums with explicit underlying type to avoid problems with the forward and backward schema compatibility;
- Adjusted CMakeLists.txt, CI and generate code scripts to support of introduced '--cpp_std';
* Fix --cpp_std values: c++0x, c++11, c++17
* Add 'cpp::CppStandard' enum
* Add testing engine into test_cpp17
* Rebase to upstream/master
* Set default '--cpp-std C++0x'
* Fix code generation (--cpp_std C++11) in CMakeLists.txt
- Fix dependency declaration of grpctest target
* Revert --cpp-std for the tests from explicit C++11 to flatc default value (C++0x)
|
|
The rationale for this option is that JSON clients typically want empty arrays (i.e [] in the JSON) instead of missing properties, but not empty strings when the value isn't set.
--force-empty is kept as-is, i.e. it will force both empty strings and vectors.
Closes #5652
|
|
* 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.
|
|
Add missing semicolon for table field.
|
|
Also add a FlexBuffer constructor to simplify usage
|
|
Change-Id: Ib771bfa46ccdf38eff25be857b1b73f8b300c649
|
|
|
|
* [Kotlin] Add kotlin generate code for tests and add
kotlin test to TestAll.sh
* [Kotlin] Add Kotlin generator
This change adds support for generating Kotlin classes.
The approach of this generator is to keep it as close
as possible to the java generator for now, in order
to keep the change simple.
It uses the already implemented java runtime,
so we don't support cross-platform nor js Kotlin yet.
Kotlin tests are just a copy of the java tests.
* Add optional ident support for CodeWriter
Identation is important for some languages and
different projects have different ways of ident
code, e.g. tabs vs spaces, so we are adding optional
support on CodeWriter for identation.
* [Kotlin] Add Documentation for Kotlin
* [Kotlin] Modify generated code to use experimental Unsigned types.
|
|
* Extend the test of MonsterExtra
- Extend C++ test of MonsterExtra
- Add conversion of fbs/json NaNs to unsigned quiet-NaN
- Update documentation (cross-platform interoperability)
* Fix declaration of infinity constants int the test
|
|
|
|
* [docs] Added an example on how to convert a FlatBuffer binary to JSON
Slightly adjusted section on "Using flatc as a conversion tool".
Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
* [docs] Updated obsolete JSON data in example showing how to convert JSON to FlatBuffer binaries.
Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
|
|
Looks like it's an older syntax for --strict-json which was long-ago removed in https://github.com/google/flatbuffers/commit/d38b9af243d8dcfc53ab69c79e0ce404759240d4
|
|
* fix typo
* fix typo
|
|
* c++: Add command line option to add extra includes to gen files
Fixes #5351
We have an ability to pass custom types for strings, allocators, etc
but have no way to tell the generator to include the classes in gen code
* c++: remove std::strtok for std::string methods. passes msvc compile
* generate_code.sh: add --cpp-includes to the test gen script
* tests:generate.bat: update code gen scripts w/ --cpp-includes
* cpp: use command line parsing for extra includes
s/--cpp-includes/--cpp-include/g
Simplify command line parsing of includes by using a std::vector.
* cpp: idl.h: move std::vector for cpp_includes as the last member
msvc does not understand initalization list on our CI server
* cpp:msvc: CI fails on for-range loops
* cpp:codegen: fix error reporting on flatcc
* as per code review: remove unwated --cpp-include in the
tests/generate_code.{sh,bat}
|
|
|
|
|
|
Some string definitions were typed as ns(Weapon_ref_t) while they should
be flatbuffers_string_ref_t. Note that the former was also compiling &
running correctly as both ref types boil down to the same underlying ref
type.
|
|
This is what currently rendered:
/flatubffers
in https://google.github.io/flatbuffers/flatbuffers_guide_use_typescript.html
Besides the typo, @types is being swallowed, the hope is that puting it between
backticks will improve the situation.
|
|
|
|
* Fix the header file path in the tutorial doc
* Add the path field in sample/monster.fbs to match the tutorial
* Update the lobster sample file
* Update the binary sample file
|
|
|
|
|
|
Path specified in tutorial file was pointing to invalid location.
|
|
|
|
implement better custom string type constructor alternative
for Unpack() and fix bug with vector of custom string types
in Pack().
Squashed commit of the following:
commit e9519c647ef949b22756ed660839dd3af854881c
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Tue Mar 5 18:24:49 2019 +0100
tests: regenerate code, reverts change to CreateVectorOfStrings().
commit 117e3b0679209f2aa55cbee18c4036e7da4bd4b3
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Tue Mar 5 18:15:05 2019 +0100
idl_gen_cpp.cpp: move clang-format on/off outside of declaration, so they are kept properly aligned automatically.
commit 4791923806965637d5b13f7003329bfbb2fdf18b
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Tue Mar 5 18:11:40 2019 +0100
idl_gen_cpp.cpp: full clang-format run with provided Google format file, enforce 80 lines width.
commit 2f0402f9ff43b1af0a29806932e08e6d64373345
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Tue Mar 5 18:09:32 2019 +0100
CppUsage: address requested changes.
idl_gen_cpp.cpp: fix formatting, keep CreateVectorOfStrings for normal string cases.
commit 371d4e0b7972a59e5cff418c44e4043c016ce56a
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Fri Mar 1 16:35:29 2019 +0100
Fix compile error with a vector of non-std::strings. CreateVectorOfStrings() expects a vector of std::string types, but that's not always the case.
commit 92b90d7f0fbcfc837a94aa06bedccec0f7b4bb62
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Fri Mar 1 16:15:36 2019 +0100
Document requirement for custom string types to implement empty() and be constructible from std::string.
Add new option --cpp-str-flex-ctor to construct custom string types not via std::string, but (char * + length).
commit 28cb2e92d5b7684b5df5184da3a3fad2d0cda733
Author: Luca Longinotti <luca.longinotti@inivation.com>
Date: Fri Mar 1 14:31:17 2019 +0100
idl_gen_cpp.cpp: clang-format run, to better separate changes in content from formatting.
Change-Id: I4887ba2f2c632b9e7a8c938659b088cd95690870
|
|
* Don't use inner attributes for `allow`
Messes with being able to easily include elsewhere
* Regenerate tests
* No-op to retrigger CI
* Add the rest of the `allow` attributes
|
|
|
|
Change monster_generate.h to monster_generated.h
|
|
* Add flag to make short names in JS/TS.
* Synced all missing docs in Compiler.md <-> flatc.cpp.
* Review changes.
|
|
* Implement native_shared attribute for C++.
Fixes #5141. See also #5145.
* Refine comment in idl.h
* Also refine docs
* Revert "Also refine docs"
This reverts commit 09dab7b45c56c2d17eac493203adc8caaa0df2cc.
* Also refine docs again.
* grumble
|
|
More detail:
https://github.com/google/flatbuffers/projects/6#card-17401359
See also the .md changes in this commit.
Change-Id: Idfa68b2fd3bdb19979833737d3a3cf83ec1d6775
|
|
|
|
* Make the Parser independent from the global C-locale
* Set a specific test locale using the environment variable FLATBUFFERS_TEST_LOCALE
* Remove redundant static qualifiers
|
|
|
|
https://github.com/google/flatbuffers/pull/4986 missed part of the
implementation.
Change-Id: Ie41771eb018a550c289c77ebe9ef5c50d1ad6751
|
|
* forbid enum values that are out of range
Enum values that are out of range can lead to generated C++ code that does
not compile. Also forbid boolean enums.
* update enum and union documentation slightly
|
|
* Refactoring of numbers parser
More accurate parse of float and double.
Hexadecimal floats.
Check "out-of-range" of uint64 fields.
Check correctness of default values and metadata.
* Remove locale-independent code strtod/strtof from PR #4948.
* small optimization
* Add is_(ascii) functions
* is_ascii cleanup
* Fix format conversation
* Refine number parser
* Make code compatible with Android build
* Remove unnecessary suppression of warning C4127
|