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 static bool descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized = false;
73 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = {
74 &descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", 251,
75 &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,
76 schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets,
77 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,
78 };
79
80 // Force running AddDescriptors() at dynamic initialization time.
81 static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto), true);
82 PROTOBUF_NAMESPACE_OPEN
83
84 // ===================================================================
85
InitAsDefaultInstance()86 void SourceContext::InitAsDefaultInstance() {
87 }
88 class SourceContext::_Internal {
89 public:
90 };
91
SourceContext()92 SourceContext::SourceContext()
93 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
94 SharedCtor();
95 // @@protoc_insertion_point(constructor:google.protobuf.SourceContext)
96 }
SourceContext(const SourceContext & from)97 SourceContext::SourceContext(const SourceContext& from)
98 : ::PROTOBUF_NAMESPACE_ID::Message(),
99 _internal_metadata_(nullptr) {
100 _internal_metadata_.MergeFrom(from._internal_metadata_);
101 file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
102 if (!from._internal_file_name().empty()) {
103 file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_);
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 }
117
SharedDtor()118 void SourceContext::SharedDtor() {
119 file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
120 }
121
SetCachedSize(int size) const122 void SourceContext::SetCachedSize(int size) const {
123 _cached_size_.Set(size);
124 }
default_instance()125 const SourceContext& SourceContext::default_instance() {
126 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base);
127 return *internal_default_instance();
128 }
129
130
Clear()131 void SourceContext::Clear() {
132 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
133 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
134 // Prevent compiler warnings about cached_has_bits being unused
135 (void) cached_has_bits;
136
137 file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
138 _internal_metadata_.Clear();
139 }
140
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)141 const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
142 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
143 while (!ctx->Done(&ptr)) {
144 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
145 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
146 CHK_(ptr);
147 switch (tag >> 3) {
148 // string file_name = 1;
149 case 1:
150 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
151 auto str = _internal_mutable_file_name();
152 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
153 CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "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
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const177 ::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::_InternalSerialize(
178 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
179 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
180 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
181 (void) cached_has_bits;
182
183 // string file_name = 1;
184 if (this->file_name().size() > 0) {
185 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
186 this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
187 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
188 "google.protobuf.SourceContext.file_name");
189 target = stream->WriteStringMaybeAliased(
190 1, this->_internal_file_name(), target);
191 }
192
193 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
194 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
195 _internal_metadata_.unknown_fields(), target, stream);
196 }
197 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
198 return target;
199 }
200
ByteSizeLong() const201 size_t SourceContext::ByteSizeLong() const {
202 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
203 size_t total_size = 0;
204
205 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
206 // Prevent compiler warnings about cached_has_bits being unused
207 (void) cached_has_bits;
208
209 // string file_name = 1;
210 if (this->file_name().size() > 0) {
211 total_size += 1 +
212 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
213 this->_internal_file_name());
214 }
215
216 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
217 return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
218 _internal_metadata_, total_size, &_cached_size_);
219 }
220 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
221 SetCachedSize(cached_size);
222 return total_size;
223 }
224
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)225 void SourceContext::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
226 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext)
227 GOOGLE_DCHECK_NE(&from, this);
228 const SourceContext* source =
229 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SourceContext>(
230 &from);
231 if (source == nullptr) {
232 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
233 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
234 } else {
235 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext)
236 MergeFrom(*source);
237 }
238 }
239
MergeFrom(const SourceContext & from)240 void SourceContext::MergeFrom(const SourceContext& from) {
241 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
242 GOOGLE_DCHECK_NE(&from, this);
243 _internal_metadata_.MergeFrom(from._internal_metadata_);
244 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
245 (void) cached_has_bits;
246
247 if (from.file_name().size() > 0) {
248
249 file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_);
250 }
251 }
252
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)253 void SourceContext::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
254 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext)
255 if (&from == this) return;
256 Clear();
257 MergeFrom(from);
258 }
259
CopyFrom(const SourceContext & from)260 void SourceContext::CopyFrom(const SourceContext& from) {
261 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
262 if (&from == this) return;
263 Clear();
264 MergeFrom(from);
265 }
266
IsInitialized() const267 bool SourceContext::IsInitialized() const {
268 return true;
269 }
270
InternalSwap(SourceContext * other)271 void SourceContext::InternalSwap(SourceContext* other) {
272 using std::swap;
273 _internal_metadata_.Swap(&other->_internal_metadata_);
274 file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
275 GetArenaNoVirtual());
276 }
277
GetMetadata() const278 ::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const {
279 return GetMetadataStatic();
280 }
281
282
283 // @@protoc_insertion_point(namespace_scope)
284 PROTOBUF_NAMESPACE_CLOSE
285 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)286 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) {
287 return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena);
288 }
289 PROTOBUF_NAMESPACE_CLOSE
290
291 // @@protoc_insertion_point(global_scope)
292 #include <google/protobuf/port_undef.inc>
293