Fix formatting

pull/23469/head
Karthik Ravi Shankar 4 years ago
parent c0ade4d05a
commit 011840d398
  1. 57
      include/grpcpp/generic/generic_stub.h

@ -52,7 +52,8 @@ class TemplatedGenericStub final {
/// start it. Let it be started explicitly with StartCall and a tag.
/// The return value only indicates whether or not registration of the call
/// succeeded (i.e. the call won't proceed if the return value is nullptr).
std::unique_ptr<::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>
std::unique_ptr<
::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>
PrepareCall(ClientContext* context, const std::string& method,
::grpc_impl::CompletionQueue* cq) {
return CallInternal(channel_.get(), context, method, cq, false, nullptr);
@ -62,15 +63,18 @@ class TemplatedGenericStub final {
/// start it. Let it be started explicitly with StartCall.
/// The return value only indicates whether or not registration of the call
/// succeeded (i.e. the call won't proceed if the return value is nullptr).
std::unique_ptr<::grpc_impl::ClientAsyncResponseReader<ResponseType>> PrepareUnaryCall(
ClientContext* context, const std::string& method,
const RequestType& request, ::grpc_impl::CompletionQueue* cq) {
return std::unique_ptr<::grpc_impl::ClientAsyncResponseReader<ResponseType>>(
grpc_impl::internal::ClientAsyncResponseReaderFactory<ResponseType>::Create(
channel_.get(), cq,
grpc::internal::RpcMethod(method.c_str(),
std::unique_ptr<::grpc_impl::ClientAsyncResponseReader<ResponseType>>
PrepareUnaryCall(ClientContext* context, const std::string& method,
const RequestType& request,
::grpc_impl::CompletionQueue* cq) {
return std::unique_ptr<
::grpc_impl::ClientAsyncResponseReader<ResponseType>>(
grpc_impl::internal::ClientAsyncResponseReaderFactory<
ResponseType>::Create(channel_.get(), cq,
grpc::internal::RpcMethod(
method.c_str(),
grpc::internal::RpcMethod::NORMAL_RPC),
context, request, false));
context, request, false));
}
/// DEPRECATED for multi-threaded use
@ -79,9 +83,10 @@ class TemplatedGenericStub final {
/// (i.e, initial metadata has been sent).
/// The return value only indicates whether or not registration of the call
/// succeeded (i.e. the call won't proceed if the return value is nullptr).
std::unique_ptr<::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>> Call(
ClientContext* context, const std::string& method, ::grpc_impl::CompletionQueue* cq,
void* tag) {
std::unique_ptr<
::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>
Call(ClientContext* context, const std::string& method,
::grpc_impl::CompletionQueue* cq, void* tag) {
return CallInternal(channel_.get(), context, method, cq, true, tag);
}
@ -178,7 +183,8 @@ class TemplatedGenericStub final {
const RequestType* request,
ResponseType* response,
::grpc_impl::ClientUnaryReactor* reactor) {
::grpc_impl::internal::ClientCallbackUnaryFactory::Create<RequestType, ResponseType>(
::grpc_impl::internal::ClientCallbackUnaryFactory::Create<RequestType,
ResponseType>(
channel_.get(),
grpc::internal::RpcMethod(method.c_str(),
grpc::internal::RpcMethod::NORMAL_RPC),
@ -188,20 +194,23 @@ class TemplatedGenericStub final {
void PrepareBidiStreamingCallInternal(
ClientContext* context, const std::string& method,
::grpc_impl::ClientBidiReactor<RequestType, ResponseType>* reactor) {
::grpc_impl::internal::ClientCallbackReaderWriterFactory<RequestType, ResponseType>::
Create(channel_.get(),
grpc::internal::RpcMethod(
method.c_str(), grpc::internal::RpcMethod::BIDI_STREAMING),
context, reactor);
::grpc_impl::internal::
ClientCallbackReaderWriterFactory<RequestType, ResponseType>::Create(
channel_.get(),
grpc::internal::RpcMethod(
method.c_str(), grpc::internal::RpcMethod::BIDI_STREAMING),
context, reactor);
}
std::unique_ptr<::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>
std::unique_ptr<
::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>
CallInternal(grpc::ChannelInterface* channel, ClientContext* context,
const std::string& method, ::grpc_impl::CompletionQueue* cq, bool start,
void* tag) {
return std::unique_ptr<::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>(
::grpc_impl::internal::ClientAsyncReaderWriterFactory<RequestType, ResponseType>::
Create(
const std::string& method, ::grpc_impl::CompletionQueue* cq,
bool start, void* tag) {
return std::unique_ptr<
::grpc_impl::ClientAsyncReaderWriter<RequestType, ResponseType>>(
::grpc_impl::internal::
ClientAsyncReaderWriterFactory<RequestType, ResponseType>::Create(
channel, cq,
grpc::internal::RpcMethod(
method.c_str(), grpc::internal::RpcMethod::BIDI_STREAMING),

Loading…
Cancel
Save