• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18 PROTOBUF_NAMESPACE_OPEN
19 class SourceContextDefaultTypeInternal {
20  public:
21   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SourceContext> _instance;
22 } _SourceContext_default_instance_;
23 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto()24 static void InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto() {
25   GOOGLE_PROTOBUF_VERIFY_VERSION;
26 
27   {
28     void* ptr = &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_;
29     new (ptr) PROTOBUF_NAMESPACE_ID::SourceContext();
30     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
31   }
32   PROTOBUF_NAMESPACE_ID::SourceContext::InitAsDefaultInstance();
33 }
34 
35 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto =
36     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}};
37 
38 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1];
39 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
40 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr;
41 
42 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
43   ~0u,  // no _has_bits_
44   PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_),
45   ~0u,  // no _extensions_
46   ~0u,  // no _oneof_case_
47   ~0u,  // no _weak_field_map_
48   PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, file_name_),
49 };
50 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
51   { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceContext)},
52 };
53 
54 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
55   reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_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\225\001\n\023com.google.protobufB\022Sou"
62   "rceContextProtoP\001ZAgoogle.golang.org/gen"
63   "proto/protobuf/source_context;source_con"
64   "text\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTy"
65   "pesb\006proto3"
66   ;
67 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_deps[1] = {
68 };
69 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_sccs[1] = {
70   &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base,
71 };
72 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_once;
73 static bool descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized = false;
74 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
75   &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 251,
76   &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,
77   schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
78   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,
79 };
80 
81 // Force running AddDescriptors() at dynamic initialization time.
82 static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto), true);
83 PROTOBUF_NAMESPACE_OPEN
84 
85 // ===================================================================
86 
InitAsDefaultInstance()87 void SourceContext::InitAsDefaultInstance() {
88 }
89 class SourceContext::_Internal {
90  public:
91 };
92 
SourceContext()93 SourceContext::SourceContext()
94   : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
95   SharedCtor();
96   // @@protoc_insertion_point(constructor:google.protobuf.SourceContext)
97 }
SourceContext(const SourceContext & from)98 SourceContext::SourceContext(const SourceContext& from)
99   : ::PROTOBUF_NAMESPACE_ID::Message(),
100       _internal_metadata_(nullptr) {
101   _internal_metadata_.MergeFrom(from._internal_metadata_);
102   file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
103   if (!from.file_name().empty()) {
104     file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_);
105   }
106   // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
107 }
108 
SharedCtor()109 void SourceContext::SharedCtor() {
110   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base);
111   file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
112 }
113 
~SourceContext()114 SourceContext::~SourceContext() {
115   // @@protoc_insertion_point(destructor:google.protobuf.SourceContext)
116   SharedDtor();
117 }
118 
SharedDtor()119 void SourceContext::SharedDtor() {
120   file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
121 }
122 
SetCachedSize(int size) const123 void SourceContext::SetCachedSize(int size) const {
124   _cached_size_.Set(size);
125 }
default_instance()126 const SourceContext& SourceContext::default_instance() {
127   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base);
128   return *internal_default_instance();
129 }
130 
131 
Clear()132 void SourceContext::Clear() {
133 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
134   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
135   // Prevent compiler warnings about cached_has_bits being unused
136   (void) cached_has_bits;
137 
138   file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
139   _internal_metadata_.Clear();
140 }
141 
142 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)143 const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
144 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
145   while (!ctx->Done(&ptr)) {
146     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
147     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
148     CHK_(ptr);
149     switch (tag >> 3) {
150       // string file_name = 1;
151       case 1:
152         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
153           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_file_name(), ptr, ctx, "google.protobuf.SourceContext.file_name");
154           CHK_(ptr);
155         } else goto handle_unusual;
156         continue;
157       default: {
158       handle_unusual:
159         if ((tag & 7) == 4 || tag == 0) {
160           ctx->SetLastTag(tag);
161           goto success;
162         }
163         ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
164         CHK_(ptr != nullptr);
165         continue;
166       }
167     }  // switch
168   }  // while
169 success:
170   return ptr;
171 failure:
172   ptr = nullptr;
173   goto success;
174 #undef CHK_
175 }
176 #else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)177 bool SourceContext::MergePartialFromCodedStream(
178     ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
179 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
180   ::PROTOBUF_NAMESPACE_ID::uint32 tag;
181   // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext)
182   for (;;) {
183     ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
184     tag = p.first;
185     if (!p.second) goto handle_unusual;
186     switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
187       // string file_name = 1;
188       case 1: {
189         if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
190           DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
191                 input, this->mutable_file_name()));
192           DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
193             this->file_name().data(), static_cast<int>(this->file_name().length()),
194             ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
195             "google.protobuf.SourceContext.file_name"));
196         } else {
197           goto handle_unusual;
198         }
199         break;
200       }
201 
202       default: {
203       handle_unusual:
204         if (tag == 0) {
205           goto success;
206         }
207         DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
208               input, tag, _internal_metadata_.mutable_unknown_fields()));
209         break;
210       }
211     }
212   }
213 success:
214   // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext)
215   return true;
216 failure:
217   // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext)
218   return false;
219 #undef DO_
220 }
221 #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
222 
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const223 void SourceContext::SerializeWithCachedSizes(
224     ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
225   // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext)
226   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
227   (void) cached_has_bits;
228 
229   // string file_name = 1;
230   if (this->file_name().size() > 0) {
231     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
232       this->file_name().data(), static_cast<int>(this->file_name().length()),
233       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
234       "google.protobuf.SourceContext.file_name");
235     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
236       1, this->file_name(), output);
237   }
238 
239   if (_internal_metadata_.have_unknown_fields()) {
240     ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
241         _internal_metadata_.unknown_fields(), output);
242   }
243   // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext)
244 }
245 
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const246 ::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::InternalSerializeWithCachedSizesToArray(
247     ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
248   // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
249   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
250   (void) cached_has_bits;
251 
252   // string file_name = 1;
253   if (this->file_name().size() > 0) {
254     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
255       this->file_name().data(), static_cast<int>(this->file_name().length()),
256       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
257       "google.protobuf.SourceContext.file_name");
258     target =
259       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
260         1, this->file_name(), target);
261   }
262 
263   if (_internal_metadata_.have_unknown_fields()) {
264     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
265         _internal_metadata_.unknown_fields(), target);
266   }
267   // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
268   return target;
269 }
270 
ByteSizeLong() const271 size_t SourceContext::ByteSizeLong() const {
272 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
273   size_t total_size = 0;
274 
275   if (_internal_metadata_.have_unknown_fields()) {
276     total_size +=
277       ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
278         _internal_metadata_.unknown_fields());
279   }
280   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
281   // Prevent compiler warnings about cached_has_bits being unused
282   (void) cached_has_bits;
283 
284   // string file_name = 1;
285   if (this->file_name().size() > 0) {
286     total_size += 1 +
287       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
288         this->file_name());
289   }
290 
291   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
292   SetCachedSize(cached_size);
293   return total_size;
294 }
295 
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)296 void SourceContext::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
297 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext)
298   GOOGLE_DCHECK_NE(&from, this);
299   const SourceContext* source =
300       ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SourceContext>(
301           &from);
302   if (source == nullptr) {
303   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
304     ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
305   } else {
306   // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext)
307     MergeFrom(*source);
308   }
309 }
310 
MergeFrom(const SourceContext & from)311 void SourceContext::MergeFrom(const SourceContext& from) {
312 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
313   GOOGLE_DCHECK_NE(&from, this);
314   _internal_metadata_.MergeFrom(from._internal_metadata_);
315   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
316   (void) cached_has_bits;
317 
318   if (from.file_name().size() > 0) {
319 
320     file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_);
321   }
322 }
323 
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)324 void SourceContext::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
325 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext)
326   if (&from == this) return;
327   Clear();
328   MergeFrom(from);
329 }
330 
CopyFrom(const SourceContext & from)331 void SourceContext::CopyFrom(const SourceContext& from) {
332 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
333   if (&from == this) return;
334   Clear();
335   MergeFrom(from);
336 }
337 
IsInitialized() const338 bool SourceContext::IsInitialized() const {
339   return true;
340 }
341 
InternalSwap(SourceContext * other)342 void SourceContext::InternalSwap(SourceContext* other) {
343   using std::swap;
344   _internal_metadata_.Swap(&other->_internal_metadata_);
345   file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
346     GetArenaNoVirtual());
347 }
348 
GetMetadata() const349 ::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const {
350   return GetMetadataStatic();
351 }
352 
353 
354 // @@protoc_insertion_point(namespace_scope)
355 PROTOBUF_NAMESPACE_CLOSE
356 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)357 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
358   return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
359 }
360 PROTOBUF_NAMESPACE_CLOSE
361 
362 // @@protoc_insertion_point(global_scope)
363 #include <google/protobuf/port_undef.inc>
364