See -P option to flatc. Bug: 16814856 Change-Id: I855973df6afa27e0efa27cf9c4b4aee8a1fcdd22 Tested: on OS X.
1.4 KiB
Executable File
Using the schema compiler
Usage:
flatc [ -c ] [ -j ] [ -b ] [ -t ] [ -o PATH ] [ -S ] FILES...
[ -- FILES...]
The files are read and parsed in order, and can contain either schemas or data (see below). Later files can make use of definitions in earlier files.
-- indicates that the following files are binary files in
FlatBuffer format conforming to the schema(s) indicated before it.
Incompatible binary files currently will give unpredictable results (!)
Depending on the flags passed, additional files may be generated for each file processed:
-
-c: Generate a C++ header for all definitions in this file (asfilename_generated.h). Skipped for data. -
-j: Generate Java classes. Skipped for data. -
-b: If data is contained in this file, generate afilename.bincontaining the binary flatbuffer. -
-t: If data is contained in this file, generate afilename.jsonrepresenting the data in the flatbuffer. -
-o PATH: Output all generated files to PATH (either absolute, or relative to the current directory). If omitted, PATH will be the current directory. PATH should end in your systems path separator, e.g./or\. -
-S: Generate strict JSON (field names are enclosed in quotes). By default, no quotes are generated. -
-P: Don't prefix enum values in generated C++ by their enum type.