- 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.
-
- May 01, 2016
-
-
Xiaolei Yu authored
-
- Apr 13, 2016
-
-
Lakedaemon authored
-
- Apr 04, 2016
-
-
Wouter van Oortmerssen authored
to allow for custom file loaders. The targeted use case is android runtime. (from CL 116980408) Change-Id: I8785c0acf714fab41d8f6fc9f1c52875423b8f5b
-
- Apr 02, 2016
-
-
Tony Kelman authored
use -std=gnu++11 instead of c++0x on cygwin to avoid error: realpath was not declared in this scope ref http://www.cygwin.com/ml/cygwin/2016-03/msg00005.html
-
- Mar 14, 2016
-
-
Will Gardner authored
Certain architectures, such as ARM, use unsigned chars by default so require the `-fsigned-char` for certain value comparisons to make sense and in order to compile.
-
- Mar 03, 2016
-
-
Yuri authored
-
- Feb 11, 2016
-
-
maurice barnum authored
-
- Jan 19, 2016
-
-
Rene Fichter authored
-
- Dec 21, 2015
-
-
Wouter van Oortmerssen authored
This to allow the code to run on a greater range of build configurations (that don't allow exceptions/RTTI). If anyone ever doubts the usefulness of exception handling, please show them this commit. Change-Id: If7190babdde93c3f9cd97b8e1ab447bf0c81696d Tested: on Linux.
-
- Dec 02, 2015
-
-
Perry Hung authored
Simply running clang with -stdlib=libc++ requires a manual link against libc++abi on Linux. This is documented in the libc++ documentation: http://libcxx.llvm.org/ Tested on Arch Linux, using clang 3.7.0 RELEASE. Signed-off-by:
Perry Hung <iperry@gmail.com>
-
Wouter van Oortmerssen authored
Change-Id: I17de0bcc462770124227a9967e2aab620467f6eb Tested: on Linux.
-
- Dec 01, 2015
-
-
Perry Hung authored
Simply running clang with -stdlib=libc++ requires a manual link against libc++abi on Linux. This is documented in the libc++ documentation: http://libcxx.llvm.org/ Tested on Arch Linux, using clang 3.7.0 RELEASE. Signed-off-by:
Perry Hung <iperry@gmail.com>
-
- Nov 26, 2015
-
-
Wouter van Oortmerssen authored
Change-Id: I17de0bcc462770124227a9967e2aab620467f6eb Tested: on Linux.
-
- Nov 17, 2015
-
-
Johan Euphrosine authored
So that it could be included from both flatbuffers CMakeLists.txt and FindFlatBuffers.cmake. Change-Id: Ie16a879beef9367cd6fd9b2d2157044841a7cdbc
-
Shuhei Taunma authored
* codegen for all basic features: WIP (probably implemented all basic feature) * JSON parsing: NO * Simple mutation: NO * Reflection: NO * Buffer verifier: NO (will be add later) * Testing: basic: Yes * Testing: fuzz: Yes * Performance: Not bad * Platform: Supported Linux, OS X, Windows (has 32bit integer limitation) * Engine Unity: No flatc --php monster_test.fbs <?php //include neccessary files. $fbb = new Google\FlatBuffers\FlatBufferBuilder(1); $str = $fbb->createString("monster"); \MyGame\Example\Monster::startMonster($fbb); \MyGame\Example\Monster::addHp($fbb, 80); \MyGame\Example\Monster::addName($fbb, $str); $mon = \MyGame\Example\Monster::endMonster($fbb); $fbb->finish($mon); echo $fbb->sizedByteArray(); PHP 5.4 higher Currently, we do not register this library to packagist as still experimental and versioning problem. If you intended to use flatbuffers with composer. add repostiories section to composer.json like below. "repositories": [{ "type": "vcs", "url": "https://github.com/google/flatbuffers" }], and just put google/flatbuffers. "require": { "google/flatbuffers": "*" } * PHP's integer is platform dependant. we strongly recommend use 64bit machine and don't use uint, ulong types as prevent overflow issue. ref: http://php.net/manual/en/language.types.integer.php * php don't support float type. floating point numbers are always parsed as double precision internally. ref: http://php.net/manual/en/language.types.float.php * ByteBuffer is little bit slow implemnentation due to many chr/ord function calls. Especially encoding objects. This is expected performance as PHP5 has parsing arguments overhead. probably we'll add C-extension. Basically, PHP implementation respects Java and C# implementation. Note: ByteBuffer and FlatBuffersBuilder class are not intended to use other purposes. we may change internal API foreseeable future. PSR-2, PSR-4 standards. Implemented simple assertion class (respect JavaScript testcase implementation) as we prefer small code base. this also keeps CI iteration speed. we'll choose phpunit or something when the test cases grown.
-
- Nov 14, 2015
-
-
Jon Simantov authored
This allows you to query the generated target for those properties later, so dependent modules can refer to the directories to, for example, add them to the include_directories. Change-Id: I7a6bd34c5c1d08e2ea69b5ad845223297cad1159
-
Jon Simantov authored
This function is designed to be called by projects that use FlatBuffers. It takes a list of FlatBuffers schemas and a list of schema include directories, and generates build rules to create generated headers and/or binary schemas for those files, as well as optionally copying all of the text schemas into a directory for your use (for example if you need to parse text schemas within your app). See function comments for more details. Change-Id: I181684b916e91d965e14849d8f83ec2c83e9a4a4
-
- Oct 15, 2015
-
-
Evan Wallace authored
This adds a JavaScript language target. The generated JavaScript uses Google Closure Compiler type annotations and can be compiled using the advanced compilation mode, which performs type checking and optimizations such as inlining and dead code elimination. The generated JavaScript also exports all generated symbols for use with Node.js and RequireJS. This export behavior can be turned off with the --no-js-exports flag for use with Google Closure Compiler.
-
- Aug 03, 2015
-
-
Wouter van Oortmerssen authored
e.g. support generic reading/writing from structs/vectors etc. Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d Tested: on Linux. Bug: 22660837
-