mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-17 23:06:31 +00:00
Adds proper access types for swift object api & flatbuffers & grpc (#6081)
Fixes accessor in greeter.swift Small fix for ci
This commit is contained in:
@@ -59,17 +59,21 @@ class FlatBufMethod : public grpc_generator::Method {
|
||||
|
||||
std::string name() const { return method_->name; }
|
||||
|
||||
// TODO: This method need to incorporate namespace for C++ side. Other language bindings
|
||||
// simply don't use this method.
|
||||
// TODO: This method need to incorporate namespace for C++ side. Other
|
||||
// language bindings simply don't use this method.
|
||||
std::string GRPCType(const StructDef &sd) const {
|
||||
return "flatbuffers::grpc::Message<" + sd.name + ">";
|
||||
}
|
||||
|
||||
std::vector<std::string> get_input_namespace_parts() const { return (*method_->request).defined_namespace->components; }
|
||||
std::vector<std::string> get_input_namespace_parts() const {
|
||||
return (*method_->request).defined_namespace->components;
|
||||
}
|
||||
|
||||
std::string get_input_type_name() const { return (*method_->request).name; }
|
||||
|
||||
std::vector<std::string> get_output_namespace_parts() const { return (*method_->response).defined_namespace->components; }
|
||||
std::vector<std::string> get_output_namespace_parts() const {
|
||||
return (*method_->response).defined_namespace->components;
|
||||
}
|
||||
|
||||
std::string get_output_type_name() const { return (*method_->response).name; }
|
||||
|
||||
@@ -117,9 +121,14 @@ class FlatBufService : public grpc_generator::Service {
|
||||
return service_->doc_comment;
|
||||
}
|
||||
|
||||
std::vector<grpc::string> namespace_parts() const { return service_->defined_namespace->components; }
|
||||
std::vector<grpc::string> namespace_parts() const {
|
||||
return service_->defined_namespace->components;
|
||||
}
|
||||
|
||||
std::string name() const { return service_->name; }
|
||||
bool is_internal() const {
|
||||
return service_->Definition::attributes.Lookup("private") ? true : false;
|
||||
}
|
||||
|
||||
int method_count() const {
|
||||
return static_cast<int>(service_->calls.vec.size());
|
||||
|
||||
Reference in New Issue
Block a user