snap7_communication.pb.cc 28 KB

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