mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Mutable FlatBuffers: in-place updates.
This commit contains the first step in providing mutable FlatBuffers, non-const accessors and mutation functions for existing fields generated from --gen-mutable. Change-Id: Iebee3975f05c1001f8e22824725edeaa6d85fbee Tested: on Linux. Bug: 15777024
This commit is contained in:
@@ -89,6 +89,7 @@ static void Error(const char *err, const char *obj, bool usage,
|
||||
" --no-prefix Don\'t prefix enum values with the enum type in C++.\n"
|
||||
" --gen-includes Generate include statements for included schemas the\n"
|
||||
" generated file depends on (C++).\n"
|
||||
" --gen-mutable Generate accessors that can mutate buffers in-place.\n"
|
||||
" --proto Input is a .proto, translate to .fbs.\n"
|
||||
"FILEs may depend on declarations in earlier files.\n"
|
||||
"FILEs after the -- must be binary flatbuffer format files.\n"
|
||||
@@ -128,6 +129,8 @@ int main(int argc, const char *argv[]) {
|
||||
opts.strict_json = true;
|
||||
} else if(opt == "--no-prefix") {
|
||||
opts.prefixed_enums = false;
|
||||
} else if(opt == "--gen-mutable") {
|
||||
opts.mutable_buffer = true;
|
||||
} else if(opt == "--gen-includes") {
|
||||
opts.include_dependence_headers = true;
|
||||
} else if(opt == "--") { // Separator between text and binary inputs.
|
||||
|
||||
Reference in New Issue
Block a user