2014-01-28 00:52:49 +00:00
|
|
|
# Using the schema compiler
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
2014-07-11 21:01:55 +00:00
|
|
|
flatc [ -c ] [ -j ] [ -b ] [ -t ] [ -o PATH ] [ -S ] FILES...
|
|
|
|
[ -- FILES...]
|
2014-01-28 00:52:49 +00:00
|
|
|
|
|
|
|
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
|
2014-07-11 21:01:55 +00:00
|
|
|
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
|
2014-01-28 00:52:49 +00:00
|
|
|
be generated for each file processed:
|
|
|
|
|
|
|
|
- `-c` : Generate a C++ header for all definitions in this file (as
|
2014-07-11 21:01:55 +00:00
|
|
|
`filename_generated.h`). Skipped for data.
|
2014-01-28 00:52:49 +00:00
|
|
|
|
2014-07-11 21:01:55 +00:00
|
|
|
- `-j` : Generate Java classes. Skipped for data.
|
2014-01-28 00:52:49 +00:00
|
|
|
|
|
|
|
- `-b` : If data is contained in this file, generate a
|
2014-07-11 21:01:55 +00:00
|
|
|
`filename.bin` containing the binary flatbuffer.
|
2014-01-28 00:52:49 +00:00
|
|
|
|
|
|
|
- `-t` : If data is contained in this file, generate a
|
2014-07-11 21:01:55 +00:00
|
|
|
`filename.json` representing the data in the flatbuffer.
|
2014-01-28 00:52:49 +00:00
|
|
|
|
2014-07-08 23:35:14 +00:00
|
|
|
- `-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.
|
2014-08-21 23:11:18 +00:00
|
|
|
|
|
|
|
- `-P` : Don't prefix enum values in generated C++ by their enum type.
|
|
|
|
|