// Generated by the gRPC protobuf 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 "monster_test_generated.h" #include "flatbuffers/grpc.h" #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 GRPC_FINAL { public: class StubInterface { public: virtual ~StubInterface() {} virtual ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, flatbuffers::BufferRef* response) = 0; std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::BufferRef>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::BufferRef>>(AsyncStoreRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::BufferRef>> Retrieve(::grpc::ClientContext* context, const flatbuffers::BufferRef& request) { return std::unique_ptr< ::grpc::ClientReaderInterface< flatbuffers::BufferRef>>(RetrieveRaw(context, request)); } std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::BufferRef>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< flatbuffers::BufferRef>>(AsyncRetrieveRaw(context, request, cq, tag)); } private: virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::BufferRef>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderInterface< flatbuffers::BufferRef>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request) = 0; virtual ::grpc::ClientAsyncReaderInterface< flatbuffers::BufferRef>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq, void* tag) = 0; }; class Stub GRPC_FINAL : public StubInterface { public: Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); ::grpc::Status Store(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, flatbuffers::BufferRef* response) GRPC_OVERRIDE; std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::BufferRef>> AsyncStore(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::BufferRef>>(AsyncStoreRaw(context, request, cq)); } std::unique_ptr< ::grpc::ClientReader< flatbuffers::BufferRef>> Retrieve(::grpc::ClientContext* context, const flatbuffers::BufferRef& request) { return std::unique_ptr< ::grpc::ClientReader< flatbuffers::BufferRef>>(RetrieveRaw(context, request)); } std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::BufferRef>> AsyncRetrieve(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq, void* tag) { return std::unique_ptr< ::grpc::ClientAsyncReader< flatbuffers::BufferRef>>(AsyncRetrieveRaw(context, request, cq, tag)); } private: std::shared_ptr< ::grpc::ChannelInterface> channel_; ::grpc::ClientAsyncResponseReader< flatbuffers::BufferRef>* AsyncStoreRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; ::grpc::ClientReader< flatbuffers::BufferRef>* RetrieveRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request) GRPC_OVERRIDE; ::grpc::ClientAsyncReader< flatbuffers::BufferRef>* AsyncRetrieveRaw(::grpc::ClientContext* context, const flatbuffers::BufferRef& request, ::grpc::CompletionQueue* cq, void* tag) GRPC_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::BufferRef* request, flatbuffers::BufferRef* response); virtual ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::BufferRef* request, ::grpc::ServerWriter< flatbuffers::BufferRef>* writer); }; template class WithAsyncMethod_Store : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service *service) {} public: WithAsyncMethod_Store() { ::grpc::Service::MarkMethodAsync(0); } ~WithAsyncMethod_Store() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::BufferRef* request, flatbuffers::BufferRef* response) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestStore(::grpc::ServerContext* context, flatbuffers::BufferRef* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::BufferRef>* 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() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::BufferRef* request, ::grpc::ServerWriter< flatbuffers::BufferRef>* writer) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestRetrieve(::grpc::ServerContext* context, flatbuffers::BufferRef* request, ::grpc::ServerAsyncWriter< flatbuffers::BufferRef>* 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() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Store(::grpc::ServerContext* context, const flatbuffers::BufferRef* request, flatbuffers::BufferRef* response) GRPC_FINAL GRPC_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() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method ::grpc::Status Retrieve(::grpc::ServerContext* context, const flatbuffers::BufferRef* request, ::grpc::ServerWriter< flatbuffers::BufferRef>* writer) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } }; }; } // namespace Example } // namespace MyGame #endif // GRPC_monster_5ftest__INCLUDED