diff options
Diffstat (limited to 'src/google/protobuf/struct.pb.cc')
-rw-r--r-- | src/google/protobuf/struct.pb.cc | 197 |
1 files changed, 98 insertions, 99 deletions
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index 8bd2f8be..332a8295 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -19,56 +19,53 @@ namespace google { namespace protobuf { -class StructDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct> {}; -StructDefaultTypeInternal _Struct_default_instance_; -class ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Value> {}; -ValueDefaultTypeInternal _Value_default_instance_; -class ListValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ListValue> {}; -ListValueDefaultTypeInternal _ListValue_default_instance_; - -namespace { - -::google::protobuf::Metadata file_level_metadata[4]; -const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; -struct ValueOneofInstance { +class StructDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Struct> { +} _Struct_default_instance_; +class ValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Value> { + public: int null_value_; double number_value_; ::google::protobuf::internal::ArenaStringPtr string_value_; bool bool_value_; const ::google::protobuf::Struct* struct_value_; const ::google::protobuf::ListValue* list_value_; -} Value_default_oneof_instance_; +} _Value_default_instance_; +class ListValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ListValue> { +} _ListValue_default_instance_; -} // namespace +namespace protobuf_google_2fprotobuf_2fstruct_2eproto { -const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fstruct_2eproto() GOOGLE_ATTRIBUTE_COLD; -const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fstruct_2eproto() { - static const ::google::protobuf::uint32 offsets[] = { - ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, fields_), - ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, _internal_metadata_), - ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, _oneof_case_[0]), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), null_value_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), number_value_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), string_value_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), bool_value_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), struct_value_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET((&Value_default_oneof_instance_), list_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Value, kind_), - ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, values_), - }; - return offsets; -} +namespace { + +::google::protobuf::Metadata file_level_metadata[4]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; + +} // namespace + +const ::google::protobuf::uint32 TableStruct::offsets[] = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Struct, fields_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(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_), + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListValue, values_), +}; static const ::google::protobuf::internal::MigrationSchema schemas[] = { { 0, -1, sizeof(Struct)}, @@ -76,19 +73,19 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] = { { 16, -1, sizeof(ListValue)}, }; -static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = { - {reinterpret_cast<const ::google::protobuf::Message*>(&_Struct_default_instance_), NULL}, - {reinterpret_cast<const ::google::protobuf::Message*>(&_Value_default_instance_), &Value_default_oneof_instance_}, - {reinterpret_cast<const ::google::protobuf::Message*>(&_ListValue_default_instance_), NULL}, +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_), }; namespace { void protobuf_AssignDescriptors() { - protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); + AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/protobuf/struct.proto", schemas, file_default_instances, protobuf_Offsets_google_2fprotobuf_2fstruct_2eproto(), factory, + "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, file_level_enum_descriptors, NULL); } @@ -101,7 +98,7 @@ void protobuf_RegisterTypes(const ::std::string&) GOOGLE_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 = file_level_metadata[0].descriptor; + 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< @@ -115,7 +112,7 @@ void protobuf_RegisterTypes(const ::std::string&) { } // namespace -void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto() { +void TableStruct::Shutdown() { _Struct_default_instance_.Shutdown(); delete file_level_metadata[1].reflection; _Value_default_instance_.Shutdown(); @@ -124,30 +121,30 @@ void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto() { delete file_level_metadata[3].reflection; } -void protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto_impl() { +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_oneof_instance_.null_value_ = 0; - Value_default_oneof_instance_.number_value_ = 0; - Value_default_oneof_instance_.string_value_.UnsafeSetDefault( + _Value_default_instance_.null_value_ = 0; + _Value_default_instance_.number_value_ = 0; + _Value_default_instance_.string_value_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - Value_default_oneof_instance_.bool_value_ = false; - Value_default_oneof_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>( + _Value_default_instance_.bool_value_ = false; + _Value_default_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>( ::google::protobuf::Struct::internal_default_instance()); - Value_default_oneof_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>( + _Value_default_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>( ::google::protobuf::ListValue::internal_default_instance()); } -void protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto() { +void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); - ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto_impl); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } -void protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto_impl() { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); +void AddDescriptorsImpl() { + InitDefaults(); static const char descriptor[] = { "\n\034google/protobuf/struct.proto\022\017google.p" "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo" @@ -171,23 +168,25 @@ void protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto_impl() { descriptor, 641); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/protobuf/struct.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto); + ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto_once_); -void protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto() { - ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto_once_, - &protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto_impl); +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } // Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_google_2fprotobuf_2fstruct_2eproto { - StaticDescriptorInitializer_google_2fprotobuf_2fstruct_2eproto() { - protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto(); +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); } -} static_descriptor_initializer_google_2fprotobuf_2fstruct_2eproto_; +} static_descriptor_initializer; + +} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto + const ::google::protobuf::EnumDescriptor* NullValue_descriptor() { - protobuf_AssignDescriptorsOnce(); - return file_level_enum_descriptors[0]; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_enum_descriptors[0]; } bool NullValue_IsValid(int value) { switch (value) { @@ -213,7 +212,7 @@ const int Struct::kFieldsFieldNumber; Struct::Struct() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Struct) @@ -223,7 +222,7 @@ Struct::Struct(::google::protobuf::Arena* arena) _internal_metadata_(arena), fields_(arena) { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); @@ -234,9 +233,9 @@ Struct::Struct(const Struct& from) _internal_metadata_(NULL), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = file_level_metadata[0].descriptor; + const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0].descriptor; fields_.SetAssignDescriptorCallback( - protobuf_AssignDescriptorsOnce); + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce); fields_.SetEntryDescriptor( &Struct_FieldsEntry_descriptor); fields_.MergeFrom(from.fields_); @@ -244,9 +243,9 @@ Struct::Struct(const Struct& from) } void Struct::SharedCtor() { - const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = file_level_metadata[0].descriptor; + const ::google::protobuf::Descriptor*& Struct_FieldsEntry_descriptor = protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0].descriptor; fields_.SetAssignDescriptorCallback( - protobuf_AssignDescriptorsOnce); + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce); fields_.SetEntryDescriptor( &Struct_FieldsEntry_descriptor); _cached_size_ = 0; @@ -277,12 +276,12 @@ void Struct::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Struct::descriptor() { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[1].descriptor; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[1].descriptor; } const Struct& Struct::default_instance() { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); return *internal_default_instance(); } @@ -412,7 +411,7 @@ void Struct::SerializeWithCachedSizes( ::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) // map<string, .google.protobuf.Value> fields = 1; if (!this->fields().empty()) { @@ -573,8 +572,8 @@ void Struct::InternalSwap(Struct* other) { } ::google::protobuf::Metadata Struct::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[1]; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[1]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS @@ -614,7 +613,7 @@ const int Value::kListValueFieldNumber; Value::Value() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Value) @@ -623,7 +622,7 @@ Value::Value(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); @@ -700,12 +699,12 @@ void Value::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Value::descriptor() { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[2].descriptor; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[2].descriptor; } const Value& Value::default_instance() { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); return *internal_default_instance(); } @@ -914,7 +913,7 @@ void Value::SerializeWithCachedSizes( ::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.NullValue null_value = 1; if (has_null_value()) { @@ -1108,8 +1107,8 @@ void Value::InternalSwap(Value* other) { } ::google::protobuf::Metadata Value::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[2]; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[2]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS @@ -1507,7 +1506,7 @@ const int ListValue::kValuesFieldNumber; ListValue::ListValue() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); } SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.ListValue) @@ -1517,7 +1516,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena) _internal_metadata_(arena), values_(arena) { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); @@ -1561,12 +1560,12 @@ void ListValue::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListValue::descriptor() { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[3].descriptor; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[3].descriptor; } const ListValue& ListValue::default_instance() { - protobuf_InitDefaults_google_2fprotobuf_2fstruct_2eproto(); + protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaults(); return *internal_default_instance(); } @@ -1637,7 +1636,7 @@ void ListValue::SerializeWithCachedSizes( ::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) // repeated .google.protobuf.Value values = 1; for (unsigned int i = 0, n = this->values_size(); i < n; i++) { @@ -1737,8 +1736,8 @@ void ListValue::InternalSwap(ListValue* other) { } ::google::protobuf::Metadata ListValue::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - return file_level_metadata[3]; + protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[3]; } #if PROTOBUF_INLINE_NOT_IN_HEADERS |