12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: network.proto
- #include "network.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // This is a temporary google only hack
- #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- #include "third_party/protobuf/version.h"
- #endif
- // @@protoc_insertion_point(includes)
- namespace protobuf_network_2eproto {
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_network_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Network_information;
- extern PROTOBUF_INTERNAL_EXPORT_protobuf_network_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Network_parameter;
- } // namespace protobuf_network_2eproto
- namespace Network_proto {
- class Network_informationDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Network_information>
- _instance;
- } _Network_information_default_instance_;
- class Network_parameterDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Network_parameter>
- _instance;
- } _Network_parameter_default_instance_;
- class Network_parameter_allDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Network_parameter_all>
- _instance;
- } _Network_parameter_all_default_instance_;
- } // namespace Network_proto
- namespace protobuf_network_2eproto {
- static void InitDefaultsNetwork_information() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::Network_proto::_Network_information_default_instance_;
- new (ptr) ::Network_proto::Network_information();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::Network_proto::Network_information::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<0> scc_info_Network_information =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNetwork_information}, {}};
- static void InitDefaultsNetwork_parameter() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::Network_proto::_Network_parameter_default_instance_;
- new (ptr) ::Network_proto::Network_parameter();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::Network_proto::Network_parameter::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_Network_parameter =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNetwork_parameter}, {
- &protobuf_network_2eproto::scc_info_Network_information.base,}};
- static void InitDefaultsNetwork_parameter_all() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::Network_proto::_Network_parameter_all_default_instance_;
- new (ptr) ::Network_proto::Network_parameter_all();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::Network_proto::Network_parameter_all::InitAsDefaultInstance();
- }
- ::google::protobuf::internal::SCCInfo<1> scc_info_Network_parameter_all =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNetwork_parameter_all}, {
- &protobuf_network_2eproto::scc_info_Network_parameter.base,}};
- void InitDefaults() {
- ::google::protobuf::internal::InitSCC(&scc_info_Network_information.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Network_parameter.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Network_parameter_all.base);
- }
- ::google::protobuf::Metadata file_level_metadata[3];
- const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
- const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, network_mode_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, socket_id_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, ip_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_information, port_),
- 1,
- 2,
- 0,
- 3,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter, network_information_vector_),
- ~0u,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Network_proto::Network_parameter_all, network_parameters_),
- 0,
- };
- static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 9, sizeof(::Network_proto::Network_information)},
- { 13, 19, sizeof(::Network_proto::Network_parameter)},
- { 20, 26, sizeof(::Network_proto::Network_parameter_all)},
- };
- static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_information_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_parameter_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::Network_proto::_Network_parameter_all_default_instance_),
- };
- void protobuf_AssignDescriptors() {
- AddDescriptors();
- AssignDescriptors(
- "network.proto", schemas, file_default_instances, TableStruct::offsets,
- file_level_metadata, file_level_enum_descriptors, NULL);
- }
- void protobuf_AssignDescriptorsOnce() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
- }
- void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\rnetwork.proto\022\rNetwork_proto\"\216\001\n\023Netwo"
- "rk_information\022B\n\014network_mode\030\001 \001(\0162\033.N"
- "etwork_proto.Network_mode:\017NETWORK_UNKNO"
- "WN\022\024\n\tsocket_id\030\002 \001(\005:\0010\022\014\n\002ip\030\003 \001(\t:\000\022\017"
- "\n\004port\030\004 \001(\005:\0010\"[\n\021Network_parameter\022F\n\032"
- "network_information_vector\030\001 \003(\0132\".Netwo"
- "rk_proto.Network_information\"U\n\025Network_"
- "parameter_all\022<\n\022network_parameters\030\001 \001("
- "\0132 .Network_proto.Network_parameter*L\n\014N"
- "etwork_mode\022\023\n\017NETWORK_UNKNOWN\020\000\022\016\n\nTCP_"
- "CLIENT\020\001\022\016\n\nTCP_SERVER\020\002\022\007\n\003UDP\020\003"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 433);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "network.proto", &protobuf_RegisterTypes);
- }
- void AddDescriptors() {
- static ::google::protobuf::internal::once_flag once;
- ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
- }
- // Force AddDescriptors() to be called at dynamic initialization time.
- struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
- } static_descriptor_initializer;
- } // namespace protobuf_network_2eproto
- namespace Network_proto {
- const ::google::protobuf::EnumDescriptor* Network_mode_descriptor() {
- protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_network_2eproto::file_level_enum_descriptors[0];
- }
- bool Network_mode_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
- }
- // ===================================================================
- void Network_information::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Network_information::kNetworkModeFieldNumber;
- const int Network_information::kSocketIdFieldNumber;
- const int Network_information::kIpFieldNumber;
- const int Network_information::kPortFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Network_information::Network_information()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_network_2eproto::scc_info_Network_information.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:Network_proto.Network_information)
- }
- Network_information::Network_information(const Network_information& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.has_ip()) {
- ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
- }
- ::memcpy(&network_mode_, &from.network_mode_,
- static_cast<size_t>(reinterpret_cast<char*>(&port_) -
- reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
- // @@protoc_insertion_point(copy_constructor:Network_proto.Network_information)
- }
- void Network_information::SharedCtor() {
- ip_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&network_mode_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&port_) -
- reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
- }
- Network_information::~Network_information() {
- // @@protoc_insertion_point(destructor:Network_proto.Network_information)
- SharedDtor();
- }
- void Network_information::SharedDtor() {
- ip_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void Network_information::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Network_information::descriptor() {
- ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Network_information& Network_information::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_network_2eproto::scc_info_Network_information.base);
- return *internal_default_instance();
- }
- void Network_information::Clear() {
- // @@protoc_insertion_point(message_clear_start:Network_proto.Network_information)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- ip_.ClearNonDefaultToEmptyNoArena();
- }
- if (cached_has_bits & 14u) {
- ::memset(&network_mode_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&port_) -
- reinterpret_cast<char*>(&network_mode_)) + sizeof(port_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool Network_information::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:Network_proto.Network_information)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::Network_proto::Network_mode_IsValid(value)) {
- set_network_mode(static_cast< ::Network_proto::Network_mode >(value));
- } else {
- mutable_unknown_fields()->AddVarint(
- 1, static_cast< ::google::protobuf::uint64>(value));
- }
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int32 socket_id = 2 [default = 0];
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
- set_has_socket_id();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &socket_id_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional string ip = 3 [default = ""];
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_ip()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->ip().data(), static_cast<int>(this->ip().length()),
- ::google::protobuf::internal::WireFormat::PARSE,
- "Network_proto.Network_information.ip");
- } else {
- goto handle_unusual;
- }
- break;
- }
- // optional int32 port = 4 [default = 0];
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- set_has_port();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &port_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:Network_proto.Network_information)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:Network_proto.Network_information)
- return false;
- #undef DO_
- }
- void Network_information::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:Network_proto.Network_information)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
- if (cached_has_bits & 0x00000002u) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 1, this->network_mode(), output);
- }
- // optional int32 socket_id = 2 [default = 0];
- if (cached_has_bits & 0x00000004u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->socket_id(), output);
- }
- // optional string ip = 3 [default = ""];
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->ip().data(), static_cast<int>(this->ip().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "Network_proto.Network_information.ip");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->ip(), output);
- }
- // optional int32 port = 4 [default = 0];
- if (cached_has_bits & 0x00000008u) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->port(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:Network_proto.Network_information)
- }
- ::google::protobuf::uint8* Network_information::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_information)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
- if (cached_has_bits & 0x00000002u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 1, this->network_mode(), target);
- }
- // optional int32 socket_id = 2 [default = 0];
- if (cached_has_bits & 0x00000004u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->socket_id(), target);
- }
- // optional string ip = 3 [default = ""];
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->ip().data(), static_cast<int>(this->ip().length()),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "Network_proto.Network_information.ip");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->ip(), target);
- }
- // optional int32 port = 4 [default = 0];
- if (cached_has_bits & 0x00000008u) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->port(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_information)
- return target;
- }
- size_t Network_information::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_information)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- if (_has_bits_[0 / 32] & 15u) {
- // optional string ip = 3 [default = ""];
- if (has_ip()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->ip());
- }
- // optional .Network_proto.Network_mode network_mode = 1 [default = NETWORK_UNKNOWN];
- if (has_network_mode()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->network_mode());
- }
- // optional int32 socket_id = 2 [default = 0];
- if (has_socket_id()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->socket_id());
- }
- // optional int32 port = 4 [default = 0];
- if (has_port()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->port());
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Network_information::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_information)
- GOOGLE_DCHECK_NE(&from, this);
- const Network_information* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Network_information>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_information)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_information)
- MergeFrom(*source);
- }
- }
- void Network_information::MergeFrom(const Network_information& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_information)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 15u) {
- if (cached_has_bits & 0x00000001u) {
- set_has_ip();
- ip_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ip_);
- }
- if (cached_has_bits & 0x00000002u) {
- network_mode_ = from.network_mode_;
- }
- if (cached_has_bits & 0x00000004u) {
- socket_id_ = from.socket_id_;
- }
- if (cached_has_bits & 0x00000008u) {
- port_ = from.port_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- }
- void Network_information::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_information)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Network_information::CopyFrom(const Network_information& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_information)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Network_information::IsInitialized() const {
- return true;
- }
- void Network_information::Swap(Network_information* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Network_information::InternalSwap(Network_information* other) {
- using std::swap;
- ip_.Swap(&other->ip_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(network_mode_, other->network_mode_);
- swap(socket_id_, other->socket_id_);
- swap(port_, other->port_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Network_information::GetMetadata() const {
- protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void Network_parameter::InitAsDefaultInstance() {
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Network_parameter::kNetworkInformationVectorFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Network_parameter::Network_parameter()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_network_2eproto::scc_info_Network_parameter.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:Network_proto.Network_parameter)
- }
- Network_parameter::Network_parameter(const Network_parameter& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_),
- network_information_vector_(from.network_information_vector_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:Network_proto.Network_parameter)
- }
- void Network_parameter::SharedCtor() {
- }
- Network_parameter::~Network_parameter() {
- // @@protoc_insertion_point(destructor:Network_proto.Network_parameter)
- SharedDtor();
- }
- void Network_parameter::SharedDtor() {
- }
- void Network_parameter::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Network_parameter::descriptor() {
- ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Network_parameter& Network_parameter::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_network_2eproto::scc_info_Network_parameter.base);
- return *internal_default_instance();
- }
- void Network_parameter::Clear() {
- // @@protoc_insertion_point(message_clear_start:Network_proto.Network_parameter)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- network_information_vector_.Clear();
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool Network_parameter::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:Network_proto.Network_parameter)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated .Network_proto.Network_information network_information_vector = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, add_network_information_vector()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:Network_proto.Network_parameter)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:Network_proto.Network_parameter)
- return false;
- #undef DO_
- }
- void Network_parameter::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:Network_proto.Network_parameter)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .Network_proto.Network_information network_information_vector = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->network_information_vector_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1,
- this->network_information_vector(static_cast<int>(i)),
- output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:Network_proto.Network_parameter)
- }
- ::google::protobuf::uint8* Network_parameter::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_parameter)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .Network_proto.Network_information network_information_vector = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->network_information_vector_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->network_information_vector(static_cast<int>(i)), deterministic, target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_parameter)
- return target;
- }
- size_t Network_parameter::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_parameter)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // repeated .Network_proto.Network_information network_information_vector = 1;
- {
- unsigned int count = static_cast<unsigned int>(this->network_information_vector_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->network_information_vector(static_cast<int>(i)));
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Network_parameter::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_parameter)
- GOOGLE_DCHECK_NE(&from, this);
- const Network_parameter* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Network_parameter>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_parameter)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_parameter)
- MergeFrom(*source);
- }
- }
- void Network_parameter::MergeFrom(const Network_parameter& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_parameter)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- network_information_vector_.MergeFrom(from.network_information_vector_);
- }
- void Network_parameter::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_parameter)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Network_parameter::CopyFrom(const Network_parameter& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_parameter)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Network_parameter::IsInitialized() const {
- return true;
- }
- void Network_parameter::Swap(Network_parameter* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Network_parameter::InternalSwap(Network_parameter* other) {
- using std::swap;
- CastToBase(&network_information_vector_)->InternalSwap(CastToBase(&other->network_information_vector_));
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Network_parameter::GetMetadata() const {
- protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // ===================================================================
- void Network_parameter_all::InitAsDefaultInstance() {
- ::Network_proto::_Network_parameter_all_default_instance_._instance.get_mutable()->network_parameters_ = const_cast< ::Network_proto::Network_parameter*>(
- ::Network_proto::Network_parameter::internal_default_instance());
- }
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int Network_parameter_all::kNetworkParametersFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- Network_parameter_all::Network_parameter_all()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- ::google::protobuf::internal::InitSCC(
- &protobuf_network_2eproto::scc_info_Network_parameter_all.base);
- SharedCtor();
- // @@protoc_insertion_point(constructor:Network_proto.Network_parameter_all)
- }
- Network_parameter_all::Network_parameter_all(const Network_parameter_all& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_network_parameters()) {
- network_parameters_ = new ::Network_proto::Network_parameter(*from.network_parameters_);
- } else {
- network_parameters_ = NULL;
- }
- // @@protoc_insertion_point(copy_constructor:Network_proto.Network_parameter_all)
- }
- void Network_parameter_all::SharedCtor() {
- network_parameters_ = NULL;
- }
- Network_parameter_all::~Network_parameter_all() {
- // @@protoc_insertion_point(destructor:Network_proto.Network_parameter_all)
- SharedDtor();
- }
- void Network_parameter_all::SharedDtor() {
- if (this != internal_default_instance()) delete network_parameters_;
- }
- void Network_parameter_all::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const ::google::protobuf::Descriptor* Network_parameter_all::descriptor() {
- ::protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
- }
- const Network_parameter_all& Network_parameter_all::default_instance() {
- ::google::protobuf::internal::InitSCC(&protobuf_network_2eproto::scc_info_Network_parameter_all.base);
- return *internal_default_instance();
- }
- void Network_parameter_all::Clear() {
- // @@protoc_insertion_point(message_clear_start:Network_proto.Network_parameter_all)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(network_parameters_ != NULL);
- network_parameters_->Clear();
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear();
- }
- bool Network_parameter_all::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:Network_proto.Network_parameter_all)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // optional .Network_proto.Network_parameter network_parameters = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_network_parameters()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:Network_proto.Network_parameter_all)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:Network_proto.Network_parameter_all)
- return false;
- #undef DO_
- }
- void Network_parameter_all::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:Network_proto.Network_parameter_all)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .Network_proto.Network_parameter network_parameters = 1;
- if (cached_has_bits & 0x00000001u) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->_internal_network_parameters(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:Network_proto.Network_parameter_all)
- }
- ::google::protobuf::uint8* Network_parameter_all::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:Network_proto.Network_parameter_all)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .Network_proto.Network_parameter network_parameters = 1;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->_internal_network_parameters(), deterministic, target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:Network_proto.Network_parameter_all)
- return target;
- }
- size_t Network_parameter_all::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:Network_proto.Network_parameter_all)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- // optional .Network_proto.Network_parameter network_parameters = 1;
- if (has_network_parameters()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *network_parameters_);
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void Network_parameter_all::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:Network_proto.Network_parameter_all)
- GOOGLE_DCHECK_NE(&from, this);
- const Network_parameter_all* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Network_parameter_all>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:Network_proto.Network_parameter_all)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:Network_proto.Network_parameter_all)
- MergeFrom(*source);
- }
- }
- void Network_parameter_all::MergeFrom(const Network_parameter_all& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:Network_proto.Network_parameter_all)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_network_parameters()) {
- mutable_network_parameters()->::Network_proto::Network_parameter::MergeFrom(from.network_parameters());
- }
- }
- void Network_parameter_all::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:Network_proto.Network_parameter_all)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void Network_parameter_all::CopyFrom(const Network_parameter_all& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:Network_proto.Network_parameter_all)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool Network_parameter_all::IsInitialized() const {
- return true;
- }
- void Network_parameter_all::Swap(Network_parameter_all* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void Network_parameter_all::InternalSwap(Network_parameter_all* other) {
- using std::swap;
- swap(network_parameters_, other->network_parameters_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- }
- ::google::protobuf::Metadata Network_parameter_all::GetMetadata() const {
- protobuf_network_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_network_2eproto::file_level_metadata[kIndexInFileMessages];
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace Network_proto
- namespace google {
- namespace protobuf {
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Network_proto::Network_information* Arena::CreateMaybeMessage< ::Network_proto::Network_information >(Arena* arena) {
- return Arena::CreateInternal< ::Network_proto::Network_information >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Network_proto::Network_parameter* Arena::CreateMaybeMessage< ::Network_proto::Network_parameter >(Arena* arena) {
- return Arena::CreateInternal< ::Network_proto::Network_parameter >(arena);
- }
- template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Network_proto::Network_parameter_all* Arena::CreateMaybeMessage< ::Network_proto::Network_parameter_all >(Arena* arena) {
- return Arena::CreateInternal< ::Network_proto::Network_parameter_all >(arena);
- }
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
|