Debian Codegraph @

extra/protobuf/protobuf-24.4/src/google/protobuf/field_mask.pb.cc

raw
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/field_mask.proto
3
4 #include "google/protobuf/field_mask.pb.h"
5
6 #include <algorithm>
7 #include "google/protobuf/io/coded_stream.h"
8 #include "google/protobuf/extension_set.h"
9 #include "google/protobuf/wire_format_lite.h"
10 #include "google/protobuf/descriptor.h"
11 #include "google/protobuf/generated_message_reflection.h"
12 #include "google/protobuf/reflection_ops.h"
13 #include "google/protobuf/wire_format.h"
14 #include "google/protobuf/generated_message_tctable_impl.h"
15 // @@protoc_insertion_point(includes)
16
17 // Must be included last.
18 #include "google/protobuf/port_def.inc"
19 PROTOBUF_PRAGMA_INIT_SEG
20 namespace _pb = ::google::protobuf;
21 namespace _pbi = ::google::protobuf::internal;
22 namespace _fl = ::google::protobuf::internal::field_layout;
23 namespace google {
24 namespace protobuf {
25 template <typename>
26 PROTOBUF_CONSTEXPR FieldMask::FieldMask(::_pbi::ConstantInitialized)
27 : _impl_{
28 /*decltype(_impl_.paths_)*/ {},
29 /*decltype(_impl_._cached_size_)*/ {},
30 } {}
31 struct FieldMaskDefaultTypeInternal {
32 PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
33 ~FieldMaskDefaultTypeInternal() {}
34 union {
35 FieldMask _instance;
36 };
37 };
38
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
40 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
41 } // namespace protobuf
42 } // namespace google
43 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
44 static constexpr const ::_pb::EnumDescriptor**
45 file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
46 static constexpr const ::_pb::ServiceDescriptor**
47 file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
48 const ::uint32_t TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
49 protodesc_cold) = {
50 ~0u, // no _has_bits_
51 PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, _internal_metadata_),
52 ~0u, // no _extensions_
53 ~0u, // no _oneof_case_
54 ~0u, // no _weak_field_map_
55 ~0u, // no _inlined_string_donated_
56 ~0u, // no _split_
57 ~0u, // no sizeof(Split)
58 PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, _impl_.paths_),
59 };
60
61 static const ::_pbi::MigrationSchema
62 schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
63 {0, -1, -1, sizeof(::google::protobuf::FieldMask)},
64 };
65
66 static const ::_pb::Message* const file_default_instances[] = {
67 &::google::protobuf::_FieldMask_default_instance_._instance,
68 };
69 const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
70 "\n google/protobuf/field_mask.proto\022\017goog"
71 "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
72 "\205\001\n\023com.google.protobufB\016FieldMaskProtoP"
73 "\001Z2google.golang.org/protobuf/types/know"
74 "n/fieldmaskpb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
75 ".WellKnownTypesb\006proto3"
76 };
77 static ::absl::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
78 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
79 false,
80 false,
81 223,
82 descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto,
83 "google/protobuf/field_mask.proto",
84 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once,
85 nullptr,
86 0,
87 1,
88 schemas,
89 file_default_instances,
90 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
91 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto,
92 file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
93 file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
94 };
95
96 // This function exists to be marked as weak.
97 // It can significantly speed up compilation by breaking up LLVM's SCC
98 // in the .pb.cc translation units. Large translation units see a
99 // reduction of more than 35% of walltime for optimized builds. Without
100 // the weak attribute all the messages in the file, including all the
101 // vtables and everything they use become part of the same SCC through
102 // a cycle like:
103 // GetMetadata -> descriptor table -> default instances ->
104 // vtables -> GetMetadata
105 // By adding a weak function here we break the connection from the
106 // individual vtables back into the descriptor table.
107 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter() {
108 return &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
109 }
110 // Force running AddDescriptors() at dynamic initialization time.
111 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
112 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
113 namespace google {
114 namespace protobuf {
115 // ===================================================================
116
117 class FieldMask::_Internal {
118 public:
119 };
120
121 FieldMask::FieldMask(::google::protobuf::Arena* arena)
122 : ::google::protobuf::Message(arena) {
123 SharedCtor(arena);
124 // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
125 }
126 FieldMask::FieldMask(const FieldMask& from) : ::google::protobuf::Message() {
127 FieldMask* const _this = this;
128 (void)_this;
129 new (&_impl_) Impl_{
130 decltype(_impl_.paths_){from._impl_.paths_},
131 /*decltype(_impl_._cached_size_)*/ {},
132 };
133 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
134 from._internal_metadata_);
135
136 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
137 }
138 inline void FieldMask::SharedCtor(::_pb::Arena* arena) {
139 (void)arena;
140 new (&_impl_) Impl_{
141 decltype(_impl_.paths_){arena},
142 /*decltype(_impl_._cached_size_)*/ {},
143 };
144 }
145 FieldMask::~FieldMask() {
146 // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
147 _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
148 SharedDtor();
149 }
150 inline void FieldMask::SharedDtor() {
151 ABSL_DCHECK(GetArenaForAllocation() == nullptr);
152 _internal_mutable_paths()->~RepeatedPtrField();
153 }
154 void FieldMask::SetCachedSize(int size) const {
155 _impl_._cached_size_.Set(size);
156 }
157
158 PROTOBUF_NOINLINE void FieldMask::Clear() {
159 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
160 ::uint32_t cached_has_bits = 0;
161 // Prevent compiler warnings about cached_has_bits being unused
162 (void) cached_has_bits;
163
164 _internal_mutable_paths()->Clear();
165 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
166 }
167
168 const char* FieldMask::_InternalParse(
169 const char* ptr, ::_pbi::ParseContext* ctx) {
170 ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
171 return ptr;
172 }
173
174
175 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
176 const ::_pbi::TcParseTable<0, 1, 0, 39, 2> FieldMask::_table_ = {
177 {
178 0, // no _has_bits_
179 0, // no _extensions_
180 1, 0, // max_field_number, fast_idx_mask
181 offsetof(decltype(_table_), field_lookup_table),
182 4294967294, // skipmap
183 offsetof(decltype(_table_), field_entries),
184 1, // num_field_entries
185 0, // num_aux_entries
186 offsetof(decltype(_table_), field_names), // no aux_entries
187 &_FieldMask_default_instance_._instance,
188 ::_pbi::TcParser::GenericFallback, // fallback
189 }, {{
190 // repeated string paths = 1;
191 {::_pbi::TcParser::FastUR1,
192 {10, 63, 0, PROTOBUF_FIELD_OFFSET(FieldMask, _impl_.paths_)}},
193 }}, {{
194 65535, 65535
195 }}, {{
196 // repeated string paths = 1;
197 {PROTOBUF_FIELD_OFFSET(FieldMask, _impl_.paths_), 0, 0,
198 (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
199 }},
200 // no aux_entries
201 {{
202 "\31\5\0\0\0\0\0\0"
203 "google.protobuf.FieldMask"
204 "paths"
205 }},
206 };
207
208 ::uint8_t* FieldMask::_InternalSerialize(
209 ::uint8_t* target,
210 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
211 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
212 ::uint32_t cached_has_bits = 0;
213 (void)cached_has_bits;
214
215 // repeated string paths = 1;
216 for (int i = 0, n = this->_internal_paths_size(); i < n; ++i) {
217 const auto& s = this->_internal_paths().Get(i);
218 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
219 s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths");
220 target = stream->WriteString(1, s, target);
221 }
222
223 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
224 target =
225 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
226 _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
227 }
228 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
229 return target;
230 }
231
232 ::size_t FieldMask::ByteSizeLong() const {
233 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
234 ::size_t total_size = 0;
235
236 ::uint32_t cached_has_bits = 0;
237 // Prevent compiler warnings about cached_has_bits being unused
238 (void) cached_has_bits;
239
240 // repeated string paths = 1;
241 total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_paths().size());
242 for (int i = 0, n = _internal_paths().size(); i < n; ++i) {
243 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
244 _internal_paths().Get(i));
245 }
246 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
247 }
248
249 const ::google::protobuf::Message::ClassData FieldMask::_class_data_ = {
250 ::google::protobuf::Message::CopyWithSourceCheck,
251 FieldMask::MergeImpl
252 };
253 const ::google::protobuf::Message::ClassData*FieldMask::GetClassData() const { return &_class_data_; }
254
255
256 void FieldMask::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
257 auto* const _this = static_cast<FieldMask*>(&to_msg);
258 auto& from = static_cast<const FieldMask&>(from_msg);
259 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
260 ABSL_DCHECK_NE(&from, _this);
261 ::uint32_t cached_has_bits = 0;
262 (void) cached_has_bits;
263
264 _this->_internal_mutable_paths()->MergeFrom(from._internal_paths());
265 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
266 }
267
268 void FieldMask::CopyFrom(const FieldMask& from) {
269 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
270 if (&from == this) return;
271 Clear();
272 MergeFrom(from);
273 }
274
275 PROTOBUF_NOINLINE bool FieldMask::IsInitialized() const {
276 return true;
277 }
278
279 void FieldMask::InternalSwap(FieldMask* other) {
280 using std::swap;
281 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
282 _impl_.paths_.InternalSwap(&other->_impl_.paths_);
283 }
284
285 ::google::protobuf::Metadata FieldMask::GetMetadata() const {
286 return ::_pbi::AssignDescriptors(
287 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter, &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once,
288 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[0]);
289 }
290 // @@protoc_insertion_point(namespace_scope)
291 } // namespace protobuf
292 } // namespace google
293 namespace google {
294 namespace protobuf {
295 } // namespace protobuf
296 } // namespace google
297 // @@protoc_insertion_point(global_scope)
298 #include "google/protobuf/port_undef.inc"