platform/upstream/flatbuffers.git
9 years agoset version for next dev cycle
pjulien [Thu, 7 May 2015 00:17:02 +0000 (20:17 -0400)]
set version for next dev cycle

Change-Id: I17a7896e257c0ab7e4cd1b22c928d4cee21fbf11

9 years agoInitially discussed in #178.
pjulien [Wed, 6 May 2015 23:41:44 +0000 (19:41 -0400)]
Initially discussed in #178.

Allows adding an already encoded UTF-8 string directly without
having to convert to a ``String`` first.

Change-Id: I23f9c738eec18fd35f4c14f58dbd0f6cf0970dc7

9 years agoAdded namespaced way to refer to types in schemas.
Wouter van Oortmerssen [Fri, 8 May 2015 22:04:53 +0000 (15:04 -0700)]
Added namespaced way to refer to types in schemas.
Also made proper namespacing work for enums.

You can now say namespace.MyTable as the type when declaring
a field that refers to a type in a different namespace.

Previously, it would work just referring to MyTable, however
with the recent commit fixing namespaced types this now
is ambiguous.

Change-Id: Ieaa3f4ac1662b8c4dc1f16e1898ea3cdb02e10fd
Tested: on Linux.

9 years agoMerge "Initial support for propagating namespaces from schema files to generated...
Brett Cooley [Fri, 8 May 2015 19:52:54 +0000 (19:52 +0000)]
Merge "Initial support for propagating namespaces from schema files to generated code" into ub-games-master

9 years agoAdd missing newline in help text for flatc.
Jason Sanmiya [Thu, 7 May 2015 17:30:03 +0000 (10:30 -0700)]
Add missing newline in help text for flatc.

Tested: Help text displays correctly now.
Change-Id: Ibbdc810ae41e24321860879064bdc64f78a67cb9

9 years ago[BREAKING CHANGE] Field accessors should use property getters in C#
Mormegil [Wed, 6 May 2015 14:33:50 +0000 (16:33 +0200)]
[BREAKING CHANGE] Field accessors should use property getters in C#

In C#, plain field accessors should not be nonparametric methods
but should be standard property getters.

The accessor methods with parameters were renamed to `GetXxx`
because a method cannot be named identically to a property.

Also, `ByteBuffer.Position`, `FlatBufferBuilder.Offset` and
`FlatBufferBuilder.DataBuffer` are now properties instead
of nonparametric accessor methods, for more idiomatic C# style.

This is a breaking change, all client C# code accessing these
fields needs to be changed (i.e. remove those `()` or add the
`Get` prefix).

Issue: #77
Change-Id: Iaabe9ada076e5ea2c69911cf6170fdda2df3487e

9 years agoFix u_int8_t to uint8_t
yinlei [Tue, 5 May 2015 03:14:59 +0000 (11:14 +0800)]
Fix u_int8_t to uint8_t

Change-Id: I475ef9454f51f1b7ec2a7f9086d711359456677a

9 years agoInitial support for propagating namespaces from schema files to generated code
Brett Cooley [Wed, 6 May 2015 00:10:53 +0000 (17:10 -0700)]
Initial support for propagating namespaces from schema files to generated code

Change-Id: Ifc10c54845ea7553586d1896d509314d68e9ab0f

9 years agoMerge "Added extra checks for reading binaries in flatc" into ub-games-master
Wouter van Oortmerssen [Mon, 4 May 2015 21:01:59 +0000 (21:01 +0000)]
Merge "Added extra checks for reading binaries in flatc" into ub-games-master

9 years agoMerge changes I2de7d14d,I56392340 into ub-games-master
Wouter van Oortmerssen [Mon, 4 May 2015 21:00:43 +0000 (21:00 +0000)]
Merge changes I2de7d14d,I56392340 into ub-games-master

* changes:
  Added accessor for file_extension in generated code.
  Added missing --gen-mutable to CMakeLists.txt

9 years agoAdded extra checks for reading binaries in flatc
Wouter van Oortmerssen [Mon, 4 May 2015 20:36:27 +0000 (13:36 -0700)]
Added extra checks for reading binaries in flatc

By default, disallow reading binaries that do not correspond to
the schema file_identifier. Override with --raw-binary

Change-Id: I24822c0e4c80dab4e5a238ae2b6e601a09025c27
Tested: on Linux.

9 years agoAdded accessor for file_extension in generated code.
Wouter van Oortmerssen [Mon, 4 May 2015 17:52:40 +0000 (10:52 -0700)]
Added accessor for file_extension in generated code.

Change-Id: I2de7d14dbb1f7b8f81022dd2c9da65060ae49300
Tested: on Linux.

9 years agoAdded missing --gen-mutable to CMakeLists.txt
Wouter van Oortmerssen [Mon, 4 May 2015 17:35:53 +0000 (10:35 -0700)]
Added missing --gen-mutable to CMakeLists.txt

Change-Id: I56392340de4439d05fa8f06a7336ff72c6f9346d
Tested: on Linux

9 years agoMerge "Fix bug on flathash compilation option." into ub-games-master
Jason Sanmiya [Wed, 29 Apr 2015 21:12:06 +0000 (21:12 +0000)]
Merge "Fix bug on flathash compilation option." into ub-games-master

9 years agoMutable FlatBuffers: in-place updates.
Wouter van Oortmerssen [Mon, 27 Apr 2015 23:25:06 +0000 (16:25 -0700)]
Mutable FlatBuffers: in-place updates.

This commit contains the first step in providing mutable FlatBuffers,
non-const accessors and mutation functions for existing fields generated
from --gen-mutable.

Change-Id: Iebee3975f05c1001f8e22824725edeaa6d85fbee
Tested: on Linux.
Bug: 15777024

9 years agoFix bug on flathash compilation option.
Jason Sanmiya [Tue, 28 Apr 2015 22:44:10 +0000 (15:44 -0700)]
Fix bug on flathash compilation option.

Change-Id: Ib9d31d08daba7ce54b864417ae93bf479702861b

9 years agoTolerate DOS-style EOL in IDL line comments
Mormegil [Tue, 14 Apr 2015 16:09:08 +0000 (18:09 +0200)]
Tolerate DOS-style EOL in IDL line comments

If an IDL file uses DOS-style EOLs (CR+LF), line comments need to
ignore the second linebreak character, otherwise, as is currently
the case, the parsed documentation comment includes a trailing `\r`
character, which is then output verbatim into the output source
code by flatc.

Change-Id: I39591631995a980622d20a4a32315178b33f18f6

9 years agoadded .travis.yml file (build with original and biicode building);
franchuti688 [Wed, 1 Apr 2015 10:35:37 +0000 (12:35 +0200)]
added .travis.yml file (build with original and biicode building);
added bii-travis.sh and readme.md files; added build status section with travis and biicode build
systems

Change-Id: I93acd1ca9497416ade6293d63b5311c4c31b880f

9 years agoEnums use native enums in C#
Mormegil [Mon, 13 Apr 2015 11:25:03 +0000 (13:25 +0200)]
Enums use native enums in C#

Enums should not be (badly) emulated with classes in C# but should
use native C# enums instead. Java implementation made an explicit
choice not to use the (more complex) Java enums, but C# enums are
just light-weight syntactic coating over integral types.

Fixes issue #171.

Change-Id: I9f4d6ba5324400a1e52982e49b58603cb7d7cca7

9 years agoSeal all classes in Java/C#
Advay Mengle [Mon, 6 Apr 2015 23:42:08 +0000 (16:42 -0700)]
Seal all classes in Java/C#

Makes enums/structs/tables unsubclassable (final or sealed) and
prevents instantiation of enum classes (which are solely static
constants).

Tested (Mac OS 10.10.2):
1. run flattests
2. cd tests && ../flatc -c monster_test.fbs && ../flatc -j
monster_test.fbs && ../flatc -g monster_test.fbs && ../flatc -n
monster_test.fbs  # Note deltas for C# and Java.
3. ./JavaTest.sh

**Breaking api change**

Change-Id: Ie008c941c36d212690da58ddc72c9b228eb7a093

9 years agoFixed: Readme version is not up to date
Joël Lamotte [Fri, 3 Apr 2015 11:44:27 +0000 (13:44 +0200)]
Fixed: Readme version is not up to date

Change-Id: Ie44419026eca94bce0a2857abef95a82e78cfc3e

9 years agoAdd byte slice accessor to Go code
Ben Harper [Wed, 1 Apr 2015 14:39:53 +0000 (16:39 +0200)]
Add byte slice accessor to Go code

Change-Id: I15cc8924d6607bd93068c762fd67e6088cfd9789

9 years agoAlways add additional space if no more is available
Kyle Jones [Tue, 31 Mar 2015 19:16:36 +0000 (12:16 -0700)]
Always add additional space if no more is available

Change-Id: If08b2d839489d40e977de794b13584fa66ff32c1

9 years agoFix typo in Benchmarks.md
INADA Naoki [Thu, 2 Apr 2015 17:00:28 +0000 (02:00 +0900)]
Fix typo in Benchmarks.md

Change-Id: I1c5fbd019cc233e1d551887ff5fb740420c18c2b

9 years agoGenerate appropriate schema doc comments from .proto files
Advay Mengle [Tue, 31 Mar 2015 09:03:11 +0000 (02:03 -0700)]
Generate appropriate schema doc comments from .proto files

- Add parse handling of .proto struct and field doc comments (enums and
their values were already handled)
- Add FBS generation handling of doc comments for structs, their
fields, enums, and their values (requires linking idl_gen_general in
the test binary build)
- Tested using test.proto|golden with doc comments added.  Xcode run of
flattest passes.

Change-Id: Idff64dd8064afba227174ab77d2c7be22d006628

9 years agoGenerate Java doc comments in JavaDoc style
Advay Mengle [Tue, 31 Mar 2015 11:21:47 +0000 (04:21 -0700)]
Generate Java doc comments in JavaDoc style

Tested by regenerating all tests/ generated sources; note that only
Monster.java changes.  Ran flattests as well.

Change-Id: I65b6ea7d208b0ccd6a0b34761162fed6ba391fc5

9 years agoClarified Verifier options. v1.1.0
Wouter van Oortmerssen [Mon, 30 Mar 2015 17:37:34 +0000 (10:37 -0700)]
Clarified Verifier options.

Change-Id: I04775dedc61f1c448eedb1883182af7b07239797
Tested: on Linux.

9 years agoFix Mac ndk-build error on motive, pie_noon, pindrop.
Jason Sanmiya [Thu, 26 Mar 2015 17:35:52 +0000 (10:35 -0700)]
Fix Mac ndk-build error on motive, pie_noon, pindrop.

We were looking for 'flatc' in motive/bin/Debug/flatc,
on Mac. It's actually built to flatbuffers/Debug/flatc.

Tested: OS X Yosemite, ndk-r10d. Also tested on Linux.
Change-Id: I9f1ecfe00c5f42fd9b6808b5a5da1c920487a4c2

9 years agoUnsigned types in Java now return bigger size signed types.
Wouter van Oortmerssen [Thu, 19 Mar 2015 00:52:39 +0000 (17:52 -0700)]
Unsigned types in Java now return bigger size signed types.

(Java doesn't support unsigned types).

ubyte/ushort return as int
uint returns as long
(all with correct masking)

ulong still returns as long, as before.

Tested: on Linux & Windows.
Bug 17521464

Change-Id: Id6bc8f38fc8c1a2f4e6733c6980dc6b6e322b452

9 years agoChanged C# ByteBuffer to use bit shifts instead of BitConverter
Wouter van Oortmerssen [Fri, 13 Mar 2015 23:59:29 +0000 (16:59 -0700)]
Changed C# ByteBuffer to use bit shifts instead of BitConverter

BitConverter was excessively slow since it allocates a byte array
at each access.

Bug: 18702381
Change-Id: I47be9c38e1d04287ba4c10bc369848f3e13a2a2f
Tested: on Windows.

9 years agoRegenerated test code + fixed typo in C# FlatBufferBuilder
Wouter van Oortmerssen [Fri, 13 Mar 2015 20:05:28 +0000 (13:05 -0700)]
Regenerated test code + fixed typo in C# FlatBufferBuilder

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

9 years agoUpdate idl_gen_general.cpp
reynolma2 [Mon, 9 Mar 2015 18:35:18 +0000 (11:35 -0700)]
Update idl_gen_general.cpp

There is a bug in creating a C# table when it includes a field of type 'BOOL'. The problem is that the generate C# code is as follows:
  "bool SampleValue = 0;"
This will fail to compile, because in C# this fails, it needs to be generated as:
 "bool SampleValue = false;"

The error is in line ~510

Change-Id: I77f6eea0f269b0540dbeb462602fc447cb69237d

9 years agoAdd CreateByteVector function to Go's builder
Ben Harper [Sun, 8 Mar 2015 19:39:01 +0000 (21:39 +0200)]
Add CreateByteVector function to Go's builder

This function gets around the inefficiency of populating a [ubyte] vector
byte by byte. Since ubyte vectors are probably the most commonly used type
of generic byte buffer, this seems like a worthwhile thing to create a
fast path for.

Benchmarks show a 6x improvement in throughput on x64.

There is a new test verifying the functionality of the function.

Change-Id: I82e0228ae0f815dd7ea89bf168b8c1925f3ce0d7

9 years agoMake FuzzTest2 fuzzier.
Max Galkin [Sat, 7 Mar 2015 21:00:05 +0000 (13:00 -0800)]
Make FuzzTest2 fuzzier.

1. Random table fields are now marked deprecated. The deprecation rate is adjustable, default is ~10% of fields.
2. Vector type previously produced a dummy field, now a trivial ubyte vector is generated instead.
3. The fuzzed "instances" were previously generated with identical data, now they are randomized: I suppose such was the intent from the beginning, just wasn't implemented.

I ran the new test with a few different settings and random seeds (but only on Windows + VS2015), and it always passed.

Change-Id: I2014686b6680aec24049ccda3f6deffe5205a83e

9 years agoFix for VS 2015 stricter warnings about "shadowed" names.
Max Galkin [Sat, 7 Mar 2015 16:49:55 +0000 (08:49 -0800)]
Fix for VS 2015 stricter warnings about "shadowed" names.

This change renames a few variables to fix the build in VS 2015.

VS 2015 new warnings:
http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx

Change-Id: Ic9c3f75ee717f0125960c813df442ed4fbcceb4a

9 years agoImplementation of a buffer release strategy.
gregoire-astruc [Tue, 24 Feb 2015 12:14:46 +0000 (13:14 +0100)]
Implementation of a buffer release strategy.

* Tests for Release feature.
* Check vector_downward.buf_ before passing to deallocator.
* Assertions.
* Shared test between unique_ptr and GetBufferPointer()
* Unnecessary using directives.
* Reallocate vector if released on clear operation.
* Use allocator attribute.
* Renamed `Release()` to `ReleaseBufferPointer()`
* For consistency with `GetBufferPointer()`
* Updated documentation for ReleaseBuffer.

Change-Id: I108527778e56ae5127abf9e5b1be6b445ad75cb7

9 years agoAdded Copyright headers
loverszhaokai [Sat, 28 Feb 2015 10:06:53 +0000 (18:06 +0800)]
Added Copyright headers

Change-Id: I106de8985cea572590d49c896b72c54f33e73bd2

9 years agoAndroid build script works with pre-releases present.
Wouter van Oortmerssen [Mon, 9 Mar 2015 21:04:30 +0000 (14:04 -0700)]
Android build script works with pre-releases present.

build_apk.sh assumed pre-releases would be sorted towards the end,
but instead they end up at the front (sort -n) causing the api
selection loop to halt early.

bug: 19213196
Change-Id: I210a18c16e81880229f154c4613f8b97d90ac9bd
tested: on Linux.

9 years agoFixed C# Table.cs to work with Mono.
Grégoire Astruc [Wed, 18 Feb 2015 21:49:13 +0000 (22:49 +0100)]
Fixed C# Table.cs to work with Mono.

Cast to short for mono compatibility.

Change-Id: I568059a21369b895fa52002fa231f7594f0f736c

9 years agoMerge "Added the hash attribute to ints and longs." into ub-games-master
Alex Ames [Tue, 17 Feb 2015 22:58:04 +0000 (22:58 +0000)]
Merge "Added the hash attribute to ints and longs." into ub-games-master

9 years agoAdded the hash attribute to ints and longs.
Alex Ames [Fri, 13 Feb 2015 23:58:29 +0000 (15:58 -0800)]
Added the hash attribute to ints and longs.

FlatBuffer schema files can now optionally specify a hash attribute that
will allow someone writing json files to enter a string to be hashed
rather than a specific value. The hashing algorithm to use is specified
by the schema.

Currently the only algorithms are fnv1 and fnv1a. There are 32 bit and
64 variatns for each. Additionally, a hashing command line tool was
added so that you can see what a string will hash to without needing to
inspect the flatbuffer binary blob.

Change-Id: I0cb359d0e2dc7d2dc1874b446dc19a17cc77109d

9 years agoFix pointer underrun when allocating large vectors
Stefan Eilemann [Tue, 10 Feb 2015 12:54:22 +0000 (13:54 +0100)]
Fix pointer underrun when allocating large vectors

Change-Id: Ia69fc3098468eb64420215dc1068342ccbbb1ede

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.

10 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.