| OLD | NEW |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: google/protobuf/type.proto | 2 // source: google/protobuf/type.proto |
| 3 | 3 |
| 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION | 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| 5 #include <google/protobuf/type.pb.h> | 5 #include <google/protobuf/type.pb.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
| 10 #include <google/protobuf/stubs/port.h> | 10 #include <google/protobuf/stubs/port.h> |
| 11 #include <google/protobuf/stubs/once.h> | 11 #include <google/protobuf/stubs/once.h> |
| 12 #include <google/protobuf/io/coded_stream.h> | 12 #include <google/protobuf/io/coded_stream.h> |
| 13 #include <google/protobuf/wire_format_lite_inl.h> | 13 #include <google/protobuf/wire_format_lite_inl.h> |
| 14 #include <google/protobuf/descriptor.h> | 14 #include <google/protobuf/descriptor.h> |
| 15 #include <google/protobuf/generated_message_reflection.h> | 15 #include <google/protobuf/generated_message_reflection.h> |
| 16 #include <google/protobuf/reflection_ops.h> | 16 #include <google/protobuf/reflection_ops.h> |
| 17 #include <google/protobuf/wire_format.h> | 17 #include <google/protobuf/wire_format.h> |
| 18 // @@protoc_insertion_point(includes) | 18 // @@protoc_insertion_point(includes) |
| 19 | 19 |
| 20 namespace google { | 20 namespace google { |
| 21 namespace protobuf { | 21 namespace protobuf { |
| 22 class TypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyC
onstructed<Type> {}; | |
| 23 TypeDefaultTypeInternal _Type_default_instance_; | |
| 24 class FieldDefaultTypeInternal : public ::google::protobuf::internal::Explicitly
Constructed<Field> {}; | |
| 25 FieldDefaultTypeInternal _Field_default_instance_; | |
| 26 class EnumDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyC
onstructed<Enum> {}; | |
| 27 EnumDefaultTypeInternal _Enum_default_instance_; | |
| 28 class EnumValueDefaultTypeInternal : public ::google::protobuf::internal::Explic
itlyConstructed<EnumValue> {}; | |
| 29 EnumValueDefaultTypeInternal _EnumValue_default_instance_; | |
| 30 class OptionDefaultTypeInternal : public ::google::protobuf::internal::Explicitl
yConstructed<Option> {}; | |
| 31 OptionDefaultTypeInternal _Option_default_instance_; | |
| 32 | 22 |
| 33 namespace { | 23 namespace { |
| 34 | 24 |
| 35 ::google::protobuf::Metadata file_level_metadata[5]; | 25 const ::google::protobuf::Descriptor* Type_descriptor_ = NULL; |
| 36 const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3]; | 26 const ::google::protobuf::internal::GeneratedMessageReflection* |
| 27 Type_reflection_ = NULL; |
| 28 const ::google::protobuf::Descriptor* Field_descriptor_ = NULL; |
| 29 const ::google::protobuf::internal::GeneratedMessageReflection* |
| 30 Field_reflection_ = NULL; |
| 31 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor_ = NULL; |
| 32 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor_ = NULL; |
| 33 const ::google::protobuf::Descriptor* Enum_descriptor_ = NULL; |
| 34 const ::google::protobuf::internal::GeneratedMessageReflection* |
| 35 Enum_reflection_ = NULL; |
| 36 const ::google::protobuf::Descriptor* EnumValue_descriptor_ = NULL; |
| 37 const ::google::protobuf::internal::GeneratedMessageReflection* |
| 38 EnumValue_reflection_ = NULL; |
| 39 const ::google::protobuf::Descriptor* Option_descriptor_ = NULL; |
| 40 const ::google::protobuf::internal::GeneratedMessageReflection* |
| 41 Option_reflection_ = NULL; |
| 42 const ::google::protobuf::EnumDescriptor* Syntax_descriptor_ = NULL; |
| 37 | 43 |
| 38 } // namespace | 44 } // namespace |
| 39 | 45 |
| 40 | 46 |
| 41 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2ftype_2epr
oto() GOOGLE_ATTRIBUTE_COLD; | 47 void protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto() { |
| 42 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2ftype_2epr
oto() { | 48 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); |
| 43 static const ::google::protobuf::uint32 offsets[] = { | 49 const ::google::protobuf::FileDescriptor* file = |
| 44 ~0u, // no _has_bits_ | 50 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| 45 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _internal_metadata_), | 51 "google/protobuf/type.proto"); |
| 46 ~0u, // no _extensions_ | 52 GOOGLE_CHECK(file != NULL); |
| 47 ~0u, // no _oneof_case_ | 53 Type_descriptor_ = file->message_type(0); |
| 54 static const int Type_offsets_[6] = { |
| 48 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, name_), | 55 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, name_), |
| 49 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, fields_), | 56 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, fields_), |
| 50 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, oneofs_), | 57 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, oneofs_), |
| 51 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, options_), | 58 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, options_), |
| 52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, source_context_), | 59 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, source_context_), |
| 53 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, syntax_), | 60 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, syntax_), |
| 54 ~0u, // no _has_bits_ | 61 }; |
| 55 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _internal_metadata_), | 62 Type_reflection_ = |
| 56 ~0u, // no _extensions_ | 63 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( |
| 57 ~0u, // no _oneof_case_ | 64 Type_descriptor_, |
| 65 Type::default_instance_, |
| 66 Type_offsets_, |
| 67 -1, |
| 68 -1, |
| 69 -1, |
| 70 sizeof(Type), |
| 71 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _internal_metadata_), |
| 72 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Type, _is_default_instance_
)); |
| 73 Field_descriptor_ = file->message_type(1); |
| 74 static const int Field_offsets_[10] = { |
| 58 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, kind_), | 75 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, kind_), |
| 59 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, cardinality_), | 76 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, cardinality_), |
| 60 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, number_), | 77 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, number_), |
| 61 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, name_), | 78 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, name_), |
| 62 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, type_url_), | 79 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, type_url_), |
| 63 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, oneof_index_), | 80 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, oneof_index_), |
| 64 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, packed_), | 81 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, packed_), |
| 65 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, options_), | 82 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, options_), |
| 66 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, json_name_), | 83 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, json_name_), |
| 67 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, default_value_), | 84 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, default_value_), |
| 68 ~0u, // no _has_bits_ | 85 }; |
| 69 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _internal_metadata_), | 86 Field_reflection_ = |
| 70 ~0u, // no _extensions_ | 87 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( |
| 71 ~0u, // no _oneof_case_ | 88 Field_descriptor_, |
| 89 Field::default_instance_, |
| 90 Field_offsets_, |
| 91 -1, |
| 92 -1, |
| 93 -1, |
| 94 sizeof(Field), |
| 95 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _internal_metadata_)
, |
| 96 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _is_default_instance
_)); |
| 97 Field_Kind_descriptor_ = Field_descriptor_->enum_type(0); |
| 98 Field_Cardinality_descriptor_ = Field_descriptor_->enum_type(1); |
| 99 Enum_descriptor_ = file->message_type(2); |
| 100 static const int Enum_offsets_[5] = { |
| 72 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, name_), | 101 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, name_), |
| 73 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, enumvalue_), | 102 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, enumvalue_), |
| 74 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, options_), | 103 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, options_), |
| 75 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, source_context_), | 104 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, source_context_), |
| 76 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, syntax_), | 105 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, syntax_), |
| 77 ~0u, // no _has_bits_ | 106 }; |
| 78 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _internal_metadata
_), | 107 Enum_reflection_ = |
| 79 ~0u, // no _extensions_ | 108 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( |
| 80 ~0u, // no _oneof_case_ | 109 Enum_descriptor_, |
| 110 Enum::default_instance_, |
| 111 Enum_offsets_, |
| 112 -1, |
| 113 -1, |
| 114 -1, |
| 115 sizeof(Enum), |
| 116 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _internal_metadata_), |
| 117 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Enum, _is_default_instance_
)); |
| 118 EnumValue_descriptor_ = file->message_type(3); |
| 119 static const int EnumValue_offsets_[3] = { |
| 81 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, name_), | 120 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, name_), |
| 82 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, number_), | 121 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, number_), |
| 83 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, options_), | 122 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, options_), |
| 84 ~0u, // no _has_bits_ | 123 }; |
| 85 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _internal_metadata_), | 124 EnumValue_reflection_ = |
| 86 ~0u, // no _extensions_ | 125 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( |
| 87 ~0u, // no _oneof_case_ | 126 EnumValue_descriptor_, |
| 127 EnumValue::default_instance_, |
| 128 EnumValue_offsets_, |
| 129 -1, |
| 130 -1, |
| 131 -1, |
| 132 sizeof(EnumValue), |
| 133 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _internal_metada
ta_), |
| 134 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValue, _is_default_inst
ance_)); |
| 135 Option_descriptor_ = file->message_type(4); |
| 136 static const int Option_offsets_[2] = { |
| 88 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, name_), | 137 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, name_), |
| 89 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, value_), | 138 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, value_), |
| 90 }; | 139 }; |
| 91 return offsets; | 140 Option_reflection_ = |
| 92 } | 141 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( |
| 93 | 142 Option_descriptor_, |
| 94 static const ::google::protobuf::internal::MigrationSchema schemas[] = { | 143 Option::default_instance_, |
| 95 { 0, -1, sizeof(Type)}, | 144 Option_offsets_, |
| 96 { 10, -1, sizeof(Field)}, | 145 -1, |
| 97 { 24, -1, sizeof(Enum)}, | 146 -1, |
| 98 { 33, -1, sizeof(EnumValue)}, | 147 -1, |
| 99 { 40, -1, sizeof(Option)}, | 148 sizeof(Option), |
| 100 }; | 149 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _internal_metadata_
), |
| 101 | 150 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Option, _is_default_instanc
e_)); |
| 102 static const ::google::protobuf::internal::DefaultInstanceData file_default_inst
ances[] = { | 151 Syntax_descriptor_ = file->enum_type(0); |
| 103 {reinterpret_cast<const ::google::protobuf::Message*>(&_Type_default_instance_
), NULL}, | 152 } |
| 104 {reinterpret_cast<const ::google::protobuf::Message*>(&_Field_default_instance
_), NULL}, | |
| 105 {reinterpret_cast<const ::google::protobuf::Message*>(&_Enum_default_instance_
), NULL}, | |
| 106 {reinterpret_cast<const ::google::protobuf::Message*>(&_EnumValue_default_inst
ance_), NULL}, | |
| 107 {reinterpret_cast<const ::google::protobuf::Message*>(&_Option_default_instanc
e_), NULL}, | |
| 108 }; | |
| 109 | 153 |
| 110 namespace { | 154 namespace { |
| 111 | 155 |
| 112 void protobuf_AssignDescriptors() { | 156 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| 113 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); | 157 inline void protobuf_AssignDescriptorsOnce() { |
| 114 ::google::protobuf::MessageFactory* factory = NULL; | 158 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| 115 AssignDescriptors( | 159 &protobuf_AssignDesc_google_2fprotobuf_2ftype_2eproto); |
| 116 "google/protobuf/type.proto", schemas, file_default_instances, protobuf_Of
fsets_google_2fprotobuf_2ftype_2eproto(), factory, | 160 } |
| 117 file_level_metadata, file_level_enum_descriptors, NULL); | 161 |
| 118 } | |
| 119 | |
| 120 void protobuf_AssignDescriptorsOnce() { | |
| 121 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); | |
| 122 ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); | |
| 123 } | |
| 124 | |
| 125 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; | |
| 126 void protobuf_RegisterTypes(const ::std::string&) { | 162 void protobuf_RegisterTypes(const ::std::string&) { |
| 127 protobuf_AssignDescriptorsOnce(); | 163 protobuf_AssignDescriptorsOnce(); |
| 128 ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5); | 164 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 165 Type_descriptor_, &Type::default_instance()); |
| 166 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 167 Field_descriptor_, &Field::default_instance()); |
| 168 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 169 Enum_descriptor_, &Enum::default_instance()); |
| 170 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 171 EnumValue_descriptor_, &EnumValue::default_instance()); |
| 172 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 173 Option_descriptor_, &Option::default_instance()); |
| 129 } | 174 } |
| 130 | 175 |
| 131 } // namespace | 176 } // namespace |
| 132 | 177 |
| 133 void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto() { | 178 void protobuf_ShutdownFile_google_2fprotobuf_2ftype_2eproto() { |
| 134 _Type_default_instance_.Shutdown(); | 179 delete Type::default_instance_; |
| 135 delete file_level_metadata[0].reflection; | 180 delete Type_reflection_; |
| 136 _Field_default_instance_.Shutdown(); | 181 delete Field::default_instance_; |
| 137 delete file_level_metadata[1].reflection; | 182 delete Field_reflection_; |
| 138 _Enum_default_instance_.Shutdown(); | 183 delete Enum::default_instance_; |
| 139 delete file_level_metadata[2].reflection; | 184 delete Enum_reflection_; |
| 140 _EnumValue_default_instance_.Shutdown(); | 185 delete EnumValue::default_instance_; |
| 141 delete file_level_metadata[3].reflection; | 186 delete EnumValue_reflection_; |
| 142 _Option_default_instance_.Shutdown(); | 187 delete Option::default_instance_; |
| 143 delete file_level_metadata[4].reflection; | 188 delete Option_reflection_; |
| 144 } | 189 } |
| 145 | 190 |
| 146 void protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto_impl() { | 191 void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() { |
| 192 static bool already_here = false; |
| 193 if (already_here) return; |
| 194 already_here = true; |
| 147 GOOGLE_PROTOBUF_VERIFY_VERSION; | 195 GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 148 | 196 |
| 149 ::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fany_2eproto(); | 197 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); |
| 150 ::google::protobuf::protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext
_2eproto(); | 198 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2epr
oto(); |
| 151 ::google::protobuf::internal::InitProtobufDefaults(); | |
| 152 _Type_default_instance_.DefaultConstruct(); | |
| 153 _Field_default_instance_.DefaultConstruct(); | |
| 154 _Enum_default_instance_.DefaultConstruct(); | |
| 155 _EnumValue_default_instance_.DefaultConstruct(); | |
| 156 _Option_default_instance_.DefaultConstruct(); | |
| 157 _Type_default_instance_.get_mutable()->source_context_ = const_cast< ::google:
:protobuf::SourceContext*>( | |
| 158 ::google::protobuf::SourceContext::internal_default_instance()); | |
| 159 _Enum_default_instance_.get_mutable()->source_context_ = const_cast< ::google:
:protobuf::SourceContext*>( | |
| 160 ::google::protobuf::SourceContext::internal_default_instance()); | |
| 161 _Option_default_instance_.get_mutable()->value_ = const_cast< ::google::protob
uf::Any*>( | |
| 162 ::google::protobuf::Any::internal_default_instance()); | |
| 163 } | |
| 164 | |
| 165 void protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto() { | |
| 166 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); | |
| 167 ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprot
obuf_2ftype_2eproto_impl); | |
| 168 } | |
| 169 void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl() { | |
| 170 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 171 static const char descriptor[] = { | |
| 172 "\n\032google/protobuf/type.proto\022\017google.pro" | |
| 173 "tobuf\032\031google/protobuf/any.proto\032$google" | |
| 174 "/protobuf/source_context.proto\"\327\001\n\004Type\022" | |
| 175 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.go
ogle.p" | |
| 176 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options" | |
| 177 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc" | |
| 178 "e_context\030\005 \001(\0132\036.google.protobuf.Source" | |
| 179 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu" | |
| 180 "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl
" | |
| 181 "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001" | |
| 182 "(\0162\".google.protobuf.Field.Cardinality\022\016" | |
| 183 "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\
n\010type_url" | |
| 184 "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006
packed\030\010 " | |
| 185 "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O" | |
| 186 "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu" | |
| 187 "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\0
22\017\n\013TY" | |
| 188 "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6" | |
| 189 "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\
022\020\n\014" | |
| 190 "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE" | |
| 191 "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n" | |
| 192 "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\
n\013TY" | |
| 193 "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE" | |
| 194 "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020
" | |
| 195 "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CA
R" | |
| 196 "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION" | |
| 197 "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN" | |
| 198 "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001
(\t\022" | |
| 199 "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu" | |
| 200 "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu" | |
| 201 "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl" | |
| 202 "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016" | |
| 203 "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014" | |
| 204 "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\0
07options\030" | |
| 205 "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option" | |
| 206 "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024
.google.p" | |
| 207 "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000" | |
| 208 "\022\021\n\rSYNTAX_PROTO3\020\001B}\n\023com.google.protob" | |
| 209 "ufB\tTypeProtoP\001Z/google.golang.org/genpr" | |
| 210 "oto/protobuf/ptype;ptype\370\001\001\242\002\003GPB\252\002\036Goog" | |
| 211 "le.Protobuf.WellKnownTypesb\006proto3" | |
| 212 }; | |
| 213 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( | 199 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| 214 descriptor, 1594); | 200 "\n\032google/protobuf/type.proto\022\017google.pro" |
| 201 "tobuf\032\031google/protobuf/any.proto\032$google" |
| 202 "/protobuf/source_context.proto\"\327\001\n\004Type\022" |
| 203 "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.goog
le.p" |
| 204 "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options" |
| 205 "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc" |
| 206 "e_context\030\005 \001(\0132\036.google.protobuf.Source" |
| 207 "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu" |
| 208 "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl" |
| 209 "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001" |
| 210 "(\0162\".google.protobuf.Field.Cardinality\022\016" |
| 211 "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\
010type_url" |
| 212 "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006pa
cked\030\010 " |
| 213 "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O" |
| 214 "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu" |
| 215 "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022
\017\n\013TY" |
| 216 "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6" |
| 217 "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\02
2\020\n\014" |
| 218 "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE" |
| 219 "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n" |
| 220 "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\
013TY" |
| 221 "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE" |
| 222 "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020" |
| 223 "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR" |
| 224 "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION" |
| 225 "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN" |
| 226 "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\
t\022" |
| 227 "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu" |
| 228 "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu" |
| 229 "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl" |
| 230 "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016" |
| 231 "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014" |
| 232 "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007
options\030" |
| 233 "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option" |
| 234 "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.g
oogle.p" |
| 235 "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000" |
| 236 "\022\021\n\rSYNTAX_PROTO3\020\001BL\n\023com.google.protob" |
| 237 "ufB\tTypeProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Protob" |
| 238 "uf.WellKnownTypesb\006proto3", 1545); |
| 215 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( | 239 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 216 "google/protobuf/type.proto", &protobuf_RegisterTypes); | 240 "google/protobuf/type.proto", &protobuf_RegisterTypes); |
| 217 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fany_2eproto(); | 241 Type::default_instance_ = new Type(); |
| 218 ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2epr
oto(); | 242 Field::default_instance_ = new Field(); |
| 243 Enum::default_instance_ = new Enum(); |
| 244 EnumValue::default_instance_ = new EnumValue(); |
| 245 Option::default_instance_ = new Option(); |
| 246 Type::default_instance_->InitAsDefaultInstance(); |
| 247 Field::default_instance_->InitAsDefaultInstance(); |
| 248 Enum::default_instance_->InitAsDefaultInstance(); |
| 249 EnumValue::default_instance_->InitAsDefaultInstance(); |
| 250 Option::default_instance_->InitAsDefaultInstance(); |
| 219 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2ftype_2eproto); | 251 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2ftype_2eproto); |
| 220 } | 252 } |
| 221 | 253 |
| 222 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_o
nce_); | |
| 223 void protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto() { | |
| 224 ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2ftype_
2eproto_once_, | |
| 225 &protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto_impl); | |
| 226 } | |
| 227 // Force AddDescriptors() to be called at static initialization time. | 254 // Force AddDescriptors() to be called at static initialization time. |
| 228 struct StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto { | 255 struct StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto { |
| 229 StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto() { | 256 StaticDescriptorInitializer_google_2fprotobuf_2ftype_2eproto() { |
| 230 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); | 257 protobuf_AddDesc_google_2fprotobuf_2ftype_2eproto(); |
| 231 } | 258 } |
| 232 } static_descriptor_initializer_google_2fprotobuf_2ftype_2eproto_; | 259 } static_descriptor_initializer_google_2fprotobuf_2ftype_2eproto_; |
| 233 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() { | |
| 234 protobuf_AssignDescriptorsOnce(); | |
| 235 return file_level_enum_descriptors[0]; | |
| 236 } | |
| 237 bool Field_Kind_IsValid(int value) { | |
| 238 switch (value) { | |
| 239 case 0: | |
| 240 case 1: | |
| 241 case 2: | |
| 242 case 3: | |
| 243 case 4: | |
| 244 case 5: | |
| 245 case 6: | |
| 246 case 7: | |
| 247 case 8: | |
| 248 case 9: | |
| 249 case 10: | |
| 250 case 11: | |
| 251 case 12: | |
| 252 case 13: | |
| 253 case 14: | |
| 254 case 15: | |
| 255 case 16: | |
| 256 case 17: | |
| 257 case 18: | |
| 258 return true; | |
| 259 default: | |
| 260 return false; | |
| 261 } | |
| 262 } | |
| 263 | |
| 264 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | |
| 265 const Field_Kind Field::TYPE_UNKNOWN; | |
| 266 const Field_Kind Field::TYPE_DOUBLE; | |
| 267 const Field_Kind Field::TYPE_FLOAT; | |
| 268 const Field_Kind Field::TYPE_INT64; | |
| 269 const Field_Kind Field::TYPE_UINT64; | |
| 270 const Field_Kind Field::TYPE_INT32; | |
| 271 const Field_Kind Field::TYPE_FIXED64; | |
| 272 const Field_Kind Field::TYPE_FIXED32; | |
| 273 const Field_Kind Field::TYPE_BOOL; | |
| 274 const Field_Kind Field::TYPE_STRING; | |
| 275 const Field_Kind Field::TYPE_GROUP; | |
| 276 const Field_Kind Field::TYPE_MESSAGE; | |
| 277 const Field_Kind Field::TYPE_BYTES; | |
| 278 const Field_Kind Field::TYPE_UINT32; | |
| 279 const Field_Kind Field::TYPE_ENUM; | |
| 280 const Field_Kind Field::TYPE_SFIXED32; | |
| 281 const Field_Kind Field::TYPE_SFIXED64; | |
| 282 const Field_Kind Field::TYPE_SINT32; | |
| 283 const Field_Kind Field::TYPE_SINT64; | |
| 284 const Field_Kind Field::Kind_MIN; | |
| 285 const Field_Kind Field::Kind_MAX; | |
| 286 const int Field::Kind_ARRAYSIZE; | |
| 287 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | |
| 288 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() { | |
| 289 protobuf_AssignDescriptorsOnce(); | |
| 290 return file_level_enum_descriptors[1]; | |
| 291 } | |
| 292 bool Field_Cardinality_IsValid(int value) { | |
| 293 switch (value) { | |
| 294 case 0: | |
| 295 case 1: | |
| 296 case 2: | |
| 297 case 3: | |
| 298 return true; | |
| 299 default: | |
| 300 return false; | |
| 301 } | |
| 302 } | |
| 303 | |
| 304 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | |
| 305 const Field_Cardinality Field::CARDINALITY_UNKNOWN; | |
| 306 const Field_Cardinality Field::CARDINALITY_OPTIONAL; | |
| 307 const Field_Cardinality Field::CARDINALITY_REQUIRED; | |
| 308 const Field_Cardinality Field::CARDINALITY_REPEATED; | |
| 309 const Field_Cardinality Field::Cardinality_MIN; | |
| 310 const Field_Cardinality Field::Cardinality_MAX; | |
| 311 const int Field::Cardinality_ARRAYSIZE; | |
| 312 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | |
| 313 const ::google::protobuf::EnumDescriptor* Syntax_descriptor() { | 260 const ::google::protobuf::EnumDescriptor* Syntax_descriptor() { |
| 314 protobuf_AssignDescriptorsOnce(); | 261 protobuf_AssignDescriptorsOnce(); |
| 315 return file_level_enum_descriptors[2]; | 262 return Syntax_descriptor_; |
| 316 } | 263 } |
| 317 bool Syntax_IsValid(int value) { | 264 bool Syntax_IsValid(int value) { |
| 318 switch (value) { | 265 switch(value) { |
| 319 case 0: | 266 case 0: |
| 320 case 1: | 267 case 1: |
| 321 return true; | 268 return true; |
| 322 default: | 269 default: |
| 323 return false; | 270 return false; |
| 324 } | 271 } |
| 325 } | 272 } |
| 326 | 273 |
| 327 | 274 |
| 275 namespace { |
| 276 |
| 277 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; |
| 278 static void MergeFromFail(int line) { |
| 279 GOOGLE_CHECK(false) << __FILE__ << ":" << line; |
| 280 } |
| 281 |
| 282 } // namespace |
| 283 |
| 284 |
| 328 // =================================================================== | 285 // =================================================================== |
| 329 | 286 |
| 330 void Type::_slow_mutable_source_context() { | |
| 331 source_context_ = ::google::protobuf::Arena::Create< ::google::protobuf::Sourc
eContext >( | |
| 332 GetArenaNoVirtual()); | |
| 333 } | |
| 334 ::google::protobuf::SourceContext* Type::_slow_release_source_context() { | |
| 335 if (source_context_ == NULL) { | |
| 336 return NULL; | |
| 337 } else { | |
| 338 ::google::protobuf::SourceContext* temp = new ::google::protobuf::SourceCont
ext(*source_context_); | |
| 339 source_context_ = NULL; | |
| 340 return temp; | |
| 341 } | |
| 342 } | |
| 343 ::google::protobuf::SourceContext* Type::unsafe_arena_release_source_context() { | |
| 344 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.so
urce_context) | |
| 345 | |
| 346 ::google::protobuf::SourceContext* temp = source_context_; | |
| 347 source_context_ = NULL; | |
| 348 return temp; | |
| 349 } | |
| 350 void Type::unsafe_arena_set_allocated_source_context( | |
| 351 ::google::protobuf::SourceContext* source_context) { | |
| 352 if (GetArenaNoVirtual() == NULL) { | |
| 353 delete source_context_; | |
| 354 } | |
| 355 source_context_ = source_context; | |
| 356 if (source_context) { | |
| 357 | |
| 358 } else { | |
| 359 | |
| 360 } | |
| 361 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.T
ype.source_context) | |
| 362 } | |
| 363 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 287 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 364 const int Type::kNameFieldNumber; | 288 const int Type::kNameFieldNumber; |
| 365 const int Type::kFieldsFieldNumber; | 289 const int Type::kFieldsFieldNumber; |
| 366 const int Type::kOneofsFieldNumber; | 290 const int Type::kOneofsFieldNumber; |
| 367 const int Type::kOptionsFieldNumber; | 291 const int Type::kOptionsFieldNumber; |
| 368 const int Type::kSourceContextFieldNumber; | 292 const int Type::kSourceContextFieldNumber; |
| 369 const int Type::kSyntaxFieldNumber; | 293 const int Type::kSyntaxFieldNumber; |
| 370 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 294 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 371 | 295 |
| 372 Type::Type() | 296 Type::Type() |
| 373 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 297 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 374 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { | |
| 375 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 376 } | |
| 377 SharedCtor(); | 298 SharedCtor(); |
| 378 // @@protoc_insertion_point(constructor:google.protobuf.Type) | 299 // @@protoc_insertion_point(constructor:google.protobuf.Type) |
| 379 } | 300 } |
| 380 Type::Type(::google::protobuf::Arena* arena) | 301 |
| 381 : ::google::protobuf::Message(), | 302 void Type::InitAsDefaultInstance() { |
| 382 _internal_metadata_(arena), | 303 _is_default_instance_ = true; |
| 383 fields_(arena), | 304 source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::p
rotobuf::SourceContext::default_instance()); |
| 384 oneofs_(arena), | |
| 385 options_(arena) { | |
| 386 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 387 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 388 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 389 SharedCtor(); | |
| 390 RegisterArenaDtor(arena); | |
| 391 // @@protoc_insertion_point(arena_constructor:google.protobuf.Type) | |
| 392 } | 305 } |
| 306 |
| 393 Type::Type(const Type& from) | 307 Type::Type(const Type& from) |
| 394 : ::google::protobuf::Message(), | 308 : ::google::protobuf::Message(), |
| 395 _internal_metadata_(NULL), | 309 _internal_metadata_(NULL) { |
| 396 fields_(from.fields_), | 310 SharedCtor(); |
| 397 oneofs_(from.oneofs_), | 311 MergeFrom(from); |
| 398 options_(from.options_), | |
| 399 _cached_size_(0) { | |
| 400 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 401 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | |
| 402 if (from.name().size() > 0) { | |
| 403 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from
.name(), | |
| 404 GetArenaNoVirtual()); | |
| 405 } | |
| 406 if (from.has_source_context()) { | |
| 407 source_context_ = new ::google::protobuf::SourceContext(*from.source_context
_); | |
| 408 } else { | |
| 409 source_context_ = NULL; | |
| 410 } | |
| 411 syntax_ = from.syntax_; | |
| 412 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type) | 312 // @@protoc_insertion_point(copy_constructor:google.protobuf.Type) |
| 413 } | 313 } |
| 414 | 314 |
| 415 void Type::SharedCtor() { | 315 void Type::SharedCtor() { |
| 316 _is_default_instance_ = false; |
| 317 ::google::protobuf::internal::GetEmptyString(); |
| 318 _cached_size_ = 0; |
| 416 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | 319 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); |
| 417 ::memset(&source_context_, 0, reinterpret_cast<char*>(&syntax_) - | 320 source_context_ = NULL; |
| 418 reinterpret_cast<char*>(&source_context_) + sizeof(syntax_)); | 321 syntax_ = 0; |
| 419 _cached_size_ = 0; | |
| 420 } | 322 } |
| 421 | 323 |
| 422 Type::~Type() { | 324 Type::~Type() { |
| 423 // @@protoc_insertion_point(destructor:google.protobuf.Type) | 325 // @@protoc_insertion_point(destructor:google.protobuf.Type) |
| 424 SharedDtor(); | 326 SharedDtor(); |
| 425 } | 327 } |
| 426 | 328 |
| 427 void Type::SharedDtor() { | 329 void Type::SharedDtor() { |
| 428 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); | 330 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d()); |
| 429 if (arena != NULL) { | 331 if (this != default_instance_) { |
| 430 return; | |
| 431 } | |
| 432 | |
| 433 name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ar
ena); | |
| 434 if (this != internal_default_instance()) { | |
| 435 delete source_context_; | 332 delete source_context_; |
| 436 } | 333 } |
| 437 } | 334 } |
| 438 | 335 |
| 439 void Type::ArenaDtor(void* object) { | |
| 440 Type* _this = reinterpret_cast< Type* >(object); | |
| 441 (void)_this; | |
| 442 } | |
| 443 void Type::RegisterArenaDtor(::google::protobuf::Arena* arena) { | |
| 444 } | |
| 445 void Type::SetCachedSize(int size) const { | 336 void Type::SetCachedSize(int size) const { |
| 446 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 337 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 447 _cached_size_ = size; | 338 _cached_size_ = size; |
| 448 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 339 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 449 } | 340 } |
| 450 const ::google::protobuf::Descriptor* Type::descriptor() { | 341 const ::google::protobuf::Descriptor* Type::descriptor() { |
| 451 protobuf_AssignDescriptorsOnce(); | 342 protobuf_AssignDescriptorsOnce(); |
| 452 return file_level_metadata[0].descriptor; | 343 return Type_descriptor_; |
| 453 } | 344 } |
| 454 | 345 |
| 455 const Type& Type::default_instance() { | 346 const Type& Type::default_instance() { |
| 456 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | 347 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2epro
to(); |
| 457 return *internal_default_instance(); | 348 return *default_instance_; |
| 458 } | 349 } |
| 459 | 350 |
| 351 Type* Type::default_instance_ = NULL; |
| 352 |
| 460 Type* Type::New(::google::protobuf::Arena* arena) const { | 353 Type* Type::New(::google::protobuf::Arena* arena) const { |
| 461 return ::google::protobuf::Arena::CreateMessage<Type>(arena); | 354 Type* n = new Type; |
| 355 if (arena != NULL) { |
| 356 arena->Own(n); |
| 357 } |
| 358 return n; |
| 462 } | 359 } |
| 463 | 360 |
| 464 void Type::Clear() { | 361 void Type::Clear() { |
| 465 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type) | 362 // @@protoc_insertion_point(message_clear_start:google.protobuf.Type) |
| 363 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 364 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; |
| 365 source_context_ = NULL; |
| 366 syntax_ = 0; |
| 466 fields_.Clear(); | 367 fields_.Clear(); |
| 467 oneofs_.Clear(); | 368 oneofs_.Clear(); |
| 468 options_.Clear(); | 369 options_.Clear(); |
| 469 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | |
| 470 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) { | |
| 471 delete source_context_; | |
| 472 } | |
| 473 source_context_ = NULL; | |
| 474 syntax_ = 0; | |
| 475 } | 370 } |
| 476 | 371 |
| 477 bool Type::MergePartialFromCodedStream( | 372 bool Type::MergePartialFromCodedStream( |
| 478 ::google::protobuf::io::CodedInputStream* input) { | 373 ::google::protobuf::io::CodedInputStream* input) { |
| 479 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 374 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 480 ::google::protobuf::uint32 tag; | 375 ::google::protobuf::uint32 tag; |
| 481 // @@protoc_insertion_point(parse_start:google.protobuf.Type) | 376 // @@protoc_insertion_point(parse_start:google.protobuf.Type) |
| 482 for (;;) { | 377 for (;;) { |
| 483 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); | 378 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 484 tag = p.first; | 379 tag = p.first; |
| 485 if (!p.second) goto handle_unusual; | 380 if (!p.second) goto handle_unusual; |
| 486 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 381 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 487 // string name = 1; | 382 // optional string name = 1; |
| 488 case 1: { | 383 case 1: { |
| 489 if (tag == 10u) { | 384 if (tag == 10) { |
| 490 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 385 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 491 input, this->mutable_name())); | 386 input, this->mutable_name())); |
| 492 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 387 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 493 this->name().data(), this->name().length(), | 388 this->name().data(), this->name().length(), |
| 494 ::google::protobuf::internal::WireFormatLite::PARSE, | 389 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 495 "google.protobuf.Type.name")); | 390 "google.protobuf.Type.name")); |
| 496 } else { | 391 } else { |
| 497 goto handle_unusual; | 392 goto handle_unusual; |
| 498 } | 393 } |
| 394 if (input->ExpectTag(18)) goto parse_fields; |
| 499 break; | 395 break; |
| 500 } | 396 } |
| 501 | 397 |
| 502 // repeated .google.protobuf.Field fields = 2; | 398 // repeated .google.protobuf.Field fields = 2; |
| 503 case 2: { | 399 case 2: { |
| 504 if (tag == 18u) { | 400 if (tag == 18) { |
| 401 parse_fields: |
| 505 DO_(input->IncrementRecursionDepth()); | 402 DO_(input->IncrementRecursionDepth()); |
| 403 parse_loop_fields: |
| 506 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 404 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 507 input, add_fields())); | 405 input, add_fields())); |
| 508 } else { | 406 } else { |
| 509 goto handle_unusual; | 407 goto handle_unusual; |
| 510 } | 408 } |
| 409 if (input->ExpectTag(18)) goto parse_loop_fields; |
| 511 input->UnsafeDecrementRecursionDepth(); | 410 input->UnsafeDecrementRecursionDepth(); |
| 411 if (input->ExpectTag(26)) goto parse_oneofs; |
| 512 break; | 412 break; |
| 513 } | 413 } |
| 514 | 414 |
| 515 // repeated string oneofs = 3; | 415 // repeated string oneofs = 3; |
| 516 case 3: { | 416 case 3: { |
| 517 if (tag == 26u) { | 417 if (tag == 26) { |
| 418 parse_oneofs: |
| 518 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 419 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 519 input, this->add_oneofs())); | 420 input, this->add_oneofs())); |
| 520 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 421 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 521 this->oneofs(this->oneofs_size() - 1).data(), | 422 this->oneofs(this->oneofs_size() - 1).data(), |
| 522 this->oneofs(this->oneofs_size() - 1).length(), | 423 this->oneofs(this->oneofs_size() - 1).length(), |
| 523 ::google::protobuf::internal::WireFormatLite::PARSE, | 424 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 524 "google.protobuf.Type.oneofs")); | 425 "google.protobuf.Type.oneofs")); |
| 525 } else { | 426 } else { |
| 526 goto handle_unusual; | 427 goto handle_unusual; |
| 527 } | 428 } |
| 429 if (input->ExpectTag(26)) goto parse_oneofs; |
| 430 if (input->ExpectTag(34)) goto parse_options; |
| 528 break; | 431 break; |
| 529 } | 432 } |
| 530 | 433 |
| 531 // repeated .google.protobuf.Option options = 4; | 434 // repeated .google.protobuf.Option options = 4; |
| 532 case 4: { | 435 case 4: { |
| 533 if (tag == 34u) { | 436 if (tag == 34) { |
| 437 parse_options: |
| 534 DO_(input->IncrementRecursionDepth()); | 438 DO_(input->IncrementRecursionDepth()); |
| 439 parse_loop_options: |
| 535 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 440 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 536 input, add_options())); | 441 input, add_options())); |
| 537 } else { | 442 } else { |
| 538 goto handle_unusual; | 443 goto handle_unusual; |
| 539 } | 444 } |
| 445 if (input->ExpectTag(34)) goto parse_loop_options; |
| 540 input->UnsafeDecrementRecursionDepth(); | 446 input->UnsafeDecrementRecursionDepth(); |
| 447 if (input->ExpectTag(42)) goto parse_source_context; |
| 541 break; | 448 break; |
| 542 } | 449 } |
| 543 | 450 |
| 544 // .google.protobuf.SourceContext source_context = 5; | 451 // optional .google.protobuf.SourceContext source_context = 5; |
| 545 case 5: { | 452 case 5: { |
| 546 if (tag == 42u) { | 453 if (tag == 42) { |
| 454 parse_source_context: |
| 547 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( | 455 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( |
| 548 input, mutable_source_context())); | 456 input, mutable_source_context())); |
| 549 } else { | 457 } else { |
| 550 goto handle_unusual; | 458 goto handle_unusual; |
| 551 } | 459 } |
| 460 if (input->ExpectTag(48)) goto parse_syntax; |
| 552 break; | 461 break; |
| 553 } | 462 } |
| 554 | 463 |
| 555 // .google.protobuf.Syntax syntax = 6; | 464 // optional .google.protobuf.Syntax syntax = 6; |
| 556 case 6: { | 465 case 6: { |
| 557 if (tag == 48u) { | 466 if (tag == 48) { |
| 467 parse_syntax: |
| 558 int value; | 468 int value; |
| 559 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 469 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 560 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( | 470 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( |
| 561 input, &value))); | 471 input, &value))); |
| 562 set_syntax(static_cast< ::google::protobuf::Syntax >(value)); | 472 set_syntax(static_cast< ::google::protobuf::Syntax >(value)); |
| 563 } else { | 473 } else { |
| 564 goto handle_unusual; | 474 goto handle_unusual; |
| 565 } | 475 } |
| 476 if (input->ExpectAtEnd()) goto success; |
| 566 break; | 477 break; |
| 567 } | 478 } |
| 568 | 479 |
| 569 default: { | 480 default: { |
| 570 handle_unusual: | 481 handle_unusual: |
| 571 if (tag == 0 || | 482 if (tag == 0 || |
| 572 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 483 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 573 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 484 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 574 goto success; | 485 goto success; |
| 575 } | 486 } |
| 576 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 487 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 577 break; | 488 break; |
| 578 } | 489 } |
| 579 } | 490 } |
| 580 } | 491 } |
| 581 success: | 492 success: |
| 582 // @@protoc_insertion_point(parse_success:google.protobuf.Type) | 493 // @@protoc_insertion_point(parse_success:google.protobuf.Type) |
| 583 return true; | 494 return true; |
| 584 failure: | 495 failure: |
| 585 // @@protoc_insertion_point(parse_failure:google.protobuf.Type) | 496 // @@protoc_insertion_point(parse_failure:google.protobuf.Type) |
| 586 return false; | 497 return false; |
| 587 #undef DO_ | 498 #undef DO_ |
| 588 } | 499 } |
| 589 | 500 |
| 590 void Type::SerializeWithCachedSizes( | 501 void Type::SerializeWithCachedSizes( |
| 591 ::google::protobuf::io::CodedOutputStream* output) const { | 502 ::google::protobuf::io::CodedOutputStream* output) const { |
| 592 // @@protoc_insertion_point(serialize_start:google.protobuf.Type) | 503 // @@protoc_insertion_point(serialize_start:google.protobuf.Type) |
| 593 // string name = 1; | 504 // optional string name = 1; |
| 594 if (this->name().size() > 0) { | 505 if (this->name().size() > 0) { |
| 595 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 506 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 596 this->name().data(), this->name().length(), | 507 this->name().data(), this->name().length(), |
| 597 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 508 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 598 "google.protobuf.Type.name"); | 509 "google.protobuf.Type.name"); |
| 599 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 510 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 600 1, this->name(), output); | 511 1, this->name(), output); |
| 601 } | 512 } |
| 602 | 513 |
| 603 // repeated .google.protobuf.Field fields = 2; | 514 // repeated .google.protobuf.Field fields = 2; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 615 ::google::protobuf::internal::WireFormatLite::WriteString( | 526 ::google::protobuf::internal::WireFormatLite::WriteString( |
| 616 3, this->oneofs(i), output); | 527 3, this->oneofs(i), output); |
| 617 } | 528 } |
| 618 | 529 |
| 619 // repeated .google.protobuf.Option options = 4; | 530 // repeated .google.protobuf.Option options = 4; |
| 620 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 531 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 621 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 532 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 622 4, this->options(i), output); | 533 4, this->options(i), output); |
| 623 } | 534 } |
| 624 | 535 |
| 625 // .google.protobuf.SourceContext source_context = 5; | 536 // optional .google.protobuf.SourceContext source_context = 5; |
| 626 if (this->has_source_context()) { | 537 if (this->has_source_context()) { |
| 627 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 538 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 628 5, *this->source_context_, output); | 539 5, *this->source_context_, output); |
| 629 } | 540 } |
| 630 | 541 |
| 631 // .google.protobuf.Syntax syntax = 6; | 542 // optional .google.protobuf.Syntax syntax = 6; |
| 632 if (this->syntax() != 0) { | 543 if (this->syntax() != 0) { |
| 633 ::google::protobuf::internal::WireFormatLite::WriteEnum( | 544 ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 634 6, this->syntax(), output); | 545 6, this->syntax(), output); |
| 635 } | 546 } |
| 636 | 547 |
| 637 // @@protoc_insertion_point(serialize_end:google.protobuf.Type) | 548 // @@protoc_insertion_point(serialize_end:google.protobuf.Type) |
| 638 } | 549 } |
| 639 | 550 |
| 640 ::google::protobuf::uint8* Type::InternalSerializeWithCachedSizesToArray( | 551 ::google::protobuf::uint8* Type::SerializeWithCachedSizesToArray( |
| 641 bool deterministic, ::google::protobuf::uint8* target) const { | 552 ::google::protobuf::uint8* target) const { |
| 642 (void)deterministic; // Unused | |
| 643 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) | 553 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Type) |
| 644 // string name = 1; | 554 // optional string name = 1; |
| 645 if (this->name().size() > 0) { | 555 if (this->name().size() > 0) { |
| 646 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 556 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 647 this->name().data(), this->name().length(), | 557 this->name().data(), this->name().length(), |
| 648 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 558 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 649 "google.protobuf.Type.name"); | 559 "google.protobuf.Type.name"); |
| 650 target = | 560 target = |
| 651 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 561 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 652 1, this->name(), target); | 562 1, this->name(), target); |
| 653 } | 563 } |
| 654 | 564 |
| 655 // repeated .google.protobuf.Field fields = 2; | 565 // repeated .google.protobuf.Field fields = 2; |
| 656 for (unsigned int i = 0, n = this->fields_size(); i < n; i++) { | 566 for (unsigned int i = 0, n = this->fields_size(); i < n; i++) { |
| 657 target = ::google::protobuf::internal::WireFormatLite:: | 567 target = ::google::protobuf::internal::WireFormatLite:: |
| 658 InternalWriteMessageNoVirtualToArray( | 568 WriteMessageNoVirtualToArray( |
| 659 2, this->fields(i), false, target); | 569 2, this->fields(i), target); |
| 660 } | 570 } |
| 661 | 571 |
| 662 // repeated string oneofs = 3; | 572 // repeated string oneofs = 3; |
| 663 for (int i = 0; i < this->oneofs_size(); i++) { | 573 for (int i = 0; i < this->oneofs_size(); i++) { |
| 664 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 574 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 665 this->oneofs(i).data(), this->oneofs(i).length(), | 575 this->oneofs(i).data(), this->oneofs(i).length(), |
| 666 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 576 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 667 "google.protobuf.Type.oneofs"); | 577 "google.protobuf.Type.oneofs"); |
| 668 target = ::google::protobuf::internal::WireFormatLite:: | 578 target = ::google::protobuf::internal::WireFormatLite:: |
| 669 WriteStringToArray(3, this->oneofs(i), target); | 579 WriteStringToArray(3, this->oneofs(i), target); |
| 670 } | 580 } |
| 671 | 581 |
| 672 // repeated .google.protobuf.Option options = 4; | 582 // repeated .google.protobuf.Option options = 4; |
| 673 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 583 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 674 target = ::google::protobuf::internal::WireFormatLite:: | 584 target = ::google::protobuf::internal::WireFormatLite:: |
| 675 InternalWriteMessageNoVirtualToArray( | 585 WriteMessageNoVirtualToArray( |
| 676 4, this->options(i), false, target); | 586 4, this->options(i), target); |
| 677 } | 587 } |
| 678 | 588 |
| 679 // .google.protobuf.SourceContext source_context = 5; | 589 // optional .google.protobuf.SourceContext source_context = 5; |
| 680 if (this->has_source_context()) { | 590 if (this->has_source_context()) { |
| 681 target = ::google::protobuf::internal::WireFormatLite:: | 591 target = ::google::protobuf::internal::WireFormatLite:: |
| 682 InternalWriteMessageNoVirtualToArray( | 592 WriteMessageNoVirtualToArray( |
| 683 5, *this->source_context_, false, target); | 593 5, *this->source_context_, target); |
| 684 } | 594 } |
| 685 | 595 |
| 686 // .google.protobuf.Syntax syntax = 6; | 596 // optional .google.protobuf.Syntax syntax = 6; |
| 687 if (this->syntax() != 0) { | 597 if (this->syntax() != 0) { |
| 688 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( | 598 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 689 6, this->syntax(), target); | 599 6, this->syntax(), target); |
| 690 } | 600 } |
| 691 | 601 |
| 692 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type) | 602 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Type) |
| 693 return target; | 603 return target; |
| 694 } | 604 } |
| 695 | 605 |
| 696 size_t Type::ByteSizeLong() const { | 606 int Type::ByteSize() const { |
| 697 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type) | 607 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Type) |
| 698 size_t total_size = 0; | 608 int total_size = 0; |
| 609 |
| 610 // optional string name = 1; |
| 611 if (this->name().size() > 0) { |
| 612 total_size += 1 + |
| 613 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 614 this->name()); |
| 615 } |
| 616 |
| 617 // optional .google.protobuf.SourceContext source_context = 5; |
| 618 if (this->has_source_context()) { |
| 619 total_size += 1 + |
| 620 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 621 *this->source_context_); |
| 622 } |
| 623 |
| 624 // optional .google.protobuf.Syntax syntax = 6; |
| 625 if (this->syntax() != 0) { |
| 626 total_size += 1 + |
| 627 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); |
| 628 } |
| 699 | 629 |
| 700 // repeated .google.protobuf.Field fields = 2; | 630 // repeated .google.protobuf.Field fields = 2; |
| 701 { | 631 total_size += 1 * this->fields_size(); |
| 702 unsigned int count = this->fields_size(); | 632 for (int i = 0; i < this->fields_size(); i++) { |
| 703 total_size += 1UL * count; | 633 total_size += |
| 704 for (unsigned int i = 0; i < count; i++) { | 634 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 705 total_size += | 635 this->fields(i)); |
| 706 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 707 this->fields(i)); | |
| 708 } | |
| 709 } | 636 } |
| 710 | 637 |
| 711 // repeated string oneofs = 3; | 638 // repeated string oneofs = 3; |
| 712 total_size += 1 * | 639 total_size += 1 * this->oneofs_size(); |
| 713 ::google::protobuf::internal::FromIntSize(this->oneofs_size()); | |
| 714 for (int i = 0; i < this->oneofs_size(); i++) { | 640 for (int i = 0; i < this->oneofs_size(); i++) { |
| 715 total_size += ::google::protobuf::internal::WireFormatLite::StringSize( | 641 total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 716 this->oneofs(i)); | 642 this->oneofs(i)); |
| 717 } | 643 } |
| 718 | 644 |
| 719 // repeated .google.protobuf.Option options = 4; | 645 // repeated .google.protobuf.Option options = 4; |
| 720 { | 646 total_size += 1 * this->options_size(); |
| 721 unsigned int count = this->options_size(); | 647 for (int i = 0; i < this->options_size(); i++) { |
| 722 total_size += 1UL * count; | 648 total_size += |
| 723 for (unsigned int i = 0; i < count; i++) { | 649 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 724 total_size += | 650 this->options(i)); |
| 725 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 726 this->options(i)); | |
| 727 } | |
| 728 } | 651 } |
| 729 | 652 |
| 730 // string name = 1; | |
| 731 if (this->name().size() > 0) { | |
| 732 total_size += 1 + | |
| 733 ::google::protobuf::internal::WireFormatLite::StringSize( | |
| 734 this->name()); | |
| 735 } | |
| 736 | |
| 737 // .google.protobuf.SourceContext source_context = 5; | |
| 738 if (this->has_source_context()) { | |
| 739 total_size += 1 + | |
| 740 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 741 *this->source_context_); | |
| 742 } | |
| 743 | |
| 744 // .google.protobuf.Syntax syntax = 6; | |
| 745 if (this->syntax() != 0) { | |
| 746 total_size += 1 + | |
| 747 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); | |
| 748 } | |
| 749 | |
| 750 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); | |
| 751 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 653 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 752 _cached_size_ = cached_size; | 654 _cached_size_ = total_size; |
| 753 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 655 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 754 return total_size; | 656 return total_size; |
| 755 } | 657 } |
| 756 | 658 |
| 757 void Type::MergeFrom(const ::google::protobuf::Message& from) { | 659 void Type::MergeFrom(const ::google::protobuf::Message& from) { |
| 758 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type) | 660 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Type) |
| 759 GOOGLE_DCHECK_NE(&from, this); | 661 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 760 const Type* source = | 662 const Type* source = |
| 761 ::google::protobuf::internal::DynamicCastToGenerated<const Type>( | 663 ::google::protobuf::internal::DynamicCastToGenerated<const Type>( |
| 762 &from); | 664 &from); |
| 763 if (source == NULL) { | 665 if (source == NULL) { |
| 764 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.T
ype) | 666 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.T
ype) |
| 765 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 667 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 766 } else { | 668 } else { |
| 767 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Type) | 669 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Type) |
| 768 MergeFrom(*source); | 670 MergeFrom(*source); |
| 769 } | 671 } |
| 770 } | 672 } |
| 771 | 673 |
| 772 void Type::MergeFrom(const Type& from) { | 674 void Type::MergeFrom(const Type& from) { |
| 773 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type
) | 675 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Type
) |
| 774 GOOGLE_DCHECK_NE(&from, this); | 676 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 775 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 776 fields_.MergeFrom(from.fields_); | 677 fields_.MergeFrom(from.fields_); |
| 777 oneofs_.MergeFrom(from.oneofs_); | 678 oneofs_.MergeFrom(from.oneofs_); |
| 778 options_.MergeFrom(from.options_); | 679 options_.MergeFrom(from.options_); |
| 779 if (from.name().size() > 0) { | 680 if (from.name().size() > 0) { |
| 780 set_name(from.name()); | 681 |
| 682 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), from.name_); |
| 781 } | 683 } |
| 782 if (from.has_source_context()) { | 684 if (from.has_source_context()) { |
| 783 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.
source_context()); | 685 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.
source_context()); |
| 784 } | 686 } |
| 785 if (from.syntax() != 0) { | 687 if (from.syntax() != 0) { |
| 786 set_syntax(from.syntax()); | 688 set_syntax(from.syntax()); |
| 787 } | 689 } |
| 788 } | 690 } |
| 789 | 691 |
| 790 void Type::CopyFrom(const ::google::protobuf::Message& from) { | 692 void Type::CopyFrom(const ::google::protobuf::Message& from) { |
| 791 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Type) | 693 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Type) |
| 792 if (&from == this) return; | 694 if (&from == this) return; |
| 793 Clear(); | 695 Clear(); |
| 794 MergeFrom(from); | 696 MergeFrom(from); |
| 795 } | 697 } |
| 796 | 698 |
| 797 void Type::CopyFrom(const Type& from) { | 699 void Type::CopyFrom(const Type& from) { |
| 798 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type) | 700 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Type) |
| 799 if (&from == this) return; | 701 if (&from == this) return; |
| 800 Clear(); | 702 Clear(); |
| 801 MergeFrom(from); | 703 MergeFrom(from); |
| 802 } | 704 } |
| 803 | 705 |
| 804 bool Type::IsInitialized() const { | 706 bool Type::IsInitialized() const { |
| 707 |
| 805 return true; | 708 return true; |
| 806 } | 709 } |
| 807 | 710 |
| 808 void Type::Swap(Type* other) { | 711 void Type::Swap(Type* other) { |
| 809 if (other == this) return; | 712 if (other == this) return; |
| 810 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | |
| 811 InternalSwap(other); | |
| 812 } else { | |
| 813 Type* temp = New(GetArenaNoVirtual()); | |
| 814 temp->MergeFrom(*other); | |
| 815 other->CopyFrom(*this); | |
| 816 InternalSwap(temp); | |
| 817 if (GetArenaNoVirtual() == NULL) { | |
| 818 delete temp; | |
| 819 } | |
| 820 } | |
| 821 } | |
| 822 void Type::UnsafeArenaSwap(Type* other) { | |
| 823 if (other == this) return; | |
| 824 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | |
| 825 InternalSwap(other); | 713 InternalSwap(other); |
| 826 } | 714 } |
| 827 void Type::InternalSwap(Type* other) { | 715 void Type::InternalSwap(Type* other) { |
| 716 name_.Swap(&other->name_); |
| 828 fields_.UnsafeArenaSwap(&other->fields_); | 717 fields_.UnsafeArenaSwap(&other->fields_); |
| 829 oneofs_.UnsafeArenaSwap(&other->oneofs_); | 718 oneofs_.UnsafeArenaSwap(&other->oneofs_); |
| 830 options_.UnsafeArenaSwap(&other->options_); | 719 options_.UnsafeArenaSwap(&other->options_); |
| 831 name_.Swap(&other->name_); | |
| 832 std::swap(source_context_, other->source_context_); | 720 std::swap(source_context_, other->source_context_); |
| 833 std::swap(syntax_, other->syntax_); | 721 std::swap(syntax_, other->syntax_); |
| 722 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 834 std::swap(_cached_size_, other->_cached_size_); | 723 std::swap(_cached_size_, other->_cached_size_); |
| 835 } | 724 } |
| 836 | 725 |
| 837 ::google::protobuf::Metadata Type::GetMetadata() const { | 726 ::google::protobuf::Metadata Type::GetMetadata() const { |
| 838 protobuf_AssignDescriptorsOnce(); | 727 protobuf_AssignDescriptorsOnce(); |
| 839 return file_level_metadata[0]; | 728 ::google::protobuf::Metadata metadata; |
| 729 metadata.descriptor = Type_descriptor_; |
| 730 metadata.reflection = Type_reflection_; |
| 731 return metadata; |
| 840 } | 732 } |
| 841 | 733 |
| 842 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 734 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 843 // Type | 735 // Type |
| 844 | 736 |
| 845 // string name = 1; | 737 // optional string name = 1; |
| 846 void Type::clear_name() { | 738 void Type::clear_name() { |
| 847 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 739 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 848 } | 740 } |
| 849 const ::std::string& Type::name() const { | 741 const ::std::string& Type::name() const { |
| 850 // @@protoc_insertion_point(field_get:google.protobuf.Type.name) | 742 // @@protoc_insertion_point(field_get:google.protobuf.Type.name) |
| 851 return name_.Get(); | 743 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited()); |
| 852 } | 744 } |
| 853 void Type::set_name(const ::std::string& value) { | 745 void Type::set_name(const ::std::string& value) { |
| 854 | 746 |
| 855 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
GetArenaNoVirtual()); | 747 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); |
| 856 // @@protoc_insertion_point(field_set:google.protobuf.Type.name) | 748 // @@protoc_insertion_point(field_set:google.protobuf.Type.name) |
| 857 } | 749 } |
| 858 void Type::set_name(const char* value) { | 750 void Type::set_name(const char* value) { |
| 859 | 751 |
| 860 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string(value), | 752 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); |
| 861 GetArenaNoVirtual()); | |
| 862 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name) | 753 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.name) |
| 863 } | 754 } |
| 864 void Type::set_name(const char* value, | 755 void Type::set_name(const char* value, size_t size) { |
| 865 size_t size) { | |
| 866 | 756 |
| 867 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string( | 757 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 868 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 758 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 869 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name) | 759 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.name) |
| 870 } | 760 } |
| 871 ::std::string* Type::mutable_name() { | 761 ::std::string* Type::mutable_name() { |
| 872 | 762 |
| 873 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name) | 763 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.name) |
| 874 return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 764 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 875 } | 765 } |
| 876 ::std::string* Type::release_name() { | 766 ::std::string* Type::release_name() { |
| 877 // @@protoc_insertion_point(field_release:google.protobuf.Type.name) | 767 // @@protoc_insertion_point(field_release:google.protobuf.Type.name) |
| 878 | 768 |
| 879 return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 769 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 880 } | 770 } |
| 881 ::std::string* Type::unsafe_arena_release_name() { | 771 void Type::set_allocated_name(::std::string* name) { |
| 882 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Type.na
me) | |
| 883 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 884 | |
| 885 return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringA
lreadyInited(), | |
| 886 GetArenaNoVirtual()); | |
| 887 } | |
| 888 void Type::set_allocated_name(::std::string* name) { | |
| 889 if (name != NULL) { | 772 if (name != NULL) { |
| 890 | 773 |
| 891 } else { | 774 } else { |
| 892 | 775 |
| 893 } | 776 } |
| 894 name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), name, | 777 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), name); |
| 895 GetArenaNoVirtual()); | |
| 896 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name) | 778 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.name) |
| 897 } | 779 } |
| 898 void Type::unsafe_arena_set_allocated_name( | |
| 899 ::std::string* name) { | |
| 900 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 901 if (name != NULL) { | |
| 902 | |
| 903 } else { | |
| 904 | |
| 905 } | |
| 906 name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), | |
| 907 name, GetArenaNoVirtual()); | |
| 908 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.T
ype.name) | |
| 909 } | |
| 910 | 780 |
| 911 // repeated .google.protobuf.Field fields = 2; | 781 // repeated .google.protobuf.Field fields = 2; |
| 912 int Type::fields_size() const { | 782 int Type::fields_size() const { |
| 913 return fields_.size(); | 783 return fields_.size(); |
| 914 } | 784 } |
| 915 void Type::clear_fields() { | 785 void Type::clear_fields() { |
| 916 fields_.Clear(); | 786 fields_.Clear(); |
| 917 } | 787 } |
| 918 const ::google::protobuf::Field& Type::fields(int index) const { | 788 const ::google::protobuf::Field& Type::fields(int index) const { |
| 919 // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) | 789 // @@protoc_insertion_point(field_get:google.protobuf.Type.fields) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 938 return fields_; | 808 return fields_; |
| 939 } | 809 } |
| 940 | 810 |
| 941 // repeated string oneofs = 3; | 811 // repeated string oneofs = 3; |
| 942 int Type::oneofs_size() const { | 812 int Type::oneofs_size() const { |
| 943 return oneofs_.size(); | 813 return oneofs_.size(); |
| 944 } | 814 } |
| 945 void Type::clear_oneofs() { | 815 void Type::clear_oneofs() { |
| 946 oneofs_.Clear(); | 816 oneofs_.Clear(); |
| 947 } | 817 } |
| 948 const ::std::string& Type::oneofs(int index) const { | 818 const ::std::string& Type::oneofs(int index) const { |
| 949 // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) | 819 // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) |
| 950 return oneofs_.Get(index); | 820 return oneofs_.Get(index); |
| 951 } | 821 } |
| 952 ::std::string* Type::mutable_oneofs(int index) { | 822 ::std::string* Type::mutable_oneofs(int index) { |
| 953 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) | 823 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) |
| 954 return oneofs_.Mutable(index); | 824 return oneofs_.Mutable(index); |
| 955 } | 825 } |
| 956 void Type::set_oneofs(int index, const ::std::string& value) { | 826 void Type::set_oneofs(int index, const ::std::string& value) { |
| 957 // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) | 827 // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) |
| 958 oneofs_.Mutable(index)->assign(value); | 828 oneofs_.Mutable(index)->assign(value); |
| 959 } | 829 } |
| 960 void Type::set_oneofs(int index, const char* value) { | 830 void Type::set_oneofs(int index, const char* value) { |
| 961 oneofs_.Mutable(index)->assign(value); | 831 oneofs_.Mutable(index)->assign(value); |
| 962 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs) | 832 // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs) |
| 963 } | 833 } |
| 964 void Type::set_oneofs(int index, const char* value, size_t size) { | 834 void Type::set_oneofs(int index, const char* value, size_t size) { |
| 965 oneofs_.Mutable(index)->assign( | 835 oneofs_.Mutable(index)->assign( |
| 966 reinterpret_cast<const char*>(value), size); | 836 reinterpret_cast<const char*>(value), size); |
| 967 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs) | 837 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs) |
| 968 } | 838 } |
| 969 ::std::string* Type::add_oneofs() { | 839 ::std::string* Type::add_oneofs() { |
| 970 // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) | 840 // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) |
| 971 return oneofs_.Add(); | 841 return oneofs_.Add(); |
| 972 } | 842 } |
| 973 void Type::add_oneofs(const ::std::string& value) { | 843 void Type::add_oneofs(const ::std::string& value) { |
| 974 oneofs_.Add()->assign(value); | 844 oneofs_.Add()->assign(value); |
| 975 // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) | 845 // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) |
| 976 } | 846 } |
| 977 void Type::add_oneofs(const char* value) { | 847 void Type::add_oneofs(const char* value) { |
| 978 oneofs_.Add()->assign(value); | 848 oneofs_.Add()->assign(value); |
| 979 // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs) | 849 // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs) |
| 980 } | 850 } |
| 981 void Type::add_oneofs(const char* value, size_t size) { | 851 void Type::add_oneofs(const char* value, size_t size) { |
| 982 oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size); | 852 oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 983 // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs) | 853 // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs) |
| 984 } | 854 } |
| 985 const ::google::protobuf::RepeatedPtrField< ::std::string>& | 855 const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 986 Type::oneofs() const { | 856 Type::oneofs() const { |
| 987 // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs) | 857 // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs) |
| 988 return oneofs_; | 858 return oneofs_; |
| 989 } | 859 } |
| 990 ::google::protobuf::RepeatedPtrField< ::std::string>* | 860 ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 991 Type::mutable_oneofs() { | 861 Type::mutable_oneofs() { |
| 992 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs) | 862 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs) |
| 993 return &oneofs_; | 863 return &oneofs_; |
| 994 } | 864 } |
| 995 | 865 |
| 996 // repeated .google.protobuf.Option options = 4; | 866 // repeated .google.protobuf.Option options = 4; |
| 997 int Type::options_size() const { | 867 int Type::options_size() const { |
| 998 return options_.size(); | 868 return options_.size(); |
| 999 } | 869 } |
| 1000 void Type::clear_options() { | 870 void Type::clear_options() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1016 Type::mutable_options() { | 886 Type::mutable_options() { |
| 1017 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) | 887 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.options) |
| 1018 return &options_; | 888 return &options_; |
| 1019 } | 889 } |
| 1020 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& | 890 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& |
| 1021 Type::options() const { | 891 Type::options() const { |
| 1022 // @@protoc_insertion_point(field_list:google.protobuf.Type.options) | 892 // @@protoc_insertion_point(field_list:google.protobuf.Type.options) |
| 1023 return options_; | 893 return options_; |
| 1024 } | 894 } |
| 1025 | 895 |
| 1026 // .google.protobuf.SourceContext source_context = 5; | 896 // optional .google.protobuf.SourceContext source_context = 5; |
| 1027 bool Type::has_source_context() const { | 897 bool Type::has_source_context() const { |
| 1028 return this != internal_default_instance() && source_context_ != NULL; | 898 return !_is_default_instance_ && source_context_ != NULL; |
| 1029 } | 899 } |
| 1030 void Type::clear_source_context() { | 900 void Type::clear_source_context() { |
| 1031 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; | 901 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; |
| 1032 source_context_ = NULL; | 902 source_context_ = NULL; |
| 1033 } | 903 } |
| 1034 const ::google::protobuf::SourceContext& Type::source_context() const { | 904 const ::google::protobuf::SourceContext& Type::source_context() const { |
| 1035 // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) | 905 // @@protoc_insertion_point(field_get:google.protobuf.Type.source_context) |
| 1036 return source_context_ != NULL ? *source_context_ | 906 return source_context_ != NULL ? *source_context_ : *default_instance_->source
_context_; |
| 1037 : *::google::protobuf::SourceContext::internal_default_
instance(); | |
| 1038 } | 907 } |
| 1039 ::google::protobuf::SourceContext* Type::mutable_source_context() { | 908 ::google::protobuf::SourceContext* Type::mutable_source_context() { |
| 1040 | 909 |
| 1041 if (source_context_ == NULL) { | 910 if (source_context_ == NULL) { |
| 1042 _slow_mutable_source_context(); | 911 source_context_ = new ::google::protobuf::SourceContext; |
| 1043 } | 912 } |
| 1044 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) | 913 // @@protoc_insertion_point(field_mutable:google.protobuf.Type.source_context) |
| 1045 return source_context_; | 914 return source_context_; |
| 1046 } | 915 } |
| 1047 ::google::protobuf::SourceContext* Type::release_source_context() { | 916 ::google::protobuf::SourceContext* Type::release_source_context() { |
| 1048 // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) | 917 // @@protoc_insertion_point(field_release:google.protobuf.Type.source_context) |
| 1049 | 918 |
| 1050 if (GetArenaNoVirtual() != NULL) { | 919 ::google::protobuf::SourceContext* temp = source_context_; |
| 1051 return _slow_release_source_context(); | 920 source_context_ = NULL; |
| 1052 } else { | 921 return temp; |
| 1053 ::google::protobuf::SourceContext* temp = source_context_; | |
| 1054 source_context_ = NULL; | |
| 1055 return temp; | |
| 1056 } | |
| 1057 } | 922 } |
| 1058 void Type::set_allocated_source_context(::google::protobuf::SourceContext* sour
ce_context) { | 923 void Type::set_allocated_source_context(::google::protobuf::SourceContext* sourc
e_context) { |
| 1059 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); | 924 delete source_context_; |
| 1060 if (message_arena == NULL) { | |
| 1061 delete source_context_; | |
| 1062 } | |
| 1063 if (source_context != NULL) { | |
| 1064 if (message_arena != NULL) { | |
| 1065 message_arena->Own(source_context); | |
| 1066 } | |
| 1067 } | |
| 1068 source_context_ = source_context; | 925 source_context_ = source_context; |
| 1069 if (source_context) { | 926 if (source_context) { |
| 1070 | 927 |
| 1071 } else { | 928 } else { |
| 1072 | 929 |
| 1073 } | 930 } |
| 1074 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_co
ntext) | 931 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.source_co
ntext) |
| 1075 } | 932 } |
| 1076 | 933 |
| 1077 // .google.protobuf.Syntax syntax = 6; | 934 // optional .google.protobuf.Syntax syntax = 6; |
| 1078 void Type::clear_syntax() { | 935 void Type::clear_syntax() { |
| 1079 syntax_ = 0; | 936 syntax_ = 0; |
| 1080 } | 937 } |
| 1081 ::google::protobuf::Syntax Type::syntax() const { | 938 ::google::protobuf::Syntax Type::syntax() const { |
| 1082 // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax) | 939 // @@protoc_insertion_point(field_get:google.protobuf.Type.syntax) |
| 1083 return static_cast< ::google::protobuf::Syntax >(syntax_); | 940 return static_cast< ::google::protobuf::Syntax >(syntax_); |
| 1084 } | 941 } |
| 1085 void Type::set_syntax(::google::protobuf::Syntax value) { | 942 void Type::set_syntax(::google::protobuf::Syntax value) { |
| 1086 | 943 |
| 1087 syntax_ = value; | 944 syntax_ = value; |
| 1088 // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax) | 945 // @@protoc_insertion_point(field_set:google.protobuf.Type.syntax) |
| 1089 } | 946 } |
| 1090 | 947 |
| 1091 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 948 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1092 | 949 |
| 1093 // =================================================================== | 950 // =================================================================== |
| 1094 | 951 |
| 952 const ::google::protobuf::EnumDescriptor* Field_Kind_descriptor() { |
| 953 protobuf_AssignDescriptorsOnce(); |
| 954 return Field_Kind_descriptor_; |
| 955 } |
| 956 bool Field_Kind_IsValid(int value) { |
| 957 switch(value) { |
| 958 case 0: |
| 959 case 1: |
| 960 case 2: |
| 961 case 3: |
| 962 case 4: |
| 963 case 5: |
| 964 case 6: |
| 965 case 7: |
| 966 case 8: |
| 967 case 9: |
| 968 case 10: |
| 969 case 11: |
| 970 case 12: |
| 971 case 13: |
| 972 case 14: |
| 973 case 15: |
| 974 case 16: |
| 975 case 17: |
| 976 case 18: |
| 977 return true; |
| 978 default: |
| 979 return false; |
| 980 } |
| 981 } |
| 982 |
| 983 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 984 const Field_Kind Field::TYPE_UNKNOWN; |
| 985 const Field_Kind Field::TYPE_DOUBLE; |
| 986 const Field_Kind Field::TYPE_FLOAT; |
| 987 const Field_Kind Field::TYPE_INT64; |
| 988 const Field_Kind Field::TYPE_UINT64; |
| 989 const Field_Kind Field::TYPE_INT32; |
| 990 const Field_Kind Field::TYPE_FIXED64; |
| 991 const Field_Kind Field::TYPE_FIXED32; |
| 992 const Field_Kind Field::TYPE_BOOL; |
| 993 const Field_Kind Field::TYPE_STRING; |
| 994 const Field_Kind Field::TYPE_GROUP; |
| 995 const Field_Kind Field::TYPE_MESSAGE; |
| 996 const Field_Kind Field::TYPE_BYTES; |
| 997 const Field_Kind Field::TYPE_UINT32; |
| 998 const Field_Kind Field::TYPE_ENUM; |
| 999 const Field_Kind Field::TYPE_SFIXED32; |
| 1000 const Field_Kind Field::TYPE_SFIXED64; |
| 1001 const Field_Kind Field::TYPE_SINT32; |
| 1002 const Field_Kind Field::TYPE_SINT64; |
| 1003 const Field_Kind Field::Kind_MIN; |
| 1004 const Field_Kind Field::Kind_MAX; |
| 1005 const int Field::Kind_ARRAYSIZE; |
| 1006 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1007 const ::google::protobuf::EnumDescriptor* Field_Cardinality_descriptor() { |
| 1008 protobuf_AssignDescriptorsOnce(); |
| 1009 return Field_Cardinality_descriptor_; |
| 1010 } |
| 1011 bool Field_Cardinality_IsValid(int value) { |
| 1012 switch(value) { |
| 1013 case 0: |
| 1014 case 1: |
| 1015 case 2: |
| 1016 case 3: |
| 1017 return true; |
| 1018 default: |
| 1019 return false; |
| 1020 } |
| 1021 } |
| 1022 |
| 1023 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1024 const Field_Cardinality Field::CARDINALITY_UNKNOWN; |
| 1025 const Field_Cardinality Field::CARDINALITY_OPTIONAL; |
| 1026 const Field_Cardinality Field::CARDINALITY_REQUIRED; |
| 1027 const Field_Cardinality Field::CARDINALITY_REPEATED; |
| 1028 const Field_Cardinality Field::Cardinality_MIN; |
| 1029 const Field_Cardinality Field::Cardinality_MAX; |
| 1030 const int Field::Cardinality_ARRAYSIZE; |
| 1031 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1095 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 1032 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1096 const int Field::kKindFieldNumber; | 1033 const int Field::kKindFieldNumber; |
| 1097 const int Field::kCardinalityFieldNumber; | 1034 const int Field::kCardinalityFieldNumber; |
| 1098 const int Field::kNumberFieldNumber; | 1035 const int Field::kNumberFieldNumber; |
| 1099 const int Field::kNameFieldNumber; | 1036 const int Field::kNameFieldNumber; |
| 1100 const int Field::kTypeUrlFieldNumber; | 1037 const int Field::kTypeUrlFieldNumber; |
| 1101 const int Field::kOneofIndexFieldNumber; | 1038 const int Field::kOneofIndexFieldNumber; |
| 1102 const int Field::kPackedFieldNumber; | 1039 const int Field::kPackedFieldNumber; |
| 1103 const int Field::kOptionsFieldNumber; | 1040 const int Field::kOptionsFieldNumber; |
| 1104 const int Field::kJsonNameFieldNumber; | 1041 const int Field::kJsonNameFieldNumber; |
| 1105 const int Field::kDefaultValueFieldNumber; | 1042 const int Field::kDefaultValueFieldNumber; |
| 1106 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 1043 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1107 | 1044 |
| 1108 Field::Field() | 1045 Field::Field() |
| 1109 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 1046 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 1110 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { | |
| 1111 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 1112 } | |
| 1113 SharedCtor(); | 1047 SharedCtor(); |
| 1114 // @@protoc_insertion_point(constructor:google.protobuf.Field) | 1048 // @@protoc_insertion_point(constructor:google.protobuf.Field) |
| 1115 } | 1049 } |
| 1116 Field::Field(::google::protobuf::Arena* arena) | 1050 |
| 1117 : ::google::protobuf::Message(), | 1051 void Field::InitAsDefaultInstance() { |
| 1118 _internal_metadata_(arena), | 1052 _is_default_instance_ = true; |
| 1119 options_(arena) { | |
| 1120 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 1121 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 1122 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 1123 SharedCtor(); | |
| 1124 RegisterArenaDtor(arena); | |
| 1125 // @@protoc_insertion_point(arena_constructor:google.protobuf.Field) | |
| 1126 } | 1053 } |
| 1054 |
| 1127 Field::Field(const Field& from) | 1055 Field::Field(const Field& from) |
| 1128 : ::google::protobuf::Message(), | 1056 : ::google::protobuf::Message(), |
| 1129 _internal_metadata_(NULL), | 1057 _internal_metadata_(NULL) { |
| 1130 options_(from.options_), | 1058 SharedCtor(); |
| 1131 _cached_size_(0) { | 1059 MergeFrom(from); |
| 1132 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 1133 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | |
| 1134 if (from.name().size() > 0) { | |
| 1135 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from
.name(), | |
| 1136 GetArenaNoVirtual()); | |
| 1137 } | |
| 1138 type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); | |
| 1139 if (from.type_url().size() > 0) { | |
| 1140 type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
from.type_url(), | |
| 1141 GetArenaNoVirtual()); | |
| 1142 } | |
| 1143 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); | |
| 1144 if (from.json_name().size() > 0) { | |
| 1145 json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
from.json_name(), | |
| 1146 GetArenaNoVirtual()); | |
| 1147 } | |
| 1148 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringA
lreadyInited()); | |
| 1149 if (from.default_value().size() > 0) { | |
| 1150 default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), from.default_value(), | |
| 1151 GetArenaNoVirtual()); | |
| 1152 } | |
| 1153 ::memcpy(&kind_, &from.kind_, | |
| 1154 reinterpret_cast<char*>(&packed_) - | |
| 1155 reinterpret_cast<char*>(&kind_) + sizeof(packed_)); | |
| 1156 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field) | 1060 // @@protoc_insertion_point(copy_constructor:google.protobuf.Field) |
| 1157 } | 1061 } |
| 1158 | 1062 |
| 1159 void Field::SharedCtor() { | 1063 void Field::SharedCtor() { |
| 1064 _is_default_instance_ = false; |
| 1065 ::google::protobuf::internal::GetEmptyString(); |
| 1066 _cached_size_ = 0; |
| 1067 kind_ = 0; |
| 1068 cardinality_ = 0; |
| 1069 number_ = 0; |
| 1160 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | 1070 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); |
| 1161 type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); | 1071 type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlread
yInited()); |
| 1072 oneof_index_ = 0; |
| 1073 packed_ = false; |
| 1162 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); | 1074 json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 1163 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringA
lreadyInited()); | 1075 default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringA
lreadyInited()); |
| 1164 ::memset(&kind_, 0, reinterpret_cast<char*>(&packed_) - | |
| 1165 reinterpret_cast<char*>(&kind_) + sizeof(packed_)); | |
| 1166 _cached_size_ = 0; | |
| 1167 } | 1076 } |
| 1168 | 1077 |
| 1169 Field::~Field() { | 1078 Field::~Field() { |
| 1170 // @@protoc_insertion_point(destructor:google.protobuf.Field) | 1079 // @@protoc_insertion_point(destructor:google.protobuf.Field) |
| 1171 SharedDtor(); | 1080 SharedDtor(); |
| 1172 } | 1081 } |
| 1173 | 1082 |
| 1174 void Field::SharedDtor() { | 1083 void Field::SharedDtor() { |
| 1175 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); | 1084 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d()); |
| 1176 if (arena != NULL) { | 1085 type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyI
nited()); |
| 1177 return; | 1086 json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 1087 default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); |
| 1088 if (this != default_instance_) { |
| 1178 } | 1089 } |
| 1179 | |
| 1180 name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ar
ena); | |
| 1181 type_url_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited()
, arena); | |
| 1182 json_name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), arena); | |
| 1183 default_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted(), arena); | |
| 1184 } | 1090 } |
| 1185 | 1091 |
| 1186 void Field::ArenaDtor(void* object) { | |
| 1187 Field* _this = reinterpret_cast< Field* >(object); | |
| 1188 (void)_this; | |
| 1189 } | |
| 1190 void Field::RegisterArenaDtor(::google::protobuf::Arena* arena) { | |
| 1191 } | |
| 1192 void Field::SetCachedSize(int size) const { | 1092 void Field::SetCachedSize(int size) const { |
| 1193 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 1093 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 1194 _cached_size_ = size; | 1094 _cached_size_ = size; |
| 1195 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 1095 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 1196 } | 1096 } |
| 1197 const ::google::protobuf::Descriptor* Field::descriptor() { | 1097 const ::google::protobuf::Descriptor* Field::descriptor() { |
| 1198 protobuf_AssignDescriptorsOnce(); | 1098 protobuf_AssignDescriptorsOnce(); |
| 1199 return file_level_metadata[1].descriptor; | 1099 return Field_descriptor_; |
| 1200 } | 1100 } |
| 1201 | 1101 |
| 1202 const Field& Field::default_instance() { | 1102 const Field& Field::default_instance() { |
| 1203 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | 1103 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2epro
to(); |
| 1204 return *internal_default_instance(); | 1104 return *default_instance_; |
| 1205 } | 1105 } |
| 1206 | 1106 |
| 1107 Field* Field::default_instance_ = NULL; |
| 1108 |
| 1207 Field* Field::New(::google::protobuf::Arena* arena) const { | 1109 Field* Field::New(::google::protobuf::Arena* arena) const { |
| 1208 return ::google::protobuf::Arena::CreateMessage<Field>(arena); | 1110 Field* n = new Field; |
| 1111 if (arena != NULL) { |
| 1112 arena->Own(n); |
| 1113 } |
| 1114 return n; |
| 1209 } | 1115 } |
| 1210 | 1116 |
| 1211 void Field::Clear() { | 1117 void Field::Clear() { |
| 1212 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field) | 1118 // @@protoc_insertion_point(message_clear_start:google.protobuf.Field) |
| 1119 #if defined(__clang__) |
| 1120 #define ZR_HELPER_(f) \ |
| 1121 _Pragma("clang diagnostic push") \ |
| 1122 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| 1123 __builtin_offsetof(Field, f) \ |
| 1124 _Pragma("clang diagnostic pop") |
| 1125 #else |
| 1126 #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 1127 &reinterpret_cast<Field*>(16)->f) |
| 1128 #endif |
| 1129 |
| 1130 #define ZR_(first, last) do {\ |
| 1131 ::memset(&first, 0,\ |
| 1132 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 1133 } while (0) |
| 1134 |
| 1135 ZR_(kind_, cardinality_); |
| 1136 ZR_(number_, oneof_index_); |
| 1137 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 1138 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); |
| 1139 packed_ = false; |
| 1140 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
| 1141 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStri
ngAlreadyInited()); |
| 1142 |
| 1143 #undef ZR_HELPER_ |
| 1144 #undef ZR_ |
| 1145 |
| 1213 options_.Clear(); | 1146 options_.Clear(); |
| 1214 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | |
| 1215 type_url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted(), GetArenaNoVirtual()); | |
| 1216 json_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited(), GetArenaNoVirtual()); | |
| 1217 default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited(), GetArenaNoVirtual()); | |
| 1218 ::memset(&kind_, 0, reinterpret_cast<char*>(&packed_) - | |
| 1219 reinterpret_cast<char*>(&kind_) + sizeof(packed_)); | |
| 1220 } | 1147 } |
| 1221 | 1148 |
| 1222 bool Field::MergePartialFromCodedStream( | 1149 bool Field::MergePartialFromCodedStream( |
| 1223 ::google::protobuf::io::CodedInputStream* input) { | 1150 ::google::protobuf::io::CodedInputStream* input) { |
| 1224 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 1151 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1225 ::google::protobuf::uint32 tag; | 1152 ::google::protobuf::uint32 tag; |
| 1226 // @@protoc_insertion_point(parse_start:google.protobuf.Field) | 1153 // @@protoc_insertion_point(parse_start:google.protobuf.Field) |
| 1227 for (;;) { | 1154 for (;;) { |
| 1228 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); | 1155 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 1229 tag = p.first; | 1156 tag = p.first; |
| 1230 if (!p.second) goto handle_unusual; | 1157 if (!p.second) goto handle_unusual; |
| 1231 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 1158 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 1232 // .google.protobuf.Field.Kind kind = 1; | 1159 // optional .google.protobuf.Field.Kind kind = 1; |
| 1233 case 1: { | 1160 case 1: { |
| 1234 if (tag == 8u) { | 1161 if (tag == 8) { |
| 1235 int value; | 1162 int value; |
| 1236 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 1163 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 1237 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( | 1164 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( |
| 1238 input, &value))); | 1165 input, &value))); |
| 1239 set_kind(static_cast< ::google::protobuf::Field_Kind >(value)); | 1166 set_kind(static_cast< ::google::protobuf::Field_Kind >(value)); |
| 1240 } else { | 1167 } else { |
| 1241 goto handle_unusual; | 1168 goto handle_unusual; |
| 1242 } | 1169 } |
| 1170 if (input->ExpectTag(16)) goto parse_cardinality; |
| 1243 break; | 1171 break; |
| 1244 } | 1172 } |
| 1245 | 1173 |
| 1246 // .google.protobuf.Field.Cardinality cardinality = 2; | 1174 // optional .google.protobuf.Field.Cardinality cardinality = 2; |
| 1247 case 2: { | 1175 case 2: { |
| 1248 if (tag == 16u) { | 1176 if (tag == 16) { |
| 1177 parse_cardinality: |
| 1249 int value; | 1178 int value; |
| 1250 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 1179 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 1251 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( | 1180 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( |
| 1252 input, &value))); | 1181 input, &value))); |
| 1253 set_cardinality(static_cast< ::google::protobuf::Field_Cardinality >(v
alue)); | 1182 set_cardinality(static_cast< ::google::protobuf::Field_Cardinality >(v
alue)); |
| 1254 } else { | 1183 } else { |
| 1255 goto handle_unusual; | 1184 goto handle_unusual; |
| 1256 } | 1185 } |
| 1186 if (input->ExpectTag(24)) goto parse_number; |
| 1257 break; | 1187 break; |
| 1258 } | 1188 } |
| 1259 | 1189 |
| 1260 // int32 number = 3; | 1190 // optional int32 number = 3; |
| 1261 case 3: { | 1191 case 3: { |
| 1262 if (tag == 24u) { | 1192 if (tag == 24) { |
| 1263 | 1193 parse_number: |
| 1264 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 1194 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 1265 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( | 1195 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( |
| 1266 input, &number_))); | 1196 input, &number_))); |
| 1197 |
| 1267 } else { | 1198 } else { |
| 1268 goto handle_unusual; | 1199 goto handle_unusual; |
| 1269 } | 1200 } |
| 1201 if (input->ExpectTag(34)) goto parse_name; |
| 1270 break; | 1202 break; |
| 1271 } | 1203 } |
| 1272 | 1204 |
| 1273 // string name = 4; | 1205 // optional string name = 4; |
| 1274 case 4: { | 1206 case 4: { |
| 1275 if (tag == 34u) { | 1207 if (tag == 34) { |
| 1208 parse_name: |
| 1276 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 1209 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1277 input, this->mutable_name())); | 1210 input, this->mutable_name())); |
| 1278 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1211 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1279 this->name().data(), this->name().length(), | 1212 this->name().data(), this->name().length(), |
| 1280 ::google::protobuf::internal::WireFormatLite::PARSE, | 1213 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1281 "google.protobuf.Field.name")); | 1214 "google.protobuf.Field.name")); |
| 1282 } else { | 1215 } else { |
| 1283 goto handle_unusual; | 1216 goto handle_unusual; |
| 1284 } | 1217 } |
| 1218 if (input->ExpectTag(50)) goto parse_type_url; |
| 1285 break; | 1219 break; |
| 1286 } | 1220 } |
| 1287 | 1221 |
| 1288 // string type_url = 6; | 1222 // optional string type_url = 6; |
| 1289 case 6: { | 1223 case 6: { |
| 1290 if (tag == 50u) { | 1224 if (tag == 50) { |
| 1225 parse_type_url: |
| 1291 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 1226 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1292 input, this->mutable_type_url())); | 1227 input, this->mutable_type_url())); |
| 1293 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1228 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1294 this->type_url().data(), this->type_url().length(), | 1229 this->type_url().data(), this->type_url().length(), |
| 1295 ::google::protobuf::internal::WireFormatLite::PARSE, | 1230 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1296 "google.protobuf.Field.type_url")); | 1231 "google.protobuf.Field.type_url")); |
| 1297 } else { | 1232 } else { |
| 1298 goto handle_unusual; | 1233 goto handle_unusual; |
| 1299 } | 1234 } |
| 1235 if (input->ExpectTag(56)) goto parse_oneof_index; |
| 1300 break; | 1236 break; |
| 1301 } | 1237 } |
| 1302 | 1238 |
| 1303 // int32 oneof_index = 7; | 1239 // optional int32 oneof_index = 7; |
| 1304 case 7: { | 1240 case 7: { |
| 1305 if (tag == 56u) { | 1241 if (tag == 56) { |
| 1306 | 1242 parse_oneof_index: |
| 1307 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 1243 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 1308 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( | 1244 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( |
| 1309 input, &oneof_index_))); | 1245 input, &oneof_index_))); |
| 1246 |
| 1310 } else { | 1247 } else { |
| 1311 goto handle_unusual; | 1248 goto handle_unusual; |
| 1312 } | 1249 } |
| 1250 if (input->ExpectTag(64)) goto parse_packed; |
| 1313 break; | 1251 break; |
| 1314 } | 1252 } |
| 1315 | 1253 |
| 1316 // bool packed = 8; | 1254 // optional bool packed = 8; |
| 1317 case 8: { | 1255 case 8: { |
| 1318 if (tag == 64u) { | 1256 if (tag == 64) { |
| 1319 | 1257 parse_packed: |
| 1320 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 1258 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 1321 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL
>( | 1259 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL
>( |
| 1322 input, &packed_))); | 1260 input, &packed_))); |
| 1261 |
| 1323 } else { | 1262 } else { |
| 1324 goto handle_unusual; | 1263 goto handle_unusual; |
| 1325 } | 1264 } |
| 1265 if (input->ExpectTag(74)) goto parse_options; |
| 1326 break; | 1266 break; |
| 1327 } | 1267 } |
| 1328 | 1268 |
| 1329 // repeated .google.protobuf.Option options = 9; | 1269 // repeated .google.protobuf.Option options = 9; |
| 1330 case 9: { | 1270 case 9: { |
| 1331 if (tag == 74u) { | 1271 if (tag == 74) { |
| 1272 parse_options: |
| 1332 DO_(input->IncrementRecursionDepth()); | 1273 DO_(input->IncrementRecursionDepth()); |
| 1274 parse_loop_options: |
| 1333 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 1275 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 1334 input, add_options())); | 1276 input, add_options())); |
| 1335 } else { | 1277 } else { |
| 1336 goto handle_unusual; | 1278 goto handle_unusual; |
| 1337 } | 1279 } |
| 1280 if (input->ExpectTag(74)) goto parse_loop_options; |
| 1338 input->UnsafeDecrementRecursionDepth(); | 1281 input->UnsafeDecrementRecursionDepth(); |
| 1282 if (input->ExpectTag(82)) goto parse_json_name; |
| 1339 break; | 1283 break; |
| 1340 } | 1284 } |
| 1341 | 1285 |
| 1342 // string json_name = 10; | 1286 // optional string json_name = 10; |
| 1343 case 10: { | 1287 case 10: { |
| 1344 if (tag == 82u) { | 1288 if (tag == 82) { |
| 1289 parse_json_name: |
| 1345 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 1290 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1346 input, this->mutable_json_name())); | 1291 input, this->mutable_json_name())); |
| 1347 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1292 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1348 this->json_name().data(), this->json_name().length(), | 1293 this->json_name().data(), this->json_name().length(), |
| 1349 ::google::protobuf::internal::WireFormatLite::PARSE, | 1294 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1350 "google.protobuf.Field.json_name")); | 1295 "google.protobuf.Field.json_name")); |
| 1351 } else { | 1296 } else { |
| 1352 goto handle_unusual; | 1297 goto handle_unusual; |
| 1353 } | 1298 } |
| 1299 if (input->ExpectTag(90)) goto parse_default_value; |
| 1354 break; | 1300 break; |
| 1355 } | 1301 } |
| 1356 | 1302 |
| 1357 // string default_value = 11; | 1303 // optional string default_value = 11; |
| 1358 case 11: { | 1304 case 11: { |
| 1359 if (tag == 90u) { | 1305 if (tag == 90) { |
| 1306 parse_default_value: |
| 1360 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 1307 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1361 input, this->mutable_default_value())); | 1308 input, this->mutable_default_value())); |
| 1362 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1309 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1363 this->default_value().data(), this->default_value().length(), | 1310 this->default_value().data(), this->default_value().length(), |
| 1364 ::google::protobuf::internal::WireFormatLite::PARSE, | 1311 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1365 "google.protobuf.Field.default_value")); | 1312 "google.protobuf.Field.default_value")); |
| 1366 } else { | 1313 } else { |
| 1367 goto handle_unusual; | 1314 goto handle_unusual; |
| 1368 } | 1315 } |
| 1316 if (input->ExpectAtEnd()) goto success; |
| 1369 break; | 1317 break; |
| 1370 } | 1318 } |
| 1371 | 1319 |
| 1372 default: { | 1320 default: { |
| 1373 handle_unusual: | 1321 handle_unusual: |
| 1374 if (tag == 0 || | 1322 if (tag == 0 || |
| 1375 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 1323 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 1376 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 1324 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 1377 goto success; | 1325 goto success; |
| 1378 } | 1326 } |
| 1379 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 1327 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 1380 break; | 1328 break; |
| 1381 } | 1329 } |
| 1382 } | 1330 } |
| 1383 } | 1331 } |
| 1384 success: | 1332 success: |
| 1385 // @@protoc_insertion_point(parse_success:google.protobuf.Field) | 1333 // @@protoc_insertion_point(parse_success:google.protobuf.Field) |
| 1386 return true; | 1334 return true; |
| 1387 failure: | 1335 failure: |
| 1388 // @@protoc_insertion_point(parse_failure:google.protobuf.Field) | 1336 // @@protoc_insertion_point(parse_failure:google.protobuf.Field) |
| 1389 return false; | 1337 return false; |
| 1390 #undef DO_ | 1338 #undef DO_ |
| 1391 } | 1339 } |
| 1392 | 1340 |
| 1393 void Field::SerializeWithCachedSizes( | 1341 void Field::SerializeWithCachedSizes( |
| 1394 ::google::protobuf::io::CodedOutputStream* output) const { | 1342 ::google::protobuf::io::CodedOutputStream* output) const { |
| 1395 // @@protoc_insertion_point(serialize_start:google.protobuf.Field) | 1343 // @@protoc_insertion_point(serialize_start:google.protobuf.Field) |
| 1396 // .google.protobuf.Field.Kind kind = 1; | 1344 // optional .google.protobuf.Field.Kind kind = 1; |
| 1397 if (this->kind() != 0) { | 1345 if (this->kind() != 0) { |
| 1398 ::google::protobuf::internal::WireFormatLite::WriteEnum( | 1346 ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 1399 1, this->kind(), output); | 1347 1, this->kind(), output); |
| 1400 } | 1348 } |
| 1401 | 1349 |
| 1402 // .google.protobuf.Field.Cardinality cardinality = 2; | 1350 // optional .google.protobuf.Field.Cardinality cardinality = 2; |
| 1403 if (this->cardinality() != 0) { | 1351 if (this->cardinality() != 0) { |
| 1404 ::google::protobuf::internal::WireFormatLite::WriteEnum( | 1352 ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 1405 2, this->cardinality(), output); | 1353 2, this->cardinality(), output); |
| 1406 } | 1354 } |
| 1407 | 1355 |
| 1408 // int32 number = 3; | 1356 // optional int32 number = 3; |
| 1409 if (this->number() != 0) { | 1357 if (this->number() != 0) { |
| 1410 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(),
output); | 1358 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(),
output); |
| 1411 } | 1359 } |
| 1412 | 1360 |
| 1413 // string name = 4; | 1361 // optional string name = 4; |
| 1414 if (this->name().size() > 0) { | 1362 if (this->name().size() > 0) { |
| 1415 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1363 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1416 this->name().data(), this->name().length(), | 1364 this->name().data(), this->name().length(), |
| 1417 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1365 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1418 "google.protobuf.Field.name"); | 1366 "google.protobuf.Field.name"); |
| 1419 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 1367 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1420 4, this->name(), output); | 1368 4, this->name(), output); |
| 1421 } | 1369 } |
| 1422 | 1370 |
| 1423 // string type_url = 6; | 1371 // optional string type_url = 6; |
| 1424 if (this->type_url().size() > 0) { | 1372 if (this->type_url().size() > 0) { |
| 1425 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1373 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1426 this->type_url().data(), this->type_url().length(), | 1374 this->type_url().data(), this->type_url().length(), |
| 1427 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1375 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1428 "google.protobuf.Field.type_url"); | 1376 "google.protobuf.Field.type_url"); |
| 1429 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 1377 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1430 6, this->type_url(), output); | 1378 6, this->type_url(), output); |
| 1431 } | 1379 } |
| 1432 | 1380 |
| 1433 // int32 oneof_index = 7; | 1381 // optional int32 oneof_index = 7; |
| 1434 if (this->oneof_index() != 0) { | 1382 if (this->oneof_index() != 0) { |
| 1435 ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->oneof_inde
x(), output); | 1383 ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->oneof_inde
x(), output); |
| 1436 } | 1384 } |
| 1437 | 1385 |
| 1438 // bool packed = 8; | 1386 // optional bool packed = 8; |
| 1439 if (this->packed() != 0) { | 1387 if (this->packed() != 0) { |
| 1440 ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->packed(), o
utput); | 1388 ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->packed(), o
utput); |
| 1441 } | 1389 } |
| 1442 | 1390 |
| 1443 // repeated .google.protobuf.Option options = 9; | 1391 // repeated .google.protobuf.Option options = 9; |
| 1444 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 1392 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 1445 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 1393 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 1446 9, this->options(i), output); | 1394 9, this->options(i), output); |
| 1447 } | 1395 } |
| 1448 | 1396 |
| 1449 // string json_name = 10; | 1397 // optional string json_name = 10; |
| 1450 if (this->json_name().size() > 0) { | 1398 if (this->json_name().size() > 0) { |
| 1451 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1399 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1452 this->json_name().data(), this->json_name().length(), | 1400 this->json_name().data(), this->json_name().length(), |
| 1453 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1401 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1454 "google.protobuf.Field.json_name"); | 1402 "google.protobuf.Field.json_name"); |
| 1455 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 1403 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1456 10, this->json_name(), output); | 1404 10, this->json_name(), output); |
| 1457 } | 1405 } |
| 1458 | 1406 |
| 1459 // string default_value = 11; | 1407 // optional string default_value = 11; |
| 1460 if (this->default_value().size() > 0) { | 1408 if (this->default_value().size() > 0) { |
| 1461 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1409 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1462 this->default_value().data(), this->default_value().length(), | 1410 this->default_value().data(), this->default_value().length(), |
| 1463 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1411 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1464 "google.protobuf.Field.default_value"); | 1412 "google.protobuf.Field.default_value"); |
| 1465 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 1413 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1466 11, this->default_value(), output); | 1414 11, this->default_value(), output); |
| 1467 } | 1415 } |
| 1468 | 1416 |
| 1469 // @@protoc_insertion_point(serialize_end:google.protobuf.Field) | 1417 // @@protoc_insertion_point(serialize_end:google.protobuf.Field) |
| 1470 } | 1418 } |
| 1471 | 1419 |
| 1472 ::google::protobuf::uint8* Field::InternalSerializeWithCachedSizesToArray( | 1420 ::google::protobuf::uint8* Field::SerializeWithCachedSizesToArray( |
| 1473 bool deterministic, ::google::protobuf::uint8* target) const { | 1421 ::google::protobuf::uint8* target) const { |
| 1474 (void)deterministic; // Unused | |
| 1475 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) | 1422 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Field) |
| 1476 // .google.protobuf.Field.Kind kind = 1; | 1423 // optional .google.protobuf.Field.Kind kind = 1; |
| 1477 if (this->kind() != 0) { | 1424 if (this->kind() != 0) { |
| 1478 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( | 1425 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 1479 1, this->kind(), target); | 1426 1, this->kind(), target); |
| 1480 } | 1427 } |
| 1481 | 1428 |
| 1482 // .google.protobuf.Field.Cardinality cardinality = 2; | 1429 // optional .google.protobuf.Field.Cardinality cardinality = 2; |
| 1483 if (this->cardinality() != 0) { | 1430 if (this->cardinality() != 0) { |
| 1484 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( | 1431 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 1485 2, this->cardinality(), target); | 1432 2, this->cardinality(), target); |
| 1486 } | 1433 } |
| 1487 | 1434 |
| 1488 // int32 number = 3; | 1435 // optional int32 number = 3; |
| 1489 if (this->number() != 0) { | 1436 if (this->number() != 0) { |
| 1490 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3,
this->number(), target); | 1437 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3,
this->number(), target); |
| 1491 } | 1438 } |
| 1492 | 1439 |
| 1493 // string name = 4; | 1440 // optional string name = 4; |
| 1494 if (this->name().size() > 0) { | 1441 if (this->name().size() > 0) { |
| 1495 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1442 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1496 this->name().data(), this->name().length(), | 1443 this->name().data(), this->name().length(), |
| 1497 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1444 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1498 "google.protobuf.Field.name"); | 1445 "google.protobuf.Field.name"); |
| 1499 target = | 1446 target = |
| 1500 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 1447 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1501 4, this->name(), target); | 1448 4, this->name(), target); |
| 1502 } | 1449 } |
| 1503 | 1450 |
| 1504 // string type_url = 6; | 1451 // optional string type_url = 6; |
| 1505 if (this->type_url().size() > 0) { | 1452 if (this->type_url().size() > 0) { |
| 1506 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1453 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1507 this->type_url().data(), this->type_url().length(), | 1454 this->type_url().data(), this->type_url().length(), |
| 1508 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1455 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1509 "google.protobuf.Field.type_url"); | 1456 "google.protobuf.Field.type_url"); |
| 1510 target = | 1457 target = |
| 1511 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 1458 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1512 6, this->type_url(), target); | 1459 6, this->type_url(), target); |
| 1513 } | 1460 } |
| 1514 | 1461 |
| 1515 // int32 oneof_index = 7; | 1462 // optional int32 oneof_index = 7; |
| 1516 if (this->oneof_index() != 0) { | 1463 if (this->oneof_index() != 0) { |
| 1517 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7,
this->oneof_index(), target); | 1464 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7,
this->oneof_index(), target); |
| 1518 } | 1465 } |
| 1519 | 1466 |
| 1520 // bool packed = 8; | 1467 // optional bool packed = 8; |
| 1521 if (this->packed() != 0) { | 1468 if (this->packed() != 0) { |
| 1522 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, t
his->packed(), target); | 1469 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, t
his->packed(), target); |
| 1523 } | 1470 } |
| 1524 | 1471 |
| 1525 // repeated .google.protobuf.Option options = 9; | 1472 // repeated .google.protobuf.Option options = 9; |
| 1526 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 1473 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 1527 target = ::google::protobuf::internal::WireFormatLite:: | 1474 target = ::google::protobuf::internal::WireFormatLite:: |
| 1528 InternalWriteMessageNoVirtualToArray( | 1475 WriteMessageNoVirtualToArray( |
| 1529 9, this->options(i), false, target); | 1476 9, this->options(i), target); |
| 1530 } | 1477 } |
| 1531 | 1478 |
| 1532 // string json_name = 10; | 1479 // optional string json_name = 10; |
| 1533 if (this->json_name().size() > 0) { | 1480 if (this->json_name().size() > 0) { |
| 1534 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1481 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1535 this->json_name().data(), this->json_name().length(), | 1482 this->json_name().data(), this->json_name().length(), |
| 1536 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1483 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1537 "google.protobuf.Field.json_name"); | 1484 "google.protobuf.Field.json_name"); |
| 1538 target = | 1485 target = |
| 1539 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 1486 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1540 10, this->json_name(), target); | 1487 10, this->json_name(), target); |
| 1541 } | 1488 } |
| 1542 | 1489 |
| 1543 // string default_value = 11; | 1490 // optional string default_value = 11; |
| 1544 if (this->default_value().size() > 0) { | 1491 if (this->default_value().size() > 0) { |
| 1545 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 1492 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1546 this->default_value().data(), this->default_value().length(), | 1493 this->default_value().data(), this->default_value().length(), |
| 1547 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 1494 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1548 "google.protobuf.Field.default_value"); | 1495 "google.protobuf.Field.default_value"); |
| 1549 target = | 1496 target = |
| 1550 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 1497 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1551 11, this->default_value(), target); | 1498 11, this->default_value(), target); |
| 1552 } | 1499 } |
| 1553 | 1500 |
| 1554 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field) | 1501 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Field) |
| 1555 return target; | 1502 return target; |
| 1556 } | 1503 } |
| 1557 | 1504 |
| 1558 size_t Field::ByteSizeLong() const { | 1505 int Field::ByteSize() const { |
| 1559 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field) | 1506 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Field) |
| 1560 size_t total_size = 0; | 1507 int total_size = 0; |
| 1561 | 1508 |
| 1562 // repeated .google.protobuf.Option options = 9; | 1509 // optional .google.protobuf.Field.Kind kind = 1; |
| 1563 { | 1510 if (this->kind() != 0) { |
| 1564 unsigned int count = this->options_size(); | 1511 total_size += 1 + |
| 1565 total_size += 1UL * count; | 1512 ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind()); |
| 1566 for (unsigned int i = 0; i < count; i++) { | |
| 1567 total_size += | |
| 1568 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 1569 this->options(i)); | |
| 1570 } | |
| 1571 } | 1513 } |
| 1572 | 1514 |
| 1573 // string name = 4; | 1515 // optional .google.protobuf.Field.Cardinality cardinality = 2; |
| 1516 if (this->cardinality() != 0) { |
| 1517 total_size += 1 + |
| 1518 ::google::protobuf::internal::WireFormatLite::EnumSize(this->cardinality()
); |
| 1519 } |
| 1520 |
| 1521 // optional int32 number = 3; |
| 1522 if (this->number() != 0) { |
| 1523 total_size += 1 + |
| 1524 ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 1525 this->number()); |
| 1526 } |
| 1527 |
| 1528 // optional string name = 4; |
| 1574 if (this->name().size() > 0) { | 1529 if (this->name().size() > 0) { |
| 1575 total_size += 1 + | 1530 total_size += 1 + |
| 1576 ::google::protobuf::internal::WireFormatLite::StringSize( | 1531 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1577 this->name()); | 1532 this->name()); |
| 1578 } | 1533 } |
| 1579 | 1534 |
| 1580 // string type_url = 6; | 1535 // optional string type_url = 6; |
| 1581 if (this->type_url().size() > 0) { | 1536 if (this->type_url().size() > 0) { |
| 1582 total_size += 1 + | 1537 total_size += 1 + |
| 1583 ::google::protobuf::internal::WireFormatLite::StringSize( | 1538 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1584 this->type_url()); | 1539 this->type_url()); |
| 1585 } | 1540 } |
| 1586 | 1541 |
| 1587 // string json_name = 10; | 1542 // optional int32 oneof_index = 7; |
| 1543 if (this->oneof_index() != 0) { |
| 1544 total_size += 1 + |
| 1545 ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 1546 this->oneof_index()); |
| 1547 } |
| 1548 |
| 1549 // optional bool packed = 8; |
| 1550 if (this->packed() != 0) { |
| 1551 total_size += 1 + 1; |
| 1552 } |
| 1553 |
| 1554 // optional string json_name = 10; |
| 1588 if (this->json_name().size() > 0) { | 1555 if (this->json_name().size() > 0) { |
| 1589 total_size += 1 + | 1556 total_size += 1 + |
| 1590 ::google::protobuf::internal::WireFormatLite::StringSize( | 1557 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1591 this->json_name()); | 1558 this->json_name()); |
| 1592 } | 1559 } |
| 1593 | 1560 |
| 1594 // string default_value = 11; | 1561 // optional string default_value = 11; |
| 1595 if (this->default_value().size() > 0) { | 1562 if (this->default_value().size() > 0) { |
| 1596 total_size += 1 + | 1563 total_size += 1 + |
| 1597 ::google::protobuf::internal::WireFormatLite::StringSize( | 1564 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1598 this->default_value()); | 1565 this->default_value()); |
| 1599 } | 1566 } |
| 1600 | 1567 |
| 1601 // .google.protobuf.Field.Kind kind = 1; | 1568 // repeated .google.protobuf.Option options = 9; |
| 1602 if (this->kind() != 0) { | 1569 total_size += 1 * this->options_size(); |
| 1603 total_size += 1 + | 1570 for (int i = 0; i < this->options_size(); i++) { |
| 1604 ::google::protobuf::internal::WireFormatLite::EnumSize(this->kind()); | 1571 total_size += |
| 1572 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 1573 this->options(i)); |
| 1605 } | 1574 } |
| 1606 | 1575 |
| 1607 // .google.protobuf.Field.Cardinality cardinality = 2; | |
| 1608 if (this->cardinality() != 0) { | |
| 1609 total_size += 1 + | |
| 1610 ::google::protobuf::internal::WireFormatLite::EnumSize(this->cardinality()
); | |
| 1611 } | |
| 1612 | |
| 1613 // int32 number = 3; | |
| 1614 if (this->number() != 0) { | |
| 1615 total_size += 1 + | |
| 1616 ::google::protobuf::internal::WireFormatLite::Int32Size( | |
| 1617 this->number()); | |
| 1618 } | |
| 1619 | |
| 1620 // int32 oneof_index = 7; | |
| 1621 if (this->oneof_index() != 0) { | |
| 1622 total_size += 1 + | |
| 1623 ::google::protobuf::internal::WireFormatLite::Int32Size( | |
| 1624 this->oneof_index()); | |
| 1625 } | |
| 1626 | |
| 1627 // bool packed = 8; | |
| 1628 if (this->packed() != 0) { | |
| 1629 total_size += 1 + 1; | |
| 1630 } | |
| 1631 | |
| 1632 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); | |
| 1633 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 1576 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 1634 _cached_size_ = cached_size; | 1577 _cached_size_ = total_size; |
| 1635 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 1578 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 1636 return total_size; | 1579 return total_size; |
| 1637 } | 1580 } |
| 1638 | 1581 |
| 1639 void Field::MergeFrom(const ::google::protobuf::Message& from) { | 1582 void Field::MergeFrom(const ::google::protobuf::Message& from) { |
| 1640 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field) | 1583 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Field) |
| 1641 GOOGLE_DCHECK_NE(&from, this); | 1584 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 1642 const Field* source = | 1585 const Field* source = |
| 1643 ::google::protobuf::internal::DynamicCastToGenerated<const Field>( | 1586 ::google::protobuf::internal::DynamicCastToGenerated<const Field>( |
| 1644 &from); | 1587 &from); |
| 1645 if (source == NULL) { | 1588 if (source == NULL) { |
| 1646 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.F
ield) | 1589 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.F
ield) |
| 1647 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 1590 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1648 } else { | 1591 } else { |
| 1649 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Field) | 1592 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Field) |
| 1650 MergeFrom(*source); | 1593 MergeFrom(*source); |
| 1651 } | 1594 } |
| 1652 } | 1595 } |
| 1653 | 1596 |
| 1654 void Field::MergeFrom(const Field& from) { | 1597 void Field::MergeFrom(const Field& from) { |
| 1655 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Fiel
d) | 1598 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Fiel
d) |
| 1656 GOOGLE_DCHECK_NE(&from, this); | 1599 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 1657 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 1658 options_.MergeFrom(from.options_); | 1600 options_.MergeFrom(from.options_); |
| 1659 if (from.name().size() > 0) { | |
| 1660 set_name(from.name()); | |
| 1661 } | |
| 1662 if (from.type_url().size() > 0) { | |
| 1663 set_type_url(from.type_url()); | |
| 1664 } | |
| 1665 if (from.json_name().size() > 0) { | |
| 1666 set_json_name(from.json_name()); | |
| 1667 } | |
| 1668 if (from.default_value().size() > 0) { | |
| 1669 set_default_value(from.default_value()); | |
| 1670 } | |
| 1671 if (from.kind() != 0) { | 1601 if (from.kind() != 0) { |
| 1672 set_kind(from.kind()); | 1602 set_kind(from.kind()); |
| 1673 } | 1603 } |
| 1674 if (from.cardinality() != 0) { | 1604 if (from.cardinality() != 0) { |
| 1675 set_cardinality(from.cardinality()); | 1605 set_cardinality(from.cardinality()); |
| 1676 } | 1606 } |
| 1677 if (from.number() != 0) { | 1607 if (from.number() != 0) { |
| 1678 set_number(from.number()); | 1608 set_number(from.number()); |
| 1679 } | 1609 } |
| 1610 if (from.name().size() > 0) { |
| 1611 |
| 1612 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), from.name_); |
| 1613 } |
| 1614 if (from.type_url().size() > 0) { |
| 1615 |
| 1616 type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), from.type_url_); |
| 1617 } |
| 1680 if (from.oneof_index() != 0) { | 1618 if (from.oneof_index() != 0) { |
| 1681 set_oneof_index(from.oneof_index()); | 1619 set_oneof_index(from.oneof_index()); |
| 1682 } | 1620 } |
| 1683 if (from.packed() != 0) { | 1621 if (from.packed() != 0) { |
| 1684 set_packed(from.packed()); | 1622 set_packed(from.packed()); |
| 1685 } | 1623 } |
| 1624 if (from.json_name().size() > 0) { |
| 1625 |
| 1626 json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), from.json_name_); |
| 1627 } |
| 1628 if (from.default_value().size() > 0) { |
| 1629 |
| 1630 default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStri
ngAlreadyInited(), from.default_value_); |
| 1631 } |
| 1686 } | 1632 } |
| 1687 | 1633 |
| 1688 void Field::CopyFrom(const ::google::protobuf::Message& from) { | 1634 void Field::CopyFrom(const ::google::protobuf::Message& from) { |
| 1689 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Field) | 1635 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Field) |
| 1690 if (&from == this) return; | 1636 if (&from == this) return; |
| 1691 Clear(); | 1637 Clear(); |
| 1692 MergeFrom(from); | 1638 MergeFrom(from); |
| 1693 } | 1639 } |
| 1694 | 1640 |
| 1695 void Field::CopyFrom(const Field& from) { | 1641 void Field::CopyFrom(const Field& from) { |
| 1696 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field
) | 1642 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Field
) |
| 1697 if (&from == this) return; | 1643 if (&from == this) return; |
| 1698 Clear(); | 1644 Clear(); |
| 1699 MergeFrom(from); | 1645 MergeFrom(from); |
| 1700 } | 1646 } |
| 1701 | 1647 |
| 1702 bool Field::IsInitialized() const { | 1648 bool Field::IsInitialized() const { |
| 1649 |
| 1703 return true; | 1650 return true; |
| 1704 } | 1651 } |
| 1705 | 1652 |
| 1706 void Field::Swap(Field* other) { | 1653 void Field::Swap(Field* other) { |
| 1707 if (other == this) return; | 1654 if (other == this) return; |
| 1708 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | |
| 1709 InternalSwap(other); | |
| 1710 } else { | |
| 1711 Field* temp = New(GetArenaNoVirtual()); | |
| 1712 temp->MergeFrom(*other); | |
| 1713 other->CopyFrom(*this); | |
| 1714 InternalSwap(temp); | |
| 1715 if (GetArenaNoVirtual() == NULL) { | |
| 1716 delete temp; | |
| 1717 } | |
| 1718 } | |
| 1719 } | |
| 1720 void Field::UnsafeArenaSwap(Field* other) { | |
| 1721 if (other == this) return; | |
| 1722 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | |
| 1723 InternalSwap(other); | 1655 InternalSwap(other); |
| 1724 } | 1656 } |
| 1725 void Field::InternalSwap(Field* other) { | 1657 void Field::InternalSwap(Field* other) { |
| 1726 options_.UnsafeArenaSwap(&other->options_); | |
| 1727 name_.Swap(&other->name_); | |
| 1728 type_url_.Swap(&other->type_url_); | |
| 1729 json_name_.Swap(&other->json_name_); | |
| 1730 default_value_.Swap(&other->default_value_); | |
| 1731 std::swap(kind_, other->kind_); | 1658 std::swap(kind_, other->kind_); |
| 1732 std::swap(cardinality_, other->cardinality_); | 1659 std::swap(cardinality_, other->cardinality_); |
| 1733 std::swap(number_, other->number_); | 1660 std::swap(number_, other->number_); |
| 1661 name_.Swap(&other->name_); |
| 1662 type_url_.Swap(&other->type_url_); |
| 1734 std::swap(oneof_index_, other->oneof_index_); | 1663 std::swap(oneof_index_, other->oneof_index_); |
| 1735 std::swap(packed_, other->packed_); | 1664 std::swap(packed_, other->packed_); |
| 1665 options_.UnsafeArenaSwap(&other->options_); |
| 1666 json_name_.Swap(&other->json_name_); |
| 1667 default_value_.Swap(&other->default_value_); |
| 1668 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1736 std::swap(_cached_size_, other->_cached_size_); | 1669 std::swap(_cached_size_, other->_cached_size_); |
| 1737 } | 1670 } |
| 1738 | 1671 |
| 1739 ::google::protobuf::Metadata Field::GetMetadata() const { | 1672 ::google::protobuf::Metadata Field::GetMetadata() const { |
| 1740 protobuf_AssignDescriptorsOnce(); | 1673 protobuf_AssignDescriptorsOnce(); |
| 1741 return file_level_metadata[1]; | 1674 ::google::protobuf::Metadata metadata; |
| 1675 metadata.descriptor = Field_descriptor_; |
| 1676 metadata.reflection = Field_reflection_; |
| 1677 return metadata; |
| 1742 } | 1678 } |
| 1743 | 1679 |
| 1744 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 1680 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1745 // Field | 1681 // Field |
| 1746 | 1682 |
| 1747 // .google.protobuf.Field.Kind kind = 1; | 1683 // optional .google.protobuf.Field.Kind kind = 1; |
| 1748 void Field::clear_kind() { | 1684 void Field::clear_kind() { |
| 1749 kind_ = 0; | 1685 kind_ = 0; |
| 1750 } | 1686 } |
| 1751 ::google::protobuf::Field_Kind Field::kind() const { | 1687 ::google::protobuf::Field_Kind Field::kind() const { |
| 1752 // @@protoc_insertion_point(field_get:google.protobuf.Field.kind) | 1688 // @@protoc_insertion_point(field_get:google.protobuf.Field.kind) |
| 1753 return static_cast< ::google::protobuf::Field_Kind >(kind_); | 1689 return static_cast< ::google::protobuf::Field_Kind >(kind_); |
| 1754 } | 1690 } |
| 1755 void Field::set_kind(::google::protobuf::Field_Kind value) { | 1691 void Field::set_kind(::google::protobuf::Field_Kind value) { |
| 1756 | 1692 |
| 1757 kind_ = value; | 1693 kind_ = value; |
| 1758 // @@protoc_insertion_point(field_set:google.protobuf.Field.kind) | 1694 // @@protoc_insertion_point(field_set:google.protobuf.Field.kind) |
| 1759 } | 1695 } |
| 1760 | 1696 |
| 1761 // .google.protobuf.Field.Cardinality cardinality = 2; | 1697 // optional .google.protobuf.Field.Cardinality cardinality = 2; |
| 1762 void Field::clear_cardinality() { | 1698 void Field::clear_cardinality() { |
| 1763 cardinality_ = 0; | 1699 cardinality_ = 0; |
| 1764 } | 1700 } |
| 1765 ::google::protobuf::Field_Cardinality Field::cardinality() const { | 1701 ::google::protobuf::Field_Cardinality Field::cardinality() const { |
| 1766 // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality) | 1702 // @@protoc_insertion_point(field_get:google.protobuf.Field.cardinality) |
| 1767 return static_cast< ::google::protobuf::Field_Cardinality >(cardinality_); | 1703 return static_cast< ::google::protobuf::Field_Cardinality >(cardinality_); |
| 1768 } | 1704 } |
| 1769 void Field::set_cardinality(::google::protobuf::Field_Cardinality value) { | 1705 void Field::set_cardinality(::google::protobuf::Field_Cardinality value) { |
| 1770 | 1706 |
| 1771 cardinality_ = value; | 1707 cardinality_ = value; |
| 1772 // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality) | 1708 // @@protoc_insertion_point(field_set:google.protobuf.Field.cardinality) |
| 1773 } | 1709 } |
| 1774 | 1710 |
| 1775 // int32 number = 3; | 1711 // optional int32 number = 3; |
| 1776 void Field::clear_number() { | 1712 void Field::clear_number() { |
| 1777 number_ = 0; | 1713 number_ = 0; |
| 1778 } | 1714 } |
| 1779 ::google::protobuf::int32 Field::number() const { | 1715 ::google::protobuf::int32 Field::number() const { |
| 1780 // @@protoc_insertion_point(field_get:google.protobuf.Field.number) | 1716 // @@protoc_insertion_point(field_get:google.protobuf.Field.number) |
| 1781 return number_; | 1717 return number_; |
| 1782 } | 1718 } |
| 1783 void Field::set_number(::google::protobuf::int32 value) { | 1719 void Field::set_number(::google::protobuf::int32 value) { |
| 1784 | 1720 |
| 1785 number_ = value; | 1721 number_ = value; |
| 1786 // @@protoc_insertion_point(field_set:google.protobuf.Field.number) | 1722 // @@protoc_insertion_point(field_set:google.protobuf.Field.number) |
| 1787 } | 1723 } |
| 1788 | 1724 |
| 1789 // string name = 4; | 1725 // optional string name = 4; |
| 1790 void Field::clear_name() { | 1726 void Field::clear_name() { |
| 1791 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 1727 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 1792 } | 1728 } |
| 1793 const ::std::string& Field::name() const { | 1729 const ::std::string& Field::name() const { |
| 1794 // @@protoc_insertion_point(field_get:google.protobuf.Field.name) | 1730 // @@protoc_insertion_point(field_get:google.protobuf.Field.name) |
| 1795 return name_.Get(); | 1731 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited()); |
| 1796 } | 1732 } |
| 1797 void Field::set_name(const ::std::string& value) { | 1733 void Field::set_name(const ::std::string& value) { |
| 1798 | 1734 |
| 1799 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
GetArenaNoVirtual()); | 1735 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); |
| 1800 // @@protoc_insertion_point(field_set:google.protobuf.Field.name) | 1736 // @@protoc_insertion_point(field_set:google.protobuf.Field.name) |
| 1801 } | 1737 } |
| 1802 void Field::set_name(const char* value) { | 1738 void Field::set_name(const char* value) { |
| 1803 | 1739 |
| 1804 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string(value), | 1740 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); |
| 1805 GetArenaNoVirtual()); | |
| 1806 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name) | 1741 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.name) |
| 1807 } | 1742 } |
| 1808 void Field::set_name(const char* value, | 1743 void Field::set_name(const char* value, size_t size) { |
| 1809 size_t size) { | |
| 1810 | 1744 |
| 1811 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string( | 1745 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1812 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 1746 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 1813 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name) | 1747 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.name) |
| 1814 } | 1748 } |
| 1815 ::std::string* Field::mutable_name() { | 1749 ::std::string* Field::mutable_name() { |
| 1816 | 1750 |
| 1817 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name) | 1751 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.name) |
| 1818 return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 1752 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 1819 } | 1753 } |
| 1820 ::std::string* Field::release_name() { | 1754 ::std::string* Field::release_name() { |
| 1821 // @@protoc_insertion_point(field_release:google.protobuf.Field.name) | 1755 // @@protoc_insertion_point(field_release:google.protobuf.Field.name) |
| 1822 | 1756 |
| 1823 return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 1757 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 1824 } | 1758 } |
| 1825 ::std::string* Field::unsafe_arena_release_name() { | 1759 void Field::set_allocated_name(::std::string* name) { |
| 1826 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.n
ame) | |
| 1827 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 1828 | |
| 1829 return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringA
lreadyInited(), | |
| 1830 GetArenaNoVirtual()); | |
| 1831 } | |
| 1832 void Field::set_allocated_name(::std::string* name) { | |
| 1833 if (name != NULL) { | 1760 if (name != NULL) { |
| 1834 | 1761 |
| 1835 } else { | 1762 } else { |
| 1836 | 1763 |
| 1837 } | 1764 } |
| 1838 name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), name, | 1765 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), name); |
| 1839 GetArenaNoVirtual()); | |
| 1840 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name) | 1766 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.name) |
| 1841 } | 1767 } |
| 1842 void Field::unsafe_arena_set_allocated_name( | 1768 |
| 1843 ::std::string* name) { | 1769 // optional string type_url = 6; |
| 1844 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | 1770 void Field::clear_type_url() { |
| 1845 if (name != NULL) { | 1771 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited()); |
| 1846 | |
| 1847 } else { | |
| 1848 | |
| 1849 } | |
| 1850 name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), | |
| 1851 name, GetArenaNoVirtual()); | |
| 1852 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.F
ield.name) | |
| 1853 } | 1772 } |
| 1854 | 1773 const ::std::string& Field::type_url() const { |
| 1855 // string type_url = 6; | 1774 // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url) |
| 1856 void Field::clear_type_url() { | 1775 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 1857 type_url_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted(), GetArenaNoVirtual()); | |
| 1858 } | 1776 } |
| 1859 const ::std::string& Field::type_url() const { | 1777 void Field::set_type_url(const ::std::string& value) { |
| 1860 // @@protoc_insertion_point(field_get:google.protobuf.Field.type_url) | |
| 1861 return type_url_.Get(); | |
| 1862 } | |
| 1863 void Field::set_type_url(const ::std::string& value) { | |
| 1864 | 1778 |
| 1865 type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), va
lue, GetArenaNoVirtual()); | 1779 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), value); |
| 1866 // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url) | 1780 // @@protoc_insertion_point(field_set:google.protobuf.Field.type_url) |
| 1867 } | 1781 } |
| 1868 void Field::set_type_url(const char* value) { | 1782 void Field::set_type_url(const char* value) { |
| 1869 | 1783 |
| 1870 type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::string(value), | 1784 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), ::std::string(value)); |
| 1871 GetArenaNoVirtual()); | |
| 1872 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url) | 1785 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.type_url) |
| 1873 } | 1786 } |
| 1874 void Field::set_type_url(const char* value, | 1787 void Field::set_type_url(const char* value, size_t size) { |
| 1875 size_t size) { | |
| 1876 | 1788 |
| 1877 type_url_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::string( | 1789 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), |
| 1878 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 1790 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 1879 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url) | 1791 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.type_url) |
| 1880 } | 1792 } |
| 1881 ::std::string* Field::mutable_type_url() { | 1793 ::std::string* Field::mutable_type_url() { |
| 1882 | 1794 |
| 1883 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url) | 1795 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.type_url) |
| 1884 return type_url_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyI
nited(), GetArenaNoVirtual()); | 1796 return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringA
lreadyInited()); |
| 1885 } | 1797 } |
| 1886 ::std::string* Field::release_type_url() { | 1798 ::std::string* Field::release_type_url() { |
| 1887 // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url) | 1799 // @@protoc_insertion_point(field_release:google.protobuf.Field.type_url) |
| 1888 | 1800 |
| 1889 return type_url_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyI
nited(), GetArenaNoVirtual()); | 1801 return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringA
lreadyInited()); |
| 1890 } | 1802 } |
| 1891 ::std::string* Field::unsafe_arena_release_type_url() { | 1803 void Field::set_allocated_type_url(::std::string* type_url) { |
| 1892 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.t
ype_url) | |
| 1893 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 1894 | |
| 1895 return type_url_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStr
ingAlreadyInited(), | |
| 1896 GetArenaNoVirtual()); | |
| 1897 } | |
| 1898 void Field::set_allocated_type_url(::std::string* type_url) { | |
| 1899 if (type_url != NULL) { | 1804 if (type_url != NULL) { |
| 1900 | 1805 |
| 1901 } else { | 1806 } else { |
| 1902 | 1807 |
| 1903 } | 1808 } |
| 1904 type_url_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted(), type_url, | 1809 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), type_url); |
| 1905 GetArenaNoVirtual()); | |
| 1906 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url
) | 1810 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.type_url
) |
| 1907 } | 1811 } |
| 1908 void Field::unsafe_arena_set_allocated_type_url( | |
| 1909 ::std::string* type_url) { | |
| 1910 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 1911 if (type_url != NULL) { | |
| 1912 | |
| 1913 } else { | |
| 1914 | |
| 1915 } | |
| 1916 type_url_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStrin
gAlreadyInited(), | |
| 1917 type_url, GetArenaNoVirtual()); | |
| 1918 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.F
ield.type_url) | |
| 1919 } | |
| 1920 | 1812 |
| 1921 // int32 oneof_index = 7; | 1813 // optional int32 oneof_index = 7; |
| 1922 void Field::clear_oneof_index() { | 1814 void Field::clear_oneof_index() { |
| 1923 oneof_index_ = 0; | 1815 oneof_index_ = 0; |
| 1924 } | 1816 } |
| 1925 ::google::protobuf::int32 Field::oneof_index() const { | 1817 ::google::protobuf::int32 Field::oneof_index() const { |
| 1926 // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index) | 1818 // @@protoc_insertion_point(field_get:google.protobuf.Field.oneof_index) |
| 1927 return oneof_index_; | 1819 return oneof_index_; |
| 1928 } | 1820 } |
| 1929 void Field::set_oneof_index(::google::protobuf::int32 value) { | 1821 void Field::set_oneof_index(::google::protobuf::int32 value) { |
| 1930 | 1822 |
| 1931 oneof_index_ = value; | 1823 oneof_index_ = value; |
| 1932 // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index) | 1824 // @@protoc_insertion_point(field_set:google.protobuf.Field.oneof_index) |
| 1933 } | 1825 } |
| 1934 | 1826 |
| 1935 // bool packed = 8; | 1827 // optional bool packed = 8; |
| 1936 void Field::clear_packed() { | 1828 void Field::clear_packed() { |
| 1937 packed_ = false; | 1829 packed_ = false; |
| 1938 } | 1830 } |
| 1939 bool Field::packed() const { | 1831 bool Field::packed() const { |
| 1940 // @@protoc_insertion_point(field_get:google.protobuf.Field.packed) | 1832 // @@protoc_insertion_point(field_get:google.protobuf.Field.packed) |
| 1941 return packed_; | 1833 return packed_; |
| 1942 } | 1834 } |
| 1943 void Field::set_packed(bool value) { | 1835 void Field::set_packed(bool value) { |
| 1944 | 1836 |
| 1945 packed_ = value; | 1837 packed_ = value; |
| 1946 // @@protoc_insertion_point(field_set:google.protobuf.Field.packed) | 1838 // @@protoc_insertion_point(field_set:google.protobuf.Field.packed) |
| 1947 } | 1839 } |
| 1948 | 1840 |
| 1949 // repeated .google.protobuf.Option options = 9; | 1841 // repeated .google.protobuf.Option options = 9; |
| 1950 int Field::options_size() const { | 1842 int Field::options_size() const { |
| 1951 return options_.size(); | 1843 return options_.size(); |
| 1952 } | 1844 } |
| 1953 void Field::clear_options() { | 1845 void Field::clear_options() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1969 Field::mutable_options() { | 1861 Field::mutable_options() { |
| 1970 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) | 1862 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Field.options) |
| 1971 return &options_; | 1863 return &options_; |
| 1972 } | 1864 } |
| 1973 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& | 1865 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& |
| 1974 Field::options() const { | 1866 Field::options() const { |
| 1975 // @@protoc_insertion_point(field_list:google.protobuf.Field.options) | 1867 // @@protoc_insertion_point(field_list:google.protobuf.Field.options) |
| 1976 return options_; | 1868 return options_; |
| 1977 } | 1869 } |
| 1978 | 1870 |
| 1979 // string json_name = 10; | 1871 // optional string json_name = 10; |
| 1980 void Field::clear_json_name() { | 1872 void Field::clear_json_name() { |
| 1981 json_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited(), GetArenaNoVirtual()); | 1873 json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
| 1982 } | 1874 } |
| 1983 const ::std::string& Field::json_name() const { | 1875 const ::std::string& Field::json_name() const { |
| 1984 // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name) | 1876 // @@protoc_insertion_point(field_get:google.protobuf.Field.json_name) |
| 1985 return json_name_.Get(); | 1877 return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlre
adyInited()); |
| 1986 } | 1878 } |
| 1987 void Field::set_json_name(const ::std::string& value) { | 1879 void Field::set_json_name(const ::std::string& value) { |
| 1988 | 1880 |
| 1989 json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), v
alue, GetArenaNoVirtual()); | 1881 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), value); |
| 1990 // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name) | 1882 // @@protoc_insertion_point(field_set:google.protobuf.Field.json_name) |
| 1991 } | 1883 } |
| 1992 void Field::set_json_name(const char* value) { | 1884 void Field::set_json_name(const char* value) { |
| 1993 | 1885 |
| 1994 json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), :
:std::string(value), | 1886 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), ::std::string(value)); |
| 1995 GetArenaNoVirtual()); | |
| 1996 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name) | 1887 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.json_name) |
| 1997 } | 1888 } |
| 1998 void Field::set_json_name(const char* value, | 1889 void Field::set_json_name(const char* value, size_t size) { |
| 1999 size_t size) { | |
| 2000 | 1890 |
| 2001 json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), :
:std::string( | 1891 json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), |
| 2002 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 1892 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2003 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name) | 1893 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.json_name) |
| 2004 } | 1894 } |
| 2005 ::std::string* Field::mutable_json_name() { | 1895 ::std::string* Field::mutable_json_name() { |
| 2006 | 1896 |
| 2007 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name) | 1897 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.json_name) |
| 2008 return json_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), GetArenaNoVirtual()); | 1898 return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
| 2009 } | 1899 } |
| 2010 ::std::string* Field::release_json_name() { | 1900 ::std::string* Field::release_json_name() { |
| 2011 // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name) | 1901 // @@protoc_insertion_point(field_release:google.protobuf.Field.json_name) |
| 2012 | 1902 |
| 2013 return json_name_.Release(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), GetArenaNoVirtual()); | 1903 return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
| 2014 } | 1904 } |
| 2015 ::std::string* Field::unsafe_arena_release_json_name() { | 1905 void Field::set_allocated_json_name(::std::string* json_name) { |
| 2016 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.j
son_name) | |
| 2017 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 2018 | |
| 2019 return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptySt
ringAlreadyInited(), | |
| 2020 GetArenaNoVirtual()); | |
| 2021 } | |
| 2022 void Field::set_allocated_json_name(::std::string* json_name) { | |
| 2023 if (json_name != NULL) { | 1906 if (json_name != NULL) { |
| 2024 | 1907 |
| 2025 } else { | 1908 } else { |
| 2026 | 1909 |
| 2027 } | 1910 } |
| 2028 json_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited(), json_name, | 1911 json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), json_name); |
| 2029 GetArenaNoVirtual()); | |
| 2030 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_nam
e) | 1912 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.json_nam
e) |
| 2031 } | 1913 } |
| 2032 void Field::unsafe_arena_set_allocated_json_name( | 1914 |
| 2033 ::std::string* json_name) { | 1915 // optional string default_value = 11; |
| 2034 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | 1916 void Field::clear_default_value() { |
| 2035 if (json_name != NULL) { | 1917 default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStri
ngAlreadyInited()); |
| 2036 | |
| 2037 } else { | |
| 2038 | |
| 2039 } | |
| 2040 json_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStri
ngAlreadyInited(), | |
| 2041 json_name, GetArenaNoVirtual()); | |
| 2042 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.F
ield.json_name) | |
| 2043 } | 1918 } |
| 2044 | 1919 const ::std::string& Field::default_value() const { |
| 2045 // string default_value = 11; | 1920 // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value) |
| 2046 void Field::clear_default_value() { | 1921 return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
| 2047 default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited(), GetArenaNoVirtual()); | |
| 2048 } | 1922 } |
| 2049 const ::std::string& Field::default_value() const { | 1923 void Field::set_default_value(const ::std::string& value) { |
| 2050 // @@protoc_insertion_point(field_get:google.protobuf.Field.default_value) | |
| 2051 return default_value_.Get(); | |
| 2052 } | |
| 2053 void Field::set_default_value(const ::std::string& value) { | |
| 2054 | 1924 |
| 2055 default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), value, GetArenaNoVirtual()); | 1925 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), value); |
| 2056 // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value) | 1926 // @@protoc_insertion_point(field_set:google.protobuf.Field.default_value) |
| 2057 } | 1927 } |
| 2058 void Field::set_default_value(const char* value) { | 1928 void Field::set_default_value(const char* value) { |
| 2059 | 1929 |
| 2060 default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), ::std::string(value), | 1930 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), ::std::string(value)); |
| 2061 GetArenaNoVirtual()); | |
| 2062 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value
) | 1931 // @@protoc_insertion_point(field_set_char:google.protobuf.Field.default_value
) |
| 2063 } | 1932 } |
| 2064 void Field::set_default_value(const char* value, | 1933 void Field::set_default_value(const char* value, size_t size) { |
| 2065 size_t size) { | |
| 2066 | 1934 |
| 2067 default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), ::std::string( | 1935 default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), |
| 2068 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 1936 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2069 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_va
lue) | 1937 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Field.default_va
lue) |
| 2070 } | 1938 } |
| 2071 ::std::string* Field::mutable_default_value() { | 1939 ::std::string* Field::mutable_default_value() { |
| 2072 | 1940 |
| 2073 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value) | 1941 // @@protoc_insertion_point(field_mutable:google.protobuf.Field.default_value) |
| 2074 return default_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), GetArenaNoVirtual()); | 1942 return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptySt
ringAlreadyInited()); |
| 2075 } | 1943 } |
| 2076 ::std::string* Field::release_default_value() { | 1944 ::std::string* Field::release_default_value() { |
| 2077 // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value) | 1945 // @@protoc_insertion_point(field_release:google.protobuf.Field.default_value) |
| 2078 | 1946 |
| 2079 return default_value_.Release(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), GetArenaNoVirtual()); | 1947 return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptySt
ringAlreadyInited()); |
| 2080 } | 1948 } |
| 2081 ::std::string* Field::unsafe_arena_release_default_value() { | 1949 void Field::set_allocated_default_value(::std::string* default_value) { |
| 2082 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Field.d
efault_value) | |
| 2083 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 2084 | |
| 2085 return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmp
tyStringAlreadyInited(), | |
| 2086 GetArenaNoVirtual()); | |
| 2087 } | |
| 2088 void Field::set_allocated_default_value(::std::string* default_value) { | |
| 2089 if (default_value != NULL) { | 1950 if (default_value != NULL) { |
| 2090 | 1951 |
| 2091 } else { | 1952 } else { |
| 2092 | 1953 |
| 2093 } | 1954 } |
| 2094 default_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited(), default_value, | 1955 default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStri
ngAlreadyInited(), default_value); |
| 2095 GetArenaNoVirtual()); | |
| 2096 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_
value) | 1956 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Field.default_
value) |
| 2097 } | 1957 } |
| 2098 void Field::unsafe_arena_set_allocated_default_value( | |
| 2099 ::std::string* default_value) { | |
| 2100 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 2101 if (default_value != NULL) { | |
| 2102 | |
| 2103 } else { | |
| 2104 | |
| 2105 } | |
| 2106 default_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmpty
StringAlreadyInited(), | |
| 2107 default_value, GetArenaNoVirtual()); | |
| 2108 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.F
ield.default_value) | |
| 2109 } | |
| 2110 | 1958 |
| 2111 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 1959 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 2112 | 1960 |
| 2113 // =================================================================== | 1961 // =================================================================== |
| 2114 | 1962 |
| 2115 void Enum::_slow_mutable_source_context() { | |
| 2116 source_context_ = ::google::protobuf::Arena::Create< ::google::protobuf::Sourc
eContext >( | |
| 2117 GetArenaNoVirtual()); | |
| 2118 } | |
| 2119 ::google::protobuf::SourceContext* Enum::_slow_release_source_context() { | |
| 2120 if (source_context_ == NULL) { | |
| 2121 return NULL; | |
| 2122 } else { | |
| 2123 ::google::protobuf::SourceContext* temp = new ::google::protobuf::SourceCont
ext(*source_context_); | |
| 2124 source_context_ = NULL; | |
| 2125 return temp; | |
| 2126 } | |
| 2127 } | |
| 2128 ::google::protobuf::SourceContext* Enum::unsafe_arena_release_source_context() { | |
| 2129 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.so
urce_context) | |
| 2130 | |
| 2131 ::google::protobuf::SourceContext* temp = source_context_; | |
| 2132 source_context_ = NULL; | |
| 2133 return temp; | |
| 2134 } | |
| 2135 void Enum::unsafe_arena_set_allocated_source_context( | |
| 2136 ::google::protobuf::SourceContext* source_context) { | |
| 2137 if (GetArenaNoVirtual() == NULL) { | |
| 2138 delete source_context_; | |
| 2139 } | |
| 2140 source_context_ = source_context; | |
| 2141 if (source_context) { | |
| 2142 | |
| 2143 } else { | |
| 2144 | |
| 2145 } | |
| 2146 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.E
num.source_context) | |
| 2147 } | |
| 2148 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 1963 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2149 const int Enum::kNameFieldNumber; | 1964 const int Enum::kNameFieldNumber; |
| 2150 const int Enum::kEnumvalueFieldNumber; | 1965 const int Enum::kEnumvalueFieldNumber; |
| 2151 const int Enum::kOptionsFieldNumber; | 1966 const int Enum::kOptionsFieldNumber; |
| 2152 const int Enum::kSourceContextFieldNumber; | 1967 const int Enum::kSourceContextFieldNumber; |
| 2153 const int Enum::kSyntaxFieldNumber; | 1968 const int Enum::kSyntaxFieldNumber; |
| 2154 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 1969 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2155 | 1970 |
| 2156 Enum::Enum() | 1971 Enum::Enum() |
| 2157 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 1972 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 2158 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { | |
| 2159 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 2160 } | |
| 2161 SharedCtor(); | 1973 SharedCtor(); |
| 2162 // @@protoc_insertion_point(constructor:google.protobuf.Enum) | 1974 // @@protoc_insertion_point(constructor:google.protobuf.Enum) |
| 2163 } | 1975 } |
| 2164 Enum::Enum(::google::protobuf::Arena* arena) | 1976 |
| 2165 : ::google::protobuf::Message(), | 1977 void Enum::InitAsDefaultInstance() { |
| 2166 _internal_metadata_(arena), | 1978 _is_default_instance_ = true; |
| 2167 enumvalue_(arena), | 1979 source_context_ = const_cast< ::google::protobuf::SourceContext*>(&::google::p
rotobuf::SourceContext::default_instance()); |
| 2168 options_(arena) { | |
| 2169 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 2170 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 2171 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 2172 SharedCtor(); | |
| 2173 RegisterArenaDtor(arena); | |
| 2174 // @@protoc_insertion_point(arena_constructor:google.protobuf.Enum) | |
| 2175 } | 1980 } |
| 1981 |
| 2176 Enum::Enum(const Enum& from) | 1982 Enum::Enum(const Enum& from) |
| 2177 : ::google::protobuf::Message(), | 1983 : ::google::protobuf::Message(), |
| 2178 _internal_metadata_(NULL), | 1984 _internal_metadata_(NULL) { |
| 2179 enumvalue_(from.enumvalue_), | 1985 SharedCtor(); |
| 2180 options_(from.options_), | 1986 MergeFrom(from); |
| 2181 _cached_size_(0) { | |
| 2182 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 2183 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | |
| 2184 if (from.name().size() > 0) { | |
| 2185 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from
.name(), | |
| 2186 GetArenaNoVirtual()); | |
| 2187 } | |
| 2188 if (from.has_source_context()) { | |
| 2189 source_context_ = new ::google::protobuf::SourceContext(*from.source_context
_); | |
| 2190 } else { | |
| 2191 source_context_ = NULL; | |
| 2192 } | |
| 2193 syntax_ = from.syntax_; | |
| 2194 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum) | 1987 // @@protoc_insertion_point(copy_constructor:google.protobuf.Enum) |
| 2195 } | 1988 } |
| 2196 | 1989 |
| 2197 void Enum::SharedCtor() { | 1990 void Enum::SharedCtor() { |
| 1991 _is_default_instance_ = false; |
| 1992 ::google::protobuf::internal::GetEmptyString(); |
| 1993 _cached_size_ = 0; |
| 2198 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | 1994 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); |
| 2199 ::memset(&source_context_, 0, reinterpret_cast<char*>(&syntax_) - | 1995 source_context_ = NULL; |
| 2200 reinterpret_cast<char*>(&source_context_) + sizeof(syntax_)); | 1996 syntax_ = 0; |
| 2201 _cached_size_ = 0; | |
| 2202 } | 1997 } |
| 2203 | 1998 |
| 2204 Enum::~Enum() { | 1999 Enum::~Enum() { |
| 2205 // @@protoc_insertion_point(destructor:google.protobuf.Enum) | 2000 // @@protoc_insertion_point(destructor:google.protobuf.Enum) |
| 2206 SharedDtor(); | 2001 SharedDtor(); |
| 2207 } | 2002 } |
| 2208 | 2003 |
| 2209 void Enum::SharedDtor() { | 2004 void Enum::SharedDtor() { |
| 2210 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); | 2005 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d()); |
| 2211 if (arena != NULL) { | 2006 if (this != default_instance_) { |
| 2212 return; | |
| 2213 } | |
| 2214 | |
| 2215 name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ar
ena); | |
| 2216 if (this != internal_default_instance()) { | |
| 2217 delete source_context_; | 2007 delete source_context_; |
| 2218 } | 2008 } |
| 2219 } | 2009 } |
| 2220 | 2010 |
| 2221 void Enum::ArenaDtor(void* object) { | |
| 2222 Enum* _this = reinterpret_cast< Enum* >(object); | |
| 2223 (void)_this; | |
| 2224 } | |
| 2225 void Enum::RegisterArenaDtor(::google::protobuf::Arena* arena) { | |
| 2226 } | |
| 2227 void Enum::SetCachedSize(int size) const { | 2011 void Enum::SetCachedSize(int size) const { |
| 2228 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 2012 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2229 _cached_size_ = size; | 2013 _cached_size_ = size; |
| 2230 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 2014 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2231 } | 2015 } |
| 2232 const ::google::protobuf::Descriptor* Enum::descriptor() { | 2016 const ::google::protobuf::Descriptor* Enum::descriptor() { |
| 2233 protobuf_AssignDescriptorsOnce(); | 2017 protobuf_AssignDescriptorsOnce(); |
| 2234 return file_level_metadata[2].descriptor; | 2018 return Enum_descriptor_; |
| 2235 } | 2019 } |
| 2236 | 2020 |
| 2237 const Enum& Enum::default_instance() { | 2021 const Enum& Enum::default_instance() { |
| 2238 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | 2022 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2epro
to(); |
| 2239 return *internal_default_instance(); | 2023 return *default_instance_; |
| 2240 } | 2024 } |
| 2241 | 2025 |
| 2026 Enum* Enum::default_instance_ = NULL; |
| 2027 |
| 2242 Enum* Enum::New(::google::protobuf::Arena* arena) const { | 2028 Enum* Enum::New(::google::protobuf::Arena* arena) const { |
| 2243 return ::google::protobuf::Arena::CreateMessage<Enum>(arena); | 2029 Enum* n = new Enum; |
| 2030 if (arena != NULL) { |
| 2031 arena->Own(n); |
| 2032 } |
| 2033 return n; |
| 2244 } | 2034 } |
| 2245 | 2035 |
| 2246 void Enum::Clear() { | 2036 void Enum::Clear() { |
| 2247 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum) | 2037 // @@protoc_insertion_point(message_clear_start:google.protobuf.Enum) |
| 2038 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 2039 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; |
| 2040 source_context_ = NULL; |
| 2041 syntax_ = 0; |
| 2248 enumvalue_.Clear(); | 2042 enumvalue_.Clear(); |
| 2249 options_.Clear(); | 2043 options_.Clear(); |
| 2250 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | |
| 2251 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) { | |
| 2252 delete source_context_; | |
| 2253 } | |
| 2254 source_context_ = NULL; | |
| 2255 syntax_ = 0; | |
| 2256 } | 2044 } |
| 2257 | 2045 |
| 2258 bool Enum::MergePartialFromCodedStream( | 2046 bool Enum::MergePartialFromCodedStream( |
| 2259 ::google::protobuf::io::CodedInputStream* input) { | 2047 ::google::protobuf::io::CodedInputStream* input) { |
| 2260 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 2048 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2261 ::google::protobuf::uint32 tag; | 2049 ::google::protobuf::uint32 tag; |
| 2262 // @@protoc_insertion_point(parse_start:google.protobuf.Enum) | 2050 // @@protoc_insertion_point(parse_start:google.protobuf.Enum) |
| 2263 for (;;) { | 2051 for (;;) { |
| 2264 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); | 2052 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 2265 tag = p.first; | 2053 tag = p.first; |
| 2266 if (!p.second) goto handle_unusual; | 2054 if (!p.second) goto handle_unusual; |
| 2267 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 2055 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 2268 // string name = 1; | 2056 // optional string name = 1; |
| 2269 case 1: { | 2057 case 1: { |
| 2270 if (tag == 10u) { | 2058 if (tag == 10) { |
| 2271 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 2059 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2272 input, this->mutable_name())); | 2060 input, this->mutable_name())); |
| 2273 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2061 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2274 this->name().data(), this->name().length(), | 2062 this->name().data(), this->name().length(), |
| 2275 ::google::protobuf::internal::WireFormatLite::PARSE, | 2063 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2276 "google.protobuf.Enum.name")); | 2064 "google.protobuf.Enum.name")); |
| 2277 } else { | 2065 } else { |
| 2278 goto handle_unusual; | 2066 goto handle_unusual; |
| 2279 } | 2067 } |
| 2068 if (input->ExpectTag(18)) goto parse_enumvalue; |
| 2280 break; | 2069 break; |
| 2281 } | 2070 } |
| 2282 | 2071 |
| 2283 // repeated .google.protobuf.EnumValue enumvalue = 2; | 2072 // repeated .google.protobuf.EnumValue enumvalue = 2; |
| 2284 case 2: { | 2073 case 2: { |
| 2285 if (tag == 18u) { | 2074 if (tag == 18) { |
| 2075 parse_enumvalue: |
| 2286 DO_(input->IncrementRecursionDepth()); | 2076 DO_(input->IncrementRecursionDepth()); |
| 2077 parse_loop_enumvalue: |
| 2287 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 2078 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 2288 input, add_enumvalue())); | 2079 input, add_enumvalue())); |
| 2289 } else { | 2080 } else { |
| 2290 goto handle_unusual; | 2081 goto handle_unusual; |
| 2291 } | 2082 } |
| 2083 if (input->ExpectTag(18)) goto parse_loop_enumvalue; |
| 2084 if (input->ExpectTag(26)) goto parse_loop_options; |
| 2292 input->UnsafeDecrementRecursionDepth(); | 2085 input->UnsafeDecrementRecursionDepth(); |
| 2293 break; | 2086 break; |
| 2294 } | 2087 } |
| 2295 | 2088 |
| 2296 // repeated .google.protobuf.Option options = 3; | 2089 // repeated .google.protobuf.Option options = 3; |
| 2297 case 3: { | 2090 case 3: { |
| 2298 if (tag == 26u) { | 2091 if (tag == 26) { |
| 2299 DO_(input->IncrementRecursionDepth()); | 2092 DO_(input->IncrementRecursionDepth()); |
| 2093 parse_loop_options: |
| 2300 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 2094 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 2301 input, add_options())); | 2095 input, add_options())); |
| 2302 } else { | 2096 } else { |
| 2303 goto handle_unusual; | 2097 goto handle_unusual; |
| 2304 } | 2098 } |
| 2099 if (input->ExpectTag(26)) goto parse_loop_options; |
| 2305 input->UnsafeDecrementRecursionDepth(); | 2100 input->UnsafeDecrementRecursionDepth(); |
| 2101 if (input->ExpectTag(34)) goto parse_source_context; |
| 2306 break; | 2102 break; |
| 2307 } | 2103 } |
| 2308 | 2104 |
| 2309 // .google.protobuf.SourceContext source_context = 4; | 2105 // optional .google.protobuf.SourceContext source_context = 4; |
| 2310 case 4: { | 2106 case 4: { |
| 2311 if (tag == 34u) { | 2107 if (tag == 34) { |
| 2108 parse_source_context: |
| 2312 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( | 2109 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( |
| 2313 input, mutable_source_context())); | 2110 input, mutable_source_context())); |
| 2314 } else { | 2111 } else { |
| 2315 goto handle_unusual; | 2112 goto handle_unusual; |
| 2316 } | 2113 } |
| 2114 if (input->ExpectTag(40)) goto parse_syntax; |
| 2317 break; | 2115 break; |
| 2318 } | 2116 } |
| 2319 | 2117 |
| 2320 // .google.protobuf.Syntax syntax = 5; | 2118 // optional .google.protobuf.Syntax syntax = 5; |
| 2321 case 5: { | 2119 case 5: { |
| 2322 if (tag == 40u) { | 2120 if (tag == 40) { |
| 2121 parse_syntax: |
| 2323 int value; | 2122 int value; |
| 2324 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 2123 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2325 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( | 2124 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>
( |
| 2326 input, &value))); | 2125 input, &value))); |
| 2327 set_syntax(static_cast< ::google::protobuf::Syntax >(value)); | 2126 set_syntax(static_cast< ::google::protobuf::Syntax >(value)); |
| 2328 } else { | 2127 } else { |
| 2329 goto handle_unusual; | 2128 goto handle_unusual; |
| 2330 } | 2129 } |
| 2130 if (input->ExpectAtEnd()) goto success; |
| 2331 break; | 2131 break; |
| 2332 } | 2132 } |
| 2333 | 2133 |
| 2334 default: { | 2134 default: { |
| 2335 handle_unusual: | 2135 handle_unusual: |
| 2336 if (tag == 0 || | 2136 if (tag == 0 || |
| 2337 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 2137 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 2338 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 2138 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 2339 goto success; | 2139 goto success; |
| 2340 } | 2140 } |
| 2341 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 2141 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 2342 break; | 2142 break; |
| 2343 } | 2143 } |
| 2344 } | 2144 } |
| 2345 } | 2145 } |
| 2346 success: | 2146 success: |
| 2347 // @@protoc_insertion_point(parse_success:google.protobuf.Enum) | 2147 // @@protoc_insertion_point(parse_success:google.protobuf.Enum) |
| 2348 return true; | 2148 return true; |
| 2349 failure: | 2149 failure: |
| 2350 // @@protoc_insertion_point(parse_failure:google.protobuf.Enum) | 2150 // @@protoc_insertion_point(parse_failure:google.protobuf.Enum) |
| 2351 return false; | 2151 return false; |
| 2352 #undef DO_ | 2152 #undef DO_ |
| 2353 } | 2153 } |
| 2354 | 2154 |
| 2355 void Enum::SerializeWithCachedSizes( | 2155 void Enum::SerializeWithCachedSizes( |
| 2356 ::google::protobuf::io::CodedOutputStream* output) const { | 2156 ::google::protobuf::io::CodedOutputStream* output) const { |
| 2357 // @@protoc_insertion_point(serialize_start:google.protobuf.Enum) | 2157 // @@protoc_insertion_point(serialize_start:google.protobuf.Enum) |
| 2358 // string name = 1; | 2158 // optional string name = 1; |
| 2359 if (this->name().size() > 0) { | 2159 if (this->name().size() > 0) { |
| 2360 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2160 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2361 this->name().data(), this->name().length(), | 2161 this->name().data(), this->name().length(), |
| 2362 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 2162 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2363 "google.protobuf.Enum.name"); | 2163 "google.protobuf.Enum.name"); |
| 2364 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 2164 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2365 1, this->name(), output); | 2165 1, this->name(), output); |
| 2366 } | 2166 } |
| 2367 | 2167 |
| 2368 // repeated .google.protobuf.EnumValue enumvalue = 2; | 2168 // repeated .google.protobuf.EnumValue enumvalue = 2; |
| 2369 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) { | 2169 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) { |
| 2370 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 2170 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2371 2, this->enumvalue(i), output); | 2171 2, this->enumvalue(i), output); |
| 2372 } | 2172 } |
| 2373 | 2173 |
| 2374 // repeated .google.protobuf.Option options = 3; | 2174 // repeated .google.protobuf.Option options = 3; |
| 2375 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 2175 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 2376 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 2176 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2377 3, this->options(i), output); | 2177 3, this->options(i), output); |
| 2378 } | 2178 } |
| 2379 | 2179 |
| 2380 // .google.protobuf.SourceContext source_context = 4; | 2180 // optional .google.protobuf.SourceContext source_context = 4; |
| 2381 if (this->has_source_context()) { | 2181 if (this->has_source_context()) { |
| 2382 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 2182 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2383 4, *this->source_context_, output); | 2183 4, *this->source_context_, output); |
| 2384 } | 2184 } |
| 2385 | 2185 |
| 2386 // .google.protobuf.Syntax syntax = 5; | 2186 // optional .google.protobuf.Syntax syntax = 5; |
| 2387 if (this->syntax() != 0) { | 2187 if (this->syntax() != 0) { |
| 2388 ::google::protobuf::internal::WireFormatLite::WriteEnum( | 2188 ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2389 5, this->syntax(), output); | 2189 5, this->syntax(), output); |
| 2390 } | 2190 } |
| 2391 | 2191 |
| 2392 // @@protoc_insertion_point(serialize_end:google.protobuf.Enum) | 2192 // @@protoc_insertion_point(serialize_end:google.protobuf.Enum) |
| 2393 } | 2193 } |
| 2394 | 2194 |
| 2395 ::google::protobuf::uint8* Enum::InternalSerializeWithCachedSizesToArray( | 2195 ::google::protobuf::uint8* Enum::SerializeWithCachedSizesToArray( |
| 2396 bool deterministic, ::google::protobuf::uint8* target) const { | 2196 ::google::protobuf::uint8* target) const { |
| 2397 (void)deterministic; // Unused | |
| 2398 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) | 2197 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Enum) |
| 2399 // string name = 1; | 2198 // optional string name = 1; |
| 2400 if (this->name().size() > 0) { | 2199 if (this->name().size() > 0) { |
| 2401 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2200 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2402 this->name().data(), this->name().length(), | 2201 this->name().data(), this->name().length(), |
| 2403 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 2202 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2404 "google.protobuf.Enum.name"); | 2203 "google.protobuf.Enum.name"); |
| 2405 target = | 2204 target = |
| 2406 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 2205 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 2407 1, this->name(), target); | 2206 1, this->name(), target); |
| 2408 } | 2207 } |
| 2409 | 2208 |
| 2410 // repeated .google.protobuf.EnumValue enumvalue = 2; | 2209 // repeated .google.protobuf.EnumValue enumvalue = 2; |
| 2411 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) { | 2210 for (unsigned int i = 0, n = this->enumvalue_size(); i < n; i++) { |
| 2412 target = ::google::protobuf::internal::WireFormatLite:: | 2211 target = ::google::protobuf::internal::WireFormatLite:: |
| 2413 InternalWriteMessageNoVirtualToArray( | 2212 WriteMessageNoVirtualToArray( |
| 2414 2, this->enumvalue(i), false, target); | 2213 2, this->enumvalue(i), target); |
| 2415 } | 2214 } |
| 2416 | 2215 |
| 2417 // repeated .google.protobuf.Option options = 3; | 2216 // repeated .google.protobuf.Option options = 3; |
| 2418 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 2217 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 2419 target = ::google::protobuf::internal::WireFormatLite:: | 2218 target = ::google::protobuf::internal::WireFormatLite:: |
| 2420 InternalWriteMessageNoVirtualToArray( | 2219 WriteMessageNoVirtualToArray( |
| 2421 3, this->options(i), false, target); | 2220 3, this->options(i), target); |
| 2422 } | 2221 } |
| 2423 | 2222 |
| 2424 // .google.protobuf.SourceContext source_context = 4; | 2223 // optional .google.protobuf.SourceContext source_context = 4; |
| 2425 if (this->has_source_context()) { | 2224 if (this->has_source_context()) { |
| 2426 target = ::google::protobuf::internal::WireFormatLite:: | 2225 target = ::google::protobuf::internal::WireFormatLite:: |
| 2427 InternalWriteMessageNoVirtualToArray( | 2226 WriteMessageNoVirtualToArray( |
| 2428 4, *this->source_context_, false, target); | 2227 4, *this->source_context_, target); |
| 2429 } | 2228 } |
| 2430 | 2229 |
| 2431 // .google.protobuf.Syntax syntax = 5; | 2230 // optional .google.protobuf.Syntax syntax = 5; |
| 2432 if (this->syntax() != 0) { | 2231 if (this->syntax() != 0) { |
| 2433 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( | 2232 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2434 5, this->syntax(), target); | 2233 5, this->syntax(), target); |
| 2435 } | 2234 } |
| 2436 | 2235 |
| 2437 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum) | 2236 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Enum) |
| 2438 return target; | 2237 return target; |
| 2439 } | 2238 } |
| 2440 | 2239 |
| 2441 size_t Enum::ByteSizeLong() const { | 2240 int Enum::ByteSize() const { |
| 2442 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum) | 2241 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Enum) |
| 2443 size_t total_size = 0; | 2242 int total_size = 0; |
| 2444 | 2243 |
| 2445 // repeated .google.protobuf.EnumValue enumvalue = 2; | 2244 // optional string name = 1; |
| 2446 { | |
| 2447 unsigned int count = this->enumvalue_size(); | |
| 2448 total_size += 1UL * count; | |
| 2449 for (unsigned int i = 0; i < count; i++) { | |
| 2450 total_size += | |
| 2451 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 2452 this->enumvalue(i)); | |
| 2453 } | |
| 2454 } | |
| 2455 | |
| 2456 // repeated .google.protobuf.Option options = 3; | |
| 2457 { | |
| 2458 unsigned int count = this->options_size(); | |
| 2459 total_size += 1UL * count; | |
| 2460 for (unsigned int i = 0; i < count; i++) { | |
| 2461 total_size += | |
| 2462 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 2463 this->options(i)); | |
| 2464 } | |
| 2465 } | |
| 2466 | |
| 2467 // string name = 1; | |
| 2468 if (this->name().size() > 0) { | 2245 if (this->name().size() > 0) { |
| 2469 total_size += 1 + | 2246 total_size += 1 + |
| 2470 ::google::protobuf::internal::WireFormatLite::StringSize( | 2247 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 2471 this->name()); | 2248 this->name()); |
| 2472 } | 2249 } |
| 2473 | 2250 |
| 2474 // .google.protobuf.SourceContext source_context = 4; | 2251 // optional .google.protobuf.SourceContext source_context = 4; |
| 2475 if (this->has_source_context()) { | 2252 if (this->has_source_context()) { |
| 2476 total_size += 1 + | 2253 total_size += 1 + |
| 2477 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | 2254 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 2478 *this->source_context_); | 2255 *this->source_context_); |
| 2479 } | 2256 } |
| 2480 | 2257 |
| 2481 // .google.protobuf.Syntax syntax = 5; | 2258 // optional .google.protobuf.Syntax syntax = 5; |
| 2482 if (this->syntax() != 0) { | 2259 if (this->syntax() != 0) { |
| 2483 total_size += 1 + | 2260 total_size += 1 + |
| 2484 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); | 2261 ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); |
| 2485 } | 2262 } |
| 2486 | 2263 |
| 2487 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); | 2264 // repeated .google.protobuf.EnumValue enumvalue = 2; |
| 2265 total_size += 1 * this->enumvalue_size(); |
| 2266 for (int i = 0; i < this->enumvalue_size(); i++) { |
| 2267 total_size += |
| 2268 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 2269 this->enumvalue(i)); |
| 2270 } |
| 2271 |
| 2272 // repeated .google.protobuf.Option options = 3; |
| 2273 total_size += 1 * this->options_size(); |
| 2274 for (int i = 0; i < this->options_size(); i++) { |
| 2275 total_size += |
| 2276 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 2277 this->options(i)); |
| 2278 } |
| 2279 |
| 2488 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 2280 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2489 _cached_size_ = cached_size; | 2281 _cached_size_ = total_size; |
| 2490 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 2282 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2491 return total_size; | 2283 return total_size; |
| 2492 } | 2284 } |
| 2493 | 2285 |
| 2494 void Enum::MergeFrom(const ::google::protobuf::Message& from) { | 2286 void Enum::MergeFrom(const ::google::protobuf::Message& from) { |
| 2495 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum) | 2287 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Enum) |
| 2496 GOOGLE_DCHECK_NE(&from, this); | 2288 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2497 const Enum* source = | 2289 const Enum* source = |
| 2498 ::google::protobuf::internal::DynamicCastToGenerated<const Enum>( | 2290 ::google::protobuf::internal::DynamicCastToGenerated<const Enum>( |
| 2499 &from); | 2291 &from); |
| 2500 if (source == NULL) { | 2292 if (source == NULL) { |
| 2501 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
num) | 2293 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
num) |
| 2502 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 2294 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 2503 } else { | 2295 } else { |
| 2504 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Enum) | 2296 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Enum) |
| 2505 MergeFrom(*source); | 2297 MergeFrom(*source); |
| 2506 } | 2298 } |
| 2507 } | 2299 } |
| 2508 | 2300 |
| 2509 void Enum::MergeFrom(const Enum& from) { | 2301 void Enum::MergeFrom(const Enum& from) { |
| 2510 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum
) | 2302 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum
) |
| 2511 GOOGLE_DCHECK_NE(&from, this); | 2303 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2512 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 2513 enumvalue_.MergeFrom(from.enumvalue_); | 2304 enumvalue_.MergeFrom(from.enumvalue_); |
| 2514 options_.MergeFrom(from.options_); | 2305 options_.MergeFrom(from.options_); |
| 2515 if (from.name().size() > 0) { | 2306 if (from.name().size() > 0) { |
| 2516 set_name(from.name()); | 2307 |
| 2308 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), from.name_); |
| 2517 } | 2309 } |
| 2518 if (from.has_source_context()) { | 2310 if (from.has_source_context()) { |
| 2519 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.
source_context()); | 2311 mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.
source_context()); |
| 2520 } | 2312 } |
| 2521 if (from.syntax() != 0) { | 2313 if (from.syntax() != 0) { |
| 2522 set_syntax(from.syntax()); | 2314 set_syntax(from.syntax()); |
| 2523 } | 2315 } |
| 2524 } | 2316 } |
| 2525 | 2317 |
| 2526 void Enum::CopyFrom(const ::google::protobuf::Message& from) { | 2318 void Enum::CopyFrom(const ::google::protobuf::Message& from) { |
| 2527 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Enum) | 2319 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Enum) |
| 2528 if (&from == this) return; | 2320 if (&from == this) return; |
| 2529 Clear(); | 2321 Clear(); |
| 2530 MergeFrom(from); | 2322 MergeFrom(from); |
| 2531 } | 2323 } |
| 2532 | 2324 |
| 2533 void Enum::CopyFrom(const Enum& from) { | 2325 void Enum::CopyFrom(const Enum& from) { |
| 2534 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum) | 2326 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Enum) |
| 2535 if (&from == this) return; | 2327 if (&from == this) return; |
| 2536 Clear(); | 2328 Clear(); |
| 2537 MergeFrom(from); | 2329 MergeFrom(from); |
| 2538 } | 2330 } |
| 2539 | 2331 |
| 2540 bool Enum::IsInitialized() const { | 2332 bool Enum::IsInitialized() const { |
| 2333 |
| 2541 return true; | 2334 return true; |
| 2542 } | 2335 } |
| 2543 | 2336 |
| 2544 void Enum::Swap(Enum* other) { | 2337 void Enum::Swap(Enum* other) { |
| 2545 if (other == this) return; | 2338 if (other == this) return; |
| 2546 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | |
| 2547 InternalSwap(other); | |
| 2548 } else { | |
| 2549 Enum* temp = New(GetArenaNoVirtual()); | |
| 2550 temp->MergeFrom(*other); | |
| 2551 other->CopyFrom(*this); | |
| 2552 InternalSwap(temp); | |
| 2553 if (GetArenaNoVirtual() == NULL) { | |
| 2554 delete temp; | |
| 2555 } | |
| 2556 } | |
| 2557 } | |
| 2558 void Enum::UnsafeArenaSwap(Enum* other) { | |
| 2559 if (other == this) return; | |
| 2560 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | |
| 2561 InternalSwap(other); | 2339 InternalSwap(other); |
| 2562 } | 2340 } |
| 2563 void Enum::InternalSwap(Enum* other) { | 2341 void Enum::InternalSwap(Enum* other) { |
| 2342 name_.Swap(&other->name_); |
| 2564 enumvalue_.UnsafeArenaSwap(&other->enumvalue_); | 2343 enumvalue_.UnsafeArenaSwap(&other->enumvalue_); |
| 2565 options_.UnsafeArenaSwap(&other->options_); | 2344 options_.UnsafeArenaSwap(&other->options_); |
| 2566 name_.Swap(&other->name_); | |
| 2567 std::swap(source_context_, other->source_context_); | 2345 std::swap(source_context_, other->source_context_); |
| 2568 std::swap(syntax_, other->syntax_); | 2346 std::swap(syntax_, other->syntax_); |
| 2347 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2569 std::swap(_cached_size_, other->_cached_size_); | 2348 std::swap(_cached_size_, other->_cached_size_); |
| 2570 } | 2349 } |
| 2571 | 2350 |
| 2572 ::google::protobuf::Metadata Enum::GetMetadata() const { | 2351 ::google::protobuf::Metadata Enum::GetMetadata() const { |
| 2573 protobuf_AssignDescriptorsOnce(); | 2352 protobuf_AssignDescriptorsOnce(); |
| 2574 return file_level_metadata[2]; | 2353 ::google::protobuf::Metadata metadata; |
| 2354 metadata.descriptor = Enum_descriptor_; |
| 2355 metadata.reflection = Enum_reflection_; |
| 2356 return metadata; |
| 2575 } | 2357 } |
| 2576 | 2358 |
| 2577 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 2359 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 2578 // Enum | 2360 // Enum |
| 2579 | 2361 |
| 2580 // string name = 1; | 2362 // optional string name = 1; |
| 2581 void Enum::clear_name() { | 2363 void Enum::clear_name() { |
| 2582 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 2364 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 2583 } | 2365 } |
| 2584 const ::std::string& Enum::name() const { | 2366 const ::std::string& Enum::name() const { |
| 2585 // @@protoc_insertion_point(field_get:google.protobuf.Enum.name) | 2367 // @@protoc_insertion_point(field_get:google.protobuf.Enum.name) |
| 2586 return name_.Get(); | 2368 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited()); |
| 2587 } | 2369 } |
| 2588 void Enum::set_name(const ::std::string& value) { | 2370 void Enum::set_name(const ::std::string& value) { |
| 2589 | 2371 |
| 2590 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
GetArenaNoVirtual()); | 2372 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); |
| 2591 // @@protoc_insertion_point(field_set:google.protobuf.Enum.name) | 2373 // @@protoc_insertion_point(field_set:google.protobuf.Enum.name) |
| 2592 } | 2374 } |
| 2593 void Enum::set_name(const char* value) { | 2375 void Enum::set_name(const char* value) { |
| 2594 | 2376 |
| 2595 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string(value), | 2377 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); |
| 2596 GetArenaNoVirtual()); | |
| 2597 // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name) | 2378 // @@protoc_insertion_point(field_set_char:google.protobuf.Enum.name) |
| 2598 } | 2379 } |
| 2599 void Enum::set_name(const char* value, | 2380 void Enum::set_name(const char* value, size_t size) { |
| 2600 size_t size) { | |
| 2601 | 2381 |
| 2602 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string( | 2382 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 2603 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 2383 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2604 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name) | 2384 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Enum.name) |
| 2605 } | 2385 } |
| 2606 ::std::string* Enum::mutable_name() { | 2386 ::std::string* Enum::mutable_name() { |
| 2607 | 2387 |
| 2608 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name) | 2388 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.name) |
| 2609 return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 2389 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 2610 } | 2390 } |
| 2611 ::std::string* Enum::release_name() { | 2391 ::std::string* Enum::release_name() { |
| 2612 // @@protoc_insertion_point(field_release:google.protobuf.Enum.name) | 2392 // @@protoc_insertion_point(field_release:google.protobuf.Enum.name) |
| 2613 | 2393 |
| 2614 return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 2394 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 2615 } | 2395 } |
| 2616 ::std::string* Enum::unsafe_arena_release_name() { | 2396 void Enum::set_allocated_name(::std::string* name) { |
| 2617 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Enum.na
me) | |
| 2618 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 2619 | |
| 2620 return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringA
lreadyInited(), | |
| 2621 GetArenaNoVirtual()); | |
| 2622 } | |
| 2623 void Enum::set_allocated_name(::std::string* name) { | |
| 2624 if (name != NULL) { | 2397 if (name != NULL) { |
| 2625 | 2398 |
| 2626 } else { | 2399 } else { |
| 2627 | 2400 |
| 2628 } | 2401 } |
| 2629 name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), name, | 2402 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), name); |
| 2630 GetArenaNoVirtual()); | |
| 2631 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name) | 2403 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.name) |
| 2632 } | 2404 } |
| 2633 void Enum::unsafe_arena_set_allocated_name( | |
| 2634 ::std::string* name) { | |
| 2635 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 2636 if (name != NULL) { | |
| 2637 | |
| 2638 } else { | |
| 2639 | |
| 2640 } | |
| 2641 name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), | |
| 2642 name, GetArenaNoVirtual()); | |
| 2643 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.E
num.name) | |
| 2644 } | |
| 2645 | 2405 |
| 2646 // repeated .google.protobuf.EnumValue enumvalue = 2; | 2406 // repeated .google.protobuf.EnumValue enumvalue = 2; |
| 2647 int Enum::enumvalue_size() const { | 2407 int Enum::enumvalue_size() const { |
| 2648 return enumvalue_.size(); | 2408 return enumvalue_.size(); |
| 2649 } | 2409 } |
| 2650 void Enum::clear_enumvalue() { | 2410 void Enum::clear_enumvalue() { |
| 2651 enumvalue_.Clear(); | 2411 enumvalue_.Clear(); |
| 2652 } | 2412 } |
| 2653 const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { | 2413 const ::google::protobuf::EnumValue& Enum::enumvalue(int index) const { |
| 2654 // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) | 2414 // @@protoc_insertion_point(field_get:google.protobuf.Enum.enumvalue) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 Enum::mutable_options() { | 2456 Enum::mutable_options() { |
| 2697 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) | 2457 // @@protoc_insertion_point(field_mutable_list:google.protobuf.Enum.options) |
| 2698 return &options_; | 2458 return &options_; |
| 2699 } | 2459 } |
| 2700 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& | 2460 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& |
| 2701 Enum::options() const { | 2461 Enum::options() const { |
| 2702 // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) | 2462 // @@protoc_insertion_point(field_list:google.protobuf.Enum.options) |
| 2703 return options_; | 2463 return options_; |
| 2704 } | 2464 } |
| 2705 | 2465 |
| 2706 // .google.protobuf.SourceContext source_context = 4; | 2466 // optional .google.protobuf.SourceContext source_context = 4; |
| 2707 bool Enum::has_source_context() const { | 2467 bool Enum::has_source_context() const { |
| 2708 return this != internal_default_instance() && source_context_ != NULL; | 2468 return !_is_default_instance_ && source_context_ != NULL; |
| 2709 } | 2469 } |
| 2710 void Enum::clear_source_context() { | 2470 void Enum::clear_source_context() { |
| 2711 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; | 2471 if (GetArenaNoVirtual() == NULL && source_context_ != NULL) delete source_cont
ext_; |
| 2712 source_context_ = NULL; | 2472 source_context_ = NULL; |
| 2713 } | 2473 } |
| 2714 const ::google::protobuf::SourceContext& Enum::source_context() const { | 2474 const ::google::protobuf::SourceContext& Enum::source_context() const { |
| 2715 // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) | 2475 // @@protoc_insertion_point(field_get:google.protobuf.Enum.source_context) |
| 2716 return source_context_ != NULL ? *source_context_ | 2476 return source_context_ != NULL ? *source_context_ : *default_instance_->source
_context_; |
| 2717 : *::google::protobuf::SourceContext::internal_default_
instance(); | |
| 2718 } | 2477 } |
| 2719 ::google::protobuf::SourceContext* Enum::mutable_source_context() { | 2478 ::google::protobuf::SourceContext* Enum::mutable_source_context() { |
| 2720 | 2479 |
| 2721 if (source_context_ == NULL) { | 2480 if (source_context_ == NULL) { |
| 2722 _slow_mutable_source_context(); | 2481 source_context_ = new ::google::protobuf::SourceContext; |
| 2723 } | 2482 } |
| 2724 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) | 2483 // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.source_context) |
| 2725 return source_context_; | 2484 return source_context_; |
| 2726 } | 2485 } |
| 2727 ::google::protobuf::SourceContext* Enum::release_source_context() { | 2486 ::google::protobuf::SourceContext* Enum::release_source_context() { |
| 2728 // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) | 2487 // @@protoc_insertion_point(field_release:google.protobuf.Enum.source_context) |
| 2729 | 2488 |
| 2730 if (GetArenaNoVirtual() != NULL) { | 2489 ::google::protobuf::SourceContext* temp = source_context_; |
| 2731 return _slow_release_source_context(); | 2490 source_context_ = NULL; |
| 2732 } else { | 2491 return temp; |
| 2733 ::google::protobuf::SourceContext* temp = source_context_; | |
| 2734 source_context_ = NULL; | |
| 2735 return temp; | |
| 2736 } | |
| 2737 } | 2492 } |
| 2738 void Enum::set_allocated_source_context(::google::protobuf::SourceContext* sour
ce_context) { | 2493 void Enum::set_allocated_source_context(::google::protobuf::SourceContext* sourc
e_context) { |
| 2739 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); | 2494 delete source_context_; |
| 2740 if (message_arena == NULL) { | |
| 2741 delete source_context_; | |
| 2742 } | |
| 2743 if (source_context != NULL) { | |
| 2744 if (message_arena != NULL) { | |
| 2745 message_arena->Own(source_context); | |
| 2746 } | |
| 2747 } | |
| 2748 source_context_ = source_context; | 2495 source_context_ = source_context; |
| 2749 if (source_context) { | 2496 if (source_context) { |
| 2750 | 2497 |
| 2751 } else { | 2498 } else { |
| 2752 | 2499 |
| 2753 } | 2500 } |
| 2754 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_co
ntext) | 2501 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.source_co
ntext) |
| 2755 } | 2502 } |
| 2756 | 2503 |
| 2757 // .google.protobuf.Syntax syntax = 5; | 2504 // optional .google.protobuf.Syntax syntax = 5; |
| 2758 void Enum::clear_syntax() { | 2505 void Enum::clear_syntax() { |
| 2759 syntax_ = 0; | 2506 syntax_ = 0; |
| 2760 } | 2507 } |
| 2761 ::google::protobuf::Syntax Enum::syntax() const { | 2508 ::google::protobuf::Syntax Enum::syntax() const { |
| 2762 // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax) | 2509 // @@protoc_insertion_point(field_get:google.protobuf.Enum.syntax) |
| 2763 return static_cast< ::google::protobuf::Syntax >(syntax_); | 2510 return static_cast< ::google::protobuf::Syntax >(syntax_); |
| 2764 } | 2511 } |
| 2765 void Enum::set_syntax(::google::protobuf::Syntax value) { | 2512 void Enum::set_syntax(::google::protobuf::Syntax value) { |
| 2766 | 2513 |
| 2767 syntax_ = value; | 2514 syntax_ = value; |
| 2768 // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax) | 2515 // @@protoc_insertion_point(field_set:google.protobuf.Enum.syntax) |
| 2769 } | 2516 } |
| 2770 | 2517 |
| 2771 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 2518 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 2772 | 2519 |
| 2773 // =================================================================== | 2520 // =================================================================== |
| 2774 | 2521 |
| 2775 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 2522 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2776 const int EnumValue::kNameFieldNumber; | 2523 const int EnumValue::kNameFieldNumber; |
| 2777 const int EnumValue::kNumberFieldNumber; | 2524 const int EnumValue::kNumberFieldNumber; |
| 2778 const int EnumValue::kOptionsFieldNumber; | 2525 const int EnumValue::kOptionsFieldNumber; |
| 2779 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 2526 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2780 | 2527 |
| 2781 EnumValue::EnumValue() | 2528 EnumValue::EnumValue() |
| 2782 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 2529 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 2783 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { | |
| 2784 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 2785 } | |
| 2786 SharedCtor(); | 2530 SharedCtor(); |
| 2787 // @@protoc_insertion_point(constructor:google.protobuf.EnumValue) | 2531 // @@protoc_insertion_point(constructor:google.protobuf.EnumValue) |
| 2788 } | 2532 } |
| 2789 EnumValue::EnumValue(::google::protobuf::Arena* arena) | 2533 |
| 2790 : ::google::protobuf::Message(), | 2534 void EnumValue::InitAsDefaultInstance() { |
| 2791 _internal_metadata_(arena), | 2535 _is_default_instance_ = true; |
| 2792 options_(arena) { | |
| 2793 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 2794 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 2795 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 2796 SharedCtor(); | |
| 2797 RegisterArenaDtor(arena); | |
| 2798 // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValue) | |
| 2799 } | 2536 } |
| 2537 |
| 2800 EnumValue::EnumValue(const EnumValue& from) | 2538 EnumValue::EnumValue(const EnumValue& from) |
| 2801 : ::google::protobuf::Message(), | 2539 : ::google::protobuf::Message(), |
| 2802 _internal_metadata_(NULL), | 2540 _internal_metadata_(NULL) { |
| 2803 options_(from.options_), | 2541 SharedCtor(); |
| 2804 _cached_size_(0) { | 2542 MergeFrom(from); |
| 2805 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 2806 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | |
| 2807 if (from.name().size() > 0) { | |
| 2808 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from
.name(), | |
| 2809 GetArenaNoVirtual()); | |
| 2810 } | |
| 2811 number_ = from.number_; | |
| 2812 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue) | 2543 // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValue) |
| 2813 } | 2544 } |
| 2814 | 2545 |
| 2815 void EnumValue::SharedCtor() { | 2546 void EnumValue::SharedCtor() { |
| 2547 _is_default_instance_ = false; |
| 2548 ::google::protobuf::internal::GetEmptyString(); |
| 2549 _cached_size_ = 0; |
| 2816 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | 2550 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); |
| 2817 number_ = 0; | 2551 number_ = 0; |
| 2818 _cached_size_ = 0; | |
| 2819 } | 2552 } |
| 2820 | 2553 |
| 2821 EnumValue::~EnumValue() { | 2554 EnumValue::~EnumValue() { |
| 2822 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) | 2555 // @@protoc_insertion_point(destructor:google.protobuf.EnumValue) |
| 2823 SharedDtor(); | 2556 SharedDtor(); |
| 2824 } | 2557 } |
| 2825 | 2558 |
| 2826 void EnumValue::SharedDtor() { | 2559 void EnumValue::SharedDtor() { |
| 2827 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); | 2560 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d()); |
| 2828 if (arena != NULL) { | 2561 if (this != default_instance_) { |
| 2829 return; | |
| 2830 } | 2562 } |
| 2831 | |
| 2832 name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ar
ena); | |
| 2833 } | 2563 } |
| 2834 | 2564 |
| 2835 void EnumValue::ArenaDtor(void* object) { | |
| 2836 EnumValue* _this = reinterpret_cast< EnumValue* >(object); | |
| 2837 (void)_this; | |
| 2838 } | |
| 2839 void EnumValue::RegisterArenaDtor(::google::protobuf::Arena* arena) { | |
| 2840 } | |
| 2841 void EnumValue::SetCachedSize(int size) const { | 2565 void EnumValue::SetCachedSize(int size) const { |
| 2842 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 2566 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2843 _cached_size_ = size; | 2567 _cached_size_ = size; |
| 2844 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 2568 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2845 } | 2569 } |
| 2846 const ::google::protobuf::Descriptor* EnumValue::descriptor() { | 2570 const ::google::protobuf::Descriptor* EnumValue::descriptor() { |
| 2847 protobuf_AssignDescriptorsOnce(); | 2571 protobuf_AssignDescriptorsOnce(); |
| 2848 return file_level_metadata[3].descriptor; | 2572 return EnumValue_descriptor_; |
| 2849 } | 2573 } |
| 2850 | 2574 |
| 2851 const EnumValue& EnumValue::default_instance() { | 2575 const EnumValue& EnumValue::default_instance() { |
| 2852 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | 2576 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2epro
to(); |
| 2853 return *internal_default_instance(); | 2577 return *default_instance_; |
| 2854 } | 2578 } |
| 2855 | 2579 |
| 2580 EnumValue* EnumValue::default_instance_ = NULL; |
| 2581 |
| 2856 EnumValue* EnumValue::New(::google::protobuf::Arena* arena) const { | 2582 EnumValue* EnumValue::New(::google::protobuf::Arena* arena) const { |
| 2857 return ::google::protobuf::Arena::CreateMessage<EnumValue>(arena); | 2583 EnumValue* n = new EnumValue; |
| 2584 if (arena != NULL) { |
| 2585 arena->Own(n); |
| 2586 } |
| 2587 return n; |
| 2858 } | 2588 } |
| 2859 | 2589 |
| 2860 void EnumValue::Clear() { | 2590 void EnumValue::Clear() { |
| 2861 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue) | 2591 // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValue) |
| 2592 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 2593 number_ = 0; |
| 2862 options_.Clear(); | 2594 options_.Clear(); |
| 2863 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | |
| 2864 number_ = 0; | |
| 2865 } | 2595 } |
| 2866 | 2596 |
| 2867 bool EnumValue::MergePartialFromCodedStream( | 2597 bool EnumValue::MergePartialFromCodedStream( |
| 2868 ::google::protobuf::io::CodedInputStream* input) { | 2598 ::google::protobuf::io::CodedInputStream* input) { |
| 2869 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 2599 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2870 ::google::protobuf::uint32 tag; | 2600 ::google::protobuf::uint32 tag; |
| 2871 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue) | 2601 // @@protoc_insertion_point(parse_start:google.protobuf.EnumValue) |
| 2872 for (;;) { | 2602 for (;;) { |
| 2873 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); | 2603 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 2874 tag = p.first; | 2604 tag = p.first; |
| 2875 if (!p.second) goto handle_unusual; | 2605 if (!p.second) goto handle_unusual; |
| 2876 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 2606 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 2877 // string name = 1; | 2607 // optional string name = 1; |
| 2878 case 1: { | 2608 case 1: { |
| 2879 if (tag == 10u) { | 2609 if (tag == 10) { |
| 2880 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 2610 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2881 input, this->mutable_name())); | 2611 input, this->mutable_name())); |
| 2882 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2612 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2883 this->name().data(), this->name().length(), | 2613 this->name().data(), this->name().length(), |
| 2884 ::google::protobuf::internal::WireFormatLite::PARSE, | 2614 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2885 "google.protobuf.EnumValue.name")); | 2615 "google.protobuf.EnumValue.name")); |
| 2886 } else { | 2616 } else { |
| 2887 goto handle_unusual; | 2617 goto handle_unusual; |
| 2888 } | 2618 } |
| 2619 if (input->ExpectTag(16)) goto parse_number; |
| 2889 break; | 2620 break; |
| 2890 } | 2621 } |
| 2891 | 2622 |
| 2892 // int32 number = 2; | 2623 // optional int32 number = 2; |
| 2893 case 2: { | 2624 case 2: { |
| 2894 if (tag == 16u) { | 2625 if (tag == 16) { |
| 2895 | 2626 parse_number: |
| 2896 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< | 2627 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2897 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( | 2628 ::google::protobuf::int32, ::google::protobuf::internal::Wire
FormatLite::TYPE_INT32>( |
| 2898 input, &number_))); | 2629 input, &number_))); |
| 2630 |
| 2899 } else { | 2631 } else { |
| 2900 goto handle_unusual; | 2632 goto handle_unusual; |
| 2901 } | 2633 } |
| 2634 if (input->ExpectTag(26)) goto parse_options; |
| 2902 break; | 2635 break; |
| 2903 } | 2636 } |
| 2904 | 2637 |
| 2905 // repeated .google.protobuf.Option options = 3; | 2638 // repeated .google.protobuf.Option options = 3; |
| 2906 case 3: { | 2639 case 3: { |
| 2907 if (tag == 26u) { | 2640 if (tag == 26) { |
| 2641 parse_options: |
| 2908 DO_(input->IncrementRecursionDepth()); | 2642 DO_(input->IncrementRecursionDepth()); |
| 2643 parse_loop_options: |
| 2909 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( | 2644 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
NoRecursionDepth( |
| 2910 input, add_options())); | 2645 input, add_options())); |
| 2911 } else { | 2646 } else { |
| 2912 goto handle_unusual; | 2647 goto handle_unusual; |
| 2913 } | 2648 } |
| 2649 if (input->ExpectTag(26)) goto parse_loop_options; |
| 2914 input->UnsafeDecrementRecursionDepth(); | 2650 input->UnsafeDecrementRecursionDepth(); |
| 2651 if (input->ExpectAtEnd()) goto success; |
| 2915 break; | 2652 break; |
| 2916 } | 2653 } |
| 2917 | 2654 |
| 2918 default: { | 2655 default: { |
| 2919 handle_unusual: | 2656 handle_unusual: |
| 2920 if (tag == 0 || | 2657 if (tag == 0 || |
| 2921 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 2658 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 2922 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 2659 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 2923 goto success; | 2660 goto success; |
| 2924 } | 2661 } |
| 2925 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 2662 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 2926 break; | 2663 break; |
| 2927 } | 2664 } |
| 2928 } | 2665 } |
| 2929 } | 2666 } |
| 2930 success: | 2667 success: |
| 2931 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValue) | 2668 // @@protoc_insertion_point(parse_success:google.protobuf.EnumValue) |
| 2932 return true; | 2669 return true; |
| 2933 failure: | 2670 failure: |
| 2934 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValue) | 2671 // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValue) |
| 2935 return false; | 2672 return false; |
| 2936 #undef DO_ | 2673 #undef DO_ |
| 2937 } | 2674 } |
| 2938 | 2675 |
| 2939 void EnumValue::SerializeWithCachedSizes( | 2676 void EnumValue::SerializeWithCachedSizes( |
| 2940 ::google::protobuf::io::CodedOutputStream* output) const { | 2677 ::google::protobuf::io::CodedOutputStream* output) const { |
| 2941 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue) | 2678 // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValue) |
| 2942 // string name = 1; | 2679 // optional string name = 1; |
| 2943 if (this->name().size() > 0) { | 2680 if (this->name().size() > 0) { |
| 2944 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2681 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2945 this->name().data(), this->name().length(), | 2682 this->name().data(), this->name().length(), |
| 2946 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 2683 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2947 "google.protobuf.EnumValue.name"); | 2684 "google.protobuf.EnumValue.name"); |
| 2948 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 2685 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2949 1, this->name(), output); | 2686 1, this->name(), output); |
| 2950 } | 2687 } |
| 2951 | 2688 |
| 2952 // int32 number = 2; | 2689 // optional int32 number = 2; |
| 2953 if (this->number() != 0) { | 2690 if (this->number() != 0) { |
| 2954 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(),
output); | 2691 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(),
output); |
| 2955 } | 2692 } |
| 2956 | 2693 |
| 2957 // repeated .google.protobuf.Option options = 3; | 2694 // repeated .google.protobuf.Option options = 3; |
| 2958 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 2695 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 2959 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 2696 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2960 3, this->options(i), output); | 2697 3, this->options(i), output); |
| 2961 } | 2698 } |
| 2962 | 2699 |
| 2963 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue) | 2700 // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValue) |
| 2964 } | 2701 } |
| 2965 | 2702 |
| 2966 ::google::protobuf::uint8* EnumValue::InternalSerializeWithCachedSizesToArray( | 2703 ::google::protobuf::uint8* EnumValue::SerializeWithCachedSizesToArray( |
| 2967 bool deterministic, ::google::protobuf::uint8* target) const { | 2704 ::google::protobuf::uint8* target) const { |
| 2968 (void)deterministic; // Unused | |
| 2969 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue
) | 2705 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValue
) |
| 2970 // string name = 1; | 2706 // optional string name = 1; |
| 2971 if (this->name().size() > 0) { | 2707 if (this->name().size() > 0) { |
| 2972 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 2708 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2973 this->name().data(), this->name().length(), | 2709 this->name().data(), this->name().length(), |
| 2974 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 2710 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2975 "google.protobuf.EnumValue.name"); | 2711 "google.protobuf.EnumValue.name"); |
| 2976 target = | 2712 target = |
| 2977 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 2713 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 2978 1, this->name(), target); | 2714 1, this->name(), target); |
| 2979 } | 2715 } |
| 2980 | 2716 |
| 2981 // int32 number = 2; | 2717 // optional int32 number = 2; |
| 2982 if (this->number() != 0) { | 2718 if (this->number() != 0) { |
| 2983 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2,
this->number(), target); | 2719 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2,
this->number(), target); |
| 2984 } | 2720 } |
| 2985 | 2721 |
| 2986 // repeated .google.protobuf.Option options = 3; | 2722 // repeated .google.protobuf.Option options = 3; |
| 2987 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { | 2723 for (unsigned int i = 0, n = this->options_size(); i < n; i++) { |
| 2988 target = ::google::protobuf::internal::WireFormatLite:: | 2724 target = ::google::protobuf::internal::WireFormatLite:: |
| 2989 InternalWriteMessageNoVirtualToArray( | 2725 WriteMessageNoVirtualToArray( |
| 2990 3, this->options(i), false, target); | 2726 3, this->options(i), target); |
| 2991 } | 2727 } |
| 2992 | 2728 |
| 2993 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue) | 2729 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValue) |
| 2994 return target; | 2730 return target; |
| 2995 } | 2731 } |
| 2996 | 2732 |
| 2997 size_t EnumValue::ByteSizeLong() const { | 2733 int EnumValue::ByteSize() const { |
| 2998 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue) | 2734 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValue) |
| 2999 size_t total_size = 0; | 2735 int total_size = 0; |
| 3000 | 2736 |
| 3001 // repeated .google.protobuf.Option options = 3; | 2737 // optional string name = 1; |
| 3002 { | |
| 3003 unsigned int count = this->options_size(); | |
| 3004 total_size += 1UL * count; | |
| 3005 for (unsigned int i = 0; i < count; i++) { | |
| 3006 total_size += | |
| 3007 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | |
| 3008 this->options(i)); | |
| 3009 } | |
| 3010 } | |
| 3011 | |
| 3012 // string name = 1; | |
| 3013 if (this->name().size() > 0) { | 2738 if (this->name().size() > 0) { |
| 3014 total_size += 1 + | 2739 total_size += 1 + |
| 3015 ::google::protobuf::internal::WireFormatLite::StringSize( | 2740 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3016 this->name()); | 2741 this->name()); |
| 3017 } | 2742 } |
| 3018 | 2743 |
| 3019 // int32 number = 2; | 2744 // optional int32 number = 2; |
| 3020 if (this->number() != 0) { | 2745 if (this->number() != 0) { |
| 3021 total_size += 1 + | 2746 total_size += 1 + |
| 3022 ::google::protobuf::internal::WireFormatLite::Int32Size( | 2747 ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 3023 this->number()); | 2748 this->number()); |
| 3024 } | 2749 } |
| 3025 | 2750 |
| 3026 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); | 2751 // repeated .google.protobuf.Option options = 3; |
| 2752 total_size += 1 * this->options_size(); |
| 2753 for (int i = 0; i < this->options_size(); i++) { |
| 2754 total_size += |
| 2755 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 2756 this->options(i)); |
| 2757 } |
| 2758 |
| 3027 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 2759 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 3028 _cached_size_ = cached_size; | 2760 _cached_size_ = total_size; |
| 3029 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 2761 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 3030 return total_size; | 2762 return total_size; |
| 3031 } | 2763 } |
| 3032 | 2764 |
| 3033 void EnumValue::MergeFrom(const ::google::protobuf::Message& from) { | 2765 void EnumValue::MergeFrom(const ::google::protobuf::Message& from) { |
| 3034 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumVal
ue) | 2766 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumVal
ue) |
| 3035 GOOGLE_DCHECK_NE(&from, this); | 2767 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 3036 const EnumValue* source = | 2768 const EnumValue* source = |
| 3037 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValue>( | 2769 ::google::protobuf::internal::DynamicCastToGenerated<const EnumValue>( |
| 3038 &from); | 2770 &from); |
| 3039 if (source == NULL) { | 2771 if (source == NULL) { |
| 3040 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
numValue) | 2772 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
numValue) |
| 3041 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 2773 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3042 } else { | 2774 } else { |
| 3043 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.EnumValue) | 2775 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.EnumValue) |
| 3044 MergeFrom(*source); | 2776 MergeFrom(*source); |
| 3045 } | 2777 } |
| 3046 } | 2778 } |
| 3047 | 2779 |
| 3048 void EnumValue::MergeFrom(const EnumValue& from) { | 2780 void EnumValue::MergeFrom(const EnumValue& from) { |
| 3049 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum
Value) | 2781 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Enum
Value) |
| 3050 GOOGLE_DCHECK_NE(&from, this); | 2782 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 3051 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 3052 options_.MergeFrom(from.options_); | 2783 options_.MergeFrom(from.options_); |
| 3053 if (from.name().size() > 0) { | 2784 if (from.name().size() > 0) { |
| 3054 set_name(from.name()); | 2785 |
| 2786 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), from.name_); |
| 3055 } | 2787 } |
| 3056 if (from.number() != 0) { | 2788 if (from.number() != 0) { |
| 3057 set_number(from.number()); | 2789 set_number(from.number()); |
| 3058 } | 2790 } |
| 3059 } | 2791 } |
| 3060 | 2792 |
| 3061 void EnumValue::CopyFrom(const ::google::protobuf::Message& from) { | 2793 void EnumValue::CopyFrom(const ::google::protobuf::Message& from) { |
| 3062 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValu
e) | 2794 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValu
e) |
| 3063 if (&from == this) return; | 2795 if (&from == this) return; |
| 3064 Clear(); | 2796 Clear(); |
| 3065 MergeFrom(from); | 2797 MergeFrom(from); |
| 3066 } | 2798 } |
| 3067 | 2799 |
| 3068 void EnumValue::CopyFrom(const EnumValue& from) { | 2800 void EnumValue::CopyFrom(const EnumValue& from) { |
| 3069 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumV
alue) | 2801 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.EnumV
alue) |
| 3070 if (&from == this) return; | 2802 if (&from == this) return; |
| 3071 Clear(); | 2803 Clear(); |
| 3072 MergeFrom(from); | 2804 MergeFrom(from); |
| 3073 } | 2805 } |
| 3074 | 2806 |
| 3075 bool EnumValue::IsInitialized() const { | 2807 bool EnumValue::IsInitialized() const { |
| 2808 |
| 3076 return true; | 2809 return true; |
| 3077 } | 2810 } |
| 3078 | 2811 |
| 3079 void EnumValue::Swap(EnumValue* other) { | 2812 void EnumValue::Swap(EnumValue* other) { |
| 3080 if (other == this) return; | 2813 if (other == this) return; |
| 3081 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | |
| 3082 InternalSwap(other); | |
| 3083 } else { | |
| 3084 EnumValue* temp = New(GetArenaNoVirtual()); | |
| 3085 temp->MergeFrom(*other); | |
| 3086 other->CopyFrom(*this); | |
| 3087 InternalSwap(temp); | |
| 3088 if (GetArenaNoVirtual() == NULL) { | |
| 3089 delete temp; | |
| 3090 } | |
| 3091 } | |
| 3092 } | |
| 3093 void EnumValue::UnsafeArenaSwap(EnumValue* other) { | |
| 3094 if (other == this) return; | |
| 3095 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | |
| 3096 InternalSwap(other); | 2814 InternalSwap(other); |
| 3097 } | 2815 } |
| 3098 void EnumValue::InternalSwap(EnumValue* other) { | 2816 void EnumValue::InternalSwap(EnumValue* other) { |
| 3099 options_.UnsafeArenaSwap(&other->options_); | |
| 3100 name_.Swap(&other->name_); | 2817 name_.Swap(&other->name_); |
| 3101 std::swap(number_, other->number_); | 2818 std::swap(number_, other->number_); |
| 2819 options_.UnsafeArenaSwap(&other->options_); |
| 2820 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3102 std::swap(_cached_size_, other->_cached_size_); | 2821 std::swap(_cached_size_, other->_cached_size_); |
| 3103 } | 2822 } |
| 3104 | 2823 |
| 3105 ::google::protobuf::Metadata EnumValue::GetMetadata() const { | 2824 ::google::protobuf::Metadata EnumValue::GetMetadata() const { |
| 3106 protobuf_AssignDescriptorsOnce(); | 2825 protobuf_AssignDescriptorsOnce(); |
| 3107 return file_level_metadata[3]; | 2826 ::google::protobuf::Metadata metadata; |
| 2827 metadata.descriptor = EnumValue_descriptor_; |
| 2828 metadata.reflection = EnumValue_reflection_; |
| 2829 return metadata; |
| 3108 } | 2830 } |
| 3109 | 2831 |
| 3110 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 2832 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3111 // EnumValue | 2833 // EnumValue |
| 3112 | 2834 |
| 3113 // string name = 1; | 2835 // optional string name = 1; |
| 3114 void EnumValue::clear_name() { | 2836 void EnumValue::clear_name() { |
| 3115 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 2837 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 3116 } | 2838 } |
| 3117 const ::std::string& EnumValue::name() const { | 2839 const ::std::string& EnumValue::name() const { |
| 3118 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name) | 2840 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.name) |
| 3119 return name_.Get(); | 2841 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited()); |
| 3120 } | 2842 } |
| 3121 void EnumValue::set_name(const ::std::string& value) { | 2843 void EnumValue::set_name(const ::std::string& value) { |
| 3122 | 2844 |
| 3123 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
GetArenaNoVirtual()); | 2845 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); |
| 3124 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name) | 2846 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.name) |
| 3125 } | 2847 } |
| 3126 void EnumValue::set_name(const char* value) { | 2848 void EnumValue::set_name(const char* value) { |
| 3127 | 2849 |
| 3128 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string(value), | 2850 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); |
| 3129 GetArenaNoVirtual()); | |
| 3130 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name) | 2851 // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValue.name) |
| 3131 } | 2852 } |
| 3132 void EnumValue::set_name(const char* value, | 2853 void EnumValue::set_name(const char* value, size_t size) { |
| 3133 size_t size) { | |
| 3134 | 2854 |
| 3135 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string( | 2855 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3136 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 2856 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 3137 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name) | 2857 // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValue.name) |
| 3138 } | 2858 } |
| 3139 ::std::string* EnumValue::mutable_name() { | 2859 ::std::string* EnumValue::mutable_name() { |
| 3140 | 2860 |
| 3141 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name) | 2861 // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValue.name) |
| 3142 return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 2862 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 3143 } | 2863 } |
| 3144 ::std::string* EnumValue::release_name() { | 2864 ::std::string* EnumValue::release_name() { |
| 3145 // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name) | 2865 // @@protoc_insertion_point(field_release:google.protobuf.EnumValue.name) |
| 3146 | 2866 |
| 3147 return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 2867 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 3148 } | 2868 } |
| 3149 ::std::string* EnumValue::unsafe_arena_release_name() { | 2869 void EnumValue::set_allocated_name(::std::string* name) { |
| 3150 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumVal
ue.name) | |
| 3151 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 3152 | |
| 3153 return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringA
lreadyInited(), | |
| 3154 GetArenaNoVirtual()); | |
| 3155 } | |
| 3156 void EnumValue::set_allocated_name(::std::string* name) { | |
| 3157 if (name != NULL) { | 2870 if (name != NULL) { |
| 3158 | 2871 |
| 3159 } else { | 2872 } else { |
| 3160 | 2873 |
| 3161 } | 2874 } |
| 3162 name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), name, | 2875 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), name); |
| 3163 GetArenaNoVirtual()); | |
| 3164 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name
) | 2876 // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValue.name
) |
| 3165 } | 2877 } |
| 3166 void EnumValue::unsafe_arena_set_allocated_name( | |
| 3167 ::std::string* name) { | |
| 3168 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 3169 if (name != NULL) { | |
| 3170 | |
| 3171 } else { | |
| 3172 | |
| 3173 } | |
| 3174 name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), | |
| 3175 name, GetArenaNoVirtual()); | |
| 3176 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.E
numValue.name) | |
| 3177 } | |
| 3178 | 2878 |
| 3179 // int32 number = 2; | 2879 // optional int32 number = 2; |
| 3180 void EnumValue::clear_number() { | 2880 void EnumValue::clear_number() { |
| 3181 number_ = 0; | 2881 number_ = 0; |
| 3182 } | 2882 } |
| 3183 ::google::protobuf::int32 EnumValue::number() const { | 2883 ::google::protobuf::int32 EnumValue::number() const { |
| 3184 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number) | 2884 // @@protoc_insertion_point(field_get:google.protobuf.EnumValue.number) |
| 3185 return number_; | 2885 return number_; |
| 3186 } | 2886 } |
| 3187 void EnumValue::set_number(::google::protobuf::int32 value) { | 2887 void EnumValue::set_number(::google::protobuf::int32 value) { |
| 3188 | 2888 |
| 3189 number_ = value; | 2889 number_ = value; |
| 3190 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number) | 2890 // @@protoc_insertion_point(field_set:google.protobuf.EnumValue.number) |
| 3191 } | 2891 } |
| 3192 | 2892 |
| 3193 // repeated .google.protobuf.Option options = 3; | 2893 // repeated .google.protobuf.Option options = 3; |
| 3194 int EnumValue::options_size() const { | 2894 int EnumValue::options_size() const { |
| 3195 return options_.size(); | 2895 return options_.size(); |
| 3196 } | 2896 } |
| 3197 void EnumValue::clear_options() { | 2897 void EnumValue::clear_options() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3217 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& | 2917 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& |
| 3218 EnumValue::options() const { | 2918 EnumValue::options() const { |
| 3219 // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) | 2919 // @@protoc_insertion_point(field_list:google.protobuf.EnumValue.options) |
| 3220 return options_; | 2920 return options_; |
| 3221 } | 2921 } |
| 3222 | 2922 |
| 3223 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 2923 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3224 | 2924 |
| 3225 // =================================================================== | 2925 // =================================================================== |
| 3226 | 2926 |
| 3227 void Option::_slow_mutable_value() { | |
| 3228 value_ = ::google::protobuf::Arena::Create< ::google::protobuf::Any >( | |
| 3229 GetArenaNoVirtual()); | |
| 3230 } | |
| 3231 ::google::protobuf::Any* Option::_slow_release_value() { | |
| 3232 if (value_ == NULL) { | |
| 3233 return NULL; | |
| 3234 } else { | |
| 3235 ::google::protobuf::Any* temp = new ::google::protobuf::Any(*value_); | |
| 3236 value_ = NULL; | |
| 3237 return temp; | |
| 3238 } | |
| 3239 } | |
| 3240 ::google::protobuf::Any* Option::unsafe_arena_release_value() { | |
| 3241 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.
value) | |
| 3242 | |
| 3243 ::google::protobuf::Any* temp = value_; | |
| 3244 value_ = NULL; | |
| 3245 return temp; | |
| 3246 } | |
| 3247 void Option::unsafe_arena_set_allocated_value( | |
| 3248 ::google::protobuf::Any* value) { | |
| 3249 if (GetArenaNoVirtual() == NULL) { | |
| 3250 delete value_; | |
| 3251 } | |
| 3252 value_ = value; | |
| 3253 if (value) { | |
| 3254 | |
| 3255 } else { | |
| 3256 | |
| 3257 } | |
| 3258 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.O
ption.value) | |
| 3259 } | |
| 3260 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 2927 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3261 const int Option::kNameFieldNumber; | 2928 const int Option::kNameFieldNumber; |
| 3262 const int Option::kValueFieldNumber; | 2929 const int Option::kValueFieldNumber; |
| 3263 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 2930 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3264 | 2931 |
| 3265 Option::Option() | 2932 Option::Option() |
| 3266 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 2933 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 3267 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { | |
| 3268 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 3269 } | |
| 3270 SharedCtor(); | 2934 SharedCtor(); |
| 3271 // @@protoc_insertion_point(constructor:google.protobuf.Option) | 2935 // @@protoc_insertion_point(constructor:google.protobuf.Option) |
| 3272 } | 2936 } |
| 3273 Option::Option(::google::protobuf::Arena* arena) | 2937 |
| 3274 : ::google::protobuf::Message(), | 2938 void Option::InitAsDefaultInstance() { |
| 3275 _internal_metadata_(arena) { | 2939 _is_default_instance_ = true; |
| 3276 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | 2940 value_ = const_cast< ::google::protobuf::Any*>(&::google::protobuf::Any::defau
lt_instance()); |
| 3277 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | |
| 3278 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER | |
| 3279 SharedCtor(); | |
| 3280 RegisterArenaDtor(arena); | |
| 3281 // @@protoc_insertion_point(arena_constructor:google.protobuf.Option) | |
| 3282 } | 2941 } |
| 2942 |
| 3283 Option::Option(const Option& from) | 2943 Option::Option(const Option& from) |
| 3284 : ::google::protobuf::Message(), | 2944 : ::google::protobuf::Message(), |
| 3285 _internal_metadata_(NULL), | 2945 _internal_metadata_(NULL) { |
| 3286 _cached_size_(0) { | 2946 SharedCtor(); |
| 3287 _internal_metadata_.MergeFrom(from._internal_metadata_); | 2947 MergeFrom(from); |
| 3288 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | |
| 3289 if (from.name().size() > 0) { | |
| 3290 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from
.name(), | |
| 3291 GetArenaNoVirtual()); | |
| 3292 } | |
| 3293 if (from.has_value()) { | |
| 3294 value_ = new ::google::protobuf::Any(*from.value_); | |
| 3295 } else { | |
| 3296 value_ = NULL; | |
| 3297 } | |
| 3298 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option) | 2948 // @@protoc_insertion_point(copy_constructor:google.protobuf.Option) |
| 3299 } | 2949 } |
| 3300 | 2950 |
| 3301 void Option::SharedCtor() { | 2951 void Option::SharedCtor() { |
| 2952 _is_default_instance_ = false; |
| 2953 ::google::protobuf::internal::GetEmptyString(); |
| 2954 _cached_size_ = 0; |
| 3302 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); | 2955 name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyIni
ted()); |
| 3303 value_ = NULL; | 2956 value_ = NULL; |
| 3304 _cached_size_ = 0; | |
| 3305 } | 2957 } |
| 3306 | 2958 |
| 3307 Option::~Option() { | 2959 Option::~Option() { |
| 3308 // @@protoc_insertion_point(destructor:google.protobuf.Option) | 2960 // @@protoc_insertion_point(destructor:google.protobuf.Option) |
| 3309 SharedDtor(); | 2961 SharedDtor(); |
| 3310 } | 2962 } |
| 3311 | 2963 |
| 3312 void Option::SharedDtor() { | 2964 void Option::SharedDtor() { |
| 3313 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); | 2965 name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d()); |
| 3314 if (arena != NULL) { | 2966 if (this != default_instance_) { |
| 3315 return; | |
| 3316 } | |
| 3317 | |
| 3318 name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ar
ena); | |
| 3319 if (this != internal_default_instance()) { | |
| 3320 delete value_; | 2967 delete value_; |
| 3321 } | 2968 } |
| 3322 } | 2969 } |
| 3323 | 2970 |
| 3324 void Option::ArenaDtor(void* object) { | |
| 3325 Option* _this = reinterpret_cast< Option* >(object); | |
| 3326 (void)_this; | |
| 3327 } | |
| 3328 void Option::RegisterArenaDtor(::google::protobuf::Arena* arena) { | |
| 3329 } | |
| 3330 void Option::SetCachedSize(int size) const { | 2971 void Option::SetCachedSize(int size) const { |
| 3331 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 2972 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 3332 _cached_size_ = size; | 2973 _cached_size_ = size; |
| 3333 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 2974 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 3334 } | 2975 } |
| 3335 const ::google::protobuf::Descriptor* Option::descriptor() { | 2976 const ::google::protobuf::Descriptor* Option::descriptor() { |
| 3336 protobuf_AssignDescriptorsOnce(); | 2977 protobuf_AssignDescriptorsOnce(); |
| 3337 return file_level_metadata[4].descriptor; | 2978 return Option_descriptor_; |
| 3338 } | 2979 } |
| 3339 | 2980 |
| 3340 const Option& Option::default_instance() { | 2981 const Option& Option::default_instance() { |
| 3341 protobuf_InitDefaults_google_2fprotobuf_2ftype_2eproto(); | 2982 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ftype_2epro
to(); |
| 3342 return *internal_default_instance(); | 2983 return *default_instance_; |
| 3343 } | 2984 } |
| 3344 | 2985 |
| 2986 Option* Option::default_instance_ = NULL; |
| 2987 |
| 3345 Option* Option::New(::google::protobuf::Arena* arena) const { | 2988 Option* Option::New(::google::protobuf::Arena* arena) const { |
| 3346 return ::google::protobuf::Arena::CreateMessage<Option>(arena); | 2989 Option* n = new Option; |
| 2990 if (arena != NULL) { |
| 2991 arena->Own(n); |
| 2992 } |
| 2993 return n; |
| 3347 } | 2994 } |
| 3348 | 2995 |
| 3349 void Option::Clear() { | 2996 void Option::Clear() { |
| 3350 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option) | 2997 // @@protoc_insertion_point(message_clear_start:google.protobuf.Option) |
| 3351 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 2998 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 3352 if (GetArenaNoVirtual() == NULL && value_ != NULL) { | 2999 if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; |
| 3353 delete value_; | |
| 3354 } | |
| 3355 value_ = NULL; | 3000 value_ = NULL; |
| 3356 } | 3001 } |
| 3357 | 3002 |
| 3358 bool Option::MergePartialFromCodedStream( | 3003 bool Option::MergePartialFromCodedStream( |
| 3359 ::google::protobuf::io::CodedInputStream* input) { | 3004 ::google::protobuf::io::CodedInputStream* input) { |
| 3360 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 3005 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 3361 ::google::protobuf::uint32 tag; | 3006 ::google::protobuf::uint32 tag; |
| 3362 // @@protoc_insertion_point(parse_start:google.protobuf.Option) | 3007 // @@protoc_insertion_point(parse_start:google.protobuf.Option) |
| 3363 for (;;) { | 3008 for (;;) { |
| 3364 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); | 3009 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 3365 tag = p.first; | 3010 tag = p.first; |
| 3366 if (!p.second) goto handle_unusual; | 3011 if (!p.second) goto handle_unusual; |
| 3367 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 3012 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 3368 // string name = 1; | 3013 // optional string name = 1; |
| 3369 case 1: { | 3014 case 1: { |
| 3370 if (tag == 10u) { | 3015 if (tag == 10) { |
| 3371 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 3016 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3372 input, this->mutable_name())); | 3017 input, this->mutable_name())); |
| 3373 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 3018 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3374 this->name().data(), this->name().length(), | 3019 this->name().data(), this->name().length(), |
| 3375 ::google::protobuf::internal::WireFormatLite::PARSE, | 3020 ::google::protobuf::internal::WireFormatLite::PARSE, |
| 3376 "google.protobuf.Option.name")); | 3021 "google.protobuf.Option.name")); |
| 3377 } else { | 3022 } else { |
| 3378 goto handle_unusual; | 3023 goto handle_unusual; |
| 3379 } | 3024 } |
| 3025 if (input->ExpectTag(18)) goto parse_value; |
| 3380 break; | 3026 break; |
| 3381 } | 3027 } |
| 3382 | 3028 |
| 3383 // .google.protobuf.Any value = 2; | 3029 // optional .google.protobuf.Any value = 2; |
| 3384 case 2: { | 3030 case 2: { |
| 3385 if (tag == 18u) { | 3031 if (tag == 18) { |
| 3032 parse_value: |
| 3386 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( | 3033 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual
( |
| 3387 input, mutable_value())); | 3034 input, mutable_value())); |
| 3388 } else { | 3035 } else { |
| 3389 goto handle_unusual; | 3036 goto handle_unusual; |
| 3390 } | 3037 } |
| 3038 if (input->ExpectAtEnd()) goto success; |
| 3391 break; | 3039 break; |
| 3392 } | 3040 } |
| 3393 | 3041 |
| 3394 default: { | 3042 default: { |
| 3395 handle_unusual: | 3043 handle_unusual: |
| 3396 if (tag == 0 || | 3044 if (tag == 0 || |
| 3397 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 3045 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 3398 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 3046 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 3399 goto success; | 3047 goto success; |
| 3400 } | 3048 } |
| 3401 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 3049 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
| 3402 break; | 3050 break; |
| 3403 } | 3051 } |
| 3404 } | 3052 } |
| 3405 } | 3053 } |
| 3406 success: | 3054 success: |
| 3407 // @@protoc_insertion_point(parse_success:google.protobuf.Option) | 3055 // @@protoc_insertion_point(parse_success:google.protobuf.Option) |
| 3408 return true; | 3056 return true; |
| 3409 failure: | 3057 failure: |
| 3410 // @@protoc_insertion_point(parse_failure:google.protobuf.Option) | 3058 // @@protoc_insertion_point(parse_failure:google.protobuf.Option) |
| 3411 return false; | 3059 return false; |
| 3412 #undef DO_ | 3060 #undef DO_ |
| 3413 } | 3061 } |
| 3414 | 3062 |
| 3415 void Option::SerializeWithCachedSizes( | 3063 void Option::SerializeWithCachedSizes( |
| 3416 ::google::protobuf::io::CodedOutputStream* output) const { | 3064 ::google::protobuf::io::CodedOutputStream* output) const { |
| 3417 // @@protoc_insertion_point(serialize_start:google.protobuf.Option) | 3065 // @@protoc_insertion_point(serialize_start:google.protobuf.Option) |
| 3418 // string name = 1; | 3066 // optional string name = 1; |
| 3419 if (this->name().size() > 0) { | 3067 if (this->name().size() > 0) { |
| 3420 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 3068 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3421 this->name().data(), this->name().length(), | 3069 this->name().data(), this->name().length(), |
| 3422 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 3070 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3423 "google.protobuf.Option.name"); | 3071 "google.protobuf.Option.name"); |
| 3424 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 3072 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3425 1, this->name(), output); | 3073 1, this->name(), output); |
| 3426 } | 3074 } |
| 3427 | 3075 |
| 3428 // .google.protobuf.Any value = 2; | 3076 // optional .google.protobuf.Any value = 2; |
| 3429 if (this->has_value()) { | 3077 if (this->has_value()) { |
| 3430 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( | 3078 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3431 2, *this->value_, output); | 3079 2, *this->value_, output); |
| 3432 } | 3080 } |
| 3433 | 3081 |
| 3434 // @@protoc_insertion_point(serialize_end:google.protobuf.Option) | 3082 // @@protoc_insertion_point(serialize_end:google.protobuf.Option) |
| 3435 } | 3083 } |
| 3436 | 3084 |
| 3437 ::google::protobuf::uint8* Option::InternalSerializeWithCachedSizesToArray( | 3085 ::google::protobuf::uint8* Option::SerializeWithCachedSizesToArray( |
| 3438 bool deterministic, ::google::protobuf::uint8* target) const { | 3086 ::google::protobuf::uint8* target) const { |
| 3439 (void)deterministic; // Unused | |
| 3440 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) | 3087 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Option) |
| 3441 // string name = 1; | 3088 // optional string name = 1; |
| 3442 if (this->name().size() > 0) { | 3089 if (this->name().size() > 0) { |
| 3443 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 3090 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3444 this->name().data(), this->name().length(), | 3091 this->name().data(), this->name().length(), |
| 3445 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 3092 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3446 "google.protobuf.Option.name"); | 3093 "google.protobuf.Option.name"); |
| 3447 target = | 3094 target = |
| 3448 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 3095 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3449 1, this->name(), target); | 3096 1, this->name(), target); |
| 3450 } | 3097 } |
| 3451 | 3098 |
| 3452 // .google.protobuf.Any value = 2; | 3099 // optional .google.protobuf.Any value = 2; |
| 3453 if (this->has_value()) { | 3100 if (this->has_value()) { |
| 3454 target = ::google::protobuf::internal::WireFormatLite:: | 3101 target = ::google::protobuf::internal::WireFormatLite:: |
| 3455 InternalWriteMessageNoVirtualToArray( | 3102 WriteMessageNoVirtualToArray( |
| 3456 2, *this->value_, false, target); | 3103 2, *this->value_, target); |
| 3457 } | 3104 } |
| 3458 | 3105 |
| 3459 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option) | 3106 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Option) |
| 3460 return target; | 3107 return target; |
| 3461 } | 3108 } |
| 3462 | 3109 |
| 3463 size_t Option::ByteSizeLong() const { | 3110 int Option::ByteSize() const { |
| 3464 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option) | 3111 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Option) |
| 3465 size_t total_size = 0; | 3112 int total_size = 0; |
| 3466 | 3113 |
| 3467 // string name = 1; | 3114 // optional string name = 1; |
| 3468 if (this->name().size() > 0) { | 3115 if (this->name().size() > 0) { |
| 3469 total_size += 1 + | 3116 total_size += 1 + |
| 3470 ::google::protobuf::internal::WireFormatLite::StringSize( | 3117 ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3471 this->name()); | 3118 this->name()); |
| 3472 } | 3119 } |
| 3473 | 3120 |
| 3474 // .google.protobuf.Any value = 2; | 3121 // optional .google.protobuf.Any value = 2; |
| 3475 if (this->has_value()) { | 3122 if (this->has_value()) { |
| 3476 total_size += 1 + | 3123 total_size += 1 + |
| 3477 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( | 3124 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 3478 *this->value_); | 3125 *this->value_); |
| 3479 } | 3126 } |
| 3480 | 3127 |
| 3481 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); | |
| 3482 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 3128 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 3483 _cached_size_ = cached_size; | 3129 _cached_size_ = total_size; |
| 3484 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 3130 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 3485 return total_size; | 3131 return total_size; |
| 3486 } | 3132 } |
| 3487 | 3133 |
| 3488 void Option::MergeFrom(const ::google::protobuf::Message& from) { | 3134 void Option::MergeFrom(const ::google::protobuf::Message& from) { |
| 3489 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option) | 3135 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Option) |
| 3490 GOOGLE_DCHECK_NE(&from, this); | 3136 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 3491 const Option* source = | 3137 const Option* source = |
| 3492 ::google::protobuf::internal::DynamicCastToGenerated<const Option>( | 3138 ::google::protobuf::internal::DynamicCastToGenerated<const Option>( |
| 3493 &from); | 3139 &from); |
| 3494 if (source == NULL) { | 3140 if (source == NULL) { |
| 3495 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.O
ption) | 3141 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.O
ption) |
| 3496 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 3142 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3497 } else { | 3143 } else { |
| 3498 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Option) | 3144 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Option) |
| 3499 MergeFrom(*source); | 3145 MergeFrom(*source); |
| 3500 } | 3146 } |
| 3501 } | 3147 } |
| 3502 | 3148 |
| 3503 void Option::MergeFrom(const Option& from) { | 3149 void Option::MergeFrom(const Option& from) { |
| 3504 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Opti
on) | 3150 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Opti
on) |
| 3505 GOOGLE_DCHECK_NE(&from, this); | 3151 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 3506 _internal_metadata_.MergeFrom(from._internal_metadata_); | |
| 3507 if (from.name().size() > 0) { | 3152 if (from.name().size() > 0) { |
| 3508 set_name(from.name()); | 3153 |
| 3154 name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), from.name_); |
| 3509 } | 3155 } |
| 3510 if (from.has_value()) { | 3156 if (from.has_value()) { |
| 3511 mutable_value()->::google::protobuf::Any::MergeFrom(from.value()); | 3157 mutable_value()->::google::protobuf::Any::MergeFrom(from.value()); |
| 3512 } | 3158 } |
| 3513 } | 3159 } |
| 3514 | 3160 |
| 3515 void Option::CopyFrom(const ::google::protobuf::Message& from) { | 3161 void Option::CopyFrom(const ::google::protobuf::Message& from) { |
| 3516 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Option) | 3162 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Option) |
| 3517 if (&from == this) return; | 3163 if (&from == this) return; |
| 3518 Clear(); | 3164 Clear(); |
| 3519 MergeFrom(from); | 3165 MergeFrom(from); |
| 3520 } | 3166 } |
| 3521 | 3167 |
| 3522 void Option::CopyFrom(const Option& from) { | 3168 void Option::CopyFrom(const Option& from) { |
| 3523 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Optio
n) | 3169 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Optio
n) |
| 3524 if (&from == this) return; | 3170 if (&from == this) return; |
| 3525 Clear(); | 3171 Clear(); |
| 3526 MergeFrom(from); | 3172 MergeFrom(from); |
| 3527 } | 3173 } |
| 3528 | 3174 |
| 3529 bool Option::IsInitialized() const { | 3175 bool Option::IsInitialized() const { |
| 3176 |
| 3530 return true; | 3177 return true; |
| 3531 } | 3178 } |
| 3532 | 3179 |
| 3533 void Option::Swap(Option* other) { | 3180 void Option::Swap(Option* other) { |
| 3534 if (other == this) return; | 3181 if (other == this) return; |
| 3535 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | |
| 3536 InternalSwap(other); | |
| 3537 } else { | |
| 3538 Option* temp = New(GetArenaNoVirtual()); | |
| 3539 temp->MergeFrom(*other); | |
| 3540 other->CopyFrom(*this); | |
| 3541 InternalSwap(temp); | |
| 3542 if (GetArenaNoVirtual() == NULL) { | |
| 3543 delete temp; | |
| 3544 } | |
| 3545 } | |
| 3546 } | |
| 3547 void Option::UnsafeArenaSwap(Option* other) { | |
| 3548 if (other == this) return; | |
| 3549 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | |
| 3550 InternalSwap(other); | 3182 InternalSwap(other); |
| 3551 } | 3183 } |
| 3552 void Option::InternalSwap(Option* other) { | 3184 void Option::InternalSwap(Option* other) { |
| 3553 name_.Swap(&other->name_); | 3185 name_.Swap(&other->name_); |
| 3554 std::swap(value_, other->value_); | 3186 std::swap(value_, other->value_); |
| 3187 _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3555 std::swap(_cached_size_, other->_cached_size_); | 3188 std::swap(_cached_size_, other->_cached_size_); |
| 3556 } | 3189 } |
| 3557 | 3190 |
| 3558 ::google::protobuf::Metadata Option::GetMetadata() const { | 3191 ::google::protobuf::Metadata Option::GetMetadata() const { |
| 3559 protobuf_AssignDescriptorsOnce(); | 3192 protobuf_AssignDescriptorsOnce(); |
| 3560 return file_level_metadata[4]; | 3193 ::google::protobuf::Metadata metadata; |
| 3194 metadata.descriptor = Option_descriptor_; |
| 3195 metadata.reflection = Option_reflection_; |
| 3196 return metadata; |
| 3561 } | 3197 } |
| 3562 | 3198 |
| 3563 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 3199 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3564 // Option | 3200 // Option |
| 3565 | 3201 |
| 3566 // string name = 1; | 3202 // optional string name = 1; |
| 3567 void Option::clear_name() { | 3203 void Option::clear_name() { |
| 3568 name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), GetArenaNoVirtual()); | 3204 name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
| 3569 } | 3205 } |
| 3570 const ::std::string& Option::name() const { | 3206 const ::std::string& Option::name() const { |
| 3571 // @@protoc_insertion_point(field_get:google.protobuf.Option.name) | 3207 // @@protoc_insertion_point(field_get:google.protobuf.Option.name) |
| 3572 return name_.Get(); | 3208 return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyIn
ited()); |
| 3573 } | 3209 } |
| 3574 void Option::set_name(const ::std::string& value) { | 3210 void Option::set_name(const ::std::string& value) { |
| 3575 | 3211 |
| 3576 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
GetArenaNoVirtual()); | 3212 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
value); |
| 3577 // @@protoc_insertion_point(field_set:google.protobuf.Option.name) | 3213 // @@protoc_insertion_point(field_set:google.protobuf.Option.name) |
| 3578 } | 3214 } |
| 3579 void Option::set_name(const char* value) { | 3215 void Option::set_name(const char* value) { |
| 3580 | 3216 |
| 3581 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string(value), | 3217 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(value)); |
| 3582 GetArenaNoVirtual()); | |
| 3583 // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name) | 3218 // @@protoc_insertion_point(field_set_char:google.protobuf.Option.name) |
| 3584 } | 3219 } |
| 3585 void Option::set_name(const char* value, | 3220 void Option::set_name(const char* value, size_t size) { |
| 3586 size_t size) { | |
| 3587 | 3221 |
| 3588 name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std:
:string( | 3222 name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3589 reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); | 3223 ::std::string(reinterpret_cast<const char*>(value), size)); |
| 3590 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name) | 3224 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Option.name) |
| 3591 } | 3225 } |
| 3592 ::std::string* Option::mutable_name() { | 3226 ::std::string* Option::mutable_name() { |
| 3593 | 3227 |
| 3594 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name) | 3228 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.name) |
| 3595 return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 3229 return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 3596 } | 3230 } |
| 3597 ::std::string* Option::release_name() { | 3231 ::std::string* Option::release_name() { |
| 3598 // @@protoc_insertion_point(field_release:google.protobuf.Option.name) | 3232 // @@protoc_insertion_point(field_release:google.protobuf.Option.name) |
| 3599 | 3233 |
| 3600 return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInite
d(), GetArenaNoVirtual()); | 3234 return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 3601 } | 3235 } |
| 3602 ::std::string* Option::unsafe_arena_release_name() { | 3236 void Option::set_allocated_name(::std::string* name) { |
| 3603 // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Option.
name) | |
| 3604 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 3605 | |
| 3606 return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringA
lreadyInited(), | |
| 3607 GetArenaNoVirtual()); | |
| 3608 } | |
| 3609 void Option::set_allocated_name(::std::string* name) { | |
| 3610 if (name != NULL) { | 3237 if (name != NULL) { |
| 3611 | 3238 |
| 3612 } else { | 3239 } else { |
| 3613 | 3240 |
| 3614 } | 3241 } |
| 3615 name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(
), name, | 3242 name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited(), name); |
| 3616 GetArenaNoVirtual()); | |
| 3617 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name) | 3243 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.name) |
| 3618 } | 3244 } |
| 3619 void Option::unsafe_arena_set_allocated_name( | |
| 3620 ::std::string* name) { | |
| 3621 GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); | |
| 3622 if (name != NULL) { | |
| 3623 | |
| 3624 } else { | |
| 3625 | |
| 3626 } | |
| 3627 name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlr
eadyInited(), | |
| 3628 name, GetArenaNoVirtual()); | |
| 3629 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.O
ption.name) | |
| 3630 } | |
| 3631 | 3245 |
| 3632 // .google.protobuf.Any value = 2; | 3246 // optional .google.protobuf.Any value = 2; |
| 3633 bool Option::has_value() const { | 3247 bool Option::has_value() const { |
| 3634 return this != internal_default_instance() && value_ != NULL; | 3248 return !_is_default_instance_ && value_ != NULL; |
| 3635 } | 3249 } |
| 3636 void Option::clear_value() { | 3250 void Option::clear_value() { |
| 3637 if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; | 3251 if (GetArenaNoVirtual() == NULL && value_ != NULL) delete value_; |
| 3638 value_ = NULL; | 3252 value_ = NULL; |
| 3639 } | 3253 } |
| 3640 const ::google::protobuf::Any& Option::value() const { | 3254 const ::google::protobuf::Any& Option::value() const { |
| 3641 // @@protoc_insertion_point(field_get:google.protobuf.Option.value) | 3255 // @@protoc_insertion_point(field_get:google.protobuf.Option.value) |
| 3642 return value_ != NULL ? *value_ | 3256 return value_ != NULL ? *value_ : *default_instance_->value_; |
| 3643 : *::google::protobuf::Any::internal_default_instance()
; | |
| 3644 } | 3257 } |
| 3645 ::google::protobuf::Any* Option::mutable_value() { | 3258 ::google::protobuf::Any* Option::mutable_value() { |
| 3646 | 3259 |
| 3647 if (value_ == NULL) { | 3260 if (value_ == NULL) { |
| 3648 _slow_mutable_value(); | 3261 value_ = new ::google::protobuf::Any; |
| 3649 } | 3262 } |
| 3650 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) | 3263 // @@protoc_insertion_point(field_mutable:google.protobuf.Option.value) |
| 3651 return value_; | 3264 return value_; |
| 3652 } | 3265 } |
| 3653 ::google::protobuf::Any* Option::release_value() { | 3266 ::google::protobuf::Any* Option::release_value() { |
| 3654 // @@protoc_insertion_point(field_release:google.protobuf.Option.value) | 3267 // @@protoc_insertion_point(field_release:google.protobuf.Option.value) |
| 3655 | 3268 |
| 3656 if (GetArenaNoVirtual() != NULL) { | 3269 ::google::protobuf::Any* temp = value_; |
| 3657 return _slow_release_value(); | 3270 value_ = NULL; |
| 3658 } else { | 3271 return temp; |
| 3659 ::google::protobuf::Any* temp = value_; | |
| 3660 value_ = NULL; | |
| 3661 return temp; | |
| 3662 } | |
| 3663 } | 3272 } |
| 3664 void Option::set_allocated_value(::google::protobuf::Any* value) { | 3273 void Option::set_allocated_value(::google::protobuf::Any* value) { |
| 3665 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); | 3274 delete value_; |
| 3666 if (message_arena == NULL) { | |
| 3667 delete value_; | |
| 3668 } | |
| 3669 if (value != NULL) { | |
| 3670 if (message_arena != NULL) { | |
| 3671 message_arena->Own(value); | |
| 3672 } | |
| 3673 } | |
| 3674 value_ = value; | 3275 value_ = value; |
| 3675 if (value) { | 3276 if (value) { |
| 3676 | 3277 |
| 3677 } else { | 3278 } else { |
| 3678 | 3279 |
| 3679 } | 3280 } |
| 3680 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value) | 3281 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Option.value) |
| 3681 } | 3282 } |
| 3682 | 3283 |
| 3683 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 3284 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3684 | 3285 |
| 3685 // @@protoc_insertion_point(namespace_scope) | 3286 // @@protoc_insertion_point(namespace_scope) |
| 3686 | 3287 |
| 3687 } // namespace protobuf | 3288 } // namespace protobuf |
| 3688 } // namespace google | 3289 } // namespace google |
| 3689 | 3290 |
| 3690 // @@protoc_insertion_point(global_scope) | 3291 // @@protoc_insertion_point(global_scope) |
| OLD | NEW |