| Index: third_party/protobuf/src/google/protobuf/type.pb.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/type.pb.cc b/third_party/protobuf/src/google/protobuf/type.pb.cc
|
| index 6e41dde8105d6e7c27d5822f7fb60365cbc7ecfb..759cab2781fcc8e25cddfd2b6eeb4c0fb533e412 100644
|
| --- a/third_party/protobuf/src/google/protobuf/type.pb.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/type.pb.cc
|
| @@ -19,42 +19,59 @@
|
|
|
| namespace google {
|
| namespace protobuf {
|
| -class TypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Type> {};
|
| -TypeDefaultTypeInternal _Type_default_instance_;
|
| -class FieldDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Field> {};
|
| -FieldDefaultTypeInternal _Field_default_instance_;
|
| -class EnumDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Enum> {};
|
| -EnumDefaultTypeInternal _Enum_default_instance_;
|
| -class EnumValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<EnumValue> {};
|
| -EnumValueDefaultTypeInternal _EnumValue_default_instance_;
|
| -class OptionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Option> {};
|
| -OptionDefaultTypeInternal _Option_default_instance_;
|
|
|
| namespace {
|
|
|
| -::google::protobuf::Metadata file_level_metadata[5];
|
| -const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3];
|
| +const ::google::protobuf::Descriptor* Type_descriptor_ = NULL;
|
| +const ::google::protobuf::internal::GeneratedMessageReflection*
|
| + Type_reflection_ = NULL;
|
| +const ::google::protobuf::Descriptor* Field_descriptor_ = NULL;
|
| +const ::google::protobuf::internal::GeneratedMessageReflection*
|
| + Field_reflection_ = NULL;
|
| +const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor_ = NULL;
|
| +const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor_ = NULL;
|
| +const ::google::protobuf::Descriptor* Enum_descriptor_ = NULL;
|
| +const ::google::protobuf::internal::GeneratedMessageReflection*
|
| + Enum_reflection_ = NULL;
|
| +const ::google::protobuf::Descriptor* EnumValue_descriptor_ = NULL;
|
| +const ::google::protobuf::internal::GeneratedMessageReflection*
|
| + EnumValue_reflection_ = NULL;
|
| +const ::google::protobuf::Descriptor* Option_descriptor_ = NULL;
|
| +const ::google::protobuf::internal::GeneratedMessageReflection*
|
| + Option_reflection_ = NULL;
|
| +const ::google::protobuf::EnumDescriptor* Syntax_descriptor_ = NULL;
|
|
|
| } // namespace
|
|
|
|
|
| -const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2ftype_2eproto() GOOGLE_ATTRIBUTE_COLD;
|
| -const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2ftype_2eproto() {
|
| - static const ::google::protobuf::uint32 offsets[] = {
|
| - ~0u, // no _has_bits_
|
| - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _internal_metadata_),
|
| - ~0u, // no _extensions_
|
| - ~0u, // no _oneof_case_
|
| +void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto() {
|
| + protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + const ::google::protobuf::FileDescriptor* file =
|
| + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
| + "google/protobuf/type.proto");
|
| + GOOGLE_CHECK(file != NULL);
|
| + Type_descriptor_ = file->message_type(0);
|
| + static const int Type_offsets_[6] = {
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, name_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, fields_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, oneofs_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, options_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, source_context_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, syntax_),
|
| - ~0u, // no _has_bits_
|
| - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _internal_metadata_),
|
| - ~0u, // no _extensions_
|
| - ~0u, // no _oneof_case_
|
| + };
|
| + Type_reflection_ =
|
| + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
|
| + Type_descriptor_,
|
| + Type::default_instance_,
|
| + Type_offsets_,
|
| + -1,
|
| + -1,
|
| + -1,
|
| + sizeof(Type),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _internal_metadata_),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _is_default_instance_));
|
| + Field_descriptor_ = file->message_type(1);
|
| + static const int Field_offsets_[10] = {
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, kind_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, cardinality_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, number_),
|
| @@ -65,301 +82,208 @@ const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2ftype_2epr
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, options_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, json_name_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, default_value_),
|
| - ~0u, // no _has_bits_
|
| - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _internal_metadata_),
|
| - ~0u, // no _extensions_
|
| - ~0u, // no _oneof_case_
|
| + };
|
| + Field_reflection_ =
|
| + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
|
| + Field_descriptor_,
|
| + Field::default_instance_,
|
| + Field_offsets_,
|
| + -1,
|
| + -1,
|
| + -1,
|
| + sizeof(Field),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _internal_metadata_),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _is_default_instance_));
|
| + Field_Kind_descriptor_ = Field_descriptor_->enum_type(0);
|
| + Field_Cardinality_descriptor_ = Field_descriptor_->enum_type(1);
|
| + Enum_descriptor_ = file->message_type(2);
|
| + static const int Enum_offsets_[5] = {
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, name_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, enumvalue_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, options_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, source_context_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, syntax_),
|
| - ~0u, // no _has_bits_
|
| - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _internal_metadata_),
|
| - ~0u, // no _extensions_
|
| - ~0u, // no _oneof_case_
|
| + };
|
| + Enum_reflection_ =
|
| + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
|
| + Enum_descriptor_,
|
| + Enum::default_instance_,
|
| + Enum_offsets_,
|
| + -1,
|
| + -1,
|
| + -1,
|
| + sizeof(Enum),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _internal_metadata_),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _is_default_instance_));
|
| + EnumValue_descriptor_ = file->message_type(3);
|
| + static const int EnumValue_offsets_[3] = {
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, name_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, number_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, options_),
|
| - ~0u, // no _has_bits_
|
| - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _internal_metadata_),
|
| - ~0u, // no _extensions_
|
| - ~0u, // no _oneof_case_
|
| + };
|
| + EnumValue_reflection_ =
|
| + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
|
| + EnumValue_descriptor_,
|
| + EnumValue::default_instance_,
|
| + EnumValue_offsets_,
|
| + -1,
|
| + -1,
|
| + -1,
|
| + sizeof(EnumValue),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _internal_metadata_),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _is_default_instance_));
|
| + Option_descriptor_ = file->message_type(4);
|
| + static const int Option_offsets_[2] = {
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, name_),
|
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, value_),
|
| };
|
| - return offsets;
|
| + Option_reflection_ =
|
| + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
|
| + Option_descriptor_,
|
| + Option::default_instance_,
|
| + Option_offsets_,
|
| + -1,
|
| + -1,
|
| + -1,
|
| + sizeof(Option),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _internal_metadata_),
|
| + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _is_default_instance_));
|
| + Syntax_descriptor_ = file->enum_type(0);
|
| }
|
|
|
| -static const ::google::protobuf::internal::MigrationSchema schemas[] = {
|
| - { 0, -1, sizeof(Type)},
|
| - { 10, -1, sizeof(Field)},
|
| - { 24, -1, sizeof(Enum)},
|
| - { 33, -1, sizeof(EnumValue)},
|
| - { 40, -1, sizeof(Option)},
|
| -};
|
| -
|
| -static const ::google::protobuf::internal::DefaultInstanceData file_default_instances[] = {
|
| - {reinterpret_cast<const ::google::protobuf::Message*>(&_Type_default_instance_), NULL},
|
| - {reinterpret_cast<const ::google::protobuf::Message*>(&_Field_default_instance_), NULL},
|
| - {reinterpret_cast<const ::google::protobuf::Message*>(&_Enum_default_instance_), NULL},
|
| - {reinterpret_cast<const ::google::protobuf::Message*>(&_EnumValue_default_instance_), NULL},
|
| - {reinterpret_cast<const ::google::protobuf::Message*>(&_Option_default_instance_), NULL},
|
| -};
|
| -
|
| namespace {
|
|
|
| -void protobuf_AssignDescriptors() {
|
| - protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| - ::google::protobuf::MessageFactory* factory = NULL;
|
| - AssignDescriptors(
|
| - "google/protobuf/type.proto", schemas, file_default_instances, protobuf_Offsets_google_2fprotobuf_2ftype_2eproto(), factory,
|
| - file_level_metadata, file_level_enum_descriptors, NULL);
|
| -}
|
| -
|
| -void protobuf_AssignDescriptorsOnce() {
|
| - static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
| - ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
|
| +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
| +inline void protobuf_AssignDescriptorsOnce() {
|
| + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
| + &protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto);
|
| }
|
|
|
| -void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
|
| void protobuf_RegisterTypes(const ::std::string&) {
|
| protobuf_AssignDescriptorsOnce();
|
| - ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
|
| + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
| + Type_descriptor_, &Type::default_instance());
|
| + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
| + Field_descriptor_, &Field::default_instance());
|
| + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
| + Enum_descriptor_, &Enum::default_instance());
|
| + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
| + EnumValue_descriptor_, &EnumValue::default_instance());
|
| + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
| + Option_descriptor_, &Option::default_instance());
|
| }
|
|
|
| } // namespace
|
|
|
| void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto() {
|
| - _Type_default_instance_.Shutdown();
|
| - delete file_level_metadata[0].reflection;
|
| - _Field_default_instance_.Shutdown();
|
| - delete file_level_metadata[1].reflection;
|
| - _Enum_default_instance_.Shutdown();
|
| - delete file_level_metadata[2].reflection;
|
| - _EnumValue_default_instance_.Shutdown();
|
| - delete file_level_metadata[3].reflection;
|
| - _Option_default_instance_.Shutdown();
|
| - delete file_level_metadata[4].reflection;
|
| -}
|
| -
|
| -void protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl() {
|
| + delete Type::default_instance_;
|
| + delete Type_reflection_;
|
| + delete Field::default_instance_;
|
| + delete Field_reflection_;
|
| + delete Enum::default_instance_;
|
| + delete Enum_reflection_;
|
| + delete EnumValue::default_instance_;
|
| + delete EnumValue_reflection_;
|
| + delete Option::default_instance_;
|
| + delete Option_reflection_;
|
| +}
|
| +
|
| +void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() {
|
| + static bool already_here = false;
|
| + if (already_here) return;
|
| + already_here = true;
|
| GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
| - ::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto();
|
| - ::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto();
|
| - ::google::protobuf::internal::InitProtobufDefaults();
|
| - _Type_default_instance_.DefaultConstruct();
|
| - _Field_default_instance_.DefaultConstruct();
|
| - _Enum_default_instance_.DefaultConstruct();
|
| - _EnumValue_default_instance_.DefaultConstruct();
|
| - _Option_default_instance_.DefaultConstruct();
|
| - _Type_default_instance_.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
|
| - ::google::protobuf::SourceContext::internal_default_instance());
|
| - _Enum_default_instance_.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>(
|
| - ::google::protobuf::SourceContext::internal_default_instance());
|
| - _Option_default_instance_.get_mutable()->value_ = const_cast< ::google::protobuf::Any*>(
|
| - ::google::protobuf::Any::internal_default_instance());
|
| -}
|
| -
|
| -void protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto() {
|
| - static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
| - ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl);
|
| -}
|
| -void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - static const char descriptor[] = {
|
| - "\n\032google/protobuf/type.proto\022\017google.pro"
|
| - "tobuf\032\031google/protobuf/any.proto\032$google"
|
| - "/protobuf/source_context.proto\"\327\001\n\004Type\022"
|
| - "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
|
| - "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
|
| - "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
|
| - "e_context\030\005 \001(\0132\036.google.protobuf.Source"
|
| - "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
|
| - "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
|
| - "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
|
| - "(\0162\".google.protobuf.Field.Cardinality\022\016"
|
| - "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
|
| - "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
|
| - "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
|
| - "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
|
| - "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
|
| - "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
|
| - "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
|
| - "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
|
| - "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
|
| - "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
|
| - "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
|
| - "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
|
| - "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
|
| - "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
|
| - "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
|
| - "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
|
| - "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
|
| - "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
|
| - "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
|
| - "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
|
| - "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
|
| - "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
|
| - "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
|
| - "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
|
| - "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
|
| - "\022\021\n\rSYNTAX_PROTO3\020\001B}\n\023com.google.protob"
|
| - "ufB\tTypeProtoP\001Z/google.golang.org/genpr"
|
| - "oto/protobuf/ptype;ptype\370\001\001\242\002\003GPB\252\002\036Goog"
|
| - "le.Protobuf.WellKnownTypesb\006proto3"
|
| - };
|
| + ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
|
| + ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
|
| ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
| - descriptor, 1594);
|
| + "\n\032google/protobuf/type.proto\022\017google.pro"
|
| + "tobuf\032\031google/protobuf/any.proto\032$google"
|
| + "/protobuf/source_context.proto\"\327\001\n\004Type\022"
|
| + "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p"
|
| + "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options"
|
| + "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc"
|
| + "e_context\030\005 \001(\0132\036.google.protobuf.Source"
|
| + "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu"
|
| + "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl"
|
| + "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001"
|
| + "(\0162\".google.protobuf.Field.Cardinality\022\016"
|
| + "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url"
|
| + "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 "
|
| + "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O"
|
| + "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu"
|
| + "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY"
|
| + "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6"
|
| + "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014"
|
| + "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE"
|
| + "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n"
|
| + "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY"
|
| + "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE"
|
| + "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020"
|
| + "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR"
|
| + "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION"
|
| + "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN"
|
| + "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022"
|
| + "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu"
|
| + "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu"
|
| + "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl"
|
| + "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016"
|
| + "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014"
|
| + "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030"
|
| + "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option"
|
| + "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p"
|
| + "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000"
|
| + "\022\021\n\rSYNTAX_PROTO3\020\001BL\n\023com.google.protob"
|
| + "ufB\tTypeProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protob"
|
| + "uf.WellKnownTypesb\006proto3", 1545);
|
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
| "google/protobuf/type.proto", &protobuf_RegisterTypes);
|
| - ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
|
| - ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto();
|
| + Type::default_instance_ = new Type();
|
| + Field::default_instance_ = new Field();
|
| + Enum::default_instance_ = new Enum();
|
| + EnumValue::default_instance_ = new EnumValue();
|
| + Option::default_instance_ = new Option();
|
| + Type::default_instance_->InitAsDefaultInstance();
|
| + Field::default_instance_->InitAsDefaultInstance();
|
| + Enum::default_instance_->InitAsDefaultInstance();
|
| + EnumValue::default_instance_->InitAsDefaultInstance();
|
| + Option::default_instance_->InitAsDefaultInstance();
|
| ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto);
|
| }
|
|
|
| -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_once_);
|
| -void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() {
|
| - ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_once_,
|
| - &protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl);
|
| -}
|
| // Force AddDescriptors() to be called at static initialization time.
|
| struct StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto {
|
| StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto() {
|
| protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| }
|
| } static_descriptor_initializer_google_2fprotobuf_2ftype_2eproto_;
|
| -const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() {
|
| +const ::google::protobuf::EnumDescriptor* Syntax_descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_enum_descriptors[0];
|
| + return Syntax_descriptor_;
|
| }
|
| -bool Field_Kind_IsValid(int value) {
|
| - switch (value) {
|
| +bool Syntax_IsValid(int value) {
|
| + switch(value) {
|
| case 0:
|
| case 1:
|
| - case 2:
|
| - case 3:
|
| - case 4:
|
| - case 5:
|
| - case 6:
|
| - case 7:
|
| - case 8:
|
| - case 9:
|
| - case 10:
|
| - case 11:
|
| - case 12:
|
| - case 13:
|
| - case 14:
|
| - case 15:
|
| - case 16:
|
| - case 17:
|
| - case 18:
|
| return true;
|
| default:
|
| return false;
|
| }
|
| }
|
|
|
| -#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| -const Field_Kind Field::TYPE_UNKNOWN;
|
| -const Field_Kind Field::TYPE_DOUBLE;
|
| -const Field_Kind Field::TYPE_FLOAT;
|
| -const Field_Kind Field::TYPE_INT64;
|
| -const Field_Kind Field::TYPE_UINT64;
|
| -const Field_Kind Field::TYPE_INT32;
|
| -const Field_Kind Field::TYPE_FIXED64;
|
| -const Field_Kind Field::TYPE_FIXED32;
|
| -const Field_Kind Field::TYPE_BOOL;
|
| -const Field_Kind Field::TYPE_STRING;
|
| -const Field_Kind Field::TYPE_GROUP;
|
| -const Field_Kind Field::TYPE_MESSAGE;
|
| -const Field_Kind Field::TYPE_BYTES;
|
| -const Field_Kind Field::TYPE_UINT32;
|
| -const Field_Kind Field::TYPE_ENUM;
|
| -const Field_Kind Field::TYPE_SFIXED32;
|
| -const Field_Kind Field::TYPE_SFIXED64;
|
| -const Field_Kind Field::TYPE_SINT32;
|
| -const Field_Kind Field::TYPE_SINT64;
|
| -const Field_Kind Field::Kind_MIN;
|
| -const Field_Kind Field::Kind_MAX;
|
| -const int Field::Kind_ARRAYSIZE;
|
| -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
| -const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() {
|
| - protobuf_AssignDescriptorsOnce();
|
| - return file_level_enum_descriptors[1];
|
| -}
|
| -bool Field_Cardinality_IsValid(int value) {
|
| - switch (value) {
|
| - case 0:
|
| - case 1:
|
| - case 2:
|
| - case 3:
|
| - return true;
|
| - default:
|
| - return false;
|
| - }
|
| -}
|
|
|
| -#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| -const Field_Cardinality Field::CARDINALITY_UNKNOWN;
|
| -const Field_Cardinality Field::CARDINALITY_OPTIONAL;
|
| -const Field_Cardinality Field::CARDINALITY_REQUIRED;
|
| -const Field_Cardinality Field::CARDINALITY_REPEATED;
|
| -const Field_Cardinality Field::Cardinality_MIN;
|
| -const Field_Cardinality Field::Cardinality_MAX;
|
| -const int Field::Cardinality_ARRAYSIZE;
|
| -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
| -const ::google::protobuf::EnumDescriptor* Syntax_descriptor() {
|
| - protobuf_AssignDescriptorsOnce();
|
| - return file_level_enum_descriptors[2];
|
| -}
|
| -bool Syntax_IsValid(int value) {
|
| - switch (value) {
|
| - case 0:
|
| - case 1:
|
| - return true;
|
| - default:
|
| - return false;
|
| - }
|
| +namespace {
|
| +
|
| +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
|
| +static void MergeFromFail(int line) {
|
| + GOOGLE_CHECK(false) << __FILE__ << ":" << line;
|
| }
|
|
|
| +} // namespace
|
| +
|
|
|
| // ===================================================================
|
|
|
| -void Type::_slow_mutable_source_context() {
|
| - source_context_ = ::google::protobuf::Arena::Create< ::google::protobuf::SourceContext >(
|
| - GetArenaNoVirtual());
|
| -}
|
| -::google::protobuf::SourceContext* Type::_slow_release_source_context() {
|
| - if (source_context_ == NULL) {
|
| - return NULL;
|
| - } else {
|
| - ::google::protobuf::SourceContext* temp = new ::google::protobuf::SourceContext(*source_context_);
|
| - source_context_ = NULL;
|
| - return temp;
|
| - }
|
| -}
|
| -::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.source_context)
|
| -
|
| - ::google::protobuf::SourceContext* temp = source_context_;
|
| - source_context_ = NULL;
|
| - return temp;
|
| -}
|
| -void Type::unsafe_arena_set_allocated_source_context(
|
| - ::google::protobuf::SourceContext* source_context) {
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete source_context_;
|
| - }
|
| - source_context_ = source_context;
|
| - if (source_context) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.source_context)
|
| -}
|
| #if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| const int Type::kNameFieldNumber;
|
| const int Type::kFieldsFieldNumber;
|
| @@ -371,52 +295,30 @@ const int Type::kSyntaxFieldNumber;
|
|
|
| Type::Type()
|
| : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
| - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - }
|
| SharedCtor();
|
| // @@protoc_insertion_point(constructor:google.protobuf.Type)
|
| }
|
| -Type::Type(::google::protobuf::Arena* arena)
|
| - : ::google::protobuf::Message(),
|
| - _internal_metadata_(arena),
|
| - fields_(arena),
|
| - oneofs_(arena),
|
| - options_(arena) {
|
| -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - SharedCtor();
|
| - RegisterArenaDtor(arena);
|
| - // @@protoc_insertion_point(arena_constructor:google.protobuf.Type)
|
| +
|
| +void Type::InitAsDefaultInstance() {
|
| + _is_default_instance_ = true;
|
| + source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::protobuf::SourceContext::default_instance());
|
| }
|
| +
|
| Type::Type(const Type& from)
|
| : ::google::protobuf::Message(),
|
| - _internal_metadata_(NULL),
|
| - fields_(from.fields_),
|
| - oneofs_(from.oneofs_),
|
| - options_(from.options_),
|
| - _cached_size_(0) {
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.name().size() > 0) {
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - if (from.has_source_context()) {
|
| - source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
|
| - } else {
|
| - source_context_ = NULL;
|
| - }
|
| - syntax_ = from.syntax_;
|
| + _internal_metadata_(NULL) {
|
| + SharedCtor();
|
| + MergeFrom(from);
|
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Type)
|
| }
|
|
|
| void Type::SharedCtor() {
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - ::memset(&source_context_, 0, reinterpret_cast<char*>(&syntax_) -
|
| - reinterpret_cast<char*>(&source_context_) + sizeof(syntax_));
|
| + _is_default_instance_ = false;
|
| + ::google::protobuf::internal::GetEmptyString();
|
| _cached_size_ = 0;
|
| + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + source_context_ = NULL;
|
| + syntax_ = 0;
|
| }
|
|
|
| Type::~Type() {
|
| @@ -425,23 +327,12 @@ Type::~Type() {
|
| }
|
|
|
| void Type::SharedDtor() {
|
| - ::google::protobuf::Arena* arena = GetArenaNoVirtual();
|
| - if (arena != NULL) {
|
| - return;
|
| - }
|
| -
|
| - name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - if (this != internal_default_instance()) {
|
| + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (this != default_instance_) {
|
| delete source_context_;
|
| }
|
| }
|
|
|
| -void Type::ArenaDtor(void* object) {
|
| - Type* _this = reinterpret_cast< Type* >(object);
|
| - (void)_this;
|
| -}
|
| -void Type::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
| -}
|
| void Type::SetCachedSize(int size) const {
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| _cached_size_ = size;
|
| @@ -449,29 +340,33 @@ void Type::SetCachedSize(int size) const {
|
| }
|
| const ::google::protobuf::Descriptor* Type::descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[0].descriptor;
|
| + return Type_descriptor_;
|
| }
|
|
|
| const Type& Type::default_instance() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - return *internal_default_instance();
|
| + if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + return *default_instance_;
|
| }
|
|
|
| +Type* Type::default_instance_ = NULL;
|
| +
|
| Type* Type::New(::google::protobuf::Arena* arena) const {
|
| - return ::google::protobuf::Arena::CreateMessage<Type>(arena);
|
| + Type* n = new Type;
|
| + if (arena != NULL) {
|
| + arena->Own(n);
|
| + }
|
| + return n;
|
| }
|
|
|
| void Type::Clear() {
|
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Type)
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
|
| + source_context_ = NULL;
|
| + syntax_ = 0;
|
| fields_.Clear();
|
| oneofs_.Clear();
|
| options_.Clear();
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
|
| - delete source_context_;
|
| - }
|
| - source_context_ = NULL;
|
| - syntax_ = 0;
|
| }
|
|
|
| bool Type::MergePartialFromCodedStream(
|
| @@ -480,13 +375,13 @@ bool Type::MergePartialFromCodedStream(
|
| ::google::protobuf::uint32 tag;
|
| // @@protoc_insertion_point(parse_start:google.protobuf.Type)
|
| for (;;) {
|
| - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
| + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
| tag = p.first;
|
| if (!p.second) goto handle_unusual;
|
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| case 1: {
|
| - if (tag == 10u) {
|
| + if (tag == 10) {
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -496,25 +391,31 @@ bool Type::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(18)) goto parse_fields;
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.Field fields = 2;
|
| case 2: {
|
| - if (tag == 18u) {
|
| + if (tag == 18) {
|
| + parse_fields:
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_fields:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_fields()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(18)) goto parse_loop_fields;
|
| input->UnsafeDecrementRecursionDepth();
|
| + if (input->ExpectTag(26)) goto parse_oneofs;
|
| break;
|
| }
|
|
|
| // repeated string oneofs = 3;
|
| case 3: {
|
| - if (tag == 26u) {
|
| + if (tag == 26) {
|
| + parse_oneofs:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->add_oneofs()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -525,36 +426,45 @@ bool Type::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(26)) goto parse_oneofs;
|
| + if (input->ExpectTag(34)) goto parse_options;
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.Option options = 4;
|
| case 4: {
|
| - if (tag == 34u) {
|
| + if (tag == 34) {
|
| + parse_options:
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_options:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_options()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(34)) goto parse_loop_options;
|
| input->UnsafeDecrementRecursionDepth();
|
| + if (input->ExpectTag(42)) goto parse_source_context;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 5;
|
| + // optional .google.protobuf.SourceContext source_context = 5;
|
| case 5: {
|
| - if (tag == 42u) {
|
| + if (tag == 42) {
|
| + parse_source_context:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
| input, mutable_source_context()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(48)) goto parse_syntax;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 6;
|
| + // optional .google.protobuf.Syntax syntax = 6;
|
| case 6: {
|
| - if (tag == 48u) {
|
| + if (tag == 48) {
|
| + parse_syntax:
|
| int value;
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
| @@ -563,6 +473,7 @@ bool Type::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectAtEnd()) goto success;
|
| break;
|
| }
|
|
|
| @@ -590,7 +501,7 @@ failure:
|
| void Type::SerializeWithCachedSizes(
|
| ::google::protobuf::io::CodedOutputStream* output) const {
|
| // @@protoc_insertion_point(serialize_start:google.protobuf.Type)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -622,13 +533,13 @@ void Type::SerializeWithCachedSizes(
|
| 4, this->options(i), output);
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 5;
|
| + // optional .google.protobuf.SourceContext source_context = 5;
|
| if (this->has_source_context()) {
|
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
| 5, *this->source_context_, output);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 6;
|
| + // optional .google.protobuf.Syntax syntax = 6;
|
| if (this->syntax() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteEnum(
|
| 6, this->syntax(), output);
|
| @@ -637,11 +548,10 @@ void Type::SerializeWithCachedSizes(
|
| // @@protoc_insertion_point(serialize_end:google.protobuf.Type)
|
| }
|
|
|
| -::google::protobuf::uint8* Type::InternalSerializeWithCachedSizesToArray(
|
| - bool deterministic, ::google::protobuf::uint8* target) const {
|
| - (void)deterministic; // Unused
|
| +::google::protobuf::uint8* Type::SerializeWithCachedSizesToArray(
|
| + ::google::protobuf::uint8* target) const {
|
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -655,8 +565,8 @@ void Type::SerializeWithCachedSizes(
|
| // repeated .google.protobuf.Field fields = 2;
|
| for (unsigned int i = 0, n = this->fields_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 2, this->fields(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 2, this->fields(i), target);
|
| }
|
|
|
| // repeated string oneofs = 3;
|
| @@ -672,18 +582,18 @@ void Type::SerializeWithCachedSizes(
|
| // repeated .google.protobuf.Option options = 4;
|
| for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 4, this->options(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 4, this->options(i), target);
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 5;
|
| + // optional .google.protobuf.SourceContext source_context = 5;
|
| if (this->has_source_context()) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 5, *this->source_context_, false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 5, *this->source_context_, target);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 6;
|
| + // optional .google.protobuf.Syntax syntax = 6;
|
| if (this->syntax() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
| 6, this->syntax(), target);
|
| @@ -693,71 +603,63 @@ void Type::SerializeWithCachedSizes(
|
| return target;
|
| }
|
|
|
| -size_t Type::ByteSizeLong() const {
|
| +int Type::ByteSize() const {
|
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type)
|
| - size_t total_size = 0;
|
| + int total_size = 0;
|
|
|
| - // repeated .google.protobuf.Field fields = 2;
|
| - {
|
| - unsigned int count = this->fields_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->fields(i));
|
| - }
|
| - }
|
| -
|
| - // repeated string oneofs = 3;
|
| - total_size += 1 *
|
| - ::google::protobuf::internal::FromIntSize(this->oneofs_size());
|
| - for (int i = 0; i < this->oneofs_size(); i++) {
|
| - total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
|
| - this->oneofs(i));
|
| - }
|
| -
|
| - // repeated .google.protobuf.Option options = 4;
|
| - {
|
| - unsigned int count = this->options_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->options(i));
|
| - }
|
| - }
|
| -
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| this->name());
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 5;
|
| + // optional .google.protobuf.SourceContext source_context = 5;
|
| if (this->has_source_context()) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| *this->source_context_);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 6;
|
| + // optional .google.protobuf.Syntax syntax = 6;
|
| if (this->syntax() != 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
|
| }
|
|
|
| - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
| + // repeated .google.protobuf.Field fields = 2;
|
| + total_size += 1 * this->fields_size();
|
| + for (int i = 0; i < this->fields_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->fields(i));
|
| + }
|
| +
|
| + // repeated string oneofs = 3;
|
| + total_size += 1 * this->oneofs_size();
|
| + for (int i = 0; i < this->oneofs_size(); i++) {
|
| + total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
|
| + this->oneofs(i));
|
| + }
|
| +
|
| + // repeated .google.protobuf.Option options = 4;
|
| + total_size += 1 * this->options_size();
|
| + for (int i = 0; i < this->options_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->options(i));
|
| + }
|
| +
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| - _cached_size_ = cached_size;
|
| + _cached_size_ = total_size;
|
| GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
| return total_size;
|
| }
|
|
|
| void Type::MergeFrom(const ::google::protobuf::Message& from) {
|
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - const Type* source =
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| + const Type* source =
|
| ::google::protobuf::internal::DynamicCastToGenerated<const Type>(
|
| &from);
|
| if (source == NULL) {
|
| @@ -771,13 +673,13 @@ void Type::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
| void Type::MergeFrom(const Type& from) {
|
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| fields_.MergeFrom(from.fields_);
|
| oneofs_.MergeFrom(from.oneofs_);
|
| options_.MergeFrom(from.options_);
|
| if (from.name().size() > 0) {
|
| - set_name(from.name());
|
| +
|
| + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
|
| }
|
| if (from.has_source_context()) {
|
| mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
|
| @@ -802,111 +704,79 @@ void Type::CopyFrom(const Type& from) {
|
| }
|
|
|
| bool Type::IsInitialized() const {
|
| +
|
| return true;
|
| }
|
|
|
| void Type::Swap(Type* other) {
|
| if (other == this) return;
|
| - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
| - InternalSwap(other);
|
| - } else {
|
| - Type* temp = New(GetArenaNoVirtual());
|
| - temp->MergeFrom(*other);
|
| - other->CopyFrom(*this);
|
| - InternalSwap(temp);
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete temp;
|
| - }
|
| - }
|
| -}
|
| -void Type::UnsafeArenaSwap(Type* other) {
|
| - if (other == this) return;
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
| InternalSwap(other);
|
| }
|
| void Type::InternalSwap(Type* other) {
|
| + name_.Swap(&other->name_);
|
| fields_.UnsafeArenaSwap(&other->fields_);
|
| oneofs_.UnsafeArenaSwap(&other->oneofs_);
|
| options_.UnsafeArenaSwap(&other->options_);
|
| - name_.Swap(&other->name_);
|
| std::swap(source_context_, other->source_context_);
|
| std::swap(syntax_, other->syntax_);
|
| + _internal_metadata_.Swap(&other->_internal_metadata_);
|
| std::swap(_cached_size_, other->_cached_size_);
|
| }
|
|
|
| ::google::protobuf::Metadata Type::GetMetadata() const {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[0];
|
| + ::google::protobuf::Metadata metadata;
|
| + metadata.descriptor = Type_descriptor_;
|
| + metadata.reflection = Type_reflection_;
|
| + return metadata;
|
| }
|
|
|
| #if PROTOBUF_INLINE_NOT_IN_HEADERS
|
| // Type
|
|
|
| -// string name = 1;
|
| +// optional string name = 1;
|
| void Type::clear_name() {
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Type::name() const {
|
| + const ::std::string& Type::name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Type.name)
|
| - return name_.Get();
|
| + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Type::set_name(const ::std::string& value) {
|
| + void Type::set_name(const ::std::string& value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Type.name)
|
| }
|
| -void Type::set_name(const char* value) {
|
| + void Type::set_name(const char* value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name)
|
| }
|
| -void Type::set_name(const char* value,
|
| - size_t size) {
|
| + void Type::set_name(const char* value, size_t size) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name)
|
| }
|
| -::std::string* Type::mutable_name() {
|
| + ::std::string* Type::mutable_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name)
|
| - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Type::release_name() {
|
| + ::std::string* Type::release_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Type.name)
|
|
|
| - return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Type::unsafe_arena_release_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| -}
|
| -void Type::set_allocated_name(::std::string* name) {
|
| + void Type::set_allocated_name(::std::string* name) {
|
| if (name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name,
|
| - GetArenaNoVirtual());
|
| + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name)
|
| }
|
| -void Type::unsafe_arena_set_allocated_name(
|
| - ::std::string* name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Type.name)
|
| -}
|
|
|
| // repeated .google.protobuf.Field fields = 2;
|
| int Type::fields_size() const {
|
| @@ -945,49 +815,49 @@ int Type::oneofs_size() const {
|
| void Type::clear_oneofs() {
|
| oneofs_.Clear();
|
| }
|
| -const ::std::string& Type::oneofs(int index) const {
|
| + const ::std::string& Type::oneofs(int index) const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs)
|
| return oneofs_.Get(index);
|
| }
|
| -::std::string* Type::mutable_oneofs(int index) {
|
| + ::std::string* Type::mutable_oneofs(int index) {
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs)
|
| return oneofs_.Mutable(index);
|
| }
|
| -void Type::set_oneofs(int index, const ::std::string& value) {
|
| + void Type::set_oneofs(int index, const ::std::string& value) {
|
| // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
|
| oneofs_.Mutable(index)->assign(value);
|
| }
|
| -void Type::set_oneofs(int index, const char* value) {
|
| + void Type::set_oneofs(int index, const char* value) {
|
| oneofs_.Mutable(index)->assign(value);
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
|
| }
|
| -void Type::set_oneofs(int index, const char* value, size_t size) {
|
| + void Type::set_oneofs(int index, const char* value, size_t size) {
|
| oneofs_.Mutable(index)->assign(
|
| reinterpret_cast<const char*>(value), size);
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs)
|
| }
|
| -::std::string* Type::add_oneofs() {
|
| + ::std::string* Type::add_oneofs() {
|
| // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs)
|
| return oneofs_.Add();
|
| }
|
| -void Type::add_oneofs(const ::std::string& value) {
|
| + void Type::add_oneofs(const ::std::string& value) {
|
| oneofs_.Add()->assign(value);
|
| // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
|
| }
|
| -void Type::add_oneofs(const char* value) {
|
| + void Type::add_oneofs(const char* value) {
|
| oneofs_.Add()->assign(value);
|
| // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
|
| }
|
| -void Type::add_oneofs(const char* value, size_t size) {
|
| + void Type::add_oneofs(const char* value, size_t size) {
|
| oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size);
|
| // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs)
|
| }
|
| -const ::google::protobuf::RepeatedPtrField< ::std::string>&
|
| + const ::google::protobuf::RepeatedPtrField< ::std::string>&
|
| Type::oneofs() const {
|
| // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs)
|
| return oneofs_;
|
| }
|
| -::google::protobuf::RepeatedPtrField< ::std::string>*
|
| + ::google::protobuf::RepeatedPtrField< ::std::string>*
|
| Type::mutable_oneofs() {
|
| // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs)
|
| return &oneofs_;
|
| @@ -1023,9 +893,9 @@ Type::options() const {
|
| return options_;
|
| }
|
|
|
| -// .google.protobuf.SourceContext source_context = 5;
|
| +// optional .google.protobuf.SourceContext source_context = 5;
|
| bool Type::has_source_context() const {
|
| - return this != internal_default_instance() && source_context_ != NULL;
|
| + return !_is_default_instance_ && source_context_ != NULL;
|
| }
|
| void Type::clear_source_context() {
|
| if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
|
| @@ -1033,13 +903,12 @@ void Type::clear_source_context() {
|
| }
|
| const ::google::protobuf::SourceContext& Type::source_context() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context)
|
| - return source_context_ != NULL ? *source_context_
|
| - : *::google::protobuf::SourceContext::internal_default_instance();
|
| + return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
|
| }
|
| ::google::protobuf::SourceContext* Type::mutable_source_context() {
|
|
|
| if (source_context_ == NULL) {
|
| - _slow_mutable_source_context();
|
| + source_context_ = new ::google::protobuf::SourceContext;
|
| }
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context)
|
| return source_context_;
|
| @@ -1047,24 +916,12 @@ const ::google::protobuf::SourceContext& Type::source_context() const {
|
| ::google::protobuf::SourceContext* Type::release_source_context() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context)
|
|
|
| - if (GetArenaNoVirtual() != NULL) {
|
| - return _slow_release_source_context();
|
| - } else {
|
| - ::google::protobuf::SourceContext* temp = source_context_;
|
| - source_context_ = NULL;
|
| - return temp;
|
| - }
|
| + ::google::protobuf::SourceContext* temp = source_context_;
|
| + source_context_ = NULL;
|
| + return temp;
|
| }
|
| - void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
|
| - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
| - if (message_arena == NULL) {
|
| - delete source_context_;
|
| - }
|
| - if (source_context != NULL) {
|
| - if (message_arena != NULL) {
|
| - message_arena->Own(source_context);
|
| - }
|
| - }
|
| +void Type::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
|
| + delete source_context_;
|
| source_context_ = source_context;
|
| if (source_context) {
|
|
|
| @@ -1074,15 +931,15 @@ const ::google::protobuf::SourceContext& Type::source_context() const {
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_context)
|
| }
|
|
|
| -// .google.protobuf.Syntax syntax = 6;
|
| +// optional .google.protobuf.Syntax syntax = 6;
|
| void Type::clear_syntax() {
|
| syntax_ = 0;
|
| }
|
| -::google::protobuf::Syntax Type::syntax() const {
|
| + ::google::protobuf::Syntax Type::syntax() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax)
|
| return static_cast< ::google::protobuf::Syntax >(syntax_);
|
| }
|
| -void Type::set_syntax(::google::protobuf::Syntax value) {
|
| + void Type::set_syntax(::google::protobuf::Syntax value) {
|
|
|
| syntax_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax)
|
| @@ -1092,6 +949,86 @@ void Type::set_syntax(::google::protobuf::Syntax value) {
|
|
|
| // ===================================================================
|
|
|
| +const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() {
|
| + protobuf_AssignDescriptorsOnce();
|
| + return Field_Kind_descriptor_;
|
| +}
|
| +bool Field_Kind_IsValid(int value) {
|
| + switch(value) {
|
| + case 0:
|
| + case 1:
|
| + case 2:
|
| + case 3:
|
| + case 4:
|
| + case 5:
|
| + case 6:
|
| + case 7:
|
| + case 8:
|
| + case 9:
|
| + case 10:
|
| + case 11:
|
| + case 12:
|
| + case 13:
|
| + case 14:
|
| + case 15:
|
| + case 16:
|
| + case 17:
|
| + case 18:
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| +}
|
| +
|
| +#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| +const Field_Kind Field::TYPE_UNKNOWN;
|
| +const Field_Kind Field::TYPE_DOUBLE;
|
| +const Field_Kind Field::TYPE_FLOAT;
|
| +const Field_Kind Field::TYPE_INT64;
|
| +const Field_Kind Field::TYPE_UINT64;
|
| +const Field_Kind Field::TYPE_INT32;
|
| +const Field_Kind Field::TYPE_FIXED64;
|
| +const Field_Kind Field::TYPE_FIXED32;
|
| +const Field_Kind Field::TYPE_BOOL;
|
| +const Field_Kind Field::TYPE_STRING;
|
| +const Field_Kind Field::TYPE_GROUP;
|
| +const Field_Kind Field::TYPE_MESSAGE;
|
| +const Field_Kind Field::TYPE_BYTES;
|
| +const Field_Kind Field::TYPE_UINT32;
|
| +const Field_Kind Field::TYPE_ENUM;
|
| +const Field_Kind Field::TYPE_SFIXED32;
|
| +const Field_Kind Field::TYPE_SFIXED64;
|
| +const Field_Kind Field::TYPE_SINT32;
|
| +const Field_Kind Field::TYPE_SINT64;
|
| +const Field_Kind Field::Kind_MIN;
|
| +const Field_Kind Field::Kind_MAX;
|
| +const int Field::Kind_ARRAYSIZE;
|
| +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
| +const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() {
|
| + protobuf_AssignDescriptorsOnce();
|
| + return Field_Cardinality_descriptor_;
|
| +}
|
| +bool Field_Cardinality_IsValid(int value) {
|
| + switch(value) {
|
| + case 0:
|
| + case 1:
|
| + case 2:
|
| + case 3:
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| +}
|
| +
|
| +#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| +const Field_Cardinality Field::CARDINALITY_UNKNOWN;
|
| +const Field_Cardinality Field::CARDINALITY_OPTIONAL;
|
| +const Field_Cardinality Field::CARDINALITY_REQUIRED;
|
| +const Field_Cardinality Field::CARDINALITY_REPEATED;
|
| +const Field_Cardinality Field::Cardinality_MIN;
|
| +const Field_Cardinality Field::Cardinality_MAX;
|
| +const int Field::Cardinality_ARRAYSIZE;
|
| +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
| #if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| const int Field::kKindFieldNumber;
|
| const int Field::kCardinalityFieldNumber;
|
| @@ -1107,63 +1044,35 @@ const int Field::kDefaultValueFieldNumber;
|
|
|
| Field::Field()
|
| : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
| - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - }
|
| SharedCtor();
|
| // @@protoc_insertion_point(constructor:google.protobuf.Field)
|
| }
|
| -Field::Field(::google::protobuf::Arena* arena)
|
| - : ::google::protobuf::Message(),
|
| - _internal_metadata_(arena),
|
| - options_(arena) {
|
| -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - SharedCtor();
|
| - RegisterArenaDtor(arena);
|
| - // @@protoc_insertion_point(arena_constructor:google.protobuf.Field)
|
| +
|
| +void Field::InitAsDefaultInstance() {
|
| + _is_default_instance_ = true;
|
| }
|
| +
|
| Field::Field(const Field& from)
|
| : ::google::protobuf::Message(),
|
| - _internal_metadata_(NULL),
|
| - options_(from.options_),
|
| - _cached_size_(0) {
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.name().size() > 0) {
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.type_url().size() > 0) {
|
| - type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.json_name().size() > 0) {
|
| - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.default_value().size() > 0) {
|
| - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - ::memcpy(&kind_, &from.kind_,
|
| - reinterpret_cast<char*>(&packed_) -
|
| - reinterpret_cast<char*>(&kind_) + sizeof(packed_));
|
| + _internal_metadata_(NULL) {
|
| + SharedCtor();
|
| + MergeFrom(from);
|
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Field)
|
| }
|
|
|
| void Field::SharedCtor() {
|
| + _is_default_instance_ = false;
|
| + ::google::protobuf::internal::GetEmptyString();
|
| + _cached_size_ = 0;
|
| + kind_ = 0;
|
| + cardinality_ = 0;
|
| + number_ = 0;
|
| name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + oneof_index_ = 0;
|
| + packed_ = false;
|
| json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - ::memset(&kind_, 0, reinterpret_cast<char*>(&packed_) -
|
| - reinterpret_cast<char*>(&kind_) + sizeof(packed_));
|
| - _cached_size_ = 0;
|
| }
|
|
|
| Field::~Field() {
|
| @@ -1172,23 +1081,14 @@ Field::~Field() {
|
| }
|
|
|
| void Field::SharedDtor() {
|
| - ::google::protobuf::Arena* arena = GetArenaNoVirtual();
|
| - if (arena != NULL) {
|
| - return;
|
| + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (this != default_instance_) {
|
| }
|
| -
|
| - name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - type_url_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - json_name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - default_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| }
|
|
|
| -void Field::ArenaDtor(void* object) {
|
| - Field* _this = reinterpret_cast< Field* >(object);
|
| - (void)_this;
|
| -}
|
| -void Field::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
| -}
|
| void Field::SetCachedSize(int size) const {
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| _cached_size_ = size;
|
| @@ -1196,27 +1096,54 @@ void Field::SetCachedSize(int size) const {
|
| }
|
| const ::google::protobuf::Descriptor* Field::descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[1].descriptor;
|
| + return Field_descriptor_;
|
| }
|
|
|
| const Field& Field::default_instance() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - return *internal_default_instance();
|
| + if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + return *default_instance_;
|
| }
|
|
|
| +Field* Field::default_instance_ = NULL;
|
| +
|
| Field* Field::New(::google::protobuf::Arena* arena) const {
|
| - return ::google::protobuf::Arena::CreateMessage<Field>(arena);
|
| + Field* n = new Field;
|
| + if (arena != NULL) {
|
| + arena->Own(n);
|
| + }
|
| + return n;
|
| }
|
|
|
| void Field::Clear() {
|
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Field)
|
| +#if defined(__clang__)
|
| +#define ZR_HELPER_(f) \
|
| + _Pragma("clang diagnostic push") \
|
| + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
|
| + __builtin_offsetof(Field, f) \
|
| + _Pragma("clang diagnostic pop")
|
| +#else
|
| +#define ZR_HELPER_(f) reinterpret_cast<char*>(\
|
| + &reinterpret_cast<Field*>(16)->f)
|
| +#endif
|
| +
|
| +#define ZR_(first, last) do {\
|
| + ::memset(&first, 0,\
|
| + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
|
| +} while (0)
|
| +
|
| + ZR_(kind_, cardinality_);
|
| + ZR_(number_, oneof_index_);
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + packed_ = false;
|
| + json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| +
|
| +#undef ZR_HELPER_
|
| +#undef ZR_
|
| +
|
| options_.Clear();
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - type_url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - json_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - ::memset(&kind_, 0, reinterpret_cast<char*>(&packed_) -
|
| - reinterpret_cast<char*>(&kind_) + sizeof(packed_));
|
| }
|
|
|
| bool Field::MergePartialFromCodedStream(
|
| @@ -1225,13 +1152,13 @@ bool Field::MergePartialFromCodedStream(
|
| ::google::protobuf::uint32 tag;
|
| // @@protoc_insertion_point(parse_start:google.protobuf.Field)
|
| for (;;) {
|
| - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
| + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
| tag = p.first;
|
| if (!p.second) goto handle_unusual;
|
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
| - // .google.protobuf.Field.Kind kind = 1;
|
| + // optional .google.protobuf.Field.Kind kind = 1;
|
| case 1: {
|
| - if (tag == 8u) {
|
| + if (tag == 8) {
|
| int value;
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
| @@ -1240,12 +1167,14 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(16)) goto parse_cardinality;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.Field.Cardinality cardinality = 2;
|
| + // optional .google.protobuf.Field.Cardinality cardinality = 2;
|
| case 2: {
|
| - if (tag == 16u) {
|
| + if (tag == 16) {
|
| + parse_cardinality:
|
| int value;
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
| @@ -1254,25 +1183,29 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(24)) goto parse_number;
|
| break;
|
| }
|
|
|
| - // int32 number = 3;
|
| + // optional int32 number = 3;
|
| case 3: {
|
| - if (tag == 24u) {
|
| -
|
| + if (tag == 24) {
|
| + parse_number:
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
| input, &number_)));
|
| +
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(34)) goto parse_name;
|
| break;
|
| }
|
|
|
| - // string name = 4;
|
| + // optional string name = 4;
|
| case 4: {
|
| - if (tag == 34u) {
|
| + if (tag == 34) {
|
| + parse_name:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -1282,12 +1215,14 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(50)) goto parse_type_url;
|
| break;
|
| }
|
|
|
| - // string type_url = 6;
|
| + // optional string type_url = 6;
|
| case 6: {
|
| - if (tag == 50u) {
|
| + if (tag == 50) {
|
| + parse_type_url:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_type_url()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -1297,51 +1232,61 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(56)) goto parse_oneof_index;
|
| break;
|
| }
|
|
|
| - // int32 oneof_index = 7;
|
| + // optional int32 oneof_index = 7;
|
| case 7: {
|
| - if (tag == 56u) {
|
| -
|
| + if (tag == 56) {
|
| + parse_oneof_index:
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
| input, &oneof_index_)));
|
| +
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(64)) goto parse_packed;
|
| break;
|
| }
|
|
|
| - // bool packed = 8;
|
| + // optional bool packed = 8;
|
| case 8: {
|
| - if (tag == 64u) {
|
| -
|
| + if (tag == 64) {
|
| + parse_packed:
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
| input, &packed_)));
|
| +
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(74)) goto parse_options;
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.Option options = 9;
|
| case 9: {
|
| - if (tag == 74u) {
|
| + if (tag == 74) {
|
| + parse_options:
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_options:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_options()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(74)) goto parse_loop_options;
|
| input->UnsafeDecrementRecursionDepth();
|
| + if (input->ExpectTag(82)) goto parse_json_name;
|
| break;
|
| }
|
|
|
| - // string json_name = 10;
|
| + // optional string json_name = 10;
|
| case 10: {
|
| - if (tag == 82u) {
|
| + if (tag == 82) {
|
| + parse_json_name:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_json_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -1351,12 +1296,14 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(90)) goto parse_default_value;
|
| break;
|
| }
|
|
|
| - // string default_value = 11;
|
| + // optional string default_value = 11;
|
| case 11: {
|
| - if (tag == 90u) {
|
| + if (tag == 90) {
|
| + parse_default_value:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_default_value()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -1366,6 +1313,7 @@ bool Field::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectAtEnd()) goto success;
|
| break;
|
| }
|
|
|
| @@ -1393,24 +1341,24 @@ failure:
|
| void Field::SerializeWithCachedSizes(
|
| ::google::protobuf::io::CodedOutputStream* output) const {
|
| // @@protoc_insertion_point(serialize_start:google.protobuf.Field)
|
| - // .google.protobuf.Field.Kind kind = 1;
|
| + // optional .google.protobuf.Field.Kind kind = 1;
|
| if (this->kind() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteEnum(
|
| 1, this->kind(), output);
|
| }
|
|
|
| - // .google.protobuf.Field.Cardinality cardinality = 2;
|
| + // optional .google.protobuf.Field.Cardinality cardinality = 2;
|
| if (this->cardinality() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteEnum(
|
| 2, this->cardinality(), output);
|
| }
|
|
|
| - // int32 number = 3;
|
| + // optional int32 number = 3;
|
| if (this->number() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output);
|
| }
|
|
|
| - // string name = 4;
|
| + // optional string name = 4;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -1420,7 +1368,7 @@ void Field::SerializeWithCachedSizes(
|
| 4, this->name(), output);
|
| }
|
|
|
| - // string type_url = 6;
|
| + // optional string type_url = 6;
|
| if (this->type_url().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->type_url().data(), this->type_url().length(),
|
| @@ -1430,12 +1378,12 @@ void Field::SerializeWithCachedSizes(
|
| 6, this->type_url(), output);
|
| }
|
|
|
| - // int32 oneof_index = 7;
|
| + // optional int32 oneof_index = 7;
|
| if (this->oneof_index() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->oneof_index(), output);
|
| }
|
|
|
| - // bool packed = 8;
|
| + // optional bool packed = 8;
|
| if (this->packed() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->packed(), output);
|
| }
|
| @@ -1446,7 +1394,7 @@ void Field::SerializeWithCachedSizes(
|
| 9, this->options(i), output);
|
| }
|
|
|
| - // string json_name = 10;
|
| + // optional string json_name = 10;
|
| if (this->json_name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->json_name().data(), this->json_name().length(),
|
| @@ -1456,7 +1404,7 @@ void Field::SerializeWithCachedSizes(
|
| 10, this->json_name(), output);
|
| }
|
|
|
| - // string default_value = 11;
|
| + // optional string default_value = 11;
|
| if (this->default_value().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->default_value().data(), this->default_value().length(),
|
| @@ -1469,28 +1417,27 @@ void Field::SerializeWithCachedSizes(
|
| // @@protoc_insertion_point(serialize_end:google.protobuf.Field)
|
| }
|
|
|
| -::google::protobuf::uint8* Field::InternalSerializeWithCachedSizesToArray(
|
| - bool deterministic, ::google::protobuf::uint8* target) const {
|
| - (void)deterministic; // Unused
|
| +::google::protobuf::uint8* Field::SerializeWithCachedSizesToArray(
|
| + ::google::protobuf::uint8* target) const {
|
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field)
|
| - // .google.protobuf.Field.Kind kind = 1;
|
| + // optional .google.protobuf.Field.Kind kind = 1;
|
| if (this->kind() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
| 1, this->kind(), target);
|
| }
|
|
|
| - // .google.protobuf.Field.Cardinality cardinality = 2;
|
| + // optional .google.protobuf.Field.Cardinality cardinality = 2;
|
| if (this->cardinality() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
| 2, this->cardinality(), target);
|
| }
|
|
|
| - // int32 number = 3;
|
| + // optional int32 number = 3;
|
| if (this->number() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target);
|
| }
|
|
|
| - // string name = 4;
|
| + // optional string name = 4;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -1501,7 +1448,7 @@ void Field::SerializeWithCachedSizes(
|
| 4, this->name(), target);
|
| }
|
|
|
| - // string type_url = 6;
|
| + // optional string type_url = 6;
|
| if (this->type_url().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->type_url().data(), this->type_url().length(),
|
| @@ -1512,12 +1459,12 @@ void Field::SerializeWithCachedSizes(
|
| 6, this->type_url(), target);
|
| }
|
|
|
| - // int32 oneof_index = 7;
|
| + // optional int32 oneof_index = 7;
|
| if (this->oneof_index() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->oneof_index(), target);
|
| }
|
|
|
| - // bool packed = 8;
|
| + // optional bool packed = 8;
|
| if (this->packed() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->packed(), target);
|
| }
|
| @@ -1525,11 +1472,11 @@ void Field::SerializeWithCachedSizes(
|
| // repeated .google.protobuf.Option options = 9;
|
| for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 9, this->options(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 9, this->options(i), target);
|
| }
|
|
|
| - // string json_name = 10;
|
| + // optional string json_name = 10;
|
| if (this->json_name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->json_name().data(), this->json_name().length(),
|
| @@ -1540,7 +1487,7 @@ void Field::SerializeWithCachedSizes(
|
| 10, this->json_name(), target);
|
| }
|
|
|
| - // string default_value = 11;
|
| + // optional string default_value = 11;
|
| if (this->default_value().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->default_value().data(), this->default_value().length(),
|
| @@ -1555,91 +1502,87 @@ void Field::SerializeWithCachedSizes(
|
| return target;
|
| }
|
|
|
| -size_t Field::ByteSizeLong() const {
|
| +int Field::ByteSize() const {
|
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field)
|
| - size_t total_size = 0;
|
| + int total_size = 0;
|
|
|
| - // repeated .google.protobuf.Option options = 9;
|
| - {
|
| - unsigned int count = this->options_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->options(i));
|
| - }
|
| + // optional .google.protobuf.Field.Kind kind = 1;
|
| + if (this->kind() != 0) {
|
| + total_size += 1 +
|
| + ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind());
|
| }
|
|
|
| - // string name = 4;
|
| - if (this->name().size() > 0) {
|
| + // optional .google.protobuf.Field.Cardinality cardinality = 2;
|
| + if (this->cardinality() != 0) {
|
| total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::StringSize(
|
| - this->name());
|
| + ::google::protobuf::internal::WireFormatLite::EnumSize(this->cardinality());
|
| }
|
|
|
| - // string type_url = 6;
|
| - if (this->type_url().size() > 0) {
|
| + // optional int32 number = 3;
|
| + if (this->number() != 0) {
|
| total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::StringSize(
|
| - this->type_url());
|
| + ::google::protobuf::internal::WireFormatLite::Int32Size(
|
| + this->number());
|
| }
|
|
|
| - // string json_name = 10;
|
| - if (this->json_name().size() > 0) {
|
| + // optional string name = 4;
|
| + if (this->name().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| - this->json_name());
|
| + this->name());
|
| }
|
|
|
| - // string default_value = 11;
|
| - if (this->default_value().size() > 0) {
|
| + // optional string type_url = 6;
|
| + if (this->type_url().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| - this->default_value());
|
| + this->type_url());
|
| }
|
|
|
| - // .google.protobuf.Field.Kind kind = 1;
|
| - if (this->kind() != 0) {
|
| + // optional int32 oneof_index = 7;
|
| + if (this->oneof_index() != 0) {
|
| total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind());
|
| + ::google::protobuf::internal::WireFormatLite::Int32Size(
|
| + this->oneof_index());
|
| }
|
|
|
| - // .google.protobuf.Field.Cardinality cardinality = 2;
|
| - if (this->cardinality() != 0) {
|
| - total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::EnumSize(this->cardinality());
|
| + // optional bool packed = 8;
|
| + if (this->packed() != 0) {
|
| + total_size += 1 + 1;
|
| }
|
|
|
| - // int32 number = 3;
|
| - if (this->number() != 0) {
|
| + // optional string json_name = 10;
|
| + if (this->json_name().size() > 0) {
|
| total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::Int32Size(
|
| - this->number());
|
| + ::google::protobuf::internal::WireFormatLite::StringSize(
|
| + this->json_name());
|
| }
|
|
|
| - // int32 oneof_index = 7;
|
| - if (this->oneof_index() != 0) {
|
| + // optional string default_value = 11;
|
| + if (this->default_value().size() > 0) {
|
| total_size += 1 +
|
| - ::google::protobuf::internal::WireFormatLite::Int32Size(
|
| - this->oneof_index());
|
| + ::google::protobuf::internal::WireFormatLite::StringSize(
|
| + this->default_value());
|
| }
|
|
|
| - // bool packed = 8;
|
| - if (this->packed() != 0) {
|
| - total_size += 1 + 1;
|
| + // repeated .google.protobuf.Option options = 9;
|
| + total_size += 1 * this->options_size();
|
| + for (int i = 0; i < this->options_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->options(i));
|
| }
|
|
|
| - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| - _cached_size_ = cached_size;
|
| + _cached_size_ = total_size;
|
| GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
| return total_size;
|
| }
|
|
|
| void Field::MergeFrom(const ::google::protobuf::Message& from) {
|
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - const Field* source =
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| + const Field* source =
|
| ::google::protobuf::internal::DynamicCastToGenerated<const Field>(
|
| &from);
|
| if (source == NULL) {
|
| @@ -1653,21 +1596,8 @@ void Field::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
| void Field::MergeFrom(const Field& from) {
|
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Field)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| options_.MergeFrom(from.options_);
|
| - if (from.name().size() > 0) {
|
| - set_name(from.name());
|
| - }
|
| - if (from.type_url().size() > 0) {
|
| - set_type_url(from.type_url());
|
| - }
|
| - if (from.json_name().size() > 0) {
|
| - set_json_name(from.json_name());
|
| - }
|
| - if (from.default_value().size() > 0) {
|
| - set_default_value(from.default_value());
|
| - }
|
| if (from.kind() != 0) {
|
| set_kind(from.kind());
|
| }
|
| @@ -1677,12 +1607,28 @@ void Field::MergeFrom(const Field& from) {
|
| if (from.number() != 0) {
|
| set_number(from.number());
|
| }
|
| + if (from.name().size() > 0) {
|
| +
|
| + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
|
| + }
|
| + if (from.type_url().size() > 0) {
|
| +
|
| + type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
|
| + }
|
| if (from.oneof_index() != 0) {
|
| set_oneof_index(from.oneof_index());
|
| }
|
| if (from.packed() != 0) {
|
| set_packed(from.packed());
|
| }
|
| + if (from.json_name().size() > 0) {
|
| +
|
| + json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name_);
|
| + }
|
| + if (from.default_value().size() > 0) {
|
| +
|
| + default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_);
|
| + }
|
| }
|
|
|
| void Field::CopyFrom(const ::google::protobuf::Message& from) {
|
| @@ -1700,247 +1646,193 @@ void Field::CopyFrom(const Field& from) {
|
| }
|
|
|
| bool Field::IsInitialized() const {
|
| - return true;
|
| -}
|
| -
|
| -void Field::Swap(Field* other) {
|
| - if (other == this) return;
|
| - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
| - InternalSwap(other);
|
| - } else {
|
| - Field* temp = New(GetArenaNoVirtual());
|
| - temp->MergeFrom(*other);
|
| - other->CopyFrom(*this);
|
| - InternalSwap(temp);
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete temp;
|
| - }
|
| - }
|
| +
|
| + return true;
|
| }
|
| -void Field::UnsafeArenaSwap(Field* other) {
|
| +
|
| +void Field::Swap(Field* other) {
|
| if (other == this) return;
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
| InternalSwap(other);
|
| }
|
| void Field::InternalSwap(Field* other) {
|
| - options_.UnsafeArenaSwap(&other->options_);
|
| - name_.Swap(&other->name_);
|
| - type_url_.Swap(&other->type_url_);
|
| - json_name_.Swap(&other->json_name_);
|
| - default_value_.Swap(&other->default_value_);
|
| std::swap(kind_, other->kind_);
|
| std::swap(cardinality_, other->cardinality_);
|
| std::swap(number_, other->number_);
|
| + name_.Swap(&other->name_);
|
| + type_url_.Swap(&other->type_url_);
|
| std::swap(oneof_index_, other->oneof_index_);
|
| std::swap(packed_, other->packed_);
|
| + options_.UnsafeArenaSwap(&other->options_);
|
| + json_name_.Swap(&other->json_name_);
|
| + default_value_.Swap(&other->default_value_);
|
| + _internal_metadata_.Swap(&other->_internal_metadata_);
|
| std::swap(_cached_size_, other->_cached_size_);
|
| }
|
|
|
| ::google::protobuf::Metadata Field::GetMetadata() const {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[1];
|
| + ::google::protobuf::Metadata metadata;
|
| + metadata.descriptor = Field_descriptor_;
|
| + metadata.reflection = Field_reflection_;
|
| + return metadata;
|
| }
|
|
|
| #if PROTOBUF_INLINE_NOT_IN_HEADERS
|
| // Field
|
|
|
| -// .google.protobuf.Field.Kind kind = 1;
|
| +// optional .google.protobuf.Field.Kind kind = 1;
|
| void Field::clear_kind() {
|
| kind_ = 0;
|
| }
|
| -::google::protobuf::Field_Kind Field::kind() const {
|
| + ::google::protobuf::Field_Kind Field::kind() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.kind)
|
| return static_cast< ::google::protobuf::Field_Kind >(kind_);
|
| }
|
| -void Field::set_kind(::google::protobuf::Field_Kind value) {
|
| + void Field::set_kind(::google::protobuf::Field_Kind value) {
|
|
|
| kind_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.kind)
|
| }
|
|
|
| -// .google.protobuf.Field.Cardinality cardinality = 2;
|
| +// optional .google.protobuf.Field.Cardinality cardinality = 2;
|
| void Field::clear_cardinality() {
|
| cardinality_ = 0;
|
| }
|
| -::google::protobuf::Field_Cardinality Field::cardinality() const {
|
| + ::google::protobuf::Field_Cardinality Field::cardinality() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality)
|
| return static_cast< ::google::protobuf::Field_Cardinality >(cardinality_);
|
| }
|
| -void Field::set_cardinality(::google::protobuf::Field_Cardinality value) {
|
| + void Field::set_cardinality(::google::protobuf::Field_Cardinality value) {
|
|
|
| cardinality_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality)
|
| }
|
|
|
| -// int32 number = 3;
|
| +// optional int32 number = 3;
|
| void Field::clear_number() {
|
| number_ = 0;
|
| }
|
| -::google::protobuf::int32 Field::number() const {
|
| + ::google::protobuf::int32 Field::number() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.number)
|
| return number_;
|
| }
|
| -void Field::set_number(::google::protobuf::int32 value) {
|
| + void Field::set_number(::google::protobuf::int32 value) {
|
|
|
| number_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.number)
|
| }
|
|
|
| -// string name = 4;
|
| +// optional string name = 4;
|
| void Field::clear_name() {
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Field::name() const {
|
| + const ::std::string& Field::name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.name)
|
| - return name_.Get();
|
| + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_name(const ::std::string& value) {
|
| + void Field::set_name(const ::std::string& value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.name)
|
| }
|
| -void Field::set_name(const char* value) {
|
| + void Field::set_name(const char* value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name)
|
| }
|
| -void Field::set_name(const char* value,
|
| - size_t size) {
|
| + void Field::set_name(const char* value, size_t size) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name)
|
| }
|
| -::std::string* Field::mutable_name() {
|
| + ::std::string* Field::mutable_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name)
|
| - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Field::release_name() {
|
| + ::std::string* Field::release_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Field.name)
|
|
|
| - return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Field::unsafe_arena_release_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_allocated_name(::std::string* name) {
|
| + void Field::set_allocated_name(::std::string* name) {
|
| if (name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name,
|
| - GetArenaNoVirtual());
|
| + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name)
|
| }
|
| -void Field::unsafe_arena_set_allocated_name(
|
| - ::std::string* name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.name)
|
| -}
|
|
|
| -// string type_url = 6;
|
| +// optional string type_url = 6;
|
| void Field::clear_type_url() {
|
| - type_url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Field::type_url() const {
|
| + const ::std::string& Field::type_url() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url)
|
| - return type_url_.Get();
|
| + return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_type_url(const ::std::string& value) {
|
| + void Field::set_type_url(const ::std::string& value) {
|
|
|
| - type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url)
|
| }
|
| -void Field::set_type_url(const char* value) {
|
| + void Field::set_type_url(const char* value) {
|
|
|
| - type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url)
|
| }
|
| -void Field::set_type_url(const char* value,
|
| - size_t size) {
|
| + void Field::set_type_url(const char* value, size_t size) {
|
|
|
| - type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url)
|
| }
|
| -::std::string* Field::mutable_type_url() {
|
| + ::std::string* Field::mutable_type_url() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url)
|
| - return type_url_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Field::release_type_url() {
|
| + ::std::string* Field::release_type_url() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url)
|
|
|
| - return type_url_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Field::unsafe_arena_release_type_url() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.type_url)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_allocated_type_url(::std::string* type_url) {
|
| + void Field::set_allocated_type_url(::std::string* type_url) {
|
| if (type_url != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - type_url_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url,
|
| - GetArenaNoVirtual());
|
| + type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url)
|
| }
|
| -void Field::unsafe_arena_set_allocated_type_url(
|
| - ::std::string* type_url) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (type_url != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - type_url_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - type_url, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.type_url)
|
| -}
|
|
|
| -// int32 oneof_index = 7;
|
| +// optional int32 oneof_index = 7;
|
| void Field::clear_oneof_index() {
|
| oneof_index_ = 0;
|
| }
|
| -::google::protobuf::int32 Field::oneof_index() const {
|
| + ::google::protobuf::int32 Field::oneof_index() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index)
|
| return oneof_index_;
|
| }
|
| -void Field::set_oneof_index(::google::protobuf::int32 value) {
|
| + void Field::set_oneof_index(::google::protobuf::int32 value) {
|
|
|
| oneof_index_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index)
|
| }
|
|
|
| -// bool packed = 8;
|
| +// optional bool packed = 8;
|
| void Field::clear_packed() {
|
| packed_ = false;
|
| }
|
| -bool Field::packed() const {
|
| + bool Field::packed() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.packed)
|
| return packed_;
|
| }
|
| -void Field::set_packed(bool value) {
|
| + void Field::set_packed(bool value) {
|
|
|
| packed_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.packed)
|
| @@ -1976,175 +1868,98 @@ Field::options() const {
|
| return options_;
|
| }
|
|
|
| -// string json_name = 10;
|
| +// optional string json_name = 10;
|
| void Field::clear_json_name() {
|
| - json_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Field::json_name() const {
|
| + const ::std::string& Field::json_name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name)
|
| - return json_name_.Get();
|
| + return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_json_name(const ::std::string& value) {
|
| + void Field::set_json_name(const ::std::string& value) {
|
|
|
| - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name)
|
| }
|
| -void Field::set_json_name(const char* value) {
|
| + void Field::set_json_name(const char* value) {
|
|
|
| - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name)
|
| }
|
| -void Field::set_json_name(const char* value,
|
| - size_t size) {
|
| + void Field::set_json_name(const char* value, size_t size) {
|
|
|
| - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name)
|
| }
|
| -::std::string* Field::mutable_json_name() {
|
| + ::std::string* Field::mutable_json_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name)
|
| - return json_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Field::release_json_name() {
|
| + ::std::string* Field::release_json_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name)
|
|
|
| - return json_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Field::unsafe_arena_release_json_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.json_name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_allocated_json_name(::std::string* json_name) {
|
| + void Field::set_allocated_json_name(::std::string* json_name) {
|
| if (json_name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - json_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name,
|
| - GetArenaNoVirtual());
|
| + json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_name)
|
| }
|
| -void Field::unsafe_arena_set_allocated_json_name(
|
| - ::std::string* json_name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (json_name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - json_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - json_name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.json_name)
|
| -}
|
|
|
| -// string default_value = 11;
|
| +// optional string default_value = 11;
|
| void Field::clear_default_value() {
|
| - default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Field::default_value() const {
|
| + const ::std::string& Field::default_value() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value)
|
| - return default_value_.Get();
|
| + return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_default_value(const ::std::string& value) {
|
| + void Field::set_default_value(const ::std::string& value) {
|
|
|
| - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value)
|
| }
|
| -void Field::set_default_value(const char* value) {
|
| + void Field::set_default_value(const char* value) {
|
|
|
| - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value)
|
| }
|
| -void Field::set_default_value(const char* value,
|
| - size_t size) {
|
| + void Field::set_default_value(const char* value, size_t size) {
|
|
|
| - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_value)
|
| }
|
| -::std::string* Field::mutable_default_value() {
|
| + ::std::string* Field::mutable_default_value() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value)
|
| - return default_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Field::release_default_value() {
|
| + ::std::string* Field::release_default_value() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value)
|
|
|
| - return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Field::unsafe_arena_release_default_value() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.default_value)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Field::set_allocated_default_value(::std::string* default_value) {
|
| + void Field::set_allocated_default_value(::std::string* default_value) {
|
| if (default_value != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - default_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value,
|
| - GetArenaNoVirtual());
|
| + default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_value)
|
| }
|
| -void Field::unsafe_arena_set_allocated_default_value(
|
| - ::std::string* default_value) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (default_value != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - default_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - default_value, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Field.default_value)
|
| -}
|
|
|
| #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
|
| // ===================================================================
|
|
|
| -void Enum::_slow_mutable_source_context() {
|
| - source_context_ = ::google::protobuf::Arena::Create< ::google::protobuf::SourceContext >(
|
| - GetArenaNoVirtual());
|
| -}
|
| -::google::protobuf::SourceContext* Enum::_slow_release_source_context() {
|
| - if (source_context_ == NULL) {
|
| - return NULL;
|
| - } else {
|
| - ::google::protobuf::SourceContext* temp = new ::google::protobuf::SourceContext(*source_context_);
|
| - source_context_ = NULL;
|
| - return temp;
|
| - }
|
| -}
|
| -::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.source_context)
|
| -
|
| - ::google::protobuf::SourceContext* temp = source_context_;
|
| - source_context_ = NULL;
|
| - return temp;
|
| -}
|
| -void Enum::unsafe_arena_set_allocated_source_context(
|
| - ::google::protobuf::SourceContext* source_context) {
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete source_context_;
|
| - }
|
| - source_context_ = source_context;
|
| - if (source_context) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.source_context)
|
| -}
|
| #if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| const int Enum::kNameFieldNumber;
|
| const int Enum::kEnumvalueFieldNumber;
|
| @@ -2155,50 +1970,30 @@ const int Enum::kSyntaxFieldNumber;
|
|
|
| Enum::Enum()
|
| : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
| - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - }
|
| SharedCtor();
|
| // @@protoc_insertion_point(constructor:google.protobuf.Enum)
|
| }
|
| -Enum::Enum(::google::protobuf::Arena* arena)
|
| - : ::google::protobuf::Message(),
|
| - _internal_metadata_(arena),
|
| - enumvalue_(arena),
|
| - options_(arena) {
|
| -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - SharedCtor();
|
| - RegisterArenaDtor(arena);
|
| - // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum)
|
| +
|
| +void Enum::InitAsDefaultInstance() {
|
| + _is_default_instance_ = true;
|
| + source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::protobuf::SourceContext::default_instance());
|
| }
|
| +
|
| Enum::Enum(const Enum& from)
|
| : ::google::protobuf::Message(),
|
| - _internal_metadata_(NULL),
|
| - enumvalue_(from.enumvalue_),
|
| - options_(from.options_),
|
| - _cached_size_(0) {
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.name().size() > 0) {
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - if (from.has_source_context()) {
|
| - source_context_ = new ::google::protobuf::SourceContext(*from.source_context_);
|
| - } else {
|
| - source_context_ = NULL;
|
| - }
|
| - syntax_ = from.syntax_;
|
| + _internal_metadata_(NULL) {
|
| + SharedCtor();
|
| + MergeFrom(from);
|
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum)
|
| }
|
|
|
| void Enum::SharedCtor() {
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - ::memset(&source_context_, 0, reinterpret_cast<char*>(&syntax_) -
|
| - reinterpret_cast<char*>(&source_context_) + sizeof(syntax_));
|
| + _is_default_instance_ = false;
|
| + ::google::protobuf::internal::GetEmptyString();
|
| _cached_size_ = 0;
|
| + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + source_context_ = NULL;
|
| + syntax_ = 0;
|
| }
|
|
|
| Enum::~Enum() {
|
| @@ -2207,23 +2002,12 @@ Enum::~Enum() {
|
| }
|
|
|
| void Enum::SharedDtor() {
|
| - ::google::protobuf::Arena* arena = GetArenaNoVirtual();
|
| - if (arena != NULL) {
|
| - return;
|
| - }
|
| -
|
| - name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - if (this != internal_default_instance()) {
|
| + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (this != default_instance_) {
|
| delete source_context_;
|
| }
|
| }
|
|
|
| -void Enum::ArenaDtor(void* object) {
|
| - Enum* _this = reinterpret_cast< Enum* >(object);
|
| - (void)_this;
|
| -}
|
| -void Enum::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
| -}
|
| void Enum::SetCachedSize(int size) const {
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| _cached_size_ = size;
|
| @@ -2231,28 +2015,32 @@ void Enum::SetCachedSize(int size) const {
|
| }
|
| const ::google::protobuf::Descriptor* Enum::descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[2].descriptor;
|
| + return Enum_descriptor_;
|
| }
|
|
|
| const Enum& Enum::default_instance() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - return *internal_default_instance();
|
| + if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + return *default_instance_;
|
| }
|
|
|
| +Enum* Enum::default_instance_ = NULL;
|
| +
|
| Enum* Enum::New(::google::protobuf::Arena* arena) const {
|
| - return ::google::protobuf::Arena::CreateMessage<Enum>(arena);
|
| + Enum* n = new Enum;
|
| + if (arena != NULL) {
|
| + arena->Own(n);
|
| + }
|
| + return n;
|
| }
|
|
|
| void Enum::Clear() {
|
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum)
|
| - enumvalue_.Clear();
|
| - options_.Clear();
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - if (GetArenaNoVirtual() == NULL && source_context_ != NULL) {
|
| - delete source_context_;
|
| - }
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
|
| source_context_ = NULL;
|
| syntax_ = 0;
|
| + enumvalue_.Clear();
|
| + options_.Clear();
|
| }
|
|
|
| bool Enum::MergePartialFromCodedStream(
|
| @@ -2261,13 +2049,13 @@ bool Enum::MergePartialFromCodedStream(
|
| ::google::protobuf::uint32 tag;
|
| // @@protoc_insertion_point(parse_start:google.protobuf.Enum)
|
| for (;;) {
|
| - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
| + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
| tag = p.first;
|
| if (!p.second) goto handle_unusual;
|
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| case 1: {
|
| - if (tag == 10u) {
|
| + if (tag == 10) {
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -2277,49 +2065,60 @@ bool Enum::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(18)) goto parse_enumvalue;
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.EnumValue enumvalue = 2;
|
| case 2: {
|
| - if (tag == 18u) {
|
| + if (tag == 18) {
|
| + parse_enumvalue:
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_enumvalue:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_enumvalue()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(18)) goto parse_loop_enumvalue;
|
| + if (input->ExpectTag(26)) goto parse_loop_options;
|
| input->UnsafeDecrementRecursionDepth();
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.Option options = 3;
|
| case 3: {
|
| - if (tag == 26u) {
|
| + if (tag == 26) {
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_options:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_options()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(26)) goto parse_loop_options;
|
| input->UnsafeDecrementRecursionDepth();
|
| + if (input->ExpectTag(34)) goto parse_source_context;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 4;
|
| + // optional .google.protobuf.SourceContext source_context = 4;
|
| case 4: {
|
| - if (tag == 34u) {
|
| + if (tag == 34) {
|
| + parse_source_context:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
| input, mutable_source_context()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(40)) goto parse_syntax;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 5;
|
| + // optional .google.protobuf.Syntax syntax = 5;
|
| case 5: {
|
| - if (tag == 40u) {
|
| + if (tag == 40) {
|
| + parse_syntax:
|
| int value;
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
| @@ -2328,6 +2127,7 @@ bool Enum::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectAtEnd()) goto success;
|
| break;
|
| }
|
|
|
| @@ -2355,7 +2155,7 @@ failure:
|
| void Enum::SerializeWithCachedSizes(
|
| ::google::protobuf::io::CodedOutputStream* output) const {
|
| // @@protoc_insertion_point(serialize_start:google.protobuf.Enum)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -2377,13 +2177,13 @@ void Enum::SerializeWithCachedSizes(
|
| 3, this->options(i), output);
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 4;
|
| + // optional .google.protobuf.SourceContext source_context = 4;
|
| if (this->has_source_context()) {
|
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
| 4, *this->source_context_, output);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 5;
|
| + // optional .google.protobuf.Syntax syntax = 5;
|
| if (this->syntax() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteEnum(
|
| 5, this->syntax(), output);
|
| @@ -2392,11 +2192,10 @@ void Enum::SerializeWithCachedSizes(
|
| // @@protoc_insertion_point(serialize_end:google.protobuf.Enum)
|
| }
|
|
|
| -::google::protobuf::uint8* Enum::InternalSerializeWithCachedSizesToArray(
|
| - bool deterministic, ::google::protobuf::uint8* target) const {
|
| - (void)deterministic; // Unused
|
| +::google::protobuf::uint8* Enum::SerializeWithCachedSizesToArray(
|
| + ::google::protobuf::uint8* target) const {
|
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -2410,25 +2209,25 @@ void Enum::SerializeWithCachedSizes(
|
| // repeated .google.protobuf.EnumValue enumvalue = 2;
|
| for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 2, this->enumvalue(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 2, this->enumvalue(i), target);
|
| }
|
|
|
| // repeated .google.protobuf.Option options = 3;
|
| for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 3, this->options(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 3, this->options(i), target);
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 4;
|
| + // optional .google.protobuf.SourceContext source_context = 4;
|
| if (this->has_source_context()) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 4, *this->source_context_, false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 4, *this->source_context_, target);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 5;
|
| + // optional .google.protobuf.Syntax syntax = 5;
|
| if (this->syntax() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
| 5, this->syntax(), target);
|
| @@ -2438,63 +2237,56 @@ void Enum::SerializeWithCachedSizes(
|
| return target;
|
| }
|
|
|
| -size_t Enum::ByteSizeLong() const {
|
| +int Enum::ByteSize() const {
|
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum)
|
| - size_t total_size = 0;
|
| -
|
| - // repeated .google.protobuf.EnumValue enumvalue = 2;
|
| - {
|
| - unsigned int count = this->enumvalue_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->enumvalue(i));
|
| - }
|
| - }
|
| -
|
| - // repeated .google.protobuf.Option options = 3;
|
| - {
|
| - unsigned int count = this->options_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->options(i));
|
| - }
|
| - }
|
| + int total_size = 0;
|
|
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| this->name());
|
| }
|
|
|
| - // .google.protobuf.SourceContext source_context = 4;
|
| + // optional .google.protobuf.SourceContext source_context = 4;
|
| if (this->has_source_context()) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| *this->source_context_);
|
| }
|
|
|
| - // .google.protobuf.Syntax syntax = 5;
|
| + // optional .google.protobuf.Syntax syntax = 5;
|
| if (this->syntax() != 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax());
|
| }
|
|
|
| - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
| + // repeated .google.protobuf.EnumValue enumvalue = 2;
|
| + total_size += 1 * this->enumvalue_size();
|
| + for (int i = 0; i < this->enumvalue_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->enumvalue(i));
|
| + }
|
| +
|
| + // repeated .google.protobuf.Option options = 3;
|
| + total_size += 1 * this->options_size();
|
| + for (int i = 0; i < this->options_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->options(i));
|
| + }
|
| +
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| - _cached_size_ = cached_size;
|
| + _cached_size_ = total_size;
|
| GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
| return total_size;
|
| }
|
|
|
| void Enum::MergeFrom(const ::google::protobuf::Message& from) {
|
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - const Enum* source =
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| + const Enum* source =
|
| ::google::protobuf::internal::DynamicCastToGenerated<const Enum>(
|
| &from);
|
| if (source == NULL) {
|
| @@ -2508,12 +2300,12 @@ void Enum::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
| void Enum::MergeFrom(const Enum& from) {
|
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| enumvalue_.MergeFrom(from.enumvalue_);
|
| options_.MergeFrom(from.options_);
|
| if (from.name().size() > 0) {
|
| - set_name(from.name());
|
| +
|
| + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
|
| }
|
| if (from.has_source_context()) {
|
| mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context());
|
| @@ -2538,110 +2330,78 @@ void Enum::CopyFrom(const Enum& from) {
|
| }
|
|
|
| bool Enum::IsInitialized() const {
|
| +
|
| return true;
|
| }
|
|
|
| void Enum::Swap(Enum* other) {
|
| if (other == this) return;
|
| - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
| - InternalSwap(other);
|
| - } else {
|
| - Enum* temp = New(GetArenaNoVirtual());
|
| - temp->MergeFrom(*other);
|
| - other->CopyFrom(*this);
|
| - InternalSwap(temp);
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete temp;
|
| - }
|
| - }
|
| -}
|
| -void Enum::UnsafeArenaSwap(Enum* other) {
|
| - if (other == this) return;
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
| InternalSwap(other);
|
| }
|
| void Enum::InternalSwap(Enum* other) {
|
| + name_.Swap(&other->name_);
|
| enumvalue_.UnsafeArenaSwap(&other->enumvalue_);
|
| options_.UnsafeArenaSwap(&other->options_);
|
| - name_.Swap(&other->name_);
|
| std::swap(source_context_, other->source_context_);
|
| std::swap(syntax_, other->syntax_);
|
| + _internal_metadata_.Swap(&other->_internal_metadata_);
|
| std::swap(_cached_size_, other->_cached_size_);
|
| }
|
|
|
| ::google::protobuf::Metadata Enum::GetMetadata() const {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[2];
|
| + ::google::protobuf::Metadata metadata;
|
| + metadata.descriptor = Enum_descriptor_;
|
| + metadata.reflection = Enum_reflection_;
|
| + return metadata;
|
| }
|
|
|
| #if PROTOBUF_INLINE_NOT_IN_HEADERS
|
| // Enum
|
|
|
| -// string name = 1;
|
| +// optional string name = 1;
|
| void Enum::clear_name() {
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Enum::name() const {
|
| + const ::std::string& Enum::name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Enum.name)
|
| - return name_.Get();
|
| + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Enum::set_name(const ::std::string& value) {
|
| + void Enum::set_name(const ::std::string& value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Enum.name)
|
| }
|
| -void Enum::set_name(const char* value) {
|
| + void Enum::set_name(const char* value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name)
|
| }
|
| -void Enum::set_name(const char* value,
|
| - size_t size) {
|
| + void Enum::set_name(const char* value, size_t size) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name)
|
| }
|
| -::std::string* Enum::mutable_name() {
|
| + ::std::string* Enum::mutable_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name)
|
| - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Enum::release_name() {
|
| + ::std::string* Enum::release_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Enum.name)
|
|
|
| - return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Enum::unsafe_arena_release_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Enum::set_allocated_name(::std::string* name) {
|
| + void Enum::set_allocated_name(::std::string* name) {
|
| if (name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name,
|
| - GetArenaNoVirtual());
|
| + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name)
|
| }
|
| -void Enum::unsafe_arena_set_allocated_name(
|
| - ::std::string* name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Enum.name)
|
| -}
|
|
|
| // repeated .google.protobuf.EnumValue enumvalue = 2;
|
| int Enum::enumvalue_size() const {
|
| @@ -2703,9 +2463,9 @@ Enum::options() const {
|
| return options_;
|
| }
|
|
|
| -// .google.protobuf.SourceContext source_context = 4;
|
| +// optional .google.protobuf.SourceContext source_context = 4;
|
| bool Enum::has_source_context() const {
|
| - return this != internal_default_instance() && source_context_ != NULL;
|
| + return !_is_default_instance_ && source_context_ != NULL;
|
| }
|
| void Enum::clear_source_context() {
|
| if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_context_;
|
| @@ -2713,13 +2473,12 @@ void Enum::clear_source_context() {
|
| }
|
| const ::google::protobuf::SourceContext& Enum::source_context() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context)
|
| - return source_context_ != NULL ? *source_context_
|
| - : *::google::protobuf::SourceContext::internal_default_instance();
|
| + return source_context_ != NULL ? *source_context_ : *default_instance_->source_context_;
|
| }
|
| ::google::protobuf::SourceContext* Enum::mutable_source_context() {
|
|
|
| if (source_context_ == NULL) {
|
| - _slow_mutable_source_context();
|
| + source_context_ = new ::google::protobuf::SourceContext;
|
| }
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context)
|
| return source_context_;
|
| @@ -2727,24 +2486,12 @@ const ::google::protobuf::SourceContext& Enum::source_context() const {
|
| ::google::protobuf::SourceContext* Enum::release_source_context() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context)
|
|
|
| - if (GetArenaNoVirtual() != NULL) {
|
| - return _slow_release_source_context();
|
| - } else {
|
| - ::google::protobuf::SourceContext* temp = source_context_;
|
| - source_context_ = NULL;
|
| - return temp;
|
| - }
|
| + ::google::protobuf::SourceContext* temp = source_context_;
|
| + source_context_ = NULL;
|
| + return temp;
|
| }
|
| - void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
|
| - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
| - if (message_arena == NULL) {
|
| - delete source_context_;
|
| - }
|
| - if (source_context != NULL) {
|
| - if (message_arena != NULL) {
|
| - message_arena->Own(source_context);
|
| - }
|
| - }
|
| +void Enum::set_allocated_source_context(::google::protobuf::SourceContext* source_context) {
|
| + delete source_context_;
|
| source_context_ = source_context;
|
| if (source_context) {
|
|
|
| @@ -2754,15 +2501,15 @@ const ::google::protobuf::SourceContext& Enum::source_context() const {
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_context)
|
| }
|
|
|
| -// .google.protobuf.Syntax syntax = 5;
|
| +// optional .google.protobuf.Syntax syntax = 5;
|
| void Enum::clear_syntax() {
|
| syntax_ = 0;
|
| }
|
| -::google::protobuf::Syntax Enum::syntax() const {
|
| + ::google::protobuf::Syntax Enum::syntax() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax)
|
| return static_cast< ::google::protobuf::Syntax >(syntax_);
|
| }
|
| -void Enum::set_syntax(::google::protobuf::Syntax value) {
|
| + void Enum::set_syntax(::google::protobuf::Syntax value) {
|
|
|
| syntax_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax)
|
| @@ -2780,42 +2527,28 @@ const int EnumValue::kOptionsFieldNumber;
|
|
|
| EnumValue::EnumValue()
|
| : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
| - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - }
|
| SharedCtor();
|
| // @@protoc_insertion_point(constructor:google.protobuf.EnumValue)
|
| }
|
| -EnumValue::EnumValue(::google::protobuf::Arena* arena)
|
| - : ::google::protobuf::Message(),
|
| - _internal_metadata_(arena),
|
| - options_(arena) {
|
| -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - SharedCtor();
|
| - RegisterArenaDtor(arena);
|
| - // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue)
|
| +
|
| +void EnumValue::InitAsDefaultInstance() {
|
| + _is_default_instance_ = true;
|
| }
|
| +
|
| EnumValue::EnumValue(const EnumValue& from)
|
| : ::google::protobuf::Message(),
|
| - _internal_metadata_(NULL),
|
| - options_(from.options_),
|
| - _cached_size_(0) {
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.name().size() > 0) {
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - number_ = from.number_;
|
| + _internal_metadata_(NULL) {
|
| + SharedCtor();
|
| + MergeFrom(from);
|
| // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue)
|
| }
|
|
|
| void EnumValue::SharedCtor() {
|
| + _is_default_instance_ = false;
|
| + ::google::protobuf::internal::GetEmptyString();
|
| + _cached_size_ = 0;
|
| name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| number_ = 0;
|
| - _cached_size_ = 0;
|
| }
|
|
|
| EnumValue::~EnumValue() {
|
| @@ -2824,20 +2557,11 @@ EnumValue::~EnumValue() {
|
| }
|
|
|
| void EnumValue::SharedDtor() {
|
| - ::google::protobuf::Arena* arena = GetArenaNoVirtual();
|
| - if (arena != NULL) {
|
| - return;
|
| + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (this != default_instance_) {
|
| }
|
| -
|
| - name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| }
|
|
|
| -void EnumValue::ArenaDtor(void* object) {
|
| - EnumValue* _this = reinterpret_cast< EnumValue* >(object);
|
| - (void)_this;
|
| -}
|
| -void EnumValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
| -}
|
| void EnumValue::SetCachedSize(int size) const {
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| _cached_size_ = size;
|
| @@ -2845,23 +2569,29 @@ void EnumValue::SetCachedSize(int size) const {
|
| }
|
| const ::google::protobuf::Descriptor* EnumValue::descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[3].descriptor;
|
| + return EnumValue_descriptor_;
|
| }
|
|
|
| const EnumValue& EnumValue::default_instance() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - return *internal_default_instance();
|
| + if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + return *default_instance_;
|
| }
|
|
|
| +EnumValue* EnumValue::default_instance_ = NULL;
|
| +
|
| EnumValue* EnumValue::New(::google::protobuf::Arena* arena) const {
|
| - return ::google::protobuf::Arena::CreateMessage<EnumValue>(arena);
|
| + EnumValue* n = new EnumValue;
|
| + if (arena != NULL) {
|
| + arena->Own(n);
|
| + }
|
| + return n;
|
| }
|
|
|
| void EnumValue::Clear() {
|
| // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue)
|
| - options_.Clear();
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| number_ = 0;
|
| + options_.Clear();
|
| }
|
|
|
| bool EnumValue::MergePartialFromCodedStream(
|
| @@ -2870,13 +2600,13 @@ bool EnumValue::MergePartialFromCodedStream(
|
| ::google::protobuf::uint32 tag;
|
| // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue)
|
| for (;;) {
|
| - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
| + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
| tag = p.first;
|
| if (!p.second) goto handle_unusual;
|
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| case 1: {
|
| - if (tag == 10u) {
|
| + if (tag == 10) {
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -2886,32 +2616,39 @@ bool EnumValue::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(16)) goto parse_number;
|
| break;
|
| }
|
|
|
| - // int32 number = 2;
|
| + // optional int32 number = 2;
|
| case 2: {
|
| - if (tag == 16u) {
|
| -
|
| + if (tag == 16) {
|
| + parse_number:
|
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
| input, &number_)));
|
| +
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(26)) goto parse_options;
|
| break;
|
| }
|
|
|
| // repeated .google.protobuf.Option options = 3;
|
| case 3: {
|
| - if (tag == 26u) {
|
| + if (tag == 26) {
|
| + parse_options:
|
| DO_(input->IncrementRecursionDepth());
|
| + parse_loop_options:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
|
| input, add_options()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(26)) goto parse_loop_options;
|
| input->UnsafeDecrementRecursionDepth();
|
| + if (input->ExpectAtEnd()) goto success;
|
| break;
|
| }
|
|
|
| @@ -2939,7 +2676,7 @@ failure:
|
| void EnumValue::SerializeWithCachedSizes(
|
| ::google::protobuf::io::CodedOutputStream* output) const {
|
| // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -2949,7 +2686,7 @@ void EnumValue::SerializeWithCachedSizes(
|
| 1, this->name(), output);
|
| }
|
|
|
| - // int32 number = 2;
|
| + // optional int32 number = 2;
|
| if (this->number() != 0) {
|
| ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output);
|
| }
|
| @@ -2963,11 +2700,10 @@ void EnumValue::SerializeWithCachedSizes(
|
| // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue)
|
| }
|
|
|
| -::google::protobuf::uint8* EnumValue::InternalSerializeWithCachedSizesToArray(
|
| - bool deterministic, ::google::protobuf::uint8* target) const {
|
| - (void)deterministic; // Unused
|
| +::google::protobuf::uint8* EnumValue::SerializeWithCachedSizesToArray(
|
| + ::google::protobuf::uint8* target) const {
|
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -2978,7 +2714,7 @@ void EnumValue::SerializeWithCachedSizes(
|
| 1, this->name(), target);
|
| }
|
|
|
| - // int32 number = 2;
|
| + // optional int32 number = 2;
|
| if (this->number() != 0) {
|
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target);
|
| }
|
| @@ -2986,54 +2722,50 @@ void EnumValue::SerializeWithCachedSizes(
|
| // repeated .google.protobuf.Option options = 3;
|
| for (unsigned int i = 0, n = this->options_size(); i < n; i++) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 3, this->options(i), false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 3, this->options(i), target);
|
| }
|
|
|
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue)
|
| return target;
|
| }
|
|
|
| -size_t EnumValue::ByteSizeLong() const {
|
| +int EnumValue::ByteSize() const {
|
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue)
|
| - size_t total_size = 0;
|
| -
|
| - // repeated .google.protobuf.Option options = 3;
|
| - {
|
| - unsigned int count = this->options_size();
|
| - total_size += 1UL * count;
|
| - for (unsigned int i = 0; i < count; i++) {
|
| - total_size +=
|
| - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| - this->options(i));
|
| - }
|
| - }
|
| + int total_size = 0;
|
|
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| this->name());
|
| }
|
|
|
| - // int32 number = 2;
|
| + // optional int32 number = 2;
|
| if (this->number() != 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::Int32Size(
|
| this->number());
|
| }
|
|
|
| - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
| + // repeated .google.protobuf.Option options = 3;
|
| + total_size += 1 * this->options_size();
|
| + for (int i = 0; i < this->options_size(); i++) {
|
| + total_size +=
|
| + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| + this->options(i));
|
| + }
|
| +
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| - _cached_size_ = cached_size;
|
| + _cached_size_ = total_size;
|
| GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
| return total_size;
|
| }
|
|
|
| void EnumValue::MergeFrom(const ::google::protobuf::Message& from) {
|
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValue)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - const EnumValue* source =
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| + const EnumValue* source =
|
| ::google::protobuf::internal::DynamicCastToGenerated<const EnumValue>(
|
| &from);
|
| if (source == NULL) {
|
| @@ -3047,11 +2779,11 @@ void EnumValue::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
| void EnumValue::MergeFrom(const EnumValue& from) {
|
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValue)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| options_.MergeFrom(from.options_);
|
| if (from.name().size() > 0) {
|
| - set_name(from.name());
|
| +
|
| + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
|
| }
|
| if (from.number() != 0) {
|
| set_number(from.number());
|
| @@ -3073,118 +2805,86 @@ void EnumValue::CopyFrom(const EnumValue& from) {
|
| }
|
|
|
| bool EnumValue::IsInitialized() const {
|
| +
|
| return true;
|
| }
|
|
|
| void EnumValue::Swap(EnumValue* other) {
|
| if (other == this) return;
|
| - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
| - InternalSwap(other);
|
| - } else {
|
| - EnumValue* temp = New(GetArenaNoVirtual());
|
| - temp->MergeFrom(*other);
|
| - other->CopyFrom(*this);
|
| - InternalSwap(temp);
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete temp;
|
| - }
|
| - }
|
| -}
|
| -void EnumValue::UnsafeArenaSwap(EnumValue* other) {
|
| - if (other == this) return;
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
| InternalSwap(other);
|
| }
|
| void EnumValue::InternalSwap(EnumValue* other) {
|
| - options_.UnsafeArenaSwap(&other->options_);
|
| name_.Swap(&other->name_);
|
| std::swap(number_, other->number_);
|
| + options_.UnsafeArenaSwap(&other->options_);
|
| + _internal_metadata_.Swap(&other->_internal_metadata_);
|
| std::swap(_cached_size_, other->_cached_size_);
|
| }
|
|
|
| ::google::protobuf::Metadata EnumValue::GetMetadata() const {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[3];
|
| + ::google::protobuf::Metadata metadata;
|
| + metadata.descriptor = EnumValue_descriptor_;
|
| + metadata.reflection = EnumValue_reflection_;
|
| + return metadata;
|
| }
|
|
|
| #if PROTOBUF_INLINE_NOT_IN_HEADERS
|
| // EnumValue
|
|
|
| -// string name = 1;
|
| +// optional string name = 1;
|
| void EnumValue::clear_name() {
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& EnumValue::name() const {
|
| + const ::std::string& EnumValue::name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name)
|
| - return name_.Get();
|
| + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void EnumValue::set_name(const ::std::string& value) {
|
| + void EnumValue::set_name(const ::std::string& value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name)
|
| }
|
| -void EnumValue::set_name(const char* value) {
|
| + void EnumValue::set_name(const char* value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name)
|
| }
|
| -void EnumValue::set_name(const char* value,
|
| - size_t size) {
|
| + void EnumValue::set_name(const char* value, size_t size) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name)
|
| }
|
| -::std::string* EnumValue::mutable_name() {
|
| + ::std::string* EnumValue::mutable_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name)
|
| - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* EnumValue::release_name() {
|
| + ::std::string* EnumValue::release_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name)
|
|
|
| - return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* EnumValue::unsafe_arena_release_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValue.name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void EnumValue::set_allocated_name(::std::string* name) {
|
| + void EnumValue::set_allocated_name(::std::string* name) {
|
| if (name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name,
|
| - GetArenaNoVirtual());
|
| + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name)
|
| }
|
| -void EnumValue::unsafe_arena_set_allocated_name(
|
| - ::std::string* name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValue.name)
|
| -}
|
|
|
| -// int32 number = 2;
|
| +// optional int32 number = 2;
|
| void EnumValue::clear_number() {
|
| number_ = 0;
|
| }
|
| -::google::protobuf::int32 EnumValue::number() const {
|
| + ::google::protobuf::int32 EnumValue::number() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number)
|
| return number_;
|
| }
|
| -void EnumValue::set_number(::google::protobuf::int32 value) {
|
| + void EnumValue::set_number(::google::protobuf::int32 value) {
|
|
|
| number_ = value;
|
| // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number)
|
| @@ -3224,39 +2924,6 @@ EnumValue::options() const {
|
|
|
| // ===================================================================
|
|
|
| -void Option::_slow_mutable_value() {
|
| - value_ = ::google::protobuf::Arena::Create< ::google::protobuf::Any >(
|
| - GetArenaNoVirtual());
|
| -}
|
| -::google::protobuf::Any* Option::_slow_release_value() {
|
| - if (value_ == NULL) {
|
| - return NULL;
|
| - } else {
|
| - ::google::protobuf::Any* temp = new ::google::protobuf::Any(*value_);
|
| - value_ = NULL;
|
| - return temp;
|
| - }
|
| -}
|
| -::google::protobuf::Any* Option::unsafe_arena_release_value() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.value)
|
| -
|
| - ::google::protobuf::Any* temp = value_;
|
| - value_ = NULL;
|
| - return temp;
|
| -}
|
| -void Option::unsafe_arena_set_allocated_value(
|
| - ::google::protobuf::Any* value) {
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete value_;
|
| - }
|
| - value_ = value;
|
| - if (value) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.value)
|
| -}
|
| #if !defined(_MSC_VER) || _MSC_VER >= 1900
|
| const int Option::kNameFieldNumber;
|
| const int Option::kValueFieldNumber;
|
| @@ -3264,44 +2931,29 @@ const int Option::kValueFieldNumber;
|
|
|
| Option::Option()
|
| : ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
| - if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - }
|
| SharedCtor();
|
| // @@protoc_insertion_point(constructor:google.protobuf.Option)
|
| }
|
| -Option::Option(::google::protobuf::Arena* arena)
|
| - : ::google::protobuf::Message(),
|
| - _internal_metadata_(arena) {
|
| -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
|
| - SharedCtor();
|
| - RegisterArenaDtor(arena);
|
| - // @@protoc_insertion_point(arena_constructor:google.protobuf.Option)
|
| +
|
| +void Option::InitAsDefaultInstance() {
|
| + _is_default_instance_ = true;
|
| + value_ = const_cast< ::google::protobuf::Any*>(&::google::protobuf::Any::default_instance());
|
| }
|
| +
|
| Option::Option(const Option& from)
|
| : ::google::protobuf::Message(),
|
| - _internal_metadata_(NULL),
|
| - _cached_size_(0) {
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| - if (from.name().size() > 0) {
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
| - GetArenaNoVirtual());
|
| - }
|
| - if (from.has_value()) {
|
| - value_ = new ::google::protobuf::Any(*from.value_);
|
| - } else {
|
| - value_ = NULL;
|
| - }
|
| + _internal_metadata_(NULL) {
|
| + SharedCtor();
|
| + MergeFrom(from);
|
| // @@protoc_insertion_point(copy_constructor:google.protobuf.Option)
|
| }
|
|
|
| void Option::SharedCtor() {
|
| + _is_default_instance_ = false;
|
| + ::google::protobuf::internal::GetEmptyString();
|
| + _cached_size_ = 0;
|
| name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| value_ = NULL;
|
| - _cached_size_ = 0;
|
| }
|
|
|
| Option::~Option() {
|
| @@ -3310,23 +2962,12 @@ Option::~Option() {
|
| }
|
|
|
| void Option::SharedDtor() {
|
| - ::google::protobuf::Arena* arena = GetArenaNoVirtual();
|
| - if (arena != NULL) {
|
| - return;
|
| - }
|
| -
|
| - name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena);
|
| - if (this != internal_default_instance()) {
|
| + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (this != default_instance_) {
|
| delete value_;
|
| }
|
| }
|
|
|
| -void Option::ArenaDtor(void* object) {
|
| - Option* _this = reinterpret_cast< Option* >(object);
|
| - (void)_this;
|
| -}
|
| -void Option::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
| -}
|
| void Option::SetCachedSize(int size) const {
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| _cached_size_ = size;
|
| @@ -3334,24 +2975,28 @@ void Option::SetCachedSize(int size) const {
|
| }
|
| const ::google::protobuf::Descriptor* Option::descriptor() {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[4].descriptor;
|
| + return Option_descriptor_;
|
| }
|
|
|
| const Option& Option::default_instance() {
|
| - protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto();
|
| - return *internal_default_instance();
|
| + if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto();
|
| + return *default_instance_;
|
| }
|
|
|
| +Option* Option::default_instance_ = NULL;
|
| +
|
| Option* Option::New(::google::protobuf::Arena* arena) const {
|
| - return ::google::protobuf::Arena::CreateMessage<Option>(arena);
|
| + Option* n = new Option;
|
| + if (arena != NULL) {
|
| + arena->Own(n);
|
| + }
|
| + return n;
|
| }
|
|
|
| void Option::Clear() {
|
| // @@protoc_insertion_point(message_clear_start:google.protobuf.Option)
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| - if (GetArenaNoVirtual() == NULL && value_ != NULL) {
|
| - delete value_;
|
| - }
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| + if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
|
| value_ = NULL;
|
| }
|
|
|
| @@ -3361,13 +3006,13 @@ bool Option::MergePartialFromCodedStream(
|
| ::google::protobuf::uint32 tag;
|
| // @@protoc_insertion_point(parse_start:google.protobuf.Option)
|
| for (;;) {
|
| - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
| + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
| tag = p.first;
|
| if (!p.second) goto handle_unusual;
|
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| case 1: {
|
| - if (tag == 10u) {
|
| + if (tag == 10) {
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
| input, this->mutable_name()));
|
| DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| @@ -3377,17 +3022,20 @@ bool Option::MergePartialFromCodedStream(
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectTag(18)) goto parse_value;
|
| break;
|
| }
|
|
|
| - // .google.protobuf.Any value = 2;
|
| + // optional .google.protobuf.Any value = 2;
|
| case 2: {
|
| - if (tag == 18u) {
|
| + if (tag == 18) {
|
| + parse_value:
|
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
| input, mutable_value()));
|
| } else {
|
| goto handle_unusual;
|
| }
|
| + if (input->ExpectAtEnd()) goto success;
|
| break;
|
| }
|
|
|
| @@ -3415,7 +3063,7 @@ failure:
|
| void Option::SerializeWithCachedSizes(
|
| ::google::protobuf::io::CodedOutputStream* output) const {
|
| // @@protoc_insertion_point(serialize_start:google.protobuf.Option)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -3425,7 +3073,7 @@ void Option::SerializeWithCachedSizes(
|
| 1, this->name(), output);
|
| }
|
|
|
| - // .google.protobuf.Any value = 2;
|
| + // optional .google.protobuf.Any value = 2;
|
| if (this->has_value()) {
|
| ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
| 2, *this->value_, output);
|
| @@ -3434,11 +3082,10 @@ void Option::SerializeWithCachedSizes(
|
| // @@protoc_insertion_point(serialize_end:google.protobuf.Option)
|
| }
|
|
|
| -::google::protobuf::uint8* Option::InternalSerializeWithCachedSizesToArray(
|
| - bool deterministic, ::google::protobuf::uint8* target) const {
|
| - (void)deterministic; // Unused
|
| +::google::protobuf::uint8* Option::SerializeWithCachedSizesToArray(
|
| + ::google::protobuf::uint8* target) const {
|
| // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option)
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
| this->name().data(), this->name().length(),
|
| @@ -3449,46 +3096,45 @@ void Option::SerializeWithCachedSizes(
|
| 1, this->name(), target);
|
| }
|
|
|
| - // .google.protobuf.Any value = 2;
|
| + // optional .google.protobuf.Any value = 2;
|
| if (this->has_value()) {
|
| target = ::google::protobuf::internal::WireFormatLite::
|
| - InternalWriteMessageNoVirtualToArray(
|
| - 2, *this->value_, false, target);
|
| + WriteMessageNoVirtualToArray(
|
| + 2, *this->value_, target);
|
| }
|
|
|
| // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option)
|
| return target;
|
| }
|
|
|
| -size_t Option::ByteSizeLong() const {
|
| +int Option::ByteSize() const {
|
| // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option)
|
| - size_t total_size = 0;
|
| + int total_size = 0;
|
|
|
| - // string name = 1;
|
| + // optional string name = 1;
|
| if (this->name().size() > 0) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::StringSize(
|
| this->name());
|
| }
|
|
|
| - // .google.protobuf.Any value = 2;
|
| + // optional .google.protobuf.Any value = 2;
|
| if (this->has_value()) {
|
| total_size += 1 +
|
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
| *this->value_);
|
| }
|
|
|
| - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
| - _cached_size_ = cached_size;
|
| + _cached_size_ = total_size;
|
| GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
| return total_size;
|
| }
|
|
|
| void Option::MergeFrom(const ::google::protobuf::Message& from) {
|
| // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - const Option* source =
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| + const Option* source =
|
| ::google::protobuf::internal::DynamicCastToGenerated<const Option>(
|
| &from);
|
| if (source == NULL) {
|
| @@ -3502,10 +3148,10 @@ void Option::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
| void Option::MergeFrom(const Option& from) {
|
| // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Option)
|
| - GOOGLE_DCHECK_NE(&from, this);
|
| - _internal_metadata_.MergeFrom(from._internal_metadata_);
|
| + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
|
| if (from.name().size() > 0) {
|
| - set_name(from.name());
|
| +
|
| + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
|
| }
|
| if (from.has_value()) {
|
| mutable_value()->::google::protobuf::Any::MergeFrom(from.value());
|
| @@ -3527,111 +3173,79 @@ void Option::CopyFrom(const Option& from) {
|
| }
|
|
|
| bool Option::IsInitialized() const {
|
| +
|
| return true;
|
| }
|
|
|
| void Option::Swap(Option* other) {
|
| if (other == this) return;
|
| - if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
| - InternalSwap(other);
|
| - } else {
|
| - Option* temp = New(GetArenaNoVirtual());
|
| - temp->MergeFrom(*other);
|
| - other->CopyFrom(*this);
|
| - InternalSwap(temp);
|
| - if (GetArenaNoVirtual() == NULL) {
|
| - delete temp;
|
| - }
|
| - }
|
| -}
|
| -void Option::UnsafeArenaSwap(Option* other) {
|
| - if (other == this) return;
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
| InternalSwap(other);
|
| }
|
| void Option::InternalSwap(Option* other) {
|
| name_.Swap(&other->name_);
|
| std::swap(value_, other->value_);
|
| + _internal_metadata_.Swap(&other->_internal_metadata_);
|
| std::swap(_cached_size_, other->_cached_size_);
|
| }
|
|
|
| ::google::protobuf::Metadata Option::GetMetadata() const {
|
| protobuf_AssignDescriptorsOnce();
|
| - return file_level_metadata[4];
|
| + ::google::protobuf::Metadata metadata;
|
| + metadata.descriptor = Option_descriptor_;
|
| + metadata.reflection = Option_reflection_;
|
| + return metadata;
|
| }
|
|
|
| #if PROTOBUF_INLINE_NOT_IN_HEADERS
|
| // Option
|
|
|
| -// string name = 1;
|
| +// optional string name = 1;
|
| void Option::clear_name() {
|
| - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -const ::std::string& Option::name() const {
|
| + const ::std::string& Option::name() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Option.name)
|
| - return name_.Get();
|
| + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Option::set_name(const ::std::string& value) {
|
| + void Option::set_name(const ::std::string& value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
| // @@protoc_insertion_point(field_set:google.protobuf.Option.name)
|
| }
|
| -void Option::set_name(const char* value) {
|
| + void Option::set_name(const char* value) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
|
| - GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
| // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name)
|
| }
|
| -void Option::set_name(const char* value,
|
| - size_t size) {
|
| + void Option::set_name(const char* value, size_t size) {
|
|
|
| - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
|
| - reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
|
| + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| + ::std::string(reinterpret_cast<const char*>(value), size));
|
| // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name)
|
| }
|
| -::std::string* Option::mutable_name() {
|
| + ::std::string* Option::mutable_name() {
|
|
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name)
|
| - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -::std::string* Option::release_name() {
|
| + ::std::string* Option::release_name() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Option.name)
|
|
|
| - return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
| -}
|
| -::std::string* Option::unsafe_arena_release_name() {
|
| - // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.name)
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| -
|
| - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - GetArenaNoVirtual());
|
| + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
| }
|
| -void Option::set_allocated_name(::std::string* name) {
|
| + void Option::set_allocated_name(::std::string* name) {
|
| if (name != NULL) {
|
|
|
| } else {
|
|
|
| }
|
| - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name,
|
| - GetArenaNoVirtual());
|
| + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
|
| // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name)
|
| }
|
| -void Option::unsafe_arena_set_allocated_name(
|
| - ::std::string* name) {
|
| - GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
|
| - if (name != NULL) {
|
| -
|
| - } else {
|
| -
|
| - }
|
| - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
| - name, GetArenaNoVirtual());
|
| - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Option.name)
|
| -}
|
|
|
| -// .google.protobuf.Any value = 2;
|
| +// optional .google.protobuf.Any value = 2;
|
| bool Option::has_value() const {
|
| - return this != internal_default_instance() && value_ != NULL;
|
| + return !_is_default_instance_ && value_ != NULL;
|
| }
|
| void Option::clear_value() {
|
| if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_;
|
| @@ -3639,13 +3253,12 @@ void Option::clear_value() {
|
| }
|
| const ::google::protobuf::Any& Option::value() const {
|
| // @@protoc_insertion_point(field_get:google.protobuf.Option.value)
|
| - return value_ != NULL ? *value_
|
| - : *::google::protobuf::Any::internal_default_instance();
|
| + return value_ != NULL ? *value_ : *default_instance_->value_;
|
| }
|
| ::google::protobuf::Any* Option::mutable_value() {
|
|
|
| if (value_ == NULL) {
|
| - _slow_mutable_value();
|
| + value_ = new ::google::protobuf::Any;
|
| }
|
| // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value)
|
| return value_;
|
| @@ -3653,24 +3266,12 @@ const ::google::protobuf::Any& Option::value() const {
|
| ::google::protobuf::Any* Option::release_value() {
|
| // @@protoc_insertion_point(field_release:google.protobuf.Option.value)
|
|
|
| - if (GetArenaNoVirtual() != NULL) {
|
| - return _slow_release_value();
|
| - } else {
|
| - ::google::protobuf::Any* temp = value_;
|
| - value_ = NULL;
|
| - return temp;
|
| - }
|
| + ::google::protobuf::Any* temp = value_;
|
| + value_ = NULL;
|
| + return temp;
|
| }
|
| - void Option::set_allocated_value(::google::protobuf::Any* value) {
|
| - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
| - if (message_arena == NULL) {
|
| - delete value_;
|
| - }
|
| - if (value != NULL) {
|
| - if (message_arena != NULL) {
|
| - message_arena->Own(value);
|
| - }
|
| - }
|
| +void Option::set_allocated_value(::google::protobuf::Any* value) {
|
| + delete value_;
|
| value_ = value;
|
| if (value) {
|
|
|
|
|