1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/source_context.proto
3
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include <google/protobuf/source_context.pb.h>
6
7 #include <algorithm>
8
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/port.h>
11 #include <google/protobuf/stubs/once.h>
12 #include <google/protobuf/io/coded_stream.h>
13 #include <google/protobuf/wire_format_lite_inl.h>
14 #include <google/protobuf/descriptor.h>
15 #include <google/protobuf/generated_message_reflection.h>
16 #include <google/protobuf/reflection_ops.h>
17 #include <google/protobuf/wire_format.h>
18 // @@protoc_insertion_point(includes)
19
20 namespace google {
21 namespace protobuf {
22
23 namespace {
24
25 const ::google::protobuf::Descriptor* SourceContext_descriptor_ = NULL;
26 const ::google::protobuf::internal::GeneratedMessageReflection*
27 SourceContext_reflection_ = NULL;
28
29 } // namespace
30
31
32 void protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() GOOGLE_ATTRIBUTE_COLD;
protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto()33 void protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() {
34 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
35 const ::google::protobuf::FileDescriptor* file =
36 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
37 "google/protobuf/source_context.proto");
38 GOOGLE_CHECK(file != NULL);
39 SourceContext_descriptor_ = file->message_type(0);
40 static const int SourceContext_offsets_[1] = {
41 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, file_name_),
42 };
43 SourceContext_reflection_ =
44 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
45 SourceContext_descriptor_,
46 SourceContext::default_instance_,
47 SourceContext_offsets_,
48 -1,
49 -1,
50 -1,
51 sizeof(SourceContext),
52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, _internal_metadata_),
53 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, _is_default_instance_));
54 }
55
56 namespace {
57
58 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
protobuf_AssignDescriptorsOnce()59 inline void protobuf_AssignDescriptorsOnce() {
60 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
61 &protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto);
62 }
63
64 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
protobuf_RegisterTypes(const::std::string &)65 void protobuf_RegisterTypes(const ::std::string&) {
66 protobuf_AssignDescriptorsOnce();
67 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
68 SourceContext_descriptor_, &SourceContext::default_instance());
69 }
70
71 } // namespace
72
protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto()73 void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto() {
74 delete SourceContext::default_instance_;
75 delete SourceContext_reflection_;
76 }
77
78 void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() GOOGLE_ATTRIBUTE_COLD;
protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto()79 void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() {
80 static bool already_here = false;
81 if (already_here) return;
82 already_here = true;
83 GOOGLE_PROTOBUF_VERIFY_VERSION;
84
85 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
86 "\n$google/protobuf/source_context.proto\022\017"
87 "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile"
88 "_name\030\001 \001(\tBU\n\023com.google.protobufB\022Sour"
89 "ceContextProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Proto"
90 "buf.WellKnownTypesb\006proto3", 186);
91 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
92 "google/protobuf/source_context.proto", &protobuf_RegisterTypes);
93 SourceContext::default_instance_ = new SourceContext();
94 SourceContext::default_instance_->InitAsDefaultInstance();
95 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto);
96 }
97
98 // Force AddDescriptors() to be called at static initialization time.
99 struct StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eprotogoogle::protobuf::StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto100 StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto() {
101 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
102 }
103 } static_descriptor_initializer_google_2fprotobuf_2fsource_5fcontext_2eproto_;
104
105 // ===================================================================
106
107 #if !defined(_MSC_VER) || _MSC_VER >= 1900
108 const int SourceContext::kFileNameFieldNumber;
109 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
110
SourceContext()111 SourceContext::SourceContext()
112 : ::google::protobuf::Message(), _internal_metadata_(NULL) {
113 SharedCtor();
114 // @@protoc_insertion_point(constructor:google.protobuf.SourceContext)
115 }
116
InitAsDefaultInstance()117 void SourceContext::InitAsDefaultInstance() {
118 _is_default_instance_ = true;
119 }
120
SourceContext(const SourceContext & from)121 SourceContext::SourceContext(const SourceContext& from)
122 : ::google::protobuf::Message(),
123 _internal_metadata_(NULL) {
124 SharedCtor();
125 MergeFrom(from);
126 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext)
127 }
128
SharedCtor()129 void SourceContext::SharedCtor() {
130 _is_default_instance_ = false;
131 ::google::protobuf::internal::GetEmptyString();
132 _cached_size_ = 0;
133 file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
134 }
135
~SourceContext()136 SourceContext::~SourceContext() {
137 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext)
138 SharedDtor();
139 }
140
SharedDtor()141 void SourceContext::SharedDtor() {
142 file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
143 if (this != default_instance_) {
144 }
145 }
146
SetCachedSize(int size) const147 void SourceContext::SetCachedSize(int size) const {
148 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
149 _cached_size_ = size;
150 GOOGLE_SAFE_CONCURRENT_WRITES_END();
151 }
descriptor()152 const ::google::protobuf::Descriptor* SourceContext::descriptor() {
153 protobuf_AssignDescriptorsOnce();
154 return SourceContext_descriptor_;
155 }
156
default_instance()157 const SourceContext& SourceContext::default_instance() {
158 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
159 return *default_instance_;
160 }
161
162 SourceContext* SourceContext::default_instance_ = NULL;
163
New(::google::protobuf::Arena * arena) const164 SourceContext* SourceContext::New(::google::protobuf::Arena* arena) const {
165 SourceContext* n = new SourceContext;
166 if (arena != NULL) {
167 arena->Own(n);
168 }
169 return n;
170 }
171
Clear()172 void SourceContext::Clear() {
173 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext)
174 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
175 }
176
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)177 bool SourceContext::MergePartialFromCodedStream(
178 ::google::protobuf::io::CodedInputStream* input) {
179 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
180 ::google::protobuf::uint32 tag;
181 // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext)
182 for (;;) {
183 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
184 tag = p.first;
185 if (!p.second) goto handle_unusual;
186 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
187 // optional string file_name = 1;
188 case 1: {
189 if (tag == 10) {
190 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
191 input, this->mutable_file_name()));
192 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
193 this->file_name().data(), this->file_name().length(),
194 ::google::protobuf::internal::WireFormatLite::PARSE,
195 "google.protobuf.SourceContext.file_name"));
196 } else {
197 goto handle_unusual;
198 }
199 if (input->ExpectAtEnd()) goto success;
200 break;
201 }
202
203 default: {
204 handle_unusual:
205 if (tag == 0 ||
206 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
207 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
208 goto success;
209 }
210 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
211 break;
212 }
213 }
214 }
215 success:
216 // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext)
217 return true;
218 failure:
219 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext)
220 return false;
221 #undef DO_
222 }
223
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const224 void SourceContext::SerializeWithCachedSizes(
225 ::google::protobuf::io::CodedOutputStream* output) const {
226 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext)
227 // optional string file_name = 1;
228 if (this->file_name().size() > 0) {
229 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
230 this->file_name().data(), this->file_name().length(),
231 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
232 "google.protobuf.SourceContext.file_name");
233 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
234 1, this->file_name(), output);
235 }
236
237 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext)
238 }
239
InternalSerializeWithCachedSizesToArray(bool deterministic,::google::protobuf::uint8 * target) const240 ::google::protobuf::uint8* SourceContext::InternalSerializeWithCachedSizesToArray(
241 bool deterministic, ::google::protobuf::uint8* target) const {
242 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext)
243 // optional string file_name = 1;
244 if (this->file_name().size() > 0) {
245 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
246 this->file_name().data(), this->file_name().length(),
247 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
248 "google.protobuf.SourceContext.file_name");
249 target =
250 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
251 1, this->file_name(), target);
252 }
253
254 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext)
255 return target;
256 }
257
ByteSize() const258 int SourceContext::ByteSize() const {
259 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContext)
260 int total_size = 0;
261
262 // optional string file_name = 1;
263 if (this->file_name().size() > 0) {
264 total_size += 1 +
265 ::google::protobuf::internal::WireFormatLite::StringSize(
266 this->file_name());
267 }
268
269 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
270 _cached_size_ = total_size;
271 GOOGLE_SAFE_CONCURRENT_WRITES_END();
272 return total_size;
273 }
274
MergeFrom(const::google::protobuf::Message & from)275 void SourceContext::MergeFrom(const ::google::protobuf::Message& from) {
276 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext)
277 if (GOOGLE_PREDICT_FALSE(&from == this)) {
278 ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
279 }
280 const SourceContext* source =
281 ::google::protobuf::internal::DynamicCastToGenerated<const SourceContext>(
282 &from);
283 if (source == NULL) {
284 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext)
285 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
286 } else {
287 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext)
288 MergeFrom(*source);
289 }
290 }
291
MergeFrom(const SourceContext & from)292 void SourceContext::MergeFrom(const SourceContext& from) {
293 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext)
294 if (GOOGLE_PREDICT_FALSE(&from == this)) {
295 ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
296 }
297 if (from.file_name().size() > 0) {
298
299 file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_);
300 }
301 }
302
CopyFrom(const::google::protobuf::Message & from)303 void SourceContext::CopyFrom(const ::google::protobuf::Message& from) {
304 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext)
305 if (&from == this) return;
306 Clear();
307 MergeFrom(from);
308 }
309
CopyFrom(const SourceContext & from)310 void SourceContext::CopyFrom(const SourceContext& from) {
311 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.SourceContext)
312 if (&from == this) return;
313 Clear();
314 MergeFrom(from);
315 }
316
IsInitialized() const317 bool SourceContext::IsInitialized() const {
318
319 return true;
320 }
321
Swap(SourceContext * other)322 void SourceContext::Swap(SourceContext* other) {
323 if (other == this) return;
324 InternalSwap(other);
325 }
InternalSwap(SourceContext * other)326 void SourceContext::InternalSwap(SourceContext* other) {
327 file_name_.Swap(&other->file_name_);
328 _internal_metadata_.Swap(&other->_internal_metadata_);
329 std::swap(_cached_size_, other->_cached_size_);
330 }
331
GetMetadata() const332 ::google::protobuf::Metadata SourceContext::GetMetadata() const {
333 protobuf_AssignDescriptorsOnce();
334 ::google::protobuf::Metadata metadata;
335 metadata.descriptor = SourceContext_descriptor_;
336 metadata.reflection = SourceContext_reflection_;
337 return metadata;
338 }
339
340 #if PROTOBUF_INLINE_NOT_IN_HEADERS
341 // SourceContext
342
343 // optional string file_name = 1;
clear_file_name()344 void SourceContext::clear_file_name() {
345 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
346 }
file_name() const347 const ::std::string& SourceContext::file_name() const {
348 // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name)
349 return file_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
350 }
set_file_name(const::std::string & value)351 void SourceContext::set_file_name(const ::std::string& value) {
352
353 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
354 // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
355 }
set_file_name(const char * value)356 void SourceContext::set_file_name(const char* value) {
357
358 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
359 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_name)
360 }
set_file_name(const char * value,size_t size)361 void SourceContext::set_file_name(const char* value, size_t size) {
362
363 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
364 ::std::string(reinterpret_cast<const char*>(value), size));
365 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.file_name)
366 }
mutable_file_name()367 ::std::string* SourceContext::mutable_file_name() {
368
369 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_name)
370 return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
371 }
release_file_name()372 ::std::string* SourceContext::release_file_name() {
373 // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name)
374
375 return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
376 }
set_allocated_file_name(::std::string * file_name)377 void SourceContext::set_allocated_file_name(::std::string* file_name) {
378 if (file_name != NULL) {
379
380 } else {
381
382 }
383 file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), file_name);
384 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name)
385 }
386
387 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
388
389 // @@protoc_insertion_point(namespace_scope)
390
391 } // namespace protobuf
392 } // namespace google
393
394 // @@protoc_insertion_point(global_scope)
395