mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 08:31:47 +00:00
* include service in reflection data (fixes #4639) * changes from review * regenerated test data
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
34cb163e38
commit
9bb88a026a
@@ -306,7 +306,7 @@ inline size_t InlineAlignment(const Type &type) {
|
||||
struct EnumVal {
|
||||
EnumVal(const std::string &_name, int64_t _val) : name(_name), value(_val) {}
|
||||
|
||||
Offset<reflection::EnumVal> Serialize(FlatBufferBuilder *builder) const;
|
||||
Offset<reflection::EnumVal> Serialize(FlatBufferBuilder *builder, const Parser &parser) const;
|
||||
|
||||
std::string name;
|
||||
std::vector<std::string> doc_comment;
|
||||
@@ -326,8 +326,7 @@ struct EnumDef : public Definition {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Offset<reflection::Enum> Serialize(FlatBufferBuilder *builder,
|
||||
const Parser &parser) const;
|
||||
Offset<reflection::Enum> Serialize(FlatBufferBuilder *builder, const Parser &parser) const;
|
||||
|
||||
SymbolTable<EnumVal> vals;
|
||||
bool is_union;
|
||||
@@ -342,14 +341,15 @@ inline bool EqualByName(const Type &a, const Type &b) {
|
||||
(a.enum_def == b.enum_def || a.enum_def->name == b.enum_def->name);
|
||||
}
|
||||
|
||||
struct RPCCall {
|
||||
std::string name;
|
||||
SymbolTable<Value> attributes;
|
||||
struct RPCCall : public Definition {
|
||||
Offset<reflection::RPCCall> Serialize(FlatBufferBuilder *builder, const Parser &parser) const;
|
||||
|
||||
StructDef *request, *response;
|
||||
std::vector<std::string> rpc_comment;
|
||||
};
|
||||
|
||||
struct ServiceDef : public Definition {
|
||||
Offset<reflection::Service> Serialize(FlatBufferBuilder *builder, const Parser &parser) const;
|
||||
|
||||
SymbolTable<RPCCall> calls;
|
||||
};
|
||||
|
||||
@@ -382,6 +382,7 @@ struct IDLOptions {
|
||||
std::string include_prefix;
|
||||
bool keep_include_path;
|
||||
bool binary_schema_comments;
|
||||
bool binary_schema_builtins;
|
||||
bool skip_flatbuffers_import;
|
||||
std::string go_import;
|
||||
std::string go_namespace;
|
||||
@@ -440,6 +441,7 @@ struct IDLOptions {
|
||||
allow_non_utf8(false),
|
||||
keep_include_path(false),
|
||||
binary_schema_comments(false),
|
||||
binary_schema_builtins(false),
|
||||
skip_flatbuffers_import(false),
|
||||
reexport_ts_modules(true),
|
||||
protobuf_ascii_alike(false),
|
||||
|
||||
Reference in New Issue
Block a user