1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/common/track_event_descriptor.proto
3
4 #include "protos/perfetto/common/track_event_descriptor.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 perfetto {
22 namespace protos {
TrackEventCategory(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TrackEventCategory::TrackEventCategory(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.tags_)*/{}
28 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
30 struct TrackEventCategoryDefaultTypeInternal {
TrackEventCategoryDefaultTypeInternalperfetto::protos::TrackEventCategoryDefaultTypeInternal31 PROTOBUF_CONSTEXPR TrackEventCategoryDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~TrackEventCategoryDefaultTypeInternalperfetto::protos::TrackEventCategoryDefaultTypeInternal33 ~TrackEventCategoryDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 TrackEventCategory _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TrackEventCategoryDefaultTypeInternal _TrackEventCategory_default_instance_;
TrackEventDescriptor(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR TrackEventDescriptor::TrackEventDescriptor(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_.available_categories_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}} {}
43 struct TrackEventDescriptorDefaultTypeInternal {
TrackEventDescriptorDefaultTypeInternalperfetto::protos::TrackEventDescriptorDefaultTypeInternal44 PROTOBUF_CONSTEXPR TrackEventDescriptorDefaultTypeInternal()
45 : _instance(::_pbi::ConstantInitialized{}) {}
~TrackEventDescriptorDefaultTypeInternalperfetto::protos::TrackEventDescriptorDefaultTypeInternal46 ~TrackEventDescriptorDefaultTypeInternal() {}
47 union { // NOLINT(misc-non-private-member-variables-in-classes)
48 TrackEventDescriptor _instance;
49 };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TrackEventDescriptorDefaultTypeInternal _TrackEventDescriptor_default_instance_;
52 } // namespace protos
53 } // namespace perfetto
54 namespace perfetto {
55 namespace protos {
56
57 // ===================================================================
58
59 class TrackEventCategory::_Internal {
60 public:
61 using HasBits = decltype(std::declval<TrackEventCategory>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)62 static void set_has_name(HasBits* has_bits) {
63 (*has_bits)[0] |= 1u;
64 }
set_has_description(HasBits * has_bits)65 static void set_has_description(HasBits* has_bits) {
66 (*has_bits)[0] |= 2u;
67 }
68 };
69
TrackEventCategory(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)70 TrackEventCategory::TrackEventCategory(::PROTOBUF_NAMESPACE_ID::Arena* arena,
71 bool is_message_owned)
72 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
73 SharedCtor(arena, is_message_owned);
74 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TrackEventCategory)
75 }
TrackEventCategory(const TrackEventCategory & from)76 TrackEventCategory::TrackEventCategory(const TrackEventCategory& from)
77 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
78 TrackEventCategory* const _this = this; (void)_this;
79 new (&_impl_) Impl_{
80 decltype(_impl_._has_bits_){from._impl_._has_bits_}
81 , /*decltype(_impl_._cached_size_)*/{}
82 , decltype(_impl_.tags_){from._impl_.tags_}
83 , decltype(_impl_.name_){}
84 , decltype(_impl_.description_){}};
85
86 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
87 _impl_.name_.InitDefault();
88 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
89 _impl_.name_.Set("", GetArenaForAllocation());
90 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
91 if (from._internal_has_name()) {
92 _this->_impl_.name_.Set(from._internal_name(),
93 _this->GetArenaForAllocation());
94 }
95 _impl_.description_.InitDefault();
96 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
97 _impl_.description_.Set("", GetArenaForAllocation());
98 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
99 if (from._internal_has_description()) {
100 _this->_impl_.description_.Set(from._internal_description(),
101 _this->GetArenaForAllocation());
102 }
103 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TrackEventCategory)
104 }
105
SharedCtor(::_pb::Arena * arena,bool is_message_owned)106 inline void TrackEventCategory::SharedCtor(
107 ::_pb::Arena* arena, bool is_message_owned) {
108 (void)arena;
109 (void)is_message_owned;
110 new (&_impl_) Impl_{
111 decltype(_impl_._has_bits_){}
112 , /*decltype(_impl_._cached_size_)*/{}
113 , decltype(_impl_.tags_){arena}
114 , decltype(_impl_.name_){}
115 , decltype(_impl_.description_){}
116 };
117 _impl_.name_.InitDefault();
118 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
119 _impl_.name_.Set("", GetArenaForAllocation());
120 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
121 _impl_.description_.InitDefault();
122 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
123 _impl_.description_.Set("", GetArenaForAllocation());
124 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
125 }
126
~TrackEventCategory()127 TrackEventCategory::~TrackEventCategory() {
128 // @@protoc_insertion_point(destructor:perfetto.protos.TrackEventCategory)
129 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
130 (void)arena;
131 return;
132 }
133 SharedDtor();
134 }
135
SharedDtor()136 inline void TrackEventCategory::SharedDtor() {
137 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
138 _impl_.tags_.~RepeatedPtrField();
139 _impl_.name_.Destroy();
140 _impl_.description_.Destroy();
141 }
142
SetCachedSize(int size) const143 void TrackEventCategory::SetCachedSize(int size) const {
144 _impl_._cached_size_.Set(size);
145 }
146
Clear()147 void TrackEventCategory::Clear() {
148 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TrackEventCategory)
149 ::uint32_t cached_has_bits = 0;
150 // Prevent compiler warnings about cached_has_bits being unused
151 (void) cached_has_bits;
152
153 _impl_.tags_.Clear();
154 cached_has_bits = _impl_._has_bits_[0];
155 if (cached_has_bits & 0x00000003u) {
156 if (cached_has_bits & 0x00000001u) {
157 _impl_.name_.ClearNonDefaultToEmpty();
158 }
159 if (cached_has_bits & 0x00000002u) {
160 _impl_.description_.ClearNonDefaultToEmpty();
161 }
162 }
163 _impl_._has_bits_.Clear();
164 _internal_metadata_.Clear<std::string>();
165 }
166
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)167 const char* TrackEventCategory::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
168 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
169 _Internal::HasBits has_bits{};
170 while (!ctx->Done(&ptr)) {
171 ::uint32_t tag;
172 ptr = ::_pbi::ReadTag(ptr, &tag);
173 switch (tag >> 3) {
174 // optional string name = 1;
175 case 1:
176 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
177 auto str = _internal_mutable_name();
178 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
179 CHK_(ptr);
180 } else {
181 goto handle_unusual;
182 }
183 continue;
184 // optional string description = 2;
185 case 2:
186 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
187 auto str = _internal_mutable_description();
188 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
189 CHK_(ptr);
190 } else {
191 goto handle_unusual;
192 }
193 continue;
194 // repeated string tags = 3;
195 case 3:
196 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
197 ptr -= 1;
198 do {
199 ptr += 1;
200 auto str = _internal_add_tags();
201 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
202 CHK_(ptr);
203 if (!ctx->DataAvailable(ptr)) break;
204 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
205 } else {
206 goto handle_unusual;
207 }
208 continue;
209 default:
210 goto handle_unusual;
211 } // switch
212 handle_unusual:
213 if ((tag == 0) || ((tag & 7) == 4)) {
214 CHK_(ptr);
215 ctx->SetLastTag(tag);
216 goto message_done;
217 }
218 ptr = UnknownFieldParse(
219 tag,
220 _internal_metadata_.mutable_unknown_fields<std::string>(),
221 ptr, ctx);
222 CHK_(ptr != nullptr);
223 } // while
224 message_done:
225 _impl_._has_bits_.Or(has_bits);
226 return ptr;
227 failure:
228 ptr = nullptr;
229 goto message_done;
230 #undef CHK_
231 }
232
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const233 ::uint8_t* TrackEventCategory::_InternalSerialize(
234 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
235 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TrackEventCategory)
236 ::uint32_t cached_has_bits = 0;
237 (void) cached_has_bits;
238
239 cached_has_bits = _impl_._has_bits_[0];
240 // optional string name = 1;
241 if (cached_has_bits & 0x00000001u) {
242 target = stream->WriteStringMaybeAliased(
243 1, this->_internal_name(), target);
244 }
245
246 // optional string description = 2;
247 if (cached_has_bits & 0x00000002u) {
248 target = stream->WriteStringMaybeAliased(
249 2, this->_internal_description(), target);
250 }
251
252 // repeated string tags = 3;
253 for (int i = 0, n = this->_internal_tags_size(); i < n; i++) {
254 const auto& s = this->_internal_tags(i);
255 target = stream->WriteString(3, s, target);
256 }
257
258 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
259 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
260 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
261 }
262 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TrackEventCategory)
263 return target;
264 }
265
ByteSizeLong() const266 size_t TrackEventCategory::ByteSizeLong() const {
267 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TrackEventCategory)
268 size_t total_size = 0;
269
270 ::uint32_t cached_has_bits = 0;
271 // Prevent compiler warnings about cached_has_bits being unused
272 (void) cached_has_bits;
273
274 // repeated string tags = 3;
275 total_size += 1 *
276 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.tags_.size());
277 for (int i = 0, n = _impl_.tags_.size(); i < n; i++) {
278 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
279 _impl_.tags_.Get(i));
280 }
281
282 cached_has_bits = _impl_._has_bits_[0];
283 if (cached_has_bits & 0x00000003u) {
284 // optional string name = 1;
285 if (cached_has_bits & 0x00000001u) {
286 total_size += 1 +
287 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
288 this->_internal_name());
289 }
290
291 // optional string description = 2;
292 if (cached_has_bits & 0x00000002u) {
293 total_size += 1 +
294 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
295 this->_internal_description());
296 }
297
298 }
299 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
300 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
301 }
302 int cached_size = ::_pbi::ToCachedSize(total_size);
303 SetCachedSize(cached_size);
304 return total_size;
305 }
306
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)307 void TrackEventCategory::CheckTypeAndMergeFrom(
308 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
309 MergeFrom(*::_pbi::DownCast<const TrackEventCategory*>(
310 &from));
311 }
312
MergeFrom(const TrackEventCategory & from)313 void TrackEventCategory::MergeFrom(const TrackEventCategory& from) {
314 TrackEventCategory* const _this = this;
315 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TrackEventCategory)
316 GOOGLE_DCHECK_NE(&from, _this);
317 ::uint32_t cached_has_bits = 0;
318 (void) cached_has_bits;
319
320 _this->_impl_.tags_.MergeFrom(from._impl_.tags_);
321 cached_has_bits = from._impl_._has_bits_[0];
322 if (cached_has_bits & 0x00000003u) {
323 if (cached_has_bits & 0x00000001u) {
324 _this->_internal_set_name(from._internal_name());
325 }
326 if (cached_has_bits & 0x00000002u) {
327 _this->_internal_set_description(from._internal_description());
328 }
329 }
330 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
331 }
332
CopyFrom(const TrackEventCategory & from)333 void TrackEventCategory::CopyFrom(const TrackEventCategory& from) {
334 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TrackEventCategory)
335 if (&from == this) return;
336 Clear();
337 MergeFrom(from);
338 }
339
IsInitialized() const340 bool TrackEventCategory::IsInitialized() const {
341 return true;
342 }
343
InternalSwap(TrackEventCategory * other)344 void TrackEventCategory::InternalSwap(TrackEventCategory* other) {
345 using std::swap;
346 auto* lhs_arena = GetArenaForAllocation();
347 auto* rhs_arena = other->GetArenaForAllocation();
348 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
349 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
350 _impl_.tags_.InternalSwap(&other->_impl_.tags_);
351 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
352 &_impl_.name_, lhs_arena,
353 &other->_impl_.name_, rhs_arena
354 );
355 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
356 &_impl_.description_, lhs_arena,
357 &other->_impl_.description_, rhs_arena
358 );
359 }
360
GetTypeName() const361 std::string TrackEventCategory::GetTypeName() const {
362 return "perfetto.protos.TrackEventCategory";
363 }
364
365
366 // ===================================================================
367
368 class TrackEventDescriptor::_Internal {
369 public:
370 };
371
TrackEventDescriptor(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)372 TrackEventDescriptor::TrackEventDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
373 bool is_message_owned)
374 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
375 SharedCtor(arena, is_message_owned);
376 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TrackEventDescriptor)
377 }
TrackEventDescriptor(const TrackEventDescriptor & from)378 TrackEventDescriptor::TrackEventDescriptor(const TrackEventDescriptor& from)
379 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
380 TrackEventDescriptor* const _this = this; (void)_this;
381 new (&_impl_) Impl_{
382 decltype(_impl_.available_categories_){from._impl_.available_categories_}
383 , /*decltype(_impl_._cached_size_)*/{}};
384
385 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
386 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TrackEventDescriptor)
387 }
388
SharedCtor(::_pb::Arena * arena,bool is_message_owned)389 inline void TrackEventDescriptor::SharedCtor(
390 ::_pb::Arena* arena, bool is_message_owned) {
391 (void)arena;
392 (void)is_message_owned;
393 new (&_impl_) Impl_{
394 decltype(_impl_.available_categories_){arena}
395 , /*decltype(_impl_._cached_size_)*/{}
396 };
397 }
398
~TrackEventDescriptor()399 TrackEventDescriptor::~TrackEventDescriptor() {
400 // @@protoc_insertion_point(destructor:perfetto.protos.TrackEventDescriptor)
401 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
402 (void)arena;
403 return;
404 }
405 SharedDtor();
406 }
407
SharedDtor()408 inline void TrackEventDescriptor::SharedDtor() {
409 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
410 _impl_.available_categories_.~RepeatedPtrField();
411 }
412
SetCachedSize(int size) const413 void TrackEventDescriptor::SetCachedSize(int size) const {
414 _impl_._cached_size_.Set(size);
415 }
416
Clear()417 void TrackEventDescriptor::Clear() {
418 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TrackEventDescriptor)
419 ::uint32_t cached_has_bits = 0;
420 // Prevent compiler warnings about cached_has_bits being unused
421 (void) cached_has_bits;
422
423 _impl_.available_categories_.Clear();
424 _internal_metadata_.Clear<std::string>();
425 }
426
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)427 const char* TrackEventDescriptor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
428 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
429 while (!ctx->Done(&ptr)) {
430 ::uint32_t tag;
431 ptr = ::_pbi::ReadTag(ptr, &tag);
432 switch (tag >> 3) {
433 // repeated .perfetto.protos.TrackEventCategory available_categories = 1;
434 case 1:
435 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
436 ptr -= 1;
437 do {
438 ptr += 1;
439 ptr = ctx->ParseMessage(_internal_add_available_categories(), ptr);
440 CHK_(ptr);
441 if (!ctx->DataAvailable(ptr)) break;
442 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
443 } else {
444 goto handle_unusual;
445 }
446 continue;
447 default:
448 goto handle_unusual;
449 } // switch
450 handle_unusual:
451 if ((tag == 0) || ((tag & 7) == 4)) {
452 CHK_(ptr);
453 ctx->SetLastTag(tag);
454 goto message_done;
455 }
456 ptr = UnknownFieldParse(
457 tag,
458 _internal_metadata_.mutable_unknown_fields<std::string>(),
459 ptr, ctx);
460 CHK_(ptr != nullptr);
461 } // while
462 message_done:
463 return ptr;
464 failure:
465 ptr = nullptr;
466 goto message_done;
467 #undef CHK_
468 }
469
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const470 ::uint8_t* TrackEventDescriptor::_InternalSerialize(
471 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
472 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TrackEventDescriptor)
473 ::uint32_t cached_has_bits = 0;
474 (void) cached_has_bits;
475
476 // repeated .perfetto.protos.TrackEventCategory available_categories = 1;
477 for (unsigned i = 0,
478 n = static_cast<unsigned>(this->_internal_available_categories_size()); i < n; i++) {
479 const auto& repfield = this->_internal_available_categories(i);
480 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
481 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
482 }
483
484 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
485 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
486 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
487 }
488 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TrackEventDescriptor)
489 return target;
490 }
491
ByteSizeLong() const492 size_t TrackEventDescriptor::ByteSizeLong() const {
493 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TrackEventDescriptor)
494 size_t total_size = 0;
495
496 ::uint32_t cached_has_bits = 0;
497 // Prevent compiler warnings about cached_has_bits being unused
498 (void) cached_has_bits;
499
500 // repeated .perfetto.protos.TrackEventCategory available_categories = 1;
501 total_size += 1UL * this->_internal_available_categories_size();
502 for (const auto& msg : this->_impl_.available_categories_) {
503 total_size +=
504 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
505 }
506
507 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
508 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
509 }
510 int cached_size = ::_pbi::ToCachedSize(total_size);
511 SetCachedSize(cached_size);
512 return total_size;
513 }
514
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)515 void TrackEventDescriptor::CheckTypeAndMergeFrom(
516 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
517 MergeFrom(*::_pbi::DownCast<const TrackEventDescriptor*>(
518 &from));
519 }
520
MergeFrom(const TrackEventDescriptor & from)521 void TrackEventDescriptor::MergeFrom(const TrackEventDescriptor& from) {
522 TrackEventDescriptor* const _this = this;
523 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TrackEventDescriptor)
524 GOOGLE_DCHECK_NE(&from, _this);
525 ::uint32_t cached_has_bits = 0;
526 (void) cached_has_bits;
527
528 _this->_impl_.available_categories_.MergeFrom(from._impl_.available_categories_);
529 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
530 }
531
CopyFrom(const TrackEventDescriptor & from)532 void TrackEventDescriptor::CopyFrom(const TrackEventDescriptor& from) {
533 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TrackEventDescriptor)
534 if (&from == this) return;
535 Clear();
536 MergeFrom(from);
537 }
538
IsInitialized() const539 bool TrackEventDescriptor::IsInitialized() const {
540 return true;
541 }
542
InternalSwap(TrackEventDescriptor * other)543 void TrackEventDescriptor::InternalSwap(TrackEventDescriptor* other) {
544 using std::swap;
545 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
546 _impl_.available_categories_.InternalSwap(&other->_impl_.available_categories_);
547 }
548
GetTypeName() const549 std::string TrackEventDescriptor::GetTypeName() const {
550 return "perfetto.protos.TrackEventDescriptor";
551 }
552
553
554 // @@protoc_insertion_point(namespace_scope)
555 } // namespace protos
556 } // namespace perfetto
557 PROTOBUF_NAMESPACE_OPEN
558 template<> PROTOBUF_NOINLINE ::perfetto::protos::TrackEventCategory*
CreateMaybeMessage(Arena * arena)559 Arena::CreateMaybeMessage< ::perfetto::protos::TrackEventCategory >(Arena* arena) {
560 return Arena::CreateMessageInternal< ::perfetto::protos::TrackEventCategory >(arena);
561 }
562 template<> PROTOBUF_NOINLINE ::perfetto::protos::TrackEventDescriptor*
CreateMaybeMessage(Arena * arena)563 Arena::CreateMaybeMessage< ::perfetto::protos::TrackEventDescriptor >(Arena* arena) {
564 return Arena::CreateMessageInternal< ::perfetto::protos::TrackEventDescriptor >(arena);
565 }
566 PROTOBUF_NAMESPACE_CLOSE
567
568 // @@protoc_insertion_point(global_scope)
569 #include <google/protobuf/port_undef.inc>
570