OLD | NEW |
1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 // source: google/protobuf/struct.proto | 2 // source: google/protobuf/struct.proto |
3 | 3 |
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION | 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
5 #include <google/protobuf/struct.pb.h> | 5 #include <google/protobuf/struct.pb.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
10 #include <google/protobuf/stubs/port.h> | 10 #include <google/protobuf/stubs/port.h> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 "gle.protobuf.Struct.FieldsEntry\032E\n\013Field" | 159 "gle.protobuf.Struct.FieldsEntry\032E\n\013Field" |
160 "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\
026.goo" | 160 "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\
026.goo" |
161 "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull" | 161 "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull" |
162 "_value\030\001 \001(\0162\032.google.protobuf.NullValue" | 162 "_value\030\001 \001(\0162\032.google.protobuf.NullValue" |
163 "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_
val" | 163 "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_
val" |
164 "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n
\014stru" | 164 "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n
\014stru" |
165 "ct_value\030\005 \001(\0132\027.google.protobuf.StructH" | 165 "ct_value\030\005 \001(\0132\027.google.protobuf.StructH" |
166 "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf." | 166 "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf." |
167 "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu" | 167 "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu" |
168 "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull" | 168 "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull" |
169 "Value\022\016\n\nNULL_VALUE\020\000BN\n\023com.google.prot" | 169 "Value\022\016\n\nNULL_VALUE\020\000B\201\001\n\023com.google.pro" |
170 "obufB\013StructProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Pr" | 170 "tobufB\013StructProtoP\001Z1github.com/golang/" |
171 "otobuf.WellKnownTypesb\006proto3", 589); | 171 "protobuf/ptypes/struct;structpb\240\001\001\242\002\003GPB" |
| 172 "\252\002\036Google.Protobuf.WellKnownTypesb\006proto" |
| 173 "3", 641); |
172 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( | 174 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
173 "google/protobuf/struct.proto", &protobuf_RegisterTypes); | 175 "google/protobuf/struct.proto", &protobuf_RegisterTypes); |
174 Struct::default_instance_ = new Struct(); | 176 Struct::default_instance_ = new Struct(); |
175 Value::default_instance_ = new Value(); | 177 Value::default_instance_ = new Value(); |
176 Value_default_oneof_instance_ = new ValueOneofInstance(); | 178 Value_default_oneof_instance_ = new ValueOneofInstance(); |
177 ListValue::default_instance_ = new ListValue(); | 179 ListValue::default_instance_ = new ListValue(); |
178 Struct::default_instance_->InitAsDefaultInstance(); | 180 Struct::default_instance_->InitAsDefaultInstance(); |
179 Value::default_instance_->InitAsDefaultInstance(); | 181 Value::default_instance_->InitAsDefaultInstance(); |
180 ListValue::default_instance_->InitAsDefaultInstance(); | 182 ListValue::default_instance_->InitAsDefaultInstance(); |
181 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fstruct_2eproto); | 183 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fstruct_2eproto); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 275 |
274 Struct* Struct::New(::google::protobuf::Arena* arena) const { | 276 Struct* Struct::New(::google::protobuf::Arena* arena) const { |
275 Struct* n = new Struct; | 277 Struct* n = new Struct; |
276 if (arena != NULL) { | 278 if (arena != NULL) { |
277 arena->Own(n); | 279 arena->Own(n); |
278 } | 280 } |
279 return n; | 281 return n; |
280 } | 282 } |
281 | 283 |
282 void Struct::Clear() { | 284 void Struct::Clear() { |
| 285 // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct) |
283 fields_.Clear(); | 286 fields_.Clear(); |
284 } | 287 } |
285 | 288 |
286 bool Struct::MergePartialFromCodedStream( | 289 bool Struct::MergePartialFromCodedStream( |
287 ::google::protobuf::io::CodedInputStream* input) { | 290 ::google::protobuf::io::CodedInputStream* input) { |
288 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure | 291 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
289 ::google::protobuf::uint32 tag; | 292 ::google::protobuf::uint32 tag; |
290 // @@protoc_insertion_point(parse_start:google.protobuf.Struct) | 293 // @@protoc_insertion_point(parse_start:google.protobuf.Struct) |
291 for (;;) { | 294 for (;;) { |
292 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 295 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
293 tag = p.first; | 296 tag = p.first; |
294 if (!p.second) goto handle_unusual; | 297 if (!p.second) goto handle_unusual; |
295 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 298 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
296 // map<string, .google.protobuf.Value> fields = 1; | 299 // map<string, .google.protobuf.Value> fields = 1; |
297 case 1: { | 300 case 1: { |
298 if (tag == 10) { | 301 if (tag == 10) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 379 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
377 "google.protobuf.Struct.FieldsEntry.key"); | 380 "google.protobuf.Struct.FieldsEntry.key"); |
378 } | 381 } |
379 } | 382 } |
380 | 383 |
381 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) | 384 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) |
382 return target; | 385 return target; |
383 } | 386 } |
384 | 387 |
385 int Struct::ByteSize() const { | 388 int Struct::ByteSize() const { |
| 389 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct) |
386 int total_size = 0; | 390 int total_size = 0; |
387 | 391 |
388 // map<string, .google.protobuf.Value> fields = 1; | 392 // map<string, .google.protobuf.Value> fields = 1; |
389 total_size += 1 * this->fields_size(); | 393 total_size += 1 * this->fields_size(); |
390 { | 394 { |
391 ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry; | 395 ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry; |
392 for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::co
nst_iterator | 396 for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::co
nst_iterator |
393 it = this->fields().begin(); | 397 it = this->fields().begin(); |
394 it != this->fields().end(); ++it) { | 398 it != this->fields().end(); ++it) { |
395 entry.reset(fields_.NewEntryWrapper(it->first, it->second)); | 399 entry.reset(fields_.NewEntryWrapper(it->first, it->second)); |
396 total_size += ::google::protobuf::internal::WireFormatLite:: | 400 total_size += ::google::protobuf::internal::WireFormatLite:: |
397 MessageSizeNoVirtual(*entry); | 401 MessageSizeNoVirtual(*entry); |
398 } | 402 } |
399 } | 403 } |
400 | 404 |
401 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 405 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
402 _cached_size_ = total_size; | 406 _cached_size_ = total_size; |
403 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 407 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
404 return total_size; | 408 return total_size; |
405 } | 409 } |
406 | 410 |
407 void Struct::MergeFrom(const ::google::protobuf::Message& from) { | 411 void Struct::MergeFrom(const ::google::protobuf::Message& from) { |
| 412 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Struct) |
408 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 413 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
409 const Struct* source = | 414 const Struct* source = |
410 ::google::protobuf::internal::DynamicCastToGenerated<const Struct>( | 415 ::google::protobuf::internal::DynamicCastToGenerated<const Struct>( |
411 &from); | 416 &from); |
412 if (source == NULL) { | 417 if (source == NULL) { |
| 418 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.S
truct) |
413 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 419 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
414 } else { | 420 } else { |
| 421 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Struct) |
415 MergeFrom(*source); | 422 MergeFrom(*source); |
416 } | 423 } |
417 } | 424 } |
418 | 425 |
419 void Struct::MergeFrom(const Struct& from) { | 426 void Struct::MergeFrom(const Struct& from) { |
| 427 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Stru
ct) |
420 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 428 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
421 fields_.MergeFrom(from.fields_); | 429 fields_.MergeFrom(from.fields_); |
422 } | 430 } |
423 | 431 |
424 void Struct::CopyFrom(const ::google::protobuf::Message& from) { | 432 void Struct::CopyFrom(const ::google::protobuf::Message& from) { |
| 433 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Struct) |
425 if (&from == this) return; | 434 if (&from == this) return; |
426 Clear(); | 435 Clear(); |
427 MergeFrom(from); | 436 MergeFrom(from); |
428 } | 437 } |
429 | 438 |
430 void Struct::CopyFrom(const Struct& from) { | 439 void Struct::CopyFrom(const Struct& from) { |
| 440 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struc
t) |
431 if (&from == this) return; | 441 if (&from == this) return; |
432 Clear(); | 442 Clear(); |
433 MergeFrom(from); | 443 MergeFrom(from); |
434 } | 444 } |
435 | 445 |
436 bool Struct::IsInitialized() const { | 446 bool Struct::IsInitialized() const { |
437 | 447 |
438 return true; | 448 return true; |
439 } | 449 } |
440 | 450 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 563 |
554 Value* Value::New(::google::protobuf::Arena* arena) const { | 564 Value* Value::New(::google::protobuf::Arena* arena) const { |
555 Value* n = new Value; | 565 Value* n = new Value; |
556 if (arena != NULL) { | 566 if (arena != NULL) { |
557 arena->Own(n); | 567 arena->Own(n); |
558 } | 568 } |
559 return n; | 569 return n; |
560 } | 570 } |
561 | 571 |
562 void Value::clear_kind() { | 572 void Value::clear_kind() { |
| 573 // @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value) |
563 switch(kind_case()) { | 574 switch(kind_case()) { |
564 case kNullValue: { | 575 case kNullValue: { |
565 // No need to clear | 576 // No need to clear |
566 break; | 577 break; |
567 } | 578 } |
568 case kNumberValue: { | 579 case kNumberValue: { |
569 // No need to clear | 580 // No need to clear |
570 break; | 581 break; |
571 } | 582 } |
572 case kStringValue: { | 583 case kStringValue: { |
(...skipping 14 matching lines...) Expand all Loading... |
587 } | 598 } |
588 case KIND_NOT_SET: { | 599 case KIND_NOT_SET: { |
589 break; | 600 break; |
590 } | 601 } |
591 } | 602 } |
592 _oneof_case_[0] = KIND_NOT_SET; | 603 _oneof_case_[0] = KIND_NOT_SET; |
593 } | 604 } |
594 | 605 |
595 | 606 |
596 void Value::Clear() { | 607 void Value::Clear() { |
| 608 // @@protoc_insertion_point(message_clear_start:google.protobuf.Value) |
597 clear_kind(); | 609 clear_kind(); |
598 } | 610 } |
599 | 611 |
600 bool Value::MergePartialFromCodedStream( | 612 bool Value::MergePartialFromCodedStream( |
601 ::google::protobuf::io::CodedInputStream* input) { | 613 ::google::protobuf::io::CodedInputStream* input) { |
602 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure | 614 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
603 ::google::protobuf::uint32 tag; | 615 ::google::protobuf::uint32 tag; |
604 // @@protoc_insertion_point(parse_start:google.protobuf.Value) | 616 // @@protoc_insertion_point(parse_start:google.protobuf.Value) |
605 for (;;) { | 617 for (;;) { |
606 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 618 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
607 tag = p.first; | 619 tag = p.first; |
608 if (!p.second) goto handle_unusual; | 620 if (!p.second) goto handle_unusual; |
609 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 621 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
610 // optional .google.protobuf.NullValue null_value = 1; | 622 // optional .google.protobuf.NullValue null_value = 1; |
611 case 1: { | 623 case 1: { |
612 if (tag == 8) { | 624 if (tag == 8) { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 target = ::google::protobuf::internal::WireFormatLite:: | 816 target = ::google::protobuf::internal::WireFormatLite:: |
805 WriteMessageNoVirtualToArray( | 817 WriteMessageNoVirtualToArray( |
806 6, *kind_.list_value_, target); | 818 6, *kind_.list_value_, target); |
807 } | 819 } |
808 | 820 |
809 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) | 821 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) |
810 return target; | 822 return target; |
811 } | 823 } |
812 | 824 |
813 int Value::ByteSize() const { | 825 int Value::ByteSize() const { |
| 826 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value) |
814 int total_size = 0; | 827 int total_size = 0; |
815 | 828 |
816 switch (kind_case()) { | 829 switch (kind_case()) { |
817 // optional .google.protobuf.NullValue null_value = 1; | 830 // optional .google.protobuf.NullValue null_value = 1; |
818 case kNullValue: { | 831 case kNullValue: { |
819 total_size += 1 + | 832 total_size += 1 + |
820 ::google::protobuf::internal::WireFormatLite::EnumSize(this->null_value(
)); | 833 ::google::protobuf::internal::WireFormatLite::EnumSize(this->null_value(
)); |
821 break; | 834 break; |
822 } | 835 } |
823 // optional double number_value = 2; | 836 // optional double number_value = 2; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 break; | 868 break; |
856 } | 869 } |
857 } | 870 } |
858 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 871 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
859 _cached_size_ = total_size; | 872 _cached_size_ = total_size; |
860 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 873 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
861 return total_size; | 874 return total_size; |
862 } | 875 } |
863 | 876 |
864 void Value::MergeFrom(const ::google::protobuf::Message& from) { | 877 void Value::MergeFrom(const ::google::protobuf::Message& from) { |
| 878 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Value) |
865 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 879 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
866 const Value* source = | 880 const Value* source = |
867 ::google::protobuf::internal::DynamicCastToGenerated<const Value>( | 881 ::google::protobuf::internal::DynamicCastToGenerated<const Value>( |
868 &from); | 882 &from); |
869 if (source == NULL) { | 883 if (source == NULL) { |
| 884 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.V
alue) |
870 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 885 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
871 } else { | 886 } else { |
| 887 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Value) |
872 MergeFrom(*source); | 888 MergeFrom(*source); |
873 } | 889 } |
874 } | 890 } |
875 | 891 |
876 void Value::MergeFrom(const Value& from) { | 892 void Value::MergeFrom(const Value& from) { |
| 893 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Valu
e) |
877 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 894 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
878 switch (from.kind_case()) { | 895 switch (from.kind_case()) { |
879 case kNullValue: { | 896 case kNullValue: { |
880 set_null_value(from.null_value()); | 897 set_null_value(from.null_value()); |
881 break; | 898 break; |
882 } | 899 } |
883 case kNumberValue: { | 900 case kNumberValue: { |
884 set_number_value(from.number_value()); | 901 set_number_value(from.number_value()); |
885 break; | 902 break; |
886 } | 903 } |
(...skipping 13 matching lines...) Expand all Loading... |
900 mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_v
alue()); | 917 mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_v
alue()); |
901 break; | 918 break; |
902 } | 919 } |
903 case KIND_NOT_SET: { | 920 case KIND_NOT_SET: { |
904 break; | 921 break; |
905 } | 922 } |
906 } | 923 } |
907 } | 924 } |
908 | 925 |
909 void Value::CopyFrom(const ::google::protobuf::Message& from) { | 926 void Value::CopyFrom(const ::google::protobuf::Message& from) { |
| 927 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Value) |
910 if (&from == this) return; | 928 if (&from == this) return; |
911 Clear(); | 929 Clear(); |
912 MergeFrom(from); | 930 MergeFrom(from); |
913 } | 931 } |
914 | 932 |
915 void Value::CopyFrom(const Value& from) { | 933 void Value::CopyFrom(const Value& from) { |
| 934 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value
) |
916 if (&from == this) return; | 935 if (&from == this) return; |
917 Clear(); | 936 Clear(); |
918 MergeFrom(from); | 937 MergeFrom(from); |
919 } | 938 } |
920 | 939 |
921 bool Value::IsInitialized() const { | 940 bool Value::IsInitialized() const { |
922 | 941 |
923 return true; | 942 return true; |
924 } | 943 } |
925 | 944 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 ::std::string* Value::mutable_string_value() { | 1075 ::std::string* Value::mutable_string_value() { |
1057 if (!has_string_value()) { | 1076 if (!has_string_value()) { |
1058 clear_kind(); | 1077 clear_kind(); |
1059 set_has_string_value(); | 1078 set_has_string_value(); |
1060 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmpty
StringAlreadyInited()); | 1079 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmpty
StringAlreadyInited()); |
1061 } | 1080 } |
1062 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) | 1081 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) |
1063 return kind_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEm
ptyStringAlreadyInited()); | 1082 return kind_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEm
ptyStringAlreadyInited()); |
1064 } | 1083 } |
1065 ::std::string* Value::release_string_value() { | 1084 ::std::string* Value::release_string_value() { |
| 1085 // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value) |
1066 if (has_string_value()) { | 1086 if (has_string_value()) { |
1067 clear_has_kind(); | 1087 clear_has_kind(); |
1068 return kind_.string_value_.ReleaseNoArena(&::google::protobuf::internal::Get
EmptyStringAlreadyInited()); | 1088 return kind_.string_value_.ReleaseNoArena(&::google::protobuf::internal::Get
EmptyStringAlreadyInited()); |
1069 } else { | 1089 } else { |
1070 return NULL; | 1090 return NULL; |
1071 } | 1091 } |
1072 } | 1092 } |
1073 void Value::set_allocated_string_value(::std::string* string_value) { | 1093 void Value::set_allocated_string_value(::std::string* string_value) { |
1074 if (!has_string_value()) { | 1094 if (!has_string_value()) { |
1075 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmpty
StringAlreadyInited()); | 1095 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmpty
StringAlreadyInited()); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 ::google::protobuf::Struct* Value::mutable_struct_value() { | 1154 ::google::protobuf::Struct* Value::mutable_struct_value() { |
1135 if (!has_struct_value()) { | 1155 if (!has_struct_value()) { |
1136 clear_kind(); | 1156 clear_kind(); |
1137 set_has_struct_value(); | 1157 set_has_struct_value(); |
1138 kind_.struct_value_ = new ::google::protobuf::Struct; | 1158 kind_.struct_value_ = new ::google::protobuf::Struct; |
1139 } | 1159 } |
1140 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) | 1160 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) |
1141 return kind_.struct_value_; | 1161 return kind_.struct_value_; |
1142 } | 1162 } |
1143 ::google::protobuf::Struct* Value::release_struct_value() { | 1163 ::google::protobuf::Struct* Value::release_struct_value() { |
| 1164 // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value) |
1144 if (has_struct_value()) { | 1165 if (has_struct_value()) { |
1145 clear_has_kind(); | 1166 clear_has_kind(); |
1146 ::google::protobuf::Struct* temp = kind_.struct_value_; | 1167 ::google::protobuf::Struct* temp = kind_.struct_value_; |
1147 kind_.struct_value_ = NULL; | 1168 kind_.struct_value_ = NULL; |
1148 return temp; | 1169 return temp; |
1149 } else { | 1170 } else { |
1150 return NULL; | 1171 return NULL; |
1151 } | 1172 } |
1152 } | 1173 } |
1153 void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value)
{ | 1174 void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value)
{ |
(...skipping 27 matching lines...) Expand all Loading... |
1181 ::google::protobuf::ListValue* Value::mutable_list_value() { | 1202 ::google::protobuf::ListValue* Value::mutable_list_value() { |
1182 if (!has_list_value()) { | 1203 if (!has_list_value()) { |
1183 clear_kind(); | 1204 clear_kind(); |
1184 set_has_list_value(); | 1205 set_has_list_value(); |
1185 kind_.list_value_ = new ::google::protobuf::ListValue; | 1206 kind_.list_value_ = new ::google::protobuf::ListValue; |
1186 } | 1207 } |
1187 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) | 1208 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) |
1188 return kind_.list_value_; | 1209 return kind_.list_value_; |
1189 } | 1210 } |
1190 ::google::protobuf::ListValue* Value::release_list_value() { | 1211 ::google::protobuf::ListValue* Value::release_list_value() { |
| 1212 // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value) |
1191 if (has_list_value()) { | 1213 if (has_list_value()) { |
1192 clear_has_kind(); | 1214 clear_has_kind(); |
1193 ::google::protobuf::ListValue* temp = kind_.list_value_; | 1215 ::google::protobuf::ListValue* temp = kind_.list_value_; |
1194 kind_.list_value_ = NULL; | 1216 kind_.list_value_ = NULL; |
1195 return temp; | 1217 return temp; |
1196 } else { | 1218 } else { |
1197 return NULL; | 1219 return NULL; |
1198 } | 1220 } |
1199 } | 1221 } |
1200 void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value)
{ | 1222 void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value)
{ |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 | 1297 |
1276 ListValue* ListValue::New(::google::protobuf::Arena* arena) const { | 1298 ListValue* ListValue::New(::google::protobuf::Arena* arena) const { |
1277 ListValue* n = new ListValue; | 1299 ListValue* n = new ListValue; |
1278 if (arena != NULL) { | 1300 if (arena != NULL) { |
1279 arena->Own(n); | 1301 arena->Own(n); |
1280 } | 1302 } |
1281 return n; | 1303 return n; |
1282 } | 1304 } |
1283 | 1305 |
1284 void ListValue::Clear() { | 1306 void ListValue::Clear() { |
| 1307 // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue) |
1285 values_.Clear(); | 1308 values_.Clear(); |
1286 } | 1309 } |
1287 | 1310 |
1288 bool ListValue::MergePartialFromCodedStream( | 1311 bool ListValue::MergePartialFromCodedStream( |
1289 ::google::protobuf::io::CodedInputStream* input) { | 1312 ::google::protobuf::io::CodedInputStream* input) { |
1290 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure | 1313 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1291 ::google::protobuf::uint32 tag; | 1314 ::google::protobuf::uint32 tag; |
1292 // @@protoc_insertion_point(parse_start:google.protobuf.ListValue) | 1315 // @@protoc_insertion_point(parse_start:google.protobuf.ListValue) |
1293 for (;;) { | 1316 for (;;) { |
1294 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 1317 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
1295 tag = p.first; | 1318 tag = p.first; |
1296 if (!p.second) goto handle_unusual; | 1319 if (!p.second) goto handle_unusual; |
1297 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 1320 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
1298 // repeated .google.protobuf.Value values = 1; | 1321 // repeated .google.protobuf.Value values = 1; |
1299 case 1: { | 1322 case 1: { |
1300 if (tag == 10) { | 1323 if (tag == 10) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 target = ::google::protobuf::internal::WireFormatLite:: | 1375 target = ::google::protobuf::internal::WireFormatLite:: |
1353 WriteMessageNoVirtualToArray( | 1376 WriteMessageNoVirtualToArray( |
1354 1, this->values(i), target); | 1377 1, this->values(i), target); |
1355 } | 1378 } |
1356 | 1379 |
1357 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) | 1380 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) |
1358 return target; | 1381 return target; |
1359 } | 1382 } |
1360 | 1383 |
1361 int ListValue::ByteSize() const { | 1384 int ListValue::ByteSize() const { |
| 1385 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue) |
1362 int total_size = 0; | 1386 int total_size = 0; |
1363 | 1387 |
1364 // repeated .google.protobuf.Value values = 1; | 1388 // repeated .google.protobuf.Value values = 1; |
1365 total_size += 1 * this->values_size(); | 1389 total_size += 1 * this->values_size(); |
1366 for (int i = 0; i < this->values_size(); i++) { | 1390 for (int i = 0; i < this->values_size(); i++) { |
1367 total_size += | 1391 total_size += |
1368 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | 1392 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
1369 this->values(i)); | 1393 this->values(i)); |
1370 } | 1394 } |
1371 | 1395 |
1372 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 1396 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1373 _cached_size_ = total_size; | 1397 _cached_size_ = total_size; |
1374 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 1398 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1375 return total_size; | 1399 return total_size; |
1376 } | 1400 } |
1377 | 1401 |
1378 void ListValue::MergeFrom(const ::google::protobuf::Message& from) { | 1402 void ListValue::MergeFrom(const ::google::protobuf::Message& from) { |
| 1403 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ListVal
ue) |
1379 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 1404 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
1380 const ListValue* source = | 1405 const ListValue* source = |
1381 ::google::protobuf::internal::DynamicCastToGenerated<const ListValue>( | 1406 ::google::protobuf::internal::DynamicCastToGenerated<const ListValue>( |
1382 &from); | 1407 &from); |
1383 if (source == NULL) { | 1408 if (source == NULL) { |
| 1409 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.L
istValue) |
1384 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 1410 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1385 } else { | 1411 } else { |
| 1412 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.ListValue) |
1386 MergeFrom(*source); | 1413 MergeFrom(*source); |
1387 } | 1414 } |
1388 } | 1415 } |
1389 | 1416 |
1390 void ListValue::MergeFrom(const ListValue& from) { | 1417 void ListValue::MergeFrom(const ListValue& from) { |
| 1418 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.List
Value) |
1391 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 1419 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
1392 values_.MergeFrom(from.values_); | 1420 values_.MergeFrom(from.values_); |
1393 } | 1421 } |
1394 | 1422 |
1395 void ListValue::CopyFrom(const ::google::protobuf::Message& from) { | 1423 void ListValue::CopyFrom(const ::google::protobuf::Message& from) { |
| 1424 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ListValu
e) |
1396 if (&from == this) return; | 1425 if (&from == this) return; |
1397 Clear(); | 1426 Clear(); |
1398 MergeFrom(from); | 1427 MergeFrom(from); |
1399 } | 1428 } |
1400 | 1429 |
1401 void ListValue::CopyFrom(const ListValue& from) { | 1430 void ListValue::CopyFrom(const ListValue& from) { |
| 1431 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListV
alue) |
1402 if (&from == this) return; | 1432 if (&from == this) return; |
1403 Clear(); | 1433 Clear(); |
1404 MergeFrom(from); | 1434 MergeFrom(from); |
1405 } | 1435 } |
1406 | 1436 |
1407 bool ListValue::IsInitialized() const { | 1437 bool ListValue::IsInitialized() const { |
1408 | 1438 |
1409 return true; | 1439 return true; |
1410 } | 1440 } |
1411 | 1441 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 } | 1491 } |
1462 | 1492 |
1463 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 1493 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
1464 | 1494 |
1465 // @@protoc_insertion_point(namespace_scope) | 1495 // @@protoc_insertion_point(namespace_scope) |
1466 | 1496 |
1467 } // namespace protobuf | 1497 } // namespace protobuf |
1468 } // namespace google | 1498 } // namespace google |
1469 | 1499 |
1470 // @@protoc_insertion_point(global_scope) | 1500 // @@protoc_insertion_point(global_scope) |
OLD | NEW |