Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ set(FlatBuffers_Compiler_SRCS
src/bfbs_gen_lua.h
src/bfbs_gen_nim.h
src/bfbs_namer.h
include/codegen/idl_namer.h
include/codegen/namer.h
include/codegen/python.h
include/codegen/python.cc
include/flatbuffers/code_generators.h
Expand Down
43 changes: 41 additions & 2 deletions docs/source/Compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ Additional options:

- `--scoped-enums` : Use C++11 style scoped and strongly typed enums in
generated C++. This also implies `--no-prefix`.

- `--no-emit-min-max-enum-values` : Disable generation of MIN and MAX
enumerated values for scoped enums and prefixed enums.

- `--gen-includes` : (deprecated), this is the default behavior.
If the original behavior is required (no include
statements) use `--no-includes.`
Expand Down Expand Up @@ -238,5 +238,44 @@ Additional options:

- `--python-typing` : Generate Python type annotations

Additional gRPC options:

- `--grpc-filename-suffix`: `[C++]` An optional suffix for the generated
files' names. For example, compiling gRPC for C++ with
`--grpc-filename-suffix=.fbs` will generate `{name}.fbs.h` and
`{name}.fbs.cc` files.

- `--grpc-additional-header`: `[C++]` Additional headers to include in the
generated files.

- `--grpc-search-path`: `[C++]` An optional prefix for the gRPC runtime path.
For example, compiling gRPC for C++ with `--grpc-search-path=some/path` will
generate the following includes:

```cpp
#include "some/path/grpcpp/impl/codegen/async_stream.h"
#include "some/path/grpcpp/impl/codegen/async_unary_call.h"
#include "some/path/grpcpp/impl/codegen/method_handler.h"
...
```

- `--grpc-use-system-headers`: `[C++]` Whether to generate `#include <header>`
instead of `#include "header.h"` for all headers when compiling gRPC for
C++. For example, compiling gRPC for C++ with `--grpc-use-system-headers`
will generate the following includes:

```cpp
#include <some/path/grpcpp/impl/codegen/async_stream.h>
#include <some/path/grpcpp/impl/codegen/async_unary_call.h>
#include <some/path/grpcpp/impl/codegen/method_handler.h>
...
```

NOTE: This option can be negated with `--no-grpc-use-system-headers`.

- `--grpc-python-typed-handlers`: `[Python]` Whether to generate the typed
handlers that use the generated Python classes instead of raw bytes for
requests/responses.

NOTE: short-form options for generators are deprecated, use the long form
whenever possible.
2 changes: 2 additions & 0 deletions grpc/src/compiler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ cc_library(
visibility = ["//visibility:private"],
deps = [
"//:flatbuffers",
"//include/codegen:namer",
"//include/codegen:python",
],
)

Expand Down
Loading