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