echo.pb.cc 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: echo.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "echo.pb.h"
  5. #include <algorithm>
  6. #include <google/protobuf/stubs/common.h>
  7. #include <google/protobuf/stubs/port.h>
  8. #include <google/protobuf/stubs/once.h>
  9. #include <google/protobuf/io/coded_stream.h>
  10. #include <google/protobuf/wire_format_lite_inl.h>
  11. #include <google/protobuf/descriptor.h>
  12. #include <google/protobuf/generated_message_reflection.h>
  13. #include <google/protobuf/reflection_ops.h>
  14. #include <google/protobuf/wire_format.h>
  15. // @@protoc_insertion_point(includes)
  16. namespace iv {
  17. namespace {
  18. const ::google::protobuf::Descriptor* EchoRequest_descriptor_ = NULL;
  19. const ::google::protobuf::internal::GeneratedMessageReflection*
  20. EchoRequest_reflection_ = NULL;
  21. const ::google::protobuf::Descriptor* EchoResponse_descriptor_ = NULL;
  22. const ::google::protobuf::internal::GeneratedMessageReflection*
  23. EchoResponse_reflection_ = NULL;
  24. const ::google::protobuf::ServiceDescriptor* EchoService_descriptor_ = NULL;
  25. } // namespace
  26. void protobuf_AssignDesc_echo_2eproto() GOOGLE_ATTRIBUTE_COLD;
  27. void protobuf_AssignDesc_echo_2eproto() {
  28. protobuf_AddDesc_echo_2eproto();
  29. const ::google::protobuf::FileDescriptor* file =
  30. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  31. "echo.proto");
  32. GOOGLE_CHECK(file != NULL);
  33. EchoRequest_descriptor_ = file->message_type(0);
  34. static const int EchoRequest_offsets_[4] = {
  35. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, msgname_),
  36. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, index_),
  37. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, nlen_),
  38. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, xdata_),
  39. };
  40. EchoRequest_reflection_ =
  41. ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
  42. EchoRequest_descriptor_,
  43. EchoRequest::default_instance_,
  44. EchoRequest_offsets_,
  45. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, _has_bits_[0]),
  46. -1,
  47. -1,
  48. sizeof(EchoRequest),
  49. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoRequest, _internal_metadata_),
  50. -1);
  51. EchoResponse_descriptor_ = file->message_type(1);
  52. static const int EchoResponse_offsets_[2] = {
  53. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoResponse, msgname_),
  54. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoResponse, index_),
  55. };
  56. EchoResponse_reflection_ =
  57. ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
  58. EchoResponse_descriptor_,
  59. EchoResponse::default_instance_,
  60. EchoResponse_offsets_,
  61. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoResponse, _has_bits_[0]),
  62. -1,
  63. -1,
  64. sizeof(EchoResponse),
  65. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EchoResponse, _internal_metadata_),
  66. -1);
  67. EchoService_descriptor_ = file->service(0);
  68. }
  69. namespace {
  70. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  71. inline void protobuf_AssignDescriptorsOnce() {
  72. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  73. &protobuf_AssignDesc_echo_2eproto);
  74. }
  75. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
  76. void protobuf_RegisterTypes(const ::std::string&) {
  77. protobuf_AssignDescriptorsOnce();
  78. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  79. EchoRequest_descriptor_, &EchoRequest::default_instance());
  80. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  81. EchoResponse_descriptor_, &EchoResponse::default_instance());
  82. }
  83. } // namespace
  84. void protobuf_ShutdownFile_echo_2eproto() {
  85. delete EchoRequest::default_instance_;
  86. delete EchoRequest_reflection_;
  87. delete EchoResponse::default_instance_;
  88. delete EchoResponse_reflection_;
  89. }
  90. void protobuf_AddDesc_echo_2eproto() GOOGLE_ATTRIBUTE_COLD;
  91. void protobuf_AddDesc_echo_2eproto() {
  92. static bool already_here = false;
  93. if (already_here) return;
  94. already_here = true;
  95. GOOGLE_PROTOBUF_VERIFY_VERSION;
  96. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  97. "\n\necho.proto\022\002iv\"J\n\013EchoRequest\022\017\n\007msgna"
  98. "me\030\001 \002(\t\022\r\n\005index\030\002 \002(\003\022\014\n\004nlen\030\003 \002(\005\022\r\n"
  99. "\005xdata\030\004 \001(\014\".\n\014EchoResponse\022\017\n\007msgname\030"
  100. "\001 \002(\t\022\r\n\005index\030\002 \002(\00328\n\013EchoService\022)\n\004E"
  101. "cho\022\017.iv.EchoRequest\032\020.iv.EchoResponseB\003"
  102. "\200\001\001", 203);
  103. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  104. "echo.proto", &protobuf_RegisterTypes);
  105. EchoRequest::default_instance_ = new EchoRequest();
  106. EchoResponse::default_instance_ = new EchoResponse();
  107. EchoRequest::default_instance_->InitAsDefaultInstance();
  108. EchoResponse::default_instance_->InitAsDefaultInstance();
  109. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_echo_2eproto);
  110. }
  111. // Force AddDescriptors() to be called at static initialization time.
  112. struct StaticDescriptorInitializer_echo_2eproto {
  113. StaticDescriptorInitializer_echo_2eproto() {
  114. protobuf_AddDesc_echo_2eproto();
  115. }
  116. } static_descriptor_initializer_echo_2eproto_;
  117. // ===================================================================
  118. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  119. const int EchoRequest::kMsgnameFieldNumber;
  120. const int EchoRequest::kIndexFieldNumber;
  121. const int EchoRequest::kNlenFieldNumber;
  122. const int EchoRequest::kXdataFieldNumber;
  123. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  124. EchoRequest::EchoRequest()
  125. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  126. SharedCtor();
  127. // @@protoc_insertion_point(constructor:iv.EchoRequest)
  128. }
  129. void EchoRequest::InitAsDefaultInstance() {
  130. }
  131. EchoRequest::EchoRequest(const EchoRequest& from)
  132. : ::google::protobuf::Message(),
  133. _internal_metadata_(NULL) {
  134. SharedCtor();
  135. MergeFrom(from);
  136. // @@protoc_insertion_point(copy_constructor:iv.EchoRequest)
  137. }
  138. void EchoRequest::SharedCtor() {
  139. ::google::protobuf::internal::GetEmptyString();
  140. _cached_size_ = 0;
  141. msgname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  142. index_ = GOOGLE_LONGLONG(0);
  143. nlen_ = 0;
  144. xdata_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  145. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  146. }
  147. EchoRequest::~EchoRequest() {
  148. // @@protoc_insertion_point(destructor:iv.EchoRequest)
  149. SharedDtor();
  150. }
  151. void EchoRequest::SharedDtor() {
  152. msgname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  153. xdata_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  154. if (this != default_instance_) {
  155. }
  156. }
  157. void EchoRequest::SetCachedSize(int size) const {
  158. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  159. _cached_size_ = size;
  160. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  161. }
  162. const ::google::protobuf::Descriptor* EchoRequest::descriptor() {
  163. protobuf_AssignDescriptorsOnce();
  164. return EchoRequest_descriptor_;
  165. }
  166. const EchoRequest& EchoRequest::default_instance() {
  167. if (default_instance_ == NULL) protobuf_AddDesc_echo_2eproto();
  168. return *default_instance_;
  169. }
  170. EchoRequest* EchoRequest::default_instance_ = NULL;
  171. EchoRequest* EchoRequest::New(::google::protobuf::Arena* arena) const {
  172. EchoRequest* n = new EchoRequest;
  173. if (arena != NULL) {
  174. arena->Own(n);
  175. }
  176. return n;
  177. }
  178. void EchoRequest::Clear() {
  179. // @@protoc_insertion_point(message_clear_start:iv.EchoRequest)
  180. if (_has_bits_[0 / 32] & 15u) {
  181. if (has_msgname()) {
  182. msgname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  183. }
  184. index_ = GOOGLE_LONGLONG(0);
  185. nlen_ = 0;
  186. if (has_xdata()) {
  187. xdata_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  188. }
  189. }
  190. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  191. if (_internal_metadata_.have_unknown_fields()) {
  192. mutable_unknown_fields()->Clear();
  193. }
  194. }
  195. bool EchoRequest::MergePartialFromCodedStream(
  196. ::google::protobuf::io::CodedInputStream* input) {
  197. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  198. ::google::protobuf::uint32 tag;
  199. // @@protoc_insertion_point(parse_start:iv.EchoRequest)
  200. for (;;) {
  201. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
  202. tag = p.first;
  203. if (!p.second) goto handle_unusual;
  204. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  205. // required string msgname = 1;
  206. case 1: {
  207. if (tag == 10) {
  208. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  209. input, this->mutable_msgname()));
  210. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  211. this->msgname().data(), this->msgname().length(),
  212. ::google::protobuf::internal::WireFormat::PARSE,
  213. "iv.EchoRequest.msgname");
  214. } else {
  215. goto handle_unusual;
  216. }
  217. if (input->ExpectTag(16)) goto parse_index;
  218. break;
  219. }
  220. // required int64 index = 2;
  221. case 2: {
  222. if (tag == 16) {
  223. parse_index:
  224. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  225. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  226. input, &index_)));
  227. set_has_index();
  228. } else {
  229. goto handle_unusual;
  230. }
  231. if (input->ExpectTag(24)) goto parse_nlen;
  232. break;
  233. }
  234. // required int32 nlen = 3;
  235. case 3: {
  236. if (tag == 24) {
  237. parse_nlen:
  238. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  239. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  240. input, &nlen_)));
  241. set_has_nlen();
  242. } else {
  243. goto handle_unusual;
  244. }
  245. if (input->ExpectTag(34)) goto parse_xdata;
  246. break;
  247. }
  248. // optional bytes xdata = 4;
  249. case 4: {
  250. if (tag == 34) {
  251. parse_xdata:
  252. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  253. input, this->mutable_xdata()));
  254. } else {
  255. goto handle_unusual;
  256. }
  257. if (input->ExpectAtEnd()) goto success;
  258. break;
  259. }
  260. default: {
  261. handle_unusual:
  262. if (tag == 0 ||
  263. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  264. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  265. goto success;
  266. }
  267. DO_(::google::protobuf::internal::WireFormat::SkipField(
  268. input, tag, mutable_unknown_fields()));
  269. break;
  270. }
  271. }
  272. }
  273. success:
  274. // @@protoc_insertion_point(parse_success:iv.EchoRequest)
  275. return true;
  276. failure:
  277. // @@protoc_insertion_point(parse_failure:iv.EchoRequest)
  278. return false;
  279. #undef DO_
  280. }
  281. void EchoRequest::SerializeWithCachedSizes(
  282. ::google::protobuf::io::CodedOutputStream* output) const {
  283. // @@protoc_insertion_point(serialize_start:iv.EchoRequest)
  284. // required string msgname = 1;
  285. if (has_msgname()) {
  286. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  287. this->msgname().data(), this->msgname().length(),
  288. ::google::protobuf::internal::WireFormat::SERIALIZE,
  289. "iv.EchoRequest.msgname");
  290. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  291. 1, this->msgname(), output);
  292. }
  293. // required int64 index = 2;
  294. if (has_index()) {
  295. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->index(), output);
  296. }
  297. // required int32 nlen = 3;
  298. if (has_nlen()) {
  299. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->nlen(), output);
  300. }
  301. // optional bytes xdata = 4;
  302. if (has_xdata()) {
  303. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  304. 4, this->xdata(), output);
  305. }
  306. if (_internal_metadata_.have_unknown_fields()) {
  307. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  308. unknown_fields(), output);
  309. }
  310. // @@protoc_insertion_point(serialize_end:iv.EchoRequest)
  311. }
  312. ::google::protobuf::uint8* EchoRequest::InternalSerializeWithCachedSizesToArray(
  313. bool deterministic, ::google::protobuf::uint8* target) const {
  314. // @@protoc_insertion_point(serialize_to_array_start:iv.EchoRequest)
  315. // required string msgname = 1;
  316. if (has_msgname()) {
  317. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  318. this->msgname().data(), this->msgname().length(),
  319. ::google::protobuf::internal::WireFormat::SERIALIZE,
  320. "iv.EchoRequest.msgname");
  321. target =
  322. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  323. 1, this->msgname(), target);
  324. }
  325. // required int64 index = 2;
  326. if (has_index()) {
  327. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->index(), target);
  328. }
  329. // required int32 nlen = 3;
  330. if (has_nlen()) {
  331. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->nlen(), target);
  332. }
  333. // optional bytes xdata = 4;
  334. if (has_xdata()) {
  335. target =
  336. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  337. 4, this->xdata(), target);
  338. }
  339. if (_internal_metadata_.have_unknown_fields()) {
  340. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  341. unknown_fields(), target);
  342. }
  343. // @@protoc_insertion_point(serialize_to_array_end:iv.EchoRequest)
  344. return target;
  345. }
  346. int EchoRequest::RequiredFieldsByteSizeFallback() const {
  347. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:iv.EchoRequest)
  348. int total_size = 0;
  349. if (has_msgname()) {
  350. // required string msgname = 1;
  351. total_size += 1 +
  352. ::google::protobuf::internal::WireFormatLite::StringSize(
  353. this->msgname());
  354. }
  355. if (has_index()) {
  356. // required int64 index = 2;
  357. total_size += 1 +
  358. ::google::protobuf::internal::WireFormatLite::Int64Size(
  359. this->index());
  360. }
  361. if (has_nlen()) {
  362. // required int32 nlen = 3;
  363. total_size += 1 +
  364. ::google::protobuf::internal::WireFormatLite::Int32Size(
  365. this->nlen());
  366. }
  367. return total_size;
  368. }
  369. int EchoRequest::ByteSize() const {
  370. // @@protoc_insertion_point(message_byte_size_start:iv.EchoRequest)
  371. int total_size = 0;
  372. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  373. // required string msgname = 1;
  374. total_size += 1 +
  375. ::google::protobuf::internal::WireFormatLite::StringSize(
  376. this->msgname());
  377. // required int64 index = 2;
  378. total_size += 1 +
  379. ::google::protobuf::internal::WireFormatLite::Int64Size(
  380. this->index());
  381. // required int32 nlen = 3;
  382. total_size += 1 +
  383. ::google::protobuf::internal::WireFormatLite::Int32Size(
  384. this->nlen());
  385. } else {
  386. total_size += RequiredFieldsByteSizeFallback();
  387. }
  388. // optional bytes xdata = 4;
  389. if (has_xdata()) {
  390. total_size += 1 +
  391. ::google::protobuf::internal::WireFormatLite::BytesSize(
  392. this->xdata());
  393. }
  394. if (_internal_metadata_.have_unknown_fields()) {
  395. total_size +=
  396. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  397. unknown_fields());
  398. }
  399. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  400. _cached_size_ = total_size;
  401. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  402. return total_size;
  403. }
  404. void EchoRequest::MergeFrom(const ::google::protobuf::Message& from) {
  405. // @@protoc_insertion_point(generalized_merge_from_start:iv.EchoRequest)
  406. if (GOOGLE_PREDICT_FALSE(&from == this)) {
  407. ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
  408. }
  409. const EchoRequest* source =
  410. ::google::protobuf::internal::DynamicCastToGenerated<const EchoRequest>(
  411. &from);
  412. if (source == NULL) {
  413. // @@protoc_insertion_point(generalized_merge_from_cast_fail:iv.EchoRequest)
  414. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  415. } else {
  416. // @@protoc_insertion_point(generalized_merge_from_cast_success:iv.EchoRequest)
  417. MergeFrom(*source);
  418. }
  419. }
  420. void EchoRequest::MergeFrom(const EchoRequest& from) {
  421. // @@protoc_insertion_point(class_specific_merge_from_start:iv.EchoRequest)
  422. if (GOOGLE_PREDICT_FALSE(&from == this)) {
  423. ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
  424. }
  425. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  426. if (from.has_msgname()) {
  427. set_has_msgname();
  428. msgname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msgname_);
  429. }
  430. if (from.has_index()) {
  431. set_index(from.index());
  432. }
  433. if (from.has_nlen()) {
  434. set_nlen(from.nlen());
  435. }
  436. if (from.has_xdata()) {
  437. set_has_xdata();
  438. xdata_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.xdata_);
  439. }
  440. }
  441. if (from._internal_metadata_.have_unknown_fields()) {
  442. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  443. }
  444. }
  445. void EchoRequest::CopyFrom(const ::google::protobuf::Message& from) {
  446. // @@protoc_insertion_point(generalized_copy_from_start:iv.EchoRequest)
  447. if (&from == this) return;
  448. Clear();
  449. MergeFrom(from);
  450. }
  451. void EchoRequest::CopyFrom(const EchoRequest& from) {
  452. // @@protoc_insertion_point(class_specific_copy_from_start:iv.EchoRequest)
  453. if (&from == this) return;
  454. Clear();
  455. MergeFrom(from);
  456. }
  457. bool EchoRequest::IsInitialized() const {
  458. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  459. return true;
  460. }
  461. void EchoRequest::Swap(EchoRequest* other) {
  462. if (other == this) return;
  463. InternalSwap(other);
  464. }
  465. void EchoRequest::InternalSwap(EchoRequest* other) {
  466. msgname_.Swap(&other->msgname_);
  467. std::swap(index_, other->index_);
  468. std::swap(nlen_, other->nlen_);
  469. xdata_.Swap(&other->xdata_);
  470. std::swap(_has_bits_[0], other->_has_bits_[0]);
  471. _internal_metadata_.Swap(&other->_internal_metadata_);
  472. std::swap(_cached_size_, other->_cached_size_);
  473. }
  474. ::google::protobuf::Metadata EchoRequest::GetMetadata() const {
  475. protobuf_AssignDescriptorsOnce();
  476. ::google::protobuf::Metadata metadata;
  477. metadata.descriptor = EchoRequest_descriptor_;
  478. metadata.reflection = EchoRequest_reflection_;
  479. return metadata;
  480. }
  481. #if PROTOBUF_INLINE_NOT_IN_HEADERS
  482. // EchoRequest
  483. // required string msgname = 1;
  484. bool EchoRequest::has_msgname() const {
  485. return (_has_bits_[0] & 0x00000001u) != 0;
  486. }
  487. void EchoRequest::set_has_msgname() {
  488. _has_bits_[0] |= 0x00000001u;
  489. }
  490. void EchoRequest::clear_has_msgname() {
  491. _has_bits_[0] &= ~0x00000001u;
  492. }
  493. void EchoRequest::clear_msgname() {
  494. msgname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  495. clear_has_msgname();
  496. }
  497. const ::std::string& EchoRequest::msgname() const {
  498. // @@protoc_insertion_point(field_get:iv.EchoRequest.msgname)
  499. return msgname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  500. }
  501. void EchoRequest::set_msgname(const ::std::string& value) {
  502. set_has_msgname();
  503. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  504. // @@protoc_insertion_point(field_set:iv.EchoRequest.msgname)
  505. }
  506. void EchoRequest::set_msgname(const char* value) {
  507. set_has_msgname();
  508. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  509. // @@protoc_insertion_point(field_set_char:iv.EchoRequest.msgname)
  510. }
  511. void EchoRequest::set_msgname(const char* value, size_t size) {
  512. set_has_msgname();
  513. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  514. ::std::string(reinterpret_cast<const char*>(value), size));
  515. // @@protoc_insertion_point(field_set_pointer:iv.EchoRequest.msgname)
  516. }
  517. ::std::string* EchoRequest::mutable_msgname() {
  518. set_has_msgname();
  519. // @@protoc_insertion_point(field_mutable:iv.EchoRequest.msgname)
  520. return msgname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  521. }
  522. ::std::string* EchoRequest::release_msgname() {
  523. // @@protoc_insertion_point(field_release:iv.EchoRequest.msgname)
  524. clear_has_msgname();
  525. return msgname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  526. }
  527. void EchoRequest::set_allocated_msgname(::std::string* msgname) {
  528. if (msgname != NULL) {
  529. set_has_msgname();
  530. } else {
  531. clear_has_msgname();
  532. }
  533. msgname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), msgname);
  534. // @@protoc_insertion_point(field_set_allocated:iv.EchoRequest.msgname)
  535. }
  536. // required int64 index = 2;
  537. bool EchoRequest::has_index() const {
  538. return (_has_bits_[0] & 0x00000002u) != 0;
  539. }
  540. void EchoRequest::set_has_index() {
  541. _has_bits_[0] |= 0x00000002u;
  542. }
  543. void EchoRequest::clear_has_index() {
  544. _has_bits_[0] &= ~0x00000002u;
  545. }
  546. void EchoRequest::clear_index() {
  547. index_ = GOOGLE_LONGLONG(0);
  548. clear_has_index();
  549. }
  550. ::google::protobuf::int64 EchoRequest::index() const {
  551. // @@protoc_insertion_point(field_get:iv.EchoRequest.index)
  552. return index_;
  553. }
  554. void EchoRequest::set_index(::google::protobuf::int64 value) {
  555. set_has_index();
  556. index_ = value;
  557. // @@protoc_insertion_point(field_set:iv.EchoRequest.index)
  558. }
  559. // required int32 nlen = 3;
  560. bool EchoRequest::has_nlen() const {
  561. return (_has_bits_[0] & 0x00000004u) != 0;
  562. }
  563. void EchoRequest::set_has_nlen() {
  564. _has_bits_[0] |= 0x00000004u;
  565. }
  566. void EchoRequest::clear_has_nlen() {
  567. _has_bits_[0] &= ~0x00000004u;
  568. }
  569. void EchoRequest::clear_nlen() {
  570. nlen_ = 0;
  571. clear_has_nlen();
  572. }
  573. ::google::protobuf::int32 EchoRequest::nlen() const {
  574. // @@protoc_insertion_point(field_get:iv.EchoRequest.nlen)
  575. return nlen_;
  576. }
  577. void EchoRequest::set_nlen(::google::protobuf::int32 value) {
  578. set_has_nlen();
  579. nlen_ = value;
  580. // @@protoc_insertion_point(field_set:iv.EchoRequest.nlen)
  581. }
  582. // optional bytes xdata = 4;
  583. bool EchoRequest::has_xdata() const {
  584. return (_has_bits_[0] & 0x00000008u) != 0;
  585. }
  586. void EchoRequest::set_has_xdata() {
  587. _has_bits_[0] |= 0x00000008u;
  588. }
  589. void EchoRequest::clear_has_xdata() {
  590. _has_bits_[0] &= ~0x00000008u;
  591. }
  592. void EchoRequest::clear_xdata() {
  593. xdata_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  594. clear_has_xdata();
  595. }
  596. const ::std::string& EchoRequest::xdata() const {
  597. // @@protoc_insertion_point(field_get:iv.EchoRequest.xdata)
  598. return xdata_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  599. }
  600. void EchoRequest::set_xdata(const ::std::string& value) {
  601. set_has_xdata();
  602. xdata_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  603. // @@protoc_insertion_point(field_set:iv.EchoRequest.xdata)
  604. }
  605. void EchoRequest::set_xdata(const char* value) {
  606. set_has_xdata();
  607. xdata_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  608. // @@protoc_insertion_point(field_set_char:iv.EchoRequest.xdata)
  609. }
  610. void EchoRequest::set_xdata(const void* value, size_t size) {
  611. set_has_xdata();
  612. xdata_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  613. ::std::string(reinterpret_cast<const char*>(value), size));
  614. // @@protoc_insertion_point(field_set_pointer:iv.EchoRequest.xdata)
  615. }
  616. ::std::string* EchoRequest::mutable_xdata() {
  617. set_has_xdata();
  618. // @@protoc_insertion_point(field_mutable:iv.EchoRequest.xdata)
  619. return xdata_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  620. }
  621. ::std::string* EchoRequest::release_xdata() {
  622. // @@protoc_insertion_point(field_release:iv.EchoRequest.xdata)
  623. clear_has_xdata();
  624. return xdata_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  625. }
  626. void EchoRequest::set_allocated_xdata(::std::string* xdata) {
  627. if (xdata != NULL) {
  628. set_has_xdata();
  629. } else {
  630. clear_has_xdata();
  631. }
  632. xdata_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), xdata);
  633. // @@protoc_insertion_point(field_set_allocated:iv.EchoRequest.xdata)
  634. }
  635. #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
  636. // ===================================================================
  637. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  638. const int EchoResponse::kMsgnameFieldNumber;
  639. const int EchoResponse::kIndexFieldNumber;
  640. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  641. EchoResponse::EchoResponse()
  642. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  643. SharedCtor();
  644. // @@protoc_insertion_point(constructor:iv.EchoResponse)
  645. }
  646. void EchoResponse::InitAsDefaultInstance() {
  647. }
  648. EchoResponse::EchoResponse(const EchoResponse& from)
  649. : ::google::protobuf::Message(),
  650. _internal_metadata_(NULL) {
  651. SharedCtor();
  652. MergeFrom(from);
  653. // @@protoc_insertion_point(copy_constructor:iv.EchoResponse)
  654. }
  655. void EchoResponse::SharedCtor() {
  656. ::google::protobuf::internal::GetEmptyString();
  657. _cached_size_ = 0;
  658. msgname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  659. index_ = GOOGLE_LONGLONG(0);
  660. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  661. }
  662. EchoResponse::~EchoResponse() {
  663. // @@protoc_insertion_point(destructor:iv.EchoResponse)
  664. SharedDtor();
  665. }
  666. void EchoResponse::SharedDtor() {
  667. msgname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  668. if (this != default_instance_) {
  669. }
  670. }
  671. void EchoResponse::SetCachedSize(int size) const {
  672. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  673. _cached_size_ = size;
  674. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  675. }
  676. const ::google::protobuf::Descriptor* EchoResponse::descriptor() {
  677. protobuf_AssignDescriptorsOnce();
  678. return EchoResponse_descriptor_;
  679. }
  680. const EchoResponse& EchoResponse::default_instance() {
  681. if (default_instance_ == NULL) protobuf_AddDesc_echo_2eproto();
  682. return *default_instance_;
  683. }
  684. EchoResponse* EchoResponse::default_instance_ = NULL;
  685. EchoResponse* EchoResponse::New(::google::protobuf::Arena* arena) const {
  686. EchoResponse* n = new EchoResponse;
  687. if (arena != NULL) {
  688. arena->Own(n);
  689. }
  690. return n;
  691. }
  692. void EchoResponse::Clear() {
  693. // @@protoc_insertion_point(message_clear_start:iv.EchoResponse)
  694. if (_has_bits_[0 / 32] & 3u) {
  695. if (has_msgname()) {
  696. msgname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  697. }
  698. index_ = GOOGLE_LONGLONG(0);
  699. }
  700. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  701. if (_internal_metadata_.have_unknown_fields()) {
  702. mutable_unknown_fields()->Clear();
  703. }
  704. }
  705. bool EchoResponse::MergePartialFromCodedStream(
  706. ::google::protobuf::io::CodedInputStream* input) {
  707. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  708. ::google::protobuf::uint32 tag;
  709. // @@protoc_insertion_point(parse_start:iv.EchoResponse)
  710. for (;;) {
  711. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
  712. tag = p.first;
  713. if (!p.second) goto handle_unusual;
  714. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  715. // required string msgname = 1;
  716. case 1: {
  717. if (tag == 10) {
  718. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  719. input, this->mutable_msgname()));
  720. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  721. this->msgname().data(), this->msgname().length(),
  722. ::google::protobuf::internal::WireFormat::PARSE,
  723. "iv.EchoResponse.msgname");
  724. } else {
  725. goto handle_unusual;
  726. }
  727. if (input->ExpectTag(16)) goto parse_index;
  728. break;
  729. }
  730. // required int64 index = 2;
  731. case 2: {
  732. if (tag == 16) {
  733. parse_index:
  734. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  735. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  736. input, &index_)));
  737. set_has_index();
  738. } else {
  739. goto handle_unusual;
  740. }
  741. if (input->ExpectAtEnd()) goto success;
  742. break;
  743. }
  744. default: {
  745. handle_unusual:
  746. if (tag == 0 ||
  747. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  748. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  749. goto success;
  750. }
  751. DO_(::google::protobuf::internal::WireFormat::SkipField(
  752. input, tag, mutable_unknown_fields()));
  753. break;
  754. }
  755. }
  756. }
  757. success:
  758. // @@protoc_insertion_point(parse_success:iv.EchoResponse)
  759. return true;
  760. failure:
  761. // @@protoc_insertion_point(parse_failure:iv.EchoResponse)
  762. return false;
  763. #undef DO_
  764. }
  765. void EchoResponse::SerializeWithCachedSizes(
  766. ::google::protobuf::io::CodedOutputStream* output) const {
  767. // @@protoc_insertion_point(serialize_start:iv.EchoResponse)
  768. // required string msgname = 1;
  769. if (has_msgname()) {
  770. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  771. this->msgname().data(), this->msgname().length(),
  772. ::google::protobuf::internal::WireFormat::SERIALIZE,
  773. "iv.EchoResponse.msgname");
  774. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  775. 1, this->msgname(), output);
  776. }
  777. // required int64 index = 2;
  778. if (has_index()) {
  779. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->index(), output);
  780. }
  781. if (_internal_metadata_.have_unknown_fields()) {
  782. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  783. unknown_fields(), output);
  784. }
  785. // @@protoc_insertion_point(serialize_end:iv.EchoResponse)
  786. }
  787. ::google::protobuf::uint8* EchoResponse::InternalSerializeWithCachedSizesToArray(
  788. bool deterministic, ::google::protobuf::uint8* target) const {
  789. // @@protoc_insertion_point(serialize_to_array_start:iv.EchoResponse)
  790. // required string msgname = 1;
  791. if (has_msgname()) {
  792. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  793. this->msgname().data(), this->msgname().length(),
  794. ::google::protobuf::internal::WireFormat::SERIALIZE,
  795. "iv.EchoResponse.msgname");
  796. target =
  797. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  798. 1, this->msgname(), target);
  799. }
  800. // required int64 index = 2;
  801. if (has_index()) {
  802. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->index(), target);
  803. }
  804. if (_internal_metadata_.have_unknown_fields()) {
  805. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  806. unknown_fields(), target);
  807. }
  808. // @@protoc_insertion_point(serialize_to_array_end:iv.EchoResponse)
  809. return target;
  810. }
  811. int EchoResponse::RequiredFieldsByteSizeFallback() const {
  812. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:iv.EchoResponse)
  813. int total_size = 0;
  814. if (has_msgname()) {
  815. // required string msgname = 1;
  816. total_size += 1 +
  817. ::google::protobuf::internal::WireFormatLite::StringSize(
  818. this->msgname());
  819. }
  820. if (has_index()) {
  821. // required int64 index = 2;
  822. total_size += 1 +
  823. ::google::protobuf::internal::WireFormatLite::Int64Size(
  824. this->index());
  825. }
  826. return total_size;
  827. }
  828. int EchoResponse::ByteSize() const {
  829. // @@protoc_insertion_point(message_byte_size_start:iv.EchoResponse)
  830. int total_size = 0;
  831. if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
  832. // required string msgname = 1;
  833. total_size += 1 +
  834. ::google::protobuf::internal::WireFormatLite::StringSize(
  835. this->msgname());
  836. // required int64 index = 2;
  837. total_size += 1 +
  838. ::google::protobuf::internal::WireFormatLite::Int64Size(
  839. this->index());
  840. } else {
  841. total_size += RequiredFieldsByteSizeFallback();
  842. }
  843. if (_internal_metadata_.have_unknown_fields()) {
  844. total_size +=
  845. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  846. unknown_fields());
  847. }
  848. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  849. _cached_size_ = total_size;
  850. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  851. return total_size;
  852. }
  853. void EchoResponse::MergeFrom(const ::google::protobuf::Message& from) {
  854. // @@protoc_insertion_point(generalized_merge_from_start:iv.EchoResponse)
  855. if (GOOGLE_PREDICT_FALSE(&from == this)) {
  856. ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
  857. }
  858. const EchoResponse* source =
  859. ::google::protobuf::internal::DynamicCastToGenerated<const EchoResponse>(
  860. &from);
  861. if (source == NULL) {
  862. // @@protoc_insertion_point(generalized_merge_from_cast_fail:iv.EchoResponse)
  863. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  864. } else {
  865. // @@protoc_insertion_point(generalized_merge_from_cast_success:iv.EchoResponse)
  866. MergeFrom(*source);
  867. }
  868. }
  869. void EchoResponse::MergeFrom(const EchoResponse& from) {
  870. // @@protoc_insertion_point(class_specific_merge_from_start:iv.EchoResponse)
  871. if (GOOGLE_PREDICT_FALSE(&from == this)) {
  872. ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
  873. }
  874. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  875. if (from.has_msgname()) {
  876. set_has_msgname();
  877. msgname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.msgname_);
  878. }
  879. if (from.has_index()) {
  880. set_index(from.index());
  881. }
  882. }
  883. if (from._internal_metadata_.have_unknown_fields()) {
  884. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  885. }
  886. }
  887. void EchoResponse::CopyFrom(const ::google::protobuf::Message& from) {
  888. // @@protoc_insertion_point(generalized_copy_from_start:iv.EchoResponse)
  889. if (&from == this) return;
  890. Clear();
  891. MergeFrom(from);
  892. }
  893. void EchoResponse::CopyFrom(const EchoResponse& from) {
  894. // @@protoc_insertion_point(class_specific_copy_from_start:iv.EchoResponse)
  895. if (&from == this) return;
  896. Clear();
  897. MergeFrom(from);
  898. }
  899. bool EchoResponse::IsInitialized() const {
  900. if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  901. return true;
  902. }
  903. void EchoResponse::Swap(EchoResponse* other) {
  904. if (other == this) return;
  905. InternalSwap(other);
  906. }
  907. void EchoResponse::InternalSwap(EchoResponse* other) {
  908. msgname_.Swap(&other->msgname_);
  909. std::swap(index_, other->index_);
  910. std::swap(_has_bits_[0], other->_has_bits_[0]);
  911. _internal_metadata_.Swap(&other->_internal_metadata_);
  912. std::swap(_cached_size_, other->_cached_size_);
  913. }
  914. ::google::protobuf::Metadata EchoResponse::GetMetadata() const {
  915. protobuf_AssignDescriptorsOnce();
  916. ::google::protobuf::Metadata metadata;
  917. metadata.descriptor = EchoResponse_descriptor_;
  918. metadata.reflection = EchoResponse_reflection_;
  919. return metadata;
  920. }
  921. #if PROTOBUF_INLINE_NOT_IN_HEADERS
  922. // EchoResponse
  923. // required string msgname = 1;
  924. bool EchoResponse::has_msgname() const {
  925. return (_has_bits_[0] & 0x00000001u) != 0;
  926. }
  927. void EchoResponse::set_has_msgname() {
  928. _has_bits_[0] |= 0x00000001u;
  929. }
  930. void EchoResponse::clear_has_msgname() {
  931. _has_bits_[0] &= ~0x00000001u;
  932. }
  933. void EchoResponse::clear_msgname() {
  934. msgname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  935. clear_has_msgname();
  936. }
  937. const ::std::string& EchoResponse::msgname() const {
  938. // @@protoc_insertion_point(field_get:iv.EchoResponse.msgname)
  939. return msgname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  940. }
  941. void EchoResponse::set_msgname(const ::std::string& value) {
  942. set_has_msgname();
  943. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  944. // @@protoc_insertion_point(field_set:iv.EchoResponse.msgname)
  945. }
  946. void EchoResponse::set_msgname(const char* value) {
  947. set_has_msgname();
  948. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  949. // @@protoc_insertion_point(field_set_char:iv.EchoResponse.msgname)
  950. }
  951. void EchoResponse::set_msgname(const char* value, size_t size) {
  952. set_has_msgname();
  953. msgname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  954. ::std::string(reinterpret_cast<const char*>(value), size));
  955. // @@protoc_insertion_point(field_set_pointer:iv.EchoResponse.msgname)
  956. }
  957. ::std::string* EchoResponse::mutable_msgname() {
  958. set_has_msgname();
  959. // @@protoc_insertion_point(field_mutable:iv.EchoResponse.msgname)
  960. return msgname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  961. }
  962. ::std::string* EchoResponse::release_msgname() {
  963. // @@protoc_insertion_point(field_release:iv.EchoResponse.msgname)
  964. clear_has_msgname();
  965. return msgname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  966. }
  967. void EchoResponse::set_allocated_msgname(::std::string* msgname) {
  968. if (msgname != NULL) {
  969. set_has_msgname();
  970. } else {
  971. clear_has_msgname();
  972. }
  973. msgname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), msgname);
  974. // @@protoc_insertion_point(field_set_allocated:iv.EchoResponse.msgname)
  975. }
  976. // required int64 index = 2;
  977. bool EchoResponse::has_index() const {
  978. return (_has_bits_[0] & 0x00000002u) != 0;
  979. }
  980. void EchoResponse::set_has_index() {
  981. _has_bits_[0] |= 0x00000002u;
  982. }
  983. void EchoResponse::clear_has_index() {
  984. _has_bits_[0] &= ~0x00000002u;
  985. }
  986. void EchoResponse::clear_index() {
  987. index_ = GOOGLE_LONGLONG(0);
  988. clear_has_index();
  989. }
  990. ::google::protobuf::int64 EchoResponse::index() const {
  991. // @@protoc_insertion_point(field_get:iv.EchoResponse.index)
  992. return index_;
  993. }
  994. void EchoResponse::set_index(::google::protobuf::int64 value) {
  995. set_has_index();
  996. index_ = value;
  997. // @@protoc_insertion_point(field_set:iv.EchoResponse.index)
  998. }
  999. #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
  1000. // ===================================================================
  1001. EchoService::~EchoService() {}
  1002. const ::google::protobuf::ServiceDescriptor* EchoService::descriptor() {
  1003. protobuf_AssignDescriptorsOnce();
  1004. return EchoService_descriptor_;
  1005. }
  1006. const ::google::protobuf::ServiceDescriptor* EchoService::GetDescriptor() {
  1007. protobuf_AssignDescriptorsOnce();
  1008. return EchoService_descriptor_;
  1009. }
  1010. void EchoService::Echo(::google::protobuf::RpcController* controller,
  1011. const ::iv::EchoRequest*,
  1012. ::iv::EchoResponse*,
  1013. ::google::protobuf::Closure* done) {
  1014. controller->SetFailed("Method Echo() not implemented.");
  1015. done->Run();
  1016. }
  1017. void EchoService::CallMethod(const ::google::protobuf::MethodDescriptor* method,
  1018. ::google::protobuf::RpcController* controller,
  1019. const ::google::protobuf::Message* request,
  1020. ::google::protobuf::Message* response,
  1021. ::google::protobuf::Closure* done) {
  1022. GOOGLE_DCHECK_EQ(method->service(), EchoService_descriptor_);
  1023. switch(method->index()) {
  1024. case 0:
  1025. Echo(controller,
  1026. ::google::protobuf::down_cast<const ::iv::EchoRequest*>(request),
  1027. ::google::protobuf::down_cast< ::iv::EchoResponse*>(response),
  1028. done);
  1029. break;
  1030. default:
  1031. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  1032. break;
  1033. }
  1034. }
  1035. const ::google::protobuf::Message& EchoService::GetRequestPrototype(
  1036. const ::google::protobuf::MethodDescriptor* method) const {
  1037. GOOGLE_DCHECK_EQ(method->service(), descriptor());
  1038. switch(method->index()) {
  1039. case 0:
  1040. return ::iv::EchoRequest::default_instance();
  1041. default:
  1042. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  1043. return *::google::protobuf::MessageFactory::generated_factory()
  1044. ->GetPrototype(method->input_type());
  1045. }
  1046. }
  1047. const ::google::protobuf::Message& EchoService::GetResponsePrototype(
  1048. const ::google::protobuf::MethodDescriptor* method) const {
  1049. GOOGLE_DCHECK_EQ(method->service(), descriptor());
  1050. switch(method->index()) {
  1051. case 0:
  1052. return ::iv::EchoResponse::default_instance();
  1053. default:
  1054. GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
  1055. return *::google::protobuf::MessageFactory::generated_factory()
  1056. ->GetPrototype(method->output_type());
  1057. }
  1058. }
  1059. EchoService_Stub::EchoService_Stub(::google::protobuf::RpcChannel* channel)
  1060. : channel_(channel), owns_channel_(false) {}
  1061. EchoService_Stub::EchoService_Stub(
  1062. ::google::protobuf::RpcChannel* channel,
  1063. ::google::protobuf::Service::ChannelOwnership ownership)
  1064. : channel_(channel),
  1065. owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
  1066. EchoService_Stub::~EchoService_Stub() {
  1067. if (owns_channel_) delete channel_;
  1068. }
  1069. void EchoService_Stub::Echo(::google::protobuf::RpcController* controller,
  1070. const ::iv::EchoRequest* request,
  1071. ::iv::EchoResponse* response,
  1072. ::google::protobuf::Closure* done) {
  1073. channel_->CallMethod(descriptor()->method(0),
  1074. controller, request, response, done);
  1075. }
  1076. // @@protoc_insertion_point(namespace_scope)
  1077. } // namespace iv
  1078. // @@protoc_insertion_point(global_scope)