1 // Generated by the gRPC C++ plugin. 2 // If you make any local change, they will be lost. 3 // source: monster_test 4 #ifndef GRPC_monster_5ftest__INCLUDED 5 #define GRPC_monster_5ftest__INCLUDED 6 7 #include "monster_test_generated.h" 8 #include "flatbuffers/grpc.h" 9 10 #include <grpcpp/impl/codegen/async_stream.h> 11 #include <grpcpp/impl/codegen/async_unary_call.h> 12 #include <grpcpp/impl/codegen/method_handler.h> 13 #include <grpcpp/impl/codegen/proto_utils.h> 14 #include <grpcpp/impl/codegen/rpc_method.h> 15 #include <grpcpp/impl/codegen/service_type.h> 16 #include <grpcpp/impl/codegen/status.h> 17 #include <grpcpp/impl/codegen/stub_options.h> 18 #include <grpcpp/impl/codegen/sync_stream.h> 19 20 namespace grpc { 21 class CompletionQueue; 22 class Channel; 23 class ServerCompletionQueue; 24 class ServerContext; 25 } // namespace grpc 26 27 namespace MyGame { 28 namespace Example { 29 30 class MonsterStorage final { 31 public: service_full_name()32 static constexpr char const* service_full_name() { 33 return "MyGame.Example.MonsterStorage"; 34 } 35 class StubInterface { 36 public: ~StubInterface()37 virtual ~StubInterface() {} 38 virtual ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) = 0; AsyncStore(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Monster> & request,::grpc::CompletionQueue * cq)39 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { 40 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>>(AsyncStoreRaw(context, request, cq)); 41 } PrepareAsyncStore(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Monster> & request,::grpc::CompletionQueue * cq)42 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>> PrepareAsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { 43 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>>(PrepareAsyncStoreRaw(context, request, cq)); 44 } Retrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request)45 std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) { 46 return std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>>(RetrieveRaw(context, request)); 47 } AsyncRetrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request,::grpc::CompletionQueue * cq,void * tag)48 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) { 49 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>>(AsyncRetrieveRaw(context, request, cq, tag)); 50 } PrepareAsyncRetrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request,::grpc::CompletionQueue * cq)51 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>> PrepareAsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) { 52 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncRetrieveRaw(context, request, cq)); 53 } GetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response)54 std::unique_ptr< ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>> GetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) { 55 return std::unique_ptr< ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>>(GetMaxHitPointRaw(context, response)); 56 } AsyncGetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response,::grpc::CompletionQueue * cq,void * tag)57 std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>> AsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) { 58 return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>>(AsyncGetMaxHitPointRaw(context, response, cq, tag)); 59 } PrepareAsyncGetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response,::grpc::CompletionQueue * cq)60 std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>> PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) { 61 return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncGetMaxHitPointRaw(context, response, cq)); 62 } GetMinMaxHitPoints(::grpc::ClientContext * context)63 std::unique_ptr< ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> GetMinMaxHitPoints(::grpc::ClientContext* context) { 64 return std::unique_ptr< ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(GetMinMaxHitPointsRaw(context)); 65 } AsyncGetMinMaxHitPoints(::grpc::ClientContext * context,::grpc::CompletionQueue * cq,void * tag)66 std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> AsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { 67 return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(AsyncGetMinMaxHitPointsRaw(context, cq, tag)); 68 } PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext * context,::grpc::CompletionQueue * cq)69 std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { 70 return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(PrepareAsyncGetMinMaxHitPointsRaw(context, cq)); 71 } 72 private: 73 virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) = 0; 74 virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>* PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) = 0; 75 virtual ::grpc::ClientReaderInterface< flatbuffers::grpc::Message<Monster>>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) = 0; 76 virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) = 0; 77 virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message<Monster>>* PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) = 0; 78 virtual ::grpc::ClientWriterInterface< flatbuffers::grpc::Message<Monster>>* GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) = 0; 79 virtual ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>* AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) = 0; 80 virtual ::grpc::ClientAsyncWriterInterface< flatbuffers::grpc::Message<Monster>>* PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) = 0; 81 virtual ::grpc::ClientReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* GetMinMaxHitPointsRaw(::grpc::ClientContext* context) = 0; 82 virtual ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; 83 virtual ::grpc::ClientAsyncReaderWriterInterface< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; 84 }; 85 class Stub final : public StubInterface { 86 public: 87 Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); 88 ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, flatbuffers::grpc::Message<Stat>* response) override; AsyncStore(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Monster> & request,::grpc::CompletionQueue * cq)89 std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { 90 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>>(AsyncStoreRaw(context, request, cq)); 91 } PrepareAsyncStore(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Monster> & request,::grpc::CompletionQueue * cq)92 std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>> PrepareAsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { 93 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>>(PrepareAsyncStoreRaw(context, request, cq)); 94 } Retrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request)95 std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) { 96 return std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>>(RetrieveRaw(context, request)); 97 } AsyncRetrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request,::grpc::CompletionQueue * cq,void * tag)98 std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) { 99 return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>>(AsyncRetrieveRaw(context, request, cq, tag)); 100 } PrepareAsyncRetrieve(::grpc::ClientContext * context,const flatbuffers::grpc::Message<Stat> & request,::grpc::CompletionQueue * cq)101 std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>> PrepareAsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) { 102 return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncRetrieveRaw(context, request, cq)); 103 } GetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response)104 std::unique_ptr< ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>> GetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) { 105 return std::unique_ptr< ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>>(GetMaxHitPointRaw(context, response)); 106 } AsyncGetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response,::grpc::CompletionQueue * cq,void * tag)107 std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>> AsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) { 108 return std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>>(AsyncGetMaxHitPointRaw(context, response, cq, tag)); 109 } PrepareAsyncGetMaxHitPoint(::grpc::ClientContext * context,flatbuffers::grpc::Message<Stat> * response,::grpc::CompletionQueue * cq)110 std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>> PrepareAsyncGetMaxHitPoint(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) { 111 return std::unique_ptr< ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncGetMaxHitPointRaw(context, response, cq)); 112 } GetMinMaxHitPoints(::grpc::ClientContext * context)113 std::unique_ptr< ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> GetMinMaxHitPoints(::grpc::ClientContext* context) { 114 return std::unique_ptr< ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(GetMinMaxHitPointsRaw(context)); 115 } AsyncGetMinMaxHitPoints(::grpc::ClientContext * context,::grpc::CompletionQueue * cq,void * tag)116 std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> AsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { 117 return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(AsyncGetMinMaxHitPointsRaw(context, cq, tag)); 118 } PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext * context,::grpc::CompletionQueue * cq)119 std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>> PrepareAsyncGetMinMaxHitPoints(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { 120 return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>>(PrepareAsyncGetMinMaxHitPointsRaw(context, cq)); 121 } 122 123 private: 124 std::shared_ptr< ::grpc::ChannelInterface> channel_; 125 ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) override; 126 ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message<Stat>>* PrepareAsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) override; 127 ::grpc::ClientReader< flatbuffers::grpc::Message<Monster>>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request) override; 128 ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) override; 129 ::grpc::ClientAsyncReader< flatbuffers::grpc::Message<Monster>>* PrepareAsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) override; 130 ::grpc::ClientWriter< flatbuffers::grpc::Message<Monster>>* GetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response) override; 131 ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* AsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) override; 132 ::grpc::ClientAsyncWriter< flatbuffers::grpc::Message<Monster>>* PrepareAsyncGetMaxHitPointRaw(::grpc::ClientContext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq) override; 133 ::grpc::ClientReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* GetMinMaxHitPointsRaw(::grpc::ClientContext* context) override; 134 ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* AsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; 135 ::grpc::ClientAsyncReaderWriter< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>* PrepareAsyncGetMinMaxHitPointsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; 136 const ::grpc::internal::RpcMethod rpcmethod_Store_; 137 const ::grpc::internal::RpcMethod rpcmethod_Retrieve_; 138 const ::grpc::internal::RpcMethod rpcmethod_GetMaxHitPoint_; 139 const ::grpc::internal::RpcMethod rpcmethod_GetMinMaxHitPoints_; 140 }; 141 static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); 142 143 class Service : public ::grpc::Service { 144 public: 145 Service(); 146 virtual ~Service(); 147 virtual ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Monster>* request, flatbuffers::grpc::Message<Stat>* response); 148 virtual ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* writer); 149 virtual ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* reader, flatbuffers::grpc::Message<Stat>* response); 150 virtual ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream); 151 }; 152 template <class BaseClass> 153 class WithAsyncMethod_Store : public BaseClass { 154 private: BaseClassMustBeDerivedFromService(const Service * service)155 void BaseClassMustBeDerivedFromService(const Service *service) {} 156 public: WithAsyncMethod_Store()157 WithAsyncMethod_Store() { 158 ::grpc::Service::MarkMethodAsync(0); 159 } ~WithAsyncMethod_Store()160 ~WithAsyncMethod_Store() override { 161 BaseClassMustBeDerivedFromService(this); 162 } 163 // disable synchronous version of this method Store(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Monster> * request,flatbuffers::grpc::Message<Stat> * response)164 ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Monster>* request, flatbuffers::grpc::Message<Stat>* response) final override { 165 abort(); 166 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 167 } RequestStore(::grpc::ServerContext * context,flatbuffers::grpc::Message<Monster> * request,::grpc::ServerAsyncResponseWriter<flatbuffers::grpc::Message<Stat>> * response,::grpc::CompletionQueue * new_call_cq,::grpc::ServerCompletionQueue * notification_cq,void * tag)168 void RequestStore(::grpc::ServerContext* context, flatbuffers::grpc::Message<Monster>* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message<Stat>>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { 169 ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); 170 } 171 }; 172 template <class BaseClass> 173 class WithAsyncMethod_Retrieve : public BaseClass { 174 private: BaseClassMustBeDerivedFromService(const Service * service)175 void BaseClassMustBeDerivedFromService(const Service *service) {} 176 public: WithAsyncMethod_Retrieve()177 WithAsyncMethod_Retrieve() { 178 ::grpc::Service::MarkMethodAsync(1); 179 } ~WithAsyncMethod_Retrieve()180 ~WithAsyncMethod_Retrieve() override { 181 BaseClassMustBeDerivedFromService(this); 182 } 183 // disable synchronous version of this method Retrieve(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Stat> * request,::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>> * writer)184 ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* writer) final override { 185 abort(); 186 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 187 } RequestRetrieve(::grpc::ServerContext * context,flatbuffers::grpc::Message<Stat> * request,::grpc::ServerAsyncWriter<flatbuffers::grpc::Message<Monster>> * writer,::grpc::CompletionQueue * new_call_cq,::grpc::ServerCompletionQueue * notification_cq,void * tag)188 void RequestRetrieve(::grpc::ServerContext* context, flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerAsyncWriter< flatbuffers::grpc::Message<Monster>>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { 189 ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); 190 } 191 }; 192 template <class BaseClass> 193 class WithAsyncMethod_GetMaxHitPoint : public BaseClass { 194 private: BaseClassMustBeDerivedFromService(const Service * service)195 void BaseClassMustBeDerivedFromService(const Service *service) {} 196 public: WithAsyncMethod_GetMaxHitPoint()197 WithAsyncMethod_GetMaxHitPoint() { 198 ::grpc::Service::MarkMethodAsync(2); 199 } ~WithAsyncMethod_GetMaxHitPoint()200 ~WithAsyncMethod_GetMaxHitPoint() override { 201 BaseClassMustBeDerivedFromService(this); 202 } 203 // disable synchronous version of this method GetMaxHitPoint(::grpc::ServerContext * context,::grpc::ServerReader<flatbuffers::grpc::Message<Monster>> * reader,flatbuffers::grpc::Message<Stat> * response)204 ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* reader, flatbuffers::grpc::Message<Stat>* response) final override { 205 abort(); 206 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 207 } RequestGetMaxHitPoint(::grpc::ServerContext * context,::grpc::ServerAsyncReader<flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>> * reader,::grpc::CompletionQueue * new_call_cq,::grpc::ServerCompletionQueue * notification_cq,void * tag)208 void RequestGetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { 209 ::grpc::Service::RequestAsyncClientStreaming(2, context, reader, new_call_cq, notification_cq, tag); 210 } 211 }; 212 template <class BaseClass> 213 class WithAsyncMethod_GetMinMaxHitPoints : public BaseClass { 214 private: BaseClassMustBeDerivedFromService(const Service * service)215 void BaseClassMustBeDerivedFromService(const Service *service) {} 216 public: WithAsyncMethod_GetMinMaxHitPoints()217 WithAsyncMethod_GetMinMaxHitPoints() { 218 ::grpc::Service::MarkMethodAsync(3); 219 } ~WithAsyncMethod_GetMinMaxHitPoints()220 ~WithAsyncMethod_GetMinMaxHitPoints() override { 221 BaseClassMustBeDerivedFromService(this); 222 } 223 // disable synchronous version of this method GetMinMaxHitPoints(::grpc::ServerContext * context,::grpc::ServerReaderWriter<flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>> * stream)224 ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream) final override { 225 abort(); 226 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 227 } RequestGetMinMaxHitPoints(::grpc::ServerContext * context,::grpc::ServerAsyncReaderWriter<flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>> * stream,::grpc::CompletionQueue * new_call_cq,::grpc::ServerCompletionQueue * notification_cq,void * tag)228 void RequestGetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { 229 ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag); 230 } 231 }; 232 typedef WithAsyncMethod_Store< WithAsyncMethod_Retrieve< WithAsyncMethod_GetMaxHitPoint< WithAsyncMethod_GetMinMaxHitPoints< Service > > > > AsyncService; 233 template <class BaseClass> 234 class WithGenericMethod_Store : public BaseClass { 235 private: BaseClassMustBeDerivedFromService(const Service * service)236 void BaseClassMustBeDerivedFromService(const Service *service) {} 237 public: WithGenericMethod_Store()238 WithGenericMethod_Store() { 239 ::grpc::Service::MarkMethodGeneric(0); 240 } ~WithGenericMethod_Store()241 ~WithGenericMethod_Store() override { 242 BaseClassMustBeDerivedFromService(this); 243 } 244 // disable synchronous version of this method Store(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Monster> * request,flatbuffers::grpc::Message<Stat> * response)245 ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Monster>* request, flatbuffers::grpc::Message<Stat>* response) final override { 246 abort(); 247 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 248 } 249 }; 250 template <class BaseClass> 251 class WithGenericMethod_Retrieve : public BaseClass { 252 private: BaseClassMustBeDerivedFromService(const Service * service)253 void BaseClassMustBeDerivedFromService(const Service *service) {} 254 public: WithGenericMethod_Retrieve()255 WithGenericMethod_Retrieve() { 256 ::grpc::Service::MarkMethodGeneric(1); 257 } ~WithGenericMethod_Retrieve()258 ~WithGenericMethod_Retrieve() override { 259 BaseClassMustBeDerivedFromService(this); 260 } 261 // disable synchronous version of this method Retrieve(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Stat> * request,::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>> * writer)262 ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* writer) final override { 263 abort(); 264 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 265 } 266 }; 267 template <class BaseClass> 268 class WithGenericMethod_GetMaxHitPoint : public BaseClass { 269 private: BaseClassMustBeDerivedFromService(const Service * service)270 void BaseClassMustBeDerivedFromService(const Service *service) {} 271 public: WithGenericMethod_GetMaxHitPoint()272 WithGenericMethod_GetMaxHitPoint() { 273 ::grpc::Service::MarkMethodGeneric(2); 274 } ~WithGenericMethod_GetMaxHitPoint()275 ~WithGenericMethod_GetMaxHitPoint() override { 276 BaseClassMustBeDerivedFromService(this); 277 } 278 // disable synchronous version of this method GetMaxHitPoint(::grpc::ServerContext * context,::grpc::ServerReader<flatbuffers::grpc::Message<Monster>> * reader,flatbuffers::grpc::Message<Stat> * response)279 ::grpc::Status GetMaxHitPoint(::grpc::ServerContext* context, ::grpc::ServerReader< flatbuffers::grpc::Message<Monster>>* reader, flatbuffers::grpc::Message<Stat>* response) final override { 280 abort(); 281 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 282 } 283 }; 284 template <class BaseClass> 285 class WithGenericMethod_GetMinMaxHitPoints : public BaseClass { 286 private: BaseClassMustBeDerivedFromService(const Service * service)287 void BaseClassMustBeDerivedFromService(const Service *service) {} 288 public: WithGenericMethod_GetMinMaxHitPoints()289 WithGenericMethod_GetMinMaxHitPoints() { 290 ::grpc::Service::MarkMethodGeneric(3); 291 } ~WithGenericMethod_GetMinMaxHitPoints()292 ~WithGenericMethod_GetMinMaxHitPoints() override { 293 BaseClassMustBeDerivedFromService(this); 294 } 295 // disable synchronous version of this method GetMinMaxHitPoints(::grpc::ServerContext * context,::grpc::ServerReaderWriter<flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>> * stream)296 ::grpc::Status GetMinMaxHitPoints(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>* stream) final override { 297 abort(); 298 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 299 } 300 }; 301 template <class BaseClass> 302 class WithStreamedUnaryMethod_Store : public BaseClass { 303 private: BaseClassMustBeDerivedFromService(const Service * service)304 void BaseClassMustBeDerivedFromService(const Service *service) {} 305 public: WithStreamedUnaryMethod_Store()306 WithStreamedUnaryMethod_Store() { 307 ::grpc::Service::MarkMethodStreamed(0, 308 new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message<Monster>, flatbuffers::grpc::Message<Stat>>(std::bind(&WithStreamedUnaryMethod_Store<BaseClass>::StreamedStore, this, std::placeholders::_1, std::placeholders::_2))); 309 } ~WithStreamedUnaryMethod_Store()310 ~WithStreamedUnaryMethod_Store() override { 311 BaseClassMustBeDerivedFromService(this); 312 } 313 // disable regular version of this method Store(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Monster> * request,flatbuffers::grpc::Message<Stat> * response)314 ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Monster>* request, flatbuffers::grpc::Message<Stat>* response) final override { 315 abort(); 316 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 317 } 318 // replace default version of method with streamed unary 319 virtual ::grpc::Status StreamedStore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message<Monster>,flatbuffers::grpc::Message<Stat>>* server_unary_streamer) = 0; 320 }; 321 typedef WithStreamedUnaryMethod_Store< Service > StreamedUnaryService; 322 template <class BaseClass> 323 class WithSplitStreamingMethod_Retrieve : public BaseClass { 324 private: BaseClassMustBeDerivedFromService(const Service * service)325 void BaseClassMustBeDerivedFromService(const Service *service) {} 326 public: WithSplitStreamingMethod_Retrieve()327 WithSplitStreamingMethod_Retrieve() { 328 ::grpc::Service::MarkMethodStreamed(1, 329 new ::grpc::internal::SplitServerStreamingHandler< flatbuffers::grpc::Message<Stat>, flatbuffers::grpc::Message<Monster>>(std::bind(&WithSplitStreamingMethod_Retrieve<BaseClass>::StreamedRetrieve, this, std::placeholders::_1, std::placeholders::_2))); 330 } ~WithSplitStreamingMethod_Retrieve()331 ~WithSplitStreamingMethod_Retrieve() override { 332 BaseClassMustBeDerivedFromService(this); 333 } 334 // disable regular version of this method Retrieve(::grpc::ServerContext * context,const flatbuffers::grpc::Message<Stat> * request,::grpc::ServerWriter<flatbuffers::grpc::Message<Monster>> * writer)335 ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message<Stat>* request, ::grpc::ServerWriter< flatbuffers::grpc::Message<Monster>>* writer) final override { 336 abort(); 337 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); 338 } 339 // replace default version of method with split streamed 340 virtual ::grpc::Status StreamedRetrieve(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< flatbuffers::grpc::Message<Stat>,flatbuffers::grpc::Message<Monster>>* server_split_streamer) = 0; 341 }; 342 typedef WithSplitStreamingMethod_Retrieve< Service > SplitStreamedService; 343 typedef WithStreamedUnaryMethod_Store< WithSplitStreamingMethod_Retrieve< Service > > StreamedService; 344 }; 345 346 } // namespace Example 347 } // namespace MyGame 348 349 350 #endif // GRPC_monster_5ftest__INCLUDED 351