aboutsummaryrefslogtreecommitdiff
path: root/docs/source
AgeCommit message (Collapse)Author
2020-03-25Revert "Revert "Upgrade flatbuffers to v1.12.0""Haibo Huang
This reverts commit 420a0a2f2f9474aa5aaa0a877985401539edf1c9. Exempt-From-Owner-Approval: upgrade
2020-03-16Revert "Upgrade flatbuffers to v1.12.0"android-r-preview-4android-r-preview-3android-r-preview-2Aurimas Liutikas
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
2020-03-12[C++] Generate code for vector force_align attribute. (#5796)Myrice
* [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.
2020-03-02Fixed docs on how to obtain parser error.Wouter van Oortmerssen
Change-Id: Ib3ffbdf51ef6af1f5c8267b84b84dceed9d4a838
2020-03-02Added --filename-suffix and --filename-ext to flatc (#5778)Derek Bailey
* 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
2020-02-10[C#] support Json Serialization (#5752)mugisoba
* 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.
2020-01-30[C#] support Object API (#5710)mugisoba
* [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
2020-01-27Adds min and max, comments, and all of swift's keywords + fix docs (#5737)mustiikhalil
2020-01-23Add vcpkg installation instructions (#5732)Phoebe
* Add vcpkg installation instructions * Update comments
2020-01-13Added create function for swift (#5707)mustiikhalil
Fixed the create functions and updated the test cases in swift Removes unneeded code Updated documentation
2020-01-09[Swift] Swift implementation 🎉🎉 (#5603)mustiikhalil
* 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
2020-01-09Document JSON compatibility guarantees. (#5704)emkornfield
https://github.com/google/flatbuffers/issues/5688
2019-12-26Minor doc updates: FlexBuffers C#, Discord, CppUsage.Wouter van Oortmerssen
Change-Id: Ie34ff580eb2f41ff35f85271b10865f4a14d0dca
2019-12-23Add flatc '--cpp_std' switch (#5656)Vladimir Glavnyy
* 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)
2019-12-05Add --force-empty-vectors option (#5653)cryptocode
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
2019-12-02Flatbuffers Python Object API (#5616)lu-wang-g
* 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[docs]: add missing semicolon (#5648)nilsocket
Add missing semicolon for table field.
2019-09-10[Java][FlexBuffers] Improve documentation for FlexBuffers in Java. (#5506)Paulo Pinheiro
Also add a FlexBuffer constructor to simplify usage
2019-08-26Clarified value reuse in FlexBuffersWouter van Oortmerssen
Change-Id: Ib771bfa46ccdf38eff25be857b1b73f8b300c649
2019-07-25Change deprecated vector Length() to size() in tutorial (#5450)Jason Monschke
2019-07-22Add basic Kotlin support (#5409)Paulo Pinheiro
* [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.
2019-07-08Extend the test of MonsterExtra (#5428)Vladimir Glavnyy
* 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
2019-06-18Add support for fixed-size arrays (#5313)svenk177
2019-06-12[flatc][docs] Document rounding behavior of floats in JSON output (#5397)Michael Seifert
* [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>
2019-06-09Remove out-dated -S option from the flatc syntax. (#5398)Will Stott
Looks like it's an older syntax for --strict-json which was long-ago removed in https://github.com/google/flatbuffers/commit/d38b9af243d8dcfc53ab69c79e0ce404759240d4
2019-06-05fix typo (#5384)Ashwin Ramaswami
* fix typo * fix typo
2019-05-31c++: Add command line option to add extra includes to gen files (#5360)Alexander Gallego
* 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}
2019-05-22Lobster: added builder API for tablesaardappel
2019-05-22Lobster documentation fixesaardappel
2019-04-24Doc: use correct ref types for flatcc string creation. (#5305)Clément Julliard
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.
2019-04-19docs: Fix where to find the Typescript typings (#5298)Damien Lespiau
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.
2019-04-08Part of #5265, neutral changes (#5281)Vladimir Glavnyy
2019-04-05[C++]Sync the sample monster.fbs file with the tutorial (#5277)Henry Lee
* 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
2019-04-04Fix typo in Go tutorial (#5274)unexge
2019-03-28Update grammar to reflect required type signature for enum declarations. (#5269)tymcauley
2019-03-21Fixed tutorial markdown file (#5248)Ashay Shirwadkar
Path specified in tutorial file was pointing to invalid location.
2019-03-11Fix typo in dart documentation (#5230)Randal Stevens
2019-03-11[C++] Object API: document custom string type requirements,Wouter van Oortmerssen
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
2019-03-09[Rust] Don't use inner attributes for `allow` (#5212)bspeice
* 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
2019-02-28[doc] fix typos in doc. (#5217)csukuangfj
2019-02-19Fix an error in cpp code. (#5189)csukuangfj
Change monster_generate.h to monster_generated.h
2019-02-11Add flag to make short names in JS/TS. (#5152)Gabriel Nützi
* Add flag to make short names in JS/TS. * Synced all missing docs in Compiler.md <-> flatc.cpp. * Review changes.
2019-02-11Implement (shared) attribute for C++ (#5157)iceboy
* 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
2019-02-07Reduced `force_align` in tests to 8, to work with --object-api.Wouter van Oortmerssen
More detail: https://github.com/google/flatbuffers/projects/6#card-17401359 See also the .md changes in this commit. Change-Id: Idfa68b2fd3bdb19979833737d3a3cf83ec1d6775
2019-01-17[docs] [rust] Add "Useful tools created by others" section (#5127)Vlad Frolov
2018-11-16Make the Parser independent from the global C-locale (#5028)Vladimir Glavnyy
* 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
2018-11-13Fix missing doxygen link to Rust docsRobert
2018-11-02Fixed missing code from @javax.annotation PR.Wouter van Oortmerssen
https://github.com/google/flatbuffers/pull/4986 missed part of the implementation. Change-Id: Ie41771eb018a550c289c77ebe9ef5c50d1ad6751
2018-10-18forbid enum values that are out of range (#4977)Frank Benkstein
* 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
2018-10-11Refactoring of idl_parser (#4948)Vladimir Glavnyy
* 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