aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/struct.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/struct.pb.cc')
-rw-r--r--src/google/protobuf/struct.pb.cc1063
1 files changed, 366 insertions, 697 deletions
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index a1aa51ec..8f2d4848 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -1,28 +1,43 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/struct.proto
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include <google/protobuf/struct.pb.h>
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
// @@protoc_insertion_point(includes)
+namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue;
+} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
namespace google {
namespace protobuf {
-class StructDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct> {
+class Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Struct_FieldsEntry_DoNotUse>
+ _instance;
+} _Struct_FieldsEntry_DoNotUse_default_instance_;
+class StructDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Struct>
+ _instance;
} _Struct_default_instance_;
-class ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Value> {
- public:
+class ValueDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Value>
+ _instance;
int null_value_;
double number_value_;
::google::protobuf::internal::ArenaStringPtr string_value_;
@@ -30,122 +45,122 @@ class ValueDefaultTypeInternal : public ::google::protobuf::internal::Explicitly
const ::google::protobuf::Struct* struct_value_;
const ::google::protobuf::ListValue* list_value_;
} _Value_default_instance_;
-class ListValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ListValue> {
+class ListValueDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<ListValue>
+ _instance;
} _ListValue_default_instance_;
-
+} // namespace protobuf
+} // namespace google
namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
+static void InitDefaultsListValue() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ {
+ void* ptr = &::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_;
+ new (ptr) ::google::protobuf::Struct_FieldsEntry_DoNotUse();
+ }
+ {
+ void* ptr = &::google::protobuf::_Struct_default_instance_;
+ new (ptr) ::google::protobuf::Struct();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ {
+ void* ptr = &::google::protobuf::_Value_default_instance_;
+ new (ptr) ::google::protobuf::Value();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ {
+ void* ptr = &::google::protobuf::_ListValue_default_instance_;
+ new (ptr) ::google::protobuf::ListValue();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::google::protobuf::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance();
+ ::google::protobuf::Struct::InitAsDefaultInstance();
+ ::google::protobuf::Value::InitAsDefaultInstance();
+ ::google::protobuf::ListValue::InitAsDefaultInstance();
+}
+LIBPROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue =
+ {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListValue}, {}};
-namespace {
+void InitDefaults() {
+ ::google::protobuf::internal::InitSCC(&scc_info_ListValue.base);
+}
::google::protobuf::Metadata file_level_metadata[4];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
-} // namespace
-
-const ::google::protobuf::uint32 TableStruct::offsets[] = {
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _has_bits_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, key_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, value_),
+ 0,
+ 1,
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, _internal_metadata_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, fields_),
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct, fields_),
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, _internal_metadata_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, _internal_metadata_),
~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, _oneof_case_[0]),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), null_value_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), number_value_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), string_value_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), bool_value_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), struct_value_),
- PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&_Value_default_instance_), list_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, kind_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, _oneof_case_[0]),
+ ~0u, // no _weak_field_map_
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, null_value_),
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, number_value_),
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, string_value_),
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, bool_value_),
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, struct_value_),
+ offsetof(::google::protobuf::ValueDefaultTypeInternal, list_value_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, kind_),
~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, _internal_metadata_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::ListValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, values_),
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::ListValue, values_),
};
-
-static const ::google::protobuf::internal::MigrationSchema schemas[] = {
- { 0, -1, sizeof(Struct)},
- { 5, -1, sizeof(Value)},
- { 16, -1, sizeof(ListValue)},
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { 0, 7, sizeof(::google::protobuf::Struct_FieldsEntry_DoNotUse)},
+ { 9, -1, sizeof(::google::protobuf::Struct)},
+ { 15, -1, sizeof(::google::protobuf::Value)},
+ { 27, -1, sizeof(::google::protobuf::ListValue)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&_Struct_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&_Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&_ListValue_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Struct_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Value_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_ListValue_default_instance_),
};
-namespace {
-
void protobuf_AssignDescriptors() {
AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
- "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+ "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets,
file_level_metadata, file_level_enum_descriptors, NULL);
}
void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+ static ::google::protobuf::internal::once_flag once;
+ ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
- const ::google::protobuf::Descriptor* Struct_FieldsEntry_descriptor = protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0].descriptor;
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- Struct_FieldsEntry_descriptor,
- ::google::protobuf::internal::MapEntry<
- ::std::string,
- ::google::protobuf::Value,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0>::CreateDefaultInstance(
- Struct_FieldsEntry_descriptor));
-}
-
-} // namespace
-
-void TableStruct::Shutdown() {
- _Struct_default_instance_.Shutdown();
- delete file_level_metadata[1].reflection;
- _Value_default_instance_.Shutdown();
- delete file_level_metadata[2].reflection;
- _ListValue_default_instance_.Shutdown();
- delete file_level_metadata[3].reflection;
-}
-
-void TableStruct::InitDefaultsImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- ::google::protobuf::internal::InitProtobufDefaults();
- _Struct_default_instance_.DefaultConstruct();
- _Value_default_instance_.DefaultConstruct();
- _ListValue_default_instance_.DefaultConstruct();
- _Value_default_instance_.null_value_ = 0;
- _Value_default_instance_.number_value_ = 0;
- _Value_default_instance_.string_value_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _Value_default_instance_.bool_value_ = false;
- _Value_default_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>(
- ::google::protobuf::Struct::internal_default_instance());
- _Value_default_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>(
- ::google::protobuf::ListValue::internal_default_instance());
}
-void InitDefaults() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
-}
void AddDescriptorsImpl() {
InitDefaults();
- static const char descriptor[] = {
+ static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\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"
@@ -168,22 +183,21 @@ void AddDescriptorsImpl() {
descriptor, 641);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/struct.proto", &protobuf_RegisterTypes);
- ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}
void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+ static ::google::protobuf::internal::once_flag once;
+ ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
-// Force AddDescriptors() to be called at static initialization time.
+// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
-
} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
-
+namespace google {
+namespace protobuf {
const ::google::protobuf::EnumDescriptor* NullValue_descriptor() {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_enum_descriptors[0];
@@ -200,20 +214,33 @@ bool NullValue_IsValid(int value) {
// ===================================================================
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
+Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
+Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
+void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
+ MergeFromInternal(other);
+}
+::google::protobuf::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0];
+}
+void Struct_FieldsEntry_DoNotUse::MergeFrom(
+ const ::google::protobuf::Message& other) {
+ ::google::protobuf::Message::MergeFrom(other);
+}
+
// ===================================================================
+void Struct::InitAsDefaultInstance() {
+}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Struct::kFieldsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Struct::Struct()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Struct)
}
@@ -221,34 +248,20 @@ Struct::Struct(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
fields_(arena) {
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
-#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
}
Struct::Struct(const Struct& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
+ _internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
- const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0].descriptor;
- fields_.SetAssignDescriptorCallback(
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce);
- fields_.SetEntryDescriptor(
- &Struct_FieldsEntry_descriptor);
fields_.MergeFrom(from.fields_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
void Struct::SharedCtor() {
- const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0].descriptor;
- fields_.SetAssignDescriptorCallback(
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce);
- fields_.SetEntryDescriptor(
- &Struct_FieldsEntry_descriptor);
- _cached_size_ = 0;
}
Struct::~Struct() {
@@ -257,11 +270,7 @@ Struct::~Struct() {
}
void Struct::SharedDtor() {
- ::google::protobuf::Arena* arena = GetArenaNoVirtual();
- if (arena != NULL) {
- return;
- }
-
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}
void Struct::ArenaDtor(void* object) {
@@ -271,27 +280,27 @@ void Struct::ArenaDtor(void* object) {
void Struct::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Struct::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Struct::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[1].descriptor;
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Struct& Struct::default_instance() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-Struct* Struct::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Struct>(arena);
-}
void Struct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
fields_.Clear();
+ _internal_metadata_.Clear();
}
bool Struct::MergePartialFromCodedStream(
@@ -300,16 +309,16 @@ bool Struct::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Struct)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// map<string, .google.protobuf.Value> fields = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u)) {
- DO_(input->IncrementRecursionDepth());
- Struct_FieldsEntry::Parser< ::google::protobuf::internal::MapField<
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+ Struct_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
+ Struct_FieldsEntry_DoNotUse,
::std::string, ::google::protobuf::Value,
::google::protobuf::internal::WireFormatLite::TYPE_STRING,
::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
@@ -318,24 +327,22 @@ bool Struct::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, &parser));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- parser.key().data(), parser.key().length(),
+ parser.key().data(), static_cast<int>(parser.key().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Struct.FieldsEntry.key"));
} else {
goto handle_unusual;
}
- input->UnsafeDecrementRecursionDepth();
break;
}
default: {
handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ if (tag == 0) {
goto success;
}
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
@@ -352,6 +359,9 @@ failure:
void Struct::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.protobuf.Struct)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// map<string, .google.protobuf.Value> fields = 1;
if (!this->fields().empty()) {
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
@@ -361,7 +371,7 @@ void Struct::SerializeWithCachedSizes(
struct Utf8Check {
static void Check(ConstPtr p) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), p->first.length(),
+ p->first.data(), static_cast<int>(p->first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
}
@@ -369,29 +379,29 @@ void Struct::SerializeWithCachedSizes(
if (output->IsSerializationDeterministic() &&
this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
+ ::std::unique_ptr<SortItem[]> items(
new SortItem[this->fields().size()]);
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
size_type n = 0;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it, ++n) {
- items[n] = SortItem(&*it);
+ items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
- ::std::sort(&items[0], &items[n], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
- items[i]->first, items[i]->second));
+ items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *entry, output);
if (entry->GetArena() != NULL) {
entry.release();
}
- Utf8Check::Check(items[i]);
+ Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -407,13 +417,20 @@ void Struct::SerializeWithCachedSizes(
}
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
// @@protoc_insertion_point(serialize_end:google.protobuf.Struct)
}
::google::protobuf::uint8* Struct::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+ (void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// map<string, .google.protobuf.Value> fields = 1;
if (!this->fields().empty()) {
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
@@ -423,7 +440,7 @@ void Struct::SerializeWithCachedSizes(
struct Utf8Check {
static void Check(ConstPtr p) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), p->first.length(),
+ p->first.data(), static_cast<int>(p->first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
}
@@ -431,20 +448,20 @@ void Struct::SerializeWithCachedSizes(
if (deterministic &&
this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
+ ::std::unique_ptr<SortItem[]> items(
new SortItem[this->fields().size()]);
typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
size_type n = 0;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it, ++n) {
- items[n] = SortItem(&*it);
+ items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
- ::std::sort(&items[0], &items[n], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
- items[i]->first, items[i]->second));
+ items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
1, *entry, deterministic, target);
@@ -452,10 +469,10 @@ void Struct::SerializeWithCachedSizes(
if (entry->GetArena() != NULL) {
entry.release();
}
- Utf8Check::Check(items[i]);
+ Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -473,6 +490,10 @@ void Struct::SerializeWithCachedSizes(
}
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
return target;
}
@@ -481,11 +502,16 @@ 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
// map<string, .google.protobuf.Value> fields = 1;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->fields_size());
{
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::std::unique_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it) {
@@ -502,9 +528,7 @@ size_t Struct::ByteSizeLong() const {
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -527,6 +551,9 @@ 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_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
fields_.MergeFrom(from.fields_);
}
@@ -568,40 +595,60 @@ void Struct::UnsafeArenaSwap(Struct* other) {
InternalSwap(other);
}
void Struct::InternalSwap(Struct* other) {
+ using std::swap;
fields_.Swap(&other->fields_);
- std::swap(_cached_size_, other->_cached_size_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata Struct::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[1];
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// Struct
-// map<string, .google.protobuf.Value> fields = 1;
-int Struct::fields_size() const {
- return fields_.size();
-}
-void Struct::clear_fields() {
- fields_.Clear();
+// ===================================================================
+
+void Value::InitAsDefaultInstance() {
+ ::google::protobuf::_Value_default_instance_.null_value_ = 0;
+ ::google::protobuf::_Value_default_instance_.number_value_ = 0;
+ ::google::protobuf::_Value_default_instance_.string_value_.UnsafeSetDefault(
+ &::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ ::google::protobuf::_Value_default_instance_.bool_value_ = false;
+ ::google::protobuf::_Value_default_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>(
+ ::google::protobuf::Struct::internal_default_instance());
+ ::google::protobuf::_Value_default_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>(
+ ::google::protobuf::ListValue::internal_default_instance());
}
- const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
-Struct::fields() const {
- // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
- return fields_.GetMap();
+void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_kind();
+ if (struct_value) {
+ ::google::protobuf::Arena* submessage_arena =
+ ::google::protobuf::Arena::GetArena(struct_value);
+ if (message_arena != submessage_arena) {
+ struct_value = ::google::protobuf::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)
}
- ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
-Struct::mutable_fields() {
- // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
- return fields_.MutableMap();
+void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_kind();
+ if (list_value) {
+ ::google::protobuf::Arena* submessage_arena =
+ ::google::protobuf::Arena::GetArena(list_value);
+ if (message_arena != submessage_arena) {
+ list_value = ::google::protobuf::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)
}
-
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// ===================================================================
-
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Value::kNullValueFieldNumber;
const int Value::kNumberValueFieldNumber;
@@ -613,26 +660,22 @@ const int Value::kListValueFieldNumber;
Value::Value()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Value)
}
Value::Value(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
-#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
}
Value::Value(const Value& from)
: ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
+ _internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
clear_has_kind();
switch (from.kind_case()) {
@@ -669,7 +712,6 @@ Value::Value(const Value& from)
void Value::SharedCtor() {
clear_has_kind();
- _cached_size_ = 0;
}
Value::~Value() {
@@ -678,11 +720,7 @@ Value::~Value() {
}
void Value::SharedDtor() {
- ::google::protobuf::Arena* arena = GetArenaNoVirtual();
- if (arena != NULL) {
- return;
- }
-
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
if (has_kind()) {
clear_kind();
}
@@ -695,23 +733,18 @@ void Value::ArenaDtor(void* object) {
void Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Value::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[2].descriptor;
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Value& Value::default_instance() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-Value* Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Value>(arena);
-}
void Value::clear_kind() {
// @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
@@ -755,7 +788,12 @@ void Value::clear_kind() {
void Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
clear_kind();
+ _internal_metadata_.Clear();
}
bool Value::MergePartialFromCodedStream(
@@ -764,14 +802,14 @@ bool Value::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.Value)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .google.protobuf.NullValue null_value = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u)) {
+ static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
@@ -786,7 +824,7 @@ bool Value::MergePartialFromCodedStream(
// double number_value = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(17u)) {
+ static_cast< ::google::protobuf::uint8>(17u /* 17 & 0xFF */)) {
clear_kind();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
@@ -801,11 +839,11 @@ bool Value::MergePartialFromCodedStream(
// string string_value = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u)) {
+ static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_string_value()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Value.string_value"));
} else {
@@ -817,7 +855,7 @@ bool Value::MergePartialFromCodedStream(
// bool bool_value = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u)) {
+ static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
clear_kind();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
@@ -832,8 +870,8 @@ bool Value::MergePartialFromCodedStream(
// .google.protobuf.Struct struct_value = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(42u)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_struct_value()));
} else {
goto handle_unusual;
@@ -844,8 +882,8 @@ bool Value::MergePartialFromCodedStream(
// .google.protobuf.ListValue list_value = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_list_value()));
} else {
goto handle_unusual;
@@ -855,12 +893,11 @@ bool Value::MergePartialFromCodedStream(
default: {
handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ if (tag == 0) {
goto success;
}
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
@@ -877,6 +914,9 @@ failure:
void Value::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.protobuf.Value)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// .google.protobuf.NullValue null_value = 1;
if (has_null_value()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
@@ -891,7 +931,7 @@ void Value::SerializeWithCachedSizes(
// string string_value = 3;
if (has_string_value()) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
@@ -906,22 +946,29 @@ void Value::SerializeWithCachedSizes(
// .google.protobuf.Struct struct_value = 5;
if (has_struct_value()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, *kind_.struct_value_, output);
+ 5, this->_internal_struct_value(), output);
}
// .google.protobuf.ListValue list_value = 6;
if (has_list_value()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, *kind_.list_value_, output);
+ 6, this->_internal_list_value(), output);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
// @@protoc_insertion_point(serialize_end:google.protobuf.Value)
}
::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+ (void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// .google.protobuf.NullValue null_value = 1;
if (has_null_value()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
@@ -936,7 +983,7 @@ void Value::SerializeWithCachedSizes(
// string string_value = 3;
if (has_string_value()) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value");
target =
@@ -952,17 +999,21 @@ void Value::SerializeWithCachedSizes(
// .google.protobuf.Struct struct_value = 5;
if (has_struct_value()) {
target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 5, *kind_.struct_value_, false, target);
+ InternalWriteMessageToArray(
+ 5, this->_internal_struct_value(), deterministic, target);
}
// .google.protobuf.ListValue list_value = 6;
if (has_list_value()) {
target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 6, *kind_.list_value_, false, target);
+ InternalWriteMessageToArray(
+ 6, this->_internal_list_value(), deterministic, target);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
return target;
}
@@ -971,6 +1022,11 @@ 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
switch (kind_case()) {
// .google.protobuf.NullValue null_value = 1;
case kNullValue: {
@@ -998,14 +1054,14 @@ size_t Value::ByteSizeLong() const {
// .google.protobuf.Struct struct_value = 5;
case kStructValue: {
total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
*kind_.struct_value_);
break;
}
// .google.protobuf.ListValue list_value = 6;
case kListValue: {
total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
*kind_.list_value_);
break;
}
@@ -1014,9 +1070,7 @@ size_t Value::ByteSizeLong() const {
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -1039,6 +1093,9 @@ 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_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
switch (from.kind_case()) {
case kNullValue: {
set_null_value(from.null_value());
@@ -1108,413 +1165,30 @@ void Value::UnsafeArenaSwap(Value* other) {
InternalSwap(other);
}
void Value::InternalSwap(Value* other) {
- std::swap(kind_, other->kind_);
- std::swap(_oneof_case_[0], other->_oneof_case_[0]);
- std::swap(_cached_size_, other->_cached_size_);
+ using std::swap;
+ swap(kind_, other->kind_);
+ swap(_oneof_case_[0], other->_oneof_case_[0]);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata Value::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[2];
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// Value
-
-// .google.protobuf.NullValue null_value = 1;
-bool Value::has_null_value() const {
- return kind_case() == kNullValue;
-}
-void Value::set_has_null_value() {
- _oneof_case_[0] = kNullValue;
-}
-void Value::clear_null_value() {
- if (has_null_value()) {
- kind_.null_value_ = 0;
- clear_has_kind();
- }
-}
-::google::protobuf::NullValue Value::null_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
- if (has_null_value()) {
- return static_cast< ::google::protobuf::NullValue >(kind_.null_value_);
- }
- return static_cast< ::google::protobuf::NullValue >(0);
-}
-void Value::set_null_value(::google::protobuf::NullValue value) {
- if (!has_null_value()) {
- clear_kind();
- set_has_null_value();
- }
- kind_.null_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
-}
-
-// double number_value = 2;
-bool Value::has_number_value() const {
- return kind_case() == kNumberValue;
-}
-void Value::set_has_number_value() {
- _oneof_case_[0] = kNumberValue;
-}
-void Value::clear_number_value() {
- if (has_number_value()) {
- kind_.number_value_ = 0;
- clear_has_kind();
- }
-}
-double Value::number_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
- if (has_number_value()) {
- return kind_.number_value_;
- }
- return 0;
-}
-void Value::set_number_value(double value) {
- if (!has_number_value()) {
- clear_kind();
- set_has_number_value();
- }
- kind_.number_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
-}
-
-// string string_value = 3;
-bool Value::has_string_value() const {
- return kind_case() == kStringValue;
-}
-void Value::set_has_string_value() {
- _oneof_case_[0] = kStringValue;
-}
-void Value::clear_string_value() {
- if (has_string_value()) {
- kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- clear_has_kind();
- }
-}
-const ::std::string& Value::string_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value)
- if (has_string_value()) {
- return kind_.string_value_.Get();
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-void Value::set_string_value(const ::std::string& value) {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
-}
-void Value::set_string_value(const char* value) {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value)
-}
-void Value::set_string_value(const char* value,
- size_t size) {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value)
-}
-::std::string* Value::mutable_string_value() {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return kind_.string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
-}
-::std::string* Value::release_string_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
- if (has_string_value()) {
- clear_has_kind();
- return kind_.string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- } else {
- return NULL;
- }
-}
-::std::string* Value::unsafe_arena_release_string_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (has_string_value()) {
- clear_has_kind();
- return kind_.string_value_.UnsafeArenaRelease(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- } else {
- return NULL;
- }
-}
-void Value::set_allocated_string_value(::std::string* string_value) {
- if (!has_string_value()) {
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_kind();
- if (string_value != NULL) {
- set_has_string_value();
- kind_.string_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value,
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
-}
-void Value::unsafe_arena_set_allocated_string_value(::std::string* string_value) {
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (!has_string_value()) {
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_kind();
- if (string_value) {
- set_has_string_value();
- kind_.string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.string_value)
-}
-
-// bool bool_value = 4;
-bool Value::has_bool_value() const {
- return kind_case() == kBoolValue;
-}
-void Value::set_has_bool_value() {
- _oneof_case_[0] = kBoolValue;
-}
-void Value::clear_bool_value() {
- if (has_bool_value()) {
- kind_.bool_value_ = false;
- clear_has_kind();
- }
-}
-bool Value::bool_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
- if (has_bool_value()) {
- return kind_.bool_value_;
- }
- return false;
-}
-void Value::set_bool_value(bool value) {
- if (!has_bool_value()) {
- clear_kind();
- set_has_bool_value();
- }
- kind_.bool_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
-}
-
-// .google.protobuf.Struct struct_value = 5;
-bool Value::has_struct_value() const {
- return kind_case() == kStructValue;
-}
-void Value::set_has_struct_value() {
- _oneof_case_[0] = kStructValue;
-}
-void Value::clear_struct_value() {
- if (has_struct_value()) {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.struct_value_;
- }
- clear_has_kind();
- }
-}
- const ::google::protobuf::Struct& Value::struct_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
- return has_struct_value()
- ? *kind_.struct_value_
- : ::google::protobuf::Struct::default_instance();
-}
-::google::protobuf::Struct* Value::mutable_struct_value() {
- if (!has_struct_value()) {
- clear_kind();
- set_has_struct_value();
- kind_.struct_value_ =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::Struct >(
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
- return kind_.struct_value_;
-}
-::google::protobuf::Struct* Value::release_struct_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
- if (has_struct_value()) {
- clear_has_kind();
- if (GetArenaNoVirtual() != NULL) {
- ::google::protobuf::Struct* temp = new ::google::protobuf::Struct(*kind_.struct_value_);
- kind_.struct_value_ = NULL;
- return temp;
- } else {
- ::google::protobuf::Struct* temp = kind_.struct_value_;
- kind_.struct_value_ = NULL;
- return temp;
- }
- } else {
- return NULL;
- }
-}
-void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
- clear_kind();
- if (struct_value) {
- if (GetArenaNoVirtual() != NULL &&
- ::google::protobuf::Arena::GetArena(struct_value) == NULL) {
- GetArenaNoVirtual()->Own(struct_value);
- } else if (GetArenaNoVirtual() !=
- ::google::protobuf::Arena::GetArena(struct_value)) {
- ::google::protobuf::Struct* new_struct_value =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::Struct >(
- GetArenaNoVirtual());
- new_struct_value->CopyFrom(*struct_value);
- struct_value = new_struct_value;
- }
- set_has_struct_value();
- kind_.struct_value_ = struct_value;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
-}
- ::google::protobuf::Struct* Value::unsafe_arena_release_struct_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
- if (has_struct_value()) {
- clear_has_kind();
- ::google::protobuf::Struct* temp = kind_.struct_value_;
- kind_.struct_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
- void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
- clear_kind();
- if (struct_value) {
- set_has_struct_value();
- kind_.struct_value_ = struct_value;
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
-}
-
-// .google.protobuf.ListValue list_value = 6;
-bool Value::has_list_value() const {
- return kind_case() == kListValue;
-}
-void Value::set_has_list_value() {
- _oneof_case_[0] = kListValue;
-}
-void Value::clear_list_value() {
- if (has_list_value()) {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.list_value_;
- }
- clear_has_kind();
- }
-}
- const ::google::protobuf::ListValue& Value::list_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
- return has_list_value()
- ? *kind_.list_value_
- : ::google::protobuf::ListValue::default_instance();
-}
-::google::protobuf::ListValue* Value::mutable_list_value() {
- if (!has_list_value()) {
- clear_kind();
- set_has_list_value();
- kind_.list_value_ =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::ListValue >(
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
- return kind_.list_value_;
-}
-::google::protobuf::ListValue* Value::release_list_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
- if (has_list_value()) {
- clear_has_kind();
- if (GetArenaNoVirtual() != NULL) {
- ::google::protobuf::ListValue* temp = new ::google::protobuf::ListValue(*kind_.list_value_);
- kind_.list_value_ = NULL;
- return temp;
- } else {
- ::google::protobuf::ListValue* temp = kind_.list_value_;
- kind_.list_value_ = NULL;
- return temp;
- }
- } else {
- return NULL;
- }
-}
-void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
- clear_kind();
- if (list_value) {
- if (GetArenaNoVirtual() != NULL &&
- ::google::protobuf::Arena::GetArena(list_value) == NULL) {
- GetArenaNoVirtual()->Own(list_value);
- } else if (GetArenaNoVirtual() !=
- ::google::protobuf::Arena::GetArena(list_value)) {
- ::google::protobuf::ListValue* new_list_value =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::ListValue >(
- GetArenaNoVirtual());
- new_list_value->CopyFrom(*list_value);
- list_value = new_list_value;
- }
- set_has_list_value();
- kind_.list_value_ = list_value;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
-}
- ::google::protobuf::ListValue* Value::unsafe_arena_release_list_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
- if (has_list_value()) {
- clear_has_kind();
- ::google::protobuf::ListValue* temp = kind_.list_value_;
- kind_.list_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
- void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::ListValue* list_value) {
- clear_kind();
- if (list_value) {
- set_has_list_value();
- kind_.list_value_ = list_value;
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
-}
-
-bool Value::has_kind() const {
- return kind_case() != KIND_NOT_SET;
-}
-void Value::clear_has_kind() {
- _oneof_case_[0] = KIND_NOT_SET;
-}
-Value::KindCase Value::kind_case() const {
- return Value::KindCase(_oneof_case_[0]);
-}
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
+void ListValue::InitAsDefaultInstance() {
+}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ListValue::kValuesFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ListValue::ListValue()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
- }
+ ::google::protobuf::internal::InitSCC(
+ &protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.ListValue)
}
@@ -1522,9 +1196,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
values_(arena) {
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
-#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
@@ -1532,14 +1204,12 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
ListValue::ListValue(const ListValue& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
- values_(from.values_),
- _cached_size_(0) {
+ values_(from.values_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
}
void ListValue::SharedCtor() {
- _cached_size_ = 0;
}
ListValue::~ListValue() {
@@ -1548,11 +1218,7 @@ ListValue::~ListValue() {
}
void ListValue::SharedDtor() {
- ::google::protobuf::Arena* arena = GetArenaNoVirtual();
- if (arena != NULL) {
- return;
- }
-
+ GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
}
void ListValue::ArenaDtor(void* object) {
@@ -1562,27 +1228,27 @@ void ListValue::ArenaDtor(void* object) {
void ListValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
}
void ListValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ListValue::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[3].descriptor;
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const ListValue& ListValue::default_instance() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fstruct_2eproto::scc_info_ListValue.base);
return *internal_default_instance();
}
-ListValue* ListValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<ListValue>(arena);
-}
void ListValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
values_.Clear();
+ _internal_metadata_.Clear();
}
bool ListValue::MergePartialFromCodedStream(
@@ -1591,32 +1257,29 @@ bool ListValue::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:google.protobuf.ListValue)
for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .google.protobuf.Value values = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u)) {
- DO_(input->IncrementRecursionDepth());
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_values()));
} else {
goto handle_unusual;
}
- input->UnsafeDecrementRecursionDepth();
break;
}
default: {
handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ if (tag == 0) {
goto success;
}
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
@@ -1633,26 +1296,44 @@ failure:
void ListValue::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:google.protobuf.ListValue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0, n = this->values_size(); i < n; i++) {
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->values(i), output);
+ 1,
+ this->values(static_cast<int>(i)),
+ output);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
// @@protoc_insertion_point(serialize_end:google.protobuf.ListValue)
}
::google::protobuf::uint8* ListValue::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
+ (void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
// repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0, n = this->values_size(); i < n; i++) {
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 1, this->values(i), false, target);
+ InternalWriteMessageToArray(
+ 1, this->values(static_cast<int>(i)), deterministic, target);
}
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
return target;
}
@@ -1661,21 +1342,24 @@ 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
// repeated .google.protobuf.Value values = 1;
{
- unsigned int count = this->values_size();
+ unsigned int count = static_cast<unsigned int>(this->values_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->values(i));
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ this->values(static_cast<int>(i)));
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ SetCachedSize(cached_size);
return total_size;
}
@@ -1698,6 +1382,9 @@ 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_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
values_.MergeFrom(from.values_);
}
@@ -1739,52 +1426,34 @@ void ListValue::UnsafeArenaSwap(ListValue* other) {
InternalSwap(other);
}
void ListValue::InternalSwap(ListValue* other) {
- values_.UnsafeArenaSwap(&other->values_);
- std::swap(_cached_size_, other->_cached_size_);
+ using std::swap;
+ CastToBase(&values_)->InternalSwap(CastToBase(&other->values_));
+ _internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata ListValue::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[3];
+ return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
}
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-// ListValue
-// repeated .google.protobuf.Value values = 1;
-int ListValue::values_size() const {
- return values_.size();
-}
-void ListValue::clear_values() {
- values_.Clear();
-}
-const ::google::protobuf::Value& ListValue::values(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
- return values_.Get(index);
-}
-::google::protobuf::Value* ListValue::mutable_values(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
- return values_.Mutable(index);
+// @@protoc_insertion_point(namespace_scope)
+} // namespace protobuf
+} // namespace google
+namespace google {
+namespace protobuf {
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(arena);
}
-::google::protobuf::Value* ListValue::add_values() {
- // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
- return values_.Add();
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Struct* Arena::CreateMaybeMessage< ::google::protobuf::Struct >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Struct >(arena);
}
-::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
-ListValue::mutable_values() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
- return &values_;
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::Value* Arena::CreateMaybeMessage< ::google::protobuf::Value >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::Value >(arena);
}
-const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
-ListValue::values() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
- return values_;
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::ListValue* Arena::CreateMaybeMessage< ::google::protobuf::ListValue >(Arena* arena) {
+ return Arena::CreateMessageInternal< ::google::protobuf::ListValue >(arena);
}
-
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
-
-// @@protoc_insertion_point(namespace_scope)
-
} // namespace protobuf
} // namespace google