1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/track_event/task_execution.proto
3 
4 #include "protos/perfetto/trace/track_event/task_execution.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 {
TaskExecution(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TaskExecution::TaskExecution(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.posted_from_iid_)*/::uint64_t{0u}} {}
28 struct TaskExecutionDefaultTypeInternal {
TaskExecutionDefaultTypeInternalperfetto::protos::TaskExecutionDefaultTypeInternal29   PROTOBUF_CONSTEXPR TaskExecutionDefaultTypeInternal()
30       : _instance(::_pbi::ConstantInitialized{}) {}
~TaskExecutionDefaultTypeInternalperfetto::protos::TaskExecutionDefaultTypeInternal31   ~TaskExecutionDefaultTypeInternal() {}
32   union {  // NOLINT(misc-non-private-member-variables-in-classes)
33     TaskExecution _instance;
34   };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TaskExecutionDefaultTypeInternal _TaskExecution_default_instance_;
37 }  // namespace protos
38 }  // namespace perfetto
39 namespace perfetto {
40 namespace protos {
41 
42 // ===================================================================
43 
44 class TaskExecution::_Internal {
45  public:
46   using HasBits = decltype(std::declval<TaskExecution>()._impl_._has_bits_);
set_has_posted_from_iid(HasBits * has_bits)47   static void set_has_posted_from_iid(HasBits* has_bits) {
48     (*has_bits)[0] |= 1u;
49   }
50 };
51 
TaskExecution(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)52 TaskExecution::TaskExecution(::PROTOBUF_NAMESPACE_ID::Arena* arena,
53                          bool is_message_owned)
54   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
55   SharedCtor(arena, is_message_owned);
56   // @@protoc_insertion_point(arena_constructor:perfetto.protos.TaskExecution)
57 }
TaskExecution(const TaskExecution & from)58 TaskExecution::TaskExecution(const TaskExecution& from)
59   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
60   TaskExecution* const _this = this; (void)_this;
61   new (&_impl_) Impl_{
62       decltype(_impl_._has_bits_){from._impl_._has_bits_}
63     , /*decltype(_impl_._cached_size_)*/{}
64     , decltype(_impl_.posted_from_iid_){}};
65 
66   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
67   _this->_impl_.posted_from_iid_ = from._impl_.posted_from_iid_;
68   // @@protoc_insertion_point(copy_constructor:perfetto.protos.TaskExecution)
69 }
70 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)71 inline void TaskExecution::SharedCtor(
72     ::_pb::Arena* arena, bool is_message_owned) {
73   (void)arena;
74   (void)is_message_owned;
75   new (&_impl_) Impl_{
76       decltype(_impl_._has_bits_){}
77     , /*decltype(_impl_._cached_size_)*/{}
78     , decltype(_impl_.posted_from_iid_){::uint64_t{0u}}
79   };
80 }
81 
~TaskExecution()82 TaskExecution::~TaskExecution() {
83   // @@protoc_insertion_point(destructor:perfetto.protos.TaskExecution)
84   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
85   (void)arena;
86     return;
87   }
88   SharedDtor();
89 }
90 
SharedDtor()91 inline void TaskExecution::SharedDtor() {
92   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
93 }
94 
SetCachedSize(int size) const95 void TaskExecution::SetCachedSize(int size) const {
96   _impl_._cached_size_.Set(size);
97 }
98 
Clear()99 void TaskExecution::Clear() {
100 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TaskExecution)
101   ::uint32_t cached_has_bits = 0;
102   // Prevent compiler warnings about cached_has_bits being unused
103   (void) cached_has_bits;
104 
105   _impl_.posted_from_iid_ = ::uint64_t{0u};
106   _impl_._has_bits_.Clear();
107   _internal_metadata_.Clear<std::string>();
108 }
109 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)110 const char* TaskExecution::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
111 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
112   _Internal::HasBits has_bits{};
113   while (!ctx->Done(&ptr)) {
114     ::uint32_t tag;
115     ptr = ::_pbi::ReadTag(ptr, &tag);
116     switch (tag >> 3) {
117       // optional uint64 posted_from_iid = 1;
118       case 1:
119         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
120           _Internal::set_has_posted_from_iid(&has_bits);
121           _impl_.posted_from_iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
122           CHK_(ptr);
123         } else {
124           goto handle_unusual;
125         }
126         continue;
127       default:
128         goto handle_unusual;
129     }  // switch
130   handle_unusual:
131     if ((tag == 0) || ((tag & 7) == 4)) {
132       CHK_(ptr);
133       ctx->SetLastTag(tag);
134       goto message_done;
135     }
136     ptr = UnknownFieldParse(
137         tag,
138         _internal_metadata_.mutable_unknown_fields<std::string>(),
139         ptr, ctx);
140     CHK_(ptr != nullptr);
141   }  // while
142 message_done:
143   _impl_._has_bits_.Or(has_bits);
144   return ptr;
145 failure:
146   ptr = nullptr;
147   goto message_done;
148 #undef CHK_
149 }
150 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const151 ::uint8_t* TaskExecution::_InternalSerialize(
152     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
153   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TaskExecution)
154   ::uint32_t cached_has_bits = 0;
155   (void) cached_has_bits;
156 
157   cached_has_bits = _impl_._has_bits_[0];
158   // optional uint64 posted_from_iid = 1;
159   if (cached_has_bits & 0x00000001u) {
160     target = stream->EnsureSpace(target);
161     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_posted_from_iid(), target);
162   }
163 
164   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
165     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
166         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
167   }
168   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TaskExecution)
169   return target;
170 }
171 
ByteSizeLong() const172 size_t TaskExecution::ByteSizeLong() const {
173 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TaskExecution)
174   size_t total_size = 0;
175 
176   ::uint32_t cached_has_bits = 0;
177   // Prevent compiler warnings about cached_has_bits being unused
178   (void) cached_has_bits;
179 
180   // optional uint64 posted_from_iid = 1;
181   cached_has_bits = _impl_._has_bits_[0];
182   if (cached_has_bits & 0x00000001u) {
183     total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_posted_from_iid());
184   }
185 
186   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
187     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
188   }
189   int cached_size = ::_pbi::ToCachedSize(total_size);
190   SetCachedSize(cached_size);
191   return total_size;
192 }
193 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)194 void TaskExecution::CheckTypeAndMergeFrom(
195     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
196   MergeFrom(*::_pbi::DownCast<const TaskExecution*>(
197       &from));
198 }
199 
MergeFrom(const TaskExecution & from)200 void TaskExecution::MergeFrom(const TaskExecution& from) {
201   TaskExecution* const _this = this;
202   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TaskExecution)
203   GOOGLE_DCHECK_NE(&from, _this);
204   ::uint32_t cached_has_bits = 0;
205   (void) cached_has_bits;
206 
207   if (from._internal_has_posted_from_iid()) {
208     _this->_internal_set_posted_from_iid(from._internal_posted_from_iid());
209   }
210   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
211 }
212 
CopyFrom(const TaskExecution & from)213 void TaskExecution::CopyFrom(const TaskExecution& from) {
214 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TaskExecution)
215   if (&from == this) return;
216   Clear();
217   MergeFrom(from);
218 }
219 
IsInitialized() const220 bool TaskExecution::IsInitialized() const {
221   return true;
222 }
223 
InternalSwap(TaskExecution * other)224 void TaskExecution::InternalSwap(TaskExecution* other) {
225   using std::swap;
226   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
227   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
228   swap(_impl_.posted_from_iid_, other->_impl_.posted_from_iid_);
229 }
230 
GetTypeName() const231 std::string TaskExecution::GetTypeName() const {
232   return "perfetto.protos.TaskExecution";
233 }
234 
235 
236 // @@protoc_insertion_point(namespace_scope)
237 }  // namespace protos
238 }  // namespace perfetto
239 PROTOBUF_NAMESPACE_OPEN
240 template<> PROTOBUF_NOINLINE ::perfetto::protos::TaskExecution*
CreateMaybeMessage(Arena * arena)241 Arena::CreateMaybeMessage< ::perfetto::protos::TaskExecution >(Arena* arena) {
242   return Arena::CreateMessageInternal< ::perfetto::protos::TaskExecution >(arena);
243 }
244 PROTOBUF_NAMESPACE_CLOSE
245 
246 // @@protoc_insertion_point(global_scope)
247 #include <google/protobuf/port_undef.inc>
248