1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/source_context.proto
3
4 #include <google/protobuf/source_context.pb.h>
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17
18 PROTOBUF_PRAGMA_INIT_SEG
19
20 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
21 namespace _pbi = _pb::internal;
22
23 PROTOBUF_NAMESPACE_OPEN
SourceContext(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR SourceContext::SourceContext(
25 ::_pbi::ConstantInitialized)
26 : file_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
27 struct SourceContextDefaultTypeInternal {
SourceContextDefaultTypeInternalSourceContextDefaultTypeInternal28 PROTOBUF_CONSTEXPR SourceContextDefaultTypeInternal()
29 : _instance(::_pbi::ConstantInitialized{}) {}
~SourceContextDefaultTypeInternalSourceContextDefaultTypeInternal30 ~SourceContextDefaultTypeInternal() {}
31 union {
32 SourceContext _instance;
33 };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceContextDefaultTypeInternal _SourceContext_default_instance_;
36 PROTOBUF_NAMESPACE_CLOSE
37 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1];
38 static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
39 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
40
41 const uint32_t TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
42 ~0u, // no _has_bits_
43 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
44 ~0u, // no _extensions_
45 ~0u, // no _oneof_case_
46 ~0u, // no _weak_field_map_
47 ~0u, // no _inlined_string_donated_
48 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
49 };
50 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
51 { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::SourceContext)},
52 };
53
54 static const ::_pb::Message* const file_default_instances[] = {
55 &::PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_._instance,
56 };
57
58 const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
59 "\n$google/protobuf/source_context.proto\022\017"
60 "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
61 "_name\030\001 \001(\tB\212\001\n\023com.google.protobufB\022Sou"
62 "rceContextProtoP\001Z6google.golang.org/pro"
63 "tobuf/types/known/sourcecontextpb\242\002\003GPB\252"
64 "\002\036Google.Protobuf.WellKnownTypesb\006proto3"
65 ;
66 static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once;
67 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
68 false, false, 240, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto,
69 "google/protobuf/source_context.proto",
70 &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once, nullptr, 0, 1,
71 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
72 file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto,
73 file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto,
74 };
descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_getter()75 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_getter() {
76 return &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto;
77 }
78
79 // Force running AddDescriptors() at dynamic initialization time.
80 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto);
81 PROTOBUF_NAMESPACE_OPEN
82
83 // ===================================================================
84
85 class SourceContext::_Internal {
86 public:
87 };
88
SourceContext(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)89 SourceContext::SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena,
90 bool is_message_owned)
91 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
92 SharedCtor();
93 // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext)
94 }
SourceContext(const SourceContext & from)95 SourceContext::SourceContext(const SourceContext& from)
96 : ::PROTOBUF_NAMESPACE_ID::Message() {
97 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
98 file_name_.InitDefault();
99 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
100 file_name_.Set("", GetArenaForAllocation());
101 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
102 if (!from._internal_file_name().empty()) {
103 file_name_.Set(from._internal_file_name(),
104 GetArenaForAllocation());
105 }
106 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
107 }
108
SharedCtor()109 inline void SourceContext::SharedCtor() {
110 file_name_.InitDefault();
111 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
112 file_name_.Set("", GetArenaForAllocation());
113 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
114 }
115
~SourceContext()116 SourceContext::~SourceContext() {
117 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext)
118 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
119 (void)arena;
120 return;
121 }
122 SharedDtor();
123 }
124
SharedDtor()125 inline void SourceContext::SharedDtor() {
126 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
127 file_name_.Destroy();
128 }
129
SetCachedSize(int size) const130 void SourceContext::SetCachedSize(int size) const {
131 _cached_size_.Set(size);
132 }
133
Clear()134 void SourceContext::Clear() {
135 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
136 uint32_t cached_has_bits = 0;
137 // Prevent compiler warnings about cached_has_bits being unused
138 (void) cached_has_bits;
139
140 file_name_.ClearToEmpty();
141 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
142 }
143
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)144 const char* SourceContext::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
145 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
146 while (!ctx->Done(&ptr)) {
147 uint32_t tag;
148 ptr = ::_pbi::ReadTag(ptr, &tag);
149 switch (tag >> 3) {
150 // string file_name = 1;
151 case 1:
152 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
153 auto str = _internal_mutable_file_name();
154 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
155 CHK_(ptr);
156 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.SourceContext.file_name"));
157 } else
158 goto handle_unusual;
159 continue;
160 default:
161 goto handle_unusual;
162 } // switch
163 handle_unusual:
164 if ((tag == 0) || ((tag & 7) == 4)) {
165 CHK_(ptr);
166 ctx->SetLastTag(tag);
167 goto message_done;
168 }
169 ptr = UnknownFieldParse(
170 tag,
171 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
172 ptr, ctx);
173 CHK_(ptr != nullptr);
174 } // while
175 message_done:
176 return ptr;
177 failure:
178 ptr = nullptr;
179 goto message_done;
180 #undef CHK_
181 }
182
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const183 uint8_t* SourceContext::_InternalSerialize(
184 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
185 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
186 uint32_t cached_has_bits = 0;
187 (void) cached_has_bits;
188
189 // string file_name = 1;
190 if (!this->_internal_file_name().empty()) {
191 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
192 this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
193 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
194 "google.protobuf.SourceContext.file_name");
195 target = stream->WriteStringMaybeAliased(
196 1, this->_internal_file_name(), target);
197 }
198
199 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
200 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
201 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
202 }
203 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
204 return target;
205 }
206
ByteSizeLong() const207 size_t SourceContext::ByteSizeLong() const {
208 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
209 size_t total_size = 0;
210
211 uint32_t cached_has_bits = 0;
212 // Prevent compiler warnings about cached_has_bits being unused
213 (void) cached_has_bits;
214
215 // string file_name = 1;
216 if (!this->_internal_file_name().empty()) {
217 total_size += 1 +
218 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
219 this->_internal_file_name());
220 }
221
222 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
223 }
224
225 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SourceContext::_class_data_ = {
226 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
227 SourceContext::MergeImpl
228 };
GetClassData() const229 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SourceContext::GetClassData() const { return &_class_data_; }
230
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)231 void SourceContext::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
232 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
233 static_cast<SourceContext *>(to)->MergeFrom(
234 static_cast<const SourceContext &>(from));
235 }
236
237
MergeFrom(const SourceContext & from)238 void SourceContext::MergeFrom(const SourceContext& from) {
239 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
240 GOOGLE_DCHECK_NE(&from, this);
241 uint32_t cached_has_bits = 0;
242 (void) cached_has_bits;
243
244 if (!from._internal_file_name().empty()) {
245 _internal_set_file_name(from._internal_file_name());
246 }
247 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
248 }
249
CopyFrom(const SourceContext & from)250 void SourceContext::CopyFrom(const SourceContext& from) {
251 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
252 if (&from == this) return;
253 Clear();
254 MergeFrom(from);
255 }
256
IsInitialized() const257 bool SourceContext::IsInitialized() const {
258 return true;
259 }
260
InternalSwap(SourceContext * other)261 void SourceContext::InternalSwap(SourceContext* other) {
262 using std::swap;
263 auto* lhs_arena = GetArenaForAllocation();
264 auto* rhs_arena = other->GetArenaForAllocation();
265 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
266 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
267 &file_name_, lhs_arena,
268 &other->file_name_, rhs_arena
269 );
270 }
271
GetMetadata() const272 ::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const {
273 return ::_pbi::AssignDescriptors(
274 &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_getter, &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once,
275 file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[0]);
276 }
277
278 // @@protoc_insertion_point(namespace_scope)
279 PROTOBUF_NAMESPACE_CLOSE
280 PROTOBUF_NAMESPACE_OPEN
281 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::SourceContext*
CreateMaybeMessage(Arena * arena)282 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
283 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
284 }
285 PROTOBUF_NAMESPACE_CLOSE
286
287 // @@protoc_insertion_point(global_scope)
288 #include <google/protobuf/port_undef.inc>
289