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 PROTOBUF_NAMESPACE_OPEN
18 class SourceContextDefaultTypeInternal {
19 public:
20 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SourceContext> _instance;
21 } _SourceContext_default_instance_;
22 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto()23 static void InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto() {
24 GOOGLE_PROTOBUF_VERIFY_VERSION;
25
26 {
27 void* ptr = &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_;
28 new (ptr) PROTOBUF_NAMESPACE_ID::SourceContext();
29 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
30 }
31 }
32
33 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto =
34 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}};
35
36 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1];
37 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
38 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
39
40 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
41 ~0u, // no _has_bits_
42 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
43 ~0u, // no _extensions_
44 ~0u, // no _oneof_case_
45 ~0u, // no _weak_field_map_
46 PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
47 };
48 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
49 { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceContext)},
50 };
51
52 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
53 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_),
54 };
55
56 const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
57 "\n$google/protobuf/source_context.proto\022\017"
58 "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
59 "_name\030\001 \001(\tB\212\001\n\023com.google.protobufB\022Sou"
60 "rceContextProtoP\001Z6google.golang.org/pro"
61 "tobuf/types/known/sourcecontextpb\242\002\003GPB\252"
62 "\002\036Google.Protobuf.WellKnownTypesb\006proto3"
63 ;
64 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_deps[1] = {
65 };
66 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_sccs[1] = {
67 &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,
68 };
69 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once;
70 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
71 false, false, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 240,
72 &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once, descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_sccs, descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_deps, 1, 0,
73 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
74 file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto,
75 };
76
77 // Force running AddDescriptors() at dynamic initialization time.
78 static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto)), true);
79 PROTOBUF_NAMESPACE_OPEN
80
81 // ===================================================================
82
83 class SourceContext::_Internal {
84 public:
85 };
86
SourceContext(::PROTOBUF_NAMESPACE_ID::Arena * arena)87 SourceContext::SourceContext(::PROTOBUF_NAMESPACE_ID::Arena* arena)
88 : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
89 SharedCtor();
90 RegisterArenaDtor(arena);
91 // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceContext)
92 }
SourceContext(const SourceContext & from)93 SourceContext::SourceContext(const SourceContext& from)
94 : ::PROTOBUF_NAMESPACE_ID::Message() {
95 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
96 file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
97 if (!from._internal_file_name().empty()) {
98 file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(),
99 GetArena());
100 }
101 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
102 }
103
SharedCtor()104 void SourceContext::SharedCtor() {
105 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base);
106 file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
107 }
108
~SourceContext()109 SourceContext::~SourceContext() {
110 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext)
111 SharedDtor();
112 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
113 }
114
SharedDtor()115 void SourceContext::SharedDtor() {
116 GOOGLE_DCHECK(GetArena() == nullptr);
117 file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
118 }
119
ArenaDtor(void * object)120 void SourceContext::ArenaDtor(void* object) {
121 SourceContext* _this = reinterpret_cast< SourceContext* >(object);
122 (void)_this;
123 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)124 void SourceContext::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
125 }
SetCachedSize(int size) const126 void SourceContext::SetCachedSize(int size) const {
127 _cached_size_.Set(size);
128 }
default_instance()129 const SourceContext& SourceContext::default_instance() {
130 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base);
131 return *internal_default_instance();
132 }
133
134
Clear()135 void SourceContext::Clear() {
136 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
137 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
138 // Prevent compiler warnings about cached_has_bits being unused
139 (void) cached_has_bits;
140
141 file_name_.ClearToEmpty();
142 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
143 }
144
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)145 const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
146 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
147 while (!ctx->Done(&ptr)) {
148 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
149 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
150 CHK_(ptr);
151 switch (tag >> 3) {
152 // string file_name = 1;
153 case 1:
154 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
155 auto str = _internal_mutable_file_name();
156 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
157 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.SourceContext.file_name"));
158 CHK_(ptr);
159 } else goto handle_unusual;
160 continue;
161 default: {
162 handle_unusual:
163 if ((tag & 7) == 4 || tag == 0) {
164 ctx->SetLastTag(tag);
165 goto success;
166 }
167 ptr = UnknownFieldParse(tag,
168 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
169 ptr, ctx);
170 CHK_(ptr != nullptr);
171 continue;
172 }
173 } // switch
174 } // while
175 success:
176 return ptr;
177 failure:
178 ptr = nullptr;
179 goto success;
180 #undef CHK_
181 }
182
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const183 ::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::_InternalSerialize(
184 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
185 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
186 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
187 (void) cached_has_bits;
188
189 // string file_name = 1;
190 if (this->file_name().size() > 0) {
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 = ::PROTOBUF_NAMESPACE_ID::internal::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 ::PROTOBUF_NAMESPACE_ID::uint32 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->file_name().size() > 0) {
217 total_size += 1 +
218 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
219 this->_internal_file_name());
220 }
221
222 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
223 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
224 _internal_metadata_, total_size, &_cached_size_);
225 }
226 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
227 SetCachedSize(cached_size);
228 return total_size;
229 }
230
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)231 void SourceContext::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
232 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext)
233 GOOGLE_DCHECK_NE(&from, this);
234 const SourceContext* source =
235 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SourceContext>(
236 &from);
237 if (source == nullptr) {
238 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
239 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
240 } else {
241 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext)
242 MergeFrom(*source);
243 }
244 }
245
MergeFrom(const SourceContext & from)246 void SourceContext::MergeFrom(const SourceContext& from) {
247 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
248 GOOGLE_DCHECK_NE(&from, this);
249 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
250 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
251 (void) cached_has_bits;
252
253 if (from.file_name().size() > 0) {
254 _internal_set_file_name(from._internal_file_name());
255 }
256 }
257
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)258 void SourceContext::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
259 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext)
260 if (&from == this) return;
261 Clear();
262 MergeFrom(from);
263 }
264
CopyFrom(const SourceContext & from)265 void SourceContext::CopyFrom(const SourceContext& from) {
266 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
267 if (&from == this) return;
268 Clear();
269 MergeFrom(from);
270 }
271
IsInitialized() const272 bool SourceContext::IsInitialized() const {
273 return true;
274 }
275
InternalSwap(SourceContext * other)276 void SourceContext::InternalSwap(SourceContext* other) {
277 using std::swap;
278 _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
279 file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
280 }
281
GetMetadata() const282 ::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const {
283 return GetMetadataStatic();
284 }
285
286
287 // @@protoc_insertion_point(namespace_scope)
288 PROTOBUF_NAMESPACE_CLOSE
289 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)290 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
291 return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
292 }
293 PROTOBUF_NAMESPACE_CLOSE
294
295 // @@protoc_insertion_point(global_scope)
296 #include <google/protobuf/port_undef.inc>
297