-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpi.grpc.pb.h
154 lines (144 loc) · 7.8 KB
/
mpi.grpc.pb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: mpi.proto
// Original file comments:
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef GRPC_mpi_2eproto__INCLUDED
#define GRPC_mpi_2eproto__INCLUDED
#include "mpi.pb.h"
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
#include <grpcpp/impl/codegen/method_handler_impl.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/impl/codegen/rpc_method.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/stub_options.h>
#include <grpcpp/impl/codegen/sync_stream.h>
namespace grpc {
class CompletionQueue;
class Channel;
class ServerCompletionQueue;
class ServerContext;
} // namespace grpc
namespace mpis {
// The service definition.
class MPIService final {
public:
static constexpr char const* service_full_name() {
return "mpis.MPIService";
}
class StubInterface {
public:
virtual ~StubInterface() {}
virtual ::grpc::Status ISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::mpis::ReplyContext* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>> AsyncISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>>(AsyncISendRequestRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>> PrepareAsyncISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>>(PrepareAsyncISendRequestRaw(context, request, cq));
}
private:
virtual ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>* AsyncISendRequestRaw(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::mpis::ReplyContext>* PrepareAsyncISendRequestRaw(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) = 0;
};
class Stub final : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
::grpc::Status ISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::mpis::ReplyContext* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>> AsyncISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>>(AsyncISendRequestRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>> PrepareAsyncISendRequest(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>>(PrepareAsyncISendRequestRaw(context, request, cq));
}
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>* AsyncISendRequestRaw(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::mpis::ReplyContext>* PrepareAsyncISendRequestRaw(::grpc::ClientContext* context, const ::mpis::RequestContext& request, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_ISendRequest_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
virtual ::grpc::Status ISendRequest(::grpc::ServerContext* context, const ::mpis::RequestContext* request, ::mpis::ReplyContext* response);
};
template <class BaseClass>
class WithAsyncMethod_ISendRequest : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithAsyncMethod_ISendRequest() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_ISendRequest() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ISendRequest(::grpc::ServerContext* context, const ::mpis::RequestContext* request, ::mpis::ReplyContext* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestISendRequest(::grpc::ServerContext* context, ::mpis::RequestContext* request, ::grpc::ServerAsyncResponseWriter< ::mpis::ReplyContext>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_ISendRequest<Service > AsyncService;
template <class BaseClass>
class WithGenericMethod_ISendRequest : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithGenericMethod_ISendRequest() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_ISendRequest() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ISendRequest(::grpc::ServerContext* context, const ::mpis::RequestContext* request, ::mpis::ReplyContext* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithStreamedUnaryMethod_ISendRequest : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithStreamedUnaryMethod_ISendRequest() {
::grpc::Service::MarkMethodStreamed(0,
new ::grpc::internal::StreamedUnaryHandler< ::mpis::RequestContext, ::mpis::ReplyContext>(std::bind(&WithStreamedUnaryMethod_ISendRequest<BaseClass>::StreamedISendRequest, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_ISendRequest() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status ISendRequest(::grpc::ServerContext* context, const ::mpis::RequestContext* request, ::mpis::ReplyContext* response) final override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedISendRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mpis::RequestContext,::mpis::ReplyContext>* server_unary_streamer) = 0;
};
typedef WithStreamedUnaryMethod_ISendRequest<Service > StreamedUnaryService;
typedef Service SplitStreamedService;
typedef WithStreamedUnaryMethod_ISendRequest<Service > StreamedService;
};
} // namespace mpis
#endif // GRPC_mpi_2eproto__INCLUDED