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