network.pb.cc 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: network.proto
  3. #include "network.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // This is a temporary google only hack
  15. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  16. #include "third_party/protobuf/version.h"
  17. #endif
  18. // @@protoc_insertion_point(includes)
  19. namespace Network_proto {
  20. class Network_informationDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<Network_information>
  23. _instance;
  24. } _Network_information_default_instance_;
  25. class Network_parameterDefaultTypeInternal {
  26. public:
  27. ::google::protobuf::internal::ExplicitlyConstructed<Network_parameter>
  28. _instance;
  29. } _Network_parameter_default_instance_;
  30. class Network_parameter_allDefaultTypeInternal {
  31. public:
  32. ::google::protobuf::internal::ExplicitlyConstructed<Network_parameter_all>
  33. _instance;
  34. } _Network_parameter_all_default_instance_;
  35. } // namespace Network_proto
  36. namespace protobuf_network_2eproto {
  37. void InitDefaultsNetwork_informationImpl() {
  38. GOOGLE_PROTOBUF_VERIFY_VERSION;
  39. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  40. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  41. #else
  42. ::google::protobuf::internal::InitProtobufDefaults();
  43. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  44. {
  45. void* ptr = &::Network_proto::_Network_information_default_instance_;
  46. new (ptr) ::Network_proto::Network_information();
  47. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  48. }
  49. ::Network_proto::Network_information::InitAsDefaultInstance();
  50. }
  51. void InitDefaultsNetwork_information() {
  52. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  53. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNetwork_informationImpl);
  54. }
  55. void InitDefaultsNetwork_parameterImpl() {
  56. GOOGLE_PROTOBUF_VERIFY_VERSION;
  57. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  58. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  59. #else
  60. ::google::protobuf::internal::InitProtobufDefaults();
  61. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  62. protobuf_network_2eproto::InitDefaultsNetwork_information();
  63. {
  64. void* ptr = &::Network_proto::_Network_parameter_default_instance_;
  65. new (ptr) ::Network_proto::Network_parameter();
  66. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  67. }
  68. ::Network_proto::Network_parameter::InitAsDefaultInstance();
  69. }
  70. void InitDefaultsNetwork_parameter() {
  71. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  72. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNetwork_parameterImpl);
  73. }
  74. void InitDefaultsNetwork_parameter_allImpl() {
  75. GOOGLE_PROTOBUF_VERIFY_VERSION;
  76. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  77. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  78. #else
  79. ::google::protobuf::internal::InitProtobufDefaults();
  80. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  81. protobuf_network_2eproto::InitDefaultsNetwork_parameter();
  82. {
  83. void* ptr = &::Network_proto::_Network_parameter_all_default_instance_;
  84. new (ptr) ::Network_proto::Network_parameter_all();
  85. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  86. }
  87. ::Network_proto::Network_parameter_all::InitAsDefaultInstance();
  88. }
  89. void InitDefaultsNetwork_parameter_all() {
  90. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  91. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNetwork_parameter_allImpl);
  92. }
  93. ::google::protobuf::Metadata file_level_metadata[3];
  94. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  95. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  96. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, _has_bits_),
  97. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, _internal_metadata_),
  98. ~0u, // no _extensions_
  99. ~0u, // no _oneof_case_
  100. ~0u, // no _weak_field_map_
  101. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, network_mode_),
  102. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, socket_id_),
  103. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, ip_),
  104. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, port_),
  105. 1,
  106. 2,
  107. 0,
  108. 3,
  109. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, _has_bits_),
  110. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, _internal_metadata_),
  111. ~0u, // no _extensions_
  112. ~0u, // no _oneof_case_
  113. ~0u, // no _weak_field_map_
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, network_information_vector_),
  115. ~0u,
  116. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, _has_bits_),
  117. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, _internal_metadata_),
  118. ~0u, // no _extensions_
  119. ~0u, // no _oneof_case_
  120. ~0u, // no _weak_field_map_
  121. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, network_parameters_),
  122. 0,
  123. };
  124. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  125. { 0, 9, sizeof(::Network_proto::Network_information)},
  126. { 13, 19, sizeof(::Network_proto::Network_parameter)},
  127. { 20, 26, sizeof(::Network_proto::Network_parameter_all)},
  128. };
  129. static ::google::protobuf::Message const * const file_default_instances[] = {
  130. reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_information_default_instance_),
  131. reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_parameter_default_instance_),
  132. reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_parameter_all_default_instance_),
  133. };
  134. void protobuf_AssignDescriptors() {
  135. AddDescriptors();
  136. ::google::protobuf::MessageFactory* factory = NULL;
  137. AssignDescriptors(
  138. "network.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  139. file_level_metadata, file_level_enum_descriptors, NULL);
  140. }
  141. void protobuf_AssignDescriptorsOnce() {
  142. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  143. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  144. }
  145. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  146. void protobuf_RegisterTypes(const ::std::string&) {
  147. protobuf_AssignDescriptorsOnce();
  148. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  149. }
  150. void AddDescriptorsImpl() {
  151. InitDefaults();
  152. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  153. "\n\rnetwork.proto\022\rNetwork_proto\"\216\001\n\023Netwo"
  154. "rk_information\022B\n\014network_mode\030\001 \001(\0162\033.N"
  155. "etwork_proto.Network_mode:\017NETWORK_UNKNO"
  156. "WN\022\024\n\tsocket_id\030\002 \001(\005:\0010\022\014\n\002ip\030\003 \001(\t:\000\022\017"
  157. "\n\004port\030\004 \001(\005:\0010\"[\n\021Network_parameter\022F\n\032"
  158. "network_information_vector\030\001 \003(\0132\".Netwo"
  159. "rk_proto.Network_information\"U\n\025Network_"
  160. "parameter_all\022<\n\022network_parameters\030\001 \001("
  161. "\0132 .Network_proto.Network_parameter*L\n\014N"
  162. "etwork_mode\022\023\n\017NETWORK_UNKNOWN\020\000\022\016\n\nTCP_"
  163. "CLIENT\020\001\022\016\n\nTCP_SERVER\020\002\022\007\n\003UDP\020\003"
  164. };
  165. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  166. descriptor, 433);
  167. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  168. "network.proto", &protobuf_RegisterTypes);
  169. }
  170. void AddDescriptors() {
  171. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  172. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  173. }
  174. // Force AddDescriptors() to be called at dynamic initialization time.
  175. struct StaticDescriptorInitializer {
  176. StaticDescriptorInitializer() {
  177. AddDescriptors();
  178. }
  179. } static_descriptor_initializer;
  180. } // namespace protobuf_network_2eproto
  181. namespace Network_proto {
  182. const ::google::protobuf::EnumDescriptor* Network_mode_descriptor() {
  183. protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  184. return protobuf_network_2eproto::file_level_enum_descriptors[0];
  185. }
  186. bool Network_mode_IsValid(int value) {
  187. switch (value) {
  188. case 0:
  189. case 1:
  190. case 2:
  191. case 3:
  192. return true;
  193. default:
  194. return false;
  195. }
  196. }
  197. // ===================================================================
  198. void Network_information::InitAsDefaultInstance() {
  199. }
  200. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  201. const int Network_information::kNetworkModeFieldNumber;
  202. const int Network_information::kSocketIdFieldNumber;
  203. const int Network_information::kIpFieldNumber;
  204. const int Network_information::kPortFieldNumber;
  205. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  206. Network_information::Network_information()
  207. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  208. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  209. ::protobuf_network_2eproto::InitDefaultsNetwork_information();
  210. }
  211. SharedCtor();
  212. // @@protoc_insertion_point(constructor:Network_proto.Network_information)
  213. }
  214. Network_information::Network_information(const Network_information& from)
  215. : ::google::protobuf::Message(),
  216. _internal_metadata_(NULL),
  217. _has_bits_(from._has_bits_),
  218. _cached_size_(0) {
  219. _internal_metadata_.MergeFrom(from._internal_metadata_);
  220. ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  221. if (from.has_ip()) {
  222. ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
  223. }
  224. ::memcpy(&network_mode_, &from.network_mode_,
  225. static_cast<size_t>(reinterpret_cast<char*>(&port_) -
  226. reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
  227. // @@protoc_insertion_point(copy_constructor:Network_proto.Network_information)
  228. }
  229. void Network_information::SharedCtor() {
  230. _cached_size_ = 0;
  231. ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  232. ::memset(&network_mode_, 0, static_cast<size_t>(
  233. reinterpret_cast<char*>(&port_) -
  234. reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
  235. }
  236. Network_information::~Network_information() {
  237. // @@protoc_insertion_point(destructor:Network_proto.Network_information)
  238. SharedDtor();
  239. }
  240. void Network_information::SharedDtor() {
  241. ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  242. }
  243. void Network_information::SetCachedSize(int size) const {
  244. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  245. _cached_size_ = size;
  246. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  247. }
  248. const ::google::protobuf::Descriptor* Network_information::descriptor() {
  249. ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  250. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  251. }
  252. const Network_information& Network_information::default_instance() {
  253. ::protobuf_network_2eproto::InitDefaultsNetwork_information();
  254. return *internal_default_instance();
  255. }
  256. Network_information* Network_information::New(::google::protobuf::Arena* arena) const {
  257. Network_information* n = new Network_information;
  258. if (arena != NULL) {
  259. arena->Own(n);
  260. }
  261. return n;
  262. }
  263. void Network_information::Clear() {
  264. // @@protoc_insertion_point(message_clear_start:Network_proto.Network_information)
  265. ::google::protobuf::uint32 cached_has_bits = 0;
  266. // Prevent compiler warnings about cached_has_bits being unused
  267. (void) cached_has_bits;
  268. cached_has_bits = _has_bits_[0];
  269. if (cached_has_bits & 0x00000001u) {
  270. GOOGLE_DCHECK(!ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  271. (*ip_.UnsafeRawStringPointer())->clear();
  272. }
  273. if (cached_has_bits & 14u) {
  274. ::memset(&network_mode_, 0, static_cast<size_t>(
  275. reinterpret_cast<char*>(&port_) -
  276. reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
  277. }
  278. _has_bits_.Clear();
  279. _internal_metadata_.Clear();
  280. }
  281. bool Network_information::MergePartialFromCodedStream(
  282. ::google::protobuf::io::CodedInputStream* input) {
  283. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  284. ::google::protobuf::uint32 tag;
  285. // @@protoc_insertion_point(parse_start:Network_proto.Network_information)
  286. for (;;) {
  287. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  288. tag = p.first;
  289. if (!p.second) goto handle_unusual;
  290. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  291. // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
  292. case 1: {
  293. if (static_cast< ::google::protobuf::uint8>(tag) ==
  294. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  295. int value;
  296. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  297. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  298. input, &value)));
  299. if (::Network_proto::Network_mode_IsValid(value)) {
  300. set_network_mode(static_cast< ::Network_proto::Network_mode >(value));
  301. } else {
  302. mutable_unknown_fields()->AddVarint(
  303. 1, static_cast< ::google::protobuf::uint64>(value));
  304. }
  305. } else {
  306. goto handle_unusual;
  307. }
  308. break;
  309. }
  310. // optional int32 socket_id = 2 [default = 0];
  311. case 2: {
  312. if (static_cast< ::google::protobuf::uint8>(tag) ==
  313. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  314. set_has_socket_id();
  315. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  316. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  317. input, &socket_id_)));
  318. } else {
  319. goto handle_unusual;
  320. }
  321. break;
  322. }
  323. // optional string ip = 3 [default = ""];
  324. case 3: {
  325. if (static_cast< ::google::protobuf::uint8>(tag) ==
  326. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  327. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  328. input, this->mutable_ip()));
  329. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  330. this->ip().data(), static_cast<int>(this->ip().length()),
  331. ::google::protobuf::internal::WireFormat::PARSE,
  332. "Network_proto.Network_information.ip");
  333. } else {
  334. goto handle_unusual;
  335. }
  336. break;
  337. }
  338. // optional int32 port = 4 [default = 0];
  339. case 4: {
  340. if (static_cast< ::google::protobuf::uint8>(tag) ==
  341. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  342. set_has_port();
  343. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  344. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  345. input, &port_)));
  346. } else {
  347. goto handle_unusual;
  348. }
  349. break;
  350. }
  351. default: {
  352. handle_unusual:
  353. if (tag == 0) {
  354. goto success;
  355. }
  356. DO_(::google::protobuf::internal::WireFormat::SkipField(
  357. input, tag, _internal_metadata_.mutable_unknown_fields()));
  358. break;
  359. }
  360. }
  361. }
  362. success:
  363. // @@protoc_insertion_point(parse_success:Network_proto.Network_information)
  364. return true;
  365. failure:
  366. // @@protoc_insertion_point(parse_failure:Network_proto.Network_information)
  367. return false;
  368. #undef DO_
  369. }
  370. void Network_information::SerializeWithCachedSizes(
  371. ::google::protobuf::io::CodedOutputStream* output) const {
  372. // @@protoc_insertion_point(serialize_start:Network_proto.Network_information)
  373. ::google::protobuf::uint32 cached_has_bits = 0;
  374. (void) cached_has_bits;
  375. cached_has_bits = _has_bits_[0];
  376. // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
  377. if (cached_has_bits & 0x00000002u) {
  378. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  379. 1, this->network_mode(), output);
  380. }
  381. // optional int32 socket_id = 2 [default = 0];
  382. if (cached_has_bits & 0x00000004u) {
  383. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->socket_id(), output);
  384. }
  385. // optional string ip = 3 [default = ""];
  386. if (cached_has_bits & 0x00000001u) {
  387. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  388. this->ip().data(), static_cast<int>(this->ip().length()),
  389. ::google::protobuf::internal::WireFormat::SERIALIZE,
  390. "Network_proto.Network_information.ip");
  391. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  392. 3, this->ip(), output);
  393. }
  394. // optional int32 port = 4 [default = 0];
  395. if (cached_has_bits & 0x00000008u) {
  396. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->port(), output);
  397. }
  398. if (_internal_metadata_.have_unknown_fields()) {
  399. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  400. _internal_metadata_.unknown_fields(), output);
  401. }
  402. // @@protoc_insertion_point(serialize_end:Network_proto.Network_information)
  403. }
  404. ::google::protobuf::uint8* Network_information::InternalSerializeWithCachedSizesToArray(
  405. bool deterministic, ::google::protobuf::uint8* target) const {
  406. (void)deterministic; // Unused
  407. // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_information)
  408. ::google::protobuf::uint32 cached_has_bits = 0;
  409. (void) cached_has_bits;
  410. cached_has_bits = _has_bits_[0];
  411. // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
  412. if (cached_has_bits & 0x00000002u) {
  413. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  414. 1, this->network_mode(), target);
  415. }
  416. // optional int32 socket_id = 2 [default = 0];
  417. if (cached_has_bits & 0x00000004u) {
  418. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->socket_id(), target);
  419. }
  420. // optional string ip = 3 [default = ""];
  421. if (cached_has_bits & 0x00000001u) {
  422. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  423. this->ip().data(), static_cast<int>(this->ip().length()),
  424. ::google::protobuf::internal::WireFormat::SERIALIZE,
  425. "Network_proto.Network_information.ip");
  426. target =
  427. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  428. 3, this->ip(), target);
  429. }
  430. // optional int32 port = 4 [default = 0];
  431. if (cached_has_bits & 0x00000008u) {
  432. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->port(), target);
  433. }
  434. if (_internal_metadata_.have_unknown_fields()) {
  435. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  436. _internal_metadata_.unknown_fields(), target);
  437. }
  438. // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_information)
  439. return target;
  440. }
  441. size_t Network_information::ByteSizeLong() const {
  442. // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_information)
  443. size_t total_size = 0;
  444. if (_internal_metadata_.have_unknown_fields()) {
  445. total_size +=
  446. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  447. _internal_metadata_.unknown_fields());
  448. }
  449. if (_has_bits_[0 / 32] & 15u) {
  450. // optional string ip = 3 [default = ""];
  451. if (has_ip()) {
  452. total_size += 1 +
  453. ::google::protobuf::internal::WireFormatLite::StringSize(
  454. this->ip());
  455. }
  456. // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
  457. if (has_network_mode()) {
  458. total_size += 1 +
  459. ::google::protobuf::internal::WireFormatLite::EnumSize(this->network_mode());
  460. }
  461. // optional int32 socket_id = 2 [default = 0];
  462. if (has_socket_id()) {
  463. total_size += 1 +
  464. ::google::protobuf::internal::WireFormatLite::Int32Size(
  465. this->socket_id());
  466. }
  467. // optional int32 port = 4 [default = 0];
  468. if (has_port()) {
  469. total_size += 1 +
  470. ::google::protobuf::internal::WireFormatLite::Int32Size(
  471. this->port());
  472. }
  473. }
  474. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  475. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  476. _cached_size_ = cached_size;
  477. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  478. return total_size;
  479. }
  480. void Network_information::MergeFrom(const ::google::protobuf::Message& from) {
  481. // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_information)
  482. GOOGLE_DCHECK_NE(&from, this);
  483. const Network_information* source =
  484. ::google::protobuf::internal::DynamicCastToGenerated<const Network_information>(
  485. &from);
  486. if (source == NULL) {
  487. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_information)
  488. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  489. } else {
  490. // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_information)
  491. MergeFrom(*source);
  492. }
  493. }
  494. void Network_information::MergeFrom(const Network_information& from) {
  495. // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_information)
  496. GOOGLE_DCHECK_NE(&from, this);
  497. _internal_metadata_.MergeFrom(from._internal_metadata_);
  498. ::google::protobuf::uint32 cached_has_bits = 0;
  499. (void) cached_has_bits;
  500. cached_has_bits = from._has_bits_[0];
  501. if (cached_has_bits & 15u) {
  502. if (cached_has_bits & 0x00000001u) {
  503. set_has_ip();
  504. ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
  505. }
  506. if (cached_has_bits & 0x00000002u) {
  507. network_mode_ = from.network_mode_;
  508. }
  509. if (cached_has_bits & 0x00000004u) {
  510. socket_id_ = from.socket_id_;
  511. }
  512. if (cached_has_bits & 0x00000008u) {
  513. port_ = from.port_;
  514. }
  515. _has_bits_[0] |= cached_has_bits;
  516. }
  517. }
  518. void Network_information::CopyFrom(const ::google::protobuf::Message& from) {
  519. // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_information)
  520. if (&from == this) return;
  521. Clear();
  522. MergeFrom(from);
  523. }
  524. void Network_information::CopyFrom(const Network_information& from) {
  525. // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_information)
  526. if (&from == this) return;
  527. Clear();
  528. MergeFrom(from);
  529. }
  530. bool Network_information::IsInitialized() const {
  531. return true;
  532. }
  533. void Network_information::Swap(Network_information* other) {
  534. if (other == this) return;
  535. InternalSwap(other);
  536. }
  537. void Network_information::InternalSwap(Network_information* other) {
  538. using std::swap;
  539. ip_.Swap(&other->ip_);
  540. swap(network_mode_, other->network_mode_);
  541. swap(socket_id_, other->socket_id_);
  542. swap(port_, other->port_);
  543. swap(_has_bits_[0], other->_has_bits_[0]);
  544. _internal_metadata_.Swap(&other->_internal_metadata_);
  545. swap(_cached_size_, other->_cached_size_);
  546. }
  547. ::google::protobuf::Metadata Network_information::GetMetadata() const {
  548. protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  549. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
  550. }
  551. // ===================================================================
  552. void Network_parameter::InitAsDefaultInstance() {
  553. }
  554. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  555. const int Network_parameter::kNetworkInformationVectorFieldNumber;
  556. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  557. Network_parameter::Network_parameter()
  558. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  559. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  560. ::protobuf_network_2eproto::InitDefaultsNetwork_parameter();
  561. }
  562. SharedCtor();
  563. // @@protoc_insertion_point(constructor:Network_proto.Network_parameter)
  564. }
  565. Network_parameter::Network_parameter(const Network_parameter& from)
  566. : ::google::protobuf::Message(),
  567. _internal_metadata_(NULL),
  568. _has_bits_(from._has_bits_),
  569. _cached_size_(0),
  570. network_information_vector_(from.network_information_vector_) {
  571. _internal_metadata_.MergeFrom(from._internal_metadata_);
  572. // @@protoc_insertion_point(copy_constructor:Network_proto.Network_parameter)
  573. }
  574. void Network_parameter::SharedCtor() {
  575. _cached_size_ = 0;
  576. }
  577. Network_parameter::~Network_parameter() {
  578. // @@protoc_insertion_point(destructor:Network_proto.Network_parameter)
  579. SharedDtor();
  580. }
  581. void Network_parameter::SharedDtor() {
  582. }
  583. void Network_parameter::SetCachedSize(int size) const {
  584. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  585. _cached_size_ = size;
  586. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  587. }
  588. const ::google::protobuf::Descriptor* Network_parameter::descriptor() {
  589. ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  590. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  591. }
  592. const Network_parameter& Network_parameter::default_instance() {
  593. ::protobuf_network_2eproto::InitDefaultsNetwork_parameter();
  594. return *internal_default_instance();
  595. }
  596. Network_parameter* Network_parameter::New(::google::protobuf::Arena* arena) const {
  597. Network_parameter* n = new Network_parameter;
  598. if (arena != NULL) {
  599. arena->Own(n);
  600. }
  601. return n;
  602. }
  603. void Network_parameter::Clear() {
  604. // @@protoc_insertion_point(message_clear_start:Network_proto.Network_parameter)
  605. ::google::protobuf::uint32 cached_has_bits = 0;
  606. // Prevent compiler warnings about cached_has_bits being unused
  607. (void) cached_has_bits;
  608. network_information_vector_.Clear();
  609. _has_bits_.Clear();
  610. _internal_metadata_.Clear();
  611. }
  612. bool Network_parameter::MergePartialFromCodedStream(
  613. ::google::protobuf::io::CodedInputStream* input) {
  614. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  615. ::google::protobuf::uint32 tag;
  616. // @@protoc_insertion_point(parse_start:Network_proto.Network_parameter)
  617. for (;;) {
  618. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  619. tag = p.first;
  620. if (!p.second) goto handle_unusual;
  621. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  622. // repeated .Network_proto.Network_information network_information_vector = 1;
  623. case 1: {
  624. if (static_cast< ::google::protobuf::uint8>(tag) ==
  625. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  626. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_network_information_vector()));
  627. } else {
  628. goto handle_unusual;
  629. }
  630. break;
  631. }
  632. default: {
  633. handle_unusual:
  634. if (tag == 0) {
  635. goto success;
  636. }
  637. DO_(::google::protobuf::internal::WireFormat::SkipField(
  638. input, tag, _internal_metadata_.mutable_unknown_fields()));
  639. break;
  640. }
  641. }
  642. }
  643. success:
  644. // @@protoc_insertion_point(parse_success:Network_proto.Network_parameter)
  645. return true;
  646. failure:
  647. // @@protoc_insertion_point(parse_failure:Network_proto.Network_parameter)
  648. return false;
  649. #undef DO_
  650. }
  651. void Network_parameter::SerializeWithCachedSizes(
  652. ::google::protobuf::io::CodedOutputStream* output) const {
  653. // @@protoc_insertion_point(serialize_start:Network_proto.Network_parameter)
  654. ::google::protobuf::uint32 cached_has_bits = 0;
  655. (void) cached_has_bits;
  656. // repeated .Network_proto.Network_information network_information_vector = 1;
  657. for (unsigned int i = 0,
  658. n = static_cast<unsigned int>(this->network_information_vector_size()); i < n; i++) {
  659. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  660. 1, this->network_information_vector(static_cast<int>(i)), output);
  661. }
  662. if (_internal_metadata_.have_unknown_fields()) {
  663. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  664. _internal_metadata_.unknown_fields(), output);
  665. }
  666. // @@protoc_insertion_point(serialize_end:Network_proto.Network_parameter)
  667. }
  668. ::google::protobuf::uint8* Network_parameter::InternalSerializeWithCachedSizesToArray(
  669. bool deterministic, ::google::protobuf::uint8* target) const {
  670. (void)deterministic; // Unused
  671. // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_parameter)
  672. ::google::protobuf::uint32 cached_has_bits = 0;
  673. (void) cached_has_bits;
  674. // repeated .Network_proto.Network_information network_information_vector = 1;
  675. for (unsigned int i = 0,
  676. n = static_cast<unsigned int>(this->network_information_vector_size()); i < n; i++) {
  677. target = ::google::protobuf::internal::WireFormatLite::
  678. InternalWriteMessageToArray(
  679. 1, this->network_information_vector(static_cast<int>(i)), deterministic, target);
  680. }
  681. if (_internal_metadata_.have_unknown_fields()) {
  682. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  683. _internal_metadata_.unknown_fields(), target);
  684. }
  685. // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_parameter)
  686. return target;
  687. }
  688. size_t Network_parameter::ByteSizeLong() const {
  689. // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_parameter)
  690. size_t total_size = 0;
  691. if (_internal_metadata_.have_unknown_fields()) {
  692. total_size +=
  693. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  694. _internal_metadata_.unknown_fields());
  695. }
  696. // repeated .Network_proto.Network_information network_information_vector = 1;
  697. {
  698. unsigned int count = static_cast<unsigned int>(this->network_information_vector_size());
  699. total_size += 1UL * count;
  700. for (unsigned int i = 0; i < count; i++) {
  701. total_size +=
  702. ::google::protobuf::internal::WireFormatLite::MessageSize(
  703. this->network_information_vector(static_cast<int>(i)));
  704. }
  705. }
  706. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  707. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  708. _cached_size_ = cached_size;
  709. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  710. return total_size;
  711. }
  712. void Network_parameter::MergeFrom(const ::google::protobuf::Message& from) {
  713. // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_parameter)
  714. GOOGLE_DCHECK_NE(&from, this);
  715. const Network_parameter* source =
  716. ::google::protobuf::internal::DynamicCastToGenerated<const Network_parameter>(
  717. &from);
  718. if (source == NULL) {
  719. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_parameter)
  720. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  721. } else {
  722. // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_parameter)
  723. MergeFrom(*source);
  724. }
  725. }
  726. void Network_parameter::MergeFrom(const Network_parameter& from) {
  727. // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_parameter)
  728. GOOGLE_DCHECK_NE(&from, this);
  729. _internal_metadata_.MergeFrom(from._internal_metadata_);
  730. ::google::protobuf::uint32 cached_has_bits = 0;
  731. (void) cached_has_bits;
  732. network_information_vector_.MergeFrom(from.network_information_vector_);
  733. }
  734. void Network_parameter::CopyFrom(const ::google::protobuf::Message& from) {
  735. // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_parameter)
  736. if (&from == this) return;
  737. Clear();
  738. MergeFrom(from);
  739. }
  740. void Network_parameter::CopyFrom(const Network_parameter& from) {
  741. // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_parameter)
  742. if (&from == this) return;
  743. Clear();
  744. MergeFrom(from);
  745. }
  746. bool Network_parameter::IsInitialized() const {
  747. return true;
  748. }
  749. void Network_parameter::Swap(Network_parameter* other) {
  750. if (other == this) return;
  751. InternalSwap(other);
  752. }
  753. void Network_parameter::InternalSwap(Network_parameter* other) {
  754. using std::swap;
  755. network_information_vector_.InternalSwap(&other->network_information_vector_);
  756. swap(_has_bits_[0], other->_has_bits_[0]);
  757. _internal_metadata_.Swap(&other->_internal_metadata_);
  758. swap(_cached_size_, other->_cached_size_);
  759. }
  760. ::google::protobuf::Metadata Network_parameter::GetMetadata() const {
  761. protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  762. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
  763. }
  764. // ===================================================================
  765. void Network_parameter_all::InitAsDefaultInstance() {
  766. ::Network_proto::_Network_parameter_all_default_instance_._instance.get_mutable()->network_parameters_ = const_cast< ::Network_proto::Network_parameter*>(
  767. ::Network_proto::Network_parameter::internal_default_instance());
  768. }
  769. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  770. const int Network_parameter_all::kNetworkParametersFieldNumber;
  771. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  772. Network_parameter_all::Network_parameter_all()
  773. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  774. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  775. ::protobuf_network_2eproto::InitDefaultsNetwork_parameter_all();
  776. }
  777. SharedCtor();
  778. // @@protoc_insertion_point(constructor:Network_proto.Network_parameter_all)
  779. }
  780. Network_parameter_all::Network_parameter_all(const Network_parameter_all& from)
  781. : ::google::protobuf::Message(),
  782. _internal_metadata_(NULL),
  783. _has_bits_(from._has_bits_),
  784. _cached_size_(0) {
  785. _internal_metadata_.MergeFrom(from._internal_metadata_);
  786. if (from.has_network_parameters()) {
  787. network_parameters_ = new ::Network_proto::Network_parameter(*from.network_parameters_);
  788. } else {
  789. network_parameters_ = NULL;
  790. }
  791. // @@protoc_insertion_point(copy_constructor:Network_proto.Network_parameter_all)
  792. }
  793. void Network_parameter_all::SharedCtor() {
  794. _cached_size_ = 0;
  795. network_parameters_ = NULL;
  796. }
  797. Network_parameter_all::~Network_parameter_all() {
  798. // @@protoc_insertion_point(destructor:Network_proto.Network_parameter_all)
  799. SharedDtor();
  800. }
  801. void Network_parameter_all::SharedDtor() {
  802. if (this != internal_default_instance()) delete network_parameters_;
  803. }
  804. void Network_parameter_all::SetCachedSize(int size) const {
  805. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  806. _cached_size_ = size;
  807. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  808. }
  809. const ::google::protobuf::Descriptor* Network_parameter_all::descriptor() {
  810. ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  811. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  812. }
  813. const Network_parameter_all& Network_parameter_all::default_instance() {
  814. ::protobuf_network_2eproto::InitDefaultsNetwork_parameter_all();
  815. return *internal_default_instance();
  816. }
  817. Network_parameter_all* Network_parameter_all::New(::google::protobuf::Arena* arena) const {
  818. Network_parameter_all* n = new Network_parameter_all;
  819. if (arena != NULL) {
  820. arena->Own(n);
  821. }
  822. return n;
  823. }
  824. void Network_parameter_all::Clear() {
  825. // @@protoc_insertion_point(message_clear_start:Network_proto.Network_parameter_all)
  826. ::google::protobuf::uint32 cached_has_bits = 0;
  827. // Prevent compiler warnings about cached_has_bits being unused
  828. (void) cached_has_bits;
  829. cached_has_bits = _has_bits_[0];
  830. if (cached_has_bits & 0x00000001u) {
  831. GOOGLE_DCHECK(network_parameters_ != NULL);
  832. network_parameters_->Clear();
  833. }
  834. _has_bits_.Clear();
  835. _internal_metadata_.Clear();
  836. }
  837. bool Network_parameter_all::MergePartialFromCodedStream(
  838. ::google::protobuf::io::CodedInputStream* input) {
  839. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  840. ::google::protobuf::uint32 tag;
  841. // @@protoc_insertion_point(parse_start:Network_proto.Network_parameter_all)
  842. for (;;) {
  843. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  844. tag = p.first;
  845. if (!p.second) goto handle_unusual;
  846. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  847. // optional .Network_proto.Network_parameter network_parameters = 1;
  848. case 1: {
  849. if (static_cast< ::google::protobuf::uint8>(tag) ==
  850. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  851. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  852. input, mutable_network_parameters()));
  853. } else {
  854. goto handle_unusual;
  855. }
  856. break;
  857. }
  858. default: {
  859. handle_unusual:
  860. if (tag == 0) {
  861. goto success;
  862. }
  863. DO_(::google::protobuf::internal::WireFormat::SkipField(
  864. input, tag, _internal_metadata_.mutable_unknown_fields()));
  865. break;
  866. }
  867. }
  868. }
  869. success:
  870. // @@protoc_insertion_point(parse_success:Network_proto.Network_parameter_all)
  871. return true;
  872. failure:
  873. // @@protoc_insertion_point(parse_failure:Network_proto.Network_parameter_all)
  874. return false;
  875. #undef DO_
  876. }
  877. void Network_parameter_all::SerializeWithCachedSizes(
  878. ::google::protobuf::io::CodedOutputStream* output) const {
  879. // @@protoc_insertion_point(serialize_start:Network_proto.Network_parameter_all)
  880. ::google::protobuf::uint32 cached_has_bits = 0;
  881. (void) cached_has_bits;
  882. cached_has_bits = _has_bits_[0];
  883. // optional .Network_proto.Network_parameter network_parameters = 1;
  884. if (cached_has_bits & 0x00000001u) {
  885. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  886. 1, *this->network_parameters_, output);
  887. }
  888. if (_internal_metadata_.have_unknown_fields()) {
  889. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  890. _internal_metadata_.unknown_fields(), output);
  891. }
  892. // @@protoc_insertion_point(serialize_end:Network_proto.Network_parameter_all)
  893. }
  894. ::google::protobuf::uint8* Network_parameter_all::InternalSerializeWithCachedSizesToArray(
  895. bool deterministic, ::google::protobuf::uint8* target) const {
  896. (void)deterministic; // Unused
  897. // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_parameter_all)
  898. ::google::protobuf::uint32 cached_has_bits = 0;
  899. (void) cached_has_bits;
  900. cached_has_bits = _has_bits_[0];
  901. // optional .Network_proto.Network_parameter network_parameters = 1;
  902. if (cached_has_bits & 0x00000001u) {
  903. target = ::google::protobuf::internal::WireFormatLite::
  904. InternalWriteMessageToArray(
  905. 1, *this->network_parameters_, deterministic, target);
  906. }
  907. if (_internal_metadata_.have_unknown_fields()) {
  908. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  909. _internal_metadata_.unknown_fields(), target);
  910. }
  911. // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_parameter_all)
  912. return target;
  913. }
  914. size_t Network_parameter_all::ByteSizeLong() const {
  915. // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_parameter_all)
  916. size_t total_size = 0;
  917. if (_internal_metadata_.have_unknown_fields()) {
  918. total_size +=
  919. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  920. _internal_metadata_.unknown_fields());
  921. }
  922. // optional .Network_proto.Network_parameter network_parameters = 1;
  923. if (has_network_parameters()) {
  924. total_size += 1 +
  925. ::google::protobuf::internal::WireFormatLite::MessageSize(
  926. *this->network_parameters_);
  927. }
  928. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  929. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  930. _cached_size_ = cached_size;
  931. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  932. return total_size;
  933. }
  934. void Network_parameter_all::MergeFrom(const ::google::protobuf::Message& from) {
  935. // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_parameter_all)
  936. GOOGLE_DCHECK_NE(&from, this);
  937. const Network_parameter_all* source =
  938. ::google::protobuf::internal::DynamicCastToGenerated<const Network_parameter_all>(
  939. &from);
  940. if (source == NULL) {
  941. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_parameter_all)
  942. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  943. } else {
  944. // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_parameter_all)
  945. MergeFrom(*source);
  946. }
  947. }
  948. void Network_parameter_all::MergeFrom(const Network_parameter_all& from) {
  949. // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_parameter_all)
  950. GOOGLE_DCHECK_NE(&from, this);
  951. _internal_metadata_.MergeFrom(from._internal_metadata_);
  952. ::google::protobuf::uint32 cached_has_bits = 0;
  953. (void) cached_has_bits;
  954. if (from.has_network_parameters()) {
  955. mutable_network_parameters()->::Network_proto::Network_parameter::MergeFrom(from.network_parameters());
  956. }
  957. }
  958. void Network_parameter_all::CopyFrom(const ::google::protobuf::Message& from) {
  959. // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_parameter_all)
  960. if (&from == this) return;
  961. Clear();
  962. MergeFrom(from);
  963. }
  964. void Network_parameter_all::CopyFrom(const Network_parameter_all& from) {
  965. // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_parameter_all)
  966. if (&from == this) return;
  967. Clear();
  968. MergeFrom(from);
  969. }
  970. bool Network_parameter_all::IsInitialized() const {
  971. return true;
  972. }
  973. void Network_parameter_all::Swap(Network_parameter_all* other) {
  974. if (other == this) return;
  975. InternalSwap(other);
  976. }
  977. void Network_parameter_all::InternalSwap(Network_parameter_all* other) {
  978. using std::swap;
  979. swap(network_parameters_, other->network_parameters_);
  980. swap(_has_bits_[0], other->_has_bits_[0]);
  981. _internal_metadata_.Swap(&other->_internal_metadata_);
  982. swap(_cached_size_, other->_cached_size_);
  983. }
  984. ::google::protobuf::Metadata Network_parameter_all::GetMetadata() const {
  985. protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
  986. return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
  987. }
  988. // @@protoc_insertion_point(namespace_scope)
  989. } // namespace Network_proto
  990. // @@protoc_insertion_point(global_scope)