- Feb 15, 2018
-
-
Dmitry Volosnykh authored
-
- Feb 12, 2018
-
-
Kamil Rojewski authored
* 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
-
- Dec 21, 2017
-
-
Yuri Finkelstein authored
* grpc bindings generator for Java and a few minor supporting changes in improvements * restored formatting before my previous changes for ease of review * Fixed grpc java code generation bug resulting in duplicate extractor declarations in case the same is used in more than a single RPC method
-
Yuri Finkelstein authored
* updateed cpp_generator.cc to be compatible with the latest grpc version * preserved the original license * synchronized grpc cpp_generator with latest version as of today: GRPC 1.8.1. Regenerated test/monster_test.grpc.fb.* files and verified that grpctest is nicely passing * fixed merge glitch
-
- Nov 30, 2017
-
-
Bastien Brunnenstein authored
-
- Nov 20, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I9cf9fe1e2572d3f9c4066624a87249ca1e62a297
-
- Nov 16, 2017
-
-
red1939 authored
Each target that will be installed will also generate a target that will be included by CMake config file.
-
- Nov 09, 2017
-
-
Sergey Avseyev authored
-
- Nov 06, 2017
-
-
Sergey Avseyev authored
-
Lawrence Chan authored
-
- Oct 20, 2017
-
-
Alex Ames authored
-
- Sep 22, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I83453d074685fa57bbf1c7c87b1d9392ce972085 Tested: on Linux.
-
- Jul 20, 2017
-
-
Stewart Miles authored
* Added internal - limited - implementation of flatbuffers::unique_ptr for STLs that don't ship with std::unique_ptr. In C++11 and beyond this is just an alias for std::unique_ptr. * Aliased used type traits structs is_scalar is_floating_point is_unsigned into flatbuffers namespace so they can be replaced in C++98 implementations. Right now these point at stlport's TR1 implementations. * Wrapped vector::data() in vector_data(). * Wrapped vector::emplace_back() in vector_emplace_back(). * Wrapper string::back() in string_back(). * Added variants of FlatBufferBuilder::CreateVector() and FlatBufferBuilder::CreateVectorOfStructs() that allow the use of plain function pointers. Generated code has also been modified to use plain functions to build objects rather than std::function() so all generated code will work in C++98 applications. * Added flexbuffers::Builder::Vector(), flexbuffers::Builder::TypedVector() and flexbuffers::Builder::Map() methods that allow the use of plain function pointers. * Changed Parser to internally use plain function pointers when parsing table and vector delimiters. * Added specializations of NumToString() for 64-bit types that aren't supported by stringstream in stlport. * Overloaded numeric_limits for 64-bit types not supported by stlport. * Replaced build_apk.sh (which was broken by deprecation of the "android" tool in the Android SDK) with build.gradle and the appropriate gradle wrapper to build an APK. * Switched Android build to build against all STL variants. * Updated travis configuration to build Android test and sample. Tested: * Verified all tests continue to work on Linux, OSX and Android. * Verified Travis build is green. Change-Id: I9e634363793f85b9f141d21454b10686020a2065
-
- Jul 10, 2017
-
-
schoetbi authored
* Added empty generator for json schema (idl_gen_json_schema.cpp) #4360 * JsonSchemaGenerator: output of tables implemented current problems: - typenames are not correct - array types need to be deduced #4360 * JsonSchemaGenerator: Corrected generation of typenames Current problems: enum types not written correctly #4360 * JsonSchemaGenerator: Added generation of enum types #4360 * idl_gen_json_schema.cpp: Write required properties to schema #4360 * idl_gen_json_schema.cpp: Export Types including namespace #4360 * idl_gen_json_schema.cpp: Fixed Json format #4360 * idl_gen_json_schema.cpp: Formatted according to google code style #4360 * Checked in monster_test.bfbs with changes from master * Added idl_gen_json_schema.cpp in CMakeLists.txt * generate_code.bat: Added generation of json schema * Added todo.md * generate_code.sh: Added generation of json schema * Addressed some review issues - removed command line arg -S - removed new lines - fixed codestyle in template functions - removed usage of stringstream - idented json schema #4360 * removed auto in idl_gen_json_schema.cpp * idl_gen_json_schema.cpp: changed iterator declarations to auto #4360 * deleted todo.md * idl_gen_json_schema.cpp: Removed keyword "override" so that vs2010 can compile * idl_gen_json_schema.cpp: switch statement in GenType handeles all enum-members * idl_gen_json_schema.cpp: Removed cerr output * idl_gen_json_schema.cpp: Avoid vector copying * idl_gen_json_schema.cpp: Fixed identation of json schema output * idl_gen_json_schema.cpp: Do not output empty descriptions
-
- Jun 16, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I9d71375059369fbc538d0d051d8d2885e467bf29 Tested: on Mac OS X.
-
- Jun 07, 2017
-
-
Lawrence Chan authored
* 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
-
- May 24, 2017
-
-
Wouter van Oortmerssen authored
Changing to keep include prefixes had two side effects: the main file being parsed wasn't filtered out anymore, and include directory paths would be added to the path in the include statement. Also moved the include_test*.fbs files to sub directories so we can actually test the handling of -I etc. tested: on Linux. Change-Id: Ibae095cea7ab0cccbac15cfb5171719f6b5cad8c
-
- May 12, 2017
-
-
Per Grön authored
* Don't fail the build on unused parameters gRPC headers have unused parameters so this breaks the test build. * Pull in updated compiler files from gRPC There have been some API breaks in gRPC lately. This commit pulls in the most recent version of the files in this repo that are just copied from gRPC. * Modify the gRPC files so that they can work with Flatbuffers The files taken from gRPC do not work out-of-the-box with Flatbuffers. This commit modifies them so that they work. Hopefully this commit will be able to serve as a guide or maybe even be cherry-picked on top of new versions of those files as newer versions from gRPC are pulled in. * Adjust the rest of Flatbuffers to work with the new gRPC * Change idl_gen_grpc.cpp to work with the new API * Add missing #include in flatbuffers/grpc.h * Run tests/generate_code.sh and check in the results * Don't link with grpc++_unsecure and (secure) grpc. That's just weird * Revert unrelated JS/TS test changes * Simplify compiler/config.h There is no need to import this file from gRPC. In fact, it probably makes sense to not do so, since it seems to be intended to have project specific configuration in it. * Don't emit C++ types in the Go gRPC code generator * Don't emit C++ #includes in generated gRPC code Before this PR, there was a Go-specific additional_includes method in schema_interface.h, which is shared with the gRPC repo. The additional parameter to FlatBufFile in idl_gen_grpc.cpp makes that unnecessary, which means we need less Flatbuffer-specific changes in gRPC.
-
- May 10, 2017
-
-
Wouter van Oortmerssen authored
-
- Apr 24, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I23280e611163a89b8eba7b9b0016c297fea2396e
-
- Mar 29, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I4f66a96ba581704c1a384cc700b8fb731d3eeed4
-
- Mar 10, 2017
-
-
chronoxor authored
* Pedantic Visual Studio build (/W4 /WX) * Pedantic Visual Studio build (/W4 /WX) * Pedantic Visual Studio build (/W4 /WX) * Remove /wd4512 from CMakeLists.txt * Suppress Visual Studio 4512 warning ('class' : assignment operator could not be generated)
-
- Feb 26, 2017
-
-
Andrei Lebedev authored
-
- Feb 16, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: Ib75b4cc651ac8f67cd262c8293fca1ac590f6b71
-
- Feb 08, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I86b9d002f3441ef9efdb70e059b8530ab2d74bb8 Tested: on Linux.
-
- Jan 25, 2017
-
-
Wouter van Oortmerssen authored
Change-Id: I71baff427243f96be1596b01ff3405fdf39386d7
-
- Jan 14, 2017
-
-
Wouter van Oortmerssen authored
Helps simplify code generation code. Instead of this: code += "inline const " + cpp_qualified_name + " *Get"; code += name; code += "(const void *buf) {\n return flatbuffers::GetRoot<"; code += cpp_qualified_name + ">(buf);\n}\n\n"; You do this: code.SetValue("NAME", struct_def.name); code.SetValue("CPP_NAME", cpp_qualified_name); code += "inline const {{CPP_NAME}} *Get{{NAME}}(const void *buf) {"; code += " return flatbuffers::GetRoot<{{CPP_NAME}}>(buf);"; code += "}"; code += ""; Updated the CPP code generator to use the CodeWriter class. Most of the changes in the generated code are white-space changes, esp. around new lines (since the code generator class automatically appends new lines when appending a string). Actual code changes include: * Renamed "rehasher" to "_rehasher" for consistency with other args in Pack function. * Renamed "union_obj" to "obj: in UnPack function. * Always do "(void)_o;" to prevent unused variable warning in Create function (instead of only doing it if there are no fields) in order to avoid two-passes. * Renamed padding variables from __paddingX to paddingX__. "Each name that contains a double underscore (_ _) [...] is reserved to the implementation for any use." C++ standards 17.4.3.1.2. * Add braces around switch cases. * Calculate index as a separate statement in EnumName function, eg. const size_t index = ...; return EnumNamesX()[index]; vs. return EnumNamesX()[...]; * Stored end table offset in variable in Finish() functions, eg. const auto end = fbb_.EndTable(start_, ...); auto o = flatbuffers::Offset<T>(end); vs. auto o = flatbuffers::Offset<T>(fbb_.EndTable(start, ...)); * Separate reinterpret_cast calls from function calls in Union functions, eg. auto ptr = reinterpret_cast<const T *>(obj); return ptr->UnPack(resolver); vs. return reinterpret_cast<const T *>(obj)->UnPack(resolver); * Removed unecessary (void)(padding__X) no-ops from constructors, eg. Test(int16_t a, int8_t b) : ... { (void)__padding0; // <-- Removed this line. } In the idl_gen_cpp.cpp file itself, I refactored some code generation into new functions: GenParam, GenNativeTable, GenVerifyCall, GenBuilders, GenUnpackFieldStatement, and GenCreateParam. Change-Id: I727b1bd8719d05b7ce33cbce00eb58fda817b25d
-
- Dec 16, 2016
-
-
Zarian Waheed authored
* Changes for verifying a buffer dynamically using reflection. * Fixing build issues on linux and applied code reformatting. * Fixing the file order in cmake file that was messing up the macro based code inclusion. Added tests for reflection based verification. * Changes for verifying a buffer dynamically using reflection. Fixing build issues on linux and applied code reformatting. Fixing the file order in cmake file that was messing up the macro based code inclusion. Added tests for reflection based verification. * Incorporated the code review changes that were requested: 1. Changed the Verify function signature. 2. Changed the variable names to use snake_case. 3. Added better comments. 4. Refactored duplicate code. 5. Changed the verifier class so that it has the same size when compiled with or without FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE macro. * Setting FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE and FLATBUFFERS_DEBUG_VERIFICATION_FAILURE through cmake for flattests so that it gets propagted to all translation units of flattests. * Making the Verifier struct fields the same in all cases. Also reverting the target_compile_definitions change in cmake file because build machine on travis does not have cmake version 3.0 or higher which was the version when target_compile_definitions was added in cmake. * Defining macros through cmake in a portable way using functions that are available in cmake 2.8.
-
- Dec 05, 2016
-
-
Ronak Jain authored
* support for grpc golang * refactored grpc go generator * added grpc-go test and refactored * refactored idl_gen_grpc.cpp * fixed grpc generate method name * refactored flatc and fixed line length issue * added codec to go lib and fixed formatting issues * fixed spacing issues
-
- Oct 17, 2016
-
-
Wouter van Oortmerssen authored
Tested on Linux. Change-Id: Ie18d6857f9ae8b1c3953a116203b4a8bb70a2ede
-
- Oct 05, 2016
-
-
Andrew Hundt authored
Resolves #4038 Related to https://github.com/ruslo/hunter/pull/529
-
- Sep 09, 2016
-
-
Jason Sanmiya authored
Cmake issued a warning when the variable is in quotation marks in an if statement. Visual Studio upgrades constants to int and issues a truncation warning, so inserted a cast. Change-Id: I60cdcb5c2565cd5e97f80b9c2ff1e6abc32b1deb Tested: Builds without warning on VS2015.
-
- Sep 06, 2016
-
-
changnet authored
-
- Aug 24, 2016
-
-
Vitaly Isaev authored
-
Harsh Vardhan authored
-
- Jul 26, 2016
-
-
Jason Sanmiya authored
The new line in the set(CMAKE_CXX_FLAGS...) line was getting insert verbatim into the Makefile. Makefiles don't like new lines in their assignment operators. The newline escape fix works for CMake 3.0 and above, but since we support 2.x, we need to use the legacy solution, which is to split into two separate statements. Tested: cmake -G"Unix Makefiles" works now on Mac. Change-Id: I6f4655981b85087c4760c3d26ed0c97c4469ba93
-
- Jul 22, 2016
-
-
Wouter van Oortmerssen authored
-
- Jul 20, 2016
-
-
Wouter van Oortmerssen authored
Change-Id: If927f3ea3fb3723088fa287f24bdd1ad43c8d1d1 Tested: on Linux.
-
- Jul 01, 2016
-
-
吴凡 authored
-
- Jun 29, 2016
-
-
Wouter van Oortmerssen authored
Also added simple (in-process) test. Change-Id: I38580d554dd52f590e3396ec4846e07546dcf07d Tested: on Linux.
-