snap7_communication.pb.cc 29 KB

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