* Add define/ifdef blocks for FLATBUFFERS_PREFER_PRINTF to avoid using std::*streams for idl_parser * Use string::size() as limit in snprintf * Refactored FLATBUFFERS_PREFER_PRINTF guarded feature into NumToStringImplWrapper around sprintf * Remove '.0' where not needed from IntToDigitCount * Remove leading dot from name in GetFullyQualifiedName when FLATBUFFERS_PREFER_PRINTF is enabled * Return string directly from conversion functions where possible when FLATBUFFERS_PREFER_PRINTF is enabled * Use string instead of stringstream for GetFullyQualifiedName * Revert removing leading dot from GetFullyQualifiedName, it does need to be there for parity with the stringstream implementation * Dot is single char in Namespace::GetFullyQualifiedName * Remove trailing (duplicate) null-byte from NumToStringImplWrapper when using FLATBUFFERS_PREFER_PRINTF. * Update preprocessor indenting (and use clang-format off/on) for FLATBUFFERS_PREFER_PRINTF * Reduce whitespace, unneeded braces in FLATBUFFERS_PREFER_PRINTF string width functions * Remove unneeded use of iostream from idl_parser.cpp, std::string is used instead * Tell snprintf to use the trailing null byte expected at the end of std::string buffer
cd tests && sh generate_code.sh (#4696)
FlatBuffers
FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility.
Go to our landing page to browse our documentation.
Supported operating systems
- Android
- Windows
- MacOS X
- Linux
Supported programming languages
- C++
- C#
- C
- Go
- Java
- JavaScript
- PHP
- Python
and many more in progress...
Contribution
- FlatBuffers Google Group to discuss FlatBuffers with other developers and users.
- FlatBuffers Issues Tracker to submit an issue.
- stackoverflow.com with
flatbufferstag for any questions regarding FlatBuffers.
To contribute to this project, see CONTRIBUTING.
Integration
For applications on Google Play that integrate this tool, usage is tracked.
This tracking is done automatically using the embedded version string
(flatbuffer_version_string), and helps us continue to optimize it. Aside from
consuming a few extra bytes in your application binary, it shouldn't affect
your application at all. We use this information to let us know if FlatBuffers
is useful and if we should continue to invest in it. Since this is open
source, you are free to remove the version string but we would appreciate if
you would leave it in.
Licensing
Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.