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() { 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_); 58 inline void protobuf_AssignDescriptorsOnce() { 59 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, 60 &protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto); 61 } 62 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 71 void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto() { 72 delete SourceContext::default_instance_; 73 delete SourceContext_reflection_; 74 } 75 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 { 97 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; 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 118 SourceContext::SourceContext() 119 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 120 SharedCtor(); 121 // @@protoc_insertion_point(constructor:google.protobuf.SourceContext) 122 } 123 124 void SourceContext::InitAsDefaultInstance() { 125 _is_default_instance_ = true; 126 } 127 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 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 143 SourceContext::~SourceContext() { 144 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) 145 SharedDtor(); 146 } 147 148 void SourceContext::SharedDtor() { 149 file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 150 if (this != default_instance_) { 151 } 152 } 153 154 void SourceContext::SetCachedSize(int size) const { 155 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); 156 _cached_size_ = size; 157 GOOGLE_SAFE_CONCURRENT_WRITES_END(); 158 } 159 const ::google::protobuf::Descriptor* SourceContext::descriptor() { 160 protobuf_AssignDescriptorsOnce(); 161 return SourceContext_descriptor_; 162 } 163 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 171 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 179 void SourceContext::Clear() { 180 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext) 181 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 182 } 183 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 231 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 247 ::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 265 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 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 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 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 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 320 bool SourceContext::IsInitialized() const { 321 322 return true; 323 } 324 325 void SourceContext::Swap(SourceContext* other) { 326 if (other == this) return; 327 InternalSwap(other); 328 } 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 335 ::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; 347 void SourceContext::clear_file_name() { 348 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 349 } 350 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 } 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 } 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 } 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 } 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 } 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 } 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