| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: google/protobuf/struct.proto |
| |
| #include <google/protobuf/struct.pb.h> |
| |
| #include <algorithm> |
| |
| #include <google/protobuf/stubs/common.h> |
| #include <google/protobuf/io/coded_stream.h> |
| #include <google/protobuf/extension_set.h> |
| #include <google/protobuf/wire_format_lite.h> |
| #include <google/protobuf/descriptor.h> |
| #include <google/protobuf/generated_message_reflection.h> |
| #include <google/protobuf/reflection_ops.h> |
| #include <google/protobuf/wire_format.h> |
| // @@protoc_insertion_point(includes) |
| #include <google/protobuf/port_def.inc> |
| |
| extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto; |
| PROTOBUF_NAMESPACE_OPEN |
| class Struct_FieldsEntry_DoNotUseDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Struct_FieldsEntry_DoNotUse> _instance; |
| } _Struct_FieldsEntry_DoNotUse_default_instance_; |
| class StructDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Struct> _instance; |
| } _Struct_default_instance_; |
| class ValueDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Value> _instance; |
| int null_value_; |
| double number_value_; |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; |
| bool bool_value_; |
| const PROTOBUF_NAMESPACE_ID::Struct* struct_value_; |
| const PROTOBUF_NAMESPACE_ID::ListValue* list_value_; |
| } _Value_default_instance_; |
| class ListValueDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListValue> _instance; |
| } _ListValue_default_instance_; |
| PROTOBUF_NAMESPACE_CLOSE |
| static void InitDefaultsListValue_google_2fprotobuf_2fstruct_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_; |
| new (ptr) PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse(); |
| } |
| { |
| void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_default_instance_; |
| new (ptr) PROTOBUF_NAMESPACE_ID::Struct(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| { |
| void* ptr = &PROTOBUF_NAMESPACE_ID::_Value_default_instance_; |
| new (ptr) PROTOBUF_NAMESPACE_ID::Value(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| { |
| void* ptr = &PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_; |
| new (ptr) PROTOBUF_NAMESPACE_ID::ListValue(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance(); |
| PROTOBUF_NAMESPACE_ID::Struct::InitAsDefaultInstance(); |
| PROTOBUF_NAMESPACE_ID::Value::InitAsDefaultInstance(); |
| PROTOBUF_NAMESPACE_ID::ListValue::InitAsDefaultInstance(); |
| } |
| |
| PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListValue_google_2fprotobuf_2fstruct_2eproto}, {}}; |
| |
| static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4]; |
| static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1]; |
| static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr; |
| |
| const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_), |
| 0, |
| 1, |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_), |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_), |
| ~0u, // no _extensions_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]), |
| ~0u, // no _weak_field_map_ |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, null_value_), |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, number_value_), |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, string_value_), |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, bool_value_), |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, struct_value_), |
| offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, list_value_), |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_), |
| ~0u, // no _has_bits_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_), |
| ~0u, // no _extensions_ |
| ~0u, // no _oneof_case_ |
| ~0u, // no _weak_field_map_ |
| PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_), |
| }; |
| static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| { 0, 7, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)}, |
| { 9, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)}, |
| { 15, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)}, |
| { 27, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)}, |
| }; |
| |
| static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_), |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_), |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_), |
| reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_), |
| }; |
| |
| const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] = |
| "\n\034google/protobuf/struct.proto\022\017google.p" |
| "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo" |
| "gle.protobuf.Struct.FieldsEntry\032E\n\013Field" |
| "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo" |
| "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull" |
| "_value\030\001 \001(\0162\032.google.protobuf.NullValue" |
| "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_val" |
| "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n\014stru" |
| "ct_value\030\005 \001(\0132\027.google.protobuf.StructH" |
| "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf." |
| "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu" |
| "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull" |
| "Value\022\016\n\nNULL_VALUE\020\000B\201\001\n\023com.google.pro" |
| "tobufB\013StructProtoP\001Z1github.com/golang/" |
| "protobuf/ptypes/struct;structpb\370\001\001\242\002\003GPB" |
| "\252\002\036Google.Protobuf.WellKnownTypesb\006proto" |
| "3" |
| ; |
| static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once; |
| static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = { |
| false, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", 641, |
| &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once, AddDescriptors_google_2fprotobuf_2fstruct_2eproto, schemas, |
| file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets, |
| file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto, |
| }; |
| |
| void AddDescriptors_google_2fprotobuf_2fstruct_2eproto() { |
| static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = |
| { |
| }; |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto, deps, 0); |
| } |
| |
| // Force running AddDescriptors() at dynamic initialization time. |
| static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = []() { AddDescriptors_google_2fprotobuf_2fstruct_2eproto(); return true; }(); |
| PROTOBUF_NAMESPACE_OPEN |
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto); |
| return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0]; |
| } |
| bool NullValue_IsValid(int value) { |
| switch (value) { |
| case 0: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| |
| // =================================================================== |
| |
| Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {} |
| Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
| : SuperType(arena) {} |
| void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) { |
| MergeFromInternal(other); |
| } |
| ::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const { |
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto); |
| return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0]; |
| } |
| void Struct_FieldsEntry_DoNotUse::MergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
| ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
| } |
| |
| |
| // =================================================================== |
| |
| void Struct::InitAsDefaultInstance() { |
| } |
| class Struct::HasBitSetters { |
| public: |
| }; |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Struct::kFieldsFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Struct::Struct() |
| : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:google.protobuf.Struct) |
| } |
| Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(arena), |
| fields_(arena) { |
| SharedCtor(); |
| RegisterArenaDtor(arena); |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct) |
| } |
| Struct::Struct(const Struct& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(nullptr) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| fields_.MergeFrom(from.fields_); |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct) |
| } |
| |
| void Struct::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( |
| &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| } |
| |
| Struct::~Struct() { |
| // @@protoc_insertion_point(destructor:google.protobuf.Struct) |
| SharedDtor(); |
| } |
| |
| void Struct::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
| } |
| |
| void Struct::ArenaDtor(void* object) { |
| Struct* _this = reinterpret_cast< Struct* >(object); |
| (void)_this; |
| } |
| void Struct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void Struct::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const Struct& Struct::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void Struct::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| fields_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // map<string, .google.protobuf.Value> fields = 1; |
| case 1: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; |
| while (true) { |
| ptr = ctx->ParseMessage(&fields_, ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| if (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) != 10) break; |
| ptr += 1; |
| } |
| break; |
| } |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| break; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| bool Struct::MergePartialFromCodedStream( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| // @@protoc_insertion_point(parse_start:google.protobuf.Struct) |
| for (;;) { |
| ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // map<string, .google.protobuf.Value> fields = 1; |
| case 1: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
| Struct_FieldsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
| Struct_FieldsEntry_DoNotUse, |
| std::string, PROTOBUF_NAMESPACE_ID::Value, |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
| 0 >, |
| ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value > > parser(&fields_); |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, &parser)); |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| parser.key().data(), static_cast<int>(parser.key().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
| "google.protobuf.Struct.FieldsEntry.key")); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0) { |
| goto success; |
| } |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
| input, tag, _internal_metadata_.mutable_unknown_fields())); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:google.protobuf.Struct) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:google.protobuf.Struct) |
| return false; |
| #undef DO_ |
| } |
| #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| |
| void Struct::SerializeWithCachedSizes( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:google.protobuf.Struct) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // map<string, .google.protobuf.Value> fields = 1; |
| if (!this->fields().empty()) { |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer |
| ConstPtr; |
| typedef ConstPtr SortItem; |
| typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
| struct Utf8Check { |
| static void Check(ConstPtr p) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| p->first.data(), static_cast<int>(p->first.length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Struct.FieldsEntry.key"); |
| } |
| }; |
| |
| if (output->IsSerializationDeterministic() && |
| this->fields().size() > 1) { |
| ::std::unique_ptr<SortItem[]> items( |
| new SortItem[this->fields().size()]); |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; |
| size_type n = 0; |
| for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
| it = this->fields().begin(); |
| it != this->fields().end(); ++it, ++n) { |
| items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
| } |
| ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
| for (size_type i = 0; i < n; i++) { |
| Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second); |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); |
| Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
| } |
| } else { |
| for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
| it = this->fields().begin(); |
| it != this->fields().end(); ++it) { |
| Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); |
| Utf8Check::Check(&(*it)); |
| } |
| } |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
| _internal_metadata_.unknown_fields(), output); |
| } |
| // @@protoc_insertion_point(serialize_end:google.protobuf.Struct) |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* Struct::InternalSerializeWithCachedSizesToArray( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // map<string, .google.protobuf.Value> fields = 1; |
| if (!this->fields().empty()) { |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer |
| ConstPtr; |
| typedef ConstPtr SortItem; |
| typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
| struct Utf8Check { |
| static void Check(ConstPtr p) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| p->first.data(), static_cast<int>(p->first.length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Struct.FieldsEntry.key"); |
| } |
| }; |
| |
| if (false && |
| this->fields().size() > 1) { |
| ::std::unique_ptr<SortItem[]> items( |
| new SortItem[this->fields().size()]); |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; |
| size_type n = 0; |
| for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
| it = this->fields().begin(); |
| it != this->fields().end(); ++it, ++n) { |
| items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
| } |
| ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
| for (size_type i = 0; i < n; i++) { |
| Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); |
| Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
| } |
| } else { |
| for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
| it = this->fields().begin(); |
| it != this->fields().end(); ++it) { |
| Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); |
| Utf8Check::Check(&(*it)); |
| } |
| } |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields(), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) |
| return target; |
| } |
| |
| size_t Struct::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct) |
| size_t total_size = 0; |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
| _internal_metadata_.unknown_fields()); |
| } |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // map<string, .google.protobuf.Value> fields = 1; |
| total_size += 1 * |
| ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->fields_size()); |
| for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator |
| it = this->fields().begin(); |
| it != this->fields().end(); ++it) { |
| Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); |
| total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| MessageSizeNoVirtual(entry); |
| } |
| |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void Struct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Struct) |
| GOOGLE_DCHECK_NE(&from, this); |
| const Struct* source = |
| ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Struct>( |
| &from); |
| if (source == nullptr) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Struct) |
| ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Struct) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Struct::MergeFrom(const Struct& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| fields_.MergeFrom(from.fields_); |
| } |
| |
| void Struct::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Struct) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Struct::CopyFrom(const Struct& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Struct::IsInitialized() const { |
| return true; |
| } |
| |
| void Struct::Swap(Struct* other) { |
| if (other == this) return; |
| if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { |
| InternalSwap(other); |
| } else { |
| Struct* temp = New(GetArenaNoVirtual()); |
| temp->MergeFrom(*other); |
| other->CopyFrom(*this); |
| InternalSwap(temp); |
| if (GetArenaNoVirtual() == nullptr) { |
| delete temp; |
| } |
| } |
| } |
| void Struct::UnsafeArenaSwap(Struct* other) { |
| if (other == this) return; |
| GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); |
| InternalSwap(other); |
| } |
| void Struct::InternalSwap(Struct* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| fields_.Swap(&other->fields_); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const { |
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto); |
| return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; |
| } |
| |
| |
| // =================================================================== |
| |
| void Value::InitAsDefaultInstance() { |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.null_value_ = 0; |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.number_value_ = 0; |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.string_value_.UnsafeSetDefault( |
| &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.bool_value_ = false; |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.struct_value_ = const_cast< PROTOBUF_NAMESPACE_ID::Struct*>( |
| PROTOBUF_NAMESPACE_ID::Struct::internal_default_instance()); |
| PROTOBUF_NAMESPACE_ID::_Value_default_instance_.list_value_ = const_cast< PROTOBUF_NAMESPACE_ID::ListValue*>( |
| PROTOBUF_NAMESPACE_ID::ListValue::internal_default_instance()); |
| } |
| class Value::HasBitSetters { |
| public: |
| static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg); |
| static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg); |
| }; |
| |
| const PROTOBUF_NAMESPACE_ID::Struct& |
| Value::HasBitSetters::struct_value(const Value* msg) { |
| return *msg->kind_.struct_value_; |
| } |
| const PROTOBUF_NAMESPACE_ID::ListValue& |
| Value::HasBitSetters::list_value(const Value* msg) { |
| return *msg->kind_.list_value_; |
| } |
| void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) { |
| ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
| clear_kind(); |
| if (struct_value) { |
| ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
| ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(struct_value); |
| if (message_arena != submessage_arena) { |
| struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
| message_arena, struct_value, submessage_arena); |
| } |
| set_has_struct_value(); |
| kind_.struct_value_ = struct_value; |
| } |
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value) |
| } |
| void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) { |
| ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
| clear_kind(); |
| if (list_value) { |
| ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
| ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(list_value); |
| if (message_arena != submessage_arena) { |
| list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
| message_arena, list_value, submessage_arena); |
| } |
| set_has_list_value(); |
| kind_.list_value_ = list_value; |
| } |
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value) |
| } |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int Value::kNullValueFieldNumber; |
| const int Value::kNumberValueFieldNumber; |
| const int Value::kStringValueFieldNumber; |
| const int Value::kBoolValueFieldNumber; |
| const int Value::kStructValueFieldNumber; |
| const int Value::kListValueFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| Value::Value() |
| : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:google.protobuf.Value) |
| } |
| Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(arena) { |
| SharedCtor(); |
| RegisterArenaDtor(arena); |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.Value) |
| } |
| Value::Value(const Value& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(nullptr) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| clear_has_kind(); |
| switch (from.kind_case()) { |
| case kNullValue: { |
| set_null_value(from.null_value()); |
| break; |
| } |
| case kNumberValue: { |
| set_number_value(from.number_value()); |
| break; |
| } |
| case kStringValue: { |
| set_string_value(from.string_value()); |
| break; |
| } |
| case kBoolValue: { |
| set_bool_value(from.bool_value()); |
| break; |
| } |
| case kStructValue: { |
| mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); |
| break; |
| } |
| case kListValue: { |
| mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); |
| break; |
| } |
| case KIND_NOT_SET: { |
| break; |
| } |
| } |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Value) |
| } |
| |
| void Value::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( |
| &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| clear_has_kind(); |
| } |
| |
| Value::~Value() { |
| // @@protoc_insertion_point(destructor:google.protobuf.Value) |
| SharedDtor(); |
| } |
| |
| void Value::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
| if (has_kind()) { |
| clear_kind(); |
| } |
| } |
| |
| void Value::ArenaDtor(void* object) { |
| Value* _this = reinterpret_cast< Value* >(object); |
| (void)_this; |
| } |
| void Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void Value::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const Value& Value::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void Value::clear_kind() { |
| // @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value) |
| switch (kind_case()) { |
| case kNullValue: { |
| // No need to clear |
| break; |
| } |
| case kNumberValue: { |
| // No need to clear |
| break; |
| } |
| case kStringValue: { |
| kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| GetArenaNoVirtual()); |
| break; |
| } |
| case kBoolValue: { |
| // No need to clear |
| break; |
| } |
| case kStructValue: { |
| if (GetArenaNoVirtual() == nullptr) { |
| delete kind_.struct_value_; |
| } |
| break; |
| } |
| case kListValue: { |
| if (GetArenaNoVirtual() == nullptr) { |
| delete kind_.list_value_; |
| } |
| break; |
| } |
| case KIND_NOT_SET: { |
| break; |
| } |
| } |
| _oneof_case_[0] = KIND_NOT_SET; |
| } |
| |
| |
| void Value::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Value) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| clear_kind(); |
| _internal_metadata_.Clear(); |
| } |
| |
| #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // .google.protobuf.NullValue null_value = 1; |
| case 1: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; |
| ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
| CHK_(ptr); |
| set_null_value(static_cast<PROTOBUF_NAMESPACE_ID::NullValue>(val)); |
| break; |
| } |
| // double number_value = 2; |
| case 2: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 17) goto handle_unusual; |
| set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); |
| ptr += sizeof(double); |
| break; |
| } |
| // string string_value = 3; |
| case 3: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "google.protobuf.Value.string_value"); |
| CHK_(ptr); |
| break; |
| } |
| // bool bool_value = 4; |
| case 4: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 32) goto handle_unusual; |
| set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
| CHK_(ptr); |
| break; |
| } |
| // .google.protobuf.Struct struct_value = 5; |
| case 5: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; |
| ptr = ctx->ParseMessage(mutable_struct_value(), ptr); |
| CHK_(ptr); |
| break; |
| } |
| // .google.protobuf.ListValue list_value = 6; |
| case 6: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; |
| ptr = ctx->ParseMessage(mutable_list_value(), ptr); |
| CHK_(ptr); |
| break; |
| } |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| break; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| bool Value::MergePartialFromCodedStream( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| // @@protoc_insertion_point(parse_start:google.protobuf.Value) |
| for (;;) { |
| ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // .google.protobuf.NullValue null_value = 1; |
| case 1: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
| int value = 0; |
| DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
| int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| set_null_value(static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(value)); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| // double number_value = 2; |
| case 2: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) { |
| clear_kind(); |
| DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
| double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &kind_.number_value_))); |
| set_has_number_value(); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| // string string_value = 3; |
| case 3: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
| input, this->mutable_string_value())); |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->string_value().data(), static_cast<int>(this->string_value().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
| "google.protobuf.Value.string_value")); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| // bool bool_value = 4; |
| case 4: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
| clear_kind(); |
| DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
| bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
| input, &kind_.bool_value_))); |
| set_has_bool_value(); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| // .google.protobuf.Struct struct_value = 5; |
| case 5: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
| input, mutable_struct_value())); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| // .google.protobuf.ListValue list_value = 6; |
| case 6: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
| input, mutable_list_value())); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0) { |
| goto success; |
| } |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
| input, tag, _internal_metadata_.mutable_unknown_fields())); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:google.protobuf.Value) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:google.protobuf.Value) |
| return false; |
| #undef DO_ |
| } |
| #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| |
| void Value::SerializeWithCachedSizes( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:google.protobuf.Value) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // .google.protobuf.NullValue null_value = 1; |
| if (has_null_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
| 1, this->null_value(), output); |
| } |
| |
| // double number_value = 2; |
| if (has_number_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->number_value(), output); |
| } |
| |
| // string string_value = 3; |
| if (has_string_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->string_value().data(), static_cast<int>(this->string_value().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Value.string_value"); |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3, this->string_value(), output); |
| } |
| |
| // bool bool_value = 4; |
| if (has_bool_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->bool_value(), output); |
| } |
| |
| // .google.protobuf.Struct struct_value = 5; |
| if (has_struct_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 5, HasBitSetters::struct_value(this), output); |
| } |
| |
| // .google.protobuf.ListValue list_value = 6; |
| if (has_list_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6, HasBitSetters::list_value(this), output); |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
| _internal_metadata_.unknown_fields(), output); |
| } |
| // @@protoc_insertion_point(serialize_end:google.protobuf.Value) |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* Value::InternalSerializeWithCachedSizesToArray( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // .google.protobuf.NullValue null_value = 1; |
| if (has_null_value()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
| 1, this->null_value(), target); |
| } |
| |
| // double number_value = 2; |
| if (has_number_value()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target); |
| } |
| |
| // string string_value = 3; |
| if (has_string_value()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
| this->string_value().data(), static_cast<int>(this->string_value().length()), |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
| "google.protobuf.Value.string_value"); |
| target = |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
| 3, this->string_value(), target); |
| } |
| |
| // bool bool_value = 4; |
| if (has_bool_value()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target); |
| } |
| |
| // .google.protobuf.Struct struct_value = 5; |
| if (has_struct_value()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessageToArray( |
| 5, HasBitSetters::struct_value(this), target); |
| } |
| |
| // .google.protobuf.ListValue list_value = 6; |
| if (has_list_value()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessageToArray( |
| 6, HasBitSetters::list_value(this), target); |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields(), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) |
| return target; |
| } |
| |
| size_t Value::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value) |
| size_t total_size = 0; |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
| _internal_metadata_.unknown_fields()); |
| } |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| switch (kind_case()) { |
| // .google.protobuf.NullValue null_value = 1; |
| case kNullValue: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->null_value()); |
| break; |
| } |
| // double number_value = 2; |
| case kNumberValue: { |
| total_size += 1 + 8; |
| break; |
| } |
| // string string_value = 3; |
| case kStringValue: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->string_value()); |
| break; |
| } |
| // bool bool_value = 4; |
| case kBoolValue: { |
| total_size += 1 + 1; |
| break; |
| } |
| // .google.protobuf.Struct struct_value = 5; |
| case kStructValue: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| *kind_.struct_value_); |
| break; |
| } |
| // .google.protobuf.ListValue list_value = 6; |
| case kListValue: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| *kind_.list_value_); |
| break; |
| } |
| case KIND_NOT_SET: { |
| break; |
| } |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Value) |
| GOOGLE_DCHECK_NE(&from, this); |
| const Value* source = |
| ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Value>( |
| &from); |
| if (source == nullptr) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Value) |
| ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Value) |
| MergeFrom(*source); |
| } |
| } |
| |
| void Value::MergeFrom(const Value& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| switch (from.kind_case()) { |
| case kNullValue: { |
| set_null_value(from.null_value()); |
| break; |
| } |
| case kNumberValue: { |
| set_number_value(from.number_value()); |
| break; |
| } |
| case kStringValue: { |
| set_string_value(from.string_value()); |
| break; |
| } |
| case kBoolValue: { |
| set_bool_value(from.bool_value()); |
| break; |
| } |
| case kStructValue: { |
| mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); |
| break; |
| } |
| case kListValue: { |
| mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); |
| break; |
| } |
| case KIND_NOT_SET: { |
| break; |
| } |
| } |
| } |
| |
| void Value::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Value) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void Value::CopyFrom(const Value& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool Value::IsInitialized() const { |
| return true; |
| } |
| |
| void Value::Swap(Value* other) { |
| if (other == this) return; |
| if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { |
| InternalSwap(other); |
| } else { |
| Value* temp = New(GetArenaNoVirtual()); |
| temp->MergeFrom(*other); |
| other->CopyFrom(*this); |
| InternalSwap(temp); |
| if (GetArenaNoVirtual() == nullptr) { |
| delete temp; |
| } |
| } |
| } |
| void Value::UnsafeArenaSwap(Value* other) { |
| if (other == this) return; |
| GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); |
| InternalSwap(other); |
| } |
| void Value::InternalSwap(Value* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(kind_, other->kind_); |
| swap(_oneof_case_[0], other->_oneof_case_[0]); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const { |
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto); |
| return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; |
| } |
| |
| |
| // =================================================================== |
| |
| void ListValue::InitAsDefaultInstance() { |
| } |
| class ListValue::HasBitSetters { |
| public: |
| }; |
| |
| #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| const int ListValue::kValuesFieldNumber; |
| #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| |
| ListValue::ListValue() |
| : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:google.protobuf.ListValue) |
| } |
| ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(arena), |
| values_(arena) { |
| SharedCtor(); |
| RegisterArenaDtor(arena); |
| // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue) |
| } |
| ListValue::ListValue(const ListValue& from) |
| : ::PROTOBUF_NAMESPACE_ID::Message(), |
| _internal_metadata_(nullptr), |
| values_(from.values_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue) |
| } |
| |
| void ListValue::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( |
| &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| } |
| |
| ListValue::~ListValue() { |
| // @@protoc_insertion_point(destructor:google.protobuf.ListValue) |
| SharedDtor(); |
| } |
| |
| void ListValue::SharedDtor() { |
| GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
| } |
| |
| void ListValue::ArenaDtor(void* object) { |
| ListValue* _this = reinterpret_cast< ListValue* >(object); |
| (void)_this; |
| } |
| void ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
| } |
| void ListValue::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const ListValue& ListValue::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void ListValue::Clear() { |
| // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| values_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // repeated .google.protobuf.Value values = 1; |
| case 1: { |
| if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; |
| while (true) { |
| ptr = ctx->ParseMessage(add_values(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| if (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) != 10) break; |
| ptr += 1; |
| } |
| break; |
| } |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| break; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| bool ListValue::MergePartialFromCodedStream( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| // @@protoc_insertion_point(parse_start:google.protobuf.ListValue) |
| for (;;) { |
| ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // repeated .google.protobuf.Value values = 1; |
| case 1: { |
| if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
| input, add_values())); |
| } else { |
| goto handle_unusual; |
| } |
| break; |
| } |
| |
| default: { |
| handle_unusual: |
| if (tag == 0) { |
| goto success; |
| } |
| DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
| input, tag, _internal_metadata_.mutable_unknown_fields())); |
| break; |
| } |
| } |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:google.protobuf.ListValue) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:google.protobuf.ListValue) |
| return false; |
| #undef DO_ |
| } |
| #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| |
| void ListValue::SerializeWithCachedSizes( |
| ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:google.protobuf.ListValue) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // repeated .google.protobuf.Value values = 1; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 1, |
| this->values(static_cast<int>(i)), |
| output); |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
| _internal_metadata_.unknown_fields(), output); |
| } |
| // @@protoc_insertion_point(serialize_end:google.protobuf.ListValue) |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* ListValue::InternalSerializeWithCachedSizesToArray( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // repeated .google.protobuf.Value values = 1; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->values_size()); i < n; i++) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessageToArray( |
| 1, this->values(static_cast<int>(i)), target); |
| } |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
| _internal_metadata_.unknown_fields(), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) |
| return target; |
| } |
| |
| size_t ListValue::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue) |
| size_t total_size = 0; |
| |
| if (_internal_metadata_.have_unknown_fields()) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
| _internal_metadata_.unknown_fields()); |
| } |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // repeated .google.protobuf.Value values = 1; |
| { |
| unsigned int count = static_cast<unsigned int>(this->values_size()); |
| total_size += 1UL * count; |
| for (unsigned int i = 0; i < count; i++) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
| this->values(static_cast<int>(i))); |
| } |
| } |
| |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void ListValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ListValue) |
| GOOGLE_DCHECK_NE(&from, this); |
| const ListValue* source = |
| ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListValue>( |
| &from); |
| if (source == nullptr) { |
| // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ListValue) |
| ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
| } else { |
| // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ListValue) |
| MergeFrom(*source); |
| } |
| } |
| |
| void ListValue::MergeFrom(const ListValue& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| values_.MergeFrom(from.values_); |
| } |
| |
| void ListValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
| // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ListValue) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void ListValue::CopyFrom(const ListValue& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool ListValue::IsInitialized() const { |
| return true; |
| } |
| |
| void ListValue::Swap(ListValue* other) { |
| if (other == this) return; |
| if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { |
| InternalSwap(other); |
| } else { |
| ListValue* temp = New(GetArenaNoVirtual()); |
| temp->MergeFrom(*other); |
| other->CopyFrom(*this); |
| InternalSwap(temp); |
| if (GetArenaNoVirtual() == nullptr) { |
| delete temp; |
| } |
| } |
| } |
| void ListValue::UnsafeArenaSwap(ListValue* other) { |
| if (other == this) return; |
| GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); |
| InternalSwap(other); |
| } |
| void ListValue::InternalSwap(ListValue* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const { |
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fstruct_2eproto); |
| return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; |
| } |
| |
| |
| // @@protoc_insertion_point(namespace_scope) |
| PROTOBUF_NAMESPACE_CLOSE |
| PROTOBUF_NAMESPACE_OPEN |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena); |
| } |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct >(arena); |
| } |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Value >(arena); |
| } |
| template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) { |
| return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ListValue >(arena); |
| } |
| PROTOBUF_NAMESPACE_CLOSE |
| |
| // @@protoc_insertion_point(global_scope) |
| #include <google/protobuf/port_undef.inc> |