| OLD | NEW |
| (Empty) | |
| 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::NewGeneratedMessag
eReflection( |
| 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_me
tadata_), |
| 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_2epro
to); |
| 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_2fproto
buf_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::GetEmptyStringAlrea
dyInited()); |
| 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::GetEmptyStringAlready
Inited()); |
| 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_5fc
ontext_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 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
| 181 } |
| 182 |
| 183 bool SourceContext::MergePartialFromCodedStream( |
| 184 ::google::protobuf::io::CodedInputStream* input) { |
| 185 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 186 ::google::protobuf::uint32 tag; |
| 187 // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext) |
| 188 for (;;) { |
| 189 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 190 tag = p.first; |
| 191 if (!p.second) goto handle_unusual; |
| 192 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 193 // optional string file_name = 1; |
| 194 case 1: { |
| 195 if (tag == 10) { |
| 196 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 197 input, this->mutable_file_name())); |
| 198 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 199 this->file_name().data(), this->file_name().length(), |
| 200 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 201 "google.protobuf.SourceContext.file_name")); |
| 202 } else { |
| 203 goto handle_unusual; |
| 204 } |
| 205 if (input->ExpectAtEnd()) goto success; |
| 206 break; |
| 207 } |
| 208 |
| 209 default: { |
| 210 handle_unusual: |
| 211 if (tag == 0 || |
| 212 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 213 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 214 goto success; |
| 215 } |
| 216 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 217 break; |
| 218 } |
| 219 } |
| 220 } |
| 221 success: |
| 222 // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext) |
| 223 return true; |
| 224 failure: |
| 225 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext) |
| 226 return false; |
| 227 #undef DO_ |
| 228 } |
| 229 |
| 230 void SourceContext::SerializeWithCachedSizes( |
| 231 ::google::protobuf::io::CodedOutputStream* output) const { |
| 232 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) |
| 233 // optional string file_name = 1; |
| 234 if (this->file_name().size() > 0) { |
| 235 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 236 this->file_name().data(), this->file_name().length(), |
| 237 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 238 "google.protobuf.SourceContext.file_name"); |
| 239 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 240 1, this->file_name(), output); |
| 241 } |
| 242 |
| 243 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext) |
| 244 } |
| 245 |
| 246 ::google::protobuf::uint8* SourceContext::SerializeWithCachedSizesToArray( |
| 247 ::google::protobuf::uint8* target) const { |
| 248 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCon
text) |
| 249 // optional string file_name = 1; |
| 250 if (this->file_name().size() > 0) { |
| 251 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 252 this->file_name().data(), this->file_name().length(), |
| 253 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 254 "google.protobuf.SourceContext.file_name"); |
| 255 target = |
| 256 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 257 1, this->file_name(), target); |
| 258 } |
| 259 |
| 260 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceConte
xt) |
| 261 return target; |
| 262 } |
| 263 |
| 264 int SourceContext::ByteSize() const { |
| 265 int total_size = 0; |
| 266 |
| 267 // optional string file_name = 1; |
| 268 if (this->file_name().size() > 0) { |
| 269 total_size += 1 + |
| 270 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 271 this->file_name()); |
| 272 } |
| 273 |
| 274 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 275 _cached_size_ = total_size; |
| 276 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 277 return total_size; |
| 278 } |
| 279 |
| 280 void SourceContext::MergeFrom(const ::google::protobuf::Message& from) { |
| 281 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 282 const SourceContext* source = |
| 283 ::google::protobuf::internal::DynamicCastToGenerated<const SourceContext>( |
| 284 &from); |
| 285 if (source == NULL) { |
| 286 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 287 } else { |
| 288 MergeFrom(*source); |
| 289 } |
| 290 } |
| 291 |
| 292 void SourceContext::MergeFrom(const SourceContext& from) { |
| 293 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 294 if (from.file_name().size() > 0) { |
| 295 |
| 296 file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), from.file_name_); |
| 297 } |
| 298 } |
| 299 |
| 300 void SourceContext::CopyFrom(const ::google::protobuf::Message& from) { |
| 301 if (&from == this) return; |
| 302 Clear(); |
| 303 MergeFrom(from); |
| 304 } |
| 305 |
| 306 void SourceContext::CopyFrom(const SourceContext& from) { |
| 307 if (&from == this) return; |
| 308 Clear(); |
| 309 MergeFrom(from); |
| 310 } |
| 311 |
| 312 bool SourceContext::IsInitialized() const { |
| 313 |
| 314 return true; |
| 315 } |
| 316 |
| 317 void SourceContext::Swap(SourceContext* other) { |
| 318 if (other == this) return; |
| 319 InternalSwap(other); |
| 320 } |
| 321 void SourceContext::InternalSwap(SourceContext* other) { |
| 322 file_name_.Swap(&other->file_name_); |
| 323 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 324 std::swap(_cached_size_, other->_cached_size_); |
| 325 } |
| 326 |
| 327 ::google::protobuf::Metadata SourceContext::GetMetadata() const { |
| 328 protobuf_AssignDescriptorsOnce(); |
| 329 ::google::protobuf::Metadata metadata; |
| 330 metadata.descriptor = SourceContext_descriptor_; |
| 331 metadata.reflection = SourceContext_reflection_; |
| 332 return metadata; |
| 333 } |
| 334 |
| 335 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 336 // SourceContext |
| 337 |
| 338 // optional string file_name = 1; |
| 339 void SourceContext::clear_file_name() { |
| 340 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
| 341 } |
| 342 const ::std::string& SourceContext::file_name() const { |
| 343 // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) |
| 344 return file_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlre
adyInited()); |
| 345 } |
| 346 void SourceContext::set_file_name(const ::std::string& value) { |
| 347 |
| 348 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), value); |
| 349 // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) |
| 350 } |
| 351 void SourceContext::set_file_name(const char* value) { |
| 352 |
| 353 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), ::std::string(value)); |
| 354 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_
name) |
| 355 } |
| 356 void SourceContext::set_file_name(const char* value, size_t size) { |
| 357 |
| 358 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), |
| 359 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 360 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.fi
le_name) |
| 361 } |
| 362 ::std::string* SourceContext::mutable_file_name() { |
| 363 |
| 364 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_n
ame) |
| 365 return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
| 366 } |
| 367 ::std::string* SourceContext::release_file_name() { |
| 368 |
| 369 return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
| 370 } |
| 371 void SourceContext::set_allocated_file_name(::std::string* file_name) { |
| 372 if (file_name != NULL) { |
| 373 |
| 374 } else { |
| 375 |
| 376 } |
| 377 file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), file_name); |
| 378 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.
file_name) |
| 379 } |
| 380 |
| 381 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 382 |
| 383 // @@protoc_insertion_point(namespace_scope) |
| 384 |
| 385 } // namespace protobuf |
| 386 } // namespace google |
| 387 |
| 388 // @@protoc_insertion_point(global_scope) |
| OLD | NEW |