aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/struct.pb.cc
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2017-09-12 10:32:01 -0700
committerGravatar Adam Cozzette <acozzette@google.com>2017-09-14 10:03:57 -0700
commit13fd045dbb2b4dacea32be162a41d5a4b0d1802f (patch)
treec219e7eb18b82523e36c6748861c403a14ea66ae /src/google/protobuf/struct.pb.cc
parentd1bc27caef8377a710370189675cb0958443e8f1 (diff)
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/struct.pb.cc')
-rw-r--r--src/google/protobuf/struct.pb.cc722
1 files changed, 132 insertions, 590 deletions
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index 02d9306e..3bbbbfa4 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -1,7 +1,6 @@
// 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>
@@ -16,23 +15,22 @@
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
-
namespace google {
namespace protobuf {
-class Struct_FieldsEntryDefaultTypeInternal {
-public:
- ::google::protobuf::internal::ExplicitlyConstructed<Struct::Struct_FieldsEntry>
- _instance;
-} _Struct_FieldsEntry_default_instance_;
+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;
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Struct>
+ _instance;
} _Struct_default_instance_;
class ValueDefaultTypeInternal {
-public:
- ::google::protobuf::internal::ExplicitlyConstructed<Value>
- _instance;
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Value>
+ _instance;
int null_value_;
double number_value_;
::google::protobuf::internal::ArenaStringPtr string_value_;
@@ -41,86 +39,105 @@ public:
const ::google::protobuf::ListValue* list_value_;
} _Value_default_instance_;
class ListValueDefaultTypeInternal {
-public:
- ::google::protobuf::internal::ExplicitlyConstructed<ListValue>
- _instance;
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<ListValue>
+ _instance;
} _ListValue_default_instance_;
-
+} // namespace protobuf
+} // namespace google
namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
+void InitDefaultsListValueImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+ ::google::protobuf::internal::InitProtobufDefaults();
+ {
+ 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();
+}
-namespace {
+void InitDefaultsListValue() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListValueImpl);
+}
::google::protobuf::Metadata file_level_metadata[4];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
-} // namespace
-
-PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
- const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
-};
-
-PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
- const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ::google::protobuf::internal::AuxillaryParseTableField(),
-};
-PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
- TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
- { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
- { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
- { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
-};
-
-const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+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_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, fields_),
+ 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]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, _oneof_case_[0]),
~0u, // no _weak_field_map_
- offsetof(ValueDefaultTypeInternal, null_value_),
- offsetof(ValueDefaultTypeInternal, number_value_),
- offsetof(ValueDefaultTypeInternal, string_value_),
- offsetof(ValueDefaultTypeInternal, bool_value_),
- offsetof(ValueDefaultTypeInternal, struct_value_),
- offsetof(ValueDefaultTypeInternal, list_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, kind_),
+ 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_
~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, values_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::ListValue, values_),
};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(Struct)},
- { 6, -1, sizeof(Value)},
- { 18, -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_FieldsEntry_default_instance_),
- 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,
file_level_metadata, file_level_enum_descriptors, NULL);
-file_level_metadata[0].reflection = Struct::Struct_FieldsEntry::CreateReflection(file_level_metadata[0].descriptor, _Struct_FieldsEntry_default_instance_._instance.get_mutable());
}
void protobuf_AssignDescriptorsOnce() {
@@ -128,46 +145,15 @@ void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&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);
}
-} // namespace
-void TableStruct::InitDefaultsImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- ::google::protobuf::internal::InitProtobufDefaults();
- _Struct_FieldsEntry_default_instance_._instance.DefaultConstruct();
- ::google::protobuf::internal::OnShutdownDestroyMessage(
- &_Struct_FieldsEntry_default_instance_);_Struct_default_instance_._instance.DefaultConstruct();
- ::google::protobuf::internal::OnShutdownDestroyMessage(
- &_Struct_default_instance_);_Value_default_instance_._instance.DefaultConstruct();
- ::google::protobuf::internal::OnShutdownDestroyMessage(
- &_Value_default_instance_);_ListValue_default_instance_._instance.DefaultConstruct();
- ::google::protobuf::internal::OnShutdownDestroyMessage(
- &_ListValue_default_instance_);_Struct_FieldsEntry_default_instance_._instance.get_mutable()->set_default_instance(_Struct_FieldsEntry_default_instance_._instance.get_mutable());
- _Struct_FieldsEntry_default_instance_._instance.get_mutable()->InitAsDefaultInstance();
- _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);
-}
-namespace {
void AddDescriptorsImpl() {
InitDefaults();
- static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ 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"
@@ -191,7 +177,6 @@ void AddDescriptorsImpl() {
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/struct.proto", &protobuf_RegisterTypes);
}
-} // anonymous namespace
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
@@ -203,9 +188,9 @@ struct 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];
@@ -222,25 +207,25 @@ bool NullValue_IsValid(int value) {
// ===================================================================
-Struct::Struct_FieldsEntry::Struct_FieldsEntry() {}
-Struct::Struct_FieldsEntry::Struct_FieldsEntry(::google::protobuf::Arena* arena) : SuperType(arena) {}
-::google::protobuf::Metadata Struct::Struct_FieldsEntry::GetMetadata() const {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0];
+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);
}
-void Struct::Struct_FieldsEntry::MergeFrom(
+::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::Struct_FieldsEntry::MergeFrom(const Struct_FieldsEntry& other) {
- MergeFromInternal(other);
-}
-#if PROTOBUF_INLINE_NOT_IN_HEADERS
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
+void Struct::InitAsDefaultInstance() {
+}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Struct::kFieldsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
@@ -248,7 +233,7 @@ const int Struct::kFieldsFieldNumber;
Struct::Struct()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Struct)
@@ -257,7 +242,7 @@ Struct::Struct(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
fields_(arena) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
@@ -301,12 +286,12 @@ void Struct::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Struct::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].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();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
return *internal_default_instance();
}
@@ -338,8 +323,8 @@ bool Struct::MergePartialFromCodedStream(
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- Struct_FieldsEntry::Parser< ::google::protobuf::internal::MapField<
- Struct_FieldsEntry,
+ 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,
@@ -410,7 +395,7 @@ void Struct::SerializeWithCachedSizes(
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
@@ -422,7 +407,7 @@ void Struct::SerializeWithCachedSizes(
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::google::protobuf::scoped_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) {
@@ -479,7 +464,7 @@ void Struct::SerializeWithCachedSizes(
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
@@ -493,7 +478,7 @@ void Struct::SerializeWithCachedSizes(
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::google::protobuf::scoped_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) {
@@ -532,7 +517,7 @@ size_t Struct::ByteSizeLong() const {
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->fields_size());
{
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
+ ::google::protobuf::scoped_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) {
@@ -626,34 +611,23 @@ void Struct::InternalSwap(Struct* other) {
::google::protobuf::Metadata Struct::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
+ 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();
-}
- const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
-Struct::fields() const {
- // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
- return fields_.GetMap();
-}
- ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
-Struct::mutable_fields() {
- // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
- return fields_.MutableMap();
-}
-
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
+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());
+}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Value::kNullValueFieldNumber;
const int Value::kNumberValueFieldNumber;
@@ -666,7 +640,7 @@ 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();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.Value)
@@ -674,7 +648,7 @@ Value::Value()
Value::Value(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
@@ -751,12 +725,12 @@ void Value::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Value::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].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();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
return *internal_default_instance();
}
@@ -1194,411 +1168,14 @@ void Value::InternalSwap(Value* other) {
::google::protobuf::Metadata Value::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
+ 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)
-}
-#if LANG_CXX11
-void Value::set_string_value(::std::string&& value) {
- // @@protoc_insertion_point(field_set:google.protobuf.Value.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(), ::std::move(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Value.string_value)
-}
-#endif
-void Value::set_string_value(const char* value) {
- GOOGLE_DCHECK(value != NULL);
- 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
@@ -1606,7 +1183,7 @@ const int ListValue::kValuesFieldNumber;
ListValue::ListValue()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
}
SharedCtor();
// @@protoc_insertion_point(constructor:google.protobuf.ListValue)
@@ -1615,7 +1192,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(),
_internal_metadata_(arena),
values_(arena) {
- protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
@@ -1659,12 +1236,12 @@ void ListValue::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ListValue::descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].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();
+ ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
return *internal_default_instance();
}
@@ -1865,46 +1442,11 @@ void ListValue::InternalSwap(ListValue* other) {
::google::protobuf::Metadata ListValue::GetMetadata() const {
protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
+ 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);
-}
-::google::protobuf::Value* ListValue::add_values() {
- // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
- return values_.Add();
-}
-::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
-ListValue::mutable_values() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
- return &values_;
-}
-const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
-ListValue::values() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
- return values_;
-}
-
-#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// @@protoc_insertion_point(namespace_scope)
-
} // namespace protobuf
} // namespace google