platform/upstream/flatbuffers.git
9 years agoChange nested_root accessor to be const function.
Hyungjin Kim [Tue, 10 Feb 2015 06:42:38 +0000 (15:42 +0900)]
Change nested_root accessor to be const function.

The `<field>_nested_root()` is not viable from const object. (We usually get `const Monster *`.)

Change-Id: I0d0adcb38dd974318608417ee3094c34fb9c480d

9 years agoMerge "Call $(strip) on parameters so newlines work." into ub-games-master
Alex Ames [Tue, 10 Feb 2015 00:56:54 +0000 (00:56 +0000)]
Merge "Call $(strip) on parameters so newlines work." into ub-games-master

9 years agoCall $(strip) on parameters so newlines work.
Alex Ames [Mon, 9 Feb 2015 23:18:38 +0000 (15:18 -0800)]
Call $(strip) on parameters so newlines work.

Added a call to $(strip) to the parameters of
`flatbuffers_header_build_rules` so that newlines can be used when
passing arguments to it.

Change-Id: Ie2149acebcef91d28ce2cb4bfd204a209b4c4e2f

9 years agoAdded biicode support via biicode.conf and CMake/biicode.cmake
franramirez688 [Sat, 31 Jan 2015 16:14:59 +0000 (11:14 -0500)]
Added biicode support via biicode.conf and CMake/biicode.cmake

Change-Id: Id9750cceaa57aad3c969cf12299aa60f21c29074

9 years agoMerge "Clarified how to create a good pull request." into ub-games-master
Wouter van Oortmerssen [Mon, 9 Feb 2015 21:56:55 +0000 (21:56 +0000)]
Merge "Clarified how to create a good pull request." into ub-games-master

9 years agoMerge "Reset minimum alignment when reusing FlatBufferBuilder" into ub-games-master
Wouter van Oortmerssen [Mon, 9 Feb 2015 17:16:37 +0000 (17:16 +0000)]
Merge "Reset minimum alignment when reusing FlatBufferBuilder" into ub-games-master

9 years agoMerge "added reuse option for root objects" into ub-games-master
Wouter van Oortmerssen [Mon, 9 Feb 2015 17:16:18 +0000 (17:16 +0000)]
Merge "added reuse option for root objects" into ub-games-master

9 years agoClarified how to create a good pull request.
Wouter van Oortmerssen [Wed, 4 Feb 2015 23:50:02 +0000 (15:50 -0800)]
Clarified how to create a good pull request.

Updated CONTRIBUTING.md with some tips.

Change-Id: Id377621a98804293837fda25ef0758cf988eea37

9 years agoMerge "Added new Android build target and makefile utils." into ub-games-master
Alex Ames [Wed, 4 Feb 2015 23:49:25 +0000 (23:49 +0000)]
Merge "Added new Android build target and makefile utils." into ub-games-master

9 years agoReset minimum alignment when reusing FlatBufferBuilder
Wouter van Oortmerssen [Wed, 4 Feb 2015 23:30:47 +0000 (15:30 -0800)]
Reset minimum alignment when reusing FlatBufferBuilder

Previously, if you were re-using instances of FlatBufferBuilder
and an earlier buffer would use a 64bit item where later ones
do not, you could be wasting space.

Change-Id: Ic8090a38f97ce73194e991ba72bcfae74a7ace9f
Tested: on Linux.

9 years agoadded reuse option for root objects
Florian Enner [Fri, 30 Jan 2015 22:09:59 +0000 (17:09 -0500)]
added reuse option for root objects

getRootAs..() function now has a second implementation that
accepts an existing object to allow object reuse, much like
all other methods that refer to objects.

Change-Id: Iffef567c903a130761ef7de98867e5465d29a04d

9 years agoAdded new Android build target and makefile utils.
Alex Ames [Mon, 26 Jan 2015 22:51:01 +0000 (14:51 -0800)]
Added new Android build target and makefile utils.

Previously Android.mk only had a rule for the Flatbuffers test. There
is now an empty module definition so that flatbuffers can be included
as an Android module in other projects.

Additionally, android/jni/include.mk has been added which contains
some utility functions that can be used by projects using Flatbuffers
to generate header build rules and set up dependencies.

A sample project has been added to the samples directory to
demonstrate how to use flatbuffers with Android.

Tested by compiling Android project on Linux.

Change-Id: I25d6da40f6531777b22f7371187e0a2f4e903ad4

9 years agoIssue #136
pjulien [Sat, 31 Jan 2015 16:14:59 +0000 (11:14 -0500)]
Issue #136

The satellite data of the ``ByteBuffer`` cannot be modified in
any way and stay thread safe in the presence of concurrent readers.

This implementation is simple and does introduce an allocation, however
without it multiple readers will quickly and continuously encounter
``IndexOutOfBoundsException`` exceptions.

An alternative, but possibly more controversial, implementation would
be to use ``Unsafe``.  Using ``Unsafe``, it's possible to do an
array copy with a provided buffer index.

Change-Id: I851d4034e753b3be2931ee2249ec2c82dde43135

9 years agoAdded force-defaults to Java bindings
Florian Enner [Thu, 29 Jan 2015 04:06:11 +0000 (23:06 -0500)]
Added force-defaults to Java bindings

Change-Id: I62d10b639112788be3b0f670280bd50ef9fcf094

9 years agoAdded FlatBufferBuilder reuse
Florian Enner [Thu, 29 Jan 2015 04:32:41 +0000 (23:32 -0500)]
Added FlatBufferBuilder reuse

init resets internal variables, but keeps memory that has been allocated
for temporary storage

Change-Id: If2aa7d27de3c2717cf4c82b1e4e4b6732e495cea

9 years agoAdded "raw struct" results to benchmark.
Wouter van Oortmerssen [Sat, 31 Jan 2015 00:52:22 +0000 (16:52 -0800)]
Added "raw struct" results to benchmark.

Change-Id: I95c550df7019645b02417259522c7049865997cc
Tested: on Windows.

9 years agoMerge "Add options to print build rule dependencies" into ub-games-master
Gabriel Martinez [Mon, 2 Feb 2015 16:59:14 +0000 (16:59 +0000)]
Merge "Add options to print build rule dependencies" into ub-games-master

9 years agoAdd options to print build rule dependencies
Gabriel Martinez [Tue, 4 Nov 2014 18:00:56 +0000 (10:00 -0800)]
Add options to print build rule dependencies

Tested: on Linux

Bug: 16465909
Change-Id: I2f1a6def13e47716110426b00990c2c625c03251

9 years agoFix for previous Java commit.
Wouter van Oortmerssen [Mon, 26 Jan 2015 22:12:20 +0000 (14:12 -0800)]
Fix for previous Java commit.

optimization would cause vtable fields from previous tables to be written.

Bug: 19046968
Change-Id: I781f7bcbceeaec0b499d4f1e4e5e8a1e750e0707
Tested: on Linux.

9 years agoApplied Java namespace filename fix to Go.
Wouter van Oortmerssen [Mon, 26 Jan 2015 21:45:33 +0000 (13:45 -0800)]
Applied Java namespace filename fix to Go.

Bug: 19067493
Change-Id: Ib32fef963306e27834c15e3bbabc60570924c1a9
Tested: on Linux.

9 years agoReducing garbage produced by Java serializer.
Wouter van Oortmerssen [Thu, 22 Jan 2015 00:43:50 +0000 (16:43 -0800)]
Reducing garbage produced by Java serializer.
startObject() now only allocates a new vtable array when it needs to grow.

Tested: on Linux.

Change-Id: Idd041605afcb9487a34d63bda067172d797f437a

9 years agoFixed flatc not writing Java files without namespace.
Wouter van Oortmerssen [Wed, 21 Jan 2015 22:53:41 +0000 (14:53 -0800)]
Fixed flatc not writing Java files without namespace.

If the schema didn't contain a namespace, paths would contain a
leading /, causing files not to be written.

Change-Id: I508772cbf6d18d464ef7d9f8842d0dbff14358a3
Tested: on Linux.
Bug: 19067493

9 years agoPR for issue #130. Improves the javadoc of ``FlatBufferBuilder``
pjulien [Sun, 18 Jan 2015 20:49:10 +0000 (15:49 -0500)]
PR for issue #130.  Improves the javadoc of ``FlatBufferBuilder``
and marks ``dataStart`` deprecated.

Change-Id: I48409e20948117c5cf17a1bfabecf64b033eab27

9 years agocursor_ is not directly represent the hexadecimal
Hiroshi Matsunaga [Thu, 8 Jan 2015 18:38:14 +0000 (03:38 +0900)]
cursor_ is not directly represent the hexadecimal

Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f

9 years agoSupport for booleans in the Java/C# API
Wouter van Oortmerssen [Sat, 17 Jan 2015 01:48:51 +0000 (17:48 -0800)]
Support for booleans in the Java/C# API

Change-Id: I72e92183a7b5f4145ea51fcec29257dc9553a461

9 years agoParser will allow a table or vector to have a trailing comma.
Wouter van Oortmerssen [Sat, 17 Jan 2015 00:57:04 +0000 (16:57 -0800)]
Parser will allow a table or vector to have a trailing comma.

Unless in --strict-json mode.
Also added strict_json option to the parser, which in
addition controls if field names without quotes are allowed.

Change-Id: Id56fe5c780bdb9170958050ffa8fa23cf2babe95
Tested: on Linux.

9 years agoFixed C# SizedByteArray copying leading bytes of ByteBuffer.
Wouter van Oortmerssen [Fri, 16 Jan 2015 23:35:48 +0000 (15:35 -0800)]
Fixed C# SizedByteArray copying leading bytes of ByteBuffer.

Tested: on Windows.

Change-Id: I946dacf799eae835ec041ea759622f74b0384937

9 years agoAdd a simple Maven file modeled after
Patrick Julien [Sat, 10 Jan 2015 23:13:37 +0000 (18:13 -0500)]
Add a simple Maven file modeled after

https://github.com/google/protobuf/blob/master/java/pom.xml

This isn't good enough to publish to Maven Central but will at
least allow users to publish to their local maven repository
using 'mvn install'

Change-Id: I91ea146cf7c5263fcf5d9823f70bb1ef0158f9a6
Tested: 'mvn install' runs succesfully and produces a .jar

9 years agoIgnore intellij files
Patrick Julien [Sat, 10 Jan 2015 22:48:44 +0000 (17:48 -0500)]
Ignore intellij files

Change-Id: I34ea778fc791ecce3a8948de51dea6fe4389a3c6

9 years agoReuse the same charset instance
Patrick Julien [Sat, 10 Jan 2015 21:41:45 +0000 (16:41 -0500)]
Reuse the same charset instance

Change-Id: I58b411a2c0f1ee6b856d5b1eaa42787036da1384

9 years agoSorted Vector & binary search functionality.
Wouter van Oortmerssen [Thu, 8 Jan 2015 01:51:31 +0000 (17:51 -0800)]
Sorted Vector & binary search functionality.

Bug: 16659276
Tested: on Linux & Windows.

Change-Id: Ie7a73810345fad4cf0a3ad03dfaa5464e3ed5ac8

9 years agoFixed C# showing up as C in the documentation
Wouter van Oortmerssen [Thu, 8 Jan 2015 00:30:10 +0000 (16:30 -0800)]
Fixed C# showing up as C in the documentation

Change-Id: Id1cc75cee07fa2d3de3e7d346f6e2641e4692968

9 years agoAdded clarification about unions in JSON to the docs.
Wouter van Oortmerssen [Wed, 7 Jan 2015 21:57:09 +0000 (13:57 -0800)]
Added clarification about unions in JSON to the docs.

Change-Id: I1f310636f8b74366b5b0fc73c7e106424583fc93

9 years agoAdded option FLATBUFFERS_BUILD_FLATC
Leander Bessa Beernaert [Fri, 2 Jan 2015 12:51:31 +0000 (13:51 +0100)]
Added option FLATBUFFERS_BUILD_FLATC

When FLATBUFFERS_BUILD_FLATC is set to OFF, the flatbuffer compiler
and tests will not be build.

Change-Id: I42b87b71daab4cb9c06605c813e7e4b62d6bf67a

9 years agoUnion verification functions were not correctly namespaced.
Wouter van Oortmerssen [Wed, 7 Jan 2015 21:29:59 +0000 (13:29 -0800)]
Union verification functions were not correctly namespaced.

Bug: 18908613
Change-Id: Ifed8a33b6b976b64eed9d190d930b08de1d5f41e
Tested: on Linux.

9 years agoMade CreateUninitializedVector return the buffer.
Wouter van Oortmerssen [Wed, 7 Jan 2015 19:35:17 +0000 (11:35 -0800)]
Made CreateUninitializedVector return the buffer.

Previously, obtaining the buffer was unclear and required multiple
casts.

Change-Id: I18e01c9e669886ac250e83aad10623cbddd629b6
Tested: on Linux.

9 years agoMerge changes Id7618e53,Ieddc3c5c into ub-games-master
Wouter van Oortmerssen [Wed, 7 Jan 2015 19:25:58 +0000 (19:25 +0000)]
Merge changes Id7618e53,Ieddc3c5c into ub-games-master

* changes:
  non-generic version of CreateUninitializedVector for c ffi
  cast literal to csize to fix error

9 years agoMerge "C#: Allow ByteBuffer to use faster unsafe mode" into ub-games-master
Jon Simantov [Wed, 7 Jan 2015 19:07:02 +0000 (19:07 +0000)]
Merge "C#: Allow ByteBuffer to use faster unsafe mode" into ub-games-master

9 years agonon-generic version of CreateUninitializedVector for c ffi
dyu [Sat, 27 Dec 2014 13:30:26 +0000 (21:30 +0800)]
non-generic version of CreateUninitializedVector for c ffi

Change-Id: Id7618e53797a158b82e7e480a6507887db3528bc

9 years agocast literal to csize to fix error
dyu [Sat, 27 Dec 2014 13:11:03 +0000 (21:11 +0800)]
cast literal to csize to fix error

Change-Id: Ieddc3c5cd4f7c97a9739ae3046b8a1b328180ae1

9 years agoupdate generated sources
dyu [Sat, 27 Dec 2014 13:18:18 +0000 (21:18 +0800)]
update generated sources

Change-Id: I531c26572fca7fca9805178971d7e110d44627d8

9 years agoDocumentation clarifications.
Wouter van Oortmerssen [Mon, 5 Jan 2015 22:50:23 +0000 (14:50 -0800)]
Documentation clarifications.

Change-Id: I7dc4bb3bbe32c6fe83a013790391fba0df8f4888

9 years agoC#: Allow ByteBuffer to use faster unsafe mode
Jon Simantov [Thu, 11 Dec 2014 22:23:10 +0000 (14:23 -0800)]
C#: Allow ByteBuffer to use faster unsafe mode

If your C# runtime environment supports unsafe mode, you can use
the #define UNSAFE_BYTEBUFFER setting and build the FlatBuffers assembly
in unsafe mode for greatly increased performance.

Tested: Tested FlatBuffersTest on Windows using VS2010 with both safe
and unsafe versions. Added ByteBufferTest to test the byte reversing
functions.

Change-Id: I21334468b339334f9abf4317e6291b648b97f57b

9 years agoMerge "Added CONTRIBUTING.md file." into ub-games-master
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:03:06 +0000 (02:03 +0000)]
Merge "Added CONTRIBUTING.md file." into ub-games-master

9 years agoMerge "Added VectorLength helper function that works on nullptr." into ub-games-master
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:01:30 +0000 (02:01 +0000)]
Merge "Added VectorLength helper function that works on nullptr." into ub-games-master

9 years agoMerge "Fixed missing virtual destructor in allocator." into ub-games-master
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:01:20 +0000 (02:01 +0000)]
Merge "Fixed missing virtual destructor in allocator." into ub-games-master

9 years agoMerge "Fixed Java ByteBuffer accessors generated for non-scalar vectors." into ub...
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:01:11 +0000 (02:01 +0000)]
Merge "Fixed Java ByteBuffer accessors generated for non-scalar vectors." into ub-games-master

9 years agoMerge "Generate C++ function returning the file_identifier of a flatbuffer" into...
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:00:58 +0000 (02:00 +0000)]
Merge "Generate C++ function returning the file_identifier of a flatbuffer" into ub-games-master

9 years agoMerge "Various documentation clarifications." into ub-games-master
Wouter van Oortmerssen [Tue, 9 Dec 2014 02:00:46 +0000 (02:00 +0000)]
Merge "Various documentation clarifications." into ub-games-master

9 years agoAdded CONTRIBUTING.md file.
Wouter van Oortmerssen [Tue, 9 Dec 2014 01:48:06 +0000 (17:48 -0800)]
Added CONTRIBUTING.md file.

Change-Id: Ie187065698dfb6ba9d989e9d2c48bdd7cb870e89

9 years agoAdded VectorLength helper function that works on nullptr.
Wouter van Oortmerssen [Tue, 9 Dec 2014 01:32:26 +0000 (17:32 -0800)]
Added VectorLength helper function that works on nullptr.

Change-Id: Ie62096f7337a476bee7a6d46d652e594fb3124d2
Tested: on Linux.
Bug: 18201051

9 years agoFixed missing virtual destructor in allocator.
Wouter van Oortmerssen [Tue, 9 Dec 2014 01:19:29 +0000 (17:19 -0800)]
Fixed missing virtual destructor in allocator.

Change-Id: I458249d95e6d65ac039e84d947d2fdf4fd1c3809
Tested: on Linux.

9 years agoFixed Java ByteBuffer accessors generated for non-scalar vectors.
Wouter van Oortmerssen [Tue, 9 Dec 2014 01:14:38 +0000 (17:14 -0800)]
Fixed Java ByteBuffer accessors generated for non-scalar vectors.

Change-Id: I9787ab88e5bd4846d92995e2bb05d0c2121113ca
Tested: on Linux.

9 years agoGenerate C++ function returning the file_identifier of a flatbuffer
Lars Magnusson [Sun, 30 Nov 2014 03:34:03 +0000 (11:34 +0800)]
Generate C++ function returning the file_identifier of a flatbuffer

Change-Id: I6ee09cf1e86a41b73bb3aa79b68871afb1a4e34f

9 years agoVarious documentation clarifications.
Wouter van Oortmerssen [Tue, 9 Dec 2014 00:47:00 +0000 (16:47 -0800)]
Various documentation clarifications.

Change-Id: Ibc2bd88a636f3b4abf82a7c2722fc1e354dab848
Tested: on Linux.

9 years ago[fix] removed some source files included multiple times causing duplicate symbol...
Robert Segal [Thu, 4 Dec 2014 19:39:16 +0000 (14:39 -0500)]
[fix] removed some source files included multiple times causing duplicate symbol compilation errors

Change-Id: I72aa590a0dc13771ca2f17857824f8b6fd76c78f

9 years agoAdded "final" to generated types to block inheritance.
Wouter van Oortmerssen [Wed, 19 Nov 2014 19:03:32 +0000 (11:03 -0800)]
Added "final" to generated types to block inheritance.

People sometimes accidentally inherit from these types.

Bug: 18224703
Change-Id: Ia09489a834ac4941f9b4a46f240cbdcf456f03a1
Tested: on Windows and Linux.

9 years agoAdded user defined attribute declarations.
Wouter van Oortmerssen [Tue, 18 Nov 2014 01:27:26 +0000 (17:27 -0800)]
Added user defined attribute declarations.

This is such that if you mis-spell an attribute, it doesn't get
silently ignored.

Bug: 18294628
Change-Id: I10013f5b2a21048b7daba2e9410678f528e09761
Tested: on Linux.

9 years agoClarified note on multi-threading in the docs.
Wouter van Oortmerssen [Mon, 17 Nov 2014 21:14:31 +0000 (13:14 -0800)]
Clarified note on multi-threading in the docs.

Change-Id: Ib36ec71aab02fc66d2a6d0c916ebfa4dd1d0d02f

9 years agoFix FlatBuffersTest build on Android by adding missing file.
Jon Simantov [Wed, 19 Nov 2014 18:57:34 +0000 (10:57 -0800)]
Fix FlatBuffersTest build on Android by adding missing file.

Change-Id: I5333d45ac43cbba61473bd8ba5b44aedb696a25c
Tested: FlatBuffersTest now builds on Android under Windows.

9 years agoFixes #90 - flatc chokes on IDL files starting with a comment
Zbigniew Mandziejewicz [Wed, 22 Oct 2014 14:40:03 +0000 (22:40 +0800)]
Fixes #90 - flatc chokes on IDL files starting with a comment

Change-Id: I5ab692ceb6809493720c1bff69a2e3210efd4618

9 years agoMade the memcmp address sanitizer clean.
Wouter van Oortmerssen [Fri, 7 Nov 2014 23:24:22 +0000 (15:24 -0800)]
Made the memcmp address sanitizer clean.

Added extra check to ensure memcmp gets called with a size that is
guaranteed within range of the buffer. This wasn't a real problem,
but stops address sanitizer from complaining.

See:
https://github.com/google/flatbuffers/issues/88
https://github.com/joker-eph/flatbuffers/commit/517506b4e105814e0823353c3d6561085c26a1ab#commitcomment-8265231

Change-Id: I7de24da2d36d973e154f92eeb3e093070886037f
Tested: on Linux

9 years agoFixed required field checking incorrectly using unsigned offsets.
Wouter van Oortmerssen [Fri, 7 Nov 2014 22:36:49 +0000 (14:36 -0800)]
Fixed required field checking incorrectly using unsigned offsets.

Reported by: https://github.com/google/flatbuffers/issues/99

Change-Id: Ia26da95bbac189836c257fa85f3bec1b153b6207
Tested: on Linux.

9 years agoFix a build error on 32 bit go
Luna [Wed, 29 Oct 2014 10:55:21 +0000 (11:55 +0100)]
Fix a build error on 32 bit go

Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72

9 years agoFixed boilerplate copyright message in LICENSE.txt
Wouter van Oortmerssen [Tue, 28 Oct 2014 00:48:29 +0000 (17:48 -0700)]
Fixed boilerplate copyright message in LICENSE.txt

Change-Id: I85e8a6bf2fd1ce04271e8afc5083fd47502e5075

9 years agoAdded support for custom allocators and uninitialized vectors.
Wouter van Oortmerssen [Fri, 24 Oct 2014 22:40:36 +0000 (15:40 -0700)]
Added support for custom allocators and uninitialized vectors.

This is helpful working with zero-copy use cases.

Bug: 15779698
Change-Id: I7097651ca9a432b5021b4e024da86398d1413ec7
Tested: on Linux and Windows.

9 years agoMade CMakeLists.txt compatible with older versions of CMake.
Wouter van Oortmerssen [Fri, 24 Oct 2014 21:26:29 +0000 (14:26 -0700)]
Made CMakeLists.txt compatible with older versions of CMake.

By replacing DIRECTORY by PATH:
http://www.cmake.org/cmake/help/v3.0/command/get_filename_component.html

Change-Id: I6f5802deeda53dea443b255294235e43e7bb5389
Tested: on Linux.

9 years agoVarious documentation improvements.
Wouter van Oortmerssen [Fri, 24 Oct 2014 18:15:37 +0000 (11:15 -0700)]
Various documentation improvements.

Change-Id: Iacea45ae0f602f49e46de472286a7a77ee20c301

9 years agoFixed big-endian issue.
Wouter van Oortmerssen [Wed, 22 Oct 2014 20:35:24 +0000 (13:35 -0700)]
Fixed big-endian issue.

Noticed a memory read that isn't big-endian safe. Was somewhat
benign in that it would have simply caused vtable duplication
when constructing a FlatBuffer on a big-endian machine.

Change-Id: I5de3a2bb3ce6912fdd845ed40668719794920cac

9 years agoFixed missing files in Xcode project. v1.0.3
Wouter van Oortmerssen [Wed, 22 Oct 2014 18:58:54 +0000 (11:58 -0700)]
Fixed missing files in Xcode project.

Change-Id: I3480de9157fd6d0eeb123e77e448bd57c75c74ad
Tested: on OS X

9 years agoAdded fenced code blocks to the C++/Java/Go docs for syntax highlighting.
Wouter van Oortmerssen [Mon, 6 Oct 2014 17:43:02 +0000 (10:43 -0700)]
Added fenced code blocks to the C++/Java/Go docs for syntax highlighting.

Change-Id: I504915c6b5367e8c05dc056463158b8420ad8c5e
Tested: on Linux.

9 years agoAdded .proto parsing and convertion to .fbs.
Wouter van Oortmerssen [Fri, 26 Sep 2014 23:46:30 +0000 (16:46 -0700)]
Added .proto parsing and convertion to .fbs.

Bug: 15777858
Change-Id: Iabef9b8c8044e593bb89510feebdee00d2f1840b
Tested: on Linux and Windows.

9 years agoFixed bug in convenient constructors for Java/C#
Wouter van Oortmerssen [Thu, 25 Sep 2014 22:53:56 +0000 (15:53 -0700)]
Fixed bug in convenient constructors for Java/C#

Also fixed Go unit tests not being up to date with recent schema
changes.

Change-Id: I42e619f9c5ea05f6f937c68a5c8a92462c46bce3
Tested: on Linux and Windows.

9 years agoOutput multiline doc comments over multiple lines
Gabriel Martinez [Wed, 24 Sep 2014 18:46:32 +0000 (11:46 -0700)]
Output multiline doc comments over multiple lines

Tested: on Linux

Bug: 15779934
Change-Id: I6f822f1705e443d8721ea208dcb021aad3c8715c

9 years agoFix vector of strings for Go
rw [Tue, 23 Sep 2014 20:55:05 +0000 (13:55 -0700)]
Fix vector of strings for Go

Mirrors Java patch 39d4b7e2bf

Change-Id: If8d0ab29f6eb508a156d468aeb0a9d5410149e53

9 years agoEnums in C++ are now strongly typed.
Wouter van Oortmerssen [Tue, 23 Sep 2014 18:55:42 +0000 (11:55 -0700)]
Enums in C++ are now strongly typed.

Accessors and constructors now take enum types rather than ints.

Bug: 16570507
Change-Id: I4b50fd64ad2e662ea2481bc0ccea784326fb31c0
Tested: on Linux and Windows.

9 years agoMade flatc error messages look like what other compilers output.
Wouter van Oortmerssen [Tue, 23 Sep 2014 00:17:13 +0000 (17:17 -0700)]
Made flatc error messages look like what other compilers output.

Looks like MSVC on Windows and like gcc everywhere else.
For enhanced IDE clickability.

Bug: 17208371
Change-Id: Ie3e02658fccd3edfd464b4bacf4bc68c613a8570
Tested: on Linux and Windows.

9 years agoAdded option to flatc to generate dependent header statements.
Wouter van Oortmerssen [Mon, 22 Sep 2014 22:49:43 +0000 (15:49 -0700)]
Added option to flatc to generate dependent header statements.

Bug: 17322776
Change-Id: I3a4d3cb4ccd40bc3200a87653aa0ab8ecb90ce60
Tested: on Linux.

9 years agoSupport for required fields.
Wouter van Oortmerssen [Fri, 19 Sep 2014 23:51:36 +0000 (16:51 -0700)]
Support for required fields.

Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0
Tested: on Linux and Windows.

9 years agoGenerate headers from spec, add option for installing targets
Zbigniew Mandziejewicz [Mon, 15 Sep 2014 16:50:23 +0000 (00:50 +0800)]
Generate headers from spec, add option for installing targets

Change-Id: I16ddb06e887e618fa871e842054115909fbf235c

9 years agoAdd enum name lookup method to Java/C# enums
Gabriel Martinez [Thu, 18 Sep 2014 19:28:10 +0000 (12:28 -0700)]
Add enum name lookup method to Java/C# enums

Tested: on Linux for Java and C#

Bug: 15781151
Change-Id: I7cb97bcc01d986cac2b24aaf7cb29521ddaa2f6b

9 years agoAdded convenient create functions for Java/C#.
Wouter van Oortmerssen [Thu, 18 Sep 2014 23:05:41 +0000 (16:05 -0700)]
Added convenient create functions for Java/C#.

Bug: 15777857
Tested: on Linux and Windows.

Change-Id: I25db724349e2c801bb0e41137540507acd57cd03

9 years agoAdded general codegen to Xcode project.
Wouter van Oortmerssen [Thu, 18 Sep 2014 22:26:49 +0000 (15:26 -0700)]
Added general codegen to Xcode project.

Change-Id: I5e21a08fe4b93382e5fbc3b911de5634b7aa88b9
Tested: on OS X.

9 years agoRefactored the Java and C# code generators into one.
Wouter van Oortmerssen [Wed, 17 Sep 2014 00:37:17 +0000 (17:37 -0700)]
Refactored the Java and C# code generators into one.

Also made the C# implementation support unsigned types, and
made it more like the Java version.

Bug: 17359988
Change-Id: If5305c08cd5c97f35426639516ce05e53bbec36c
Tested: on Linux and Windows.

9 years agoAdded C# generator to Xcode project.
Wouter van Oortmerssen [Tue, 16 Sep 2014 23:40:30 +0000 (16:40 -0700)]
Added C# generator to Xcode project.

Change-Id: I54ce51f16043664d706a79d1b31f2569f3311b70
Tested: on OS X

9 years agoPrepended com.google to the Java namespace.
Wouter van Oortmerssen [Tue, 16 Sep 2014 00:45:15 +0000 (17:45 -0700)]
Prepended com.google to the Java namespace.

Bug: 16507831
Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477
Tested: on Linux.

9 years agoAdded missing assert.h to util.h.
Wouter van Oortmerssen [Mon, 15 Sep 2014 23:27:21 +0000 (16:27 -0700)]
Added missing assert.h to util.h.

This was only causing compiler errors on certain compiler configurations.

Change-Id: I110fb8c896f74aae7ef739e9a29c636393dbbde2
Tested: on Linux and Windows.

9 years agoThe parser and flatc now allow include directories to be specified.
Wouter van Oortmerssen [Fri, 12 Sep 2014 00:13:21 +0000 (17:13 -0700)]
The parser and flatc now allow include directories to be specified.

Bug: 17139854
Change-Id: I0eac65d054951e00a8811ad1d80ba8c37012dbf0
Tested: on Linux.

9 years agoAdded convenient vector from array construction for Java.
Wouter van Oortmerssen [Thu, 11 Sep 2014 21:36:33 +0000 (14:36 -0700)]
Added convenient vector from array construction for Java.

Change-Id: Ib3fd576cf9fa4b4058a9fd1bbe24a0859bc3917a
Tested: on Linux.

9 years agoAdded accessor in Java to get vectors as ByteBuffers.
Wouter van Oortmerssen [Wed, 10 Sep 2014 23:38:37 +0000 (16:38 -0700)]
Added accessor in Java to get vectors as ByteBuffers.

Also cleaned up ByteBuffer usage in general: ByteBuffer.position
now universally indicates the start of a ByteBuffer.

Change-Id: Ic4bfb98f9df9501b8fc82de2c45db7d7311135ac
Tested: on Linux.

9 years agoFixed test that was incompatible with 64bit offsets.
Wouter van Oortmerssen [Wed, 10 Sep 2014 23:00:01 +0000 (16:00 -0700)]
Fixed test that was incompatible with 64bit offsets.

Change-Id: I35984d0ab3e849bec6cdaa364a39f66f2c37b4d0
Tested: on Linux.

9 years agoRemoved the use of b.array() to support DirectBuffers.
bml13 [Tue, 9 Sep 2014 09:30:09 +0000 (10:30 +0100)]
Removed the use of b.array() to support DirectBuffers.

Also removed Table extend Constants.

Change-Id: I1770b613c58094fa572a3b26a31f01bd5fb8fdbf

9 years agoInitial commit of .NET port of FlatBuffers
evolutional [Tue, 9 Sep 2014 18:46:13 +0000 (11:46 -0700)]
Initial commit of .NET port of FlatBuffers

Include C# codegen in flatc and .NET FlatBuffer access via the
FlatBufferBuilder class

Tested: on Windows.

Change-Id: If5228a8df60a10e0751b245c6c64530264ea2d8a

9 years agoAdded option to disable build of tests and samples.
Stewart Miles [Wed, 10 Sep 2014 23:01:13 +0000 (16:01 -0700)]
Added option to disable build of tests and samples.

Added FLATBUFFERS_BUILD_TESTS option which can be used to disable
the build of flatbuffers tests and samples.

Tested:
Verified tests and samples are no longer built on Linux when
FLATBUFFERS_BUILD_TESTS=OFF.

Change-Id: Ic23ab827849ba2c4481de9ca86adc1ab8e6b828c

9 years agoMade FlatBufferBuilder.java require ByteBuffers that have an array.
Wouter van Oortmerssen [Fri, 5 Sep 2014 20:48:02 +0000 (13:48 -0700)]
Made FlatBufferBuilder.java require ByteBuffers that have an array.

Readonly ByteBuffers and Direct ByteBuffers don't have a backing
array, and thus can't be used for writing FlatBuffers (though
they are fine for reading).

Change-Id: I4d7b9cc222b96161d0f8e92f34588bd3e0e38034
Tested: on Linux.

9 years agoNon-alpha-numeric characters are filtered out of include guards
Wouter van Oortmerssen [Fri, 5 Sep 2014 18:19:51 +0000 (11:19 -0700)]
Non-alpha-numeric characters are filtered out of include guards

Since part of it is based on the filename, which may contain
characters that are not legal identifiers.

Change-Id: I62b8fe228a434a2040fd4ce47d220fc4d3398b41
Tested: on Linux.

9 years agoA generated C++ function was missing "inline".
Wouter van Oortmerssen [Fri, 5 Sep 2014 17:56:16 +0000 (10:56 -0700)]
A generated C++ function was missing "inline".

This would cause double definition linker errors when included in
multiple compilation units.

Change-Id: Ie6fd4af018055a099343182a92a7776f2fea4725
Tested: on Linux.

9 years agoFixed JSON text output not finding symbolic names for enum value 1.
Wouter van Oortmerssen [Fri, 5 Sep 2014 00:25:33 +0000 (17:25 -0700)]
Fixed JSON text output not finding symbolic names for enum value 1.

Change-Id: If3a062926dd86b95fa68ed64fc7ee2de7bc0d930
Tested: on Linux

9 years agoImplemented the file identifier functionality for Java.
Wouter van Oortmerssen [Thu, 4 Sep 2014 23:31:44 +0000 (16:31 -0700)]
Implemented the file identifier functionality for Java.

Also fixed flatc not outputting these identifiers for files
compiled on the command-line.

Bug: 16983987
Change-Id: I8b714cfea3a8e144fa52133f62b2f7eda6eb044a
Tested: on Linux

9 years agoMade Vector have a size() function, to make it more STL-alike.
Wouter van Oortmerssen [Thu, 4 Sep 2014 19:22:11 +0000 (12:22 -0700)]
Made Vector have a size() function, to make it more STL-alike.

Bug: 17316346
Change-Id: I52377b7fa51adccadc4e867d45666e683bc2c1ae
Tested: on Linux.