1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: system/logging/logcat/logcat.proto
3
4 #include "system/logging/logcat/logcat.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace com {
22 namespace android {
23 namespace logcat {
24 namespace proto {
LogcatEntryProto(::_pbi::ConstantInitialized)25 PROTOBUF_CONSTEXPR LogcatEntryProto::LogcatEntryProto(
26 ::_pbi::ConstantInitialized): _impl_{
27 /*decltype(_impl_._has_bits_)*/{}
28 , /*decltype(_impl_._cached_size_)*/{}
29 , /*decltype(_impl_.tag_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
30 , /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
31 , /*decltype(_impl_.process_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
32 , /*decltype(_impl_.time_sec_)*/::uint64_t{0u}
33 , /*decltype(_impl_.time_nsec_)*/::uint64_t{0u}
34 , /*decltype(_impl_.uid_)*/::uint64_t{0u}
35 , /*decltype(_impl_.pid_)*/::uint64_t{0u}
36 , /*decltype(_impl_.tid_)*/::uint64_t{0u}
37 , /*decltype(_impl_.priority_)*/0} {}
38 struct LogcatEntryProtoDefaultTypeInternal {
LogcatEntryProtoDefaultTypeInternalcom::android::logcat::proto::LogcatEntryProtoDefaultTypeInternal39 PROTOBUF_CONSTEXPR LogcatEntryProtoDefaultTypeInternal()
40 : _instance(::_pbi::ConstantInitialized{}) {}
~LogcatEntryProtoDefaultTypeInternalcom::android::logcat::proto::LogcatEntryProtoDefaultTypeInternal41 ~LogcatEntryProtoDefaultTypeInternal() {}
42 union { // NOLINT(misc-non-private-member-variables-in-classes)
43 LogcatEntryProto _instance;
44 };
45 };
46 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LogcatEntryProtoDefaultTypeInternal _LogcatEntryProto_default_instance_;
47 } // namespace proto
48 } // namespace logcat
49 } // namespace android
50 } // namespace com
51 namespace com {
52 namespace android {
53 namespace logcat {
54 namespace proto {
LogcatPriorityProto_IsValid(int value)55 bool LogcatPriorityProto_IsValid(int value) {
56 switch (value) {
57 case 0:
58 case 1:
59 case 2:
60 case 3:
61 case 4:
62 case 5:
63 case 6:
64 case 8:
65 case 9:
66 return true;
67 default:
68 return false;
69 }
70 }
71
72 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> LogcatPriorityProto_strings[9] = {};
73
74 static const char LogcatPriorityProto_names[] =
75 "DEBUG"
76 "DEFAULT"
77 "ERROR"
78 "FATAL"
79 "INFO"
80 "SILENT"
81 "UNKNOWN"
82 "VERBOSE"
83 "WARN";
84
85 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry LogcatPriorityProto_entries[] = {
86 { {LogcatPriorityProto_names + 0, 5}, 3 },
87 { {LogcatPriorityProto_names + 5, 7}, 1 },
88 { {LogcatPriorityProto_names + 12, 5}, 6 },
89 { {LogcatPriorityProto_names + 17, 5}, 8 },
90 { {LogcatPriorityProto_names + 22, 4}, 4 },
91 { {LogcatPriorityProto_names + 26, 6}, 9 },
92 { {LogcatPriorityProto_names + 32, 7}, 0 },
93 { {LogcatPriorityProto_names + 39, 7}, 2 },
94 { {LogcatPriorityProto_names + 46, 4}, 5 },
95 };
96
97 static const int LogcatPriorityProto_entries_by_number[] = {
98 6, // 0 -> UNKNOWN
99 1, // 1 -> DEFAULT
100 7, // 2 -> VERBOSE
101 0, // 3 -> DEBUG
102 4, // 4 -> INFO
103 8, // 5 -> WARN
104 2, // 6 -> ERROR
105 3, // 8 -> FATAL
106 5, // 9 -> SILENT
107 };
108
LogcatPriorityProto_Name(LogcatPriorityProto value)109 const std::string& LogcatPriorityProto_Name(
110 LogcatPriorityProto value) {
111 static const bool dummy =
112 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
113 LogcatPriorityProto_entries,
114 LogcatPriorityProto_entries_by_number,
115 9, LogcatPriorityProto_strings);
116 (void) dummy;
117 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
118 LogcatPriorityProto_entries,
119 LogcatPriorityProto_entries_by_number,
120 9, value);
121 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
122 LogcatPriorityProto_strings[idx].get();
123 }
LogcatPriorityProto_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,LogcatPriorityProto * value)124 bool LogcatPriorityProto_Parse(
125 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogcatPriorityProto* value) {
126 int int_value;
127 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
128 LogcatPriorityProto_entries, 9, name, &int_value);
129 if (success) {
130 *value = static_cast<LogcatPriorityProto>(int_value);
131 }
132 return success;
133 }
134
135 // ===================================================================
136
137 class LogcatEntryProto::_Internal {
138 public:
139 using HasBits = decltype(std::declval<LogcatEntryProto>()._impl_._has_bits_);
set_has_process_name(HasBits * has_bits)140 static void set_has_process_name(HasBits* has_bits) {
141 (*has_bits)[0] |= 1u;
142 }
143 };
144
LogcatEntryProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)145 LogcatEntryProto::LogcatEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
146 bool is_message_owned)
147 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
148 SharedCtor(arena, is_message_owned);
149 // @@protoc_insertion_point(arena_constructor:com.android.logcat.proto.LogcatEntryProto)
150 }
LogcatEntryProto(const LogcatEntryProto & from)151 LogcatEntryProto::LogcatEntryProto(const LogcatEntryProto& from)
152 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
153 LogcatEntryProto* const _this = this; (void)_this;
154 new (&_impl_) Impl_{
155 decltype(_impl_._has_bits_){from._impl_._has_bits_}
156 , /*decltype(_impl_._cached_size_)*/{}
157 , decltype(_impl_.tag_){}
158 , decltype(_impl_.message_){}
159 , decltype(_impl_.process_name_){}
160 , decltype(_impl_.time_sec_){}
161 , decltype(_impl_.time_nsec_){}
162 , decltype(_impl_.uid_){}
163 , decltype(_impl_.pid_){}
164 , decltype(_impl_.tid_){}
165 , decltype(_impl_.priority_){}};
166
167 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
168 _impl_.tag_.InitDefault();
169 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
170 _impl_.tag_.Set("", GetArenaForAllocation());
171 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
172 if (!from._internal_tag().empty()) {
173 _this->_impl_.tag_.Set(from._internal_tag(),
174 _this->GetArenaForAllocation());
175 }
176 _impl_.message_.InitDefault();
177 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
178 _impl_.message_.Set("", GetArenaForAllocation());
179 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
180 if (!from._internal_message().empty()) {
181 _this->_impl_.message_.Set(from._internal_message(),
182 _this->GetArenaForAllocation());
183 }
184 _impl_.process_name_.InitDefault();
185 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
186 _impl_.process_name_.Set("", GetArenaForAllocation());
187 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
188 if (from._internal_has_process_name()) {
189 _this->_impl_.process_name_.Set(from._internal_process_name(),
190 _this->GetArenaForAllocation());
191 }
192 ::memcpy(&_impl_.time_sec_, &from._impl_.time_sec_,
193 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.priority_) -
194 reinterpret_cast<char*>(&_impl_.time_sec_)) + sizeof(_impl_.priority_));
195 // @@protoc_insertion_point(copy_constructor:com.android.logcat.proto.LogcatEntryProto)
196 }
197
SharedCtor(::_pb::Arena * arena,bool is_message_owned)198 inline void LogcatEntryProto::SharedCtor(
199 ::_pb::Arena* arena, bool is_message_owned) {
200 (void)arena;
201 (void)is_message_owned;
202 new (&_impl_) Impl_{
203 decltype(_impl_._has_bits_){}
204 , /*decltype(_impl_._cached_size_)*/{}
205 , decltype(_impl_.tag_){}
206 , decltype(_impl_.message_){}
207 , decltype(_impl_.process_name_){}
208 , decltype(_impl_.time_sec_){::uint64_t{0u}}
209 , decltype(_impl_.time_nsec_){::uint64_t{0u}}
210 , decltype(_impl_.uid_){::uint64_t{0u}}
211 , decltype(_impl_.pid_){::uint64_t{0u}}
212 , decltype(_impl_.tid_){::uint64_t{0u}}
213 , decltype(_impl_.priority_){0}
214 };
215 _impl_.tag_.InitDefault();
216 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
217 _impl_.tag_.Set("", GetArenaForAllocation());
218 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
219 _impl_.message_.InitDefault();
220 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
221 _impl_.message_.Set("", GetArenaForAllocation());
222 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
223 _impl_.process_name_.InitDefault();
224 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
225 _impl_.process_name_.Set("", GetArenaForAllocation());
226 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
227 }
228
~LogcatEntryProto()229 LogcatEntryProto::~LogcatEntryProto() {
230 // @@protoc_insertion_point(destructor:com.android.logcat.proto.LogcatEntryProto)
231 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
232 (void)arena;
233 return;
234 }
235 SharedDtor();
236 }
237
SharedDtor()238 inline void LogcatEntryProto::SharedDtor() {
239 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
240 _impl_.tag_.Destroy();
241 _impl_.message_.Destroy();
242 _impl_.process_name_.Destroy();
243 }
244
SetCachedSize(int size) const245 void LogcatEntryProto::SetCachedSize(int size) const {
246 _impl_._cached_size_.Set(size);
247 }
248
Clear()249 void LogcatEntryProto::Clear() {
250 // @@protoc_insertion_point(message_clear_start:com.android.logcat.proto.LogcatEntryProto)
251 ::uint32_t cached_has_bits = 0;
252 // Prevent compiler warnings about cached_has_bits being unused
253 (void) cached_has_bits;
254
255 _impl_.tag_.ClearToEmpty();
256 _impl_.message_.ClearToEmpty();
257 cached_has_bits = _impl_._has_bits_[0];
258 if (cached_has_bits & 0x00000001u) {
259 _impl_.process_name_.ClearNonDefaultToEmpty();
260 }
261 ::memset(&_impl_.time_sec_, 0, static_cast<size_t>(
262 reinterpret_cast<char*>(&_impl_.priority_) -
263 reinterpret_cast<char*>(&_impl_.time_sec_)) + sizeof(_impl_.priority_));
264 _impl_._has_bits_.Clear();
265 _internal_metadata_.Clear<std::string>();
266 }
267
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)268 const char* LogcatEntryProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
269 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
270 _Internal::HasBits has_bits{};
271 while (!ctx->Done(&ptr)) {
272 ::uint32_t tag;
273 ptr = ::_pbi::ReadTag(ptr, &tag);
274 switch (tag >> 3) {
275 // uint64 time_sec = 1;
276 case 1:
277 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
278 _impl_.time_sec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
279 CHK_(ptr);
280 } else {
281 goto handle_unusual;
282 }
283 continue;
284 // uint64 time_nsec = 2;
285 case 2:
286 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
287 _impl_.time_nsec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
288 CHK_(ptr);
289 } else {
290 goto handle_unusual;
291 }
292 continue;
293 // .com.android.logcat.proto.LogcatPriorityProto priority = 3;
294 case 3:
295 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
296 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
297 CHK_(ptr);
298 _internal_set_priority(static_cast<::com::android::logcat::proto::LogcatPriorityProto>(val));
299 } else {
300 goto handle_unusual;
301 }
302 continue;
303 // uint64 uid = 4;
304 case 4:
305 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
306 _impl_.uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
307 CHK_(ptr);
308 } else {
309 goto handle_unusual;
310 }
311 continue;
312 // uint64 pid = 5;
313 case 5:
314 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
315 _impl_.pid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
316 CHK_(ptr);
317 } else {
318 goto handle_unusual;
319 }
320 continue;
321 // uint64 tid = 6;
322 case 6:
323 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
324 _impl_.tid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
325 CHK_(ptr);
326 } else {
327 goto handle_unusual;
328 }
329 continue;
330 // bytes tag = 7;
331 case 7:
332 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
333 auto str = _internal_mutable_tag();
334 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
335 CHK_(ptr);
336 } else {
337 goto handle_unusual;
338 }
339 continue;
340 // bytes message = 8;
341 case 8:
342 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
343 auto str = _internal_mutable_message();
344 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
345 CHK_(ptr);
346 } else {
347 goto handle_unusual;
348 }
349 continue;
350 // optional string process_name = 9;
351 case 9:
352 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
353 auto str = _internal_mutable_process_name();
354 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
355 CHK_(ptr);
356 CHK_(::_pbi::VerifyUTF8(str, nullptr));
357 } else {
358 goto handle_unusual;
359 }
360 continue;
361 default:
362 goto handle_unusual;
363 } // switch
364 handle_unusual:
365 if ((tag == 0) || ((tag & 7) == 4)) {
366 CHK_(ptr);
367 ctx->SetLastTag(tag);
368 goto message_done;
369 }
370 ptr = UnknownFieldParse(
371 tag,
372 _internal_metadata_.mutable_unknown_fields<std::string>(),
373 ptr, ctx);
374 CHK_(ptr != nullptr);
375 } // while
376 message_done:
377 _impl_._has_bits_.Or(has_bits);
378 return ptr;
379 failure:
380 ptr = nullptr;
381 goto message_done;
382 #undef CHK_
383 }
384
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const385 ::uint8_t* LogcatEntryProto::_InternalSerialize(
386 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
387 // @@protoc_insertion_point(serialize_to_array_start:com.android.logcat.proto.LogcatEntryProto)
388 ::uint32_t cached_has_bits = 0;
389 (void) cached_has_bits;
390
391 // uint64 time_sec = 1;
392 if (this->_internal_time_sec() != 0) {
393 target = stream->EnsureSpace(target);
394 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_time_sec(), target);
395 }
396
397 // uint64 time_nsec = 2;
398 if (this->_internal_time_nsec() != 0) {
399 target = stream->EnsureSpace(target);
400 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_time_nsec(), target);
401 }
402
403 // .com.android.logcat.proto.LogcatPriorityProto priority = 3;
404 if (this->_internal_priority() != 0) {
405 target = stream->EnsureSpace(target);
406 target = ::_pbi::WireFormatLite::WriteEnumToArray(
407 3, this->_internal_priority(), target);
408 }
409
410 // uint64 uid = 4;
411 if (this->_internal_uid() != 0) {
412 target = stream->EnsureSpace(target);
413 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_uid(), target);
414 }
415
416 // uint64 pid = 5;
417 if (this->_internal_pid() != 0) {
418 target = stream->EnsureSpace(target);
419 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_pid(), target);
420 }
421
422 // uint64 tid = 6;
423 if (this->_internal_tid() != 0) {
424 target = stream->EnsureSpace(target);
425 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_tid(), target);
426 }
427
428 // bytes tag = 7;
429 if (!this->_internal_tag().empty()) {
430 target = stream->WriteBytesMaybeAliased(
431 7, this->_internal_tag(), target);
432 }
433
434 // bytes message = 8;
435 if (!this->_internal_message().empty()) {
436 target = stream->WriteBytesMaybeAliased(
437 8, this->_internal_message(), target);
438 }
439
440 // optional string process_name = 9;
441 if (_internal_has_process_name()) {
442 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
443 this->_internal_process_name().data(), static_cast<int>(this->_internal_process_name().length()),
444 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
445 "com.android.logcat.proto.LogcatEntryProto.process_name");
446 target = stream->WriteStringMaybeAliased(
447 9, this->_internal_process_name(), target);
448 }
449
450 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
451 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
452 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
453 }
454 // @@protoc_insertion_point(serialize_to_array_end:com.android.logcat.proto.LogcatEntryProto)
455 return target;
456 }
457
ByteSizeLong() const458 size_t LogcatEntryProto::ByteSizeLong() const {
459 // @@protoc_insertion_point(message_byte_size_start:com.android.logcat.proto.LogcatEntryProto)
460 size_t total_size = 0;
461
462 ::uint32_t cached_has_bits = 0;
463 // Prevent compiler warnings about cached_has_bits being unused
464 (void) cached_has_bits;
465
466 // bytes tag = 7;
467 if (!this->_internal_tag().empty()) {
468 total_size += 1 +
469 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
470 this->_internal_tag());
471 }
472
473 // bytes message = 8;
474 if (!this->_internal_message().empty()) {
475 total_size += 1 +
476 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
477 this->_internal_message());
478 }
479
480 // optional string process_name = 9;
481 cached_has_bits = _impl_._has_bits_[0];
482 if (cached_has_bits & 0x00000001u) {
483 total_size += 1 +
484 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
485 this->_internal_process_name());
486 }
487
488 // uint64 time_sec = 1;
489 if (this->_internal_time_sec() != 0) {
490 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time_sec());
491 }
492
493 // uint64 time_nsec = 2;
494 if (this->_internal_time_nsec() != 0) {
495 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time_nsec());
496 }
497
498 // uint64 uid = 4;
499 if (this->_internal_uid() != 0) {
500 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_uid());
501 }
502
503 // uint64 pid = 5;
504 if (this->_internal_pid() != 0) {
505 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_pid());
506 }
507
508 // uint64 tid = 6;
509 if (this->_internal_tid() != 0) {
510 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_tid());
511 }
512
513 // .com.android.logcat.proto.LogcatPriorityProto priority = 3;
514 if (this->_internal_priority() != 0) {
515 total_size += 1 +
516 ::_pbi::WireFormatLite::EnumSize(this->_internal_priority());
517 }
518
519 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
520 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
521 }
522 int cached_size = ::_pbi::ToCachedSize(total_size);
523 SetCachedSize(cached_size);
524 return total_size;
525 }
526
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)527 void LogcatEntryProto::CheckTypeAndMergeFrom(
528 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
529 MergeFrom(*::_pbi::DownCast<const LogcatEntryProto*>(
530 &from));
531 }
532
MergeFrom(const LogcatEntryProto & from)533 void LogcatEntryProto::MergeFrom(const LogcatEntryProto& from) {
534 LogcatEntryProto* const _this = this;
535 // @@protoc_insertion_point(class_specific_merge_from_start:com.android.logcat.proto.LogcatEntryProto)
536 GOOGLE_DCHECK_NE(&from, _this);
537 ::uint32_t cached_has_bits = 0;
538 (void) cached_has_bits;
539
540 if (!from._internal_tag().empty()) {
541 _this->_internal_set_tag(from._internal_tag());
542 }
543 if (!from._internal_message().empty()) {
544 _this->_internal_set_message(from._internal_message());
545 }
546 if (from._internal_has_process_name()) {
547 _this->_internal_set_process_name(from._internal_process_name());
548 }
549 if (from._internal_time_sec() != 0) {
550 _this->_internal_set_time_sec(from._internal_time_sec());
551 }
552 if (from._internal_time_nsec() != 0) {
553 _this->_internal_set_time_nsec(from._internal_time_nsec());
554 }
555 if (from._internal_uid() != 0) {
556 _this->_internal_set_uid(from._internal_uid());
557 }
558 if (from._internal_pid() != 0) {
559 _this->_internal_set_pid(from._internal_pid());
560 }
561 if (from._internal_tid() != 0) {
562 _this->_internal_set_tid(from._internal_tid());
563 }
564 if (from._internal_priority() != 0) {
565 _this->_internal_set_priority(from._internal_priority());
566 }
567 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
568 }
569
CopyFrom(const LogcatEntryProto & from)570 void LogcatEntryProto::CopyFrom(const LogcatEntryProto& from) {
571 // @@protoc_insertion_point(class_specific_copy_from_start:com.android.logcat.proto.LogcatEntryProto)
572 if (&from == this) return;
573 Clear();
574 MergeFrom(from);
575 }
576
IsInitialized() const577 bool LogcatEntryProto::IsInitialized() const {
578 return true;
579 }
580
InternalSwap(LogcatEntryProto * other)581 void LogcatEntryProto::InternalSwap(LogcatEntryProto* other) {
582 using std::swap;
583 auto* lhs_arena = GetArenaForAllocation();
584 auto* rhs_arena = other->GetArenaForAllocation();
585 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
586 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
587 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
588 &_impl_.tag_, lhs_arena,
589 &other->_impl_.tag_, rhs_arena
590 );
591 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
592 &_impl_.message_, lhs_arena,
593 &other->_impl_.message_, rhs_arena
594 );
595 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
596 &_impl_.process_name_, lhs_arena,
597 &other->_impl_.process_name_, rhs_arena
598 );
599 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
600 PROTOBUF_FIELD_OFFSET(LogcatEntryProto, _impl_.priority_)
601 + sizeof(LogcatEntryProto::_impl_.priority_) // NOLINT
602 - PROTOBUF_FIELD_OFFSET(LogcatEntryProto, _impl_.time_sec_)>(
603 reinterpret_cast<char*>(&_impl_.time_sec_),
604 reinterpret_cast<char*>(&other->_impl_.time_sec_));
605 }
606
GetTypeName() const607 std::string LogcatEntryProto::GetTypeName() const {
608 return "com.android.logcat.proto.LogcatEntryProto";
609 }
610
611
612 // @@protoc_insertion_point(namespace_scope)
613 } // namespace proto
614 } // namespace logcat
615 } // namespace android
616 } // namespace com
617 PROTOBUF_NAMESPACE_OPEN
618 template<> PROTOBUF_NOINLINE ::com::android::logcat::proto::LogcatEntryProto*
CreateMaybeMessage(Arena * arena)619 Arena::CreateMaybeMessage< ::com::android::logcat::proto::LogcatEntryProto >(Arena* arena) {
620 return Arena::CreateMessageInternal< ::com::android::logcat::proto::LogcatEntryProto >(arena);
621 }
622 PROTOBUF_NAMESPACE_CLOSE
623
624 // @@protoc_insertion_point(global_scope)
625 #include <google/protobuf/port_undef.inc>
626