1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/android/winscope_extensions.proto
3
4 #include "protos/perfetto/trace/android/winscope_extensions.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 {
WinscopeExtensions(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR WinscopeExtensions::WinscopeExtensions(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._extensions_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}} {}
27 struct WinscopeExtensionsDefaultTypeInternal {
WinscopeExtensionsDefaultTypeInternalperfetto::protos::WinscopeExtensionsDefaultTypeInternal28 PROTOBUF_CONSTEXPR WinscopeExtensionsDefaultTypeInternal()
29 : _instance(::_pbi::ConstantInitialized{}) {}
~WinscopeExtensionsDefaultTypeInternalperfetto::protos::WinscopeExtensionsDefaultTypeInternal30 ~WinscopeExtensionsDefaultTypeInternal() {}
31 union { // NOLINT(misc-non-private-member-variables-in-classes)
32 WinscopeExtensions _instance;
33 };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WinscopeExtensionsDefaultTypeInternal _WinscopeExtensions_default_instance_;
36 } // namespace protos
37 } // namespace perfetto
38 namespace perfetto {
39 namespace protos {
40
41 // ===================================================================
42
43 class WinscopeExtensions::_Internal {
44 public:
45 };
46
WinscopeExtensions(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)47 WinscopeExtensions::WinscopeExtensions(::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.WinscopeExtensions)
52 }
WinscopeExtensions(const WinscopeExtensions & from)53 WinscopeExtensions::WinscopeExtensions(const WinscopeExtensions& from)
54 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
55 WinscopeExtensions* const _this = this; (void)_this;
56 new (&_impl_) Impl_{
57 /*decltype(_impl_._extensions_)*/{}
58 , /*decltype(_impl_._cached_size_)*/{}};
59
60 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
61 _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
62 // @@protoc_insertion_point(copy_constructor:perfetto.protos.WinscopeExtensions)
63 }
64
SharedCtor(::_pb::Arena * arena,bool is_message_owned)65 inline void WinscopeExtensions::SharedCtor(
66 ::_pb::Arena* arena, bool is_message_owned) {
67 (void)arena;
68 (void)is_message_owned;
69 new (&_impl_) Impl_{
70 /*decltype(_impl_._extensions_)*/{::_pbi::ArenaInitialized(), arena}
71 , /*decltype(_impl_._cached_size_)*/{}
72 };
73 }
74
~WinscopeExtensions()75 WinscopeExtensions::~WinscopeExtensions() {
76 // @@protoc_insertion_point(destructor:perfetto.protos.WinscopeExtensions)
77 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
78 (void)arena;
79 return;
80 }
81 SharedDtor();
82 }
83
SharedDtor()84 inline void WinscopeExtensions::SharedDtor() {
85 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
86 _impl_._extensions_.~ExtensionSet();
87 }
88
SetCachedSize(int size) const89 void WinscopeExtensions::SetCachedSize(int size) const {
90 _impl_._cached_size_.Set(size);
91 }
92
Clear()93 void WinscopeExtensions::Clear() {
94 // @@protoc_insertion_point(message_clear_start:perfetto.protos.WinscopeExtensions)
95 ::uint32_t cached_has_bits = 0;
96 // Prevent compiler warnings about cached_has_bits being unused
97 (void) cached_has_bits;
98
99 _impl_._extensions_.Clear();
100 _internal_metadata_.Clear<std::string>();
101 }
102
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)103 const char* WinscopeExtensions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
104 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
105 while (!ctx->Done(&ptr)) {
106 ::uint32_t tag;
107 ptr = ::_pbi::ReadTag(ptr, &tag);
108 if ((tag == 0) || ((tag & 7) == 4)) {
109 CHK_(ptr);
110 ctx->SetLastTag(tag);
111 goto message_done;
112 }
113 if ((8u <= tag && tag < 56u)) {
114 ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
115 CHK_(ptr != nullptr);
116 continue;
117 }
118 ptr = UnknownFieldParse(
119 tag,
120 _internal_metadata_.mutable_unknown_fields<std::string>(),
121 ptr, ctx);
122 CHK_(ptr != nullptr);
123 } // while
124 message_done:
125 return ptr;
126 failure:
127 ptr = nullptr;
128 goto message_done;
129 #undef CHK_
130 }
131
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const132 ::uint8_t* WinscopeExtensions::_InternalSerialize(
133 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
134 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.WinscopeExtensions)
135 ::uint32_t cached_has_bits = 0;
136 (void) cached_has_bits;
137
138 // Extension range [1, 7)
139 target = _impl_._extensions_._InternalSerialize(
140 internal_default_instance(), 1, 7, target, stream);
141
142 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
143 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
144 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
145 }
146 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.WinscopeExtensions)
147 return target;
148 }
149
ByteSizeLong() const150 size_t WinscopeExtensions::ByteSizeLong() const {
151 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.WinscopeExtensions)
152 size_t total_size = 0;
153
154 total_size += _impl_._extensions_.ByteSize();
155
156 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
157 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
158 }
159 int cached_size = ::_pbi::ToCachedSize(total_size);
160 SetCachedSize(cached_size);
161 return total_size;
162 }
163
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)164 void WinscopeExtensions::CheckTypeAndMergeFrom(
165 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
166 MergeFrom(*::_pbi::DownCast<const WinscopeExtensions*>(
167 &from));
168 }
169
MergeFrom(const WinscopeExtensions & from)170 void WinscopeExtensions::MergeFrom(const WinscopeExtensions& from) {
171 WinscopeExtensions* const _this = this;
172 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.WinscopeExtensions)
173 GOOGLE_DCHECK_NE(&from, _this);
174 ::uint32_t cached_has_bits = 0;
175 (void) cached_has_bits;
176
177 _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
178 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
179 }
180
CopyFrom(const WinscopeExtensions & from)181 void WinscopeExtensions::CopyFrom(const WinscopeExtensions& from) {
182 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.WinscopeExtensions)
183 if (&from == this) return;
184 Clear();
185 MergeFrom(from);
186 }
187
IsInitialized() const188 bool WinscopeExtensions::IsInitialized() const {
189 if (!_impl_._extensions_.IsInitialized()) {
190 return false;
191 }
192
193 return true;
194 }
195
InternalSwap(WinscopeExtensions * other)196 void WinscopeExtensions::InternalSwap(WinscopeExtensions* other) {
197 using std::swap;
198 _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
199 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
200 }
201
GetTypeName() const202 std::string WinscopeExtensions::GetTypeName() const {
203 return "perfetto.protos.WinscopeExtensions";
204 }
205
206
207 // @@protoc_insertion_point(namespace_scope)
208 } // namespace protos
209 } // namespace perfetto
210 PROTOBUF_NAMESPACE_OPEN
211 template<> PROTOBUF_NOINLINE ::perfetto::protos::WinscopeExtensions*
CreateMaybeMessage(Arena * arena)212 Arena::CreateMaybeMessage< ::perfetto::protos::WinscopeExtensions >(Arena* arena) {
213 return Arena::CreateMessageInternal< ::perfetto::protos::WinscopeExtensions >(arena);
214 }
215 PROTOBUF_NAMESPACE_CLOSE
216
217 // @@protoc_insertion_point(global_scope)
218 #include <google/protobuf/port_undef.inc>
219