Auto-generate files after cl/528634293

pull/12630/head
Protobuf Team Bot 2 years ago
parent 80b0609666
commit b05012cccb
  1. 48
      src/google/protobuf/struct.pb.cc
  2. 35
      src/google/protobuf/struct.pb.h

@ -33,7 +33,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR Struct::Struct(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.fields_)*/{}
/* decltype(_impl_.fields_) */ {}
, /*decltype(_impl_._cached_size_)*/{}} {}
struct StructDefaultTypeInternal {
PROTOBUF_CONSTEXPR StructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
@ -237,7 +237,7 @@ Struct::Struct(const Struct& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
Struct* const _this = this; (void)_this;
new (&_impl_) Impl_{
/*decltype(_impl_.fields_)*/{}
/* decltype(_impl_.fields_) */ {}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@ -248,7 +248,8 @@ Struct::Struct(const Struct& from)
inline void Struct::SharedCtor(::_pb::Arena* arena) {
(void)arena;
new (&_impl_) Impl_{
/*decltype(_impl_.fields_)*/{::_pbi::ArenaInitialized(), arena}
/* decltype(_impl_.fields_) */ { ::PROTOBUF_NAMESPACE_ID::internal::ArenaInitialized(), arena }
, /*decltype(_impl_._cached_size_)*/{}
};
}
@ -331,26 +332,26 @@ failure:
(void) cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
if (!this->_internal_fields().empty()) {
using MapType = ::_pb::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>;
if (!_internal_fields().empty()) {
using MapType = ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>;
using WireHelper = Struct_FieldsEntry_DoNotUse::Funcs;
const auto& map_field = this->_internal_fields();
auto check_utf8 = [](const MapType::value_type& entry) {
(void)entry;
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
const auto& field = _internal_fields();
if (stream->IsSerializationDeterministic() && field.size() > 1) {
for (const auto& entry : ::PROTOBUF_NAMESPACE_ID::internal::MapSorterPtr<MapType>(field)) {
target = WireHelper::InternalSerialize(
1, entry.first, entry.second, target, stream);
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields");
};
if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
check_utf8(entry);
}
} else {
for (const auto& entry : map_field) {
target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
check_utf8(entry);
for (const auto& entry : field) {
target = WireHelper::InternalSerialize(
1, entry.first, entry.second, target, stream);
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields");
}
}
}
@ -372,12 +373,9 @@ failure:
(void) cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator
it = this->_internal_fields().begin();
it != this->_internal_fields().end(); ++it) {
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_fields_size());
for (const auto& entry : _internal_fields()) {
total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(entry.first, entry.second);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);

@ -277,16 +277,14 @@ class PROTOBUF_EXPORT Struct final :
public:
void clear_fields() ;
const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>& fields() const;
::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>* mutable_fields();
private:
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
_internal_fields() const;
::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
_internal_mutable_fields();
const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>& _internal_fields() const;
::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>* _internal_mutable_fields();
public:
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
fields() const;
::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
mutable_fields();
// @@protoc_insertion_point(class_scope:google.protobuf.Struct)
private:
class _Internal;
@ -295,11 +293,10 @@ class PROTOBUF_EXPORT Struct final :
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::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> fields_;
::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>
fields_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
@ -765,21 +762,17 @@ inline int Struct::fields_size() const {
inline void Struct::clear_fields() {
_impl_.fields_.Clear();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
Struct::_internal_fields() const {
inline const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>& Struct::_internal_fields() const {
return _impl_.fields_.GetMap();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >&
Struct::fields() const {
inline const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>& Struct::fields() const {
// @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
return _internal_fields();
}
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
Struct::_internal_mutable_fields() {
inline ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>* Struct::_internal_mutable_fields() {
return _impl_.fields_.MutableMap();
}
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >*
Struct::mutable_fields() {
inline ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>* Struct::mutable_fields() {
// @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
return _internal_mutable_fields();
}

Loading…
Cancel
Save