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