Commit Graph

13 Commits

Author SHA1 Message Date
Wouter van Oortmerssen b3ee52c0a7 Fixed vectors reserving wrong amount of space in Java.
In the generated code, the type of the vector was used for
the element size, instead of the vector element type.

Change-Id: Ie16d5221a61474365292c948fd3af99e2a7716c7
Tested: on Windows.
2014-07-09 11:43:30 -07:00
Wouter van Oortmerssen 7fcbe723fc Added a "strict JSON" mode to the text generator and compiler
This will add quotes around field names, as required by the official
standard. By default it will leave quotes out, as it is more readable,
more compact, and is accepted by almost all JSON parsers.
The -S switch to flatc turns on strict mode.

As per rfc 7159.

Change-Id: Ibabe9c8162c47339d00ec581d18721a2ba40c6d0
Tested: on Windows.
2014-07-09 11:43:30 -07:00
Wouter van Oortmerssen 9140144d51 Added functionality to assign field ids manually in a schema
New attribute:

-   `id: n` (on a table field): manually set the field identifier to `n`.
    If you use this attribute, you must use it on ALL fields of this table,
    and the numbers must be a contiguous range from 0 onwards.
    Additionally, since a union type effectively adds two fields, its
    id must be that of the second field (the first field is the type
    field and not explicitly declared in the schema).
    For example, if the last field before the union field had id 6,
    the union field should have id 8, and the unions type field will
    implicitly be 7.
    IDs allow the fields to be placed in any order in the schema.
    When a new field is added to the schema is must use the next available ID.

Change-Id: I8690f105f3a2d31fdcb75a4fab4130692b12c62f
Tested: on Windows
2014-07-08 11:12:33 -07:00
Wouter van Oortmerssen 350011f581 Fixed a bugs in the Java runtime that could cause an index out of bounds exception.
Tested: on Windows.

Change-Id: I0d4cdafc21690eb9a509ba31f21e80dacfb602ff
2014-07-02 14:39:58 -07:00
Wouter van Oortmerssen 1256307a38 Switched VS build to -W4, and fixed all resulting warnings.
Change-Id: I654217cbd01a3a449503d95753e19b672ec7ec23
Tested: on Windows, Linux
2014-07-02 14:39:58 -07:00
Wouter van Oortmerssen a0b6ffc25b Add buffer verification functionality to FlatBuffers
Bug: 15732628
Change-Id: I0b7cb65982d6b8957d5a899cca7d2b5d2ef53206
Tested: On Windows, OS X and Linux
2014-07-01 17:52:16 -07:00
Wouter van Oortmerssen 59043114ac Generated C++ headers now have include guards.
Bug: 15700355
Change-Id: Iceccb5b344e394e399092ffaa81f9cad2f0418ab
Tested: on Windows
2014-06-23 17:06:16 -07:00
rw e2c02b833e license is a comment, not an echo 2014-06-23 13:37:32 -07:00
rw 0b60ece438 show absolute path to user when aborting 2014-06-20 16:51:32 -07:00
rw 69dc8cbbc3 sh script for JavaTest 2014-06-20 16:21:49 -07:00
Wouter van Oortmerssen aab06c6bea Fixed various compiler warnings (most related to a 64bit size_t).
Change-Id: Ic2e0565ebc5243fc0be780bfbcb221d5170569fd
Tested: on VS2010
2014-06-19 12:04:39 -07:00
Wouter van Oortmerssen 3bcab16e91 Added project files for Visual Studio and Xcode.
Change-Id: Ife9775fdedc9e084c1e826ef13dff06a1b1b2ec2
Tested: on Windows and OS X.
2014-06-11 15:19:12 -07:00
Wouter van Oortmerssen 26a30738a4 Initial commit of the FlatBuffers code.
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920
Tested: using VS2010 / Xcode / gcc on Linux.
2014-06-10 13:53:28 -07:00