* [C#] Fix and improve project files
* "net35" target included for Unity 5
* "net46" target included for Unity 2017
* "netstandard2.0" target included for Unity 2018 and general use
* "netstandard2.1" target included for Span<T> support
Included project properties for defining UNSAFE_BYTEBUFFER, BYTEBUFFER_NO_BOUNDS_CHECK, and ENABLE_SPAN_T conditional compilation symbols.
* Add documentation on building for C#
* Added missing EndTable() call to VerifyObject()
VerifyObject called VerifyTableStart() but not EndTable(). This made Verifier::VerifyComplexity() increase depth_ with each table, not with the depth of tables.
https://groups.google.com/forum/#!topic/flatbuffers/OpxtW5UFAdg
* Added Check to VerifyAlignment
https://stackoverflow.com/questions/59376308/flatbuffers-verifier-returns-false-without-any-assertion-flatbuffers-debug-veri
* Add GetStringView (Convenience function to get string_view from a String returning an empty string_view on null pointer) like GetString, GetCstring
* flatc should warn, when an attribute is attached more than once.
flatc.exe -b duplicate.fbs
warning: duplicate.fbs(5, 36): warning: attribute already found: priority
duplicate.fbs:
namespace MyGame;
attribute "priority";
table Monster (priority:1, priority:2) {
}
root_type Monster;
* [Python] Codegen SizeOf classmethod for structs
This codegens a `SizeOf()` classmethod for all structs since we can't
determine the size of a FlatBuffer generated struct from Python otherwise.
* [JS/TS] Codegen sizeOf static method for structs
This codegens a `sizeOf()` static method for all structs since we can't
determine the size of a FlatBuffer generated struct from JavaScript or
TypeScript otherwise.
Add static cast from float to double in flexbuffers.h to avoid implicit double promotion error. This error is surfacing during the tensorflow lite for microcontrollers build since we enabled -Werror and -Wdouble-promotion.
* ENABLE_SPAN_T doesn't require UNSAFE_BYTEBUFFER.
Change to ENABLE_SPAN_T that doesn't require UNSAFE_BYTEBUFFER.
* Selectable framework.
Changed target framework to allow selection of 2.0 or 2.1 (or higher)
* Added target framework version check.
* Add core test project.
* Added run on .Net Core.
* [C#] Fix and improve project files
* "net35" target included for Unity 5
* "net46" target included for Unity 2017
* "netstandard2.0" target included for Unity 2018 and general use
* "netstandard2.1" target included for Span<T> support
Included project properties for defining UNSAFE_BYTEBUFFER, BYTEBUFFER_NO_BOUNDS_CHECK, and ENABLE_SPAN_T conditional compiler constants.
* Add documentation on building for C#
This commit adds replacement of `::tolower` and `::toupper`.
Added CharToLower and CharToUpper routines reduce the number of cast operators
that required for correct usage of standard C/C++ `::tolower/toupper` routines.
This optionally generates a static `getFullyQualifiedName()` function to get
the fully-qualified name of a type in JavaScript and TypeScript in a similar
fashion to the C++ codegen.
Related with issue #6113.
`(old_buf_size & 0xC0000000) != 0` checks if we can duplicate old_buf_size
and still be under 2GB (by checking if bit 30 or 31 is 1). This doesn't
allow buffers larger than 1GB.
The strategy now is to allocate a buffer with the maximum array size
when we detect that we are overflowing the 2GB.
Also changed default buffer size to 1024.
* Adding FlexBuffers support for Dart language
* Introduce snapshot method.
* Fix docu
* Replacing extension methods with static methods in order to support older Dart version
* Improving code based on PR feedback. Mainly rename refactoring.
* Addressing all PR feedback which does not need clarification
* exchange dynamic type with Object
* Adds better API documentation.
[] operator throws a very descriptive exception in case of a bad key.
* Implementation of JavaScript FlexBuffers decoder
* implements JS FlexBuffers builder
* replacing _toF32 with Math.fround
* Introducing test for BigInt number
* Moving functions from BitWitdth & ValueType object into BitWidthUtil and ValueTypeUtil accordingly.
Removing defensive checks.
Introducing fix for large int numbers by converting them to BigInt type.
Introducing handling for BigInt type in `add` method.
Using TextEncoder and Decoder to handle string / utf8 conversion.
* rename variable
* Lets user turn deduplication strategies for strings, keys and vector of keys off while building FlexBuffer.
Implements quick sort and choses quick sort if the number of keys is bigger then 20.
Removes unnecessary dict lookups in BitWidthUtil helper functions
* make iwidth and uwidth computation simpler and faster
* Making redInt and readUint a bit faster and shim the BigInt / BigUint usage
* Fixing a bug in FlexBuffers JS, where offsets and lengths are stored and read as int and not as uint values.
* Fixing a bug in FlexBuffers Dart, where offset and length values are stored and read as int values instead of uint values
* Adding FlexBuffers support for Dart language
* Introduce snapshot method.
* Fix docu
* Replacing extension methods with static methods in order to support older Dart version
* Improving code based on PR feedback. Mainly rename refactoring.
* Addressing all PR feedback which does not need clarification
* exchange dynamic type with Object
* Adds better API documentation.
[] operator throws a very descriptive exception in case of a bad key.
* Implementation of JavaScript FlexBuffers decoder
* implements JS FlexBuffers builder
* replacing _toF32 with Math.fround
* Introducing test for BigInt number
* Moving functions from BitWitdth & ValueType object into BitWidthUtil and ValueTypeUtil accordingly.
Removing defensive checks.
Introducing fix for large int numbers by converting them to BigInt type.
Introducing handling for BigInt type in `add` method.
Using TextEncoder and Decoder to handle string / utf8 conversion.
* rename variable
* Lets user turn deduplication strategies for strings, keys and vector of keys off while building FlexBuffer.
Implements quick sort and choses quick sort if the number of keys is bigger then 20.
Removes unnecessary dict lookups in BitWidthUtil helper functions
* make iwidth and uwidth computation simpler and faster
* Making redInt and readUint a bit faster and shim the BigInt / BigUint usage
This commit performs refactoring (Extract Method) of the C++ code generator.
It extracts code generation of a table getter/mutator into separated methods.
* Attach JvmStatic annotation to each method of companion object
Kotlin does not have static accessor so companion object used instead of static.
It's so natural. But when use kotlin companion object methods on java it is very inconvenient.
```java
GeneratedClassByFlatBuffer.Companion.someMethod()
```
If use @JvmStatic annotation it can be shorten like below.
```java
GeneratedClassByFlatBuffer.someMethod()
```
* Formatting by Idea Google C++ style
* Add comments - Commit for missing cla
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Add comments - Commit for missing cla
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Reset code formatting except modified lines
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Pass missing flag to validateVersion method
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Add annotations to missing method in companion object
* addVector
* createVector
* endVector
* tableCreator
And also I tried add compiler option for generate annotation who don't like this operation.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Modify unmatched option name in compiler usage
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Add missing operation for finishSizePrefixed and finishStructBuffer method.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Add compiled example with --kotlin-gen-jvmstatic option.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Fix Compiler.md
Change option name from --gen-jvm-static-annotation to --kotlin-gen-jvmstatic
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Use IDLOptions reference instead of bool parameter.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Change option name - kotlin_gen_jvmstatic to gen_jvmstatic
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Use IDLOptions reference instead of bool parameter and missing process @JvmStatic as suffix.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Add code generation for --gen-jvmstatic option
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Miss typo directory for including.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Miss typo variable suffix for including.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Fix camel case to snake case.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Rollback generate code for gen_jvmstatic option.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Delete generated test files.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* add missing new line at end of file.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
* Remove generated test file by command line.
Signed-off-by: Yoon KyongSik <sam1287@gmail.com>
Co-authored-by: sam <sam@jennifersoft.com>
* Cleaned up .NET testing script for Mono
Cleaned up the .NET testing script to make it a little better. It
purposefully doesn't delete the .NET installer and SDk after running the
script, so that they can be used in subsequent invocations. This greatly
speeds up the script.
The downloaded files are ignored by git by default. They can be
explicitly cleaned up by runnning the clean script (clean.sh).
* Trying using older Version indicator
* Remove lins to monsterdata and reference it directly.
* Updated appveryor script to remove copying of files no longer needed
* Continue to update appveyor script to work. Disabled CS0169 in ByteBufferTest
* [TS] Fix four bugs with imported types in TypeScript.
* When a type had a vector of imported enums:
1) the enum type's file wasn't added to the generated code's list of
imports; and
2) the enum wasn't prefixed with the NS<hash> prefix and wasn't getting
resolved; but
3) non-enum types (ie, "flatbuffers.Offset") were getting the NS<hash>
prefix when they weren't.
* Also, type name prefixes weren't properly attributed with imported
structs in unions because the source definition passed to the typename
prefixing method was for the union, not for the location of the imported
struct.
* clang fmt
* Use of enum_def / struct_def for prefixing types needs to have the files
added to imported files when not generating all types.
* clang fmt
This PR attempts to switch namespace from public enum back to ordinary
concat with _ in Swift. This kept style similar with protobuf, but
different from other popular style guide in Swift.
This is needed because previously, when we do `public enum`, we don't
really know when to declare and when to extend (extension). With namespace
implementation in this PR, there is no such ambiguity.
Adds swift test code
Replaces if statments
Adds swift to supported languages for optionals
Moved std::string to auto
Adds nullable scalars support in object api
* [C++] Fix compiler error from deleted assignment operator (#6036)
The assignment operator of the `buf_` member is deleted, we cannot call it from the assignment operator of the `TableKeyComparator` struct.
=> Also delete the assignment operator of the `TableKeyComparator` struct (already private anyhow).
* [C++] Fix compiler error from deleted assignment operator (#6036) - fix extraneous semicolon
The assignment operator of the `buf_` member is deleted, we cannot call it from the assignment operator of the `TableKeyComparator` struct.
=> Also delete the assignment operator of the `TableKeyComparator` struct (already private anyhow).
* First draft of rust optionals
* Code cleanup around ftBool and ftVectorOfBool
* Tests for Rust optional scalars
* test bools too
Co-authored-by: Casper Neo <cneo@google.com>
This is the first step to upgrade grpc dependency to the latest version.
- Patch protobuf 3.6.1. and grpc 1.15.1 to fix build errors when using the latest Bazel version (3.4.1).
- Add grpc/tests:grpc_test. One can kick off tests in Bazel by calling `bazel test grpc/tests/...`.
- Add missing build targets in tests/BUILD in order to support grpc/tests/BUILD