// Generated by the gRPC C++ plugin. // If you make any local change, they will be lost. // source: monster_test #ifndef GRPC_monster_5ftest__INCLUDED #define GRPC_monster_5ftest__INCLUDED #include "flatbuffers/grpc.h" #include "monster_test_generated.h" #include #include #include #include #include #include #include #include #include namespace grpc { class CompletionQueue; class Channel; class RpcService; class ServerCompletionQueue; class ServerContext; } // namespace grpc namespace MyGame { namespace Example { class MonsterStorage final { public: static constexpr char const* service_full_name() { return "MyGame.Example.MonsterStorage"; } class StubInterface { public: virtual ~StubInterface() {} virtual ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(AsyncStoreRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request) { return std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::grpc::Message>>(RetrieveRaw(context, request)); } std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message>>(AsyncRetrieveRaw(context, request, cq, tag)); } private: virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderInterface< flatbuffers::grpc::Message>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request) = 0; virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::grpc::Message>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq, void* tag) = 0; }; class Stub final : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) override; std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(AsyncStoreRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message>> Retrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request) { return std::unique_ptr< ::grpc::ClientReader< flatbuffers::grpc::Message>>(RetrieveRaw(context, request)); } std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::grpc::Message>>(AsyncRetrieveRaw(context, request, cq, tag)); } private: std::shared_ptr< ::grpc::ChannelInterface> channel_; ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReader< flatbuffers::grpc::Message>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request) override; ::grpc::ClientAsyncReader< flatbuffers::grpc::Message>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq, void* tag) override; const ::grpc::RpcMethod rpcmethod_Store_; const ::grpc::RpcMethod rpcmethod_Retrieve_; }; static std::unique_ptr 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 Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response); virtual ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, ::grpc::ServerWriter< flatbuffers::grpc::Message>* writer); }; template class WithAsyncMethod_Store : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithAsyncMethod_Store() { ::grpc::Service::MarkMethodAsync(0); } ~WithAsyncMethod_Store() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestStore(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message>* 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); } }; template class WithAsyncMethod_Retrieve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithAsyncMethod_Retrieve() { ::grpc::Service::MarkMethodAsync(1); } ~WithAsyncMethod_Retrieve() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, ::grpc::ServerWriter< flatbuffers::grpc::Message>* writer) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestRetrieve(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncWriter< flatbuffers::grpc::Message>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag); } }; typedef WithAsyncMethod_Store< WithAsyncMethod_Retrieve< Service > > AsyncService; template class WithGenericMethod_Store : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithGenericMethod_Store() { ::grpc::Service::MarkMethodGeneric(0); } ~WithGenericMethod_Store() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template class WithGenericMethod_Retrieve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithGenericMethod_Retrieve() { ::grpc::Service::MarkMethodGeneric(1); } ~WithGenericMethod_Retrieve() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, ::grpc::ServerWriter< flatbuffers::grpc::Message>* writer) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; template class WithStreamedUnaryMethod_Store : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithStreamedUnaryMethod_Store() { ::grpc::Service::MarkMethodStreamed(0, new ::grpc::StreamedUnaryHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithStreamedUnaryMethod_Store::StreamedStore, this, std::placeholders::_1, std::placeholders::_2))); } ~WithStreamedUnaryMethod_Store() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with streamed unary virtual ::grpc::Status StreamedStore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_unary_streamer) = 0; }; typedef WithStreamedUnaryMethod_Store< Service > StreamedUnaryService; template class WithSplitStreamingMethod_Retrieve : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithSplitStreamingMethod_Retrieve() { ::grpc::Service::MarkMethodStreamed(1, new ::grpc::SplitServerStreamingHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithSplitStreamingMethod_Retrieve::StreamedRetrieve, this, std::placeholders::_1, std::placeholders::_2))); } ~WithSplitStreamingMethod_Retrieve() override { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, ::grpc::ServerWriter< flatbuffers::grpc::Message>* writer) final override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } // replace default version of method with split streamed virtual ::grpc::Status StreamedRetrieve(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_Retrieve< Service > SplitStreamedService; typedef WithStreamedUnaryMethod_Store< WithSplitStreamingMethod_Retrieve< Service > > StreamedService; }; } // namespace Example } // namespace MyGame #endif // GRPC_monster_5ftest__INCLUDED