James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 1 | // Generated by the gRPC C++ plugin. |
| 2 | // If you make any local change, they will be lost. |
| 3 | // source: monster_test |
| 4 | |
| 5 | #include "monster_test_generated.grpc.fb.h" |
| 6 | |
| 7 | #include <grpcpp/impl/codegen/async_stream.h> |
| 8 | #include <grpcpp/impl/codegen/async_unary_call.h> |
| 9 | #include <grpcpp/impl/codegen/channel_interface.h> |
| 10 | #include <grpcpp/impl/codegen/client_unary_call.h> |
| 11 | #include <grpcpp/impl/codegen/method_handler.h> |
| 12 | #include <grpcpp/impl/codegen/rpc_service_method.h> |
| 13 | #include <grpcpp/impl/codegen/service_type.h> |
| 14 | #include <grpcpp/impl/codegen/sync_stream.h> |
| 15 | namespace MyGame { |
| 16 | namespace Example { |
| 17 | |
| 18 | static const char* MonsterStorage_method_names[] = { |
| 19 | "/MyGame.Example.MonsterStorage/Store", |
| 20 | "/MyGame.Example.MonsterStorage/Retrieve", |
| 21 | "/MyGame.Example.MonsterStorage/GetMaxHitPoint", |
| 22 | "/MyGame.Example.MonsterStorage/GetMinMaxHitPoints", |
| 23 | }; |
| 24 | |
| 25 | std::unique_ptr< MonsterStorage::Stub> MonsterStorage::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& /*options*/) { |
| 26 | std::unique_ptr< MonsterStorage::Stub> stub(new MonsterStorage::Stub(channel)); |
| 27 | return stub; |
| 28 | } |
| 29 | |
| 30 | MonsterStorage::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) |
| 31 | : channel_(channel) , rpcmethod_Store_(MonsterStorage_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) |
| 32 | , rpcmethod_Retrieve_(MonsterStorage_method_names[1], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel) |
| 33 | , rpcmethod_GetMaxHitPoint_(MonsterStorage_method_names[2], ::grpc::internal::RpcMethod::CLIENT_STREAMING, channel) |
| 34 | , rpcmethod_GetMinMaxHitPoints_(MonsterStorage_method_names[3], ::grpc::internal::RpcMethod::BIDI_STREAMING, channel) |
| 35 | {} |
| 36 | |
| 37 | ::grpc::Status MonsterStorage::Stub::Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) { |
| 38 | return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Store_, context, request, response); |
| 39 | } |
| 40 | |
| 41 | ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { |
| 42 | return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, true); |
| 43 | } |
| 44 | |
| 45 | ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { |
| 46 | return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_Store_, context, request, false); |
| 47 | } |
| 48 | |
| 49 | ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) { |
| 50 | return ::grpc::internal::ClientReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_Retrieve_, context, request); |
| 51 | } |
| 52 | |
| 53 | ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) { |
| 54 | return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, true, tag); |
| 55 | } |
| 56 | |
| 57 | ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) { |
| 58 | return ::grpc::internal::ClientAsyncReaderFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_Retrieve_, context, request, false, nullptr); |
| 59 | } |
| 60 | |
| 61 | ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) { |
| 62 | return ::grpc::internal::ClientWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), rpcmethod_GetMaxHitPoint_, context, response); |
| 63 | } |
| 64 | |
| 65 | ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) { |
| 66 | return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, true, tag); |
| 67 | } |
| 68 | |
| 69 | ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* MonsterStorage::Stub::PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) { |
| 70 | return ::grpc::internal::ClientAsyncWriterFactory< flatbuffers::grpc::Message<Monster>>::Create(channel_.get(), cq, rpcmethod_GetMaxHitPoint_, context, response, false, nullptr); |
| 71 | } |
| 72 | |
| 73 | ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::GetMinMaxHitPointsRaw(::grpc::ClientContext* context) { |
| 74 | return ::grpc::internal::ClientReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), rpcmethod_GetMinMaxHitPoints_, context); |
| 75 | } |
| 76 | |
| 77 | ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
| 78 | return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, true, tag); |
| 79 | } |
| 80 | |
| 81 | ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* MonsterStorage::Stub::PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { |
| 82 | return ::grpc::internal::ClientAsyncReaderWriterFactory< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>::Create(channel_.get(), cq, rpcmethod_GetMinMaxHitPoints_, context, false, nullptr); |
| 83 | } |
| 84 | |
| 85 | MonsterStorage::Service::Service() { |
| 86 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 87 | MonsterStorage_method_names[0], |
| 88 | ::grpc::internal::RpcMethod::NORMAL_RPC, |
| 89 | new ::grpc::internal::RpcMethodHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 90 | std::mem_fn(&MonsterStorage::Service::Store), this))); |
| 91 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 92 | MonsterStorage_method_names[1], |
| 93 | ::grpc::internal::RpcMethod::SERVER_STREAMING, |
| 94 | new ::grpc::internal::ServerStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>( |
| 95 | std::mem_fn(&MonsterStorage::Service::Retrieve), this))); |
| 96 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 97 | MonsterStorage_method_names[2], |
| 98 | ::grpc::internal::RpcMethod::CLIENT_STREAMING, |
| 99 | new ::grpc::internal::ClientStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 100 | std::mem_fn(&MonsterStorage::Service::GetMaxHitPoint), this))); |
| 101 | AddMethod(new ::grpc::internal::RpcServiceMethod( |
| 102 | MonsterStorage_method_names[3], |
| 103 | ::grpc::internal::RpcMethod::BIDI_STREAMING, |
| 104 | new ::grpc::internal::BidiStreamingHandler< MonsterStorage::Service, flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>( |
| 105 | std::mem_fn(&MonsterStorage::Service::GetMinMaxHitPoints), this))); |
| 106 | } |
| 107 | |
| 108 | MonsterStorage::Service::~Service() { |
| 109 | } |
| 110 | |
| 111 | ::grpc::Status MonsterStorage::Service::Store(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Monster>* /*request*/, flatbuffers::grpc::Message<Stat>* /*response*/) { |
| 112 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 113 | } |
| 114 | |
| 115 | ::grpc::Status MonsterStorage::Service::Retrieve(::grpc::ServerContext* /*context*/, const flatbuffers::grpc::Message<Stat>* /*request*/, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* /*writer*/) { |
| 116 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 117 | } |
| 118 | |
| 119 | ::grpc::Status MonsterStorage::Service::GetMaxHitPoint(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* /*reader*/, flatbuffers::grpc::Message<Stat>* /*response*/) { |
| 120 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 121 | } |
| 122 | |
| 123 | ::grpc::Status MonsterStorage::Service::GetMinMaxHitPoints(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* /*stream*/) { |
| 124 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 125 | } |
| 126 | |
| 127 | |
| 128 | } // namespace MyGame |
| 129 | } // namespace Example |
| 130 | |