snap7_communication.pb.cc 29 KB

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