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