- Sep 12, 2016
-
-
Alberto Fernández authored
-
- Sep 01, 2016
-
-
Wouter van Oortmerssen authored
-
- Aug 26, 2016
-
-
Wouter van Oortmerssen authored
Change-Id: Ice94f09197235cf71b41a22d0767bd7b119284e1
-
Wouter van Oortmerssen authored
Tested: on Linux. Change-Id: Iea336f75a3b6e722743563813c3c9ed9db4d02fe
-
TGIshib authored
-
- Aug 22, 2016
-
-
TGIshib authored
-
- Aug 21, 2016
-
-
rw authored
Fixes #3986
-
- Aug 14, 2016
-
-
TGIshib authored
-
- Aug 03, 2016
-
-
TGIshib authored
-
- Aug 02, 2016
-
-
gonzaloserrano authored
Enums are not fixed because depending on they have comments or not they will be aligned alogn the asssignment character.
-
- Jul 26, 2016
-
-
Kazuki Sakamoto authored
Tested: on Darwin
-
- Jul 20, 2016
-
-
Muhammed Thanish authored
-
- Jul 15, 2016
-
-
lakedaemon authored
-
- Jun 20, 2016
-
-
Wouter van Oortmerssen authored
Also fixed most codegenerators using the wrong namespace when multiple namespace were used in a file, with some files not being generated. Change-Id: Ib42969221239d7244e431cbd667ef69200fc415f Tested: on Linux. Bug: 29338474
-
- Jun 15, 2016
-
-
Wouter van Oortmerssen authored
Bug: 29337887, 29336299 Change-Id: Iad8b3b2263f6cea7ee7e45994369194960df293b Tested: on Linux.
-
- Jun 14, 2016
-
-
Dan Ring authored
-
- May 26, 2016
-
-
lakedaemon authored
-
- Apr 20, 2016
-
-
Wouter van Oortmerssen authored
Change-Id: I8dcbb5e93836356511d411ef86452babd3dd3c0b Tested: on Linux.
-
- Apr 18, 2016
-
-
Wouter van Oortmerssen authored
A previous commit that added "f" for C++/Java/C# would break on gcc of constants like 3f, which are now output as 3.0f Tested: on Linux Change-Id: If9cabbe3c6d6948a5050b8b123bda9c06e181f52
-
- Apr 14, 2016
-
-
Wouter van Oortmerssen authored
Bug: 28145201 Change-Id: I5a1818c40c2f4fbd00cfec3362040407976f7a39 Tested: on Linux.
-
- Mar 29, 2016
-
-
Armen Baghumian authored
Currently in order to get a value type of [ubyte] in PHP, iteration is necessary which is not efficient. Helper __vector_as_bytes has been implemented in order to return the byte arrays in PHP efficiently. Appropriate methods also been added to use aforementioned method to return the byte array. (e.g. get*Bytes()). The reason the methods are named get*Bytes() and not for instance get*ByteArray() is the fact that PHP doesn't support byte arrays and the binary safe string implementation in PHP is used to simulate byte arrays and since there is chance for PHP users to confuse this with PHP arrays the name get*Bytes() has been chosen. In the future __vector_as_bytebuffer() method can also be implemented to return PHP implementation of ByteBuffer.
-
- Jan 21, 2016
-
-
Oli Wilkinson authored
Added support for C# partial class generation when the `csharp_partial` attribute is used on a table/struct.
-
- Jan 18, 2016
-
-
Oli Wilkinson authored
-
- Dec 17, 2015
-
-
Shuhei Tanuma authored
-
- Dec 04, 2015
-
-
Michael Collins authored
I updated idl_gen_general.cpp to add support for generating a Get Bytes method for a vector to the generated C# source code. Given a byte vector field named Foo, a method named GetFooBytes() will be generated in the C# source code that will return an ArraySegment<byte> value referencing the vector data in the underlying ByteBuffer. I added a method to Table.cs named __vector_as_arraysegment that is used by the code generated by the change to the C# generator. __vector_as_arraysegment will take the offset of the vector and will return the ArraySegment<byte> value corresponding to the bytes that store the vector data. I updated FlatBuffersExampleTests.cs to add tests to validate my implementation of Table.__vector_as_arraysegment. I added tests to demonstrate that the bytes for the monster's name can be extracted from the underlying byte array. I also added tests to show that Table.__vector_as_arraysegment returns a null value if the vector is not present in the FlatBuffer. I used the updated flatc.exe program to regenerate the C# source files for the MyGame example. The new Monster class includes the GetXXXBytes methods to return the byte arrays containing data for vectors.
-
- Nov 23, 2015
-
-
Donnell authored
Fixes a bug where the logic to determine when to use a C# enum flags both enums and vectors of enums. This causes the C# generator to generate code that doesn't compile for tables that contain vectors of enums. The fix also consolidates type generation functions a bit and adds some additional casting functions for clarity.
-
- Nov 17, 2015
-
-
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.
-
Shuhei Tanuma authored
``` namespace MyGame; enum CommandType : byte { None = 0, } table Command { id:int; type:CommandType; } ``` then generate c# files. it'll output compile error like these. ``` Assets/MyGame/Command.cs(18,39): error CS1041: Identifier expected Assets/MyGame/Command.cs(18,39): error CS1737: Optional parameter cannot precede required parameters 16: public static Offset<Command> CreateCommand(FlatBufferBuilder builder, 17: int id = 0, 18: CommandType type = (CommandType)0) { ```
-
- Oct 29, 2015
-
-
Wouter van Oortmerssen authored
Also simplified the code and made it faster. Change-Id: I1d83b1165a4a9a4380d1bfb5538769c012d2d367 Tested: on Linux.
-
- Oct 13, 2015
-
-
Wouter van Oortmerssen authored
Change-Id: I6600021b7ec8c486794349511232c3e604421c5b Tested: on Linux.
-
- Aug 19, 2015
-
-
Maxim Zaks authored
Change-Id: I3cdd801b641bf180222203a37634598350d340e3
-
- Aug 15, 2015
-
-
Maor Itzkovitch authored
-
- Aug 12, 2015
-
-
Wouter van Oortmerssen authored
Change-Id: I800119d8fe19f4c3e95772aba629ef8b2deb9e4b
-
- Aug 11, 2015
-
-
Mormegil authored
When creating a CreateXxx(...) method for a simple table type, enum-type fields with a non-zero default must have an explicit cast for the respective argument default value, because in C#, there is an implicit cast from int to an enum only for 0. Also, added an example of such type into the example monster_test type, so that we test this feature.
-
- Aug 07, 2015
-
-
Maor Itzkovitch authored
-
- Aug 01, 2015
-
-
Maor Itzkovitch authored
-
Maor Itzkovitch authored
-
- Jul 28, 2015
-
-
RevenantX authored
-
- Jul 13, 2015
-
-
Maor Itzkovitch authored
-
Maor Itzkovitch authored
-