system_setting.pb.cc 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: system_setting.proto
  3. #include "system_setting.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 setting {
  20. class System_settingDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<System_setting>
  23. _instance;
  24. } _System_setting_default_instance_;
  25. } // namespace setting
  26. namespace protobuf_system_5fsetting_2eproto {
  27. void InitDefaultsSystem_settingImpl() {
  28. GOOGLE_PROTOBUF_VERIFY_VERSION;
  29. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  30. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  31. #else
  32. ::google::protobuf::internal::InitProtobufDefaults();
  33. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  34. {
  35. void* ptr = &::setting::_System_setting_default_instance_;
  36. new (ptr) ::setting::System_setting();
  37. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  38. }
  39. ::setting::System_setting::InitAsDefaultInstance();
  40. }
  41. void InitDefaultsSystem_setting() {
  42. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  43. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsSystem_settingImpl);
  44. }
  45. ::google::protobuf::Metadata file_level_metadata[1];
  46. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  47. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, _has_bits_),
  48. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, _internal_metadata_),
  49. ~0u, // no _extensions_
  50. ~0u, // no _oneof_case_
  51. ~0u, // no _weak_field_map_
  52. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, bind_ip_),
  53. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, terminor_port_),
  54. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, park_space_port_),
  55. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, measurer_port_),
  56. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, dispatcher_port_),
  57. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, entrance_num_),
  58. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::System_setting, export_num_),
  59. 0,
  60. 3,
  61. 4,
  62. 5,
  63. 6,
  64. 1,
  65. 2,
  66. };
  67. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  68. { 0, 12, sizeof(::setting::System_setting)},
  69. };
  70. static ::google::protobuf::Message const * const file_default_instances[] = {
  71. reinterpret_cast<const ::google::protobuf::Message*>(&::setting::_System_setting_default_instance_),
  72. };
  73. void protobuf_AssignDescriptors() {
  74. AddDescriptors();
  75. ::google::protobuf::MessageFactory* factory = NULL;
  76. AssignDescriptors(
  77. "system_setting.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  78. file_level_metadata, NULL, NULL);
  79. }
  80. void protobuf_AssignDescriptorsOnce() {
  81. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  82. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  83. }
  84. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  85. void protobuf_RegisterTypes(const ::std::string&) {
  86. protobuf_AssignDescriptorsOnce();
  87. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
  88. }
  89. void AddDescriptorsImpl() {
  90. InitDefaults();
  91. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  92. "\n\024system_setting.proto\022\007setting\"\307\001\n\016Syst"
  93. "em_setting\022\017\n\007bind_ip\030\001 \002(\t\022\034\n\rterminor_"
  94. "port\030\002 \001(\005:\00530000\022\036\n\017park_space_port\030\003 \001"
  95. "(\005:\00530001\022\034\n\rmeasurer_port\030\004 \001(\005:\00530002\022"
  96. "\036\n\017dispatcher_port\030\005 \001(\005:\00530003\022\024\n\014entra"
  97. "nce_num\030\006 \002(\005\022\022\n\nexport_num\030\007 \002(\005"
  98. };
  99. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  100. descriptor, 233);
  101. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  102. "system_setting.proto", &protobuf_RegisterTypes);
  103. }
  104. void AddDescriptors() {
  105. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  106. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  107. }
  108. // Force AddDescriptors() to be called at dynamic initialization time.
  109. struct StaticDescriptorInitializer {
  110. StaticDescriptorInitializer() {
  111. AddDescriptors();
  112. }
  113. } static_descriptor_initializer;
  114. } // namespace protobuf_system_5fsetting_2eproto
  115. namespace setting {
  116. // ===================================================================
  117. void System_setting::InitAsDefaultInstance() {
  118. }
  119. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  120. const int System_setting::kBindIpFieldNumber;
  121. const int System_setting::kTerminorPortFieldNumber;
  122. const int System_setting::kParkSpacePortFieldNumber;
  123. const int System_setting::kMeasurerPortFieldNumber;
  124. const int System_setting::kDispatcherPortFieldNumber;
  125. const int System_setting::kEntranceNumFieldNumber;
  126. const int System_setting::kExportNumFieldNumber;
  127. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  128. System_setting::System_setting()
  129. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  130. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  131. ::protobuf_system_5fsetting_2eproto::InitDefaultsSystem_setting();
  132. }
  133. SharedCtor();
  134. // @@protoc_insertion_point(constructor:setting.System_setting)
  135. }
  136. System_setting::System_setting(const System_setting& from)
  137. : ::google::protobuf::Message(),
  138. _internal_metadata_(NULL),
  139. _has_bits_(from._has_bits_),
  140. _cached_size_(0) {
  141. _internal_metadata_.MergeFrom(from._internal_metadata_);
  142. bind_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  143. if (from.has_bind_ip()) {
  144. bind_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bind_ip_);
  145. }
  146. ::memcpy(&entrance_num_, &from.entrance_num_,
  147. static_cast<size_t>(reinterpret_cast<char*>(&dispatcher_port_) -
  148. reinterpret_cast<char*>(&entrance_num_)) + sizeof(dispatcher_port_));
  149. // @@protoc_insertion_point(copy_constructor:setting.System_setting)
  150. }
  151. void System_setting::SharedCtor() {
  152. _cached_size_ = 0;
  153. bind_ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  154. ::memset(&entrance_num_, 0, static_cast<size_t>(
  155. reinterpret_cast<char*>(&export_num_) -
  156. reinterpret_cast<char*>(&entrance_num_)) + sizeof(export_num_));
  157. terminor_port_ = 30000;
  158. park_space_port_ = 30001;
  159. measurer_port_ = 30002;
  160. dispatcher_port_ = 30003;
  161. }
  162. System_setting::~System_setting() {
  163. // @@protoc_insertion_point(destructor:setting.System_setting)
  164. SharedDtor();
  165. }
  166. void System_setting::SharedDtor() {
  167. bind_ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  168. }
  169. void System_setting::SetCachedSize(int size) const {
  170. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  171. _cached_size_ = size;
  172. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  173. }
  174. const ::google::protobuf::Descriptor* System_setting::descriptor() {
  175. ::protobuf_system_5fsetting_2eproto::protobuf_AssignDescriptorsOnce();
  176. return ::protobuf_system_5fsetting_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  177. }
  178. const System_setting& System_setting::default_instance() {
  179. ::protobuf_system_5fsetting_2eproto::InitDefaultsSystem_setting();
  180. return *internal_default_instance();
  181. }
  182. System_setting* System_setting::New(::google::protobuf::Arena* arena) const {
  183. System_setting* n = new System_setting;
  184. if (arena != NULL) {
  185. arena->Own(n);
  186. }
  187. return n;
  188. }
  189. void System_setting::Clear() {
  190. // @@protoc_insertion_point(message_clear_start:setting.System_setting)
  191. ::google::protobuf::uint32 cached_has_bits = 0;
  192. // Prevent compiler warnings about cached_has_bits being unused
  193. (void) cached_has_bits;
  194. cached_has_bits = _has_bits_[0];
  195. if (cached_has_bits & 0x00000001u) {
  196. GOOGLE_DCHECK(!bind_ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  197. (*bind_ip_.UnsafeRawStringPointer())->clear();
  198. }
  199. if (cached_has_bits & 126u) {
  200. ::memset(&entrance_num_, 0, static_cast<size_t>(
  201. reinterpret_cast<char*>(&export_num_) -
  202. reinterpret_cast<char*>(&entrance_num_)) + sizeof(export_num_));
  203. terminor_port_ = 30000;
  204. park_space_port_ = 30001;
  205. measurer_port_ = 30002;
  206. dispatcher_port_ = 30003;
  207. }
  208. _has_bits_.Clear();
  209. _internal_metadata_.Clear();
  210. }
  211. bool System_setting::MergePartialFromCodedStream(
  212. ::google::protobuf::io::CodedInputStream* input) {
  213. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  214. ::google::protobuf::uint32 tag;
  215. // @@protoc_insertion_point(parse_start:setting.System_setting)
  216. for (;;) {
  217. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  218. tag = p.first;
  219. if (!p.second) goto handle_unusual;
  220. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  221. // required string bind_ip = 1;
  222. case 1: {
  223. if (static_cast< ::google::protobuf::uint8>(tag) ==
  224. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  225. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  226. input, this->mutable_bind_ip()));
  227. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  228. this->bind_ip().data(), static_cast<int>(this->bind_ip().length()),
  229. ::google::protobuf::internal::WireFormat::PARSE,
  230. "setting.System_setting.bind_ip");
  231. } else {
  232. goto handle_unusual;
  233. }
  234. break;
  235. }
  236. // optional int32 terminor_port = 2 [default = 30000];
  237. case 2: {
  238. if (static_cast< ::google::protobuf::uint8>(tag) ==
  239. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  240. set_has_terminor_port();
  241. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  242. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  243. input, &terminor_port_)));
  244. } else {
  245. goto handle_unusual;
  246. }
  247. break;
  248. }
  249. // optional int32 park_space_port = 3 [default = 30001];
  250. case 3: {
  251. if (static_cast< ::google::protobuf::uint8>(tag) ==
  252. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  253. set_has_park_space_port();
  254. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  255. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  256. input, &park_space_port_)));
  257. } else {
  258. goto handle_unusual;
  259. }
  260. break;
  261. }
  262. // optional int32 measurer_port = 4 [default = 30002];
  263. case 4: {
  264. if (static_cast< ::google::protobuf::uint8>(tag) ==
  265. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  266. set_has_measurer_port();
  267. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  268. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  269. input, &measurer_port_)));
  270. } else {
  271. goto handle_unusual;
  272. }
  273. break;
  274. }
  275. // optional int32 dispatcher_port = 5 [default = 30003];
  276. case 5: {
  277. if (static_cast< ::google::protobuf::uint8>(tag) ==
  278. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  279. set_has_dispatcher_port();
  280. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  281. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  282. input, &dispatcher_port_)));
  283. } else {
  284. goto handle_unusual;
  285. }
  286. break;
  287. }
  288. // required int32 entrance_num = 6;
  289. case 6: {
  290. if (static_cast< ::google::protobuf::uint8>(tag) ==
  291. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  292. set_has_entrance_num();
  293. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  294. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  295. input, &entrance_num_)));
  296. } else {
  297. goto handle_unusual;
  298. }
  299. break;
  300. }
  301. // required int32 export_num = 7;
  302. case 7: {
  303. if (static_cast< ::google::protobuf::uint8>(tag) ==
  304. static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
  305. set_has_export_num();
  306. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  307. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  308. input, &export_num_)));
  309. } else {
  310. goto handle_unusual;
  311. }
  312. break;
  313. }
  314. default: {
  315. handle_unusual:
  316. if (tag == 0) {
  317. goto success;
  318. }
  319. DO_(::google::protobuf::internal::WireFormat::SkipField(
  320. input, tag, _internal_metadata_.mutable_unknown_fields()));
  321. break;
  322. }
  323. }
  324. }
  325. success:
  326. // @@protoc_insertion_point(parse_success:setting.System_setting)
  327. return true;
  328. failure:
  329. // @@protoc_insertion_point(parse_failure:setting.System_setting)
  330. return false;
  331. #undef DO_
  332. }
  333. void System_setting::SerializeWithCachedSizes(
  334. ::google::protobuf::io::CodedOutputStream* output) const {
  335. // @@protoc_insertion_point(serialize_start:setting.System_setting)
  336. ::google::protobuf::uint32 cached_has_bits = 0;
  337. (void) cached_has_bits;
  338. cached_has_bits = _has_bits_[0];
  339. // required string bind_ip = 1;
  340. if (cached_has_bits & 0x00000001u) {
  341. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  342. this->bind_ip().data(), static_cast<int>(this->bind_ip().length()),
  343. ::google::protobuf::internal::WireFormat::SERIALIZE,
  344. "setting.System_setting.bind_ip");
  345. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  346. 1, this->bind_ip(), output);
  347. }
  348. // optional int32 terminor_port = 2 [default = 30000];
  349. if (cached_has_bits & 0x00000008u) {
  350. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->terminor_port(), output);
  351. }
  352. // optional int32 park_space_port = 3 [default = 30001];
  353. if (cached_has_bits & 0x00000010u) {
  354. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->park_space_port(), output);
  355. }
  356. // optional int32 measurer_port = 4 [default = 30002];
  357. if (cached_has_bits & 0x00000020u) {
  358. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->measurer_port(), output);
  359. }
  360. // optional int32 dispatcher_port = 5 [default = 30003];
  361. if (cached_has_bits & 0x00000040u) {
  362. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->dispatcher_port(), output);
  363. }
  364. // required int32 entrance_num = 6;
  365. if (cached_has_bits & 0x00000002u) {
  366. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->entrance_num(), output);
  367. }
  368. // required int32 export_num = 7;
  369. if (cached_has_bits & 0x00000004u) {
  370. ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->export_num(), output);
  371. }
  372. if (_internal_metadata_.have_unknown_fields()) {
  373. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  374. _internal_metadata_.unknown_fields(), output);
  375. }
  376. // @@protoc_insertion_point(serialize_end:setting.System_setting)
  377. }
  378. ::google::protobuf::uint8* System_setting::InternalSerializeWithCachedSizesToArray(
  379. bool deterministic, ::google::protobuf::uint8* target) const {
  380. (void)deterministic; // Unused
  381. // @@protoc_insertion_point(serialize_to_array_start:setting.System_setting)
  382. ::google::protobuf::uint32 cached_has_bits = 0;
  383. (void) cached_has_bits;
  384. cached_has_bits = _has_bits_[0];
  385. // required string bind_ip = 1;
  386. if (cached_has_bits & 0x00000001u) {
  387. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  388. this->bind_ip().data(), static_cast<int>(this->bind_ip().length()),
  389. ::google::protobuf::internal::WireFormat::SERIALIZE,
  390. "setting.System_setting.bind_ip");
  391. target =
  392. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  393. 1, this->bind_ip(), target);
  394. }
  395. // optional int32 terminor_port = 2 [default = 30000];
  396. if (cached_has_bits & 0x00000008u) {
  397. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->terminor_port(), target);
  398. }
  399. // optional int32 park_space_port = 3 [default = 30001];
  400. if (cached_has_bits & 0x00000010u) {
  401. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->park_space_port(), target);
  402. }
  403. // optional int32 measurer_port = 4 [default = 30002];
  404. if (cached_has_bits & 0x00000020u) {
  405. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->measurer_port(), target);
  406. }
  407. // optional int32 dispatcher_port = 5 [default = 30003];
  408. if (cached_has_bits & 0x00000040u) {
  409. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->dispatcher_port(), target);
  410. }
  411. // required int32 entrance_num = 6;
  412. if (cached_has_bits & 0x00000002u) {
  413. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->entrance_num(), target);
  414. }
  415. // required int32 export_num = 7;
  416. if (cached_has_bits & 0x00000004u) {
  417. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->export_num(), target);
  418. }
  419. if (_internal_metadata_.have_unknown_fields()) {
  420. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  421. _internal_metadata_.unknown_fields(), target);
  422. }
  423. // @@protoc_insertion_point(serialize_to_array_end:setting.System_setting)
  424. return target;
  425. }
  426. size_t System_setting::RequiredFieldsByteSizeFallback() const {
  427. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:setting.System_setting)
  428. size_t total_size = 0;
  429. if (has_bind_ip()) {
  430. // required string bind_ip = 1;
  431. total_size += 1 +
  432. ::google::protobuf::internal::WireFormatLite::StringSize(
  433. this->bind_ip());
  434. }
  435. if (has_entrance_num()) {
  436. // required int32 entrance_num = 6;
  437. total_size += 1 +
  438. ::google::protobuf::internal::WireFormatLite::Int32Size(
  439. this->entrance_num());
  440. }
  441. if (has_export_num()) {
  442. // required int32 export_num = 7;
  443. total_size += 1 +
  444. ::google::protobuf::internal::WireFormatLite::Int32Size(
  445. this->export_num());
  446. }
  447. return total_size;
  448. }
  449. size_t System_setting::ByteSizeLong() const {
  450. // @@protoc_insertion_point(message_byte_size_start:setting.System_setting)
  451. size_t total_size = 0;
  452. if (_internal_metadata_.have_unknown_fields()) {
  453. total_size +=
  454. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  455. _internal_metadata_.unknown_fields());
  456. }
  457. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  458. // required string bind_ip = 1;
  459. total_size += 1 +
  460. ::google::protobuf::internal::WireFormatLite::StringSize(
  461. this->bind_ip());
  462. // required int32 entrance_num = 6;
  463. total_size += 1 +
  464. ::google::protobuf::internal::WireFormatLite::Int32Size(
  465. this->entrance_num());
  466. // required int32 export_num = 7;
  467. total_size += 1 +
  468. ::google::protobuf::internal::WireFormatLite::Int32Size(
  469. this->export_num());
  470. } else {
  471. total_size += RequiredFieldsByteSizeFallback();
  472. }
  473. if (_has_bits_[0 / 32] & 120u) {
  474. // optional int32 terminor_port = 2 [default = 30000];
  475. if (has_terminor_port()) {
  476. total_size += 1 +
  477. ::google::protobuf::internal::WireFormatLite::Int32Size(
  478. this->terminor_port());
  479. }
  480. // optional int32 park_space_port = 3 [default = 30001];
  481. if (has_park_space_port()) {
  482. total_size += 1 +
  483. ::google::protobuf::internal::WireFormatLite::Int32Size(
  484. this->park_space_port());
  485. }
  486. // optional int32 measurer_port = 4 [default = 30002];
  487. if (has_measurer_port()) {
  488. total_size += 1 +
  489. ::google::protobuf::internal::WireFormatLite::Int32Size(
  490. this->measurer_port());
  491. }
  492. // optional int32 dispatcher_port = 5 [default = 30003];
  493. if (has_dispatcher_port()) {
  494. total_size += 1 +
  495. ::google::protobuf::internal::WireFormatLite::Int32Size(
  496. this->dispatcher_port());
  497. }
  498. }
  499. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  500. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  501. _cached_size_ = cached_size;
  502. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  503. return total_size;
  504. }
  505. void System_setting::MergeFrom(const ::google::protobuf::Message& from) {
  506. // @@protoc_insertion_point(generalized_merge_from_start:setting.System_setting)
  507. GOOGLE_DCHECK_NE(&from, this);
  508. const System_setting* source =
  509. ::google::protobuf::internal::DynamicCastToGenerated<const System_setting>(
  510. &from);
  511. if (source == NULL) {
  512. // @@protoc_insertion_point(generalized_merge_from_cast_fail:setting.System_setting)
  513. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  514. } else {
  515. // @@protoc_insertion_point(generalized_merge_from_cast_success:setting.System_setting)
  516. MergeFrom(*source);
  517. }
  518. }
  519. void System_setting::MergeFrom(const System_setting& from) {
  520. // @@protoc_insertion_point(class_specific_merge_from_start:setting.System_setting)
  521. GOOGLE_DCHECK_NE(&from, this);
  522. _internal_metadata_.MergeFrom(from._internal_metadata_);
  523. ::google::protobuf::uint32 cached_has_bits = 0;
  524. (void) cached_has_bits;
  525. cached_has_bits = from._has_bits_[0];
  526. if (cached_has_bits & 127u) {
  527. if (cached_has_bits & 0x00000001u) {
  528. set_has_bind_ip();
  529. bind_ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bind_ip_);
  530. }
  531. if (cached_has_bits & 0x00000002u) {
  532. entrance_num_ = from.entrance_num_;
  533. }
  534. if (cached_has_bits & 0x00000004u) {
  535. export_num_ = from.export_num_;
  536. }
  537. if (cached_has_bits & 0x00000008u) {
  538. terminor_port_ = from.terminor_port_;
  539. }
  540. if (cached_has_bits & 0x00000010u) {
  541. park_space_port_ = from.park_space_port_;
  542. }
  543. if (cached_has_bits & 0x00000020u) {
  544. measurer_port_ = from.measurer_port_;
  545. }
  546. if (cached_has_bits & 0x00000040u) {
  547. dispatcher_port_ = from.dispatcher_port_;
  548. }
  549. _has_bits_[0] |= cached_has_bits;
  550. }
  551. }
  552. void System_setting::CopyFrom(const ::google::protobuf::Message& from) {
  553. // @@protoc_insertion_point(generalized_copy_from_start:setting.System_setting)
  554. if (&from == this) return;
  555. Clear();
  556. MergeFrom(from);
  557. }
  558. void System_setting::CopyFrom(const System_setting& from) {
  559. // @@protoc_insertion_point(class_specific_copy_from_start:setting.System_setting)
  560. if (&from == this) return;
  561. Clear();
  562. MergeFrom(from);
  563. }
  564. bool System_setting::IsInitialized() const {
  565. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  566. return true;
  567. }
  568. void System_setting::Swap(System_setting* other) {
  569. if (other == this) return;
  570. InternalSwap(other);
  571. }
  572. void System_setting::InternalSwap(System_setting* other) {
  573. using std::swap;
  574. bind_ip_.Swap(&other->bind_ip_);
  575. swap(entrance_num_, other->entrance_num_);
  576. swap(export_num_, other->export_num_);
  577. swap(terminor_port_, other->terminor_port_);
  578. swap(park_space_port_, other->park_space_port_);
  579. swap(measurer_port_, other->measurer_port_);
  580. swap(dispatcher_port_, other->dispatcher_port_);
  581. swap(_has_bits_[0], other->_has_bits_[0]);
  582. _internal_metadata_.Swap(&other->_internal_metadata_);
  583. swap(_cached_size_, other->_cached_size_);
  584. }
  585. ::google::protobuf::Metadata System_setting::GetMetadata() const {
  586. protobuf_system_5fsetting_2eproto::protobuf_AssignDescriptorsOnce();
  587. return ::protobuf_system_5fsetting_2eproto::file_level_metadata[kIndexInFileMessages];
  588. }
  589. // @@protoc_insertion_point(namespace_scope)
  590. } // namespace setting
  591. // @@protoc_insertion_point(global_scope)