Commit Graph

76 Commits

Author SHA1 Message Date
Wouter van Oortmerssen e57b86bb9f The parser and flatc now allow include directories to be specified.
Bug: 17139854
Change-Id: I0eac65d054951e00a8811ad1d80ba8c37012dbf0
Tested: on Linux.
2014-09-15 16:19:27 -07:00
Wouter van Oortmerssen cb58fc6fa1 Added convenient vector from array construction for Java.
Change-Id: Ib3fd576cf9fa4b4058a9fd1bbe24a0859bc3917a
Tested: on Linux.
2014-09-15 16:19:27 -07:00
Wouter van Oortmerssen 858e9961e2 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.
2014-09-15 16:19:26 -07:00
evolutional 9a1f7be6fd 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
2014-09-15 16:13:27 -07:00
Wouter van Oortmerssen 09a2999c66 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
2014-09-05 10:54:52 -07:00
Wouter van Oortmerssen 11b743688c Improved the verifier to be even more resilient.
Theoretically, an attacker could construct a FlatBuffer with the
sole purpose of making verification really expensive, essentially
DOS-ing a server that uses verification on FlatBuffers. This adds
a max table depth and max table amount at which point the
verifier declares the buffer malformed.

Bug: 16301336
Change-Id: I6b098c31d030d24c19e852b33609110658e66aa9
Tested: on OS X
2014-08-22 14:14:32 -07:00
Wouter van Oortmerssen ffb3dec573 Prefixing of enum value identifiers in C++ is now optional.
See -P option to flatc.

Bug: 16814856
Change-Id: I855973df6afa27e0efa27cf9c4b4aee8a1fcdd22
Tested: on OS X.
2014-08-22 14:02:32 -07:00
Wouter van Oortmerssen ebac1e1940 Support all JSON escape codes (including \u) for parsing & text gen.
Bug: 16624362
Change-Id: Ia09ea404c0c11dd1dc6993a8cbd155bf8152b65f
Tested: on Windows & Linux.
2014-08-22 14:02:31 -07:00
Wouter van Oortmerssen be894f09df Schemas now support include files.
Bug: 15521443
Change-Id: I2e1ef97e7225a1a0ecf2ca65e31d49d443003747
Tested: on Linux.
2014-08-19 16:44:14 -07:00
Wouter van Oortmerssen 8c5d7f7dea Clarified a documentation statement about circular references.
Change-Id: I8f3c50085f89037995ab9f26b28d3c83667e9d6f
2014-08-19 14:25:55 -07:00
Wouter van Oortmerssen 5da7bda826 File identifier feature.
Allows you to add, and test for the presence of a magic 4-char
string in a FlatBuffer.

Tested: on OS X.

Change-Id: I090692a9e4fb53bed3543279a28563e67132cba0
2014-08-12 14:37:06 -07:00
Wouter van Oortmerssen d8a173ddc7 A few document clarifications for Java & Internals.
Change-Id: I770b53cf7d82c860422c1fe6193fb597d9c9495c
2014-07-31 14:58:19 -07:00
Wouter van Oortmerssen 9c3de1e2a0 Extended symbolic enum parsing in JSON for integers and OR-ing.
Change-Id: Iedbd9914a1ca3897776fb92aa9a1fdfc4603da3c
Tested: on Windows and Linux
2014-07-25 15:20:24 -07:00
Wouter van Oortmerssen d03ba640be Updated benchmark chart with stats for pugixml.
Change-Id: I23d7db5b62ca52fee49e1bedcf7d7d8d74957cf8
Tested: on Windows.
2014-07-21 16:40:39 -07:00
Wouter van Oortmerssen 127d35085a Added a `bit_flags` attribute to enum declarations that 1<<N every value.
Change-Id: Ib9ec0cb3ddec60b1ca124eaf815fb1ae0cc53e1c
Tested: on Windows and Linux
Bug: 16186562
2014-07-21 16:40:39 -07:00
rw 74d5f3701f Port FlatBuffers to Go.
Implement code generation and runtime library for Go, derived from the
Java implementation. Additionally, the test suite verifies:

 - the exact bytes in the Builder buffer during object construction,
 - vtable deduplication, and
 - table construction, via a fuzzer derived from the C++ implementation.

Change-Id: Ib95a019c684891def2b50281e570b4843fea7baa
2014-07-21 16:40:39 -07:00
Wouter van Oortmerssen df2e0db63d flatc can now convert flatbuffer binary files into json.
Also removed it appending _wire to filenames, renamed the json golden
file to .golden to not clash with generated files.

Bug: 15781201
Change-Id: I8322861e50d1e5b6a5ab5e4b5e5d8ae13c356eb2
Tested: on Windows and Linux
2014-07-11 14:49:43 -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 a5f50019bc Made declaring the underlying type of an enum mandatory.
This is a breaking change, anyone having schema files with enums
that do not specify a type will get a specialized error:

must specify the underlying integer type for this
enum (e.g. ': short', which was the default).

All of the samples and docs already had a type specified,
so hopefully this will affect very few people.

Bug: 15777205
Change-Id: I9b8d7c0827867f7efb6c217346db7e402695eff0
Tested: on Windows
2014-07-02 14:39:59 -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 ff0d7a89d8 Doc clarifications (Java vectors, test working dir, benchmark fix).
Change-Id: If8cc05669d82df892e1d4e11f7fbbd68b2dc05bf
2014-06-23 14:00:58 -07:00
Wouter van Oortmerssen 66de19ace8 Documentation changes to clarify FlatBuffer internals.
Change-Id: I3759a07385f0d8d172ca2f88ac1759b71bee5a6a
2014-06-17 17:49:50 -07:00
Wouter van Oortmerssen 1485180517 Fixed the web pages not scrolling by regenerating with doxygen.
Change-Id: Id1269f85ec2f522c8d4b0d05f84d050b42d70d60
Tested: on Android
2014-06-17 13:35:47 -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