aboutsummaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2018-10-08Disable armeabi builds for Android and re-enable CI builds. (#4970)Stewart Miles
armeabi support was removed from the Android NDK so we should no longer build it. Since this fixes the Android build failures this commit also re-enables Travis Android builds. While re-enabling Android builds, some recent changes broke C++98 support so this fixes those issues as well which include: - Conditionally compiling use of move constructors, operators and std::move. - Changing sample to use flatbuffers::unique_ptr rather than std::unique_ptr. Finally, added the special "default_ptr_type" value for the "cpp_ptr_type" attribute. This expands to the value passed to the "--cpp-ptr-type" argument of flatc.
2018-10-04Fix recursion counter check. Add control to override depth of nested … (#4953)Vladimir Glavnyy
* Fix recursion counter check. Add control to override depth of nested objects. * Change if-condition to `>=`
2018-09-21Add compare operator to code generated for c++ (#4940)Thomas
* Add operator== for c++ genated code New "--gen-compare" option for flatc to generate compare operators. The operators are defined based on object based api types. Inspired by issue #263. * Improve compare operator for c++. Thanks for the code review. - Improve robustness against future schema extensions - Code style - Fix --rust generation in generate_code.sh
2018-09-02Port FlatBuffers to Rust (#4898)Robert
This is a port of FlatBuffers to Rust. It provides code generation and a runtime library derived from the C++ implementation. It utilizes the Rust type system to provide safe and fast traversal of FlatBuffers data. There are 188 tests, including many fuzz tests of roundtrips for various serialization scenarios. Initial benchmarks indicate that the canonical example payload can be written in ~700ns, and traversed in ~100ns. Rustaceans may be interested in the Follow, Push, and SafeSliceAccess traits. These traits lift traversals, reads, writes, and slice accesses into the type system, providing abstraction with no runtime penalty.
2018-08-13Proposing use of C++ header files and functions (#4869)kulswanand
* Proposing use of C++ header files and functions Proposing use of C++ header files and functions instead of C header file and functions. Here are few examples for comparison : C C++ <cstdio> <iostream> & <fstream> printf() cout fopen() ifstream etc ... Please let me know if there are any comments. * Updated diff based on review comments
2018-08-06Attach header directory information to the "flatbuffers" library target (#4849)Vladimir Glavnyy
* Attach header directory information to the "flatbuffers" library target, if the CMake version supports it. * Cleanup and documentation update
2018-07-29FlatBuffers implementation for the Lobster programming languageaardappel
Language, see: http://strlen.com/lobster/ and https://github.com/aardappel/lobster
2018-07-16flatbuffer force-empty option (#4822)shassani
2018-07-16:memo: release mode in building doc (#4819)xgdgsc
2018-07-05Lua (5.3) Language addition (#4804)Derek Bailey
* starting Lua port of python implmention. Syncing commit * Bulk of Lua module port from Python done. Not tested, only static analysis. Need to work on binary strings. Started work on flatc lua code generation * Fixed all the basic errors to produced a binary output from the builder, don't know if it is generated correctly, but it contains data, so that must be good * fixed binary set command that was extending the array improperly * continued improvement * Moved lua submodules down a directory so their names don't clash with potential other modules. Added compat module to provide Lua versioning logic * Successful sample port from Python * working on testing Lua code with formal tests * continued to work on tests and fixes to code to make tests pass * Added reading buffer test * Changed binaryarray implmentation to use a temporary table for storing data, and then serialize it to a string when requested. This double the rate of building flatbuffers compared to the string approach. * Didn't need encode module as it just added another layer of indirection that isn't need * profiled reading buffers, optimizations to increase read performance of monster data to ~7 monster / millisecond * Writing profiler improvments. Get about ~2 monsters/millisecond building rate * removed Numpy generation from Lua (came from the Python port) * math.pow is deprecated in Lua 5.3, so changed to ^ notation. Also added .bat script for starting Lua tests * adding results of generate_code.bat * simple edits for code review in PR. * There was a buffer overflow in inserting the keywords into the unorder set for both the Lua and Python code gens. Changed insertion to use iterators. * fixed spacing issue * basic documenation/tutorial updates. Updated sample_binary.lua to reflect the tutorial better * removed windows-specific build step in Lua tests
2018-06-27Add --force-defaults option to flatc [C++, parser] (#4729)Paul Reimer
* Add --force-defaults option to flatc To emit default values for fields which are not present or which are set to the default value. * flatc option --force-defaults should have a default value (false) and take action on the builder_ within the Parser constructor * Add help text from flatc --force-defaults to Compiler.md doc * Clarified docs for flatc --force-defaults, and imply that this behaviour is not normally needed. * Updated docs and flatc help text for --force-defaults option
2018-06-25docs: fix flatc instructions (#4794)Polynomdivision
2018-06-12Fixed TypeScript links in docs (#4783)Kamil Rojewski
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible * Not returning null when creating vectors * Not returning null from struct contructors * Vector of unions for ts/js * Sanity check for languages * Indentation fix + output test files * Vectors of unions for php * Fixes to union vector handling + tests * Fix for strictPropertyInitialization * Fix for new aligned operator new for gcc >= 7.1 * Not generating imports/ns prefixes with --gen-all * TypeScript docs * Missing imports of enums * Missing TS links * Enabled vector of unions for java, since it seems to work * Added jitpack config * Added obj to vector of unions getter * Removed unneeded accessor * Bumped jdk version in pom.xml * Vector of unions support for c# * Missing TypeScript doc processing
2018-05-31Fixed typo in Java/C# tutorial.Wouter van Oortmerssen
Change-Id: I956b27f37b11988e67d0403a596c0569eacbfc2a
2018-05-31Fix typo in tutorial for Go (#4756)Gautham B A
Fixed a typo in serialising the inventory for Orc.
2018-05-31Javascript: Add suppport for ES6 style exports (#4754)Nathan Mitchell
* Add suppport for ES6 style exports Adds support for ECMAScript 6 module exports during Javascript generation. This is useful as many development projects are switching to this new standard and away from custom module solutions. By integrating support into flatbuffers, users do not need to perform additional post-processing of generated files in order to use flatbuffers output directly in their codebases. Reference to ECMAScript 6 modules: https://www.ecma-international.org/ecma-262/6.0/#sec-exports Changes: * Added `--es6-js-export` option to cli parser tool * Added conditional code to generate a ES6 style export line, replacing the normal NodeJS/RequireJS line. * Fixed missing export statements Added exports for definition and struct names that were not inside namespaces * Updated Compiler.md with new generator option Added entry to Compiler.md in docs for the `--es6-js-export` flag, including a brief description of the effects and usefulness.
2018-05-18Add [Dart] support (#4676)Dan Field
* Add [Dart] support * fix enum vectors * Allow for opt out of string interning * fix comment style, make interning opt in * remove Offset<T>, prefer int * avoid creating unnecessary vtable objects * start work on tests - do not generate builder if struct has 0 fields - add int64 * support reading structs properly * correctly handle reading vectors of structs, dartfmt * support structs, fix unnecessary prepares * fix bool customizations * undo unintentional removal of file * docs updates, complete tutorial, bug fix for codegen * more documentation * Update docs, add to doxygen file * update package structure, add samples script/code * rearrange sample * Tests * Add readme for pub * cleanup package for pub * update docs for renamed file * remove custom matcher, use `closeTo` instead * remove unintentional file * remove unintended file checkin * use auto, move method, cleanup * refactor to ObjectBuilders, add Builders * Update tests, examples * Add files missing from previous commit * documentation and example updates * Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script * fix sample for slightly different schema * Update pubspec.yaml
2018-05-07Add --root-type option to flatc [C++, parser, JSON] (#4728)Paul Reimer
* Add --root-type option to flatc To select or override a root_type * Add help text from flatc --root-type to Compiler.md doc
2018-04-06An user-defined attribute name validation (#4689)Vladimir Glavnyy
* User-declared attribute should be either identifier or string with the identifier. * Attribute can be identifier or string in metadata.
2018-04-05Add FLATBUFFERS_ prefix to defines [C++] (#4695)Paul Reimer
* Rename STRUCT_END to add FLATBUFFERS_ prefix, now FLATBUFFERS_STRUCT_END. Via running `ag -l STRUCT_END | xargs rpl STRUCT_END FLATBUFFERS_STRUCT_END` * Rename MANUALLY_ALIGNED_STRUCT to add FLATBUFFERS_ prefix, now FLATBUFFERS_MANUALLY_ALIGNED_STRUCT. Via running `ag -l MANUALLY_ALIGNED_STRUCT | xargs rpl MANUALLY_ALIGNED_STRUCT FLATBUFFERS_MANUALLY_ALIGNED_STRUCT && cd tests && sh generate_code.sh` * Rename DEFINE_BITMASK_OPERATORS to add FLATBUFFERS_ prefix, now FLATBUFFERS_DEFINE_BITMASK_OPERATORS. Via running `ag -l DEFINE_BITMASK_OPERATORS | xargs rpl DEFINE_BITMASK_OPERATORS FLATBUFFERS_DEFINE_BITMASK_OPERATORS`
2018-04-05Missing TS links in docs (#4693)Kamil Rojewski
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible * Not returning null when creating vectors * Not returning null from struct contructors * Vector of unions for ts/js * Sanity check for languages * Indentation fix + output test files * Vectors of unions for php * Fixes to union vector handling + tests * Fix for strictPropertyInitialization * Fix for new aligned operator new for gcc >= 7.1 * Not generating imports/ns prefixes with --gen-all * TypeScript docs * Missing imports of enums * Missing TS links
2018-04-02Fix typos in C++ tutorial (#4685)David Stephan
CreateMonster and MonsterBuilder examples fixed for C++
2018-03-23TypeScript docs (#4680)Kamil Rojewski
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible * Not returning null when creating vectors * Not returning null from struct contructors * Vector of unions for ts/js * Sanity check for languages * Indentation fix + output test files * Vectors of unions for php * Fixes to union vector handling + tests * Fix for strictPropertyInitialization * Fix for new aligned operator new for gcc >= 7.1 * Not generating imports/ns prefixes with --gen-all * TypeScript docs
2018-01-22Fix the spell mistake (#4599)Li-Deng
2018-01-04Update URL (#4576)Darío Hereñú
2017-12-18update mutation status in doc (#4549)xgdgsc
2017-12-01this is allow custom allocator for obj-api structs/tables. (#4520)rmawatson
added "native_custom_alloc" attribute to tables/structs, eg. table parent_table( native_custom_alloc:"custom_alloc_name" ) { ... } with a custom allocator defined as template <typename T> class custom_alloc_name : public std::allocator<T> { public: typedef T* pointer; template <class U> struct rebind { typedef custom_alloc_name<U> other; }; pointer allocate(const std::size_t n) { return ....; } void deallocate(T* ptr, std::size_t n) { ... } custom_alloc_name() throw() {} template <class U> custom_alloc_name(const custom_alloc_name<U>&) throw() {} }; };
2017-11-17Document type aliases (#4499)MikkelFJ
2017-11-16fix typo (#4495)Dan Douglas
`Equipment` is a union, not an enum.
2017-11-16c++ Tutorial fix (#4494)Hong Wu
2017-11-16tutorial docs (#4492)David Komer
2017-11-06Text files should not have executable bit set (#4480)Sergey Avseyev
2017-10-09Spelling error in C# and Java documentation (#4454)Brian Chavez
2017-09-22Added support for mini-reflection tables.Wouter van Oortmerssen
Change-Id: I83453d074685fa57bbf1c7c87b1d9392ce972085 Tested: on Linux.
2017-09-07Update doc (#4427)rouzier
2017-08-14Noted that benchmarks are for C++Wouter van Oortmerssen
Change-Id: I12fbba7ffd2db47502a05eb06cedab49fd99c366
2017-08-14Explained GetRoot<Monster> vs GetMonster.Wouter van Oortmerssen
Change-Id: Ic302096c07551b5c1aff0b261a329c46964cf337
2017-08-14Further grammar.md fixes: union types, idents, string constants.Wouter van Oortmerssen
Change-Id: I51db0511c52c79f2b322a1fdef798b061941887b
2017-08-14Fixed up grammar.md with rpc's and new scalar types.Wouter van Oortmerssen
Change-Id: Ie2965f48810bf24cccf098b69a9d471583efc3bf
2017-08-14Internal doc (#4409)rouzier
* Add information about flexbuffer bool and null encoding * Fix spelling errors * Fix encoding example for flexbuffer map
2017-08-10Misc documentation fixes.Wouter van Oortmerssen
Change-Id: Id7be5baba7d8a11ca050e8d94d95857406690378
2017-08-07Linked to Mikkel's binary format documentation.Wouter van Oortmerssen
Change-Id: I5054e37833d59bbe925cac2000a453fbee8ef54b
2017-08-01[Python] (scalar) vector reading speedup via numpy (#4390)Kevin Rose
* Add numpy accessor to python flatbuffers scalar vectors * Update python tests to test numpy vector accessor * Update appveyor CI to run Python tests, save generated code as artifact * Update example generated python code * Add numpy info to python usage docs * Update test schema and python tests w/ multi-byte vector * did not mean to push profiling code * adding float64 numpy tests
2017-06-12Added nested FlexBuffer parsingWouter van Oortmerssen
Change-Id: I918b66eb5646d035e3aae675f745802eb54b03ea
2017-06-07[C++] Improve flatbuffers + gRPC integration (#4310)Lawrence Chan
* Rework flatbuffers + gRPC integration - Introduce `flatbuffers::grpc::Message<T>`, a `grpc_slice`-backed message buffer that handles refcounting and allows flatbuffers to transfer ownership to gRPC efficiently. This replaces `flatbuffers::BufferRef<T>`, which required a copy call and was also unsafe w.r.t. buffer lifetime. - Introduce `flatbuffers::grpc::MessageBuilder`, a gRPC-specific builder that forces a `grpc_slice`-backed allocator and also adds some helpful `Message<T>`-related methods. - Update serializers accordingly (now zero-copy between flatbuffers and gRPC). * gRPC: verify messages by default, but allow user to override * gRPC: fix some formatting issues * Disable verification by default, but add helper method * Make FlatBufferBuilder fields protected + remove vec accessor * Use bool add_ref parameter to toggle refcount incr * Remove unnecessary inline specifiers * Fix formatting * Use auto * Remove empty lines * Use grpc_slice helper macros * Simplify reset code * Disable Message copy ctor and assignment by default * Remove unused member * Enable gRPC verification by default * Use auto * Bake in message verification (remove template specialization) * Add RoundUp func * Consolidate gRPC message copy flag * Make vector_downward allocations fully lazy * Test message verification failure code/message * Add grpctest verification test comments * Simplify reallocate implementation * Make initial_size a size_t * Use ternary op for growth_policy * Use truthiness rather than dont explicit nullptr check * Indent preprocessor directives * Remove grpc message copy/assignment * Fix a few bugs * Add gRPC example * Add basic gRPC docs * Use doxygen EXAMPLE_PATH + @include * Reference example fbs in grpc docs * Move gRPC examples into grpc/samples * Fix pointer/reference formatting * Use std::function rather than templated callback func * Create fresh message builder for each request * Use Clear() in Reset() impl * Use FLATBUFFERS_CONSTEXPR
2017-05-22Some code in the samples and docs still used old C# API.Wouter van Oortmerssen
Change-Id: I7914c88ad7b31baa7586771423069dc2b90d534f Tested: on Linux.
2017-05-15Updated tutorial with a vector of structs example.Wouter van Oortmerssen
Since it wasn't documented and very different from a vector of tables, this has caused a lot of confusion in the past. Change-Id: Iab47c61b55c19abe5c4f25c86d71335a6b6321ca
2017-05-10Added --keep-prefix to not strip schema include path in C++ includes.Wouter van Oortmerssen
Change-Id: I3c6356fc6664072796f273096df64829108b4a34 Tested: on Linux.
2017-05-10Fixed LookupByKey for Java & C#Wouter van Oortmerssen
Change-Id: I05c02223675dee241d1ae8cb466e5186444058c8 Tested: on Linux.
2017-04-12Added support for structs and strings in unions.Wouter van Oortmerssen
(C++ only for now). Also fixed vector of union support in the object API. Bug: 36902939 Change-Id: I935f4cc2c303a4728e26c7916a8ec0adcd6f84cb Tested: on Linux.