Skip to content
Snippets Groups Projects
  1. Mar 12, 2018
    • Robert Schmidtke's avatar
      Java/C#/Python prefixed size support (#4445) · 08cf50c5
      Robert Schmidtke authored
      * initial changes to support size prefixed buffers in Java
      
      * add slice equivalent to CSharp ByteBuffer
      
      * resolve TODO for slicing in CSharp code generation
      
      * add newly generated Java and CSharp test sources
      
      * fix typo in comment
      
      * add FinishSizePrefixed methods to CSharp FlatBufferBuilder as well
      
      * add option to allow writing the prefix as well
      
      * generate size-prefixed monster binary as well
      
      * extend JavaTest to test the size prefixed binary as well
      
      * use constants for size prefix length
      
      * fuse common code for getRootAs and getSizePrefixedRootAs
      
      * pulled file identifier out of if
      
      * add FinishSizePrefixed, GetSizePrefixedRootAs support for Python
      
      * Revert "extend JavaTest to test the size prefixed binary as well"
      
      This reverts commit 68be4420dda47e8d0600bb19691f03be71503a68.
      
      * Revert "generate size-prefixed monster binary as well"
      
      This reverts commit 2939516fdf78df4f061c627221e232b312301417.
      
      * fix ByteBuffer.cs Slice() method; add proper CSharp and Java tests
      
      * fix unused parameter
      
      * increment version number
      
      * pulled out generated methods into separate utility class
      
      * pulled out generated methods into separate utility class for Python
      
      * fix indentation
      
      * remove unnecessary comment
      
      * fix newline and copyright
      
      * add ByteBufferUtil to csproj compilation
      
      * hide ByteBuffer's internal data; track offset into parent's array
      
      * test unsafe versions as well; compile and run in debug mode
      
      * clarify help text for size prefix
      
      * move ByteBuffer slicing behavior to subclass
      
      * fix protection levels
      
      * add size prefix support for text generation
      
      * add ByteBufferSlice to csproj compilation
      
      * revert size prefix handling for nested buffers
      
      * use duplicate instead of slice for removing size prefix
      
      * remove slice subclass and use duplicate for removing size prefix
      
      * remove slice specific tests
      
      * remove superfluous command line option
      08cf50c5
  2. Mar 08, 2018
  3. Feb 05, 2018
  4. Dec 01, 2017
  5. Nov 06, 2017
  6. Oct 16, 2017
  7. Aug 11, 2017
    • Kamil Rojewski's avatar
      Vector of unions for TS/JS and PHP (#4404) · 46bb05d9
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      46bb05d9
  8. Jul 20, 2017
    • Stewart Miles's avatar
      C++98 (stlport) support for core FlatBuffers and FlexBuffers. · a8923222
      Stewart Miles authored
      * 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
      a8923222
  9. Apr 21, 2017
    • Kamil Rojewski's avatar
      TS tests fixes (#4265) · 808b44f8
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      808b44f8
  10. Apr 10, 2017
    • Kamil Rojewski's avatar
      TypeScript support (#4232) · 28e7dbd3
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      28e7dbd3
  11. Mar 29, 2017
  12. Nov 07, 2016
    • Michael Paulson's avatar
      chore(lint) (#4079) · d298adc4
      Michael Paulson authored
      * chore(lint)
      
      I accidentally let 2 pieces of lint in with my generated code.
      
      * fix(generate-code): I did not generate all the required code for tests.
      d298adc4
  13. Sep 06, 2016
  14. Jul 20, 2016
  15. Jul 05, 2016
  16. Jun 07, 2016
    • Romain Gilles's avatar
      Create a maven like project structure for java development. Make it OSGi... · 9875b0e0
      Romain Gilles authored
      Create a maven like project structure for java development. Make it OSGi compliant. Generate the flatbuffers code for testing (example).
      
      Java developer are mostly comfortable with maven project structure. One one the main concept behind maven is convention. If you follow the maven project convention then your development team will get more effective as they now this project structure and can easily find the production code versus the test code.
       In this pull request I have structured the java project around 2 main parts:
        * the `flatbuffers` project. This project is the api / lib project and contains the test code structure + an example of code generation for testing. This avoid to commit generated code. Pre-configure JUnit for test driven development and make this project OSGi compliant.
        * the `jmh` project. This project aims to provide a placeholder for micro-benchmarking. JMH is a 'de facto' standard for micro benchmarking you can find more details here: http://openjdk.java.net/projects/code-tools/jmh/
      
      For now I didn't move the JavaTest class but it could be a next step with a migration to the JUnit framework.
      The only impacts are the move of the class and the project structure => no code change.
      9875b0e0
  17. Jan 18, 2016
  18. Oct 15, 2015
    • Evan Wallace's avatar
      Add a test for JavaScript UTF-8 <=> UTF-16 conversion · 57a6dd47
      Evan Wallace authored
      JavaScript uses UTF-16 but FlatBuffers uses UTF-8. This commit tests the code
      that does the conversion between the two encodings. The last entry in the array
      is tricky because each code point actually requires two UTF-16 code units,
      unlike the other examples. The current JSON output of flatc actually handles
      this case incorrectly (it generates invalid JSON with UTF-8 code units). The
      generated JavaScript code passes these tests fine, however.
      57a6dd47
    • Evan Wallace's avatar
      Add support for JavaScript code generation · 224e33ed
      Evan Wallace authored
      This adds a JavaScript language target. The generated JavaScript uses Google
      Closure Compiler type annotations and can be compiled using the advanced
      compilation mode, which performs type checking and optimizations such as
      inlining and dead code elimination. The generated JavaScript also exports all
      generated symbols for use with Node.js and RequireJS. This export behavior
      can be turned off with the --no-js-exports flag for use with Google Closure
      Compiler.
      224e33ed
  19. Aug 01, 2015
  20. Jun 16, 2015
  21. Jun 15, 2015
  22. May 12, 2015
    • rw's avatar
      Port FlatBuffers to Python. · 48dfc69e
      rw authored
      Implement code generation and self-contained runtime library for Python.
      
      The test suite verifies:
        - Correctness of generated Python code by comparing output to that of
          the other language ports.
        - The exact bytes in the Builder buffer during many scenarios.
        - Vtable deduplication correctness.
        - Edge cases for table construction, via a fuzzer derived from the Go
          implementation.
        - All code is simultaneously valid in Python 2.6, 2.7, and 3.4.
      
      The test suite includes benchmarks for:
        - Building 'gold' data.
        - Parsing 'gold' data.
        - Deduplicating vtables.
      
      All tests pass on this author's system for the following Python
      implementations:
        - CPython 2.6.7
        - CPython 2.7.8
        - CPython 3.4.2
        - PyPy 2.5.0 (CPython 2.7.8 compatible)
      48dfc69e
  23. May 06, 2015
  24. Mar 27, 2015
  25. Mar 13, 2015
  26. Feb 17, 2015
    • Alex Ames's avatar
      Added the hash attribute to ints and longs. · d575321e
      Alex Ames authored
      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
      d575321e
  27. Jan 26, 2015
  28. Jan 16, 2015
  29. Sep 15, 2014
  30. Aug 22, 2014
  31. Aug 12, 2014
    • Wouter van Oortmerssen's avatar
      File identifier feature. · 5da7bda8
      Wouter van Oortmerssen authored
      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
      5da7bda8
  32. Jul 21, 2014
    • rw's avatar
      Port FlatBuffers to Go. · 74d5f370
      rw authored
      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
      74d5f370
  33. Jun 10, 2014
Loading