Commit Graph

11 Commits

Author SHA1 Message Date
Sumant Tambe 49fed8c4f6 Add FlatBufferBuilder move semantics tests to the main test suite (#4902)
* Add FlatBufferBuilder move semantics tests to main

Do not eagerly delete/reset allocators in release and release_raw functions
Update android, vs2010 build files
New tests for various types of FlatBufferBuilders and move semantics

* Improve test failure output with function names
2018-09-24 12:03:31 -07:00
Sergey Avseyev 6eb031de9a Text files should not have executable bit set (#4480) 2017-11-06 10:20:22 -08:00
Stewart Miles a892322203 C++98 (stlport) support for core FlatBuffers and FlexBuffers.
* Added internal - limited - implementation of flatbuffers::unique_ptr
  for STLs that don't ship with std::unique_ptr.  In C++11 and beyond
  this is just an alias for std::unique_ptr.
* Aliased used type traits structs is_scalar is_floating_point is_unsigned
  into flatbuffers namespace so they can be replaced in C++98 implementations.
  Right now these point at stlport's TR1 implementations.
* Wrapped vector::data() in vector_data().
* Wrapped vector::emplace_back() in vector_emplace_back().
* Wrapper string::back() in string_back().
* Added variants of FlatBufferBuilder::CreateVector() and
  FlatBufferBuilder::CreateVectorOfStructs() that allow the use of plain
  function pointers.
  Generated code has also been modified to use plain functions to build objects
  rather than std::function() so all generated code will work in C++98
  applications.
* Added flexbuffers::Builder::Vector(), flexbuffers::Builder::TypedVector()
  and flexbuffers::Builder::Map() methods that allow the use of plain function
  pointers.
* Changed Parser to internally use plain function pointers when parsing table
  and vector delimiters.
* Added specializations of NumToString() for 64-bit types that aren't supported
  by stringstream in stlport.
* Overloaded numeric_limits for 64-bit types not supported by stlport.
* Replaced build_apk.sh (which was broken by deprecation of the
  "android" tool in the Android SDK) with build.gradle and the
  appropriate gradle wrapper to build an APK.
* Switched Android build to build against all STL variants.
* Updated travis configuration to build Android test and sample.

Tested:
* Verified all tests continue to work on Linux, OSX and Android.
* Verified Travis build is green.

Change-Id: I9e634363793f85b9f141d21454b10686020a2065
2017-07-20 11:01:00 -07:00
Wouter van Oortmerssen f878024d0b Fixed the Android build.
Change-Id: Iabb9448b4f161bba465d455c28bb826529649d30
Tested: on Android.
2017-02-08 15:13:57 -08:00
Wouter van Oortmerssen e98b1912b3 add setloadfile and setfileexists functions to flatbuffers
to allow for custom file loaders. The targeted use case is android runtime.

(from CL 116980408)

Change-Id: I8785c0acf714fab41d8f6fc9f1c52875423b8f5b
2016-04-04 13:03:22 -07:00
Wouter van Oortmerssen 514d274a45 Added android static library target for text parsing/generation etc.
Change-Id: If24e3eea90cef2a0d6a9d98fb503d2e3ec34ceed
Tested: on Linux.
2016-01-06 17:48:19 -08:00
Stewart Miles 8212da5d5d Workaround broken gnumake realpath on Windows.
Also, added missing build scripts for flatc on Windows and fixed
numerous issues in the flatbuffers/android/jni/include.mk makefile.

Tested:
Verified dependent project (motive) can generate flatbuffers headers
with these changes on Android.

Bug: 25780616

Change-Id: I73f0dec8f7a6a7eb4e71951a8f1cd3e0d343a9ff
2015-11-19 02:44:56 -08:00
Wouter van Oortmerssen 7101224d86 Reworked reflection.h to be more general.
e.g. support generic reading/writing from structs/vectors etc.

Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d
Tested: on Linux.
Bug: 22660837
2015-08-03 16:42:05 -07:00
Alex Ames ff1ac8ab5a 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
2015-02-04 14:39:53 -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
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