Commit Graph

851 Commits

Author SHA1 Message Date
dyu ae1763e226 cast literal to csize to fix error
Change-Id: Ieddc3c5cd4f7c97a9739ae3046b8a1b328180ae1
2015-01-07 10:47:19 -08:00
dyu aa46f0e4c2 update generated sources
Change-Id: I531c26572fca7fca9805178971d7e110d44627d8
2015-01-07 10:34:17 -08:00
Wouter van Oortmerssen 89d2b0861b Documentation clarifications.
Change-Id: I7dc4bb3bbe32c6fe83a013790391fba0df8f4888
2015-01-07 10:34:17 -08:00
Jon Simantov 4390254e6a 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
2015-01-06 12:39:17 -08:00
Wouter van Oortmerssen 3a27013732 Merge "Added CONTRIBUTING.md file." into ub-games-master 2014-12-09 02:03:07 +00:00
Wouter van Oortmerssen d72c478128 Merge "Added VectorLength helper function that works on nullptr." into ub-games-master 2014-12-09 02:01:31 +00:00
Wouter van Oortmerssen 10f4ecac26 Merge "Fixed missing virtual destructor in allocator." into ub-games-master 2014-12-09 02:01:21 +00:00
Wouter van Oortmerssen 27823d5552 Merge "Fixed Java ByteBuffer accessors generated for non-scalar vectors." into ub-games-master 2014-12-09 02:01:12 +00:00
Wouter van Oortmerssen 19361a58ec Merge "Generate C++ function returning the file_identifier of a flatbuffer" into ub-games-master 2014-12-09 02:00:58 +00:00
Wouter van Oortmerssen c6c8a9ba29 Merge "Various documentation clarifications." into ub-games-master 2014-12-09 02:00:47 +00:00
Wouter van Oortmerssen 14eaddfdcc Added CONTRIBUTING.md file.
Change-Id: Ie187065698dfb6ba9d989e9d2c48bdd7cb870e89
2014-12-08 17:48:06 -08:00
Wouter van Oortmerssen 8833cff911 Added VectorLength helper function that works on nullptr.
Change-Id: Ie62096f7337a476bee7a6d46d652e594fb3124d2
Tested: on Linux.
Bug: 18201051
2014-12-08 17:32:26 -08:00
Wouter van Oortmerssen 318668aed6 Fixed missing virtual destructor in allocator.
Change-Id: I458249d95e6d65ac039e84d947d2fdf4fd1c3809
Tested: on Linux.
2014-12-08 17:19:29 -08:00
Wouter van Oortmerssen 9566669245 Fixed Java ByteBuffer accessors generated for non-scalar vectors.
Change-Id: I9787ab88e5bd4846d92995e2bb05d0c2121113ca
Tested: on Linux.
2014-12-08 17:14:38 -08:00
Lars Magnusson 354fd906a5 Generate C++ function returning the file_identifier of a flatbuffer
Change-Id: I6ee09cf1e86a41b73bb3aa79b68871afb1a4e34f
2014-12-08 17:00:56 -08:00
Wouter van Oortmerssen 2d9b3ade18 Various documentation clarifications.
Change-Id: Ibc2bd88a636f3b4abf82a7c2722fc1e354dab848
Tested: on Linux.
2014-12-08 16:47:00 -08:00
Robert Segal ced2cb6ce9 [fix] removed some source files included multiple times causing duplicate symbol compilation errors
Change-Id: I72aa590a0dc13771ca2f17857824f8b6fd76c78f
2014-12-08 16:29:15 -08:00
Wouter van Oortmerssen 285501f7be 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.
2014-11-19 13:41:15 -08:00
Wouter van Oortmerssen 0952143971 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.
2014-11-19 11:06:17 -08:00
Wouter van Oortmerssen 0ce53c96c3 Clarified note on multi-threading in the docs.
Change-Id: Ib36ec71aab02fc66d2a6d0c916ebfa4dd1d0d02f
2014-11-19 11:06:17 -08:00
Jon Simantov d6f70cdd7d Fix FlatBuffersTest build on Android by adding missing file.
Change-Id: I5333d45ac43cbba61473bd8ba5b44aedb696a25c
Tested: FlatBuffersTest now builds on Android under Windows.
2014-11-19 10:57:34 -08:00
Zbigniew Mandziejewicz 07d5965c81 Fixes #90 - flatc chokes on IDL files starting with a comment
Change-Id: I5ab692ceb6809493720c1bff69a2e3210efd4618
2014-11-07 16:21:20 -08:00
Wouter van Oortmerssen 6ca102e413 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
517506b4e1 (commitcomment-8265231)

Change-Id: I7de24da2d36d973e154f92eeb3e093070886037f
Tested: on Linux
2014-11-07 15:24:22 -08:00
Wouter van Oortmerssen 8ef6ee2a3e Fixed required field checking incorrectly using unsigned offsets.
Reported by: https://github.com/google/flatbuffers/issues/99

Change-Id: Ia26da95bbac189836c257fa85f3bec1b153b6207
Tested: on Linux.
2014-11-07 14:36:49 -08:00
Luna 118abc2871 Fix a build error on 32 bit go
Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72
2014-10-29 10:42:10 -07:00
Wouter van Oortmerssen fbcf063401 Fixed boilerplate copyright message in LICENSE.txt
Change-Id: I85e8a6bf2fd1ce04271e8afc5083fd47502e5075
2014-10-27 17:48:29 -07:00
Wouter van Oortmerssen e97f38e53c 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.
2014-10-24 16:21:36 -07:00
Wouter van Oortmerssen 4cdf3eb19b 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.
2014-10-24 14:58:32 -07:00
Wouter van Oortmerssen ea592296b8 Various documentation improvements.
Change-Id: Iacea45ae0f602f49e46de472286a7a77ee20c301
2014-10-24 14:58:32 -07:00
Wouter van Oortmerssen d426890b92 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
2014-10-22 13:35:24 -07:00
Wouter van Oortmerssen 1e4d28bf14 Fixed missing files in Xcode project.
Change-Id: I3480de9157fd6d0eeb123e77e448bd57c75c74ad
Tested: on OS X
2014-10-22 11:58:54 -07:00
Wouter van Oortmerssen 0eac15c784 Added fenced code blocks to the C++/Java/Go docs for syntax highlighting.
Change-Id: I504915c6b5367e8c05dc056463158b8420ad8c5e
Tested: on Linux.
2014-10-15 17:42:31 -07:00
Wouter van Oortmerssen d38b9af243 Added .proto parsing and convertion to .fbs.
Bug: 15777858
Change-Id: Iabef9b8c8044e593bb89510feebdee00d2f1840b
Tested: on Linux and Windows.
2014-10-15 17:42:31 -07:00
Wouter van Oortmerssen 18cf19f876 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.
2014-09-25 15:53:56 -07:00
Gabriel Martinez 730c0cadde Output multiline doc comments over multiple lines
Tested: on Linux

Bug: 15779934
Change-Id: I6f822f1705e443d8721ea208dcb021aad3c8715c
2014-09-25 11:17:53 -07:00
rw ef03cf46e4 Fix vector of strings for Go
Mirrors Java patch 39d4b7e2bf

Change-Id: If8d0ab29f6eb508a156d468aeb0a9d5410149e53
2014-09-23 17:25:50 -07:00
Wouter van Oortmerssen 7b8053570e 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.
2014-09-23 17:25:50 -07:00
Wouter van Oortmerssen 85c9c83844 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.
2014-09-23 17:19:01 -07:00
Wouter van Oortmerssen 30642c5a6f Added option to flatc to generate dependent header statements.
Bug: 17322776
Change-Id: I3a4d3cb4ccd40bc3200a87653aa0ab8ecb90ce60
Tested: on Linux.
2014-09-23 14:13:35 -07:00
Wouter van Oortmerssen 517c964fe2 Support for required fields.
Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0
Tested: on Linux and Windows.
2014-09-22 15:53:19 -07:00
Zbigniew Mandziejewicz 3f8700b296 Generate headers from spec, add option for installing targets
Change-Id: I16ddb06e887e618fa871e842054115909fbf235c
2014-09-22 15:53:19 -07:00
Gabriel Martinez 048638a971 Add enum name lookup method to Java/C# enums
Tested: on Linux for Java and C#

Bug: 15781151
Change-Id: I7cb97bcc01d986cac2b24aaf7cb29521ddaa2f6b
2014-09-22 15:10:48 -07:00
Wouter van Oortmerssen d6ed127cf4 Added convenient create functions for Java/C#.
Bug: 15777857
Tested: on Linux and Windows.

Change-Id: I25db724349e2c801bb0e41137540507acd57cd03
2014-09-19 13:51:33 -07:00
Wouter van Oortmerssen bdaedebef9 Added general codegen to Xcode project.
Change-Id: I5e21a08fe4b93382e5fbc3b911de5634b7aa88b9
Tested: on OS X.
2014-09-18 15:26:49 -07:00
Wouter van Oortmerssen 557c88c039 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.
2014-09-18 12:29:31 -07:00
Wouter van Oortmerssen d01b30cdd6 Added C# generator to Xcode project.
Change-Id: I54ce51f16043664d706a79d1b31f2569f3311b70
Tested: on OS X
2014-09-16 16:40:30 -07:00
Wouter van Oortmerssen c01c77a7f2 Prepended com.google to the Java namespace.
Bug: 16507831
Change-Id: I5beee18f63f174e425dc1ab395807b578d5f9477
Tested: on Linux.
2014-09-15 17:45:15 -07:00
Wouter van Oortmerssen 0a549e3875 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.
2014-09-15 16:27:21 -07:00
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