setting.pb.cc 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: setting.proto
  3. #include "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 locate_settingDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<locate_setting>
  23. _instance;
  24. } _locate_setting_default_instance_;
  25. class global_settingDefaultTypeInternal {
  26. public:
  27. ::google::protobuf::internal::ExplicitlyConstructed<global_setting>
  28. _instance;
  29. } _global_setting_default_instance_;
  30. } // namespace setting
  31. namespace protobuf_setting_2eproto {
  32. void InitDefaultslocate_settingImpl() {
  33. GOOGLE_PROTOBUF_VERIFY_VERSION;
  34. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  35. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  36. #else
  37. ::google::protobuf::internal::InitProtobufDefaults();
  38. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  39. {
  40. void* ptr = &::setting::_locate_setting_default_instance_;
  41. new (ptr) ::setting::locate_setting();
  42. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  43. }
  44. ::setting::locate_setting::InitAsDefaultInstance();
  45. }
  46. void InitDefaultslocate_setting() {
  47. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  48. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultslocate_settingImpl);
  49. }
  50. void InitDefaultsglobal_settingImpl() {
  51. GOOGLE_PROTOBUF_VERIFY_VERSION;
  52. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  53. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  54. #else
  55. ::google::protobuf::internal::InitProtobufDefaults();
  56. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  57. protobuf_setting_2eproto::InitDefaultslocate_setting();
  58. {
  59. void* ptr = &::setting::_global_setting_default_instance_;
  60. new (ptr) ::setting::global_setting();
  61. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  62. }
  63. ::setting::global_setting::InitAsDefaultInstance();
  64. }
  65. void InitDefaultsglobal_setting() {
  66. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  67. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsglobal_settingImpl);
  68. }
  69. ::google::protobuf::Metadata file_level_metadata[2];
  70. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  71. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::locate_setting, _has_bits_),
  72. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::locate_setting, _internal_metadata_),
  73. ~0u, // no _extensions_
  74. ~0u, // no _oneof_case_
  75. ~0u, // no _weak_field_map_
  76. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::locate_setting, ip_),
  77. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::locate_setting, port_),
  78. 0,
  79. 1,
  80. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::global_setting, _has_bits_),
  81. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::global_setting, _internal_metadata_),
  82. ~0u, // no _extensions_
  83. ~0u, // no _oneof_case_
  84. ~0u, // no _weak_field_map_
  85. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::setting::global_setting, locate_parameter_),
  86. 0,
  87. };
  88. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  89. { 0, 7, sizeof(::setting::locate_setting)},
  90. { 9, 15, sizeof(::setting::global_setting)},
  91. };
  92. static ::google::protobuf::Message const * const file_default_instances[] = {
  93. reinterpret_cast<const ::google::protobuf::Message*>(&::setting::_locate_setting_default_instance_),
  94. reinterpret_cast<const ::google::protobuf::Message*>(&::setting::_global_setting_default_instance_),
  95. };
  96. void protobuf_AssignDescriptors() {
  97. AddDescriptors();
  98. ::google::protobuf::MessageFactory* factory = NULL;
  99. AssignDescriptors(
  100. "setting.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  101. file_level_metadata, NULL, NULL);
  102. }
  103. void protobuf_AssignDescriptorsOnce() {
  104. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  105. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  106. }
  107. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  108. void protobuf_RegisterTypes(const ::std::string&) {
  109. protobuf_AssignDescriptorsOnce();
  110. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
  111. }
  112. void AddDescriptorsImpl() {
  113. InitDefaults();
  114. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  115. "\n\rsetting.proto\022\007setting\"*\n\016locate_setti"
  116. "ng\022\n\n\002ip\030\001 \002(\t\022\014\n\004port\030\002 \002(\005\"C\n\016global_s"
  117. "etting\0221\n\020locate_parameter\030\001 \002(\0132\027.setti"
  118. "ng.locate_setting"
  119. };
  120. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  121. descriptor, 137);
  122. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  123. "setting.proto", &protobuf_RegisterTypes);
  124. }
  125. void AddDescriptors() {
  126. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  127. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  128. }
  129. // Force AddDescriptors() to be called at dynamic initialization time.
  130. struct StaticDescriptorInitializer {
  131. StaticDescriptorInitializer() {
  132. AddDescriptors();
  133. }
  134. } static_descriptor_initializer;
  135. } // namespace protobuf_setting_2eproto
  136. namespace setting {
  137. // ===================================================================
  138. void locate_setting::InitAsDefaultInstance() {
  139. }
  140. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  141. const int locate_setting::kIpFieldNumber;
  142. const int locate_setting::kPortFieldNumber;
  143. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  144. locate_setting::locate_setting()
  145. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  146. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  147. ::protobuf_setting_2eproto::InitDefaultslocate_setting();
  148. }
  149. SharedCtor();
  150. // @@protoc_insertion_point(constructor:setting.locate_setting)
  151. }
  152. locate_setting::locate_setting(const locate_setting& from)
  153. : ::google::protobuf::Message(),
  154. _internal_metadata_(NULL),
  155. _has_bits_(from._has_bits_),
  156. _cached_size_(0) {
  157. _internal_metadata_.MergeFrom(from._internal_metadata_);
  158. ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  159. if (from.has_ip()) {
  160. ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
  161. }
  162. port_ = from.port_;
  163. // @@protoc_insertion_point(copy_constructor:setting.locate_setting)
  164. }
  165. void locate_setting::SharedCtor() {
  166. _cached_size_ = 0;
  167. ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  168. port_ = 0;
  169. }
  170. locate_setting::~locate_setting() {
  171. // @@protoc_insertion_point(destructor:setting.locate_setting)
  172. SharedDtor();
  173. }
  174. void locate_setting::SharedDtor() {
  175. ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  176. }
  177. void locate_setting::SetCachedSize(int size) const {
  178. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  179. _cached_size_ = size;
  180. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  181. }
  182. const ::google::protobuf::Descriptor* locate_setting::descriptor() {
  183. ::protobuf_setting_2eproto::protobuf_AssignDescriptorsOnce();
  184. return ::protobuf_setting_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  185. }
  186. const locate_setting& locate_setting::default_instance() {
  187. ::protobuf_setting_2eproto::InitDefaultslocate_setting();
  188. return *internal_default_instance();
  189. }
  190. locate_setting* locate_setting::New(::google::protobuf::Arena* arena) const {
  191. locate_setting* n = new locate_setting;
  192. if (arena != NULL) {
  193. arena->Own(n);
  194. }
  195. return n;
  196. }
  197. void locate_setting::Clear() {
  198. // @@protoc_insertion_point(message_clear_start:setting.locate_setting)
  199. ::google::protobuf::uint32 cached_has_bits = 0;
  200. // Prevent compiler warnings about cached_has_bits being unused
  201. (void) cached_has_bits;
  202. cached_has_bits = _has_bits_[0];
  203. if (cached_has_bits & 0x00000001u) {
  204. GOOGLE_DCHECK(!ip_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
  205. (*ip_.UnsafeRawStringPointer())->clear();
  206. }
  207. port_ = 0;
  208. _has_bits_.Clear();
  209. _internal_metadata_.Clear();
  210. }
  211. bool locate_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.locate_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 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_ip()));
  227. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  228. this->ip().data(), static_cast<int>(this->ip().length()),
  229. ::google::protobuf::internal::WireFormat::PARSE,
  230. "setting.locate_setting.ip");
  231. } else {
  232. goto handle_unusual;
  233. }
  234. break;
  235. }
  236. // required int32 port = 2;
  237. case 2: {
  238. if (static_cast< ::google::protobuf::uint8>(tag) ==
  239. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  240. set_has_port();
  241. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  242. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  243. input, &port_)));
  244. } else {
  245. goto handle_unusual;
  246. }
  247. break;
  248. }
  249. default: {
  250. handle_unusual:
  251. if (tag == 0) {
  252. goto success;
  253. }
  254. DO_(::google::protobuf::internal::WireFormat::SkipField(
  255. input, tag, _internal_metadata_.mutable_unknown_fields()));
  256. break;
  257. }
  258. }
  259. }
  260. success:
  261. // @@protoc_insertion_point(parse_success:setting.locate_setting)
  262. return true;
  263. failure:
  264. // @@protoc_insertion_point(parse_failure:setting.locate_setting)
  265. return false;
  266. #undef DO_
  267. }
  268. void locate_setting::SerializeWithCachedSizes(
  269. ::google::protobuf::io::CodedOutputStream* output) const {
  270. // @@protoc_insertion_point(serialize_start:setting.locate_setting)
  271. ::google::protobuf::uint32 cached_has_bits = 0;
  272. (void) cached_has_bits;
  273. cached_has_bits = _has_bits_[0];
  274. // required string ip = 1;
  275. if (cached_has_bits & 0x00000001u) {
  276. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  277. this->ip().data(), static_cast<int>(this->ip().length()),
  278. ::google::protobuf::internal::WireFormat::SERIALIZE,
  279. "setting.locate_setting.ip");
  280. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  281. 1, this->ip(), output);
  282. }
  283. // required int32 port = 2;
  284. if (cached_has_bits & 0x00000002u) {
  285. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->port(), output);
  286. }
  287. if (_internal_metadata_.have_unknown_fields()) {
  288. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  289. _internal_metadata_.unknown_fields(), output);
  290. }
  291. // @@protoc_insertion_point(serialize_end:setting.locate_setting)
  292. }
  293. ::google::protobuf::uint8* locate_setting::InternalSerializeWithCachedSizesToArray(
  294. bool deterministic, ::google::protobuf::uint8* target) const {
  295. (void)deterministic; // Unused
  296. // @@protoc_insertion_point(serialize_to_array_start:setting.locate_setting)
  297. ::google::protobuf::uint32 cached_has_bits = 0;
  298. (void) cached_has_bits;
  299. cached_has_bits = _has_bits_[0];
  300. // required string ip = 1;
  301. if (cached_has_bits & 0x00000001u) {
  302. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  303. this->ip().data(), static_cast<int>(this->ip().length()),
  304. ::google::protobuf::internal::WireFormat::SERIALIZE,
  305. "setting.locate_setting.ip");
  306. target =
  307. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  308. 1, this->ip(), target);
  309. }
  310. // required int32 port = 2;
  311. if (cached_has_bits & 0x00000002u) {
  312. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->port(), target);
  313. }
  314. if (_internal_metadata_.have_unknown_fields()) {
  315. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  316. _internal_metadata_.unknown_fields(), target);
  317. }
  318. // @@protoc_insertion_point(serialize_to_array_end:setting.locate_setting)
  319. return target;
  320. }
  321. size_t locate_setting::RequiredFieldsByteSizeFallback() const {
  322. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:setting.locate_setting)
  323. size_t total_size = 0;
  324. if (has_ip()) {
  325. // required string ip = 1;
  326. total_size += 1 +
  327. ::google::protobuf::internal::WireFormatLite::StringSize(
  328. this->ip());
  329. }
  330. if (has_port()) {
  331. // required int32 port = 2;
  332. total_size += 1 +
  333. ::google::protobuf::internal::WireFormatLite::Int32Size(
  334. this->port());
  335. }
  336. return total_size;
  337. }
  338. size_t locate_setting::ByteSizeLong() const {
  339. // @@protoc_insertion_point(message_byte_size_start:setting.locate_setting)
  340. size_t total_size = 0;
  341. if (_internal_metadata_.have_unknown_fields()) {
  342. total_size +=
  343. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  344. _internal_metadata_.unknown_fields());
  345. }
  346. if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
  347. // required string ip = 1;
  348. total_size += 1 +
  349. ::google::protobuf::internal::WireFormatLite::StringSize(
  350. this->ip());
  351. // required int32 port = 2;
  352. total_size += 1 +
  353. ::google::protobuf::internal::WireFormatLite::Int32Size(
  354. this->port());
  355. } else {
  356. total_size += RequiredFieldsByteSizeFallback();
  357. }
  358. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  359. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  360. _cached_size_ = cached_size;
  361. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  362. return total_size;
  363. }
  364. void locate_setting::MergeFrom(const ::google::protobuf::Message& from) {
  365. // @@protoc_insertion_point(generalized_merge_from_start:setting.locate_setting)
  366. GOOGLE_DCHECK_NE(&from, this);
  367. const locate_setting* source =
  368. ::google::protobuf::internal::DynamicCastToGenerated<const locate_setting>(
  369. &from);
  370. if (source == NULL) {
  371. // @@protoc_insertion_point(generalized_merge_from_cast_fail:setting.locate_setting)
  372. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  373. } else {
  374. // @@protoc_insertion_point(generalized_merge_from_cast_success:setting.locate_setting)
  375. MergeFrom(*source);
  376. }
  377. }
  378. void locate_setting::MergeFrom(const locate_setting& from) {
  379. // @@protoc_insertion_point(class_specific_merge_from_start:setting.locate_setting)
  380. GOOGLE_DCHECK_NE(&from, this);
  381. _internal_metadata_.MergeFrom(from._internal_metadata_);
  382. ::google::protobuf::uint32 cached_has_bits = 0;
  383. (void) cached_has_bits;
  384. cached_has_bits = from._has_bits_[0];
  385. if (cached_has_bits & 3u) {
  386. if (cached_has_bits & 0x00000001u) {
  387. set_has_ip();
  388. ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
  389. }
  390. if (cached_has_bits & 0x00000002u) {
  391. port_ = from.port_;
  392. }
  393. _has_bits_[0] |= cached_has_bits;
  394. }
  395. }
  396. void locate_setting::CopyFrom(const ::google::protobuf::Message& from) {
  397. // @@protoc_insertion_point(generalized_copy_from_start:setting.locate_setting)
  398. if (&from == this) return;
  399. Clear();
  400. MergeFrom(from);
  401. }
  402. void locate_setting::CopyFrom(const locate_setting& from) {
  403. // @@protoc_insertion_point(class_specific_copy_from_start:setting.locate_setting)
  404. if (&from == this) return;
  405. Clear();
  406. MergeFrom(from);
  407. }
  408. bool locate_setting::IsInitialized() const {
  409. if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  410. return true;
  411. }
  412. void locate_setting::Swap(locate_setting* other) {
  413. if (other == this) return;
  414. InternalSwap(other);
  415. }
  416. void locate_setting::InternalSwap(locate_setting* other) {
  417. using std::swap;
  418. ip_.Swap(&other->ip_);
  419. swap(port_, other->port_);
  420. swap(_has_bits_[0], other->_has_bits_[0]);
  421. _internal_metadata_.Swap(&other->_internal_metadata_);
  422. swap(_cached_size_, other->_cached_size_);
  423. }
  424. ::google::protobuf::Metadata locate_setting::GetMetadata() const {
  425. protobuf_setting_2eproto::protobuf_AssignDescriptorsOnce();
  426. return ::protobuf_setting_2eproto::file_level_metadata[kIndexInFileMessages];
  427. }
  428. // ===================================================================
  429. void global_setting::InitAsDefaultInstance() {
  430. ::setting::_global_setting_default_instance_._instance.get_mutable()->locate_parameter_ = const_cast< ::setting::locate_setting*>(
  431. ::setting::locate_setting::internal_default_instance());
  432. }
  433. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  434. const int global_setting::kLocateParameterFieldNumber;
  435. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  436. global_setting::global_setting()
  437. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  438. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  439. ::protobuf_setting_2eproto::InitDefaultsglobal_setting();
  440. }
  441. SharedCtor();
  442. // @@protoc_insertion_point(constructor:setting.global_setting)
  443. }
  444. global_setting::global_setting(const global_setting& from)
  445. : ::google::protobuf::Message(),
  446. _internal_metadata_(NULL),
  447. _has_bits_(from._has_bits_),
  448. _cached_size_(0) {
  449. _internal_metadata_.MergeFrom(from._internal_metadata_);
  450. if (from.has_locate_parameter()) {
  451. locate_parameter_ = new ::setting::locate_setting(*from.locate_parameter_);
  452. } else {
  453. locate_parameter_ = NULL;
  454. }
  455. // @@protoc_insertion_point(copy_constructor:setting.global_setting)
  456. }
  457. void global_setting::SharedCtor() {
  458. _cached_size_ = 0;
  459. locate_parameter_ = NULL;
  460. }
  461. global_setting::~global_setting() {
  462. // @@protoc_insertion_point(destructor:setting.global_setting)
  463. SharedDtor();
  464. }
  465. void global_setting::SharedDtor() {
  466. if (this != internal_default_instance()) delete locate_parameter_;
  467. }
  468. void global_setting::SetCachedSize(int size) const {
  469. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  470. _cached_size_ = size;
  471. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  472. }
  473. const ::google::protobuf::Descriptor* global_setting::descriptor() {
  474. ::protobuf_setting_2eproto::protobuf_AssignDescriptorsOnce();
  475. return ::protobuf_setting_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  476. }
  477. const global_setting& global_setting::default_instance() {
  478. ::protobuf_setting_2eproto::InitDefaultsglobal_setting();
  479. return *internal_default_instance();
  480. }
  481. global_setting* global_setting::New(::google::protobuf::Arena* arena) const {
  482. global_setting* n = new global_setting;
  483. if (arena != NULL) {
  484. arena->Own(n);
  485. }
  486. return n;
  487. }
  488. void global_setting::Clear() {
  489. // @@protoc_insertion_point(message_clear_start:setting.global_setting)
  490. ::google::protobuf::uint32 cached_has_bits = 0;
  491. // Prevent compiler warnings about cached_has_bits being unused
  492. (void) cached_has_bits;
  493. cached_has_bits = _has_bits_[0];
  494. if (cached_has_bits & 0x00000001u) {
  495. GOOGLE_DCHECK(locate_parameter_ != NULL);
  496. locate_parameter_->Clear();
  497. }
  498. _has_bits_.Clear();
  499. _internal_metadata_.Clear();
  500. }
  501. bool global_setting::MergePartialFromCodedStream(
  502. ::google::protobuf::io::CodedInputStream* input) {
  503. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  504. ::google::protobuf::uint32 tag;
  505. // @@protoc_insertion_point(parse_start:setting.global_setting)
  506. for (;;) {
  507. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  508. tag = p.first;
  509. if (!p.second) goto handle_unusual;
  510. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  511. // required .setting.locate_setting locate_parameter = 1;
  512. case 1: {
  513. if (static_cast< ::google::protobuf::uint8>(tag) ==
  514. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  515. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  516. input, mutable_locate_parameter()));
  517. } else {
  518. goto handle_unusual;
  519. }
  520. break;
  521. }
  522. default: {
  523. handle_unusual:
  524. if (tag == 0) {
  525. goto success;
  526. }
  527. DO_(::google::protobuf::internal::WireFormat::SkipField(
  528. input, tag, _internal_metadata_.mutable_unknown_fields()));
  529. break;
  530. }
  531. }
  532. }
  533. success:
  534. // @@protoc_insertion_point(parse_success:setting.global_setting)
  535. return true;
  536. failure:
  537. // @@protoc_insertion_point(parse_failure:setting.global_setting)
  538. return false;
  539. #undef DO_
  540. }
  541. void global_setting::SerializeWithCachedSizes(
  542. ::google::protobuf::io::CodedOutputStream* output) const {
  543. // @@protoc_insertion_point(serialize_start:setting.global_setting)
  544. ::google::protobuf::uint32 cached_has_bits = 0;
  545. (void) cached_has_bits;
  546. cached_has_bits = _has_bits_[0];
  547. // required .setting.locate_setting locate_parameter = 1;
  548. if (cached_has_bits & 0x00000001u) {
  549. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  550. 1, *this->locate_parameter_, output);
  551. }
  552. if (_internal_metadata_.have_unknown_fields()) {
  553. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  554. _internal_metadata_.unknown_fields(), output);
  555. }
  556. // @@protoc_insertion_point(serialize_end:setting.global_setting)
  557. }
  558. ::google::protobuf::uint8* global_setting::InternalSerializeWithCachedSizesToArray(
  559. bool deterministic, ::google::protobuf::uint8* target) const {
  560. (void)deterministic; // Unused
  561. // @@protoc_insertion_point(serialize_to_array_start:setting.global_setting)
  562. ::google::protobuf::uint32 cached_has_bits = 0;
  563. (void) cached_has_bits;
  564. cached_has_bits = _has_bits_[0];
  565. // required .setting.locate_setting locate_parameter = 1;
  566. if (cached_has_bits & 0x00000001u) {
  567. target = ::google::protobuf::internal::WireFormatLite::
  568. InternalWriteMessageToArray(
  569. 1, *this->locate_parameter_, deterministic, target);
  570. }
  571. if (_internal_metadata_.have_unknown_fields()) {
  572. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  573. _internal_metadata_.unknown_fields(), target);
  574. }
  575. // @@protoc_insertion_point(serialize_to_array_end:setting.global_setting)
  576. return target;
  577. }
  578. size_t global_setting::ByteSizeLong() const {
  579. // @@protoc_insertion_point(message_byte_size_start:setting.global_setting)
  580. size_t total_size = 0;
  581. if (_internal_metadata_.have_unknown_fields()) {
  582. total_size +=
  583. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  584. _internal_metadata_.unknown_fields());
  585. }
  586. // required .setting.locate_setting locate_parameter = 1;
  587. if (has_locate_parameter()) {
  588. total_size += 1 +
  589. ::google::protobuf::internal::WireFormatLite::MessageSize(
  590. *this->locate_parameter_);
  591. }
  592. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  593. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  594. _cached_size_ = cached_size;
  595. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  596. return total_size;
  597. }
  598. void global_setting::MergeFrom(const ::google::protobuf::Message& from) {
  599. // @@protoc_insertion_point(generalized_merge_from_start:setting.global_setting)
  600. GOOGLE_DCHECK_NE(&from, this);
  601. const global_setting* source =
  602. ::google::protobuf::internal::DynamicCastToGenerated<const global_setting>(
  603. &from);
  604. if (source == NULL) {
  605. // @@protoc_insertion_point(generalized_merge_from_cast_fail:setting.global_setting)
  606. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  607. } else {
  608. // @@protoc_insertion_point(generalized_merge_from_cast_success:setting.global_setting)
  609. MergeFrom(*source);
  610. }
  611. }
  612. void global_setting::MergeFrom(const global_setting& from) {
  613. // @@protoc_insertion_point(class_specific_merge_from_start:setting.global_setting)
  614. GOOGLE_DCHECK_NE(&from, this);
  615. _internal_metadata_.MergeFrom(from._internal_metadata_);
  616. ::google::protobuf::uint32 cached_has_bits = 0;
  617. (void) cached_has_bits;
  618. if (from.has_locate_parameter()) {
  619. mutable_locate_parameter()->::setting::locate_setting::MergeFrom(from.locate_parameter());
  620. }
  621. }
  622. void global_setting::CopyFrom(const ::google::protobuf::Message& from) {
  623. // @@protoc_insertion_point(generalized_copy_from_start:setting.global_setting)
  624. if (&from == this) return;
  625. Clear();
  626. MergeFrom(from);
  627. }
  628. void global_setting::CopyFrom(const global_setting& from) {
  629. // @@protoc_insertion_point(class_specific_copy_from_start:setting.global_setting)
  630. if (&from == this) return;
  631. Clear();
  632. MergeFrom(from);
  633. }
  634. bool global_setting::IsInitialized() const {
  635. if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
  636. if (has_locate_parameter()) {
  637. if (!this->locate_parameter_->IsInitialized()) return false;
  638. }
  639. return true;
  640. }
  641. void global_setting::Swap(global_setting* other) {
  642. if (other == this) return;
  643. InternalSwap(other);
  644. }
  645. void global_setting::InternalSwap(global_setting* other) {
  646. using std::swap;
  647. swap(locate_parameter_, other->locate_parameter_);
  648. swap(_has_bits_[0], other->_has_bits_[0]);
  649. _internal_metadata_.Swap(&other->_internal_metadata_);
  650. swap(_cached_size_, other->_cached_size_);
  651. }
  652. ::google::protobuf::Metadata global_setting::GetMetadata() const {
  653. protobuf_setting_2eproto::protobuf_AssignDescriptorsOnce();
  654. return ::protobuf_setting_2eproto::file_level_metadata[kIndexInFileMessages];
  655. }
  656. // @@protoc_insertion_point(namespace_scope)
  657. } // namespace setting
  658. // @@protoc_insertion_point(global_scope)