1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: network_id_proto.proto
3
4 #include "network_id_proto.pb.h"
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14
15 PROTOBUF_PRAGMA_INIT_SEG
16
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19
20 namespace net {
21 namespace nqe {
22 namespace internal {
NetworkIDProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR NetworkIDProto::NetworkIDProto(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.connection_type_)*/0
29 , /*decltype(_impl_.signal_strength_)*/0} {}
30 struct NetworkIDProtoDefaultTypeInternal {
NetworkIDProtoDefaultTypeInternalnet::nqe::internal::NetworkIDProtoDefaultTypeInternal31 PROTOBUF_CONSTEXPR NetworkIDProtoDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~NetworkIDProtoDefaultTypeInternalnet::nqe::internal::NetworkIDProtoDefaultTypeInternal33 ~NetworkIDProtoDefaultTypeInternal() {}
34 union {
35 NetworkIDProto _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetworkIDProtoDefaultTypeInternal _NetworkIDProto_default_instance_;
39 } // namespace internal
40 } // namespace nqe
41 } // namespace net
42 namespace net {
43 namespace nqe {
44 namespace internal {
45
46 // ===================================================================
47
48 class NetworkIDProto::_Internal {
49 public:
50 using HasBits = decltype(std::declval<NetworkIDProto>()._impl_._has_bits_);
set_has_connection_type(HasBits * has_bits)51 static void set_has_connection_type(HasBits* has_bits) {
52 (*has_bits)[0] |= 2u;
53 }
set_has_id(HasBits * has_bits)54 static void set_has_id(HasBits* has_bits) {
55 (*has_bits)[0] |= 1u;
56 }
set_has_signal_strength(HasBits * has_bits)57 static void set_has_signal_strength(HasBits* has_bits) {
58 (*has_bits)[0] |= 4u;
59 }
60 };
61
NetworkIDProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)62 NetworkIDProto::NetworkIDProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
63 bool is_message_owned)
64 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
65 SharedCtor(arena, is_message_owned);
66 // @@protoc_insertion_point(arena_constructor:net.nqe.internal.NetworkIDProto)
67 }
NetworkIDProto(const NetworkIDProto & from)68 NetworkIDProto::NetworkIDProto(const NetworkIDProto& from)
69 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
70 NetworkIDProto* const _this = this; (void)_this;
71 new (&_impl_) Impl_{
72 decltype(_impl_._has_bits_){from._impl_._has_bits_}
73 , /*decltype(_impl_._cached_size_)*/{}
74 , decltype(_impl_.id_){}
75 , decltype(_impl_.connection_type_){}
76 , decltype(_impl_.signal_strength_){}};
77
78 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
79 _impl_.id_.InitDefault();
80 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
81 _impl_.id_.Set("", GetArenaForAllocation());
82 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
83 if (from._internal_has_id()) {
84 _this->_impl_.id_.Set(from._internal_id(),
85 _this->GetArenaForAllocation());
86 }
87 ::memcpy(&_impl_.connection_type_, &from._impl_.connection_type_,
88 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.signal_strength_) -
89 reinterpret_cast<char*>(&_impl_.connection_type_)) + sizeof(_impl_.signal_strength_));
90 // @@protoc_insertion_point(copy_constructor:net.nqe.internal.NetworkIDProto)
91 }
92
SharedCtor(::_pb::Arena * arena,bool is_message_owned)93 inline void NetworkIDProto::SharedCtor(
94 ::_pb::Arena* arena, bool is_message_owned) {
95 (void)arena;
96 (void)is_message_owned;
97 new (&_impl_) Impl_{
98 decltype(_impl_._has_bits_){}
99 , /*decltype(_impl_._cached_size_)*/{}
100 , decltype(_impl_.id_){}
101 , decltype(_impl_.connection_type_){0}
102 , decltype(_impl_.signal_strength_){0}
103 };
104 _impl_.id_.InitDefault();
105 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
106 _impl_.id_.Set("", GetArenaForAllocation());
107 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
108 }
109
~NetworkIDProto()110 NetworkIDProto::~NetworkIDProto() {
111 // @@protoc_insertion_point(destructor:net.nqe.internal.NetworkIDProto)
112 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
113 (void)arena;
114 return;
115 }
116 SharedDtor();
117 }
118
SharedDtor()119 inline void NetworkIDProto::SharedDtor() {
120 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
121 _impl_.id_.Destroy();
122 }
123
SetCachedSize(int size) const124 void NetworkIDProto::SetCachedSize(int size) const {
125 _impl_._cached_size_.Set(size);
126 }
127
Clear()128 void NetworkIDProto::Clear() {
129 // @@protoc_insertion_point(message_clear_start:net.nqe.internal.NetworkIDProto)
130 uint32_t cached_has_bits = 0;
131 // Prevent compiler warnings about cached_has_bits being unused
132 (void) cached_has_bits;
133
134 cached_has_bits = _impl_._has_bits_[0];
135 if (cached_has_bits & 0x00000001u) {
136 _impl_.id_.ClearNonDefaultToEmpty();
137 }
138 if (cached_has_bits & 0x00000006u) {
139 ::memset(&_impl_.connection_type_, 0, static_cast<size_t>(
140 reinterpret_cast<char*>(&_impl_.signal_strength_) -
141 reinterpret_cast<char*>(&_impl_.connection_type_)) + sizeof(_impl_.signal_strength_));
142 }
143 _impl_._has_bits_.Clear();
144 _internal_metadata_.Clear<std::string>();
145 }
146
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)147 const char* NetworkIDProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
148 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
149 _Internal::HasBits has_bits{};
150 while (!ctx->Done(&ptr)) {
151 uint32_t tag;
152 ptr = ::_pbi::ReadTag(ptr, &tag);
153 switch (tag >> 3) {
154 // optional int32 connection_type = 1;
155 case 1:
156 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
157 _Internal::set_has_connection_type(&has_bits);
158 _impl_.connection_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
159 CHK_(ptr);
160 } else
161 goto handle_unusual;
162 continue;
163 // optional string id = 2;
164 case 2:
165 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
166 auto str = _internal_mutable_id();
167 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
168 CHK_(ptr);
169 } else
170 goto handle_unusual;
171 continue;
172 // optional int32 signal_strength = 3;
173 case 3:
174 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
175 _Internal::set_has_signal_strength(&has_bits);
176 _impl_.signal_strength_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
177 CHK_(ptr);
178 } else
179 goto handle_unusual;
180 continue;
181 default:
182 goto handle_unusual;
183 } // switch
184 handle_unusual:
185 if ((tag == 0) || ((tag & 7) == 4)) {
186 CHK_(ptr);
187 ctx->SetLastTag(tag);
188 goto message_done;
189 }
190 ptr = UnknownFieldParse(
191 tag,
192 _internal_metadata_.mutable_unknown_fields<std::string>(),
193 ptr, ctx);
194 CHK_(ptr != nullptr);
195 } // while
196 message_done:
197 _impl_._has_bits_.Or(has_bits);
198 return ptr;
199 failure:
200 ptr = nullptr;
201 goto message_done;
202 #undef CHK_
203 }
204
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const205 uint8_t* NetworkIDProto::_InternalSerialize(
206 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
207 // @@protoc_insertion_point(serialize_to_array_start:net.nqe.internal.NetworkIDProto)
208 uint32_t cached_has_bits = 0;
209 (void) cached_has_bits;
210
211 cached_has_bits = _impl_._has_bits_[0];
212 // optional int32 connection_type = 1;
213 if (cached_has_bits & 0x00000002u) {
214 target = stream->EnsureSpace(target);
215 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_connection_type(), target);
216 }
217
218 // optional string id = 2;
219 if (cached_has_bits & 0x00000001u) {
220 target = stream->WriteStringMaybeAliased(
221 2, this->_internal_id(), target);
222 }
223
224 // optional int32 signal_strength = 3;
225 if (cached_has_bits & 0x00000004u) {
226 target = stream->EnsureSpace(target);
227 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_signal_strength(), target);
228 }
229
230 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
231 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
232 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
233 }
234 // @@protoc_insertion_point(serialize_to_array_end:net.nqe.internal.NetworkIDProto)
235 return target;
236 }
237
ByteSizeLong() const238 size_t NetworkIDProto::ByteSizeLong() const {
239 // @@protoc_insertion_point(message_byte_size_start:net.nqe.internal.NetworkIDProto)
240 size_t total_size = 0;
241
242 uint32_t cached_has_bits = 0;
243 // Prevent compiler warnings about cached_has_bits being unused
244 (void) cached_has_bits;
245
246 cached_has_bits = _impl_._has_bits_[0];
247 if (cached_has_bits & 0x00000007u) {
248 // optional string id = 2;
249 if (cached_has_bits & 0x00000001u) {
250 total_size += 1 +
251 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
252 this->_internal_id());
253 }
254
255 // optional int32 connection_type = 1;
256 if (cached_has_bits & 0x00000002u) {
257 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_connection_type());
258 }
259
260 // optional int32 signal_strength = 3;
261 if (cached_has_bits & 0x00000004u) {
262 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_signal_strength());
263 }
264
265 }
266 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
267 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
268 }
269 int cached_size = ::_pbi::ToCachedSize(total_size);
270 SetCachedSize(cached_size);
271 return total_size;
272 }
273
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)274 void NetworkIDProto::CheckTypeAndMergeFrom(
275 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
276 MergeFrom(*::_pbi::DownCast<const NetworkIDProto*>(
277 &from));
278 }
279
MergeFrom(const NetworkIDProto & from)280 void NetworkIDProto::MergeFrom(const NetworkIDProto& from) {
281 NetworkIDProto* const _this = this;
282 // @@protoc_insertion_point(class_specific_merge_from_start:net.nqe.internal.NetworkIDProto)
283 GOOGLE_DCHECK_NE(&from, _this);
284 uint32_t cached_has_bits = 0;
285 (void) cached_has_bits;
286
287 cached_has_bits = from._impl_._has_bits_[0];
288 if (cached_has_bits & 0x00000007u) {
289 if (cached_has_bits & 0x00000001u) {
290 _this->_internal_set_id(from._internal_id());
291 }
292 if (cached_has_bits & 0x00000002u) {
293 _this->_impl_.connection_type_ = from._impl_.connection_type_;
294 }
295 if (cached_has_bits & 0x00000004u) {
296 _this->_impl_.signal_strength_ = from._impl_.signal_strength_;
297 }
298 _this->_impl_._has_bits_[0] |= cached_has_bits;
299 }
300 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
301 }
302
CopyFrom(const NetworkIDProto & from)303 void NetworkIDProto::CopyFrom(const NetworkIDProto& from) {
304 // @@protoc_insertion_point(class_specific_copy_from_start:net.nqe.internal.NetworkIDProto)
305 if (&from == this) return;
306 Clear();
307 MergeFrom(from);
308 }
309
IsInitialized() const310 bool NetworkIDProto::IsInitialized() const {
311 return true;
312 }
313
InternalSwap(NetworkIDProto * other)314 void NetworkIDProto::InternalSwap(NetworkIDProto* other) {
315 using std::swap;
316 auto* lhs_arena = GetArenaForAllocation();
317 auto* rhs_arena = other->GetArenaForAllocation();
318 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
319 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
320 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
321 &_impl_.id_, lhs_arena,
322 &other->_impl_.id_, rhs_arena
323 );
324 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
325 PROTOBUF_FIELD_OFFSET(NetworkIDProto, _impl_.signal_strength_)
326 + sizeof(NetworkIDProto::_impl_.signal_strength_)
327 - PROTOBUF_FIELD_OFFSET(NetworkIDProto, _impl_.connection_type_)>(
328 reinterpret_cast<char*>(&_impl_.connection_type_),
329 reinterpret_cast<char*>(&other->_impl_.connection_type_));
330 }
331
GetTypeName() const332 std::string NetworkIDProto::GetTypeName() const {
333 return "net.nqe.internal.NetworkIDProto";
334 }
335
336
337 // @@protoc_insertion_point(namespace_scope)
338 } // namespace internal
339 } // namespace nqe
340 } // namespace net
341 PROTOBUF_NAMESPACE_OPEN
342 template<> PROTOBUF_NOINLINE ::net::nqe::internal::NetworkIDProto*
CreateMaybeMessage(Arena * arena)343 Arena::CreateMaybeMessage< ::net::nqe::internal::NetworkIDProto >(Arena* arena) {
344 return Arena::CreateMessageInternal< ::net::nqe::internal::NetworkIDProto >(arena);
345 }
346 PROTOBUF_NAMESPACE_CLOSE
347
348 // @@protoc_insertion_point(global_scope)
349 #include <google/protobuf/port_undef.inc>
350