| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640 | // Generated by the protocol buffer compiler.  DO NOT EDIT!// source: helloworld.proto#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION#include "helloworld.pb.h"#include <algorithm>#include <google/protobuf/stubs/common.h>#include <google/protobuf/stubs/once.h>#include <google/protobuf/io/coded_stream.h>#include <google/protobuf/wire_format_lite_inl.h>#include <google/protobuf/descriptor.h>#include <google/protobuf/generated_message_reflection.h>#include <google/protobuf/reflection_ops.h>#include <google/protobuf/wire_format.h>#include <grpc++/async_unary_call.h>#include <grpc++/channel_interface.h>#include <grpc++/impl/client_unary_call.h>#include <grpc++/impl/rpc_method.h>#include <grpc++/impl/rpc_service_method.h>#include <grpc++/impl/service_type.h>#include <grpc++/stream.h>// @@protoc_insertion_point(includes)namespace helloworld {namespace {const ::google::protobuf::Descriptor* HelloRequest_descriptor_ = NULL;const ::google::protobuf::internal::GeneratedMessageReflection*  HelloRequest_reflection_ = NULL;const ::google::protobuf::Descriptor* HelloReply_descriptor_ = NULL;const ::google::protobuf::internal::GeneratedMessageReflection*  HelloReply_reflection_ = NULL;}  // namespacevoid protobuf_AssignDesc_helloworld_2eproto() {  protobuf_AddDesc_helloworld_2eproto();  const ::google::protobuf::FileDescriptor* file =    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(      "helloworld.proto");  GOOGLE_CHECK(file != NULL);  HelloRequest_descriptor_ = file->message_type(0);  static const int HelloRequest_offsets_[1] = {    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloRequest, name_),  };  HelloRequest_reflection_ =    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(      HelloRequest_descriptor_,      HelloRequest::default_instance_,      HelloRequest_offsets_,      -1,      -1,      -1,      sizeof(HelloRequest),      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloRequest, _internal_metadata_),      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloRequest, _is_default_instance_));  HelloReply_descriptor_ = file->message_type(1);  static const int HelloReply_offsets_[1] = {    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloReply, message_),  };  HelloReply_reflection_ =    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(      HelloReply_descriptor_,      HelloReply::default_instance_,      HelloReply_offsets_,      -1,      -1,      -1,      sizeof(HelloReply),      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloReply, _internal_metadata_),      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HelloReply, _is_default_instance_));}namespace {GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);inline void protobuf_AssignDescriptorsOnce() {  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,                 &protobuf_AssignDesc_helloworld_2eproto);}void protobuf_RegisterTypes(const ::std::string&) {  protobuf_AssignDescriptorsOnce();  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(      HelloRequest_descriptor_, &HelloRequest::default_instance());  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(      HelloReply_descriptor_, &HelloReply::default_instance());}}  // namespacevoid protobuf_ShutdownFile_helloworld_2eproto() {  delete HelloRequest::default_instance_;  delete HelloRequest_reflection_;  delete HelloReply::default_instance_;  delete HelloReply_reflection_;}void protobuf_AddDesc_helloworld_2eproto() {  static bool already_here = false;  if (already_here) return;  already_here = true;  GOOGLE_PROTOBUF_VERIFY_VERSION;  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(    "\n\020helloworld.proto\022\nhelloworld\"\034\n\014HelloR"    "equest\022\014\n\004name\030\001 \001(\t\"\035\n\nHelloReply\022\017\n\007me"    "ssage\030\001 \001(\t2I\n\007Greeter\022>\n\010SayHello\022\030.hel"    "loworld.HelloRequest\032\026.helloworld.HelloR"    "eply\"\000B\t\n\007ex.grpcb\006proto3", 185);  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(    "helloworld.proto", &protobuf_RegisterTypes);  HelloRequest::default_instance_ = new HelloRequest();  HelloReply::default_instance_ = new HelloReply();  HelloRequest::default_instance_->InitAsDefaultInstance();  HelloReply::default_instance_->InitAsDefaultInstance();  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_helloworld_2eproto);}// Force AddDescriptors() to be called at static initialization time.struct StaticDescriptorInitializer_helloworld_2eproto {  StaticDescriptorInitializer_helloworld_2eproto() {    protobuf_AddDesc_helloworld_2eproto();  }} static_descriptor_initializer_helloworld_2eproto_;namespace {static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;static void MergeFromFail(int line) {  GOOGLE_CHECK(false) << __FILE__ << ":" << line;}}  // namespace// ===================================================================#ifndef _MSC_VERconst int HelloRequest::kNameFieldNumber;#endif  // !_MSC_VERHelloRequest::HelloRequest()  : ::google::protobuf::Message() , _internal_metadata_(NULL)  {  SharedCtor();  // @@protoc_insertion_point(constructor:helloworld.HelloRequest)}void HelloRequest::InitAsDefaultInstance() {  _is_default_instance_ = true;}HelloRequest::HelloRequest(const HelloRequest& from)  : ::google::protobuf::Message(),    _internal_metadata_(NULL) {  SharedCtor();  MergeFrom(from);  // @@protoc_insertion_point(copy_constructor:helloworld.HelloRequest)}void HelloRequest::SharedCtor() {    _is_default_instance_ = false;  ::google::protobuf::internal::GetEmptyString();  _cached_size_ = 0;  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());}HelloRequest::~HelloRequest() {  // @@protoc_insertion_point(destructor:helloworld.HelloRequest)  SharedDtor();}void HelloRequest::SharedDtor() {  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());  if (this != default_instance_) {  }}void HelloRequest::SetCachedSize(int size) const {  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();  _cached_size_ = size;  GOOGLE_SAFE_CONCURRENT_WRITES_END();}const ::google::protobuf::Descriptor* HelloRequest::descriptor() {  protobuf_AssignDescriptorsOnce();  return HelloRequest_descriptor_;}const HelloRequest& HelloRequest::default_instance() {  if (default_instance_ == NULL) protobuf_AddDesc_helloworld_2eproto();  return *default_instance_;}HelloRequest* HelloRequest::default_instance_ = NULL;HelloRequest* HelloRequest::New(::google::protobuf::Arena* arena) const {  HelloRequest* n = new HelloRequest;  if (arena != NULL) {    arena->Own(n);  }  return n;}void HelloRequest::Clear() {  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());}bool HelloRequest::MergePartialFromCodedStream(    ::google::protobuf::io::CodedInputStream* input) {#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure  ::google::protobuf::uint32 tag;  // @@protoc_insertion_point(parse_start:helloworld.HelloRequest)  for (;;) {    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);    tag = p.first;    if (!p.second) goto handle_unusual;    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {      // optional string name = 1;      case 1: {        if (tag == 10) {          DO_(::google::protobuf::internal::WireFormatLite::ReadString(                input, this->mutable_name()));          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(            this->name().data(), this->name().length(),            ::google::protobuf::internal::WireFormat::PARSE,            "helloworld.HelloRequest.name");        } else {          goto handle_unusual;        }        if (input->ExpectAtEnd()) goto success;        break;      }      default: {      handle_unusual:        if (tag == 0 ||            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {          goto success;        }        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));        break;      }    }  }success:  // @@protoc_insertion_point(parse_success:helloworld.HelloRequest)  return true;failure:  // @@protoc_insertion_point(parse_failure:helloworld.HelloRequest)  return false;#undef DO_}void HelloRequest::SerializeWithCachedSizes(    ::google::protobuf::io::CodedOutputStream* output) const {  // @@protoc_insertion_point(serialize_start:helloworld.HelloRequest)  // optional string name = 1;  if (this->name().size() > 0) {    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(      this->name().data(), this->name().length(),      ::google::protobuf::internal::WireFormat::SERIALIZE,      "helloworld.HelloRequest.name");    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(      1, this->name(), output);  }  // @@protoc_insertion_point(serialize_end:helloworld.HelloRequest)}::google::protobuf::uint8* HelloRequest::SerializeWithCachedSizesToArray(    ::google::protobuf::uint8* target) const {  // @@protoc_insertion_point(serialize_to_array_start:helloworld.HelloRequest)  // optional string name = 1;  if (this->name().size() > 0) {    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(      this->name().data(), this->name().length(),      ::google::protobuf::internal::WireFormat::SERIALIZE,      "helloworld.HelloRequest.name");    target =      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(        1, this->name(), target);  }  // @@protoc_insertion_point(serialize_to_array_end:helloworld.HelloRequest)  return target;}int HelloRequest::ByteSize() const {  int total_size = 0;  // optional string name = 1;  if (this->name().size() > 0) {    total_size += 1 +      ::google::protobuf::internal::WireFormatLite::StringSize(        this->name());  }  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();  _cached_size_ = total_size;  GOOGLE_SAFE_CONCURRENT_WRITES_END();  return total_size;}void HelloRequest::MergeFrom(const ::google::protobuf::Message& from) {  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);  const HelloRequest* source =    ::google::protobuf::internal::dynamic_cast_if_available<const HelloRequest*>(      &from);  if (source == NULL) {    ::google::protobuf::internal::ReflectionOps::Merge(from, this);  } else {    MergeFrom(*source);  }}void HelloRequest::MergeFrom(const HelloRequest& from) {  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);  if (from.name().size() > 0) {    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);  }}void HelloRequest::CopyFrom(const ::google::protobuf::Message& from) {  if (&from == this) return;  Clear();  MergeFrom(from);}void HelloRequest::CopyFrom(const HelloRequest& from) {  if (&from == this) return;  Clear();  MergeFrom(from);}bool HelloRequest::IsInitialized() const {  return true;}void HelloRequest::Swap(HelloRequest* other) {  if (other == this) return;  InternalSwap(other);}void HelloRequest::InternalSwap(HelloRequest* other) {  name_.Swap(&other->name_);  _internal_metadata_.Swap(&other->_internal_metadata_);  std::swap(_cached_size_, other->_cached_size_);}::google::protobuf::Metadata HelloRequest::GetMetadata() const {  protobuf_AssignDescriptorsOnce();  ::google::protobuf::Metadata metadata;  metadata.descriptor = HelloRequest_descriptor_;  metadata.reflection = HelloRequest_reflection_;  return metadata;}// ===================================================================#ifndef _MSC_VERconst int HelloReply::kMessageFieldNumber;#endif  // !_MSC_VERHelloReply::HelloReply()  : ::google::protobuf::Message() , _internal_metadata_(NULL)  {  SharedCtor();  // @@protoc_insertion_point(constructor:helloworld.HelloReply)}void HelloReply::InitAsDefaultInstance() {  _is_default_instance_ = true;}HelloReply::HelloReply(const HelloReply& from)  : ::google::protobuf::Message(),    _internal_metadata_(NULL) {  SharedCtor();  MergeFrom(from);  // @@protoc_insertion_point(copy_constructor:helloworld.HelloReply)}void HelloReply::SharedCtor() {    _is_default_instance_ = false;  ::google::protobuf::internal::GetEmptyString();  _cached_size_ = 0;  message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());}HelloReply::~HelloReply() {  // @@protoc_insertion_point(destructor:helloworld.HelloReply)  SharedDtor();}void HelloReply::SharedDtor() {  message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());  if (this != default_instance_) {  }}void HelloReply::SetCachedSize(int size) const {  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();  _cached_size_ = size;  GOOGLE_SAFE_CONCURRENT_WRITES_END();}const ::google::protobuf::Descriptor* HelloReply::descriptor() {  protobuf_AssignDescriptorsOnce();  return HelloReply_descriptor_;}const HelloReply& HelloReply::default_instance() {  if (default_instance_ == NULL) protobuf_AddDesc_helloworld_2eproto();  return *default_instance_;}HelloReply* HelloReply::default_instance_ = NULL;HelloReply* HelloReply::New(::google::protobuf::Arena* arena) const {  HelloReply* n = new HelloReply;  if (arena != NULL) {    arena->Own(n);  }  return n;}void HelloReply::Clear() {  message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());}bool HelloReply::MergePartialFromCodedStream(    ::google::protobuf::io::CodedInputStream* input) {#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure  ::google::protobuf::uint32 tag;  // @@protoc_insertion_point(parse_start:helloworld.HelloReply)  for (;;) {    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);    tag = p.first;    if (!p.second) goto handle_unusual;    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {      // optional string message = 1;      case 1: {        if (tag == 10) {          DO_(::google::protobuf::internal::WireFormatLite::ReadString(                input, this->mutable_message()));          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(            this->message().data(), this->message().length(),            ::google::protobuf::internal::WireFormat::PARSE,            "helloworld.HelloReply.message");        } else {          goto handle_unusual;        }        if (input->ExpectAtEnd()) goto success;        break;      }      default: {      handle_unusual:        if (tag == 0 ||            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {          goto success;        }        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));        break;      }    }  }success:  // @@protoc_insertion_point(parse_success:helloworld.HelloReply)  return true;failure:  // @@protoc_insertion_point(parse_failure:helloworld.HelloReply)  return false;#undef DO_}void HelloReply::SerializeWithCachedSizes(    ::google::protobuf::io::CodedOutputStream* output) const {  // @@protoc_insertion_point(serialize_start:helloworld.HelloReply)  // optional string message = 1;  if (this->message().size() > 0) {    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(      this->message().data(), this->message().length(),      ::google::protobuf::internal::WireFormat::SERIALIZE,      "helloworld.HelloReply.message");    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(      1, this->message(), output);  }  // @@protoc_insertion_point(serialize_end:helloworld.HelloReply)}::google::protobuf::uint8* HelloReply::SerializeWithCachedSizesToArray(    ::google::protobuf::uint8* target) const {  // @@protoc_insertion_point(serialize_to_array_start:helloworld.HelloReply)  // optional string message = 1;  if (this->message().size() > 0) {    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(      this->message().data(), this->message().length(),      ::google::protobuf::internal::WireFormat::SERIALIZE,      "helloworld.HelloReply.message");    target =      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(        1, this->message(), target);  }  // @@protoc_insertion_point(serialize_to_array_end:helloworld.HelloReply)  return target;}int HelloReply::ByteSize() const {  int total_size = 0;  // optional string message = 1;  if (this->message().size() > 0) {    total_size += 1 +      ::google::protobuf::internal::WireFormatLite::StringSize(        this->message());  }  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();  _cached_size_ = total_size;  GOOGLE_SAFE_CONCURRENT_WRITES_END();  return total_size;}void HelloReply::MergeFrom(const ::google::protobuf::Message& from) {  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);  const HelloReply* source =    ::google::protobuf::internal::dynamic_cast_if_available<const HelloReply*>(      &from);  if (source == NULL) {    ::google::protobuf::internal::ReflectionOps::Merge(from, this);  } else {    MergeFrom(*source);  }}void HelloReply::MergeFrom(const HelloReply& from) {  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);  if (from.message().size() > 0) {    message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_);  }}void HelloReply::CopyFrom(const ::google::protobuf::Message& from) {  if (&from == this) return;  Clear();  MergeFrom(from);}void HelloReply::CopyFrom(const HelloReply& from) {  if (&from == this) return;  Clear();  MergeFrom(from);}bool HelloReply::IsInitialized() const {  return true;}void HelloReply::Swap(HelloReply* other) {  if (other == this) return;  InternalSwap(other);}void HelloReply::InternalSwap(HelloReply* other) {  message_.Swap(&other->message_);  _internal_metadata_.Swap(&other->_internal_metadata_);  std::swap(_cached_size_, other->_cached_size_);}::google::protobuf::Metadata HelloReply::GetMetadata() const {  protobuf_AssignDescriptorsOnce();  ::google::protobuf::Metadata metadata;  metadata.descriptor = HelloReply_descriptor_;  metadata.reflection = HelloReply_reflection_;  return metadata;}static const char* Greeter_method_names[] = {  "/helloworld.Greeter/SayHello",};Greeter::Stub* Greeter::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) {  Greeter::Stub* stub = new Greeter::Stub();  stub->set_channel(channel);  return stub;};::grpc::Status Greeter::Stub::SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::helloworld::HelloReply* response) {  return ::grpc::BlockingUnaryCall(channel(),::grpc::RpcMethod(Greeter_method_names[0]), context, request, response);}::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>* Greeter::Stub::SayHello(::grpc::ClientContext* context, const ::helloworld::HelloRequest& request, ::grpc::CompletionQueue* cq, void* tag) {  return new ::grpc::ClientAsyncResponseReader< ::helloworld::HelloReply>(channel(), cq, ::grpc::RpcMethod(Greeter_method_names[0]), context, request, tag);}Greeter::AsyncService::AsyncService(::grpc::CompletionQueue* cq) : ::grpc::AsynchronousService(cq, Greeter_method_names, 1) {}Greeter::Service::~Service() {  delete service_;}::grpc::Status Greeter::Service::SayHello(::grpc::ServerContext* context, const ::helloworld::HelloRequest* request, ::helloworld::HelloReply* response) {  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED);}void Greeter::AsyncService::RequestSayHello(::grpc::ServerContext* context, ::helloworld::HelloRequest* request, ::grpc::ServerAsyncResponseWriter< ::helloworld::HelloReply>* response, ::grpc::CompletionQueue* cq, void* tag) {  AsynchronousService::RequestAsyncUnary(0, context, request, response, cq, tag);}::grpc::RpcService* Greeter::Service::service() {  if (service_ != nullptr) {    return service_;  }  service_ = new ::grpc::RpcService();  service_->AddMethod(new ::grpc::RpcServiceMethod(      Greeter_method_names[0],      ::grpc::RpcMethod::NORMAL_RPC,      new ::grpc::RpcMethodHandler< Greeter::Service, ::helloworld::HelloRequest, ::helloworld::HelloReply>(          std::function< ::grpc::Status(Greeter::Service*, ::grpc::ServerContext*, const ::helloworld::HelloRequest*, ::helloworld::HelloReply*)>(&Greeter::Service::SayHello), this),      new ::helloworld::HelloRequest, new ::helloworld::HelloReply));  return service_;}// @@protoc_insertion_point(namespace_scope)}  // namespace helloworld// @@protoc_insertion_point(global_scope)
 |