temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2 | // source: google/protobuf/descriptor.proto |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4 | #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5 | #include "google/protobuf/descriptor.pb.h" |
kenton@google.com | c65c041 | 2010-02-01 20:35:34 +0000 | [diff] [blame] | 6 | |
| 7 | #include <algorithm> |
| 8 | |
pliard@google.com | 75575df | 2012-10-02 00:15:46 +0000 | [diff] [blame] | 9 | #include <google/protobuf/stubs/common.h> |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10 | #include <google/protobuf/stubs/once.h> |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11 | #include <google/protobuf/io/coded_stream.h> |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12 | #include <google/protobuf/wire_format_lite_inl.h> |
| 13 | #include <google/protobuf/descriptor.h> |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 14 | #include <google/protobuf/generated_message_reflection.h> |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 15 | #include <google/protobuf/reflection_ops.h> |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 16 | #include <google/protobuf/wire_format.h> |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 17 | // @@protoc_insertion_point(includes) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 18 | |
| 19 | namespace google { |
| 20 | namespace protobuf { |
| 21 | |
| 22 | namespace { |
| 23 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 24 | const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL; |
| 25 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 26 | FileDescriptorSet_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 27 | const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 28 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 29 | FileDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 30 | const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 31 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 32 | DescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 33 | const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 34 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 35 | DescriptorProto_ExtensionRange_reflection_ = NULL; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 36 | const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange_descriptor_ = NULL; |
| 37 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 38 | DescriptorProto_ReservedRange_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 39 | const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 40 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 41 | FieldDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 42 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL; |
| 43 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 44 | const ::google::protobuf::Descriptor* OneofDescriptorProto_descriptor_ = NULL; |
| 45 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 46 | OneofDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 47 | const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 48 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 49 | EnumDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 50 | const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 51 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 52 | EnumValueDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 53 | const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 54 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 55 | ServiceDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 56 | const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 57 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 58 | MethodDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 59 | const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 60 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 61 | FileOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 62 | const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL; |
| 63 | const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 64 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 65 | MessageOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 66 | const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 67 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 68 | FieldOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 69 | const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 70 | const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 71 | const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 72 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 73 | EnumOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 74 | const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 75 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 76 | EnumValueOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 77 | const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 78 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 79 | ServiceOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 80 | const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 81 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 82 | MethodOptions_reflection_ = NULL; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 83 | const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL; |
| 84 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 85 | UninterpretedOption_reflection_ = NULL; |
| 86 | const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL; |
| 87 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 88 | UninterpretedOption_NamePart_reflection_ = NULL; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 89 | const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL; |
| 90 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 91 | SourceCodeInfo_reflection_ = NULL; |
| 92 | const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL; |
| 93 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 94 | SourceCodeInfo_Location_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 95 | |
| 96 | } // namespace |
| 97 | |
| 98 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 99 | void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
| 100 | protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 101 | const ::google::protobuf::FileDescriptor* file = |
| 102 | ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| 103 | "google/protobuf/descriptor.proto"); |
| 104 | GOOGLE_CHECK(file != NULL); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 105 | FileDescriptorSet_descriptor_ = file->message_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 106 | static const int FileDescriptorSet_offsets_[1] = { |
| 107 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_), |
| 108 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 109 | FileDescriptorSet_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 110 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 111 | FileDescriptorSet_descriptor_, |
| 112 | FileDescriptorSet::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 113 | FileDescriptorSet_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 114 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 115 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 116 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 117 | sizeof(FileDescriptorSet), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 118 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _internal_metadata_), |
| 119 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 120 | FileDescriptorProto_descriptor_ = file->message_type(1); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 121 | static const int FileDescriptorProto_offsets_[12] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 122 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_), |
| 123 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_), |
| 124 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 125 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, public_dependency_), |
| 126 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, weak_dependency_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 127 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_), |
| 128 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_), |
| 129 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_), |
| 130 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_), |
| 131 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 132 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 133 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, syntax_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 134 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 135 | FileDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 136 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 137 | FileDescriptorProto_descriptor_, |
| 138 | FileDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 139 | FileDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 140 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 141 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 142 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 143 | sizeof(FileDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 144 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _internal_metadata_), |
| 145 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 146 | DescriptorProto_descriptor_ = file->message_type(2); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 147 | static const int DescriptorProto_offsets_[10] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 148 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_), |
| 149 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_), |
| 150 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_), |
| 151 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_), |
| 152 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_), |
| 153 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 154 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, oneof_decl_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 155 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_), |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 156 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_range_), |
| 157 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_name_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 158 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 159 | DescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 160 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 161 | DescriptorProto_descriptor_, |
| 162 | DescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 163 | DescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 164 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 165 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 166 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 167 | sizeof(DescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 168 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _internal_metadata_), |
| 169 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 170 | DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 171 | static const int DescriptorProto_ExtensionRange_offsets_[2] = { |
| 172 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_), |
| 173 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_), |
| 174 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 175 | DescriptorProto_ExtensionRange_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 176 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 177 | DescriptorProto_ExtensionRange_descriptor_, |
| 178 | DescriptorProto_ExtensionRange::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 179 | DescriptorProto_ExtensionRange_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 180 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 181 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 182 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 183 | sizeof(DescriptorProto_ExtensionRange), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 184 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _internal_metadata_), |
| 185 | -1); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 186 | DescriptorProto_ReservedRange_descriptor_ = DescriptorProto_descriptor_->nested_type(1); |
| 187 | static const int DescriptorProto_ReservedRange_offsets_[2] = { |
| 188 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, start_), |
| 189 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, end_), |
| 190 | }; |
| 191 | DescriptorProto_ReservedRange_reflection_ = |
| 192 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| 193 | DescriptorProto_ReservedRange_descriptor_, |
| 194 | DescriptorProto_ReservedRange::default_instance_, |
| 195 | DescriptorProto_ReservedRange_offsets_, |
| 196 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _has_bits_[0]), |
| 197 | -1, |
| 198 | -1, |
| 199 | sizeof(DescriptorProto_ReservedRange), |
| 200 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _internal_metadata_), |
| 201 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 202 | FieldDescriptorProto_descriptor_ = file->message_type(3); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 203 | static const int FieldDescriptorProto_offsets_[9] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 204 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_), |
| 205 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_), |
| 206 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_), |
| 207 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_), |
| 208 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_), |
| 209 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_), |
| 210 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 211 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, oneof_index_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 212 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_), |
| 213 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 214 | FieldDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 215 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 216 | FieldDescriptorProto_descriptor_, |
| 217 | FieldDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 218 | FieldDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 219 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 220 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 221 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 222 | sizeof(FieldDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 223 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _internal_metadata_), |
| 224 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 225 | FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0); |
| 226 | FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 227 | OneofDescriptorProto_descriptor_ = file->message_type(4); |
| 228 | static const int OneofDescriptorProto_offsets_[1] = { |
| 229 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, name_), |
| 230 | }; |
| 231 | OneofDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 232 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 233 | OneofDescriptorProto_descriptor_, |
| 234 | OneofDescriptorProto::default_instance_, |
| 235 | OneofDescriptorProto_offsets_, |
| 236 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 237 | -1, |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 238 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 239 | sizeof(OneofDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 240 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _internal_metadata_), |
| 241 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 242 | EnumDescriptorProto_descriptor_ = file->message_type(5); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 243 | static const int EnumDescriptorProto_offsets_[3] = { |
| 244 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_), |
| 245 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_), |
| 246 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_), |
| 247 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 248 | EnumDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 249 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 250 | EnumDescriptorProto_descriptor_, |
| 251 | EnumDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 252 | EnumDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 253 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 254 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 255 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 256 | sizeof(EnumDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 257 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _internal_metadata_), |
| 258 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 259 | EnumValueDescriptorProto_descriptor_ = file->message_type(6); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 260 | static const int EnumValueDescriptorProto_offsets_[3] = { |
| 261 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_), |
| 262 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_), |
| 263 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_), |
| 264 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 265 | EnumValueDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 266 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 267 | EnumValueDescriptorProto_descriptor_, |
| 268 | EnumValueDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 269 | EnumValueDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 270 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 271 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 272 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 273 | sizeof(EnumValueDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 274 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _internal_metadata_), |
| 275 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 276 | ServiceDescriptorProto_descriptor_ = file->message_type(7); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 277 | static const int ServiceDescriptorProto_offsets_[3] = { |
| 278 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_), |
| 279 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_), |
| 280 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_), |
| 281 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 282 | ServiceDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 283 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 284 | ServiceDescriptorProto_descriptor_, |
| 285 | ServiceDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 286 | ServiceDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 287 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 288 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 289 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 290 | sizeof(ServiceDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 291 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _internal_metadata_), |
| 292 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 293 | MethodDescriptorProto_descriptor_ = file->message_type(8); |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 294 | static const int MethodDescriptorProto_offsets_[6] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 295 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_), |
| 296 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_), |
| 297 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_), |
| 298 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_), |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 299 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, client_streaming_), |
| 300 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, server_streaming_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 301 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 302 | MethodDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 303 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 304 | MethodDescriptorProto_descriptor_, |
| 305 | MethodDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 306 | MethodDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 307 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 308 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 309 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 310 | sizeof(MethodDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 311 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_), |
| 312 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 313 | FileOptions_descriptor_ = file->message_type(9); |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 314 | static const int FileOptions_offsets_[16] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 315 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), |
| 316 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), |
| 317 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 318 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generate_equals_and_hash_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 319 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_string_check_utf8_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 320 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 321 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, go_package_), |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 322 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_), |
| 323 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_), |
| 324 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 325 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, deprecated_), |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 326 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_enable_arenas_), |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 327 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, objc_class_prefix_), |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 328 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, csharp_namespace_), |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 329 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, javanano_use_deprecated_package_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 330 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_), |
| 331 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 332 | FileOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 333 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 334 | FileOptions_descriptor_, |
| 335 | FileOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 336 | FileOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 337 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 338 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 339 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 340 | sizeof(FileOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 341 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _internal_metadata_), |
| 342 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 343 | FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 344 | MessageOptions_descriptor_ = file->message_type(10); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 345 | static const int MessageOptions_offsets_[5] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 346 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_), |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 347 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 348 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, deprecated_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 349 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, map_entry_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 350 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_), |
| 351 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 352 | MessageOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 353 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 354 | MessageOptions_descriptor_, |
| 355 | MessageOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 356 | MessageOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 357 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 358 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 359 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 360 | sizeof(MessageOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 361 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _internal_metadata_), |
| 362 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 363 | FieldOptions_descriptor_ = file->message_type(11); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 364 | static const int FieldOptions_offsets_[7] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 365 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_), |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 366 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_), |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 367 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, jstype_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 368 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, lazy_), |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 369 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 370 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, weak_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 371 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_), |
| 372 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 373 | FieldOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 374 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 375 | FieldOptions_descriptor_, |
| 376 | FieldOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 377 | FieldOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 378 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 379 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 380 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 381 | sizeof(FieldOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 382 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _internal_metadata_), |
| 383 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 384 | FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 385 | FieldOptions_JSType_descriptor_ = FieldOptions_descriptor_->enum_type(1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 386 | EnumOptions_descriptor_ = file->message_type(12); |
| 387 | static const int EnumOptions_offsets_[3] = { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 388 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, allow_alias_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 389 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 390 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_), |
| 391 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 392 | EnumOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 393 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 394 | EnumOptions_descriptor_, |
| 395 | EnumOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 396 | EnumOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 397 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 398 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 399 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 400 | sizeof(EnumOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 401 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _internal_metadata_), |
| 402 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 403 | EnumValueOptions_descriptor_ = file->message_type(13); |
| 404 | static const int EnumValueOptions_offsets_[2] = { |
| 405 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 406 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_), |
| 407 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 408 | EnumValueOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 409 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 410 | EnumValueOptions_descriptor_, |
| 411 | EnumValueOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 412 | EnumValueOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 413 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 414 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 415 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 416 | sizeof(EnumValueOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 417 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _internal_metadata_), |
| 418 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 419 | ServiceOptions_descriptor_ = file->message_type(14); |
| 420 | static const int ServiceOptions_offsets_[2] = { |
| 421 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 422 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_), |
| 423 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 424 | ServiceOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 425 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 426 | ServiceOptions_descriptor_, |
| 427 | ServiceOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 428 | ServiceOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 429 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 430 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 431 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 432 | sizeof(ServiceOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 433 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _internal_metadata_), |
| 434 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 435 | MethodOptions_descriptor_ = file->message_type(15); |
| 436 | static const int MethodOptions_offsets_[2] = { |
| 437 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 438 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_), |
| 439 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 440 | MethodOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 441 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 442 | MethodOptions_descriptor_, |
| 443 | MethodOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 444 | MethodOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 445 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 446 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 447 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 448 | sizeof(MethodOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 449 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _internal_metadata_), |
| 450 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 451 | UninterpretedOption_descriptor_ = file->message_type(16); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 452 | static const int UninterpretedOption_offsets_[7] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 453 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_), |
| 454 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_), |
| 455 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_), |
| 456 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_), |
| 457 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_), |
| 458 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 459 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 460 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 461 | UninterpretedOption_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 462 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 463 | UninterpretedOption_descriptor_, |
| 464 | UninterpretedOption::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 465 | UninterpretedOption_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 466 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 467 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 468 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 469 | sizeof(UninterpretedOption), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 470 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _internal_metadata_), |
| 471 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 472 | UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 473 | static const int UninterpretedOption_NamePart_offsets_[2] = { |
| 474 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_), |
| 475 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_), |
| 476 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 477 | UninterpretedOption_NamePart_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 478 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 479 | UninterpretedOption_NamePart_descriptor_, |
| 480 | UninterpretedOption_NamePart::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 481 | UninterpretedOption_NamePart_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 482 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 483 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 484 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 485 | sizeof(UninterpretedOption_NamePart), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 486 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _internal_metadata_), |
| 487 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 488 | SourceCodeInfo_descriptor_ = file->message_type(17); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 489 | static const int SourceCodeInfo_offsets_[1] = { |
| 490 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_), |
| 491 | }; |
| 492 | SourceCodeInfo_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 493 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 494 | SourceCodeInfo_descriptor_, |
| 495 | SourceCodeInfo::default_instance_, |
| 496 | SourceCodeInfo_offsets_, |
| 497 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 498 | -1, |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 499 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 500 | sizeof(SourceCodeInfo), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 501 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _internal_metadata_), |
| 502 | -1); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 503 | SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 504 | static const int SourceCodeInfo_Location_offsets_[5] = { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 505 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_), |
| 506 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 507 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_comments_), |
| 508 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, trailing_comments_), |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 509 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_detached_comments_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 510 | }; |
| 511 | SourceCodeInfo_Location_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 512 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 513 | SourceCodeInfo_Location_descriptor_, |
| 514 | SourceCodeInfo_Location::default_instance_, |
| 515 | SourceCodeInfo_Location_offsets_, |
| 516 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 517 | -1, |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 518 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 519 | sizeof(SourceCodeInfo_Location), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 520 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _internal_metadata_), |
| 521 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 522 | } |
| 523 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 524 | namespace { |
| 525 | |
| 526 | GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| 527 | inline void protobuf_AssignDescriptorsOnce() { |
| 528 | ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| 529 | &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto); |
| 530 | } |
| 531 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 532 | void protobuf_RegisterTypes(const ::std::string&) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 533 | protobuf_AssignDescriptorsOnce(); |
| 534 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 535 | FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 536 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 537 | FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 538 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 539 | DescriptorProto_descriptor_, &DescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 540 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 541 | DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 542 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 543 | DescriptorProto_ReservedRange_descriptor_, &DescriptorProto_ReservedRange::default_instance()); |
| 544 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 545 | FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 546 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 547 | OneofDescriptorProto_descriptor_, &OneofDescriptorProto::default_instance()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 548 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 549 | EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 550 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 551 | EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 552 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 553 | ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 554 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 555 | MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 556 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 557 | FileOptions_descriptor_, &FileOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 558 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 559 | MessageOptions_descriptor_, &MessageOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 560 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 561 | FieldOptions_descriptor_, &FieldOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 562 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 563 | EnumOptions_descriptor_, &EnumOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 564 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 565 | EnumValueOptions_descriptor_, &EnumValueOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 566 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 567 | ServiceOptions_descriptor_, &ServiceOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 568 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 569 | MethodOptions_descriptor_, &MethodOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 570 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 571 | UninterpretedOption_descriptor_, &UninterpretedOption::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 572 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 573 | UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 574 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 575 | SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 576 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 577 | SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 578 | } |
| 579 | |
| 580 | } // namespace |
| 581 | |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 582 | void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() { |
| 583 | delete FileDescriptorSet::default_instance_; |
| 584 | delete FileDescriptorSet_reflection_; |
| 585 | delete FileDescriptorProto::default_instance_; |
| 586 | delete FileDescriptorProto_reflection_; |
| 587 | delete DescriptorProto::default_instance_; |
| 588 | delete DescriptorProto_reflection_; |
| 589 | delete DescriptorProto_ExtensionRange::default_instance_; |
| 590 | delete DescriptorProto_ExtensionRange_reflection_; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 591 | delete DescriptorProto_ReservedRange::default_instance_; |
| 592 | delete DescriptorProto_ReservedRange_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 593 | delete FieldDescriptorProto::default_instance_; |
| 594 | delete FieldDescriptorProto_reflection_; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 595 | delete OneofDescriptorProto::default_instance_; |
| 596 | delete OneofDescriptorProto_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 597 | delete EnumDescriptorProto::default_instance_; |
| 598 | delete EnumDescriptorProto_reflection_; |
| 599 | delete EnumValueDescriptorProto::default_instance_; |
| 600 | delete EnumValueDescriptorProto_reflection_; |
| 601 | delete ServiceDescriptorProto::default_instance_; |
| 602 | delete ServiceDescriptorProto_reflection_; |
| 603 | delete MethodDescriptorProto::default_instance_; |
| 604 | delete MethodDescriptorProto_reflection_; |
| 605 | delete FileOptions::default_instance_; |
| 606 | delete FileOptions_reflection_; |
| 607 | delete MessageOptions::default_instance_; |
| 608 | delete MessageOptions_reflection_; |
| 609 | delete FieldOptions::default_instance_; |
| 610 | delete FieldOptions_reflection_; |
| 611 | delete EnumOptions::default_instance_; |
| 612 | delete EnumOptions_reflection_; |
| 613 | delete EnumValueOptions::default_instance_; |
| 614 | delete EnumValueOptions_reflection_; |
| 615 | delete ServiceOptions::default_instance_; |
| 616 | delete ServiceOptions_reflection_; |
| 617 | delete MethodOptions::default_instance_; |
| 618 | delete MethodOptions_reflection_; |
| 619 | delete UninterpretedOption::default_instance_; |
| 620 | delete UninterpretedOption_reflection_; |
| 621 | delete UninterpretedOption_NamePart::default_instance_; |
| 622 | delete UninterpretedOption_NamePart_reflection_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 623 | delete SourceCodeInfo::default_instance_; |
| 624 | delete SourceCodeInfo_reflection_; |
| 625 | delete SourceCodeInfo_Location::default_instance_; |
| 626 | delete SourceCodeInfo_Location_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 627 | } |
| 628 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 629 | void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 630 | static bool already_here = false; |
| 631 | if (already_here) return; |
| 632 | already_here = true; |
| 633 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 634 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 635 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 636 | "\n google/protobuf/descriptor.proto\022\017goog" |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 637 | "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file" |
| 638 | "\030\001 \003(\0132$.google.protobuf.FileDescriptorP" |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 639 | "roto\"\333\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001" |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 640 | "(\t\022\017\n\007package\030\002 \001(\t\022\022\n\ndependency\030\003 \003(\t\022" |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 641 | "\031\n\021public_dependency\030\n \003(\005\022\027\n\017weak_depen" |
| 642 | "dency\030\013 \003(\005\0226\n\014message_type\030\004 \003(\0132 .goog" |
| 643 | "le.protobuf.DescriptorProto\0227\n\tenum_type" |
| 644 | "\030\005 \003(\0132$.google.protobuf.EnumDescriptorP" |
| 645 | "roto\0228\n\007service\030\006 \003(\0132\'.google.protobuf." |
| 646 | "ServiceDescriptorProto\0228\n\textension\030\007 \003(" |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 647 | "\0132%.google.protobuf.FieldDescriptorProto" |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 648 | "\022-\n\007options\030\010 \001(\0132\034.google.protobuf.File" |
| 649 | "Options\0229\n\020source_code_info\030\t \001(\0132\037.goog" |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 650 | "le.protobuf.SourceCodeInfo\022\016\n\006syntax\030\014 \001" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 651 | "(\t\"\360\004\n\017DescriptorProto\022\014\n\004name\030\001 \001(\t\0224\n\005" |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 652 | "field\030\002 \003(\0132%.google.protobuf.FieldDescr" |
| 653 | "iptorProto\0228\n\textension\030\006 \003(\0132%.google.p" |
| 654 | "rotobuf.FieldDescriptorProto\0225\n\013nested_t" |
| 655 | "ype\030\003 \003(\0132 .google.protobuf.DescriptorPr" |
| 656 | "oto\0227\n\tenum_type\030\004 \003(\0132$.google.protobuf" |
| 657 | ".EnumDescriptorProto\022H\n\017extension_range\030" |
| 658 | "\005 \003(\0132/.google.protobuf.DescriptorProto." |
| 659 | "ExtensionRange\0229\n\noneof_decl\030\010 \003(\0132%.goo" |
| 660 | "gle.protobuf.OneofDescriptorProto\0220\n\007opt" |
| 661 | "ions\030\007 \001(\0132\037.google.protobuf.MessageOpti" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 662 | "ons\022F\n\016reserved_range\030\t \003(\0132..google.pro" |
| 663 | "tobuf.DescriptorProto.ReservedRange\022\025\n\rr" |
| 664 | "eserved_name\030\n \003(\t\032,\n\016ExtensionRange\022\r\n\005" |
| 665 | "start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\032+\n\rReservedRang" |
| 666 | "e\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"\251\005\n\024FieldD" |
| 667 | "escriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003" |
| 668 | " \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf.Fi" |
| 669 | "eldDescriptorProto.Label\0228\n\004type\030\005 \001(\0162*" |
| 670 | ".google.protobuf.FieldDescriptorProto.Ty" |
| 671 | "pe\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022" |
| 672 | "\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030\t " |
| 673 | "\001(\005\022.\n\007options\030\010 \001(\0132\035.google.protobuf.F" |
| 674 | "ieldOptions\"\266\002\n\004Type\022\017\n\013TYPE_DOUBLE\020\001\022\016\n" |
| 675 | "\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UI" |
| 676 | "NT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006" |
| 677 | "\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYP" |
| 678 | "E_STRING\020\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSA" |
| 679 | "GE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n" |
| 680 | "\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_" |
| 681 | "SFIXED64\020\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT" |
| 682 | "64\020\022\"C\n\005Label\022\022\n\016LABEL_OPTIONAL\020\001\022\022\n\016LAB" |
| 683 | "EL_REQUIRED\020\002\022\022\n\016LABEL_REPEATED\020\003\"$\n\024One" |
| 684 | "ofDescriptorProto\022\014\n\004name\030\001 \001(\t\"\214\001\n\023Enum" |
| 685 | "DescriptorProto\022\014\n\004name\030\001 \001(\t\0228\n\005value\030\002" |
| 686 | " \003(\0132).google.protobuf.EnumValueDescript" |
| 687 | "orProto\022-\n\007options\030\003 \001(\0132\034.google.protob" |
| 688 | "uf.EnumOptions\"l\n\030EnumValueDescriptorPro" |
| 689 | "to\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\0222\n\007opti" |
| 690 | "ons\030\003 \001(\0132!.google.protobuf.EnumValueOpt" |
| 691 | "ions\"\220\001\n\026ServiceDescriptorProto\022\014\n\004name\030" |
| 692 | "\001 \001(\t\0226\n\006method\030\002 \003(\0132&.google.protobuf." |
| 693 | "MethodDescriptorProto\0220\n\007options\030\003 \001(\0132\037" |
| 694 | ".google.protobuf.ServiceOptions\"\301\001\n\025Meth" |
| 695 | "odDescriptorProto\022\014\n\004name\030\001 \001(\t\022\022\n\ninput" |
| 696 | "_type\030\002 \001(\t\022\023\n\013output_type\030\003 \001(\t\022/\n\007opti" |
| 697 | "ons\030\004 \001(\0132\036.google.protobuf.MethodOption" |
| 698 | "s\022\037\n\020client_streaming\030\005 \001(\010:\005false\022\037\n\020se" |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 699 | "rver_streaming\030\006 \001(\010:\005false\"\252\005\n\013FileOpti" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 700 | "ons\022\024\n\014java_package\030\001 \001(\t\022\034\n\024java_outer_" |
| 701 | "classname\030\010 \001(\t\022\"\n\023java_multiple_files\030\n" |
| 702 | " \001(\010:\005false\022,\n\035java_generate_equals_and_" |
| 703 | "hash\030\024 \001(\010:\005false\022%\n\026java_string_check_u" |
| 704 | "tf8\030\033 \001(\010:\005false\022F\n\014optimize_for\030\t \001(\0162)" |
| 705 | ".google.protobuf.FileOptions.OptimizeMod" |
| 706 | "e:\005SPEED\022\022\n\ngo_package\030\013 \001(\t\022\"\n\023cc_gener" |
| 707 | "ic_services\030\020 \001(\010:\005false\022$\n\025java_generic" |
| 708 | "_services\030\021 \001(\010:\005false\022\"\n\023py_generic_ser" |
| 709 | "vices\030\022 \001(\010:\005false\022\031\n\ndeprecated\030\027 \001(\010:\005" |
| 710 | "false\022\037\n\020cc_enable_arenas\030\037 \001(\010:\005false\022\031" |
| 711 | "\n\021objc_class_prefix\030$ \001(\t\022\030\n\020csharp_name" |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 712 | "space\030% \001(\t\022\'\n\037javanano_use_deprecated_p" |
| 713 | "ackage\030& \001(\010\022C\n\024uninterpreted_option\030\347\007 " |
| 714 | "\003(\0132$.google.protobuf.UninterpretedOptio" |
| 715 | "n\":\n\014OptimizeMode\022\t\n\005SPEED\020\001\022\r\n\tCODE_SIZ" |
| 716 | "E\020\002\022\020\n\014LITE_RUNTIME\020\003*\t\010\350\007\020\200\200\200\200\002\"\346\001\n\016Mes" |
| 717 | "sageOptions\022&\n\027message_set_wire_format\030\001" |
| 718 | " \001(\010:\005false\022.\n\037no_standard_descriptor_ac" |
| 719 | "cessor\030\002 \001(\010:\005false\022\031\n\ndeprecated\030\003 \001(\010:" |
| 720 | "\005false\022\021\n\tmap_entry\030\007 \001(\010\022C\n\024uninterpret" |
| 721 | "ed_option\030\347\007 \003(\0132$.google.protobuf.Unint" |
| 722 | "erpretedOption*\t\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptio" |
| 723 | "ns\022:\n\005ctype\030\001 \001(\0162#.google.protobuf.Fiel" |
| 724 | "dOptions.CType:\006STRING\022\016\n\006packed\030\002 \001(\010\022\?" |
| 725 | "\n\006jstype\030\006 \001(\0162$.google.protobuf.FieldOp" |
| 726 | "tions.JSType:\tJS_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005f" |
| 727 | "alse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\023\n\004weak\030" |
| 728 | "\n \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 " |
| 729 | "\003(\0132$.google.protobuf.UninterpretedOptio" |
| 730 | "n\"/\n\005CType\022\n\n\006STRING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRI" |
| 731 | "NG_PIECE\020\002\"5\n\006JSType\022\r\n\tJS_NORMAL\020\000\022\r\n\tJ" |
| 732 | "S_STRING\020\001\022\r\n\tJS_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n" |
| 733 | "\013EnumOptions\022\023\n\013allow_alias\030\002 \001(\010\022\031\n\ndep" |
| 734 | "recated\030\003 \001(\010:\005false\022C\n\024uninterpreted_op" |
| 735 | "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre" |
| 736 | "tedOption*\t\010\350\007\020\200\200\200\200\002\"}\n\020EnumValueOptions" |
| 737 | "\022\031\n\ndeprecated\030\001 \001(\010:\005false\022C\n\024uninterpr" |
| 738 | "eted_option\030\347\007 \003(\0132$.google.protobuf.Uni" |
| 739 | "nterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOp" |
| 740 | "tions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024unin" |
| 741 | "terpreted_option\030\347\007 \003(\0132$.google.protobu" |
| 742 | "f.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMeth" |
| 743 | "odOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C\n\024" |
| 744 | "uninterpreted_option\030\347\007 \003(\0132$.google.pro" |
| 745 | "tobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n" |
| 746 | "\023UninterpretedOption\022;\n\004name\030\002 \003(\0132-.goo" |
| 747 | "gle.protobuf.UninterpretedOption.NamePar" |
| 748 | "t\022\030\n\020identifier_value\030\003 \001(\t\022\032\n\022positive_" |
| 749 | "int_value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 " |
| 750 | "\001(\003\022\024\n\014double_value\030\006 \001(\001\022\024\n\014string_valu" |
| 751 | "e\030\007 \001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010Name" |
| 752 | "Part\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030" |
| 753 | "\002 \002(\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003" |
| 754 | "(\0132(.google.protobuf.SourceCodeInfo.Loca" |
| 755 | "tion\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004s" |
| 756 | "pan\030\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022" |
| 757 | "\031\n\021trailing_comments\030\004 \001(\t\022!\n\031leading_de" |
Xiao Hang | 9fd0f15 | 2015-08-04 15:07:44 -0700 | [diff] [blame] | 758 | "tached_comments\030\006 \003(\tB[\n\023com.google.prot" |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 759 | "obufB\020DescriptorProtosH\001Z\ndescriptor\242\002\003G" |
Xiao Hang | 9fd0f15 | 2015-08-04 15:07:44 -0700 | [diff] [blame] | 760 | "PB\252\002\032Google.Protobuf.Reflection\260\002\001", 4994); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 761 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 762 | "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); |
| 763 | FileDescriptorSet::default_instance_ = new FileDescriptorSet(); |
| 764 | FileDescriptorProto::default_instance_ = new FileDescriptorProto(); |
| 765 | DescriptorProto::default_instance_ = new DescriptorProto(); |
| 766 | DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 767 | DescriptorProto_ReservedRange::default_instance_ = new DescriptorProto_ReservedRange(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 768 | FieldDescriptorProto::default_instance_ = new FieldDescriptorProto(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 769 | OneofDescriptorProto::default_instance_ = new OneofDescriptorProto(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 770 | EnumDescriptorProto::default_instance_ = new EnumDescriptorProto(); |
| 771 | EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto(); |
| 772 | ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto(); |
| 773 | MethodDescriptorProto::default_instance_ = new MethodDescriptorProto(); |
| 774 | FileOptions::default_instance_ = new FileOptions(); |
| 775 | MessageOptions::default_instance_ = new MessageOptions(); |
| 776 | FieldOptions::default_instance_ = new FieldOptions(); |
| 777 | EnumOptions::default_instance_ = new EnumOptions(); |
| 778 | EnumValueOptions::default_instance_ = new EnumValueOptions(); |
| 779 | ServiceOptions::default_instance_ = new ServiceOptions(); |
| 780 | MethodOptions::default_instance_ = new MethodOptions(); |
| 781 | UninterpretedOption::default_instance_ = new UninterpretedOption(); |
| 782 | UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 783 | SourceCodeInfo::default_instance_ = new SourceCodeInfo(); |
| 784 | SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 785 | FileDescriptorSet::default_instance_->InitAsDefaultInstance(); |
| 786 | FileDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 787 | DescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 788 | DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 789 | DescriptorProto_ReservedRange::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 790 | FieldDescriptorProto::default_instance_->InitAsDefaultInstance(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 791 | OneofDescriptorProto::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 792 | EnumDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 793 | EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 794 | ServiceDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 795 | MethodDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 796 | FileOptions::default_instance_->InitAsDefaultInstance(); |
| 797 | MessageOptions::default_instance_->InitAsDefaultInstance(); |
| 798 | FieldOptions::default_instance_->InitAsDefaultInstance(); |
| 799 | EnumOptions::default_instance_->InitAsDefaultInstance(); |
| 800 | EnumValueOptions::default_instance_->InitAsDefaultInstance(); |
| 801 | ServiceOptions::default_instance_->InitAsDefaultInstance(); |
| 802 | MethodOptions::default_instance_->InitAsDefaultInstance(); |
| 803 | UninterpretedOption::default_instance_->InitAsDefaultInstance(); |
| 804 | UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 805 | SourceCodeInfo::default_instance_->InitAsDefaultInstance(); |
| 806 | SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 807 | ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 808 | } |
| 809 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 810 | // Force AddDescriptors() to be called at static initialization time. |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 811 | struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto { |
| 812 | StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 813 | protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 814 | } |
| 815 | } static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_; |
| 816 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 817 | namespace { |
| 818 | |
| 819 | static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; |
| 820 | static void MergeFromFail(int line) { |
| 821 | GOOGLE_CHECK(false) << __FILE__ << ":" << line; |
| 822 | } |
| 823 | |
| 824 | } // namespace |
| 825 | |
| 826 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 827 | // =================================================================== |
| 828 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 829 | #ifndef _MSC_VER |
| 830 | const int FileDescriptorSet::kFileFieldNumber; |
| 831 | #endif // !_MSC_VER |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 832 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 833 | FileDescriptorSet::FileDescriptorSet() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 834 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 835 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 836 | // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 837 | } |
| 838 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 839 | void FileDescriptorSet::InitAsDefaultInstance() { |
| 840 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 841 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 842 | FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 843 | : ::google::protobuf::Message(), |
| 844 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 845 | SharedCtor(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 846 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 847 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 848 | } |
| 849 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 850 | void FileDescriptorSet::SharedCtor() { |
| 851 | _cached_size_ = 0; |
| 852 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 853 | } |
| 854 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 855 | FileDescriptorSet::~FileDescriptorSet() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 856 | // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 857 | SharedDtor(); |
| 858 | } |
| 859 | |
| 860 | void FileDescriptorSet::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 861 | if (this != default_instance_) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 862 | } |
| 863 | } |
| 864 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 865 | void FileDescriptorSet::SetCachedSize(int size) const { |
| 866 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 867 | _cached_size_ = size; |
| 868 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 869 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 870 | const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 871 | protobuf_AssignDescriptorsOnce(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 872 | return FileDescriptorSet_descriptor_; |
| 873 | } |
| 874 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 875 | const FileDescriptorSet& FileDescriptorSet::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 876 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 877 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 878 | } |
| 879 | |
| 880 | FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL; |
| 881 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 882 | FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 883 | FileDescriptorSet* n = new FileDescriptorSet; |
| 884 | if (arena != NULL) { |
| 885 | arena->Own(n); |
| 886 | } |
| 887 | return n; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 888 | } |
| 889 | |
| 890 | void FileDescriptorSet::Clear() { |
| 891 | file_.Clear(); |
| 892 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 893 | if (_internal_metadata_.have_unknown_fields()) { |
| 894 | mutable_unknown_fields()->Clear(); |
| 895 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 896 | } |
| 897 | |
| 898 | bool FileDescriptorSet::MergePartialFromCodedStream( |
| 899 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 900 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 901 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 902 | // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet) |
| 903 | for (;;) { |
| 904 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 905 | tag = p.first; |
| 906 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 907 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 908 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
| 909 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 910 | if (tag == 10) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 911 | DO_(input->IncrementRecursionDepth()); |
| 912 | parse_loop_file: |
| 913 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 914 | input, add_file())); |
| 915 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 916 | goto handle_unusual; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 917 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 918 | if (input->ExpectTag(10)) goto parse_loop_file; |
| 919 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 920 | if (input->ExpectAtEnd()) goto success; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 921 | break; |
| 922 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 923 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 924 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 925 | handle_unusual: |
| 926 | if (tag == 0 || |
| 927 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 928 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 929 | goto success; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 930 | } |
| 931 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 932 | input, tag, mutable_unknown_fields())); |
| 933 | break; |
| 934 | } |
| 935 | } |
| 936 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 937 | success: |
| 938 | // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 939 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 940 | failure: |
| 941 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet) |
| 942 | return false; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 943 | #undef DO_ |
| 944 | } |
| 945 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 946 | void FileDescriptorSet::SerializeWithCachedSizes( |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 947 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 948 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 949 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 950 | for (unsigned int i = 0, n = this->file_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 951 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 952 | 1, this->file(i), output); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 953 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 954 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 955 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 956 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 957 | unknown_fields(), output); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 958 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 959 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 960 | } |
| 961 | |
| 962 | ::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray( |
| 963 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 964 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 965 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 966 | for (unsigned int i = 0, n = this->file_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 967 | target = ::google::protobuf::internal::WireFormatLite:: |
| 968 | WriteMessageNoVirtualToArray( |
| 969 | 1, this->file(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 970 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 971 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 972 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 973 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 974 | unknown_fields(), target); |
| 975 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 976 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 977 | return target; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 978 | } |
| 979 | |
| 980 | int FileDescriptorSet::ByteSize() const { |
| 981 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 982 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 983 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 984 | total_size += 1 * this->file_size(); |
| 985 | for (int i = 0; i < this->file_size(); i++) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 986 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 987 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 988 | this->file(i)); |
| 989 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 990 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 991 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 992 | total_size += |
| 993 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 994 | unknown_fields()); |
| 995 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 996 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 997 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 998 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 999 | return total_size; |
| 1000 | } |
| 1001 | |
| 1002 | void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1003 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1004 | const FileDescriptorSet* source = |
| 1005 | ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorSet>( |
| 1006 | &from); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1007 | if (source == NULL) { |
| 1008 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1009 | } else { |
| 1010 | MergeFrom(*source); |
| 1011 | } |
| 1012 | } |
| 1013 | |
| 1014 | void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1015 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1016 | file_.MergeFrom(from.file_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1017 | if (from._internal_metadata_.have_unknown_fields()) { |
| 1018 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 1019 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1020 | } |
| 1021 | |
| 1022 | void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) { |
| 1023 | if (&from == this) return; |
| 1024 | Clear(); |
| 1025 | MergeFrom(from); |
| 1026 | } |
| 1027 | |
| 1028 | void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) { |
| 1029 | if (&from == this) return; |
| 1030 | Clear(); |
| 1031 | MergeFrom(from); |
| 1032 | } |
| 1033 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1034 | bool FileDescriptorSet::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1035 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1036 | if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1037 | return true; |
| 1038 | } |
| 1039 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 1040 | void FileDescriptorSet::Swap(FileDescriptorSet* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1041 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1042 | InternalSwap(other); |
| 1043 | } |
| 1044 | void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { |
| 1045 | file_.UnsafeArenaSwap(&other->file_); |
| 1046 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 1047 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1048 | std::swap(_cached_size_, other->_cached_size_); |
| 1049 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 1050 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1051 | ::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const { |
| 1052 | protobuf_AssignDescriptorsOnce(); |
| 1053 | ::google::protobuf::Metadata metadata; |
| 1054 | metadata.descriptor = FileDescriptorSet_descriptor_; |
| 1055 | metadata.reflection = FileDescriptorSet_reflection_; |
| 1056 | return metadata; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1057 | } |
| 1058 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1059 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1060 | // FileDescriptorSet |
| 1061 | |
| 1062 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1063 | int FileDescriptorSet::file_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1064 | return file_.size(); |
| 1065 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1066 | void FileDescriptorSet::clear_file() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1067 | file_.Clear(); |
| 1068 | } |
| 1069 | const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const { |
| 1070 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file) |
| 1071 | return file_.Get(index); |
| 1072 | } |
| 1073 | ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) { |
| 1074 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file) |
| 1075 | return file_.Mutable(index); |
| 1076 | } |
| 1077 | ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() { |
| 1078 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file) |
| 1079 | return file_.Add(); |
| 1080 | } |
| 1081 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& |
| 1082 | FileDescriptorSet::file() const { |
| 1083 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file) |
| 1084 | return file_; |
| 1085 | } |
| 1086 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* |
| 1087 | FileDescriptorSet::mutable_file() { |
| 1088 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file) |
| 1089 | return &file_; |
| 1090 | } |
| 1091 | |
| 1092 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1093 | |
| 1094 | // =================================================================== |
| 1095 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 1096 | #ifndef _MSC_VER |
| 1097 | const int FileDescriptorProto::kNameFieldNumber; |
| 1098 | const int FileDescriptorProto::kPackageFieldNumber; |
| 1099 | const int FileDescriptorProto::kDependencyFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1100 | const int FileDescriptorProto::kPublicDependencyFieldNumber; |
| 1101 | const int FileDescriptorProto::kWeakDependencyFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 1102 | const int FileDescriptorProto::kMessageTypeFieldNumber; |
| 1103 | const int FileDescriptorProto::kEnumTypeFieldNumber; |
| 1104 | const int FileDescriptorProto::kServiceFieldNumber; |
| 1105 | const int FileDescriptorProto::kExtensionFieldNumber; |
| 1106 | const int FileDescriptorProto::kOptionsFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1107 | const int FileDescriptorProto::kSourceCodeInfoFieldNumber; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1108 | const int FileDescriptorProto::kSyntaxFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 1109 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1110 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 1111 | FileDescriptorProto::FileDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1112 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1113 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1114 | // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1115 | } |
| 1116 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1117 | void FileDescriptorProto::InitAsDefaultInstance() { |
| 1118 | options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1119 | source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1120 | } |
| 1121 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 1122 | FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1123 | : ::google::protobuf::Message(), |
| 1124 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1125 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1126 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1127 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1128 | } |
| 1129 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1130 | void FileDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1131 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1132 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1133 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1134 | package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1135 | options_ = NULL; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1136 | source_code_info_ = NULL; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1137 | syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1138 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 1139 | } |
| 1140 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1141 | FileDescriptorProto::~FileDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1142 | // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1143 | SharedDtor(); |
| 1144 | } |
| 1145 | |
| 1146 | void FileDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1147 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1148 | package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1149 | syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1150 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1151 | delete options_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1152 | delete source_code_info_; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1153 | } |
| 1154 | } |
| 1155 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1156 | void FileDescriptorProto::SetCachedSize(int size) const { |
| 1157 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 1158 | _cached_size_ = size; |
| 1159 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 1160 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1161 | const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1162 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1163 | return FileDescriptorProto_descriptor_; |
| 1164 | } |
| 1165 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1166 | const FileDescriptorProto& FileDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 1167 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 1168 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1169 | } |
| 1170 | |
| 1171 | FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL; |
| 1172 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1173 | FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1174 | FileDescriptorProto* n = new FileDescriptorProto; |
| 1175 | if (arena != NULL) { |
| 1176 | arena->Own(n); |
| 1177 | } |
| 1178 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1179 | } |
| 1180 | |
| 1181 | void FileDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 1182 | if (_has_bits_[0 / 32] & 3u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1183 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1184 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1185 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1186 | if (has_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1187 | package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1188 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1189 | } |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 1190 | if (_has_bits_[8 / 32] & 3584u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1191 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1192 | if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); |
| 1193 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1194 | if (has_source_code_info()) { |
| 1195 | if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); |
| 1196 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1197 | if (has_syntax()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1198 | syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1199 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1200 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1201 | dependency_.Clear(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1202 | public_dependency_.Clear(); |
| 1203 | weak_dependency_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1204 | message_type_.Clear(); |
| 1205 | enum_type_.Clear(); |
| 1206 | service_.Clear(); |
| 1207 | extension_.Clear(); |
| 1208 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1209 | if (_internal_metadata_.have_unknown_fields()) { |
| 1210 | mutable_unknown_fields()->Clear(); |
| 1211 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1212 | } |
| 1213 | |
| 1214 | bool FileDescriptorProto::MergePartialFromCodedStream( |
| 1215 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1216 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1217 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1218 | // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto) |
| 1219 | for (;;) { |
| 1220 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 1221 | tag = p.first; |
| 1222 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1223 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1224 | // optional string name = 1; |
| 1225 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1226 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1227 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1228 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1229 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1230 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1231 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1232 | "google.protobuf.FileDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1233 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1234 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1235 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1236 | if (input->ExpectTag(18)) goto parse_package; |
| 1237 | break; |
| 1238 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1239 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1240 | // optional string package = 2; |
| 1241 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1242 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1243 | parse_package: |
| 1244 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1245 | input, this->mutable_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1246 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1247 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1248 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1249 | "google.protobuf.FileDescriptorProto.package"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1250 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1251 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1252 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1253 | if (input->ExpectTag(26)) goto parse_dependency; |
| 1254 | break; |
| 1255 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1256 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1257 | // repeated string dependency = 3; |
| 1258 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1259 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1260 | parse_dependency: |
| 1261 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1262 | input, this->add_dependency())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1263 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | 2072421 | 2012-05-16 05:41:31 +0000 | [diff] [blame] | 1264 | this->dependency(this->dependency_size() - 1).data(), |
| 1265 | this->dependency(this->dependency_size() - 1).length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1266 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1267 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1268 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1269 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1270 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1271 | if (input->ExpectTag(26)) goto parse_dependency; |
| 1272 | if (input->ExpectTag(34)) goto parse_message_type; |
| 1273 | break; |
| 1274 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1275 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1276 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
| 1277 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1278 | if (tag == 34) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1279 | parse_message_type: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1280 | DO_(input->IncrementRecursionDepth()); |
| 1281 | parse_loop_message_type: |
| 1282 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1283 | input, add_message_type())); |
| 1284 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1285 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1286 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1287 | if (input->ExpectTag(34)) goto parse_loop_message_type; |
| 1288 | if (input->ExpectTag(42)) goto parse_loop_enum_type; |
| 1289 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1290 | break; |
| 1291 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1292 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1293 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
| 1294 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1295 | if (tag == 42) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1296 | DO_(input->IncrementRecursionDepth()); |
| 1297 | parse_loop_enum_type: |
| 1298 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1299 | input, add_enum_type())); |
| 1300 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1301 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1302 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1303 | if (input->ExpectTag(42)) goto parse_loop_enum_type; |
| 1304 | if (input->ExpectTag(50)) goto parse_loop_service; |
| 1305 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1306 | break; |
| 1307 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1308 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1309 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
| 1310 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1311 | if (tag == 50) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1312 | DO_(input->IncrementRecursionDepth()); |
| 1313 | parse_loop_service: |
| 1314 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1315 | input, add_service())); |
| 1316 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1317 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1318 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1319 | if (input->ExpectTag(50)) goto parse_loop_service; |
| 1320 | if (input->ExpectTag(58)) goto parse_loop_extension; |
| 1321 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1322 | break; |
| 1323 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1324 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1325 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
| 1326 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1327 | if (tag == 58) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1328 | DO_(input->IncrementRecursionDepth()); |
| 1329 | parse_loop_extension: |
| 1330 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1331 | input, add_extension())); |
| 1332 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1333 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1334 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1335 | if (input->ExpectTag(58)) goto parse_loop_extension; |
| 1336 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1337 | if (input->ExpectTag(66)) goto parse_options; |
| 1338 | break; |
| 1339 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1340 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1341 | // optional .google.protobuf.FileOptions options = 8; |
| 1342 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1343 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1344 | parse_options: |
| 1345 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 1346 | input, mutable_options())); |
| 1347 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1348 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1349 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1350 | if (input->ExpectTag(74)) goto parse_source_code_info; |
| 1351 | break; |
| 1352 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1353 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1354 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1355 | case 9: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1356 | if (tag == 74) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1357 | parse_source_code_info: |
| 1358 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 1359 | input, mutable_source_code_info())); |
| 1360 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1361 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1362 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1363 | if (input->ExpectTag(80)) goto parse_public_dependency; |
| 1364 | break; |
| 1365 | } |
| 1366 | |
| 1367 | // repeated int32 public_dependency = 10; |
| 1368 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1369 | if (tag == 80) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1370 | parse_public_dependency: |
| 1371 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< |
| 1372 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1373 | 1, 80, input, this->mutable_public_dependency()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1374 | } else if (tag == 82) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1375 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< |
| 1376 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1377 | input, this->mutable_public_dependency()))); |
| 1378 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1379 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1380 | } |
| 1381 | if (input->ExpectTag(80)) goto parse_public_dependency; |
| 1382 | if (input->ExpectTag(88)) goto parse_weak_dependency; |
| 1383 | break; |
| 1384 | } |
| 1385 | |
| 1386 | // repeated int32 weak_dependency = 11; |
| 1387 | case 11: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1388 | if (tag == 88) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1389 | parse_weak_dependency: |
| 1390 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< |
| 1391 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1392 | 1, 88, input, this->mutable_weak_dependency()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1393 | } else if (tag == 90) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1394 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< |
| 1395 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1396 | input, this->mutable_weak_dependency()))); |
| 1397 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1398 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1399 | } |
| 1400 | if (input->ExpectTag(88)) goto parse_weak_dependency; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1401 | if (input->ExpectTag(98)) goto parse_syntax; |
| 1402 | break; |
| 1403 | } |
| 1404 | |
| 1405 | // optional string syntax = 12; |
| 1406 | case 12: { |
| 1407 | if (tag == 98) { |
| 1408 | parse_syntax: |
| 1409 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1410 | input, this->mutable_syntax())); |
| 1411 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1412 | this->syntax().data(), this->syntax().length(), |
| 1413 | ::google::protobuf::internal::WireFormat::PARSE, |
| 1414 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1415 | } else { |
| 1416 | goto handle_unusual; |
| 1417 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1418 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1419 | break; |
| 1420 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1421 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1422 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1423 | handle_unusual: |
| 1424 | if (tag == 0 || |
| 1425 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1426 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1427 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1428 | } |
| 1429 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1430 | input, tag, mutable_unknown_fields())); |
| 1431 | break; |
| 1432 | } |
| 1433 | } |
| 1434 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1435 | success: |
| 1436 | // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1437 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1438 | failure: |
| 1439 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto) |
| 1440 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1441 | #undef DO_ |
| 1442 | } |
| 1443 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1444 | void FileDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1445 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1446 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1447 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1448 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1449 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1450 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1451 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1452 | "google.protobuf.FileDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1453 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1454 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1455 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1456 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1457 | // optional string package = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1458 | if (has_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1459 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1460 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1461 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1462 | "google.protobuf.FileDescriptorProto.package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1463 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1464 | 2, this->package(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1465 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1466 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1467 | // repeated string dependency = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1468 | for (int i = 0; i < this->dependency_size(); i++) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1469 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1470 | this->dependency(i).data(), this->dependency(i).length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1471 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1472 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1473 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 1474 | 3, this->dependency(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1475 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1476 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1477 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1478 | for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1479 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1480 | 4, this->message_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1481 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1482 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1483 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1484 | for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1485 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1486 | 5, this->enum_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1487 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1488 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1489 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1490 | for (unsigned int i = 0, n = this->service_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1491 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1492 | 6, this->service(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1493 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1494 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1495 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1496 | for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1497 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1498 | 7, this->extension(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1499 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1500 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1501 | // optional .google.protobuf.FileOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1502 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1503 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1504 | 8, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1505 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1506 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1507 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1508 | if (has_source_code_info()) { |
| 1509 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1510 | 9, *this->source_code_info_, output); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1511 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1512 | |
| 1513 | // repeated int32 public_dependency = 10; |
| 1514 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1515 | ::google::protobuf::internal::WireFormatLite::WriteInt32( |
| 1516 | 10, this->public_dependency(i), output); |
| 1517 | } |
| 1518 | |
| 1519 | // repeated int32 weak_dependency = 11; |
| 1520 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1521 | ::google::protobuf::internal::WireFormatLite::WriteInt32( |
| 1522 | 11, this->weak_dependency(i), output); |
| 1523 | } |
| 1524 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1525 | // optional string syntax = 12; |
| 1526 | if (has_syntax()) { |
| 1527 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1528 | this->syntax().data(), this->syntax().length(), |
| 1529 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 1530 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1531 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1532 | 12, this->syntax(), output); |
| 1533 | } |
| 1534 | |
| 1535 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1536 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1537 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1538 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1539 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1540 | } |
| 1541 | |
| 1542 | ::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray( |
| 1543 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1544 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1545 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1546 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1547 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1548 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1549 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1550 | "google.protobuf.FileDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1551 | target = |
| 1552 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1553 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1554 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1555 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1556 | // optional string package = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1557 | if (has_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1558 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1559 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1560 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1561 | "google.protobuf.FileDescriptorProto.package"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1562 | target = |
| 1563 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1564 | 2, this->package(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1565 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1566 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1567 | // repeated string dependency = 3; |
| 1568 | for (int i = 0; i < this->dependency_size(); i++) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1569 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1570 | this->dependency(i).data(), this->dependency(i).length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1571 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1572 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1573 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1574 | WriteStringToArray(3, this->dependency(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1575 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1576 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1577 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1578 | for (unsigned int i = 0, n = this->message_type_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1579 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1580 | WriteMessageNoVirtualToArray( |
| 1581 | 4, this->message_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1582 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1583 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1584 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1585 | for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1586 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1587 | WriteMessageNoVirtualToArray( |
| 1588 | 5, this->enum_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1589 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1590 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1591 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1592 | for (unsigned int i = 0, n = this->service_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1593 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1594 | WriteMessageNoVirtualToArray( |
| 1595 | 6, this->service(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1596 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1597 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1598 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1599 | for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1600 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1601 | WriteMessageNoVirtualToArray( |
| 1602 | 7, this->extension(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1603 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1604 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1605 | // optional .google.protobuf.FileOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1606 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1607 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1608 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1609 | 8, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1610 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1611 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1612 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1613 | if (has_source_code_info()) { |
| 1614 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1615 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1616 | 9, *this->source_code_info_, target); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1617 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1618 | |
| 1619 | // repeated int32 public_dependency = 10; |
| 1620 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1621 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1622 | WriteInt32ToArray(10, this->public_dependency(i), target); |
| 1623 | } |
| 1624 | |
| 1625 | // repeated int32 weak_dependency = 11; |
| 1626 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1627 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1628 | WriteInt32ToArray(11, this->weak_dependency(i), target); |
| 1629 | } |
| 1630 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1631 | // optional string syntax = 12; |
| 1632 | if (has_syntax()) { |
| 1633 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1634 | this->syntax().data(), this->syntax().length(), |
| 1635 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 1636 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1637 | target = |
| 1638 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1639 | 12, this->syntax(), target); |
| 1640 | } |
| 1641 | |
| 1642 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1643 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1644 | unknown_fields(), target); |
| 1645 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1646 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1647 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1648 | } |
| 1649 | |
| 1650 | int FileDescriptorProto::ByteSize() const { |
| 1651 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1652 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 1653 | if (_has_bits_[0 / 32] & 3u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1654 | // optional string name = 1; |
| 1655 | if (has_name()) { |
| 1656 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1657 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1658 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1659 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1660 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1661 | // optional string package = 2; |
| 1662 | if (has_package()) { |
| 1663 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1664 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1665 | this->package()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1666 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1667 | |
| 1668 | } |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 1669 | if (_has_bits_[9 / 32] & 3584u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1670 | // optional .google.protobuf.FileOptions options = 8; |
| 1671 | if (has_options()) { |
| 1672 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1673 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1674 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1675 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1676 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1677 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1678 | if (has_source_code_info()) { |
| 1679 | total_size += 1 + |
| 1680 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1681 | *this->source_code_info_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1682 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1683 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1684 | // optional string syntax = 12; |
| 1685 | if (has_syntax()) { |
| 1686 | total_size += 1 + |
| 1687 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1688 | this->syntax()); |
| 1689 | } |
| 1690 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1691 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1692 | // repeated string dependency = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1693 | total_size += 1 * this->dependency_size(); |
| 1694 | for (int i = 0; i < this->dependency_size(); i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1695 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1696 | this->dependency(i)); |
| 1697 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1698 | |
| 1699 | // repeated int32 public_dependency = 10; |
| 1700 | { |
| 1701 | int data_size = 0; |
| 1702 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1703 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 1704 | Int32Size(this->public_dependency(i)); |
| 1705 | } |
| 1706 | total_size += 1 * this->public_dependency_size() + data_size; |
| 1707 | } |
| 1708 | |
| 1709 | // repeated int32 weak_dependency = 11; |
| 1710 | { |
| 1711 | int data_size = 0; |
| 1712 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1713 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 1714 | Int32Size(this->weak_dependency(i)); |
| 1715 | } |
| 1716 | total_size += 1 * this->weak_dependency_size() + data_size; |
| 1717 | } |
| 1718 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1719 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1720 | total_size += 1 * this->message_type_size(); |
| 1721 | for (int i = 0; i < this->message_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1722 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1723 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1724 | this->message_type(i)); |
| 1725 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1726 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1727 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1728 | total_size += 1 * this->enum_type_size(); |
| 1729 | for (int i = 0; i < this->enum_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1730 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1731 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1732 | this->enum_type(i)); |
| 1733 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1734 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1735 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1736 | total_size += 1 * this->service_size(); |
| 1737 | for (int i = 0; i < this->service_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1738 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1739 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1740 | this->service(i)); |
| 1741 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1742 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1743 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1744 | total_size += 1 * this->extension_size(); |
| 1745 | for (int i = 0; i < this->extension_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1746 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1747 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1748 | this->extension(i)); |
| 1749 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1750 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1751 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1752 | total_size += |
| 1753 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1754 | unknown_fields()); |
| 1755 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1756 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1757 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1758 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1759 | return total_size; |
| 1760 | } |
| 1761 | |
| 1762 | void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1763 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1764 | const FileDescriptorProto* source = |
| 1765 | ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorProto>( |
| 1766 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1767 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1768 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1769 | } else { |
| 1770 | MergeFrom(*source); |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1775 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1776 | dependency_.MergeFrom(from.dependency_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1777 | public_dependency_.MergeFrom(from.public_dependency_); |
| 1778 | weak_dependency_.MergeFrom(from.weak_dependency_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1779 | message_type_.MergeFrom(from.message_type_); |
| 1780 | enum_type_.MergeFrom(from.enum_type_); |
| 1781 | service_.MergeFrom(from.service_); |
| 1782 | extension_.MergeFrom(from.extension_); |
| 1783 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1784 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1785 | set_has_name(); |
| 1786 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1787 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1788 | if (from.has_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1789 | set_has_package(); |
| 1790 | package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1791 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1792 | } |
| 1793 | if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1794 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1795 | mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options()); |
| 1796 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1797 | if (from.has_source_code_info()) { |
| 1798 | mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info()); |
| 1799 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1800 | if (from.has_syntax()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1801 | set_has_syntax(); |
| 1802 | syntax_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1803 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1804 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1805 | if (from._internal_metadata_.have_unknown_fields()) { |
| 1806 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 1807 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1808 | } |
| 1809 | |
| 1810 | void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 1811 | if (&from == this) return; |
| 1812 | Clear(); |
| 1813 | MergeFrom(from); |
| 1814 | } |
| 1815 | |
| 1816 | void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) { |
| 1817 | if (&from == this) return; |
| 1818 | Clear(); |
| 1819 | MergeFrom(from); |
| 1820 | } |
| 1821 | |
| 1822 | bool FileDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1823 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1824 | if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false; |
| 1825 | if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; |
| 1826 | if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false; |
| 1827 | if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1828 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1829 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1830 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1831 | return true; |
| 1832 | } |
| 1833 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1834 | void FileDescriptorProto::Swap(FileDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1835 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1836 | InternalSwap(other); |
| 1837 | } |
| 1838 | void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { |
| 1839 | name_.Swap(&other->name_); |
| 1840 | package_.Swap(&other->package_); |
| 1841 | dependency_.UnsafeArenaSwap(&other->dependency_); |
| 1842 | public_dependency_.UnsafeArenaSwap(&other->public_dependency_); |
| 1843 | weak_dependency_.UnsafeArenaSwap(&other->weak_dependency_); |
| 1844 | message_type_.UnsafeArenaSwap(&other->message_type_); |
| 1845 | enum_type_.UnsafeArenaSwap(&other->enum_type_); |
| 1846 | service_.UnsafeArenaSwap(&other->service_); |
| 1847 | extension_.UnsafeArenaSwap(&other->extension_); |
| 1848 | std::swap(options_, other->options_); |
| 1849 | std::swap(source_code_info_, other->source_code_info_); |
| 1850 | syntax_.Swap(&other->syntax_); |
| 1851 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 1852 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1853 | std::swap(_cached_size_, other->_cached_size_); |
| 1854 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1855 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1856 | ::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const { |
| 1857 | protobuf_AssignDescriptorsOnce(); |
| 1858 | ::google::protobuf::Metadata metadata; |
| 1859 | metadata.descriptor = FileDescriptorProto_descriptor_; |
| 1860 | metadata.reflection = FileDescriptorProto_reflection_; |
| 1861 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1862 | } |
| 1863 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1864 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1865 | // FileDescriptorProto |
| 1866 | |
| 1867 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1868 | bool FileDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1869 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 1870 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1871 | void FileDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1872 | _has_bits_[0] |= 0x00000001u; |
| 1873 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1874 | void FileDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1875 | _has_bits_[0] &= ~0x00000001u; |
| 1876 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1877 | void FileDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1878 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1879 | clear_has_name(); |
| 1880 | } |
| 1881 | const ::std::string& FileDescriptorProto::name() const { |
| 1882 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) |
| 1883 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1884 | } |
| 1885 | void FileDescriptorProto::set_name(const ::std::string& value) { |
| 1886 | set_has_name(); |
| 1887 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 1888 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) |
| 1889 | } |
| 1890 | void FileDescriptorProto::set_name(const char* value) { |
| 1891 | set_has_name(); |
| 1892 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 1893 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name) |
| 1894 | } |
| 1895 | void FileDescriptorProto::set_name(const char* value, size_t size) { |
| 1896 | set_has_name(); |
| 1897 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1898 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 1899 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name) |
| 1900 | } |
| 1901 | ::std::string* FileDescriptorProto::mutable_name() { |
| 1902 | set_has_name(); |
| 1903 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) |
| 1904 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1905 | } |
| 1906 | ::std::string* FileDescriptorProto::release_name() { |
| 1907 | clear_has_name(); |
| 1908 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1909 | } |
| 1910 | void FileDescriptorProto::set_allocated_name(::std::string* name) { |
| 1911 | if (name != NULL) { |
| 1912 | set_has_name(); |
| 1913 | } else { |
| 1914 | clear_has_name(); |
| 1915 | } |
| 1916 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 1917 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) |
| 1918 | } |
| 1919 | |
| 1920 | // optional string package = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1921 | bool FileDescriptorProto::has_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1922 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 1923 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1924 | void FileDescriptorProto::set_has_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1925 | _has_bits_[0] |= 0x00000002u; |
| 1926 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1927 | void FileDescriptorProto::clear_has_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1928 | _has_bits_[0] &= ~0x00000002u; |
| 1929 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1930 | void FileDescriptorProto::clear_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1931 | package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1932 | clear_has_package(); |
| 1933 | } |
| 1934 | const ::std::string& FileDescriptorProto::package() const { |
| 1935 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) |
| 1936 | return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1937 | } |
| 1938 | void FileDescriptorProto::set_package(const ::std::string& value) { |
| 1939 | set_has_package(); |
| 1940 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 1941 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) |
| 1942 | } |
| 1943 | void FileDescriptorProto::set_package(const char* value) { |
| 1944 | set_has_package(); |
| 1945 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 1946 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package) |
| 1947 | } |
| 1948 | void FileDescriptorProto::set_package(const char* value, size_t size) { |
| 1949 | set_has_package(); |
| 1950 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1951 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 1952 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package) |
| 1953 | } |
| 1954 | ::std::string* FileDescriptorProto::mutable_package() { |
| 1955 | set_has_package(); |
| 1956 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) |
| 1957 | return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1958 | } |
| 1959 | ::std::string* FileDescriptorProto::release_package() { |
| 1960 | clear_has_package(); |
| 1961 | return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1962 | } |
| 1963 | void FileDescriptorProto::set_allocated_package(::std::string* package) { |
| 1964 | if (package != NULL) { |
| 1965 | set_has_package(); |
| 1966 | } else { |
| 1967 | clear_has_package(); |
| 1968 | } |
| 1969 | package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package); |
| 1970 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) |
| 1971 | } |
| 1972 | |
| 1973 | // repeated string dependency = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1974 | int FileDescriptorProto::dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1975 | return dependency_.size(); |
| 1976 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1977 | void FileDescriptorProto::clear_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1978 | dependency_.Clear(); |
| 1979 | } |
| 1980 | const ::std::string& FileDescriptorProto::dependency(int index) const { |
| 1981 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) |
| 1982 | return dependency_.Get(index); |
| 1983 | } |
| 1984 | ::std::string* FileDescriptorProto::mutable_dependency(int index) { |
| 1985 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) |
| 1986 | return dependency_.Mutable(index); |
| 1987 | } |
| 1988 | void FileDescriptorProto::set_dependency(int index, const ::std::string& value) { |
| 1989 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) |
| 1990 | dependency_.Mutable(index)->assign(value); |
| 1991 | } |
| 1992 | void FileDescriptorProto::set_dependency(int index, const char* value) { |
| 1993 | dependency_.Mutable(index)->assign(value); |
| 1994 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency) |
| 1995 | } |
| 1996 | void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) { |
| 1997 | dependency_.Mutable(index)->assign( |
| 1998 | reinterpret_cast<const char*>(value), size); |
| 1999 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency) |
| 2000 | } |
| 2001 | ::std::string* FileDescriptorProto::add_dependency() { |
| 2002 | return dependency_.Add(); |
| 2003 | } |
| 2004 | void FileDescriptorProto::add_dependency(const ::std::string& value) { |
| 2005 | dependency_.Add()->assign(value); |
| 2006 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) |
| 2007 | } |
| 2008 | void FileDescriptorProto::add_dependency(const char* value) { |
| 2009 | dependency_.Add()->assign(value); |
| 2010 | // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency) |
| 2011 | } |
| 2012 | void FileDescriptorProto::add_dependency(const char* value, size_t size) { |
| 2013 | dependency_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 2014 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency) |
| 2015 | } |
| 2016 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 2017 | FileDescriptorProto::dependency() const { |
| 2018 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency) |
| 2019 | return dependency_; |
| 2020 | } |
| 2021 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 2022 | FileDescriptorProto::mutable_dependency() { |
| 2023 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency) |
| 2024 | return &dependency_; |
| 2025 | } |
| 2026 | |
| 2027 | // repeated int32 public_dependency = 10; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2028 | int FileDescriptorProto::public_dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2029 | return public_dependency_.size(); |
| 2030 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2031 | void FileDescriptorProto::clear_public_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2032 | public_dependency_.Clear(); |
| 2033 | } |
| 2034 | ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const { |
| 2035 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency) |
| 2036 | return public_dependency_.Get(index); |
| 2037 | } |
| 2038 | void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) { |
| 2039 | public_dependency_.Set(index, value); |
| 2040 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency) |
| 2041 | } |
| 2042 | void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) { |
| 2043 | public_dependency_.Add(value); |
| 2044 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency) |
| 2045 | } |
| 2046 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 2047 | FileDescriptorProto::public_dependency() const { |
| 2048 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency) |
| 2049 | return public_dependency_; |
| 2050 | } |
| 2051 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 2052 | FileDescriptorProto::mutable_public_dependency() { |
| 2053 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency) |
| 2054 | return &public_dependency_; |
| 2055 | } |
| 2056 | |
| 2057 | // repeated int32 weak_dependency = 11; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2058 | int FileDescriptorProto::weak_dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2059 | return weak_dependency_.size(); |
| 2060 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2061 | void FileDescriptorProto::clear_weak_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2062 | weak_dependency_.Clear(); |
| 2063 | } |
| 2064 | ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const { |
| 2065 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2066 | return weak_dependency_.Get(index); |
| 2067 | } |
| 2068 | void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) { |
| 2069 | weak_dependency_.Set(index, value); |
| 2070 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2071 | } |
| 2072 | void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) { |
| 2073 | weak_dependency_.Add(value); |
| 2074 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2075 | } |
| 2076 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 2077 | FileDescriptorProto::weak_dependency() const { |
| 2078 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2079 | return weak_dependency_; |
| 2080 | } |
| 2081 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 2082 | FileDescriptorProto::mutable_weak_dependency() { |
| 2083 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2084 | return &weak_dependency_; |
| 2085 | } |
| 2086 | |
| 2087 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2088 | int FileDescriptorProto::message_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2089 | return message_type_.size(); |
| 2090 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2091 | void FileDescriptorProto::clear_message_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2092 | message_type_.Clear(); |
| 2093 | } |
| 2094 | const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const { |
| 2095 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type) |
| 2096 | return message_type_.Get(index); |
| 2097 | } |
| 2098 | ::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) { |
| 2099 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type) |
| 2100 | return message_type_.Mutable(index); |
| 2101 | } |
| 2102 | ::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() { |
| 2103 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type) |
| 2104 | return message_type_.Add(); |
| 2105 | } |
| 2106 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& |
| 2107 | FileDescriptorProto::message_type() const { |
| 2108 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type) |
| 2109 | return message_type_; |
| 2110 | } |
| 2111 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* |
| 2112 | FileDescriptorProto::mutable_message_type() { |
| 2113 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type) |
| 2114 | return &message_type_; |
| 2115 | } |
| 2116 | |
| 2117 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2118 | int FileDescriptorProto::enum_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2119 | return enum_type_.size(); |
| 2120 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2121 | void FileDescriptorProto::clear_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2122 | enum_type_.Clear(); |
| 2123 | } |
| 2124 | const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const { |
| 2125 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type) |
| 2126 | return enum_type_.Get(index); |
| 2127 | } |
| 2128 | ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) { |
| 2129 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type) |
| 2130 | return enum_type_.Mutable(index); |
| 2131 | } |
| 2132 | ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { |
| 2133 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type) |
| 2134 | return enum_type_.Add(); |
| 2135 | } |
| 2136 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& |
| 2137 | FileDescriptorProto::enum_type() const { |
| 2138 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type) |
| 2139 | return enum_type_; |
| 2140 | } |
| 2141 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* |
| 2142 | FileDescriptorProto::mutable_enum_type() { |
| 2143 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type) |
| 2144 | return &enum_type_; |
| 2145 | } |
| 2146 | |
| 2147 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2148 | int FileDescriptorProto::service_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2149 | return service_.size(); |
| 2150 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2151 | void FileDescriptorProto::clear_service() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2152 | service_.Clear(); |
| 2153 | } |
| 2154 | const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { |
| 2155 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service) |
| 2156 | return service_.Get(index); |
| 2157 | } |
| 2158 | ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) { |
| 2159 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service) |
| 2160 | return service_.Mutable(index); |
| 2161 | } |
| 2162 | ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() { |
| 2163 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service) |
| 2164 | return service_.Add(); |
| 2165 | } |
| 2166 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& |
| 2167 | FileDescriptorProto::service() const { |
| 2168 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service) |
| 2169 | return service_; |
| 2170 | } |
| 2171 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* |
| 2172 | FileDescriptorProto::mutable_service() { |
| 2173 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service) |
| 2174 | return &service_; |
| 2175 | } |
| 2176 | |
| 2177 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2178 | int FileDescriptorProto::extension_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2179 | return extension_.size(); |
| 2180 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2181 | void FileDescriptorProto::clear_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2182 | extension_.Clear(); |
| 2183 | } |
| 2184 | const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { |
| 2185 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension) |
| 2186 | return extension_.Get(index); |
| 2187 | } |
| 2188 | ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) { |
| 2189 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension) |
| 2190 | return extension_.Mutable(index); |
| 2191 | } |
| 2192 | ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() { |
| 2193 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension) |
| 2194 | return extension_.Add(); |
| 2195 | } |
| 2196 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 2197 | FileDescriptorProto::extension() const { |
| 2198 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension) |
| 2199 | return extension_; |
| 2200 | } |
| 2201 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
| 2202 | FileDescriptorProto::mutable_extension() { |
| 2203 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension) |
| 2204 | return &extension_; |
| 2205 | } |
| 2206 | |
| 2207 | // optional .google.protobuf.FileOptions options = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2208 | bool FileDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2209 | return (_has_bits_[0] & 0x00000200u) != 0; |
| 2210 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2211 | void FileDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2212 | _has_bits_[0] |= 0x00000200u; |
| 2213 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2214 | void FileDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2215 | _has_bits_[0] &= ~0x00000200u; |
| 2216 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2217 | void FileDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2218 | if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); |
| 2219 | clear_has_options(); |
| 2220 | } |
| 2221 | const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { |
| 2222 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) |
| 2223 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 2224 | } |
| 2225 | ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { |
| 2226 | set_has_options(); |
| 2227 | if (options_ == NULL) { |
| 2228 | options_ = new ::google::protobuf::FileOptions; |
| 2229 | } |
| 2230 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) |
| 2231 | return options_; |
| 2232 | } |
| 2233 | ::google::protobuf::FileOptions* FileDescriptorProto::release_options() { |
| 2234 | clear_has_options(); |
| 2235 | ::google::protobuf::FileOptions* temp = options_; |
| 2236 | options_ = NULL; |
| 2237 | return temp; |
| 2238 | } |
| 2239 | void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) { |
| 2240 | delete options_; |
| 2241 | options_ = options; |
| 2242 | if (options) { |
| 2243 | set_has_options(); |
| 2244 | } else { |
| 2245 | clear_has_options(); |
| 2246 | } |
| 2247 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options) |
| 2248 | } |
| 2249 | |
| 2250 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2251 | bool FileDescriptorProto::has_source_code_info() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2252 | return (_has_bits_[0] & 0x00000400u) != 0; |
| 2253 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2254 | void FileDescriptorProto::set_has_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2255 | _has_bits_[0] |= 0x00000400u; |
| 2256 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2257 | void FileDescriptorProto::clear_has_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2258 | _has_bits_[0] &= ~0x00000400u; |
| 2259 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2260 | void FileDescriptorProto::clear_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2261 | if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); |
| 2262 | clear_has_source_code_info(); |
| 2263 | } |
| 2264 | const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { |
| 2265 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) |
| 2266 | return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_; |
| 2267 | } |
| 2268 | ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { |
| 2269 | set_has_source_code_info(); |
| 2270 | if (source_code_info_ == NULL) { |
| 2271 | source_code_info_ = new ::google::protobuf::SourceCodeInfo; |
| 2272 | } |
| 2273 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) |
| 2274 | return source_code_info_; |
| 2275 | } |
| 2276 | ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { |
| 2277 | clear_has_source_code_info(); |
| 2278 | ::google::protobuf::SourceCodeInfo* temp = source_code_info_; |
| 2279 | source_code_info_ = NULL; |
| 2280 | return temp; |
| 2281 | } |
| 2282 | void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) { |
| 2283 | delete source_code_info_; |
| 2284 | source_code_info_ = source_code_info; |
| 2285 | if (source_code_info) { |
| 2286 | set_has_source_code_info(); |
| 2287 | } else { |
| 2288 | clear_has_source_code_info(); |
| 2289 | } |
| 2290 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info) |
| 2291 | } |
| 2292 | |
| 2293 | // optional string syntax = 12; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2294 | bool FileDescriptorProto::has_syntax() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2295 | return (_has_bits_[0] & 0x00000800u) != 0; |
| 2296 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2297 | void FileDescriptorProto::set_has_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2298 | _has_bits_[0] |= 0x00000800u; |
| 2299 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2300 | void FileDescriptorProto::clear_has_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2301 | _has_bits_[0] &= ~0x00000800u; |
| 2302 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2303 | void FileDescriptorProto::clear_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2304 | syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2305 | clear_has_syntax(); |
| 2306 | } |
| 2307 | const ::std::string& FileDescriptorProto::syntax() const { |
| 2308 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) |
| 2309 | return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2310 | } |
| 2311 | void FileDescriptorProto::set_syntax(const ::std::string& value) { |
| 2312 | set_has_syntax(); |
| 2313 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 2314 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) |
| 2315 | } |
| 2316 | void FileDescriptorProto::set_syntax(const char* value) { |
| 2317 | set_has_syntax(); |
| 2318 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 2319 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax) |
| 2320 | } |
| 2321 | void FileDescriptorProto::set_syntax(const char* value, size_t size) { |
| 2322 | set_has_syntax(); |
| 2323 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 2324 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2325 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax) |
| 2326 | } |
| 2327 | ::std::string* FileDescriptorProto::mutable_syntax() { |
| 2328 | set_has_syntax(); |
| 2329 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) |
| 2330 | return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2331 | } |
| 2332 | ::std::string* FileDescriptorProto::release_syntax() { |
| 2333 | clear_has_syntax(); |
| 2334 | return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2335 | } |
| 2336 | void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) { |
| 2337 | if (syntax != NULL) { |
| 2338 | set_has_syntax(); |
| 2339 | } else { |
| 2340 | clear_has_syntax(); |
| 2341 | } |
| 2342 | syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax); |
| 2343 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) |
| 2344 | } |
| 2345 | |
| 2346 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2347 | |
| 2348 | // =================================================================== |
| 2349 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2350 | #ifndef _MSC_VER |
| 2351 | const int DescriptorProto_ExtensionRange::kStartFieldNumber; |
| 2352 | const int DescriptorProto_ExtensionRange::kEndFieldNumber; |
| 2353 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2354 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2355 | DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2356 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2357 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2358 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2359 | } |
| 2360 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2361 | void DescriptorProto_ExtensionRange::InitAsDefaultInstance() { |
| 2362 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2363 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2364 | DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2365 | : ::google::protobuf::Message(), |
| 2366 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2367 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2368 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2369 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2370 | } |
| 2371 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2372 | void DescriptorProto_ExtensionRange::SharedCtor() { |
| 2373 | _cached_size_ = 0; |
| 2374 | start_ = 0; |
| 2375 | end_ = 0; |
| 2376 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2377 | } |
| 2378 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2379 | DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2380 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2381 | SharedDtor(); |
| 2382 | } |
| 2383 | |
| 2384 | void DescriptorProto_ExtensionRange::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2385 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2386 | } |
| 2387 | } |
| 2388 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2389 | void DescriptorProto_ExtensionRange::SetCachedSize(int size) const { |
| 2390 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2391 | _cached_size_ = size; |
| 2392 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2393 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2394 | const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2395 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2396 | return DescriptorProto_ExtensionRange_descriptor_; |
| 2397 | } |
| 2398 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2399 | const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 2400 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 2401 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2402 | } |
| 2403 | |
| 2404 | DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL; |
| 2405 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2406 | DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2407 | DescriptorProto_ExtensionRange* n = new DescriptorProto_ExtensionRange; |
| 2408 | if (arena != NULL) { |
| 2409 | arena->Own(n); |
| 2410 | } |
| 2411 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2412 | } |
| 2413 | |
| 2414 | void DescriptorProto_ExtensionRange::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2415 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 2416 | &reinterpret_cast<DescriptorProto_ExtensionRange*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2417 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2418 | #define ZR_(first, last) do {\ |
| 2419 | ::memset(&first, 0,\ |
| 2420 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 2421 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2422 | |
| 2423 | ZR_(start_, end_); |
| 2424 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2425 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2426 | #undef ZR_ |
| 2427 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2428 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2429 | if (_internal_metadata_.have_unknown_fields()) { |
| 2430 | mutable_unknown_fields()->Clear(); |
| 2431 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2432 | } |
| 2433 | |
| 2434 | bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( |
| 2435 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2436 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2437 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2438 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange) |
| 2439 | for (;;) { |
| 2440 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 2441 | tag = p.first; |
| 2442 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2443 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2444 | // optional int32 start = 1; |
| 2445 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2446 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2447 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2448 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2449 | input, &start_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2450 | set_has_start(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2451 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2452 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2453 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2454 | if (input->ExpectTag(16)) goto parse_end; |
| 2455 | break; |
| 2456 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2457 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2458 | // optional int32 end = 2; |
| 2459 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2460 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2461 | parse_end: |
| 2462 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2463 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2464 | input, &end_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2465 | set_has_end(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2466 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2467 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2468 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2469 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2470 | break; |
| 2471 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2472 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2473 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2474 | handle_unusual: |
| 2475 | if (tag == 0 || |
| 2476 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2477 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2478 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2479 | } |
| 2480 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2481 | input, tag, mutable_unknown_fields())); |
| 2482 | break; |
| 2483 | } |
| 2484 | } |
| 2485 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2486 | success: |
| 2487 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2488 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2489 | failure: |
| 2490 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange) |
| 2491 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2492 | #undef DO_ |
| 2493 | } |
| 2494 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2495 | void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2496 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2497 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2498 | // optional int32 start = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2499 | if (has_start()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2500 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2501 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2502 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2503 | // optional int32 end = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2504 | if (has_end()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2505 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2506 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2507 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2508 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2509 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2510 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2511 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2512 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2513 | } |
| 2514 | |
| 2515 | ::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray( |
| 2516 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2517 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2518 | // optional int32 start = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2519 | if (has_start()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2520 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2521 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2522 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2523 | // optional int32 end = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2524 | if (has_end()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2525 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2526 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2527 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2528 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2529 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2530 | unknown_fields(), target); |
| 2531 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2532 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2533 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2534 | } |
| 2535 | |
| 2536 | int DescriptorProto_ExtensionRange::ByteSize() const { |
| 2537 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2538 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 2539 | if (_has_bits_[0 / 32] & 3u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2540 | // optional int32 start = 1; |
| 2541 | if (has_start()) { |
| 2542 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2543 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2544 | this->start()); |
| 2545 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2546 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2547 | // optional int32 end = 2; |
| 2548 | if (has_end()) { |
| 2549 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2550 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2551 | this->end()); |
| 2552 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2553 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2554 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2555 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2556 | total_size += |
| 2557 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2558 | unknown_fields()); |
| 2559 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2560 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2561 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2562 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2563 | return total_size; |
| 2564 | } |
| 2565 | |
| 2566 | void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2567 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2568 | const DescriptorProto_ExtensionRange* source = |
| 2569 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ExtensionRange>( |
| 2570 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2571 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 2572 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2573 | } else { |
| 2574 | MergeFrom(*source); |
| 2575 | } |
| 2576 | } |
| 2577 | |
| 2578 | void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2579 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2580 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2581 | if (from.has_start()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2582 | set_start(from.start()); |
| 2583 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2584 | if (from.has_end()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2585 | set_end(from.end()); |
| 2586 | } |
| 2587 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2588 | if (from._internal_metadata_.have_unknown_fields()) { |
| 2589 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 2590 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2591 | } |
| 2592 | |
| 2593 | void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) { |
| 2594 | if (&from == this) return; |
| 2595 | Clear(); |
| 2596 | MergeFrom(from); |
| 2597 | } |
| 2598 | |
| 2599 | void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) { |
| 2600 | if (&from == this) return; |
| 2601 | Clear(); |
| 2602 | MergeFrom(from); |
| 2603 | } |
| 2604 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 2605 | bool DescriptorProto_ExtensionRange::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2606 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 2607 | return true; |
| 2608 | } |
| 2609 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 2610 | void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2611 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2612 | InternalSwap(other); |
| 2613 | } |
| 2614 | void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) { |
| 2615 | std::swap(start_, other->start_); |
| 2616 | std::swap(end_, other->end_); |
| 2617 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 2618 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2619 | std::swap(_cached_size_, other->_cached_size_); |
| 2620 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 2621 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2622 | ::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { |
| 2623 | protobuf_AssignDescriptorsOnce(); |
| 2624 | ::google::protobuf::Metadata metadata; |
| 2625 | metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_; |
| 2626 | metadata.reflection = DescriptorProto_ExtensionRange_reflection_; |
| 2627 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2628 | } |
| 2629 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2630 | |
| 2631 | // ------------------------------------------------------------------- |
| 2632 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2633 | #ifndef _MSC_VER |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2634 | const int DescriptorProto_ReservedRange::kStartFieldNumber; |
| 2635 | const int DescriptorProto_ReservedRange::kEndFieldNumber; |
| 2636 | #endif // !_MSC_VER |
| 2637 | |
| 2638 | DescriptorProto_ReservedRange::DescriptorProto_ReservedRange() |
| 2639 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 2640 | SharedCtor(); |
| 2641 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2642 | } |
| 2643 | |
| 2644 | void DescriptorProto_ReservedRange::InitAsDefaultInstance() { |
| 2645 | } |
| 2646 | |
| 2647 | DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) |
| 2648 | : ::google::protobuf::Message(), |
| 2649 | _internal_metadata_(NULL) { |
| 2650 | SharedCtor(); |
| 2651 | MergeFrom(from); |
| 2652 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2653 | } |
| 2654 | |
| 2655 | void DescriptorProto_ReservedRange::SharedCtor() { |
| 2656 | _cached_size_ = 0; |
| 2657 | start_ = 0; |
| 2658 | end_ = 0; |
| 2659 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2660 | } |
| 2661 | |
| 2662 | DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() { |
| 2663 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2664 | SharedDtor(); |
| 2665 | } |
| 2666 | |
| 2667 | void DescriptorProto_ReservedRange::SharedDtor() { |
| 2668 | if (this != default_instance_) { |
| 2669 | } |
| 2670 | } |
| 2671 | |
| 2672 | void DescriptorProto_ReservedRange::SetCachedSize(int size) const { |
| 2673 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2674 | _cached_size_ = size; |
| 2675 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2676 | } |
| 2677 | const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange::descriptor() { |
| 2678 | protobuf_AssignDescriptorsOnce(); |
| 2679 | return DescriptorProto_ReservedRange_descriptor_; |
| 2680 | } |
| 2681 | |
| 2682 | const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() { |
| 2683 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 2684 | return *default_instance_; |
| 2685 | } |
| 2686 | |
| 2687 | DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::default_instance_ = NULL; |
| 2688 | |
| 2689 | DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::protobuf::Arena* arena) const { |
| 2690 | DescriptorProto_ReservedRange* n = new DescriptorProto_ReservedRange; |
| 2691 | if (arena != NULL) { |
| 2692 | arena->Own(n); |
| 2693 | } |
| 2694 | return n; |
| 2695 | } |
| 2696 | |
| 2697 | void DescriptorProto_ReservedRange::Clear() { |
| 2698 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 2699 | &reinterpret_cast<DescriptorProto_ReservedRange*>(16)->f) |
| 2700 | |
| 2701 | #define ZR_(first, last) do {\ |
| 2702 | ::memset(&first, 0,\ |
| 2703 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 2704 | } while (0) |
| 2705 | |
| 2706 | ZR_(start_, end_); |
| 2707 | |
| 2708 | #undef ZR_HELPER_ |
| 2709 | #undef ZR_ |
| 2710 | |
| 2711 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2712 | if (_internal_metadata_.have_unknown_fields()) { |
| 2713 | mutable_unknown_fields()->Clear(); |
| 2714 | } |
| 2715 | } |
| 2716 | |
| 2717 | bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( |
| 2718 | ::google::protobuf::io::CodedInputStream* input) { |
| 2719 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 2720 | ::google::protobuf::uint32 tag; |
| 2721 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2722 | for (;;) { |
| 2723 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 2724 | tag = p.first; |
| 2725 | if (!p.second) goto handle_unusual; |
| 2726 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2727 | // optional int32 start = 1; |
| 2728 | case 1: { |
| 2729 | if (tag == 8) { |
| 2730 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2731 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2732 | input, &start_))); |
| 2733 | set_has_start(); |
| 2734 | } else { |
| 2735 | goto handle_unusual; |
| 2736 | } |
| 2737 | if (input->ExpectTag(16)) goto parse_end; |
| 2738 | break; |
| 2739 | } |
| 2740 | |
| 2741 | // optional int32 end = 2; |
| 2742 | case 2: { |
| 2743 | if (tag == 16) { |
| 2744 | parse_end: |
| 2745 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2746 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2747 | input, &end_))); |
| 2748 | set_has_end(); |
| 2749 | } else { |
| 2750 | goto handle_unusual; |
| 2751 | } |
| 2752 | if (input->ExpectAtEnd()) goto success; |
| 2753 | break; |
| 2754 | } |
| 2755 | |
| 2756 | default: { |
| 2757 | handle_unusual: |
| 2758 | if (tag == 0 || |
| 2759 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 2760 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 2761 | goto success; |
| 2762 | } |
| 2763 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2764 | input, tag, mutable_unknown_fields())); |
| 2765 | break; |
| 2766 | } |
| 2767 | } |
| 2768 | } |
| 2769 | success: |
| 2770 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange) |
| 2771 | return true; |
| 2772 | failure: |
| 2773 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange) |
| 2774 | return false; |
| 2775 | #undef DO_ |
| 2776 | } |
| 2777 | |
| 2778 | void DescriptorProto_ReservedRange::SerializeWithCachedSizes( |
| 2779 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2780 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2781 | // optional int32 start = 1; |
| 2782 | if (has_start()) { |
| 2783 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); |
| 2784 | } |
| 2785 | |
| 2786 | // optional int32 end = 2; |
| 2787 | if (has_end()) { |
| 2788 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); |
| 2789 | } |
| 2790 | |
| 2791 | if (_internal_metadata_.have_unknown_fields()) { |
| 2792 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2793 | unknown_fields(), output); |
| 2794 | } |
| 2795 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) |
| 2796 | } |
| 2797 | |
| 2798 | ::google::protobuf::uint8* DescriptorProto_ReservedRange::SerializeWithCachedSizesToArray( |
| 2799 | ::google::protobuf::uint8* target) const { |
| 2800 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2801 | // optional int32 start = 1; |
| 2802 | if (has_start()) { |
| 2803 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); |
| 2804 | } |
| 2805 | |
| 2806 | // optional int32 end = 2; |
| 2807 | if (has_end()) { |
| 2808 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); |
| 2809 | } |
| 2810 | |
| 2811 | if (_internal_metadata_.have_unknown_fields()) { |
| 2812 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2813 | unknown_fields(), target); |
| 2814 | } |
| 2815 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) |
| 2816 | return target; |
| 2817 | } |
| 2818 | |
| 2819 | int DescriptorProto_ReservedRange::ByteSize() const { |
| 2820 | int total_size = 0; |
| 2821 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 2822 | if (_has_bits_[0 / 32] & 3u) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2823 | // optional int32 start = 1; |
| 2824 | if (has_start()) { |
| 2825 | total_size += 1 + |
| 2826 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 2827 | this->start()); |
| 2828 | } |
| 2829 | |
| 2830 | // optional int32 end = 2; |
| 2831 | if (has_end()) { |
| 2832 | total_size += 1 + |
| 2833 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 2834 | this->end()); |
| 2835 | } |
| 2836 | |
| 2837 | } |
| 2838 | if (_internal_metadata_.have_unknown_fields()) { |
| 2839 | total_size += |
| 2840 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2841 | unknown_fields()); |
| 2842 | } |
| 2843 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2844 | _cached_size_ = total_size; |
| 2845 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2846 | return total_size; |
| 2847 | } |
| 2848 | |
| 2849 | void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) { |
| 2850 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2851 | const DescriptorProto_ReservedRange* source = |
| 2852 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ReservedRange>( |
| 2853 | &from); |
| 2854 | if (source == NULL) { |
| 2855 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 2856 | } else { |
| 2857 | MergeFrom(*source); |
| 2858 | } |
| 2859 | } |
| 2860 | |
| 2861 | void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) { |
| 2862 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2863 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 2864 | if (from.has_start()) { |
| 2865 | set_start(from.start()); |
| 2866 | } |
| 2867 | if (from.has_end()) { |
| 2868 | set_end(from.end()); |
| 2869 | } |
| 2870 | } |
| 2871 | if (from._internal_metadata_.have_unknown_fields()) { |
| 2872 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 2873 | } |
| 2874 | } |
| 2875 | |
| 2876 | void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) { |
| 2877 | if (&from == this) return; |
| 2878 | Clear(); |
| 2879 | MergeFrom(from); |
| 2880 | } |
| 2881 | |
| 2882 | void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) { |
| 2883 | if (&from == this) return; |
| 2884 | Clear(); |
| 2885 | MergeFrom(from); |
| 2886 | } |
| 2887 | |
| 2888 | bool DescriptorProto_ReservedRange::IsInitialized() const { |
| 2889 | |
| 2890 | return true; |
| 2891 | } |
| 2892 | |
| 2893 | void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) { |
| 2894 | if (other == this) return; |
| 2895 | InternalSwap(other); |
| 2896 | } |
| 2897 | void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) { |
| 2898 | std::swap(start_, other->start_); |
| 2899 | std::swap(end_, other->end_); |
| 2900 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 2901 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2902 | std::swap(_cached_size_, other->_cached_size_); |
| 2903 | } |
| 2904 | |
| 2905 | ::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const { |
| 2906 | protobuf_AssignDescriptorsOnce(); |
| 2907 | ::google::protobuf::Metadata metadata; |
| 2908 | metadata.descriptor = DescriptorProto_ReservedRange_descriptor_; |
| 2909 | metadata.reflection = DescriptorProto_ReservedRange_reflection_; |
| 2910 | return metadata; |
| 2911 | } |
| 2912 | |
| 2913 | |
| 2914 | // ------------------------------------------------------------------- |
| 2915 | |
| 2916 | #ifndef _MSC_VER |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2917 | const int DescriptorProto::kNameFieldNumber; |
| 2918 | const int DescriptorProto::kFieldFieldNumber; |
| 2919 | const int DescriptorProto::kExtensionFieldNumber; |
| 2920 | const int DescriptorProto::kNestedTypeFieldNumber; |
| 2921 | const int DescriptorProto::kEnumTypeFieldNumber; |
| 2922 | const int DescriptorProto::kExtensionRangeFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2923 | const int DescriptorProto::kOneofDeclFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2924 | const int DescriptorProto::kOptionsFieldNumber; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2925 | const int DescriptorProto::kReservedRangeFieldNumber; |
| 2926 | const int DescriptorProto::kReservedNameFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2927 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2928 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2929 | DescriptorProto::DescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2930 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2931 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2932 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2933 | } |
| 2934 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2935 | void DescriptorProto::InitAsDefaultInstance() { |
| 2936 | options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2937 | } |
| 2938 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2939 | DescriptorProto::DescriptorProto(const DescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2940 | : ::google::protobuf::Message(), |
| 2941 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2942 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2943 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2944 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2945 | } |
| 2946 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2947 | void DescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2948 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2949 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2950 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2951 | options_ = NULL; |
| 2952 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2953 | } |
| 2954 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2955 | DescriptorProto::~DescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2956 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2957 | SharedDtor(); |
| 2958 | } |
| 2959 | |
| 2960 | void DescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2961 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2962 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2963 | delete options_; |
| 2964 | } |
| 2965 | } |
| 2966 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2967 | void DescriptorProto::SetCachedSize(int size) const { |
| 2968 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2969 | _cached_size_ = size; |
| 2970 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2971 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2972 | const ::google::protobuf::Descriptor* DescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2973 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2974 | return DescriptorProto_descriptor_; |
| 2975 | } |
| 2976 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2977 | const DescriptorProto& DescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 2978 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 2979 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2980 | } |
| 2981 | |
| 2982 | DescriptorProto* DescriptorProto::default_instance_ = NULL; |
| 2983 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2984 | DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2985 | DescriptorProto* n = new DescriptorProto; |
| 2986 | if (arena != NULL) { |
| 2987 | arena->Own(n); |
| 2988 | } |
| 2989 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2990 | } |
| 2991 | |
| 2992 | void DescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 2993 | if (_has_bits_[0 / 32] & 129u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2994 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2995 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2996 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2997 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2998 | if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); |
| 2999 | } |
| 3000 | } |
| 3001 | field_.Clear(); |
| 3002 | extension_.Clear(); |
| 3003 | nested_type_.Clear(); |
| 3004 | enum_type_.Clear(); |
| 3005 | extension_range_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3006 | oneof_decl_.Clear(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3007 | reserved_range_.Clear(); |
| 3008 | reserved_name_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3009 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3010 | if (_internal_metadata_.have_unknown_fields()) { |
| 3011 | mutable_unknown_fields()->Clear(); |
| 3012 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3013 | } |
| 3014 | |
| 3015 | bool DescriptorProto::MergePartialFromCodedStream( |
| 3016 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3017 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3018 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3019 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto) |
| 3020 | for (;;) { |
| 3021 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 3022 | tag = p.first; |
| 3023 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3024 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3025 | // optional string name = 1; |
| 3026 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3027 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3028 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3029 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3030 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3031 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3032 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3033 | "google.protobuf.DescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3034 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3035 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3036 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3037 | if (input->ExpectTag(18)) goto parse_field; |
| 3038 | break; |
| 3039 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3040 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3041 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
| 3042 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3043 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3044 | parse_field: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3045 | DO_(input->IncrementRecursionDepth()); |
| 3046 | parse_loop_field: |
| 3047 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3048 | input, add_field())); |
| 3049 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3050 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3051 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3052 | if (input->ExpectTag(18)) goto parse_loop_field; |
| 3053 | if (input->ExpectTag(26)) goto parse_loop_nested_type; |
| 3054 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3055 | break; |
| 3056 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3057 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3058 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
| 3059 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3060 | if (tag == 26) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3061 | DO_(input->IncrementRecursionDepth()); |
| 3062 | parse_loop_nested_type: |
| 3063 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3064 | input, add_nested_type())); |
| 3065 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3066 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3067 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3068 | if (input->ExpectTag(26)) goto parse_loop_nested_type; |
| 3069 | if (input->ExpectTag(34)) goto parse_loop_enum_type; |
| 3070 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3071 | break; |
| 3072 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3073 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3074 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
| 3075 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3076 | if (tag == 34) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3077 | DO_(input->IncrementRecursionDepth()); |
| 3078 | parse_loop_enum_type: |
| 3079 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3080 | input, add_enum_type())); |
| 3081 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3082 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3083 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3084 | if (input->ExpectTag(34)) goto parse_loop_enum_type; |
| 3085 | if (input->ExpectTag(42)) goto parse_loop_extension_range; |
| 3086 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3087 | break; |
| 3088 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3089 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3090 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
| 3091 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3092 | if (tag == 42) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3093 | DO_(input->IncrementRecursionDepth()); |
| 3094 | parse_loop_extension_range: |
| 3095 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3096 | input, add_extension_range())); |
| 3097 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3098 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3099 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3100 | if (input->ExpectTag(42)) goto parse_loop_extension_range; |
| 3101 | if (input->ExpectTag(50)) goto parse_loop_extension; |
| 3102 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3103 | break; |
| 3104 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3105 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3106 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
| 3107 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3108 | if (tag == 50) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3109 | DO_(input->IncrementRecursionDepth()); |
| 3110 | parse_loop_extension: |
| 3111 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3112 | input, add_extension())); |
| 3113 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3114 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3115 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3116 | if (input->ExpectTag(50)) goto parse_loop_extension; |
| 3117 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3118 | if (input->ExpectTag(58)) goto parse_options; |
| 3119 | break; |
| 3120 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3121 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3122 | // optional .google.protobuf.MessageOptions options = 7; |
| 3123 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3124 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3125 | parse_options: |
| 3126 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 3127 | input, mutable_options())); |
| 3128 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3129 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3130 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3131 | if (input->ExpectTag(66)) goto parse_oneof_decl; |
| 3132 | break; |
| 3133 | } |
| 3134 | |
| 3135 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
| 3136 | case 8: { |
| 3137 | if (tag == 66) { |
| 3138 | parse_oneof_decl: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3139 | DO_(input->IncrementRecursionDepth()); |
| 3140 | parse_loop_oneof_decl: |
| 3141 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3142 | input, add_oneof_decl())); |
| 3143 | } else { |
| 3144 | goto handle_unusual; |
| 3145 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3146 | if (input->ExpectTag(66)) goto parse_loop_oneof_decl; |
| 3147 | if (input->ExpectTag(74)) goto parse_loop_reserved_range; |
| 3148 | input->UnsafeDecrementRecursionDepth(); |
| 3149 | break; |
| 3150 | } |
| 3151 | |
| 3152 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3153 | case 9: { |
| 3154 | if (tag == 74) { |
| 3155 | DO_(input->IncrementRecursionDepth()); |
| 3156 | parse_loop_reserved_range: |
| 3157 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| 3158 | input, add_reserved_range())); |
| 3159 | } else { |
| 3160 | goto handle_unusual; |
| 3161 | } |
| 3162 | if (input->ExpectTag(74)) goto parse_loop_reserved_range; |
| 3163 | input->UnsafeDecrementRecursionDepth(); |
| 3164 | if (input->ExpectTag(82)) goto parse_reserved_name; |
| 3165 | break; |
| 3166 | } |
| 3167 | |
| 3168 | // repeated string reserved_name = 10; |
| 3169 | case 10: { |
| 3170 | if (tag == 82) { |
| 3171 | parse_reserved_name: |
| 3172 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3173 | input, this->add_reserved_name())); |
| 3174 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3175 | this->reserved_name(this->reserved_name_size() - 1).data(), |
| 3176 | this->reserved_name(this->reserved_name_size() - 1).length(), |
| 3177 | ::google::protobuf::internal::WireFormat::PARSE, |
| 3178 | "google.protobuf.DescriptorProto.reserved_name"); |
| 3179 | } else { |
| 3180 | goto handle_unusual; |
| 3181 | } |
| 3182 | if (input->ExpectTag(82)) goto parse_reserved_name; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3183 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3184 | break; |
| 3185 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3186 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3187 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3188 | handle_unusual: |
| 3189 | if (tag == 0 || |
| 3190 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3191 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3192 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3193 | } |
| 3194 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 3195 | input, tag, mutable_unknown_fields())); |
| 3196 | break; |
| 3197 | } |
| 3198 | } |
| 3199 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3200 | success: |
| 3201 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3202 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3203 | failure: |
| 3204 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto) |
| 3205 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3206 | #undef DO_ |
| 3207 | } |
| 3208 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3209 | void DescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3210 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3211 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3212 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3213 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3214 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3215 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3216 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3217 | "google.protobuf.DescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3218 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3219 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3220 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3221 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3222 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3223 | for (unsigned int i = 0, n = this->field_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3224 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3225 | 2, this->field(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3226 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3227 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3228 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3229 | for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3230 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3231 | 3, this->nested_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3232 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3233 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3234 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3235 | for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3236 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3237 | 4, this->enum_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3238 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3239 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3240 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3241 | for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3242 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3243 | 5, this->extension_range(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3244 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3245 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3246 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3247 | for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3248 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3249 | 6, this->extension(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3250 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3251 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3252 | // optional .google.protobuf.MessageOptions options = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3253 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3254 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3255 | 7, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3256 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3257 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3258 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3259 | for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3260 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3261 | 8, this->oneof_decl(i), output); |
| 3262 | } |
| 3263 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3264 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3265 | for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { |
| 3266 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3267 | 9, this->reserved_range(i), output); |
| 3268 | } |
| 3269 | |
| 3270 | // repeated string reserved_name = 10; |
| 3271 | for (int i = 0; i < this->reserved_name_size(); i++) { |
| 3272 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3273 | this->reserved_name(i).data(), this->reserved_name(i).length(), |
| 3274 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 3275 | "google.protobuf.DescriptorProto.reserved_name"); |
| 3276 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 3277 | 10, this->reserved_name(i), output); |
| 3278 | } |
| 3279 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3280 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3281 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3282 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3283 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3284 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3285 | } |
| 3286 | |
| 3287 | ::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray( |
| 3288 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3289 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3290 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3291 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3292 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3293 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3294 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3295 | "google.protobuf.DescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3296 | target = |
| 3297 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3298 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3299 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3300 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3301 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3302 | for (unsigned int i = 0, n = this->field_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3303 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3304 | WriteMessageNoVirtualToArray( |
| 3305 | 2, this->field(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3306 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3307 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3308 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3309 | for (unsigned int i = 0, n = this->nested_type_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3310 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3311 | WriteMessageNoVirtualToArray( |
| 3312 | 3, this->nested_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3313 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3314 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3315 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3316 | for (unsigned int i = 0, n = this->enum_type_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3317 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3318 | WriteMessageNoVirtualToArray( |
| 3319 | 4, this->enum_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3320 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3321 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3322 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3323 | for (unsigned int i = 0, n = this->extension_range_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3324 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3325 | WriteMessageNoVirtualToArray( |
| 3326 | 5, this->extension_range(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3327 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3328 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3329 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3330 | for (unsigned int i = 0, n = this->extension_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3331 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3332 | WriteMessageNoVirtualToArray( |
| 3333 | 6, this->extension(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3334 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3335 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3336 | // optional .google.protobuf.MessageOptions options = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3337 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3338 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3339 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3340 | 7, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3341 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3342 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3343 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3344 | for (unsigned int i = 0, n = this->oneof_decl_size(); i < n; i++) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3345 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3346 | WriteMessageNoVirtualToArray( |
| 3347 | 8, this->oneof_decl(i), target); |
| 3348 | } |
| 3349 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3350 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3351 | for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { |
| 3352 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3353 | WriteMessageNoVirtualToArray( |
| 3354 | 9, this->reserved_range(i), target); |
| 3355 | } |
| 3356 | |
| 3357 | // repeated string reserved_name = 10; |
| 3358 | for (int i = 0; i < this->reserved_name_size(); i++) { |
| 3359 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3360 | this->reserved_name(i).data(), this->reserved_name(i).length(), |
| 3361 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 3362 | "google.protobuf.DescriptorProto.reserved_name"); |
| 3363 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3364 | WriteStringToArray(10, this->reserved_name(i), target); |
| 3365 | } |
| 3366 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3367 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3368 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3369 | unknown_fields(), target); |
| 3370 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3371 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3372 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3373 | } |
| 3374 | |
| 3375 | int DescriptorProto::ByteSize() const { |
| 3376 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3377 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 3378 | if (_has_bits_[0 / 32] & 129u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3379 | // optional string name = 1; |
| 3380 | if (has_name()) { |
| 3381 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3382 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3383 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3384 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3385 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3386 | // optional .google.protobuf.MessageOptions options = 7; |
| 3387 | if (has_options()) { |
| 3388 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3389 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3390 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3391 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3392 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3393 | } |
| 3394 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3395 | total_size += 1 * this->field_size(); |
| 3396 | for (int i = 0; i < this->field_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3397 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3398 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3399 | this->field(i)); |
| 3400 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3401 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3402 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3403 | total_size += 1 * this->extension_size(); |
| 3404 | for (int i = 0; i < this->extension_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3405 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3406 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3407 | this->extension(i)); |
| 3408 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3409 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3410 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3411 | total_size += 1 * this->nested_type_size(); |
| 3412 | for (int i = 0; i < this->nested_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3413 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3414 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3415 | this->nested_type(i)); |
| 3416 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3417 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3418 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3419 | total_size += 1 * this->enum_type_size(); |
| 3420 | for (int i = 0; i < this->enum_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3421 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3422 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3423 | this->enum_type(i)); |
| 3424 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3425 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3426 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3427 | total_size += 1 * this->extension_range_size(); |
| 3428 | for (int i = 0; i < this->extension_range_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3429 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3430 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3431 | this->extension_range(i)); |
| 3432 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3433 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3434 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
| 3435 | total_size += 1 * this->oneof_decl_size(); |
| 3436 | for (int i = 0; i < this->oneof_decl_size(); i++) { |
| 3437 | total_size += |
| 3438 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 3439 | this->oneof_decl(i)); |
| 3440 | } |
| 3441 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3442 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3443 | total_size += 1 * this->reserved_range_size(); |
| 3444 | for (int i = 0; i < this->reserved_range_size(); i++) { |
| 3445 | total_size += |
| 3446 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 3447 | this->reserved_range(i)); |
| 3448 | } |
| 3449 | |
| 3450 | // repeated string reserved_name = 10; |
| 3451 | total_size += 1 * this->reserved_name_size(); |
| 3452 | for (int i = 0; i < this->reserved_name_size(); i++) { |
| 3453 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3454 | this->reserved_name(i)); |
| 3455 | } |
| 3456 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3457 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3458 | total_size += |
| 3459 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3460 | unknown_fields()); |
| 3461 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3462 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3463 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3464 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3465 | return total_size; |
| 3466 | } |
| 3467 | |
| 3468 | void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3469 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3470 | const DescriptorProto* source = |
| 3471 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto>( |
| 3472 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3473 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 3474 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3475 | } else { |
| 3476 | MergeFrom(*source); |
| 3477 | } |
| 3478 | } |
| 3479 | |
| 3480 | void DescriptorProto::MergeFrom(const DescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3481 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3482 | field_.MergeFrom(from.field_); |
| 3483 | extension_.MergeFrom(from.extension_); |
| 3484 | nested_type_.MergeFrom(from.nested_type_); |
| 3485 | enum_type_.MergeFrom(from.enum_type_); |
| 3486 | extension_range_.MergeFrom(from.extension_range_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3487 | oneof_decl_.MergeFrom(from.oneof_decl_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3488 | reserved_range_.MergeFrom(from.reserved_range_); |
| 3489 | reserved_name_.MergeFrom(from.reserved_name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3490 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3491 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3492 | set_has_name(); |
| 3493 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3494 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3495 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3496 | mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options()); |
| 3497 | } |
| 3498 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3499 | if (from._internal_metadata_.have_unknown_fields()) { |
| 3500 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 3501 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3502 | } |
| 3503 | |
| 3504 | void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 3505 | if (&from == this) return; |
| 3506 | Clear(); |
| 3507 | MergeFrom(from); |
| 3508 | } |
| 3509 | |
| 3510 | void DescriptorProto::CopyFrom(const DescriptorProto& from) { |
| 3511 | if (&from == this) return; |
| 3512 | Clear(); |
| 3513 | MergeFrom(from); |
| 3514 | } |
| 3515 | |
| 3516 | bool DescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3517 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3518 | if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false; |
| 3519 | if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; |
| 3520 | if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false; |
| 3521 | if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3522 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3523 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3524 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3525 | return true; |
| 3526 | } |
| 3527 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 3528 | void DescriptorProto::Swap(DescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3529 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3530 | InternalSwap(other); |
| 3531 | } |
| 3532 | void DescriptorProto::InternalSwap(DescriptorProto* other) { |
| 3533 | name_.Swap(&other->name_); |
| 3534 | field_.UnsafeArenaSwap(&other->field_); |
| 3535 | extension_.UnsafeArenaSwap(&other->extension_); |
| 3536 | nested_type_.UnsafeArenaSwap(&other->nested_type_); |
| 3537 | enum_type_.UnsafeArenaSwap(&other->enum_type_); |
| 3538 | extension_range_.UnsafeArenaSwap(&other->extension_range_); |
| 3539 | oneof_decl_.UnsafeArenaSwap(&other->oneof_decl_); |
| 3540 | std::swap(options_, other->options_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3541 | reserved_range_.UnsafeArenaSwap(&other->reserved_range_); |
| 3542 | reserved_name_.UnsafeArenaSwap(&other->reserved_name_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3543 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 3544 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3545 | std::swap(_cached_size_, other->_cached_size_); |
| 3546 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 3547 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3548 | ::google::protobuf::Metadata DescriptorProto::GetMetadata() const { |
| 3549 | protobuf_AssignDescriptorsOnce(); |
| 3550 | ::google::protobuf::Metadata metadata; |
| 3551 | metadata.descriptor = DescriptorProto_descriptor_; |
| 3552 | metadata.reflection = DescriptorProto_reflection_; |
| 3553 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3554 | } |
| 3555 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3556 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3557 | // DescriptorProto_ExtensionRange |
| 3558 | |
| 3559 | // optional int32 start = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3560 | bool DescriptorProto_ExtensionRange::has_start() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3561 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3562 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3563 | void DescriptorProto_ExtensionRange::set_has_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3564 | _has_bits_[0] |= 0x00000001u; |
| 3565 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3566 | void DescriptorProto_ExtensionRange::clear_has_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3567 | _has_bits_[0] &= ~0x00000001u; |
| 3568 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3569 | void DescriptorProto_ExtensionRange::clear_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3570 | start_ = 0; |
| 3571 | clear_has_start(); |
| 3572 | } |
| 3573 | ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const { |
| 3574 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start) |
| 3575 | return start_; |
| 3576 | } |
| 3577 | void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) { |
| 3578 | set_has_start(); |
| 3579 | start_ = value; |
| 3580 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start) |
| 3581 | } |
| 3582 | |
| 3583 | // optional int32 end = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3584 | bool DescriptorProto_ExtensionRange::has_end() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3585 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 3586 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3587 | void DescriptorProto_ExtensionRange::set_has_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3588 | _has_bits_[0] |= 0x00000002u; |
| 3589 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3590 | void DescriptorProto_ExtensionRange::clear_has_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3591 | _has_bits_[0] &= ~0x00000002u; |
| 3592 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3593 | void DescriptorProto_ExtensionRange::clear_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3594 | end_ = 0; |
| 3595 | clear_has_end(); |
| 3596 | } |
| 3597 | ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const { |
| 3598 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end) |
| 3599 | return end_; |
| 3600 | } |
| 3601 | void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) { |
| 3602 | set_has_end(); |
| 3603 | end_ = value; |
| 3604 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end) |
| 3605 | } |
| 3606 | |
| 3607 | // ------------------------------------------------------------------- |
| 3608 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3609 | // DescriptorProto_ReservedRange |
| 3610 | |
| 3611 | // optional int32 start = 1; |
| 3612 | bool DescriptorProto_ReservedRange::has_start() const { |
| 3613 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3614 | } |
| 3615 | void DescriptorProto_ReservedRange::set_has_start() { |
| 3616 | _has_bits_[0] |= 0x00000001u; |
| 3617 | } |
| 3618 | void DescriptorProto_ReservedRange::clear_has_start() { |
| 3619 | _has_bits_[0] &= ~0x00000001u; |
| 3620 | } |
| 3621 | void DescriptorProto_ReservedRange::clear_start() { |
| 3622 | start_ = 0; |
| 3623 | clear_has_start(); |
| 3624 | } |
| 3625 | ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const { |
| 3626 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start) |
| 3627 | return start_; |
| 3628 | } |
| 3629 | void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) { |
| 3630 | set_has_start(); |
| 3631 | start_ = value; |
| 3632 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start) |
| 3633 | } |
| 3634 | |
| 3635 | // optional int32 end = 2; |
| 3636 | bool DescriptorProto_ReservedRange::has_end() const { |
| 3637 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 3638 | } |
| 3639 | void DescriptorProto_ReservedRange::set_has_end() { |
| 3640 | _has_bits_[0] |= 0x00000002u; |
| 3641 | } |
| 3642 | void DescriptorProto_ReservedRange::clear_has_end() { |
| 3643 | _has_bits_[0] &= ~0x00000002u; |
| 3644 | } |
| 3645 | void DescriptorProto_ReservedRange::clear_end() { |
| 3646 | end_ = 0; |
| 3647 | clear_has_end(); |
| 3648 | } |
| 3649 | ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const { |
| 3650 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end) |
| 3651 | return end_; |
| 3652 | } |
| 3653 | void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) { |
| 3654 | set_has_end(); |
| 3655 | end_ = value; |
| 3656 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end) |
| 3657 | } |
| 3658 | |
| 3659 | // ------------------------------------------------------------------- |
| 3660 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3661 | // DescriptorProto |
| 3662 | |
| 3663 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3664 | bool DescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3665 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3666 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3667 | void DescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3668 | _has_bits_[0] |= 0x00000001u; |
| 3669 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3670 | void DescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3671 | _has_bits_[0] &= ~0x00000001u; |
| 3672 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3673 | void DescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3674 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3675 | clear_has_name(); |
| 3676 | } |
| 3677 | const ::std::string& DescriptorProto::name() const { |
| 3678 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) |
| 3679 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3680 | } |
| 3681 | void DescriptorProto::set_name(const ::std::string& value) { |
| 3682 | set_has_name(); |
| 3683 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 3684 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) |
| 3685 | } |
| 3686 | void DescriptorProto::set_name(const char* value) { |
| 3687 | set_has_name(); |
| 3688 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 3689 | // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name) |
| 3690 | } |
| 3691 | void DescriptorProto::set_name(const char* value, size_t size) { |
| 3692 | set_has_name(); |
| 3693 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3694 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 3695 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name) |
| 3696 | } |
| 3697 | ::std::string* DescriptorProto::mutable_name() { |
| 3698 | set_has_name(); |
| 3699 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) |
| 3700 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3701 | } |
| 3702 | ::std::string* DescriptorProto::release_name() { |
| 3703 | clear_has_name(); |
| 3704 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3705 | } |
| 3706 | void DescriptorProto::set_allocated_name(::std::string* name) { |
| 3707 | if (name != NULL) { |
| 3708 | set_has_name(); |
| 3709 | } else { |
| 3710 | clear_has_name(); |
| 3711 | } |
| 3712 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 3713 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) |
| 3714 | } |
| 3715 | |
| 3716 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3717 | int DescriptorProto::field_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3718 | return field_.size(); |
| 3719 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3720 | void DescriptorProto::clear_field() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3721 | field_.Clear(); |
| 3722 | } |
| 3723 | const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const { |
| 3724 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field) |
| 3725 | return field_.Get(index); |
| 3726 | } |
| 3727 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) { |
| 3728 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field) |
| 3729 | return field_.Mutable(index); |
| 3730 | } |
| 3731 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() { |
| 3732 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field) |
| 3733 | return field_.Add(); |
| 3734 | } |
| 3735 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 3736 | DescriptorProto::field() const { |
| 3737 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field) |
| 3738 | return field_; |
| 3739 | } |
| 3740 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
| 3741 | DescriptorProto::mutable_field() { |
| 3742 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field) |
| 3743 | return &field_; |
| 3744 | } |
| 3745 | |
| 3746 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3747 | int DescriptorProto::extension_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3748 | return extension_.size(); |
| 3749 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3750 | void DescriptorProto::clear_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3751 | extension_.Clear(); |
| 3752 | } |
| 3753 | const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const { |
| 3754 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension) |
| 3755 | return extension_.Get(index); |
| 3756 | } |
| 3757 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) { |
| 3758 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension) |
| 3759 | return extension_.Mutable(index); |
| 3760 | } |
| 3761 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() { |
| 3762 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension) |
| 3763 | return extension_.Add(); |
| 3764 | } |
| 3765 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 3766 | DescriptorProto::extension() const { |
| 3767 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension) |
| 3768 | return extension_; |
| 3769 | } |
| 3770 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
| 3771 | DescriptorProto::mutable_extension() { |
| 3772 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension) |
| 3773 | return &extension_; |
| 3774 | } |
| 3775 | |
| 3776 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3777 | int DescriptorProto::nested_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3778 | return nested_type_.size(); |
| 3779 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3780 | void DescriptorProto::clear_nested_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3781 | nested_type_.Clear(); |
| 3782 | } |
| 3783 | const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const { |
| 3784 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type) |
| 3785 | return nested_type_.Get(index); |
| 3786 | } |
| 3787 | ::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) { |
| 3788 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type) |
| 3789 | return nested_type_.Mutable(index); |
| 3790 | } |
| 3791 | ::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() { |
| 3792 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type) |
| 3793 | return nested_type_.Add(); |
| 3794 | } |
| 3795 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& |
| 3796 | DescriptorProto::nested_type() const { |
| 3797 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type) |
| 3798 | return nested_type_; |
| 3799 | } |
| 3800 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* |
| 3801 | DescriptorProto::mutable_nested_type() { |
| 3802 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type) |
| 3803 | return &nested_type_; |
| 3804 | } |
| 3805 | |
| 3806 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3807 | int DescriptorProto::enum_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3808 | return enum_type_.size(); |
| 3809 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3810 | void DescriptorProto::clear_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3811 | enum_type_.Clear(); |
| 3812 | } |
| 3813 | const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const { |
| 3814 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type) |
| 3815 | return enum_type_.Get(index); |
| 3816 | } |
| 3817 | ::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) { |
| 3818 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type) |
| 3819 | return enum_type_.Mutable(index); |
| 3820 | } |
| 3821 | ::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() { |
| 3822 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type) |
| 3823 | return enum_type_.Add(); |
| 3824 | } |
| 3825 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& |
| 3826 | DescriptorProto::enum_type() const { |
| 3827 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type) |
| 3828 | return enum_type_; |
| 3829 | } |
| 3830 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* |
| 3831 | DescriptorProto::mutable_enum_type() { |
| 3832 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type) |
| 3833 | return &enum_type_; |
| 3834 | } |
| 3835 | |
| 3836 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3837 | int DescriptorProto::extension_range_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3838 | return extension_range_.size(); |
| 3839 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3840 | void DescriptorProto::clear_extension_range() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3841 | extension_range_.Clear(); |
| 3842 | } |
| 3843 | const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const { |
| 3844 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range) |
| 3845 | return extension_range_.Get(index); |
| 3846 | } |
| 3847 | ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) { |
| 3848 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range) |
| 3849 | return extension_range_.Mutable(index); |
| 3850 | } |
| 3851 | ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { |
| 3852 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range) |
| 3853 | return extension_range_.Add(); |
| 3854 | } |
| 3855 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& |
| 3856 | DescriptorProto::extension_range() const { |
| 3857 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range) |
| 3858 | return extension_range_; |
| 3859 | } |
| 3860 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* |
| 3861 | DescriptorProto::mutable_extension_range() { |
| 3862 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range) |
| 3863 | return &extension_range_; |
| 3864 | } |
| 3865 | |
| 3866 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3867 | int DescriptorProto::oneof_decl_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3868 | return oneof_decl_.size(); |
| 3869 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3870 | void DescriptorProto::clear_oneof_decl() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3871 | oneof_decl_.Clear(); |
| 3872 | } |
| 3873 | const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const { |
| 3874 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl) |
| 3875 | return oneof_decl_.Get(index); |
| 3876 | } |
| 3877 | ::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) { |
| 3878 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl) |
| 3879 | return oneof_decl_.Mutable(index); |
| 3880 | } |
| 3881 | ::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() { |
| 3882 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl) |
| 3883 | return oneof_decl_.Add(); |
| 3884 | } |
| 3885 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >& |
| 3886 | DescriptorProto::oneof_decl() const { |
| 3887 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl) |
| 3888 | return oneof_decl_; |
| 3889 | } |
| 3890 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >* |
| 3891 | DescriptorProto::mutable_oneof_decl() { |
| 3892 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl) |
| 3893 | return &oneof_decl_; |
| 3894 | } |
| 3895 | |
| 3896 | // optional .google.protobuf.MessageOptions options = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3897 | bool DescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3898 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 3899 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3900 | void DescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3901 | _has_bits_[0] |= 0x00000080u; |
| 3902 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3903 | void DescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3904 | _has_bits_[0] &= ~0x00000080u; |
| 3905 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3906 | void DescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3907 | if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); |
| 3908 | clear_has_options(); |
| 3909 | } |
| 3910 | const ::google::protobuf::MessageOptions& DescriptorProto::options() const { |
| 3911 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) |
| 3912 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 3913 | } |
| 3914 | ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { |
| 3915 | set_has_options(); |
| 3916 | if (options_ == NULL) { |
| 3917 | options_ = new ::google::protobuf::MessageOptions; |
| 3918 | } |
| 3919 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) |
| 3920 | return options_; |
| 3921 | } |
| 3922 | ::google::protobuf::MessageOptions* DescriptorProto::release_options() { |
| 3923 | clear_has_options(); |
| 3924 | ::google::protobuf::MessageOptions* temp = options_; |
| 3925 | options_ = NULL; |
| 3926 | return temp; |
| 3927 | } |
| 3928 | void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) { |
| 3929 | delete options_; |
| 3930 | options_ = options; |
| 3931 | if (options) { |
| 3932 | set_has_options(); |
| 3933 | } else { |
| 3934 | clear_has_options(); |
| 3935 | } |
| 3936 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options) |
| 3937 | } |
| 3938 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3939 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3940 | int DescriptorProto::reserved_range_size() const { |
| 3941 | return reserved_range_.size(); |
| 3942 | } |
| 3943 | void DescriptorProto::clear_reserved_range() { |
| 3944 | reserved_range_.Clear(); |
| 3945 | } |
| 3946 | const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const { |
| 3947 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range) |
| 3948 | return reserved_range_.Get(index); |
| 3949 | } |
| 3950 | ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) { |
| 3951 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range) |
| 3952 | return reserved_range_.Mutable(index); |
| 3953 | } |
| 3954 | ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() { |
| 3955 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range) |
| 3956 | return reserved_range_.Add(); |
| 3957 | } |
| 3958 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >& |
| 3959 | DescriptorProto::reserved_range() const { |
| 3960 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range) |
| 3961 | return reserved_range_; |
| 3962 | } |
| 3963 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >* |
| 3964 | DescriptorProto::mutable_reserved_range() { |
| 3965 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range) |
| 3966 | return &reserved_range_; |
| 3967 | } |
| 3968 | |
| 3969 | // repeated string reserved_name = 10; |
| 3970 | int DescriptorProto::reserved_name_size() const { |
| 3971 | return reserved_name_.size(); |
| 3972 | } |
| 3973 | void DescriptorProto::clear_reserved_name() { |
| 3974 | reserved_name_.Clear(); |
| 3975 | } |
| 3976 | const ::std::string& DescriptorProto::reserved_name(int index) const { |
| 3977 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) |
| 3978 | return reserved_name_.Get(index); |
| 3979 | } |
| 3980 | ::std::string* DescriptorProto::mutable_reserved_name(int index) { |
| 3981 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) |
| 3982 | return reserved_name_.Mutable(index); |
| 3983 | } |
| 3984 | void DescriptorProto::set_reserved_name(int index, const ::std::string& value) { |
| 3985 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) |
| 3986 | reserved_name_.Mutable(index)->assign(value); |
| 3987 | } |
| 3988 | void DescriptorProto::set_reserved_name(int index, const char* value) { |
| 3989 | reserved_name_.Mutable(index)->assign(value); |
| 3990 | // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name) |
| 3991 | } |
| 3992 | void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) { |
| 3993 | reserved_name_.Mutable(index)->assign( |
| 3994 | reinterpret_cast<const char*>(value), size); |
| 3995 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name) |
| 3996 | } |
| 3997 | ::std::string* DescriptorProto::add_reserved_name() { |
| 3998 | return reserved_name_.Add(); |
| 3999 | } |
| 4000 | void DescriptorProto::add_reserved_name(const ::std::string& value) { |
| 4001 | reserved_name_.Add()->assign(value); |
| 4002 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) |
| 4003 | } |
| 4004 | void DescriptorProto::add_reserved_name(const char* value) { |
| 4005 | reserved_name_.Add()->assign(value); |
| 4006 | // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name) |
| 4007 | } |
| 4008 | void DescriptorProto::add_reserved_name(const char* value, size_t size) { |
| 4009 | reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 4010 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name) |
| 4011 | } |
| 4012 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 4013 | DescriptorProto::reserved_name() const { |
| 4014 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name) |
| 4015 | return reserved_name_; |
| 4016 | } |
| 4017 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 4018 | DescriptorProto::mutable_reserved_name() { |
| 4019 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name) |
| 4020 | return &reserved_name_; |
| 4021 | } |
| 4022 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4023 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4024 | |
| 4025 | // =================================================================== |
| 4026 | |
| 4027 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4028 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4029 | return FieldDescriptorProto_Type_descriptor_; |
| 4030 | } |
| 4031 | bool FieldDescriptorProto_Type_IsValid(int value) { |
| 4032 | switch(value) { |
| 4033 | case 1: |
| 4034 | case 2: |
| 4035 | case 3: |
| 4036 | case 4: |
| 4037 | case 5: |
| 4038 | case 6: |
| 4039 | case 7: |
| 4040 | case 8: |
| 4041 | case 9: |
| 4042 | case 10: |
| 4043 | case 11: |
| 4044 | case 12: |
| 4045 | case 13: |
| 4046 | case 14: |
| 4047 | case 15: |
| 4048 | case 16: |
| 4049 | case 17: |
| 4050 | case 18: |
| 4051 | return true; |
| 4052 | default: |
| 4053 | return false; |
| 4054 | } |
| 4055 | } |
| 4056 | |
| 4057 | #ifndef _MSC_VER |
| 4058 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE; |
| 4059 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT; |
| 4060 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64; |
| 4061 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64; |
| 4062 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32; |
| 4063 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64; |
| 4064 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32; |
| 4065 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL; |
| 4066 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING; |
| 4067 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP; |
| 4068 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE; |
| 4069 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES; |
| 4070 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32; |
| 4071 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM; |
| 4072 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32; |
| 4073 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64; |
| 4074 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32; |
| 4075 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64; |
| 4076 | const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN; |
| 4077 | const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4078 | const int FieldDescriptorProto::Type_ARRAYSIZE; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4079 | #endif // _MSC_VER |
| 4080 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4081 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4082 | return FieldDescriptorProto_Label_descriptor_; |
| 4083 | } |
| 4084 | bool FieldDescriptorProto_Label_IsValid(int value) { |
| 4085 | switch(value) { |
| 4086 | case 1: |
| 4087 | case 2: |
| 4088 | case 3: |
| 4089 | return true; |
| 4090 | default: |
| 4091 | return false; |
| 4092 | } |
| 4093 | } |
| 4094 | |
| 4095 | #ifndef _MSC_VER |
| 4096 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL; |
| 4097 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED; |
| 4098 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED; |
| 4099 | const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN; |
| 4100 | const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4101 | const int FieldDescriptorProto::Label_ARRAYSIZE; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4102 | #endif // _MSC_VER |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 4103 | #ifndef _MSC_VER |
| 4104 | const int FieldDescriptorProto::kNameFieldNumber; |
| 4105 | const int FieldDescriptorProto::kNumberFieldNumber; |
| 4106 | const int FieldDescriptorProto::kLabelFieldNumber; |
| 4107 | const int FieldDescriptorProto::kTypeFieldNumber; |
| 4108 | const int FieldDescriptorProto::kTypeNameFieldNumber; |
| 4109 | const int FieldDescriptorProto::kExtendeeFieldNumber; |
| 4110 | const int FieldDescriptorProto::kDefaultValueFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4111 | const int FieldDescriptorProto::kOneofIndexFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 4112 | const int FieldDescriptorProto::kOptionsFieldNumber; |
| 4113 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4114 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 4115 | FieldDescriptorProto::FieldDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4116 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4117 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4118 | // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4119 | } |
| 4120 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4121 | void FieldDescriptorProto::InitAsDefaultInstance() { |
| 4122 | options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4123 | } |
| 4124 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 4125 | FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4126 | : ::google::protobuf::Message(), |
| 4127 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4128 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4129 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4130 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4131 | } |
| 4132 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4133 | void FieldDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4134 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4135 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4136 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4137 | number_ = 0; |
| 4138 | label_ = 1; |
| 4139 | type_ = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4140 | type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4141 | extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4142 | default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4143 | oneof_index_ = 0; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4144 | options_ = NULL; |
| 4145 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 4146 | } |
| 4147 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4148 | FieldDescriptorProto::~FieldDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4149 | // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4150 | SharedDtor(); |
| 4151 | } |
| 4152 | |
| 4153 | void FieldDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4154 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4155 | type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4156 | extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4157 | default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4158 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4159 | delete options_; |
| 4160 | } |
| 4161 | } |
| 4162 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4163 | void FieldDescriptorProto::SetCachedSize(int size) const { |
| 4164 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 4165 | _cached_size_ = size; |
| 4166 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 4167 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4168 | const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4169 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4170 | return FieldDescriptorProto_descriptor_; |
| 4171 | } |
| 4172 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4173 | const FieldDescriptorProto& FieldDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 4174 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 4175 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4176 | } |
| 4177 | |
| 4178 | FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL; |
| 4179 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4180 | FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4181 | FieldDescriptorProto* n = new FieldDescriptorProto; |
| 4182 | if (arena != NULL) { |
| 4183 | arena->Own(n); |
| 4184 | } |
| 4185 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4186 | } |
| 4187 | |
| 4188 | void FieldDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 4189 | if (_has_bits_[0 / 32] & 255u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4190 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4191 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4192 | } |
| 4193 | number_ = 0; |
| 4194 | label_ = 1; |
| 4195 | type_ = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4196 | if (has_type_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4197 | type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4198 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4199 | if (has_extendee()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4200 | extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4201 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4202 | if (has_default_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4203 | default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4204 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4205 | oneof_index_ = 0; |
| 4206 | } |
| 4207 | if (has_options()) { |
| 4208 | if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4209 | } |
| 4210 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4211 | if (_internal_metadata_.have_unknown_fields()) { |
| 4212 | mutable_unknown_fields()->Clear(); |
| 4213 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4214 | } |
| 4215 | |
| 4216 | bool FieldDescriptorProto::MergePartialFromCodedStream( |
| 4217 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4218 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4219 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4220 | // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto) |
| 4221 | for (;;) { |
| 4222 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 4223 | tag = p.first; |
| 4224 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4225 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4226 | // optional string name = 1; |
| 4227 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4228 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4229 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4230 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4231 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4232 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4233 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4234 | "google.protobuf.FieldDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4235 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4236 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4237 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4238 | if (input->ExpectTag(18)) goto parse_extendee; |
| 4239 | break; |
| 4240 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4241 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4242 | // optional string extendee = 2; |
| 4243 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4244 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4245 | parse_extendee: |
| 4246 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4247 | input, this->mutable_extendee())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4248 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4249 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4250 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4251 | "google.protobuf.FieldDescriptorProto.extendee"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4252 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4253 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4254 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4255 | if (input->ExpectTag(24)) goto parse_number; |
| 4256 | break; |
| 4257 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4258 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4259 | // optional int32 number = 3; |
| 4260 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4261 | if (tag == 24) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4262 | parse_number: |
| 4263 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4264 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 4265 | input, &number_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4266 | set_has_number(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4267 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4268 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4269 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4270 | if (input->ExpectTag(32)) goto parse_label; |
| 4271 | break; |
| 4272 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4273 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4274 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
| 4275 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4276 | if (tag == 32) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4277 | parse_label: |
| 4278 | int value; |
| 4279 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4280 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4281 | input, &value))); |
| 4282 | if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) { |
| 4283 | set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); |
| 4284 | } else { |
| 4285 | mutable_unknown_fields()->AddVarint(4, value); |
| 4286 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4287 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4288 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4289 | } |
| 4290 | if (input->ExpectTag(40)) goto parse_type; |
| 4291 | break; |
| 4292 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4293 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4294 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
| 4295 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4296 | if (tag == 40) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4297 | parse_type: |
| 4298 | int value; |
| 4299 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4300 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4301 | input, &value))); |
| 4302 | if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) { |
| 4303 | set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); |
| 4304 | } else { |
| 4305 | mutable_unknown_fields()->AddVarint(5, value); |
| 4306 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4307 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4308 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4309 | } |
| 4310 | if (input->ExpectTag(50)) goto parse_type_name; |
| 4311 | break; |
| 4312 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4313 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4314 | // optional string type_name = 6; |
| 4315 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4316 | if (tag == 50) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4317 | parse_type_name: |
| 4318 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4319 | input, this->mutable_type_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4320 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4321 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4322 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4323 | "google.protobuf.FieldDescriptorProto.type_name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4324 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4325 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4326 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4327 | if (input->ExpectTag(58)) goto parse_default_value; |
| 4328 | break; |
| 4329 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4330 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4331 | // optional string default_value = 7; |
| 4332 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4333 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4334 | parse_default_value: |
| 4335 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4336 | input, this->mutable_default_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4337 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4338 | this->default_value().data(), this->default_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4339 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4340 | "google.protobuf.FieldDescriptorProto.default_value"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4341 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4342 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4343 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4344 | if (input->ExpectTag(66)) goto parse_options; |
| 4345 | break; |
| 4346 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4347 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4348 | // optional .google.protobuf.FieldOptions options = 8; |
| 4349 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4350 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4351 | parse_options: |
| 4352 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 4353 | input, mutable_options())); |
| 4354 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4355 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4356 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4357 | if (input->ExpectTag(72)) goto parse_oneof_index; |
| 4358 | break; |
| 4359 | } |
| 4360 | |
| 4361 | // optional int32 oneof_index = 9; |
| 4362 | case 9: { |
| 4363 | if (tag == 72) { |
| 4364 | parse_oneof_index: |
| 4365 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4366 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 4367 | input, &oneof_index_))); |
| 4368 | set_has_oneof_index(); |
| 4369 | } else { |
| 4370 | goto handle_unusual; |
| 4371 | } |
| 4372 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4373 | break; |
| 4374 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4375 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4376 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4377 | handle_unusual: |
| 4378 | if (tag == 0 || |
| 4379 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4380 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4381 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4382 | } |
| 4383 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4384 | input, tag, mutable_unknown_fields())); |
| 4385 | break; |
| 4386 | } |
| 4387 | } |
| 4388 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4389 | success: |
| 4390 | // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4391 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4392 | failure: |
| 4393 | // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto) |
| 4394 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4395 | #undef DO_ |
| 4396 | } |
| 4397 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4398 | void FieldDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4399 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4400 | // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4401 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4402 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4403 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4404 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4405 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4406 | "google.protobuf.FieldDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4407 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4408 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4409 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4410 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4411 | // optional string extendee = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4412 | if (has_extendee()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4413 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4414 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4415 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4416 | "google.protobuf.FieldDescriptorProto.extendee"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4417 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4418 | 2, this->extendee(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4419 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4420 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4421 | // optional int32 number = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4422 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4423 | ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4424 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4425 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4426 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4427 | if (has_label()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4428 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4429 | 4, this->label(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4430 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4431 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4432 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4433 | if (has_type()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4434 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4435 | 5, this->type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4436 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4437 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4438 | // optional string type_name = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4439 | if (has_type_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4440 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4441 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4442 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4443 | "google.protobuf.FieldDescriptorProto.type_name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4444 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4445 | 6, this->type_name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4446 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4447 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4448 | // optional string default_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4449 | if (has_default_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4450 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4451 | this->default_value().data(), this->default_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4452 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4453 | "google.protobuf.FieldDescriptorProto.default_value"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4454 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4455 | 7, this->default_value(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4456 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4457 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4458 | // optional .google.protobuf.FieldOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4459 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4460 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4461 | 8, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4462 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4463 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4464 | // optional int32 oneof_index = 9; |
| 4465 | if (has_oneof_index()) { |
| 4466 | ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output); |
| 4467 | } |
| 4468 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4469 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4470 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4471 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4472 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4473 | // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4474 | } |
| 4475 | |
| 4476 | ::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray( |
| 4477 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4478 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4479 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4480 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4481 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4482 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4483 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4484 | "google.protobuf.FieldDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4485 | target = |
| 4486 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4487 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4488 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4489 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4490 | // optional string extendee = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4491 | if (has_extendee()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4492 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4493 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4494 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4495 | "google.protobuf.FieldDescriptorProto.extendee"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4496 | target = |
| 4497 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4498 | 2, this->extendee(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4499 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4500 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4501 | // optional int32 number = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4502 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4503 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4504 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4505 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4506 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4507 | if (has_label()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4508 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4509 | 4, this->label(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4510 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4511 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4512 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4513 | if (has_type()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4514 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4515 | 5, this->type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4516 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4517 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4518 | // optional string type_name = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4519 | if (has_type_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4520 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4521 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4522 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4523 | "google.protobuf.FieldDescriptorProto.type_name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4524 | target = |
| 4525 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4526 | 6, this->type_name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4527 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4528 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4529 | // optional string default_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4530 | if (has_default_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4531 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4532 | this->default_value().data(), this->default_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4533 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4534 | "google.protobuf.FieldDescriptorProto.default_value"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4535 | target = |
| 4536 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4537 | 7, this->default_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4538 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4539 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4540 | // optional .google.protobuf.FieldOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4541 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4542 | target = ::google::protobuf::internal::WireFormatLite:: |
| 4543 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4544 | 8, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4545 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4546 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4547 | // optional int32 oneof_index = 9; |
| 4548 | if (has_oneof_index()) { |
| 4549 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target); |
| 4550 | } |
| 4551 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4552 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4553 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4554 | unknown_fields(), target); |
| 4555 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4556 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4557 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4558 | } |
| 4559 | |
| 4560 | int FieldDescriptorProto::ByteSize() const { |
| 4561 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4562 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 4563 | if (_has_bits_[0 / 32] & 255u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4564 | // optional string name = 1; |
| 4565 | if (has_name()) { |
| 4566 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4567 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4568 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4569 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4570 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4571 | // optional int32 number = 3; |
| 4572 | if (has_number()) { |
| 4573 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4574 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4575 | this->number()); |
| 4576 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4577 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4578 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
| 4579 | if (has_label()) { |
| 4580 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4581 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->label()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4582 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4583 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4584 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
| 4585 | if (has_type()) { |
| 4586 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4587 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4588 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4589 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4590 | // optional string type_name = 6; |
| 4591 | if (has_type_name()) { |
| 4592 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4593 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4594 | this->type_name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4595 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4596 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4597 | // optional string extendee = 2; |
| 4598 | if (has_extendee()) { |
| 4599 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4600 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4601 | this->extendee()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4602 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4603 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4604 | // optional string default_value = 7; |
| 4605 | if (has_default_value()) { |
| 4606 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4607 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4608 | this->default_value()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4609 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4610 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4611 | // optional int32 oneof_index = 9; |
| 4612 | if (has_oneof_index()) { |
| 4613 | total_size += 1 + |
| 4614 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 4615 | this->oneof_index()); |
| 4616 | } |
| 4617 | |
| 4618 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4619 | // optional .google.protobuf.FieldOptions options = 8; |
| 4620 | if (has_options()) { |
| 4621 | total_size += 1 + |
| 4622 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4623 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4624 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4625 | |
| 4626 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4627 | total_size += |
| 4628 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4629 | unknown_fields()); |
| 4630 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4631 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4632 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4633 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4634 | return total_size; |
| 4635 | } |
| 4636 | |
| 4637 | void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4638 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4639 | const FieldDescriptorProto* source = |
| 4640 | ::google::protobuf::internal::DynamicCastToGenerated<const FieldDescriptorProto>( |
| 4641 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4642 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 4643 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4644 | } else { |
| 4645 | MergeFrom(*source); |
| 4646 | } |
| 4647 | } |
| 4648 | |
| 4649 | void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4650 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4651 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4652 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4653 | set_has_name(); |
| 4654 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4655 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4656 | if (from.has_number()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4657 | set_number(from.number()); |
| 4658 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4659 | if (from.has_label()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4660 | set_label(from.label()); |
| 4661 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4662 | if (from.has_type()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4663 | set_type(from.type()); |
| 4664 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4665 | if (from.has_type_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4666 | set_has_type_name(); |
| 4667 | type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4668 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4669 | if (from.has_extendee()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4670 | set_has_extendee(); |
| 4671 | extendee_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4672 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4673 | if (from.has_default_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4674 | set_has_default_value(); |
| 4675 | default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4676 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4677 | if (from.has_oneof_index()) { |
| 4678 | set_oneof_index(from.oneof_index()); |
| 4679 | } |
| 4680 | } |
| 4681 | if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4682 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4683 | mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options()); |
| 4684 | } |
| 4685 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4686 | if (from._internal_metadata_.have_unknown_fields()) { |
| 4687 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 4688 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4689 | } |
| 4690 | |
| 4691 | void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 4692 | if (&from == this) return; |
| 4693 | Clear(); |
| 4694 | MergeFrom(from); |
| 4695 | } |
| 4696 | |
| 4697 | void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) { |
| 4698 | if (&from == this) return; |
| 4699 | Clear(); |
| 4700 | MergeFrom(from); |
| 4701 | } |
| 4702 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4703 | bool FieldDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4704 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4705 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4706 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4707 | } |
| 4708 | return true; |
| 4709 | } |
| 4710 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 4711 | void FieldDescriptorProto::Swap(FieldDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4712 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4713 | InternalSwap(other); |
| 4714 | } |
| 4715 | void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { |
| 4716 | name_.Swap(&other->name_); |
| 4717 | std::swap(number_, other->number_); |
| 4718 | std::swap(label_, other->label_); |
| 4719 | std::swap(type_, other->type_); |
| 4720 | type_name_.Swap(&other->type_name_); |
| 4721 | extendee_.Swap(&other->extendee_); |
| 4722 | default_value_.Swap(&other->default_value_); |
| 4723 | std::swap(oneof_index_, other->oneof_index_); |
| 4724 | std::swap(options_, other->options_); |
| 4725 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 4726 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4727 | std::swap(_cached_size_, other->_cached_size_); |
| 4728 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 4729 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4730 | ::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const { |
| 4731 | protobuf_AssignDescriptorsOnce(); |
| 4732 | ::google::protobuf::Metadata metadata; |
| 4733 | metadata.descriptor = FieldDescriptorProto_descriptor_; |
| 4734 | metadata.reflection = FieldDescriptorProto_reflection_; |
| 4735 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4736 | } |
| 4737 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4738 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 4739 | // FieldDescriptorProto |
| 4740 | |
| 4741 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4742 | bool FieldDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4743 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 4744 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4745 | void FieldDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4746 | _has_bits_[0] |= 0x00000001u; |
| 4747 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4748 | void FieldDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4749 | _has_bits_[0] &= ~0x00000001u; |
| 4750 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4751 | void FieldDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4752 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4753 | clear_has_name(); |
| 4754 | } |
| 4755 | const ::std::string& FieldDescriptorProto::name() const { |
| 4756 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) |
| 4757 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4758 | } |
| 4759 | void FieldDescriptorProto::set_name(const ::std::string& value) { |
| 4760 | set_has_name(); |
| 4761 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 4762 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) |
| 4763 | } |
| 4764 | void FieldDescriptorProto::set_name(const char* value) { |
| 4765 | set_has_name(); |
| 4766 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 4767 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name) |
| 4768 | } |
| 4769 | void FieldDescriptorProto::set_name(const char* value, size_t size) { |
| 4770 | set_has_name(); |
| 4771 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4772 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 4773 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name) |
| 4774 | } |
| 4775 | ::std::string* FieldDescriptorProto::mutable_name() { |
| 4776 | set_has_name(); |
| 4777 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) |
| 4778 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4779 | } |
| 4780 | ::std::string* FieldDescriptorProto::release_name() { |
| 4781 | clear_has_name(); |
| 4782 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4783 | } |
| 4784 | void FieldDescriptorProto::set_allocated_name(::std::string* name) { |
| 4785 | if (name != NULL) { |
| 4786 | set_has_name(); |
| 4787 | } else { |
| 4788 | clear_has_name(); |
| 4789 | } |
| 4790 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 4791 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) |
| 4792 | } |
| 4793 | |
| 4794 | // optional int32 number = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4795 | bool FieldDescriptorProto::has_number() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4796 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 4797 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4798 | void FieldDescriptorProto::set_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4799 | _has_bits_[0] |= 0x00000002u; |
| 4800 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4801 | void FieldDescriptorProto::clear_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4802 | _has_bits_[0] &= ~0x00000002u; |
| 4803 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4804 | void FieldDescriptorProto::clear_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4805 | number_ = 0; |
| 4806 | clear_has_number(); |
| 4807 | } |
| 4808 | ::google::protobuf::int32 FieldDescriptorProto::number() const { |
| 4809 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number) |
| 4810 | return number_; |
| 4811 | } |
| 4812 | void FieldDescriptorProto::set_number(::google::protobuf::int32 value) { |
| 4813 | set_has_number(); |
| 4814 | number_ = value; |
| 4815 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number) |
| 4816 | } |
| 4817 | |
| 4818 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4819 | bool FieldDescriptorProto::has_label() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4820 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 4821 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4822 | void FieldDescriptorProto::set_has_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4823 | _has_bits_[0] |= 0x00000004u; |
| 4824 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4825 | void FieldDescriptorProto::clear_has_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4826 | _has_bits_[0] &= ~0x00000004u; |
| 4827 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4828 | void FieldDescriptorProto::clear_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4829 | label_ = 1; |
| 4830 | clear_has_label(); |
| 4831 | } |
| 4832 | ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const { |
| 4833 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label) |
| 4834 | return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_); |
| 4835 | } |
| 4836 | void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) { |
| 4837 | assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value)); |
| 4838 | set_has_label(); |
| 4839 | label_ = value; |
| 4840 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label) |
| 4841 | } |
| 4842 | |
| 4843 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4844 | bool FieldDescriptorProto::has_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4845 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 4846 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4847 | void FieldDescriptorProto::set_has_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4848 | _has_bits_[0] |= 0x00000008u; |
| 4849 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4850 | void FieldDescriptorProto::clear_has_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4851 | _has_bits_[0] &= ~0x00000008u; |
| 4852 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4853 | void FieldDescriptorProto::clear_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4854 | type_ = 1; |
| 4855 | clear_has_type(); |
| 4856 | } |
| 4857 | ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const { |
| 4858 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type) |
| 4859 | return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_); |
| 4860 | } |
| 4861 | void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) { |
| 4862 | assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value)); |
| 4863 | set_has_type(); |
| 4864 | type_ = value; |
| 4865 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type) |
| 4866 | } |
| 4867 | |
| 4868 | // optional string type_name = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4869 | bool FieldDescriptorProto::has_type_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4870 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 4871 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4872 | void FieldDescriptorProto::set_has_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4873 | _has_bits_[0] |= 0x00000010u; |
| 4874 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4875 | void FieldDescriptorProto::clear_has_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4876 | _has_bits_[0] &= ~0x00000010u; |
| 4877 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4878 | void FieldDescriptorProto::clear_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4879 | type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4880 | clear_has_type_name(); |
| 4881 | } |
| 4882 | const ::std::string& FieldDescriptorProto::type_name() const { |
| 4883 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) |
| 4884 | return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4885 | } |
| 4886 | void FieldDescriptorProto::set_type_name(const ::std::string& value) { |
| 4887 | set_has_type_name(); |
| 4888 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 4889 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) |
| 4890 | } |
| 4891 | void FieldDescriptorProto::set_type_name(const char* value) { |
| 4892 | set_has_type_name(); |
| 4893 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 4894 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name) |
| 4895 | } |
| 4896 | void FieldDescriptorProto::set_type_name(const char* value, size_t size) { |
| 4897 | set_has_type_name(); |
| 4898 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4899 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 4900 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name) |
| 4901 | } |
| 4902 | ::std::string* FieldDescriptorProto::mutable_type_name() { |
| 4903 | set_has_type_name(); |
| 4904 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) |
| 4905 | return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4906 | } |
| 4907 | ::std::string* FieldDescriptorProto::release_type_name() { |
| 4908 | clear_has_type_name(); |
| 4909 | return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4910 | } |
| 4911 | void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) { |
| 4912 | if (type_name != NULL) { |
| 4913 | set_has_type_name(); |
| 4914 | } else { |
| 4915 | clear_has_type_name(); |
| 4916 | } |
| 4917 | type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name); |
| 4918 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) |
| 4919 | } |
| 4920 | |
| 4921 | // optional string extendee = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4922 | bool FieldDescriptorProto::has_extendee() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4923 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 4924 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4925 | void FieldDescriptorProto::set_has_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4926 | _has_bits_[0] |= 0x00000020u; |
| 4927 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4928 | void FieldDescriptorProto::clear_has_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4929 | _has_bits_[0] &= ~0x00000020u; |
| 4930 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4931 | void FieldDescriptorProto::clear_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4932 | extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4933 | clear_has_extendee(); |
| 4934 | } |
| 4935 | const ::std::string& FieldDescriptorProto::extendee() const { |
| 4936 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) |
| 4937 | return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4938 | } |
| 4939 | void FieldDescriptorProto::set_extendee(const ::std::string& value) { |
| 4940 | set_has_extendee(); |
| 4941 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 4942 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) |
| 4943 | } |
| 4944 | void FieldDescriptorProto::set_extendee(const char* value) { |
| 4945 | set_has_extendee(); |
| 4946 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 4947 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee) |
| 4948 | } |
| 4949 | void FieldDescriptorProto::set_extendee(const char* value, size_t size) { |
| 4950 | set_has_extendee(); |
| 4951 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4952 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 4953 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee) |
| 4954 | } |
| 4955 | ::std::string* FieldDescriptorProto::mutable_extendee() { |
| 4956 | set_has_extendee(); |
| 4957 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) |
| 4958 | return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4959 | } |
| 4960 | ::std::string* FieldDescriptorProto::release_extendee() { |
| 4961 | clear_has_extendee(); |
| 4962 | return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4963 | } |
| 4964 | void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) { |
| 4965 | if (extendee != NULL) { |
| 4966 | set_has_extendee(); |
| 4967 | } else { |
| 4968 | clear_has_extendee(); |
| 4969 | } |
| 4970 | extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee); |
| 4971 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) |
| 4972 | } |
| 4973 | |
| 4974 | // optional string default_value = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4975 | bool FieldDescriptorProto::has_default_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4976 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 4977 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4978 | void FieldDescriptorProto::set_has_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4979 | _has_bits_[0] |= 0x00000040u; |
| 4980 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4981 | void FieldDescriptorProto::clear_has_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4982 | _has_bits_[0] &= ~0x00000040u; |
| 4983 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4984 | void FieldDescriptorProto::clear_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4985 | default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4986 | clear_has_default_value(); |
| 4987 | } |
| 4988 | const ::std::string& FieldDescriptorProto::default_value() const { |
| 4989 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) |
| 4990 | return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4991 | } |
| 4992 | void FieldDescriptorProto::set_default_value(const ::std::string& value) { |
| 4993 | set_has_default_value(); |
| 4994 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 4995 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) |
| 4996 | } |
| 4997 | void FieldDescriptorProto::set_default_value(const char* value) { |
| 4998 | set_has_default_value(); |
| 4999 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5000 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value) |
| 5001 | } |
| 5002 | void FieldDescriptorProto::set_default_value(const char* value, size_t size) { |
| 5003 | set_has_default_value(); |
| 5004 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5005 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5006 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value) |
| 5007 | } |
| 5008 | ::std::string* FieldDescriptorProto::mutable_default_value() { |
| 5009 | set_has_default_value(); |
| 5010 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) |
| 5011 | return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5012 | } |
| 5013 | ::std::string* FieldDescriptorProto::release_default_value() { |
| 5014 | clear_has_default_value(); |
| 5015 | return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5016 | } |
| 5017 | void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) { |
| 5018 | if (default_value != NULL) { |
| 5019 | set_has_default_value(); |
| 5020 | } else { |
| 5021 | clear_has_default_value(); |
| 5022 | } |
| 5023 | default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value); |
| 5024 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) |
| 5025 | } |
| 5026 | |
| 5027 | // optional int32 oneof_index = 9; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5028 | bool FieldDescriptorProto::has_oneof_index() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5029 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 5030 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5031 | void FieldDescriptorProto::set_has_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5032 | _has_bits_[0] |= 0x00000080u; |
| 5033 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5034 | void FieldDescriptorProto::clear_has_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5035 | _has_bits_[0] &= ~0x00000080u; |
| 5036 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5037 | void FieldDescriptorProto::clear_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5038 | oneof_index_ = 0; |
| 5039 | clear_has_oneof_index(); |
| 5040 | } |
| 5041 | ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const { |
| 5042 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index) |
| 5043 | return oneof_index_; |
| 5044 | } |
| 5045 | void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) { |
| 5046 | set_has_oneof_index(); |
| 5047 | oneof_index_ = value; |
| 5048 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index) |
| 5049 | } |
| 5050 | |
| 5051 | // optional .google.protobuf.FieldOptions options = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5052 | bool FieldDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5053 | return (_has_bits_[0] & 0x00000100u) != 0; |
| 5054 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5055 | void FieldDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5056 | _has_bits_[0] |= 0x00000100u; |
| 5057 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5058 | void FieldDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5059 | _has_bits_[0] &= ~0x00000100u; |
| 5060 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5061 | void FieldDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5062 | if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); |
| 5063 | clear_has_options(); |
| 5064 | } |
| 5065 | const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { |
| 5066 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) |
| 5067 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 5068 | } |
| 5069 | ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { |
| 5070 | set_has_options(); |
| 5071 | if (options_ == NULL) { |
| 5072 | options_ = new ::google::protobuf::FieldOptions; |
| 5073 | } |
| 5074 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) |
| 5075 | return options_; |
| 5076 | } |
| 5077 | ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() { |
| 5078 | clear_has_options(); |
| 5079 | ::google::protobuf::FieldOptions* temp = options_; |
| 5080 | options_ = NULL; |
| 5081 | return temp; |
| 5082 | } |
| 5083 | void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) { |
| 5084 | delete options_; |
| 5085 | options_ = options; |
| 5086 | if (options) { |
| 5087 | set_has_options(); |
| 5088 | } else { |
| 5089 | clear_has_options(); |
| 5090 | } |
| 5091 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options) |
| 5092 | } |
| 5093 | |
| 5094 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5095 | |
| 5096 | // =================================================================== |
| 5097 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 5098 | #ifndef _MSC_VER |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5099 | const int OneofDescriptorProto::kNameFieldNumber; |
| 5100 | #endif // !_MSC_VER |
| 5101 | |
| 5102 | OneofDescriptorProto::OneofDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5103 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5104 | SharedCtor(); |
| 5105 | // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto) |
| 5106 | } |
| 5107 | |
| 5108 | void OneofDescriptorProto::InitAsDefaultInstance() { |
| 5109 | } |
| 5110 | |
| 5111 | OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5112 | : ::google::protobuf::Message(), |
| 5113 | _internal_metadata_(NULL) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5114 | SharedCtor(); |
| 5115 | MergeFrom(from); |
| 5116 | // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) |
| 5117 | } |
| 5118 | |
| 5119 | void OneofDescriptorProto::SharedCtor() { |
| 5120 | ::google::protobuf::internal::GetEmptyString(); |
| 5121 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5122 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5123 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 5124 | } |
| 5125 | |
| 5126 | OneofDescriptorProto::~OneofDescriptorProto() { |
| 5127 | // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto) |
| 5128 | SharedDtor(); |
| 5129 | } |
| 5130 | |
| 5131 | void OneofDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5132 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5133 | if (this != default_instance_) { |
| 5134 | } |
| 5135 | } |
| 5136 | |
| 5137 | void OneofDescriptorProto::SetCachedSize(int size) const { |
| 5138 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5139 | _cached_size_ = size; |
| 5140 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5141 | } |
| 5142 | const ::google::protobuf::Descriptor* OneofDescriptorProto::descriptor() { |
| 5143 | protobuf_AssignDescriptorsOnce(); |
| 5144 | return OneofDescriptorProto_descriptor_; |
| 5145 | } |
| 5146 | |
| 5147 | const OneofDescriptorProto& OneofDescriptorProto::default_instance() { |
| 5148 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 5149 | return *default_instance_; |
| 5150 | } |
| 5151 | |
| 5152 | OneofDescriptorProto* OneofDescriptorProto::default_instance_ = NULL; |
| 5153 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5154 | OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5155 | OneofDescriptorProto* n = new OneofDescriptorProto; |
| 5156 | if (arena != NULL) { |
| 5157 | arena->Own(n); |
| 5158 | } |
| 5159 | return n; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5160 | } |
| 5161 | |
| 5162 | void OneofDescriptorProto::Clear() { |
| 5163 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5164 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5165 | } |
| 5166 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5167 | if (_internal_metadata_.have_unknown_fields()) { |
| 5168 | mutable_unknown_fields()->Clear(); |
| 5169 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5170 | } |
| 5171 | |
| 5172 | bool OneofDescriptorProto::MergePartialFromCodedStream( |
| 5173 | ::google::protobuf::io::CodedInputStream* input) { |
| 5174 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 5175 | ::google::protobuf::uint32 tag; |
| 5176 | // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto) |
| 5177 | for (;;) { |
| 5178 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 5179 | tag = p.first; |
| 5180 | if (!p.second) goto handle_unusual; |
| 5181 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5182 | // optional string name = 1; |
| 5183 | case 1: { |
| 5184 | if (tag == 10) { |
| 5185 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5186 | input, this->mutable_name())); |
| 5187 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5188 | this->name().data(), this->name().length(), |
| 5189 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5190 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5191 | } else { |
| 5192 | goto handle_unusual; |
| 5193 | } |
| 5194 | if (input->ExpectAtEnd()) goto success; |
| 5195 | break; |
| 5196 | } |
| 5197 | |
| 5198 | default: { |
| 5199 | handle_unusual: |
| 5200 | if (tag == 0 || |
| 5201 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 5202 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 5203 | goto success; |
| 5204 | } |
| 5205 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5206 | input, tag, mutable_unknown_fields())); |
| 5207 | break; |
| 5208 | } |
| 5209 | } |
| 5210 | } |
| 5211 | success: |
| 5212 | // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto) |
| 5213 | return true; |
| 5214 | failure: |
| 5215 | // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto) |
| 5216 | return false; |
| 5217 | #undef DO_ |
| 5218 | } |
| 5219 | |
| 5220 | void OneofDescriptorProto::SerializeWithCachedSizes( |
| 5221 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5222 | // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto) |
| 5223 | // optional string name = 1; |
| 5224 | if (has_name()) { |
| 5225 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5226 | this->name().data(), this->name().length(), |
| 5227 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5228 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5229 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 5230 | 1, this->name(), output); |
| 5231 | } |
| 5232 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5233 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5234 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5235 | unknown_fields(), output); |
| 5236 | } |
| 5237 | // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) |
| 5238 | } |
| 5239 | |
| 5240 | ::google::protobuf::uint8* OneofDescriptorProto::SerializeWithCachedSizesToArray( |
| 5241 | ::google::protobuf::uint8* target) const { |
| 5242 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) |
| 5243 | // optional string name = 1; |
| 5244 | if (has_name()) { |
| 5245 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5246 | this->name().data(), this->name().length(), |
| 5247 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5248 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5249 | target = |
| 5250 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 5251 | 1, this->name(), target); |
| 5252 | } |
| 5253 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5254 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5255 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5256 | unknown_fields(), target); |
| 5257 | } |
| 5258 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) |
| 5259 | return target; |
| 5260 | } |
| 5261 | |
| 5262 | int OneofDescriptorProto::ByteSize() const { |
| 5263 | int total_size = 0; |
| 5264 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5265 | // optional string name = 1; |
| 5266 | if (has_name()) { |
| 5267 | total_size += 1 + |
| 5268 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 5269 | this->name()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5270 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5271 | |
| 5272 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5273 | total_size += |
| 5274 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5275 | unknown_fields()); |
| 5276 | } |
| 5277 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5278 | _cached_size_ = total_size; |
| 5279 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5280 | return total_size; |
| 5281 | } |
| 5282 | |
| 5283 | void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5284 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5285 | const OneofDescriptorProto* source = |
| 5286 | ::google::protobuf::internal::DynamicCastToGenerated<const OneofDescriptorProto>( |
| 5287 | &from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5288 | if (source == NULL) { |
| 5289 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5290 | } else { |
| 5291 | MergeFrom(*source); |
| 5292 | } |
| 5293 | } |
| 5294 | |
| 5295 | void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5296 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5297 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 5298 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5299 | set_has_name(); |
| 5300 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5301 | } |
| 5302 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5303 | if (from._internal_metadata_.have_unknown_fields()) { |
| 5304 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 5305 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5306 | } |
| 5307 | |
| 5308 | void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 5309 | if (&from == this) return; |
| 5310 | Clear(); |
| 5311 | MergeFrom(from); |
| 5312 | } |
| 5313 | |
| 5314 | void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) { |
| 5315 | if (&from == this) return; |
| 5316 | Clear(); |
| 5317 | MergeFrom(from); |
| 5318 | } |
| 5319 | |
| 5320 | bool OneofDescriptorProto::IsInitialized() const { |
| 5321 | |
| 5322 | return true; |
| 5323 | } |
| 5324 | |
| 5325 | void OneofDescriptorProto::Swap(OneofDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5326 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5327 | InternalSwap(other); |
| 5328 | } |
| 5329 | void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { |
| 5330 | name_.Swap(&other->name_); |
| 5331 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 5332 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5333 | std::swap(_cached_size_, other->_cached_size_); |
| 5334 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5335 | |
| 5336 | ::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const { |
| 5337 | protobuf_AssignDescriptorsOnce(); |
| 5338 | ::google::protobuf::Metadata metadata; |
| 5339 | metadata.descriptor = OneofDescriptorProto_descriptor_; |
| 5340 | metadata.reflection = OneofDescriptorProto_reflection_; |
| 5341 | return metadata; |
| 5342 | } |
| 5343 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5344 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 5345 | // OneofDescriptorProto |
| 5346 | |
| 5347 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5348 | bool OneofDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5349 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 5350 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5351 | void OneofDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5352 | _has_bits_[0] |= 0x00000001u; |
| 5353 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5354 | void OneofDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5355 | _has_bits_[0] &= ~0x00000001u; |
| 5356 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5357 | void OneofDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5358 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5359 | clear_has_name(); |
| 5360 | } |
| 5361 | const ::std::string& OneofDescriptorProto::name() const { |
| 5362 | // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) |
| 5363 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5364 | } |
| 5365 | void OneofDescriptorProto::set_name(const ::std::string& value) { |
| 5366 | set_has_name(); |
| 5367 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5368 | // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) |
| 5369 | } |
| 5370 | void OneofDescriptorProto::set_name(const char* value) { |
| 5371 | set_has_name(); |
| 5372 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5373 | // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name) |
| 5374 | } |
| 5375 | void OneofDescriptorProto::set_name(const char* value, size_t size) { |
| 5376 | set_has_name(); |
| 5377 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5378 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5379 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name) |
| 5380 | } |
| 5381 | ::std::string* OneofDescriptorProto::mutable_name() { |
| 5382 | set_has_name(); |
| 5383 | // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) |
| 5384 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5385 | } |
| 5386 | ::std::string* OneofDescriptorProto::release_name() { |
| 5387 | clear_has_name(); |
| 5388 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5389 | } |
| 5390 | void OneofDescriptorProto::set_allocated_name(::std::string* name) { |
| 5391 | if (name != NULL) { |
| 5392 | set_has_name(); |
| 5393 | } else { |
| 5394 | clear_has_name(); |
| 5395 | } |
| 5396 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 5397 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) |
| 5398 | } |
| 5399 | |
| 5400 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5401 | |
| 5402 | // =================================================================== |
| 5403 | |
| 5404 | #ifndef _MSC_VER |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 5405 | const int EnumDescriptorProto::kNameFieldNumber; |
| 5406 | const int EnumDescriptorProto::kValueFieldNumber; |
| 5407 | const int EnumDescriptorProto::kOptionsFieldNumber; |
| 5408 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5409 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5410 | EnumDescriptorProto::EnumDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5411 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5412 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5413 | // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5414 | } |
| 5415 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5416 | void EnumDescriptorProto::InitAsDefaultInstance() { |
| 5417 | options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5418 | } |
| 5419 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5420 | EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5421 | : ::google::protobuf::Message(), |
| 5422 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5423 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5424 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5425 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5426 | } |
| 5427 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5428 | void EnumDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5429 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5430 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5431 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5432 | options_ = NULL; |
| 5433 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 5434 | } |
| 5435 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5436 | EnumDescriptorProto::~EnumDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5437 | // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5438 | SharedDtor(); |
| 5439 | } |
| 5440 | |
| 5441 | void EnumDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5442 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5443 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5444 | delete options_; |
| 5445 | } |
| 5446 | } |
| 5447 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5448 | void EnumDescriptorProto::SetCachedSize(int size) const { |
| 5449 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5450 | _cached_size_ = size; |
| 5451 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5452 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5453 | const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5454 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5455 | return EnumDescriptorProto_descriptor_; |
| 5456 | } |
| 5457 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5458 | const EnumDescriptorProto& EnumDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 5459 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 5460 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5461 | } |
| 5462 | |
| 5463 | EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL; |
| 5464 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5465 | EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5466 | EnumDescriptorProto* n = new EnumDescriptorProto; |
| 5467 | if (arena != NULL) { |
| 5468 | arena->Own(n); |
| 5469 | } |
| 5470 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5471 | } |
| 5472 | |
| 5473 | void EnumDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 5474 | if (_has_bits_[0 / 32] & 5u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5475 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5476 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5477 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5478 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5479 | if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); |
| 5480 | } |
| 5481 | } |
| 5482 | value_.Clear(); |
| 5483 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5484 | if (_internal_metadata_.have_unknown_fields()) { |
| 5485 | mutable_unknown_fields()->Clear(); |
| 5486 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5487 | } |
| 5488 | |
| 5489 | bool EnumDescriptorProto::MergePartialFromCodedStream( |
| 5490 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5491 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5492 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5493 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto) |
| 5494 | for (;;) { |
| 5495 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 5496 | tag = p.first; |
| 5497 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5498 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5499 | // optional string name = 1; |
| 5500 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5501 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5502 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5503 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5504 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5505 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5506 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5507 | "google.protobuf.EnumDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5508 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5509 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5510 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5511 | if (input->ExpectTag(18)) goto parse_value; |
| 5512 | break; |
| 5513 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5514 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5515 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
| 5516 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5517 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5518 | parse_value: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5519 | DO_(input->IncrementRecursionDepth()); |
| 5520 | parse_loop_value: |
| 5521 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5522 | input, add_value())); |
| 5523 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5524 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5525 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5526 | if (input->ExpectTag(18)) goto parse_loop_value; |
| 5527 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5528 | if (input->ExpectTag(26)) goto parse_options; |
| 5529 | break; |
| 5530 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5531 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5532 | // optional .google.protobuf.EnumOptions options = 3; |
| 5533 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5534 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5535 | parse_options: |
| 5536 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 5537 | input, mutable_options())); |
| 5538 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5539 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5540 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5541 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5542 | break; |
| 5543 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5544 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5545 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5546 | handle_unusual: |
| 5547 | if (tag == 0 || |
| 5548 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5549 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5550 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5551 | } |
| 5552 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5553 | input, tag, mutable_unknown_fields())); |
| 5554 | break; |
| 5555 | } |
| 5556 | } |
| 5557 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5558 | success: |
| 5559 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5560 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5561 | failure: |
| 5562 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto) |
| 5563 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5564 | #undef DO_ |
| 5565 | } |
| 5566 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5567 | void EnumDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5568 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5569 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5570 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5571 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5572 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5573 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5574 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5575 | "google.protobuf.EnumDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5576 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5577 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5578 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5579 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5580 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5581 | for (unsigned int i = 0, n = this->value_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5582 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5583 | 2, this->value(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5584 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5585 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5586 | // optional .google.protobuf.EnumOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5587 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5588 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5589 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5590 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5591 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5592 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5593 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5594 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5595 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5596 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5597 | } |
| 5598 | |
| 5599 | ::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray( |
| 5600 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5601 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5602 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5603 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5604 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5605 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5606 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5607 | "google.protobuf.EnumDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5608 | target = |
| 5609 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 5610 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5611 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5612 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5613 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5614 | for (unsigned int i = 0, n = this->value_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5615 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5616 | WriteMessageNoVirtualToArray( |
| 5617 | 2, this->value(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5618 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5619 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5620 | // optional .google.protobuf.EnumOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5621 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5622 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5623 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5624 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5625 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5626 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5627 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5628 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5629 | unknown_fields(), target); |
| 5630 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5631 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5632 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5633 | } |
| 5634 | |
| 5635 | int EnumDescriptorProto::ByteSize() const { |
| 5636 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5637 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 5638 | if (_has_bits_[0 / 32] & 5u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5639 | // optional string name = 1; |
| 5640 | if (has_name()) { |
| 5641 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5642 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 5643 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5644 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5645 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5646 | // optional .google.protobuf.EnumOptions options = 3; |
| 5647 | if (has_options()) { |
| 5648 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5649 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5650 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5651 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5652 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5653 | } |
| 5654 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 5655 | total_size += 1 * this->value_size(); |
| 5656 | for (int i = 0; i < this->value_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5657 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5658 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5659 | this->value(i)); |
| 5660 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5661 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5662 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5663 | total_size += |
| 5664 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5665 | unknown_fields()); |
| 5666 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5667 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5668 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5669 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5670 | return total_size; |
| 5671 | } |
| 5672 | |
| 5673 | void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5674 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5675 | const EnumDescriptorProto* source = |
| 5676 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumDescriptorProto>( |
| 5677 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5678 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 5679 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5680 | } else { |
| 5681 | MergeFrom(*source); |
| 5682 | } |
| 5683 | } |
| 5684 | |
| 5685 | void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5686 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5687 | value_.MergeFrom(from.value_); |
| 5688 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5689 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5690 | set_has_name(); |
| 5691 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5692 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5693 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5694 | mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options()); |
| 5695 | } |
| 5696 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5697 | if (from._internal_metadata_.have_unknown_fields()) { |
| 5698 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 5699 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5700 | } |
| 5701 | |
| 5702 | void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 5703 | if (&from == this) return; |
| 5704 | Clear(); |
| 5705 | MergeFrom(from); |
| 5706 | } |
| 5707 | |
| 5708 | void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) { |
| 5709 | if (&from == this) return; |
| 5710 | Clear(); |
| 5711 | MergeFrom(from); |
| 5712 | } |
| 5713 | |
| 5714 | bool EnumDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5715 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5716 | if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5717 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5718 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5719 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5720 | return true; |
| 5721 | } |
| 5722 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 5723 | void EnumDescriptorProto::Swap(EnumDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5724 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5725 | InternalSwap(other); |
| 5726 | } |
| 5727 | void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { |
| 5728 | name_.Swap(&other->name_); |
| 5729 | value_.UnsafeArenaSwap(&other->value_); |
| 5730 | std::swap(options_, other->options_); |
| 5731 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 5732 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5733 | std::swap(_cached_size_, other->_cached_size_); |
| 5734 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 5735 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5736 | ::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const { |
| 5737 | protobuf_AssignDescriptorsOnce(); |
| 5738 | ::google::protobuf::Metadata metadata; |
| 5739 | metadata.descriptor = EnumDescriptorProto_descriptor_; |
| 5740 | metadata.reflection = EnumDescriptorProto_reflection_; |
| 5741 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5742 | } |
| 5743 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5744 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 5745 | // EnumDescriptorProto |
| 5746 | |
| 5747 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5748 | bool EnumDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5749 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 5750 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5751 | void EnumDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5752 | _has_bits_[0] |= 0x00000001u; |
| 5753 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5754 | void EnumDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5755 | _has_bits_[0] &= ~0x00000001u; |
| 5756 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5757 | void EnumDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5758 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5759 | clear_has_name(); |
| 5760 | } |
| 5761 | const ::std::string& EnumDescriptorProto::name() const { |
| 5762 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) |
| 5763 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5764 | } |
| 5765 | void EnumDescriptorProto::set_name(const ::std::string& value) { |
| 5766 | set_has_name(); |
| 5767 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5768 | // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) |
| 5769 | } |
| 5770 | void EnumDescriptorProto::set_name(const char* value) { |
| 5771 | set_has_name(); |
| 5772 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5773 | // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name) |
| 5774 | } |
| 5775 | void EnumDescriptorProto::set_name(const char* value, size_t size) { |
| 5776 | set_has_name(); |
| 5777 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5778 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5779 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name) |
| 5780 | } |
| 5781 | ::std::string* EnumDescriptorProto::mutable_name() { |
| 5782 | set_has_name(); |
| 5783 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) |
| 5784 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5785 | } |
| 5786 | ::std::string* EnumDescriptorProto::release_name() { |
| 5787 | clear_has_name(); |
| 5788 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5789 | } |
| 5790 | void EnumDescriptorProto::set_allocated_name(::std::string* name) { |
| 5791 | if (name != NULL) { |
| 5792 | set_has_name(); |
| 5793 | } else { |
| 5794 | clear_has_name(); |
| 5795 | } |
| 5796 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 5797 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) |
| 5798 | } |
| 5799 | |
| 5800 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5801 | int EnumDescriptorProto::value_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5802 | return value_.size(); |
| 5803 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5804 | void EnumDescriptorProto::clear_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5805 | value_.Clear(); |
| 5806 | } |
| 5807 | const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { |
| 5808 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value) |
| 5809 | return value_.Get(index); |
| 5810 | } |
| 5811 | ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) { |
| 5812 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value) |
| 5813 | return value_.Mutable(index); |
| 5814 | } |
| 5815 | ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { |
| 5816 | // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value) |
| 5817 | return value_.Add(); |
| 5818 | } |
| 5819 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& |
| 5820 | EnumDescriptorProto::value() const { |
| 5821 | // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value) |
| 5822 | return value_; |
| 5823 | } |
| 5824 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* |
| 5825 | EnumDescriptorProto::mutable_value() { |
| 5826 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value) |
| 5827 | return &value_; |
| 5828 | } |
| 5829 | |
| 5830 | // optional .google.protobuf.EnumOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5831 | bool EnumDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5832 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 5833 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5834 | void EnumDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5835 | _has_bits_[0] |= 0x00000004u; |
| 5836 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5837 | void EnumDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5838 | _has_bits_[0] &= ~0x00000004u; |
| 5839 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5840 | void EnumDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5841 | if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); |
| 5842 | clear_has_options(); |
| 5843 | } |
| 5844 | const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { |
| 5845 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) |
| 5846 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 5847 | } |
| 5848 | ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { |
| 5849 | set_has_options(); |
| 5850 | if (options_ == NULL) { |
| 5851 | options_ = new ::google::protobuf::EnumOptions; |
| 5852 | } |
| 5853 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) |
| 5854 | return options_; |
| 5855 | } |
| 5856 | ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() { |
| 5857 | clear_has_options(); |
| 5858 | ::google::protobuf::EnumOptions* temp = options_; |
| 5859 | options_ = NULL; |
| 5860 | return temp; |
| 5861 | } |
| 5862 | void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) { |
| 5863 | delete options_; |
| 5864 | options_ = options; |
| 5865 | if (options) { |
| 5866 | set_has_options(); |
| 5867 | } else { |
| 5868 | clear_has_options(); |
| 5869 | } |
| 5870 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options) |
| 5871 | } |
| 5872 | |
| 5873 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5874 | |
| 5875 | // =================================================================== |
| 5876 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 5877 | #ifndef _MSC_VER |
| 5878 | const int EnumValueDescriptorProto::kNameFieldNumber; |
| 5879 | const int EnumValueDescriptorProto::kNumberFieldNumber; |
| 5880 | const int EnumValueDescriptorProto::kOptionsFieldNumber; |
| 5881 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5882 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5883 | EnumValueDescriptorProto::EnumValueDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5884 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5885 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5886 | // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5887 | } |
| 5888 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5889 | void EnumValueDescriptorProto::InitAsDefaultInstance() { |
| 5890 | options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5891 | } |
| 5892 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5893 | EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5894 | : ::google::protobuf::Message(), |
| 5895 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5896 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5897 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5898 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5899 | } |
| 5900 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5901 | void EnumValueDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5902 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5903 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5904 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5905 | number_ = 0; |
| 5906 | options_ = NULL; |
| 5907 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 5908 | } |
| 5909 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5910 | EnumValueDescriptorProto::~EnumValueDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5911 | // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5912 | SharedDtor(); |
| 5913 | } |
| 5914 | |
| 5915 | void EnumValueDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5916 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5917 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5918 | delete options_; |
| 5919 | } |
| 5920 | } |
| 5921 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5922 | void EnumValueDescriptorProto::SetCachedSize(int size) const { |
| 5923 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5924 | _cached_size_ = size; |
| 5925 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5926 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5927 | const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5928 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5929 | return EnumValueDescriptorProto_descriptor_; |
| 5930 | } |
| 5931 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5932 | const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 5933 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 5934 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5935 | } |
| 5936 | |
| 5937 | EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL; |
| 5938 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5939 | EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5940 | EnumValueDescriptorProto* n = new EnumValueDescriptorProto; |
| 5941 | if (arena != NULL) { |
| 5942 | arena->Own(n); |
| 5943 | } |
| 5944 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5945 | } |
| 5946 | |
| 5947 | void EnumValueDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 5948 | if (_has_bits_[0 / 32] & 7u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5949 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5950 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5951 | } |
| 5952 | number_ = 0; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5953 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5954 | if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); |
| 5955 | } |
| 5956 | } |
| 5957 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5958 | if (_internal_metadata_.have_unknown_fields()) { |
| 5959 | mutable_unknown_fields()->Clear(); |
| 5960 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5961 | } |
| 5962 | |
| 5963 | bool EnumValueDescriptorProto::MergePartialFromCodedStream( |
| 5964 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5965 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5966 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5967 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto) |
| 5968 | for (;;) { |
| 5969 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 5970 | tag = p.first; |
| 5971 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5972 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5973 | // optional string name = 1; |
| 5974 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5975 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5976 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5977 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5978 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5979 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5980 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5981 | "google.protobuf.EnumValueDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5982 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5983 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5984 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5985 | if (input->ExpectTag(16)) goto parse_number; |
| 5986 | break; |
| 5987 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5988 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5989 | // optional int32 number = 2; |
| 5990 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5991 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5992 | parse_number: |
| 5993 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5994 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 5995 | input, &number_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5996 | set_has_number(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5997 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5998 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5999 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6000 | if (input->ExpectTag(26)) goto parse_options; |
| 6001 | break; |
| 6002 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6003 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6004 | // optional .google.protobuf.EnumValueOptions options = 3; |
| 6005 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6006 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6007 | parse_options: |
| 6008 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 6009 | input, mutable_options())); |
| 6010 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6011 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6012 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6013 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6014 | break; |
| 6015 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6016 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6017 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6018 | handle_unusual: |
| 6019 | if (tag == 0 || |
| 6020 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6021 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6022 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6023 | } |
| 6024 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6025 | input, tag, mutable_unknown_fields())); |
| 6026 | break; |
| 6027 | } |
| 6028 | } |
| 6029 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6030 | success: |
| 6031 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6032 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6033 | failure: |
| 6034 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto) |
| 6035 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6036 | #undef DO_ |
| 6037 | } |
| 6038 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6039 | void EnumValueDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6040 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6041 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6042 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6043 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6044 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6045 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6046 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6047 | "google.protobuf.EnumValueDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6048 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6049 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6050 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6051 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6052 | // optional int32 number = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6053 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6054 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6055 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6056 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6057 | // optional .google.protobuf.EnumValueOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6058 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6059 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6060 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6061 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6062 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6063 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6064 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6065 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6066 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6067 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6068 | } |
| 6069 | |
| 6070 | ::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray( |
| 6071 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6072 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6073 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6074 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6075 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6076 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6077 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6078 | "google.protobuf.EnumValueDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6079 | target = |
| 6080 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6081 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6082 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6083 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6084 | // optional int32 number = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6085 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6086 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6087 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6088 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6089 | // optional .google.protobuf.EnumValueOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6090 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6091 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6092 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6093 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6094 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6095 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6096 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6097 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 6098 | unknown_fields(), target); |
| 6099 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6100 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6101 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6102 | } |
| 6103 | |
| 6104 | int EnumValueDescriptorProto::ByteSize() const { |
| 6105 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6106 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 6107 | if (_has_bits_[0 / 32] & 7u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6108 | // optional string name = 1; |
| 6109 | if (has_name()) { |
| 6110 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6111 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 6112 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6113 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6114 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6115 | // optional int32 number = 2; |
| 6116 | if (has_number()) { |
| 6117 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6118 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6119 | this->number()); |
| 6120 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6121 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6122 | // optional .google.protobuf.EnumValueOptions options = 3; |
| 6123 | if (has_options()) { |
| 6124 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6125 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6126 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6127 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6128 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6129 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6130 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6131 | total_size += |
| 6132 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 6133 | unknown_fields()); |
| 6134 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6135 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6136 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6137 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6138 | return total_size; |
| 6139 | } |
| 6140 | |
| 6141 | void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6142 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6143 | const EnumValueDescriptorProto* source = |
| 6144 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueDescriptorProto>( |
| 6145 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6146 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 6147 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6148 | } else { |
| 6149 | MergeFrom(*source); |
| 6150 | } |
| 6151 | } |
| 6152 | |
| 6153 | void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6154 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6155 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6156 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6157 | set_has_name(); |
| 6158 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6159 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6160 | if (from.has_number()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6161 | set_number(from.number()); |
| 6162 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6163 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6164 | mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options()); |
| 6165 | } |
| 6166 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6167 | if (from._internal_metadata_.have_unknown_fields()) { |
| 6168 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 6169 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6170 | } |
| 6171 | |
| 6172 | void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 6173 | if (&from == this) return; |
| 6174 | Clear(); |
| 6175 | MergeFrom(from); |
| 6176 | } |
| 6177 | |
| 6178 | void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) { |
| 6179 | if (&from == this) return; |
| 6180 | Clear(); |
| 6181 | MergeFrom(from); |
| 6182 | } |
| 6183 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6184 | bool EnumValueDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6185 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6186 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6187 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6188 | } |
| 6189 | return true; |
| 6190 | } |
| 6191 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 6192 | void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6193 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6194 | InternalSwap(other); |
| 6195 | } |
| 6196 | void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { |
| 6197 | name_.Swap(&other->name_); |
| 6198 | std::swap(number_, other->number_); |
| 6199 | std::swap(options_, other->options_); |
| 6200 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 6201 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 6202 | std::swap(_cached_size_, other->_cached_size_); |
| 6203 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 6204 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6205 | ::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const { |
| 6206 | protobuf_AssignDescriptorsOnce(); |
| 6207 | ::google::protobuf::Metadata metadata; |
| 6208 | metadata.descriptor = EnumValueDescriptorProto_descriptor_; |
| 6209 | metadata.reflection = EnumValueDescriptorProto_reflection_; |
| 6210 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6211 | } |
| 6212 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6213 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 6214 | // EnumValueDescriptorProto |
| 6215 | |
| 6216 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6217 | bool EnumValueDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6218 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 6219 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6220 | void EnumValueDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6221 | _has_bits_[0] |= 0x00000001u; |
| 6222 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6223 | void EnumValueDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6224 | _has_bits_[0] &= ~0x00000001u; |
| 6225 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6226 | void EnumValueDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6227 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6228 | clear_has_name(); |
| 6229 | } |
| 6230 | const ::std::string& EnumValueDescriptorProto::name() const { |
| 6231 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) |
| 6232 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6233 | } |
| 6234 | void EnumValueDescriptorProto::set_name(const ::std::string& value) { |
| 6235 | set_has_name(); |
| 6236 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 6237 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) |
| 6238 | } |
| 6239 | void EnumValueDescriptorProto::set_name(const char* value) { |
| 6240 | set_has_name(); |
| 6241 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 6242 | // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name) |
| 6243 | } |
| 6244 | void EnumValueDescriptorProto::set_name(const char* value, size_t size) { |
| 6245 | set_has_name(); |
| 6246 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 6247 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 6248 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name) |
| 6249 | } |
| 6250 | ::std::string* EnumValueDescriptorProto::mutable_name() { |
| 6251 | set_has_name(); |
| 6252 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) |
| 6253 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6254 | } |
| 6255 | ::std::string* EnumValueDescriptorProto::release_name() { |
| 6256 | clear_has_name(); |
| 6257 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6258 | } |
| 6259 | void EnumValueDescriptorProto::set_allocated_name(::std::string* name) { |
| 6260 | if (name != NULL) { |
| 6261 | set_has_name(); |
| 6262 | } else { |
| 6263 | clear_has_name(); |
| 6264 | } |
| 6265 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 6266 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) |
| 6267 | } |
| 6268 | |
| 6269 | // optional int32 number = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6270 | bool EnumValueDescriptorProto::has_number() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6271 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 6272 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6273 | void EnumValueDescriptorProto::set_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6274 | _has_bits_[0] |= 0x00000002u; |
| 6275 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6276 | void EnumValueDescriptorProto::clear_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6277 | _has_bits_[0] &= ~0x00000002u; |
| 6278 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6279 | void EnumValueDescriptorProto::clear_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6280 | number_ = 0; |
| 6281 | clear_has_number(); |
| 6282 | } |
| 6283 | ::google::protobuf::int32 EnumValueDescriptorProto::number() const { |
| 6284 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number) |
| 6285 | return number_; |
| 6286 | } |
| 6287 | void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) { |
| 6288 | set_has_number(); |
| 6289 | number_ = value; |
| 6290 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number) |
| 6291 | } |
| 6292 | |
| 6293 | // optional .google.protobuf.EnumValueOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6294 | bool EnumValueDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6295 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 6296 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6297 | void EnumValueDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6298 | _has_bits_[0] |= 0x00000004u; |
| 6299 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6300 | void EnumValueDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6301 | _has_bits_[0] &= ~0x00000004u; |
| 6302 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6303 | void EnumValueDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6304 | if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); |
| 6305 | clear_has_options(); |
| 6306 | } |
| 6307 | const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { |
| 6308 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) |
| 6309 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 6310 | } |
| 6311 | ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { |
| 6312 | set_has_options(); |
| 6313 | if (options_ == NULL) { |
| 6314 | options_ = new ::google::protobuf::EnumValueOptions; |
| 6315 | } |
| 6316 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) |
| 6317 | return options_; |
| 6318 | } |
| 6319 | ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() { |
| 6320 | clear_has_options(); |
| 6321 | ::google::protobuf::EnumValueOptions* temp = options_; |
| 6322 | options_ = NULL; |
| 6323 | return temp; |
| 6324 | } |
| 6325 | void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) { |
| 6326 | delete options_; |
| 6327 | options_ = options; |
| 6328 | if (options) { |
| 6329 | set_has_options(); |
| 6330 | } else { |
| 6331 | clear_has_options(); |
| 6332 | } |
| 6333 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options) |
| 6334 | } |
| 6335 | |
| 6336 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6337 | |
| 6338 | // =================================================================== |
| 6339 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6340 | #ifndef _MSC_VER |
| 6341 | const int ServiceDescriptorProto::kNameFieldNumber; |
| 6342 | const int ServiceDescriptorProto::kMethodFieldNumber; |
| 6343 | const int ServiceDescriptorProto::kOptionsFieldNumber; |
| 6344 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6345 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6346 | ServiceDescriptorProto::ServiceDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6347 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6348 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6349 | // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6350 | } |
| 6351 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6352 | void ServiceDescriptorProto::InitAsDefaultInstance() { |
| 6353 | options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6354 | } |
| 6355 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6356 | ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6357 | : ::google::protobuf::Message(), |
| 6358 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6359 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6360 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6361 | // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6362 | } |
| 6363 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6364 | void ServiceDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6365 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6366 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6367 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6368 | options_ = NULL; |
| 6369 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 6370 | } |
| 6371 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6372 | ServiceDescriptorProto::~ServiceDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6373 | // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6374 | SharedDtor(); |
| 6375 | } |
| 6376 | |
| 6377 | void ServiceDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6378 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6379 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6380 | delete options_; |
| 6381 | } |
| 6382 | } |
| 6383 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6384 | void ServiceDescriptorProto::SetCachedSize(int size) const { |
| 6385 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 6386 | _cached_size_ = size; |
| 6387 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 6388 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6389 | const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6390 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6391 | return ServiceDescriptorProto_descriptor_; |
| 6392 | } |
| 6393 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6394 | const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 6395 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 6396 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6397 | } |
| 6398 | |
| 6399 | ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL; |
| 6400 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6401 | ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6402 | ServiceDescriptorProto* n = new ServiceDescriptorProto; |
| 6403 | if (arena != NULL) { |
| 6404 | arena->Own(n); |
| 6405 | } |
| 6406 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6407 | } |
| 6408 | |
| 6409 | void ServiceDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 6410 | if (_has_bits_[0 / 32] & 5u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6411 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6412 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6413 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6414 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6415 | if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); |
| 6416 | } |
| 6417 | } |
| 6418 | method_.Clear(); |
| 6419 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6420 | if (_internal_metadata_.have_unknown_fields()) { |
| 6421 | mutable_unknown_fields()->Clear(); |
| 6422 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6423 | } |
| 6424 | |
| 6425 | bool ServiceDescriptorProto::MergePartialFromCodedStream( |
| 6426 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6427 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6428 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6429 | // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto) |
| 6430 | for (;;) { |
| 6431 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 6432 | tag = p.first; |
| 6433 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6434 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6435 | // optional string name = 1; |
| 6436 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6437 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6438 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6439 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6440 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6441 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6442 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6443 | "google.protobuf.ServiceDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6444 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6445 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6446 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6447 | if (input->ExpectTag(18)) goto parse_method; |
| 6448 | break; |
| 6449 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6450 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6451 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
| 6452 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6453 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6454 | parse_method: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6455 | DO_(input->IncrementRecursionDepth()); |
| 6456 | parse_loop_method: |
| 6457 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6458 | input, add_method())); |
| 6459 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6460 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6461 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6462 | if (input->ExpectTag(18)) goto parse_loop_method; |
| 6463 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6464 | if (input->ExpectTag(26)) goto parse_options; |
| 6465 | break; |
| 6466 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6467 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6468 | // optional .google.protobuf.ServiceOptions options = 3; |
| 6469 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6470 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6471 | parse_options: |
| 6472 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 6473 | input, mutable_options())); |
| 6474 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6475 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6476 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6477 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6478 | break; |
| 6479 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6480 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6481 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6482 | handle_unusual: |
| 6483 | if (tag == 0 || |
| 6484 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6485 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6486 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6487 | } |
| 6488 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6489 | input, tag, mutable_unknown_fields())); |
| 6490 | break; |
| 6491 | } |
| 6492 | } |
| 6493 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6494 | success: |
| 6495 | // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6496 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6497 | failure: |
| 6498 | // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto) |
| 6499 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6500 | #undef DO_ |
| 6501 | } |
| 6502 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6503 | void ServiceDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6504 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6505 | // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6506 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6507 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6508 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6509 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6510 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6511 | "google.protobuf.ServiceDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6512 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6513 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6514 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6515 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6516 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6517 | for (unsigned int i = 0, n = this->method_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6518 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6519 | 2, this->method(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6520 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6521 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6522 | // optional .google.protobuf.ServiceOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6523 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6524 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6525 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6526 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6527 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6528 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6529 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6530 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6531 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6532 | // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6533 | } |
| 6534 | |
| 6535 | ::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray( |
| 6536 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6537 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6538 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6539 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6540 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6541 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6542 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6543 | "google.protobuf.ServiceDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6544 | target = |
| 6545 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6546 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6547 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6548 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6549 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6550 | for (unsigned int i = 0, n = this->method_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6551 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6552 | WriteMessageNoVirtualToArray( |
| 6553 | 2, this->method(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6554 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6555 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6556 | // optional .google.protobuf.ServiceOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6557 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6558 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6559 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6560 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6561 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6562 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6563 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6564 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 6565 | unknown_fields(), target); |
| 6566 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6567 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6568 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6569 | } |
| 6570 | |
| 6571 | int ServiceDescriptorProto::ByteSize() const { |
| 6572 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6573 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 6574 | if (_has_bits_[0 / 32] & 5u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6575 | // optional string name = 1; |
| 6576 | if (has_name()) { |
| 6577 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6578 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 6579 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6580 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6581 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6582 | // optional .google.protobuf.ServiceOptions options = 3; |
| 6583 | if (has_options()) { |
| 6584 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6585 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6586 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6587 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6588 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6589 | } |
| 6590 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 6591 | total_size += 1 * this->method_size(); |
| 6592 | for (int i = 0; i < this->method_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6593 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6594 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6595 | this->method(i)); |
| 6596 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6597 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6598 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6599 | total_size += |
| 6600 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 6601 | unknown_fields()); |
| 6602 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6603 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6604 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6605 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6606 | return total_size; |
| 6607 | } |
| 6608 | |
| 6609 | void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6610 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6611 | const ServiceDescriptorProto* source = |
| 6612 | ::google::protobuf::internal::DynamicCastToGenerated<const ServiceDescriptorProto>( |
| 6613 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6614 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 6615 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6616 | } else { |
| 6617 | MergeFrom(*source); |
| 6618 | } |
| 6619 | } |
| 6620 | |
| 6621 | void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6622 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6623 | method_.MergeFrom(from.method_); |
| 6624 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6625 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6626 | set_has_name(); |
| 6627 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6628 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6629 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6630 | mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options()); |
| 6631 | } |
| 6632 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6633 | if (from._internal_metadata_.have_unknown_fields()) { |
| 6634 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 6635 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6636 | } |
| 6637 | |
| 6638 | void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 6639 | if (&from == this) return; |
| 6640 | Clear(); |
| 6641 | MergeFrom(from); |
| 6642 | } |
| 6643 | |
| 6644 | void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) { |
| 6645 | if (&from == this) return; |
| 6646 | Clear(); |
| 6647 | MergeFrom(from); |
| 6648 | } |
| 6649 | |
| 6650 | bool ServiceDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6651 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6652 | if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6653 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6654 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6655 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6656 | return true; |
| 6657 | } |
| 6658 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6659 | void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6660 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6661 | InternalSwap(other); |
| 6662 | } |
| 6663 | void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { |
| 6664 | name_.Swap(&other->name_); |
| 6665 | method_.UnsafeArenaSwap(&other->method_); |
| 6666 | std::swap(options_, other->options_); |
| 6667 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 6668 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 6669 | std::swap(_cached_size_, other->_cached_size_); |
| 6670 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6671 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6672 | ::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const { |
| 6673 | protobuf_AssignDescriptorsOnce(); |
| 6674 | ::google::protobuf::Metadata metadata; |
| 6675 | metadata.descriptor = ServiceDescriptorProto_descriptor_; |
| 6676 | metadata.reflection = ServiceDescriptorProto_reflection_; |
| 6677 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6678 | } |
| 6679 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6680 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 6681 | // ServiceDescriptorProto |
| 6682 | |
| 6683 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6684 | bool ServiceDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6685 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 6686 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6687 | void ServiceDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6688 | _has_bits_[0] |= 0x00000001u; |
| 6689 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6690 | void ServiceDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6691 | _has_bits_[0] &= ~0x00000001u; |
| 6692 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6693 | void ServiceDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6694 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6695 | clear_has_name(); |
| 6696 | } |
| 6697 | const ::std::string& ServiceDescriptorProto::name() const { |
| 6698 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) |
| 6699 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6700 | } |
| 6701 | void ServiceDescriptorProto::set_name(const ::std::string& value) { |
| 6702 | set_has_name(); |
| 6703 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 6704 | // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) |
| 6705 | } |
| 6706 | void ServiceDescriptorProto::set_name(const char* value) { |
| 6707 | set_has_name(); |
| 6708 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 6709 | // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name) |
| 6710 | } |
| 6711 | void ServiceDescriptorProto::set_name(const char* value, size_t size) { |
| 6712 | set_has_name(); |
| 6713 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 6714 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 6715 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name) |
| 6716 | } |
| 6717 | ::std::string* ServiceDescriptorProto::mutable_name() { |
| 6718 | set_has_name(); |
| 6719 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) |
| 6720 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6721 | } |
| 6722 | ::std::string* ServiceDescriptorProto::release_name() { |
| 6723 | clear_has_name(); |
| 6724 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6725 | } |
| 6726 | void ServiceDescriptorProto::set_allocated_name(::std::string* name) { |
| 6727 | if (name != NULL) { |
| 6728 | set_has_name(); |
| 6729 | } else { |
| 6730 | clear_has_name(); |
| 6731 | } |
| 6732 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 6733 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) |
| 6734 | } |
| 6735 | |
| 6736 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6737 | int ServiceDescriptorProto::method_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6738 | return method_.size(); |
| 6739 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6740 | void ServiceDescriptorProto::clear_method() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6741 | method_.Clear(); |
| 6742 | } |
| 6743 | const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { |
| 6744 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method) |
| 6745 | return method_.Get(index); |
| 6746 | } |
| 6747 | ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) { |
| 6748 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method) |
| 6749 | return method_.Mutable(index); |
| 6750 | } |
| 6751 | ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() { |
| 6752 | // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method) |
| 6753 | return method_.Add(); |
| 6754 | } |
| 6755 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& |
| 6756 | ServiceDescriptorProto::method() const { |
| 6757 | // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method) |
| 6758 | return method_; |
| 6759 | } |
| 6760 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* |
| 6761 | ServiceDescriptorProto::mutable_method() { |
| 6762 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method) |
| 6763 | return &method_; |
| 6764 | } |
| 6765 | |
| 6766 | // optional .google.protobuf.ServiceOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6767 | bool ServiceDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6768 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 6769 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6770 | void ServiceDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6771 | _has_bits_[0] |= 0x00000004u; |
| 6772 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6773 | void ServiceDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6774 | _has_bits_[0] &= ~0x00000004u; |
| 6775 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6776 | void ServiceDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6777 | if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); |
| 6778 | clear_has_options(); |
| 6779 | } |
| 6780 | const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { |
| 6781 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) |
| 6782 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 6783 | } |
| 6784 | ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { |
| 6785 | set_has_options(); |
| 6786 | if (options_ == NULL) { |
| 6787 | options_ = new ::google::protobuf::ServiceOptions; |
| 6788 | } |
| 6789 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) |
| 6790 | return options_; |
| 6791 | } |
| 6792 | ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() { |
| 6793 | clear_has_options(); |
| 6794 | ::google::protobuf::ServiceOptions* temp = options_; |
| 6795 | options_ = NULL; |
| 6796 | return temp; |
| 6797 | } |
| 6798 | void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) { |
| 6799 | delete options_; |
| 6800 | options_ = options; |
| 6801 | if (options) { |
| 6802 | set_has_options(); |
| 6803 | } else { |
| 6804 | clear_has_options(); |
| 6805 | } |
| 6806 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options) |
| 6807 | } |
| 6808 | |
| 6809 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6810 | |
| 6811 | // =================================================================== |
| 6812 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6813 | #ifndef _MSC_VER |
| 6814 | const int MethodDescriptorProto::kNameFieldNumber; |
| 6815 | const int MethodDescriptorProto::kInputTypeFieldNumber; |
| 6816 | const int MethodDescriptorProto::kOutputTypeFieldNumber; |
| 6817 | const int MethodDescriptorProto::kOptionsFieldNumber; |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6818 | const int MethodDescriptorProto::kClientStreamingFieldNumber; |
| 6819 | const int MethodDescriptorProto::kServerStreamingFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6820 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6821 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6822 | MethodDescriptorProto::MethodDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6823 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6824 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6825 | // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6826 | } |
| 6827 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6828 | void MethodDescriptorProto::InitAsDefaultInstance() { |
| 6829 | options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6830 | } |
| 6831 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6832 | MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6833 | : ::google::protobuf::Message(), |
| 6834 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6835 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6836 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6837 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6838 | } |
| 6839 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6840 | void MethodDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6841 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6842 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6843 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6844 | input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6845 | output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6846 | options_ = NULL; |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6847 | client_streaming_ = false; |
| 6848 | server_streaming_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6849 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 6850 | } |
| 6851 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6852 | MethodDescriptorProto::~MethodDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6853 | // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6854 | SharedDtor(); |
| 6855 | } |
| 6856 | |
| 6857 | void MethodDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6858 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6859 | input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6860 | output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6861 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6862 | delete options_; |
| 6863 | } |
| 6864 | } |
| 6865 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6866 | void MethodDescriptorProto::SetCachedSize(int size) const { |
| 6867 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 6868 | _cached_size_ = size; |
| 6869 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 6870 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6871 | const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6872 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6873 | return MethodDescriptorProto_descriptor_; |
| 6874 | } |
| 6875 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6876 | const MethodDescriptorProto& MethodDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 6877 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 6878 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6879 | } |
| 6880 | |
| 6881 | MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL; |
| 6882 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6883 | MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6884 | MethodDescriptorProto* n = new MethodDescriptorProto; |
| 6885 | if (arena != NULL) { |
| 6886 | arena->Own(n); |
| 6887 | } |
| 6888 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6889 | } |
| 6890 | |
| 6891 | void MethodDescriptorProto::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6892 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 6893 | &reinterpret_cast<MethodDescriptorProto*>(16)->f) |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6894 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6895 | #define ZR_(first, last) do {\ |
| 6896 | ::memset(&first, 0,\ |
| 6897 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 6898 | } while (0) |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6899 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 6900 | if (_has_bits_[0 / 32] & 63u) { |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6901 | ZR_(client_streaming_, server_streaming_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6902 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6903 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6904 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6905 | if (has_input_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6906 | input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6907 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6908 | if (has_output_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6909 | output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6910 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6911 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6912 | if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); |
| 6913 | } |
| 6914 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6915 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6916 | #undef ZR_HELPER_ |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6917 | #undef ZR_ |
| 6918 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6919 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6920 | if (_internal_metadata_.have_unknown_fields()) { |
| 6921 | mutable_unknown_fields()->Clear(); |
| 6922 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6923 | } |
| 6924 | |
| 6925 | bool MethodDescriptorProto::MergePartialFromCodedStream( |
| 6926 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6927 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6928 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6929 | // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto) |
| 6930 | for (;;) { |
| 6931 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 6932 | tag = p.first; |
| 6933 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6934 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6935 | // optional string name = 1; |
| 6936 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6937 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6938 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6939 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6940 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6941 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6942 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6943 | "google.protobuf.MethodDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6944 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6945 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6946 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6947 | if (input->ExpectTag(18)) goto parse_input_type; |
| 6948 | break; |
| 6949 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6950 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6951 | // optional string input_type = 2; |
| 6952 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6953 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6954 | parse_input_type: |
| 6955 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6956 | input, this->mutable_input_type())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6957 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6958 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6959 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6960 | "google.protobuf.MethodDescriptorProto.input_type"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6961 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6962 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6963 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6964 | if (input->ExpectTag(26)) goto parse_output_type; |
| 6965 | break; |
| 6966 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6967 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6968 | // optional string output_type = 3; |
| 6969 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6970 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6971 | parse_output_type: |
| 6972 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6973 | input, this->mutable_output_type())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6974 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6975 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6976 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6977 | "google.protobuf.MethodDescriptorProto.output_type"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6978 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6979 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6980 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6981 | if (input->ExpectTag(34)) goto parse_options; |
| 6982 | break; |
| 6983 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6984 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6985 | // optional .google.protobuf.MethodOptions options = 4; |
| 6986 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6987 | if (tag == 34) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6988 | parse_options: |
| 6989 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 6990 | input, mutable_options())); |
| 6991 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6992 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6993 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6994 | if (input->ExpectTag(40)) goto parse_client_streaming; |
| 6995 | break; |
| 6996 | } |
| 6997 | |
| 6998 | // optional bool client_streaming = 5 [default = false]; |
| 6999 | case 5: { |
| 7000 | if (tag == 40) { |
| 7001 | parse_client_streaming: |
| 7002 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7003 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7004 | input, &client_streaming_))); |
| 7005 | set_has_client_streaming(); |
| 7006 | } else { |
| 7007 | goto handle_unusual; |
| 7008 | } |
| 7009 | if (input->ExpectTag(48)) goto parse_server_streaming; |
| 7010 | break; |
| 7011 | } |
| 7012 | |
| 7013 | // optional bool server_streaming = 6 [default = false]; |
| 7014 | case 6: { |
| 7015 | if (tag == 48) { |
| 7016 | parse_server_streaming: |
| 7017 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7018 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7019 | input, &server_streaming_))); |
| 7020 | set_has_server_streaming(); |
| 7021 | } else { |
| 7022 | goto handle_unusual; |
| 7023 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7024 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7025 | break; |
| 7026 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7027 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7028 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7029 | handle_unusual: |
| 7030 | if (tag == 0 || |
| 7031 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7032 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7033 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7034 | } |
| 7035 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 7036 | input, tag, mutable_unknown_fields())); |
| 7037 | break; |
| 7038 | } |
| 7039 | } |
| 7040 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7041 | success: |
| 7042 | // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7043 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7044 | failure: |
| 7045 | // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto) |
| 7046 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7047 | #undef DO_ |
| 7048 | } |
| 7049 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7050 | void MethodDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7051 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7052 | // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7053 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7054 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7055 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7056 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7057 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7058 | "google.protobuf.MethodDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7059 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7060 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7061 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7062 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7063 | // optional string input_type = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7064 | if (has_input_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7065 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7066 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7067 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7068 | "google.protobuf.MethodDescriptorProto.input_type"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7069 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7070 | 2, this->input_type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7071 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7072 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7073 | // optional string output_type = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7074 | if (has_output_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7075 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7076 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7077 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7078 | "google.protobuf.MethodDescriptorProto.output_type"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7079 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7080 | 3, this->output_type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7081 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7082 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7083 | // optional .google.protobuf.MethodOptions options = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7084 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7085 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7086 | 4, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7087 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7088 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7089 | // optional bool client_streaming = 5 [default = false]; |
| 7090 | if (has_client_streaming()) { |
| 7091 | ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output); |
| 7092 | } |
| 7093 | |
| 7094 | // optional bool server_streaming = 6 [default = false]; |
| 7095 | if (has_server_streaming()) { |
| 7096 | ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output); |
| 7097 | } |
| 7098 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7099 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7100 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 7101 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7102 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7103 | // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7104 | } |
| 7105 | |
| 7106 | ::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray( |
| 7107 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7108 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7109 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7110 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7111 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7112 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7113 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7114 | "google.protobuf.MethodDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7115 | target = |
| 7116 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7117 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7118 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7119 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7120 | // optional string input_type = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7121 | if (has_input_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7122 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7123 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7124 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7125 | "google.protobuf.MethodDescriptorProto.input_type"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7126 | target = |
| 7127 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7128 | 2, this->input_type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7129 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7130 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7131 | // optional string output_type = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7132 | if (has_output_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7133 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7134 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7135 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7136 | "google.protobuf.MethodDescriptorProto.output_type"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7137 | target = |
| 7138 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7139 | 3, this->output_type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7140 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7141 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7142 | // optional .google.protobuf.MethodOptions options = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7143 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7144 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7145 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7146 | 4, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7147 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7148 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7149 | // optional bool client_streaming = 5 [default = false]; |
| 7150 | if (has_client_streaming()) { |
| 7151 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target); |
| 7152 | } |
| 7153 | |
| 7154 | // optional bool server_streaming = 6 [default = false]; |
| 7155 | if (has_server_streaming()) { |
| 7156 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target); |
| 7157 | } |
| 7158 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7159 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7160 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 7161 | unknown_fields(), target); |
| 7162 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7163 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7164 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7165 | } |
| 7166 | |
| 7167 | int MethodDescriptorProto::ByteSize() const { |
| 7168 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7169 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 7170 | if (_has_bits_[0 / 32] & 63u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7171 | // optional string name = 1; |
| 7172 | if (has_name()) { |
| 7173 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7174 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7175 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7176 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7177 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7178 | // optional string input_type = 2; |
| 7179 | if (has_input_type()) { |
| 7180 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7181 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7182 | this->input_type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7183 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7184 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7185 | // optional string output_type = 3; |
| 7186 | if (has_output_type()) { |
| 7187 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7188 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7189 | this->output_type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7190 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7191 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7192 | // optional .google.protobuf.MethodOptions options = 4; |
| 7193 | if (has_options()) { |
| 7194 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7195 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7196 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7197 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7198 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7199 | // optional bool client_streaming = 5 [default = false]; |
| 7200 | if (has_client_streaming()) { |
| 7201 | total_size += 1 + 1; |
| 7202 | } |
| 7203 | |
| 7204 | // optional bool server_streaming = 6 [default = false]; |
| 7205 | if (has_server_streaming()) { |
| 7206 | total_size += 1 + 1; |
| 7207 | } |
| 7208 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7209 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7210 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7211 | total_size += |
| 7212 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 7213 | unknown_fields()); |
| 7214 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7215 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7216 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7217 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7218 | return total_size; |
| 7219 | } |
| 7220 | |
| 7221 | void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7222 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7223 | const MethodDescriptorProto* source = |
| 7224 | ::google::protobuf::internal::DynamicCastToGenerated<const MethodDescriptorProto>( |
| 7225 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7226 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 7227 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7228 | } else { |
| 7229 | MergeFrom(*source); |
| 7230 | } |
| 7231 | } |
| 7232 | |
| 7233 | void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7234 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7235 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7236 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7237 | set_has_name(); |
| 7238 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7239 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7240 | if (from.has_input_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7241 | set_has_input_type(); |
| 7242 | input_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7243 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7244 | if (from.has_output_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7245 | set_has_output_type(); |
| 7246 | output_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7247 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7248 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7249 | mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options()); |
| 7250 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7251 | if (from.has_client_streaming()) { |
| 7252 | set_client_streaming(from.client_streaming()); |
| 7253 | } |
| 7254 | if (from.has_server_streaming()) { |
| 7255 | set_server_streaming(from.server_streaming()); |
| 7256 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7257 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7258 | if (from._internal_metadata_.have_unknown_fields()) { |
| 7259 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 7260 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7261 | } |
| 7262 | |
| 7263 | void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 7264 | if (&from == this) return; |
| 7265 | Clear(); |
| 7266 | MergeFrom(from); |
| 7267 | } |
| 7268 | |
| 7269 | void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) { |
| 7270 | if (&from == this) return; |
| 7271 | Clear(); |
| 7272 | MergeFrom(from); |
| 7273 | } |
| 7274 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7275 | bool MethodDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7276 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7277 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7278 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7279 | } |
| 7280 | return true; |
| 7281 | } |
| 7282 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 7283 | void MethodDescriptorProto::Swap(MethodDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7284 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7285 | InternalSwap(other); |
| 7286 | } |
| 7287 | void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { |
| 7288 | name_.Swap(&other->name_); |
| 7289 | input_type_.Swap(&other->input_type_); |
| 7290 | output_type_.Swap(&other->output_type_); |
| 7291 | std::swap(options_, other->options_); |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7292 | std::swap(client_streaming_, other->client_streaming_); |
| 7293 | std::swap(server_streaming_, other->server_streaming_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7294 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 7295 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 7296 | std::swap(_cached_size_, other->_cached_size_); |
| 7297 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 7298 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7299 | ::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const { |
| 7300 | protobuf_AssignDescriptorsOnce(); |
| 7301 | ::google::protobuf::Metadata metadata; |
| 7302 | metadata.descriptor = MethodDescriptorProto_descriptor_; |
| 7303 | metadata.reflection = MethodDescriptorProto_reflection_; |
| 7304 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7305 | } |
| 7306 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7307 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 7308 | // MethodDescriptorProto |
| 7309 | |
| 7310 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7311 | bool MethodDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7312 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 7313 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7314 | void MethodDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7315 | _has_bits_[0] |= 0x00000001u; |
| 7316 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7317 | void MethodDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7318 | _has_bits_[0] &= ~0x00000001u; |
| 7319 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7320 | void MethodDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7321 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7322 | clear_has_name(); |
| 7323 | } |
| 7324 | const ::std::string& MethodDescriptorProto::name() const { |
| 7325 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) |
| 7326 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7327 | } |
| 7328 | void MethodDescriptorProto::set_name(const ::std::string& value) { |
| 7329 | set_has_name(); |
| 7330 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7331 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) |
| 7332 | } |
| 7333 | void MethodDescriptorProto::set_name(const char* value) { |
| 7334 | set_has_name(); |
| 7335 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7336 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name) |
| 7337 | } |
| 7338 | void MethodDescriptorProto::set_name(const char* value, size_t size) { |
| 7339 | set_has_name(); |
| 7340 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7341 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7342 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name) |
| 7343 | } |
| 7344 | ::std::string* MethodDescriptorProto::mutable_name() { |
| 7345 | set_has_name(); |
| 7346 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) |
| 7347 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7348 | } |
| 7349 | ::std::string* MethodDescriptorProto::release_name() { |
| 7350 | clear_has_name(); |
| 7351 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7352 | } |
| 7353 | void MethodDescriptorProto::set_allocated_name(::std::string* name) { |
| 7354 | if (name != NULL) { |
| 7355 | set_has_name(); |
| 7356 | } else { |
| 7357 | clear_has_name(); |
| 7358 | } |
| 7359 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 7360 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) |
| 7361 | } |
| 7362 | |
| 7363 | // optional string input_type = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7364 | bool MethodDescriptorProto::has_input_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7365 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 7366 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7367 | void MethodDescriptorProto::set_has_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7368 | _has_bits_[0] |= 0x00000002u; |
| 7369 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7370 | void MethodDescriptorProto::clear_has_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7371 | _has_bits_[0] &= ~0x00000002u; |
| 7372 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7373 | void MethodDescriptorProto::clear_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7374 | input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7375 | clear_has_input_type(); |
| 7376 | } |
| 7377 | const ::std::string& MethodDescriptorProto::input_type() const { |
| 7378 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) |
| 7379 | return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7380 | } |
| 7381 | void MethodDescriptorProto::set_input_type(const ::std::string& value) { |
| 7382 | set_has_input_type(); |
| 7383 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7384 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) |
| 7385 | } |
| 7386 | void MethodDescriptorProto::set_input_type(const char* value) { |
| 7387 | set_has_input_type(); |
| 7388 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7389 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type) |
| 7390 | } |
| 7391 | void MethodDescriptorProto::set_input_type(const char* value, size_t size) { |
| 7392 | set_has_input_type(); |
| 7393 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7394 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7395 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type) |
| 7396 | } |
| 7397 | ::std::string* MethodDescriptorProto::mutable_input_type() { |
| 7398 | set_has_input_type(); |
| 7399 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) |
| 7400 | return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7401 | } |
| 7402 | ::std::string* MethodDescriptorProto::release_input_type() { |
| 7403 | clear_has_input_type(); |
| 7404 | return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7405 | } |
| 7406 | void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) { |
| 7407 | if (input_type != NULL) { |
| 7408 | set_has_input_type(); |
| 7409 | } else { |
| 7410 | clear_has_input_type(); |
| 7411 | } |
| 7412 | input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type); |
| 7413 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) |
| 7414 | } |
| 7415 | |
| 7416 | // optional string output_type = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7417 | bool MethodDescriptorProto::has_output_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7418 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 7419 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7420 | void MethodDescriptorProto::set_has_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7421 | _has_bits_[0] |= 0x00000004u; |
| 7422 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7423 | void MethodDescriptorProto::clear_has_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7424 | _has_bits_[0] &= ~0x00000004u; |
| 7425 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7426 | void MethodDescriptorProto::clear_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7427 | output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7428 | clear_has_output_type(); |
| 7429 | } |
| 7430 | const ::std::string& MethodDescriptorProto::output_type() const { |
| 7431 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) |
| 7432 | return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7433 | } |
| 7434 | void MethodDescriptorProto::set_output_type(const ::std::string& value) { |
| 7435 | set_has_output_type(); |
| 7436 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7437 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) |
| 7438 | } |
| 7439 | void MethodDescriptorProto::set_output_type(const char* value) { |
| 7440 | set_has_output_type(); |
| 7441 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7442 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type) |
| 7443 | } |
| 7444 | void MethodDescriptorProto::set_output_type(const char* value, size_t size) { |
| 7445 | set_has_output_type(); |
| 7446 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7447 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7448 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type) |
| 7449 | } |
| 7450 | ::std::string* MethodDescriptorProto::mutable_output_type() { |
| 7451 | set_has_output_type(); |
| 7452 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) |
| 7453 | return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7454 | } |
| 7455 | ::std::string* MethodDescriptorProto::release_output_type() { |
| 7456 | clear_has_output_type(); |
| 7457 | return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7458 | } |
| 7459 | void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) { |
| 7460 | if (output_type != NULL) { |
| 7461 | set_has_output_type(); |
| 7462 | } else { |
| 7463 | clear_has_output_type(); |
| 7464 | } |
| 7465 | output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type); |
| 7466 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) |
| 7467 | } |
| 7468 | |
| 7469 | // optional .google.protobuf.MethodOptions options = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7470 | bool MethodDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7471 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 7472 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7473 | void MethodDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7474 | _has_bits_[0] |= 0x00000008u; |
| 7475 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7476 | void MethodDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7477 | _has_bits_[0] &= ~0x00000008u; |
| 7478 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7479 | void MethodDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7480 | if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); |
| 7481 | clear_has_options(); |
| 7482 | } |
| 7483 | const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { |
| 7484 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) |
| 7485 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 7486 | } |
| 7487 | ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { |
| 7488 | set_has_options(); |
| 7489 | if (options_ == NULL) { |
| 7490 | options_ = new ::google::protobuf::MethodOptions; |
| 7491 | } |
| 7492 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) |
| 7493 | return options_; |
| 7494 | } |
| 7495 | ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() { |
| 7496 | clear_has_options(); |
| 7497 | ::google::protobuf::MethodOptions* temp = options_; |
| 7498 | options_ = NULL; |
| 7499 | return temp; |
| 7500 | } |
| 7501 | void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) { |
| 7502 | delete options_; |
| 7503 | options_ = options; |
| 7504 | if (options) { |
| 7505 | set_has_options(); |
| 7506 | } else { |
| 7507 | clear_has_options(); |
| 7508 | } |
| 7509 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options) |
| 7510 | } |
| 7511 | |
| 7512 | // optional bool client_streaming = 5 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7513 | bool MethodDescriptorProto::has_client_streaming() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7514 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 7515 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7516 | void MethodDescriptorProto::set_has_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7517 | _has_bits_[0] |= 0x00000010u; |
| 7518 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7519 | void MethodDescriptorProto::clear_has_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7520 | _has_bits_[0] &= ~0x00000010u; |
| 7521 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7522 | void MethodDescriptorProto::clear_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7523 | client_streaming_ = false; |
| 7524 | clear_has_client_streaming(); |
| 7525 | } |
| 7526 | bool MethodDescriptorProto::client_streaming() const { |
| 7527 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming) |
| 7528 | return client_streaming_; |
| 7529 | } |
| 7530 | void MethodDescriptorProto::set_client_streaming(bool value) { |
| 7531 | set_has_client_streaming(); |
| 7532 | client_streaming_ = value; |
| 7533 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming) |
| 7534 | } |
| 7535 | |
| 7536 | // optional bool server_streaming = 6 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7537 | bool MethodDescriptorProto::has_server_streaming() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7538 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 7539 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7540 | void MethodDescriptorProto::set_has_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7541 | _has_bits_[0] |= 0x00000020u; |
| 7542 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7543 | void MethodDescriptorProto::clear_has_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7544 | _has_bits_[0] &= ~0x00000020u; |
| 7545 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7546 | void MethodDescriptorProto::clear_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7547 | server_streaming_ = false; |
| 7548 | clear_has_server_streaming(); |
| 7549 | } |
| 7550 | bool MethodDescriptorProto::server_streaming() const { |
| 7551 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming) |
| 7552 | return server_streaming_; |
| 7553 | } |
| 7554 | void MethodDescriptorProto::set_server_streaming(bool value) { |
| 7555 | set_has_server_streaming(); |
| 7556 | server_streaming_ = value; |
| 7557 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming) |
| 7558 | } |
| 7559 | |
| 7560 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7561 | |
| 7562 | // =================================================================== |
| 7563 | |
| 7564 | const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7565 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7566 | return FileOptions_OptimizeMode_descriptor_; |
| 7567 | } |
| 7568 | bool FileOptions_OptimizeMode_IsValid(int value) { |
| 7569 | switch(value) { |
| 7570 | case 1: |
| 7571 | case 2: |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7572 | case 3: |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7573 | return true; |
| 7574 | default: |
| 7575 | return false; |
| 7576 | } |
| 7577 | } |
| 7578 | |
| 7579 | #ifndef _MSC_VER |
| 7580 | const FileOptions_OptimizeMode FileOptions::SPEED; |
| 7581 | const FileOptions_OptimizeMode FileOptions::CODE_SIZE; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7582 | const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7583 | const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN; |
| 7584 | const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7585 | const int FileOptions::OptimizeMode_ARRAYSIZE; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7586 | #endif // _MSC_VER |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7587 | #ifndef _MSC_VER |
| 7588 | const int FileOptions::kJavaPackageFieldNumber; |
| 7589 | const int FileOptions::kJavaOuterClassnameFieldNumber; |
| 7590 | const int FileOptions::kJavaMultipleFilesFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7591 | const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7592 | const int FileOptions::kJavaStringCheckUtf8FieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7593 | const int FileOptions::kOptimizeForFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7594 | const int FileOptions::kGoPackageFieldNumber; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7595 | const int FileOptions::kCcGenericServicesFieldNumber; |
| 7596 | const int FileOptions::kJavaGenericServicesFieldNumber; |
| 7597 | const int FileOptions::kPyGenericServicesFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7598 | const int FileOptions::kDeprecatedFieldNumber; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7599 | const int FileOptions::kCcEnableArenasFieldNumber; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7600 | const int FileOptions::kObjcClassPrefixFieldNumber; |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7601 | const int FileOptions::kCsharpNamespaceFieldNumber; |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 7602 | const int FileOptions::kJavananoUseDeprecatedPackageFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7603 | const int FileOptions::kUninterpretedOptionFieldNumber; |
| 7604 | #endif // !_MSC_VER |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7605 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 7606 | FileOptions::FileOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7607 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7608 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7609 | // @@protoc_insertion_point(constructor:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7610 | } |
| 7611 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7612 | void FileOptions::InitAsDefaultInstance() { |
| 7613 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7614 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 7615 | FileOptions::FileOptions(const FileOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7616 | : ::google::protobuf::Message(), |
| 7617 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7618 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7619 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7620 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7621 | } |
| 7622 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7623 | void FileOptions::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7624 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7625 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7626 | java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7627 | java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7628 | java_multiple_files_ = false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7629 | java_generate_equals_and_hash_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7630 | java_string_check_utf8_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7631 | optimize_for_ = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7632 | go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7633 | cc_generic_services_ = false; |
| 7634 | java_generic_services_ = false; |
| 7635 | py_generic_services_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7636 | deprecated_ = false; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7637 | cc_enable_arenas_ = false; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7638 | objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7639 | csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 7640 | javanano_use_deprecated_package_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7641 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 7642 | } |
| 7643 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7644 | FileOptions::~FileOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7645 | // @@protoc_insertion_point(destructor:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7646 | SharedDtor(); |
| 7647 | } |
| 7648 | |
| 7649 | void FileOptions::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7650 | java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7651 | java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7652 | go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7653 | objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7654 | csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7655 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7656 | } |
| 7657 | } |
| 7658 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7659 | void FileOptions::SetCachedSize(int size) const { |
| 7660 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 7661 | _cached_size_ = size; |
| 7662 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 7663 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7664 | const ::google::protobuf::Descriptor* FileOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7665 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7666 | return FileOptions_descriptor_; |
| 7667 | } |
| 7668 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7669 | const FileOptions& FileOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 7670 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 7671 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7672 | } |
| 7673 | |
| 7674 | FileOptions* FileOptions::default_instance_ = NULL; |
| 7675 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7676 | FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7677 | FileOptions* n = new FileOptions; |
| 7678 | if (arena != NULL) { |
| 7679 | arena->Own(n); |
| 7680 | } |
| 7681 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7682 | } |
| 7683 | |
| 7684 | void FileOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7685 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7686 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 7687 | &reinterpret_cast<FileOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7688 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7689 | #define ZR_(first, last) do {\ |
| 7690 | ::memset(&first, 0,\ |
| 7691 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 7692 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7693 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 7694 | if (_has_bits_[0 / 32] & 255u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7695 | ZR_(java_multiple_files_, cc_generic_services_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7696 | if (has_java_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7697 | java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7698 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7699 | if (has_java_outer_classname()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7700 | java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7701 | } |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7702 | optimize_for_ = 1; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7703 | if (has_go_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7704 | go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7705 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7706 | } |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 7707 | if (_has_bits_[8 / 32] & 32512u) { |
| 7708 | ZR_(java_generic_services_, javanano_use_deprecated_package_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7709 | if (has_objc_class_prefix()) { |
| 7710 | objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7711 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7712 | if (has_csharp_namespace()) { |
| 7713 | csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7714 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7715 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7716 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7717 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7718 | #undef ZR_ |
| 7719 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7720 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7721 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7722 | if (_internal_metadata_.have_unknown_fields()) { |
| 7723 | mutable_unknown_fields()->Clear(); |
| 7724 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7725 | } |
| 7726 | |
| 7727 | bool FileOptions::MergePartialFromCodedStream( |
| 7728 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7729 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7730 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7731 | // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions) |
| 7732 | for (;;) { |
| 7733 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 7734 | tag = p.first; |
| 7735 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7736 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7737 | // optional string java_package = 1; |
| 7738 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7739 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7740 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7741 | input, this->mutable_java_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7742 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7743 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7744 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7745 | "google.protobuf.FileOptions.java_package"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7746 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7747 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7748 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7749 | if (input->ExpectTag(66)) goto parse_java_outer_classname; |
| 7750 | break; |
| 7751 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7752 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7753 | // optional string java_outer_classname = 8; |
| 7754 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7755 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7756 | parse_java_outer_classname: |
| 7757 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7758 | input, this->mutable_java_outer_classname())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7759 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7760 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7761 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7762 | "google.protobuf.FileOptions.java_outer_classname"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7763 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7764 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7765 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7766 | if (input->ExpectTag(72)) goto parse_optimize_for; |
| 7767 | break; |
| 7768 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7769 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7770 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7771 | case 9: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7772 | if (tag == 72) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7773 | parse_optimize_for: |
| 7774 | int value; |
| 7775 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7776 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 7777 | input, &value))); |
| 7778 | if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) { |
| 7779 | set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); |
| 7780 | } else { |
| 7781 | mutable_unknown_fields()->AddVarint(9, value); |
| 7782 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7783 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7784 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7785 | } |
| 7786 | if (input->ExpectTag(80)) goto parse_java_multiple_files; |
| 7787 | break; |
| 7788 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7789 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7790 | // optional bool java_multiple_files = 10 [default = false]; |
| 7791 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7792 | if (tag == 80) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7793 | parse_java_multiple_files: |
| 7794 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7795 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7796 | input, &java_multiple_files_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7797 | set_has_java_multiple_files(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7798 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7799 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7800 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7801 | if (input->ExpectTag(90)) goto parse_go_package; |
| 7802 | break; |
| 7803 | } |
| 7804 | |
| 7805 | // optional string go_package = 11; |
| 7806 | case 11: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7807 | if (tag == 90) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7808 | parse_go_package: |
| 7809 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7810 | input, this->mutable_go_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7811 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7812 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7813 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7814 | "google.protobuf.FileOptions.go_package"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7815 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7816 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7817 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7818 | if (input->ExpectTag(128)) goto parse_cc_generic_services; |
| 7819 | break; |
| 7820 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7821 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7822 | // optional bool cc_generic_services = 16 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7823 | case 16: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7824 | if (tag == 128) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7825 | parse_cc_generic_services: |
| 7826 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7827 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7828 | input, &cc_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7829 | set_has_cc_generic_services(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7830 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7831 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7832 | } |
| 7833 | if (input->ExpectTag(136)) goto parse_java_generic_services; |
| 7834 | break; |
| 7835 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7836 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7837 | // optional bool java_generic_services = 17 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7838 | case 17: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7839 | if (tag == 136) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7840 | parse_java_generic_services: |
| 7841 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7842 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7843 | input, &java_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7844 | set_has_java_generic_services(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7845 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7846 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7847 | } |
| 7848 | if (input->ExpectTag(144)) goto parse_py_generic_services; |
| 7849 | break; |
| 7850 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7851 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7852 | // optional bool py_generic_services = 18 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7853 | case 18: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7854 | if (tag == 144) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7855 | parse_py_generic_services: |
| 7856 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7857 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7858 | input, &py_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7859 | set_has_py_generic_services(); |
| 7860 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7861 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7862 | } |
| 7863 | if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash; |
| 7864 | break; |
| 7865 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7866 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7867 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 7868 | case 20: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7869 | if (tag == 160) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7870 | parse_java_generate_equals_and_hash: |
| 7871 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7872 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7873 | input, &java_generate_equals_and_hash_))); |
| 7874 | set_has_java_generate_equals_and_hash(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7875 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7876 | goto handle_unusual; |
| 7877 | } |
| 7878 | if (input->ExpectTag(184)) goto parse_deprecated; |
| 7879 | break; |
| 7880 | } |
| 7881 | |
| 7882 | // optional bool deprecated = 23 [default = false]; |
| 7883 | case 23: { |
| 7884 | if (tag == 184) { |
| 7885 | parse_deprecated: |
| 7886 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7887 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7888 | input, &deprecated_))); |
| 7889 | set_has_deprecated(); |
| 7890 | } else { |
| 7891 | goto handle_unusual; |
| 7892 | } |
| 7893 | if (input->ExpectTag(216)) goto parse_java_string_check_utf8; |
| 7894 | break; |
| 7895 | } |
| 7896 | |
| 7897 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 7898 | case 27: { |
| 7899 | if (tag == 216) { |
| 7900 | parse_java_string_check_utf8: |
| 7901 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7902 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7903 | input, &java_string_check_utf8_))); |
| 7904 | set_has_java_string_check_utf8(); |
| 7905 | } else { |
| 7906 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7907 | } |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7908 | if (input->ExpectTag(248)) goto parse_cc_enable_arenas; |
| 7909 | break; |
| 7910 | } |
| 7911 | |
| 7912 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 7913 | case 31: { |
| 7914 | if (tag == 248) { |
| 7915 | parse_cc_enable_arenas: |
| 7916 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7917 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7918 | input, &cc_enable_arenas_))); |
| 7919 | set_has_cc_enable_arenas(); |
| 7920 | } else { |
| 7921 | goto handle_unusual; |
| 7922 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7923 | if (input->ExpectTag(290)) goto parse_objc_class_prefix; |
| 7924 | break; |
| 7925 | } |
| 7926 | |
| 7927 | // optional string objc_class_prefix = 36; |
| 7928 | case 36: { |
| 7929 | if (tag == 290) { |
| 7930 | parse_objc_class_prefix: |
| 7931 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7932 | input, this->mutable_objc_class_prefix())); |
| 7933 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 7934 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 7935 | ::google::protobuf::internal::WireFormat::PARSE, |
| 7936 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 7937 | } else { |
| 7938 | goto handle_unusual; |
| 7939 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7940 | if (input->ExpectTag(298)) goto parse_csharp_namespace; |
| 7941 | break; |
| 7942 | } |
| 7943 | |
| 7944 | // optional string csharp_namespace = 37; |
| 7945 | case 37: { |
| 7946 | if (tag == 298) { |
| 7947 | parse_csharp_namespace: |
| 7948 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7949 | input, this->mutable_csharp_namespace())); |
| 7950 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 7951 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 7952 | ::google::protobuf::internal::WireFormat::PARSE, |
| 7953 | "google.protobuf.FileOptions.csharp_namespace"); |
| 7954 | } else { |
| 7955 | goto handle_unusual; |
| 7956 | } |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 7957 | if (input->ExpectTag(304)) goto parse_javanano_use_deprecated_package; |
| 7958 | break; |
| 7959 | } |
| 7960 | |
| 7961 | // optional bool javanano_use_deprecated_package = 38; |
| 7962 | case 38: { |
| 7963 | if (tag == 304) { |
| 7964 | parse_javanano_use_deprecated_package: |
| 7965 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7966 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7967 | input, &javanano_use_deprecated_package_))); |
| 7968 | set_has_javanano_use_deprecated_package(); |
| 7969 | } else { |
| 7970 | goto handle_unusual; |
| 7971 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7972 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 7973 | break; |
| 7974 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7975 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7976 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 7977 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7978 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7979 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7980 | DO_(input->IncrementRecursionDepth()); |
| 7981 | parse_loop_uninterpreted_option: |
| 7982 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7983 | input, add_uninterpreted_option())); |
| 7984 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7985 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7986 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7987 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 7988 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7989 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7990 | break; |
| 7991 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7992 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7993 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7994 | handle_unusual: |
| 7995 | if (tag == 0 || |
| 7996 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7997 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7998 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7999 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8000 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8001 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 8002 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8003 | continue; |
| 8004 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8005 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 8006 | input, tag, mutable_unknown_fields())); |
| 8007 | break; |
| 8008 | } |
| 8009 | } |
| 8010 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8011 | success: |
| 8012 | // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8013 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8014 | failure: |
| 8015 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions) |
| 8016 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8017 | #undef DO_ |
| 8018 | } |
| 8019 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8020 | void FileOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8021 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8022 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8023 | // optional string java_package = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8024 | if (has_java_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8025 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8026 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8027 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8028 | "google.protobuf.FileOptions.java_package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8029 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8030 | 1, this->java_package(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8031 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8032 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8033 | // optional string java_outer_classname = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8034 | if (has_java_outer_classname()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8035 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8036 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8037 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8038 | "google.protobuf.FileOptions.java_outer_classname"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8039 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8040 | 8, this->java_outer_classname(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8041 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8042 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8043 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8044 | if (has_optimize_for()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8045 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 8046 | 9, this->optimize_for(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8047 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8048 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8049 | // optional bool java_multiple_files = 10 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8050 | if (has_java_multiple_files()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8051 | ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8052 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8053 | |
| 8054 | // optional string go_package = 11; |
| 8055 | if (has_go_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8056 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8057 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8058 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8059 | "google.protobuf.FileOptions.go_package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8060 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8061 | 11, this->go_package(), output); |
| 8062 | } |
| 8063 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8064 | // optional bool cc_generic_services = 16 [default = false]; |
| 8065 | if (has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8066 | ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); |
| 8067 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8068 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8069 | // optional bool java_generic_services = 17 [default = false]; |
| 8070 | if (has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8071 | ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); |
| 8072 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8073 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8074 | // optional bool py_generic_services = 18 [default = false]; |
| 8075 | if (has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8076 | ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); |
| 8077 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8078 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8079 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8080 | if (has_java_generate_equals_and_hash()) { |
| 8081 | ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); |
| 8082 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8083 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8084 | // optional bool deprecated = 23 [default = false]; |
| 8085 | if (has_deprecated()) { |
| 8086 | ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output); |
| 8087 | } |
| 8088 | |
| 8089 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8090 | if (has_java_string_check_utf8()) { |
| 8091 | ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output); |
| 8092 | } |
| 8093 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8094 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8095 | if (has_cc_enable_arenas()) { |
| 8096 | ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output); |
| 8097 | } |
| 8098 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8099 | // optional string objc_class_prefix = 36; |
| 8100 | if (has_objc_class_prefix()) { |
| 8101 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8102 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 8103 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8104 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 8105 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8106 | 36, this->objc_class_prefix(), output); |
| 8107 | } |
| 8108 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8109 | // optional string csharp_namespace = 37; |
| 8110 | if (has_csharp_namespace()) { |
| 8111 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8112 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 8113 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8114 | "google.protobuf.FileOptions.csharp_namespace"); |
| 8115 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8116 | 37, this->csharp_namespace(), output); |
| 8117 | } |
| 8118 | |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8119 | // optional bool javanano_use_deprecated_package = 38; |
| 8120 | if (has_javanano_use_deprecated_package()) { |
| 8121 | ::google::protobuf::internal::WireFormatLite::WriteBool(38, this->javanano_use_deprecated_package(), output); |
| 8122 | } |
| 8123 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8124 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8125 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8126 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8127 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8128 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8129 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8130 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8131 | _extensions_.SerializeWithCachedSizes( |
| 8132 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8133 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8134 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8135 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 8136 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8137 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8138 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8139 | } |
| 8140 | |
| 8141 | ::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray( |
| 8142 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8143 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8144 | // optional string java_package = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8145 | if (has_java_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8146 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8147 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8148 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8149 | "google.protobuf.FileOptions.java_package"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8150 | target = |
| 8151 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8152 | 1, this->java_package(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8153 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8154 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8155 | // optional string java_outer_classname = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8156 | if (has_java_outer_classname()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8157 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8158 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8159 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8160 | "google.protobuf.FileOptions.java_outer_classname"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8161 | target = |
| 8162 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8163 | 8, this->java_outer_classname(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8164 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8165 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8166 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8167 | if (has_optimize_for()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8168 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 8169 | 9, this->optimize_for(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8170 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8171 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8172 | // optional bool java_multiple_files = 10 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8173 | if (has_java_multiple_files()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8174 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8175 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8176 | |
| 8177 | // optional string go_package = 11; |
| 8178 | if (has_go_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8179 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8180 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8181 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8182 | "google.protobuf.FileOptions.go_package"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8183 | target = |
| 8184 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8185 | 11, this->go_package(), target); |
| 8186 | } |
| 8187 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8188 | // optional bool cc_generic_services = 16 [default = false]; |
| 8189 | if (has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8190 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); |
| 8191 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8192 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8193 | // optional bool java_generic_services = 17 [default = false]; |
| 8194 | if (has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8195 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); |
| 8196 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8197 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8198 | // optional bool py_generic_services = 18 [default = false]; |
| 8199 | if (has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8200 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); |
| 8201 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8202 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8203 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8204 | if (has_java_generate_equals_and_hash()) { |
| 8205 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); |
| 8206 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8207 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8208 | // optional bool deprecated = 23 [default = false]; |
| 8209 | if (has_deprecated()) { |
| 8210 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target); |
| 8211 | } |
| 8212 | |
| 8213 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8214 | if (has_java_string_check_utf8()) { |
| 8215 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target); |
| 8216 | } |
| 8217 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8218 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8219 | if (has_cc_enable_arenas()) { |
| 8220 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target); |
| 8221 | } |
| 8222 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8223 | // optional string objc_class_prefix = 36; |
| 8224 | if (has_objc_class_prefix()) { |
| 8225 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8226 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 8227 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8228 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 8229 | target = |
| 8230 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8231 | 36, this->objc_class_prefix(), target); |
| 8232 | } |
| 8233 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8234 | // optional string csharp_namespace = 37; |
| 8235 | if (has_csharp_namespace()) { |
| 8236 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8237 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 8238 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8239 | "google.protobuf.FileOptions.csharp_namespace"); |
| 8240 | target = |
| 8241 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8242 | 37, this->csharp_namespace(), target); |
| 8243 | } |
| 8244 | |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8245 | // optional bool javanano_use_deprecated_package = 38; |
| 8246 | if (has_javanano_use_deprecated_package()) { |
| 8247 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(38, this->javanano_use_deprecated_package(), target); |
| 8248 | } |
| 8249 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8250 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8251 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8252 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8253 | WriteMessageNoVirtualToArray( |
| 8254 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8255 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8256 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8257 | // Extension range [1000, 536870912) |
| 8258 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 8259 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8260 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8261 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8262 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 8263 | unknown_fields(), target); |
| 8264 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8265 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8266 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8267 | } |
| 8268 | |
| 8269 | int FileOptions::ByteSize() const { |
| 8270 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8271 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 8272 | if (_has_bits_[0 / 32] & 255u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8273 | // optional string java_package = 1; |
| 8274 | if (has_java_package()) { |
| 8275 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8276 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8277 | this->java_package()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8278 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8279 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8280 | // optional string java_outer_classname = 8; |
| 8281 | if (has_java_outer_classname()) { |
| 8282 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8283 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8284 | this->java_outer_classname()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8285 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8286 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8287 | // optional bool java_multiple_files = 10 [default = false]; |
| 8288 | if (has_java_multiple_files()) { |
| 8289 | total_size += 1 + 1; |
| 8290 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8291 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8292 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8293 | if (has_java_generate_equals_and_hash()) { |
| 8294 | total_size += 2 + 1; |
| 8295 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8296 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8297 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8298 | if (has_java_string_check_utf8()) { |
| 8299 | total_size += 2 + 1; |
| 8300 | } |
| 8301 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8302 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8303 | if (has_optimize_for()) { |
| 8304 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8305 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8306 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8307 | |
| 8308 | // optional string go_package = 11; |
| 8309 | if (has_go_package()) { |
| 8310 | total_size += 1 + |
| 8311 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8312 | this->go_package()); |
| 8313 | } |
| 8314 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8315 | // optional bool cc_generic_services = 16 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8316 | if (has_cc_generic_services()) { |
| 8317 | total_size += 2 + 1; |
| 8318 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8319 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8320 | } |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8321 | if (_has_bits_[8 / 32] & 32512u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8322 | // optional bool java_generic_services = 17 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8323 | if (has_java_generic_services()) { |
| 8324 | total_size += 2 + 1; |
| 8325 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8326 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8327 | // optional bool py_generic_services = 18 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8328 | if (has_py_generic_services()) { |
| 8329 | total_size += 2 + 1; |
| 8330 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8331 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8332 | // optional bool deprecated = 23 [default = false]; |
| 8333 | if (has_deprecated()) { |
| 8334 | total_size += 2 + 1; |
| 8335 | } |
| 8336 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8337 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8338 | if (has_cc_enable_arenas()) { |
| 8339 | total_size += 2 + 1; |
| 8340 | } |
| 8341 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8342 | // optional string objc_class_prefix = 36; |
| 8343 | if (has_objc_class_prefix()) { |
| 8344 | total_size += 2 + |
| 8345 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8346 | this->objc_class_prefix()); |
| 8347 | } |
| 8348 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8349 | // optional string csharp_namespace = 37; |
| 8350 | if (has_csharp_namespace()) { |
| 8351 | total_size += 2 + |
| 8352 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8353 | this->csharp_namespace()); |
| 8354 | } |
| 8355 | |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8356 | // optional bool javanano_use_deprecated_package = 38; |
| 8357 | if (has_javanano_use_deprecated_package()) { |
| 8358 | total_size += 2 + 1; |
| 8359 | } |
| 8360 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8361 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8362 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 8363 | total_size += 2 * this->uninterpreted_option_size(); |
| 8364 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8365 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8366 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8367 | this->uninterpreted_option(i)); |
| 8368 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8369 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8370 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8371 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8372 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8373 | total_size += |
| 8374 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 8375 | unknown_fields()); |
| 8376 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8377 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8378 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8379 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8380 | return total_size; |
| 8381 | } |
| 8382 | |
| 8383 | void FileOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8384 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8385 | const FileOptions* source = |
| 8386 | ::google::protobuf::internal::DynamicCastToGenerated<const FileOptions>( |
| 8387 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8388 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 8389 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8390 | } else { |
| 8391 | MergeFrom(*source); |
| 8392 | } |
| 8393 | } |
| 8394 | |
| 8395 | void FileOptions::MergeFrom(const FileOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8396 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8397 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8398 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8399 | if (from.has_java_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8400 | set_has_java_package(); |
| 8401 | java_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8402 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8403 | if (from.has_java_outer_classname()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8404 | set_has_java_outer_classname(); |
| 8405 | java_outer_classname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8406 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8407 | if (from.has_java_multiple_files()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8408 | set_java_multiple_files(from.java_multiple_files()); |
| 8409 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8410 | if (from.has_java_generate_equals_and_hash()) { |
| 8411 | set_java_generate_equals_and_hash(from.java_generate_equals_and_hash()); |
| 8412 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8413 | if (from.has_java_string_check_utf8()) { |
| 8414 | set_java_string_check_utf8(from.java_string_check_utf8()); |
| 8415 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8416 | if (from.has_optimize_for()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8417 | set_optimize_for(from.optimize_for()); |
| 8418 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8419 | if (from.has_go_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8420 | set_has_go_package(); |
| 8421 | go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8422 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8423 | if (from.has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8424 | set_cc_generic_services(from.cc_generic_services()); |
| 8425 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8426 | } |
| 8427 | if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8428 | if (from.has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8429 | set_java_generic_services(from.java_generic_services()); |
| 8430 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8431 | if (from.has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8432 | set_py_generic_services(from.py_generic_services()); |
| 8433 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8434 | if (from.has_deprecated()) { |
| 8435 | set_deprecated(from.deprecated()); |
| 8436 | } |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8437 | if (from.has_cc_enable_arenas()) { |
| 8438 | set_cc_enable_arenas(from.cc_enable_arenas()); |
| 8439 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8440 | if (from.has_objc_class_prefix()) { |
| 8441 | set_has_objc_class_prefix(); |
| 8442 | objc_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix_); |
| 8443 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8444 | if (from.has_csharp_namespace()) { |
| 8445 | set_has_csharp_namespace(); |
| 8446 | csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_); |
| 8447 | } |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8448 | if (from.has_javanano_use_deprecated_package()) { |
| 8449 | set_javanano_use_deprecated_package(from.javanano_use_deprecated_package()); |
| 8450 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8451 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8452 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8453 | if (from._internal_metadata_.have_unknown_fields()) { |
| 8454 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 8455 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8456 | } |
| 8457 | |
| 8458 | void FileOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 8459 | if (&from == this) return; |
| 8460 | Clear(); |
| 8461 | MergeFrom(from); |
| 8462 | } |
| 8463 | |
| 8464 | void FileOptions::CopyFrom(const FileOptions& from) { |
| 8465 | if (&from == this) return; |
| 8466 | Clear(); |
| 8467 | MergeFrom(from); |
| 8468 | } |
| 8469 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 8470 | bool FileOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8471 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8472 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8473 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 8474 | if (!_extensions_.IsInitialized()) return false; return true; |
| 8475 | } |
| 8476 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 8477 | void FileOptions::Swap(FileOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8478 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8479 | InternalSwap(other); |
| 8480 | } |
| 8481 | void FileOptions::InternalSwap(FileOptions* other) { |
| 8482 | java_package_.Swap(&other->java_package_); |
| 8483 | java_outer_classname_.Swap(&other->java_outer_classname_); |
| 8484 | std::swap(java_multiple_files_, other->java_multiple_files_); |
| 8485 | std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); |
| 8486 | std::swap(java_string_check_utf8_, other->java_string_check_utf8_); |
| 8487 | std::swap(optimize_for_, other->optimize_for_); |
| 8488 | go_package_.Swap(&other->go_package_); |
| 8489 | std::swap(cc_generic_services_, other->cc_generic_services_); |
| 8490 | std::swap(java_generic_services_, other->java_generic_services_); |
| 8491 | std::swap(py_generic_services_, other->py_generic_services_); |
| 8492 | std::swap(deprecated_, other->deprecated_); |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8493 | std::swap(cc_enable_arenas_, other->cc_enable_arenas_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8494 | objc_class_prefix_.Swap(&other->objc_class_prefix_); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8495 | csharp_namespace_.Swap(&other->csharp_namespace_); |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8496 | std::swap(javanano_use_deprecated_package_, other->javanano_use_deprecated_package_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8497 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 8498 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 8499 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 8500 | std::swap(_cached_size_, other->_cached_size_); |
| 8501 | _extensions_.Swap(&other->_extensions_); |
| 8502 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 8503 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8504 | ::google::protobuf::Metadata FileOptions::GetMetadata() const { |
| 8505 | protobuf_AssignDescriptorsOnce(); |
| 8506 | ::google::protobuf::Metadata metadata; |
| 8507 | metadata.descriptor = FileOptions_descriptor_; |
| 8508 | metadata.reflection = FileOptions_reflection_; |
| 8509 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8510 | } |
| 8511 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8512 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 8513 | // FileOptions |
| 8514 | |
| 8515 | // optional string java_package = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8516 | bool FileOptions::has_java_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8517 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 8518 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8519 | void FileOptions::set_has_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8520 | _has_bits_[0] |= 0x00000001u; |
| 8521 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8522 | void FileOptions::clear_has_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8523 | _has_bits_[0] &= ~0x00000001u; |
| 8524 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8525 | void FileOptions::clear_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8526 | java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8527 | clear_has_java_package(); |
| 8528 | } |
| 8529 | const ::std::string& FileOptions::java_package() const { |
| 8530 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) |
| 8531 | return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8532 | } |
| 8533 | void FileOptions::set_java_package(const ::std::string& value) { |
| 8534 | set_has_java_package(); |
| 8535 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8536 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) |
| 8537 | } |
| 8538 | void FileOptions::set_java_package(const char* value) { |
| 8539 | set_has_java_package(); |
| 8540 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8541 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package) |
| 8542 | } |
| 8543 | void FileOptions::set_java_package(const char* value, size_t size) { |
| 8544 | set_has_java_package(); |
| 8545 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8546 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8547 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package) |
| 8548 | } |
| 8549 | ::std::string* FileOptions::mutable_java_package() { |
| 8550 | set_has_java_package(); |
| 8551 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) |
| 8552 | return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8553 | } |
| 8554 | ::std::string* FileOptions::release_java_package() { |
| 8555 | clear_has_java_package(); |
| 8556 | return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8557 | } |
| 8558 | void FileOptions::set_allocated_java_package(::std::string* java_package) { |
| 8559 | if (java_package != NULL) { |
| 8560 | set_has_java_package(); |
| 8561 | } else { |
| 8562 | clear_has_java_package(); |
| 8563 | } |
| 8564 | java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package); |
| 8565 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) |
| 8566 | } |
| 8567 | |
| 8568 | // optional string java_outer_classname = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8569 | bool FileOptions::has_java_outer_classname() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8570 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 8571 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8572 | void FileOptions::set_has_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8573 | _has_bits_[0] |= 0x00000002u; |
| 8574 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8575 | void FileOptions::clear_has_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8576 | _has_bits_[0] &= ~0x00000002u; |
| 8577 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8578 | void FileOptions::clear_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8579 | java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8580 | clear_has_java_outer_classname(); |
| 8581 | } |
| 8582 | const ::std::string& FileOptions::java_outer_classname() const { |
| 8583 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) |
| 8584 | return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8585 | } |
| 8586 | void FileOptions::set_java_outer_classname(const ::std::string& value) { |
| 8587 | set_has_java_outer_classname(); |
| 8588 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8589 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) |
| 8590 | } |
| 8591 | void FileOptions::set_java_outer_classname(const char* value) { |
| 8592 | set_has_java_outer_classname(); |
| 8593 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8594 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname) |
| 8595 | } |
| 8596 | void FileOptions::set_java_outer_classname(const char* value, size_t size) { |
| 8597 | set_has_java_outer_classname(); |
| 8598 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8599 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8600 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname) |
| 8601 | } |
| 8602 | ::std::string* FileOptions::mutable_java_outer_classname() { |
| 8603 | set_has_java_outer_classname(); |
| 8604 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) |
| 8605 | return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8606 | } |
| 8607 | ::std::string* FileOptions::release_java_outer_classname() { |
| 8608 | clear_has_java_outer_classname(); |
| 8609 | return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8610 | } |
| 8611 | void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) { |
| 8612 | if (java_outer_classname != NULL) { |
| 8613 | set_has_java_outer_classname(); |
| 8614 | } else { |
| 8615 | clear_has_java_outer_classname(); |
| 8616 | } |
| 8617 | java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname); |
| 8618 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) |
| 8619 | } |
| 8620 | |
| 8621 | // optional bool java_multiple_files = 10 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8622 | bool FileOptions::has_java_multiple_files() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8623 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 8624 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8625 | void FileOptions::set_has_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8626 | _has_bits_[0] |= 0x00000004u; |
| 8627 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8628 | void FileOptions::clear_has_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8629 | _has_bits_[0] &= ~0x00000004u; |
| 8630 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8631 | void FileOptions::clear_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8632 | java_multiple_files_ = false; |
| 8633 | clear_has_java_multiple_files(); |
| 8634 | } |
| 8635 | bool FileOptions::java_multiple_files() const { |
| 8636 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files) |
| 8637 | return java_multiple_files_; |
| 8638 | } |
| 8639 | void FileOptions::set_java_multiple_files(bool value) { |
| 8640 | set_has_java_multiple_files(); |
| 8641 | java_multiple_files_ = value; |
| 8642 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files) |
| 8643 | } |
| 8644 | |
| 8645 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8646 | bool FileOptions::has_java_generate_equals_and_hash() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8647 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 8648 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8649 | void FileOptions::set_has_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8650 | _has_bits_[0] |= 0x00000008u; |
| 8651 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8652 | void FileOptions::clear_has_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8653 | _has_bits_[0] &= ~0x00000008u; |
| 8654 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8655 | void FileOptions::clear_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8656 | java_generate_equals_and_hash_ = false; |
| 8657 | clear_has_java_generate_equals_and_hash(); |
| 8658 | } |
| 8659 | bool FileOptions::java_generate_equals_and_hash() const { |
| 8660 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash) |
| 8661 | return java_generate_equals_and_hash_; |
| 8662 | } |
| 8663 | void FileOptions::set_java_generate_equals_and_hash(bool value) { |
| 8664 | set_has_java_generate_equals_and_hash(); |
| 8665 | java_generate_equals_and_hash_ = value; |
| 8666 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash) |
| 8667 | } |
| 8668 | |
| 8669 | // optional bool java_string_check_utf8 = 27 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8670 | bool FileOptions::has_java_string_check_utf8() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8671 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 8672 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8673 | void FileOptions::set_has_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8674 | _has_bits_[0] |= 0x00000010u; |
| 8675 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8676 | void FileOptions::clear_has_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8677 | _has_bits_[0] &= ~0x00000010u; |
| 8678 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8679 | void FileOptions::clear_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8680 | java_string_check_utf8_ = false; |
| 8681 | clear_has_java_string_check_utf8(); |
| 8682 | } |
| 8683 | bool FileOptions::java_string_check_utf8() const { |
| 8684 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8) |
| 8685 | return java_string_check_utf8_; |
| 8686 | } |
| 8687 | void FileOptions::set_java_string_check_utf8(bool value) { |
| 8688 | set_has_java_string_check_utf8(); |
| 8689 | java_string_check_utf8_ = value; |
| 8690 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8) |
| 8691 | } |
| 8692 | |
| 8693 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8694 | bool FileOptions::has_optimize_for() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8695 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 8696 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8697 | void FileOptions::set_has_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8698 | _has_bits_[0] |= 0x00000020u; |
| 8699 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8700 | void FileOptions::clear_has_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8701 | _has_bits_[0] &= ~0x00000020u; |
| 8702 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8703 | void FileOptions::clear_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8704 | optimize_for_ = 1; |
| 8705 | clear_has_optimize_for(); |
| 8706 | } |
| 8707 | ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const { |
| 8708 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for) |
| 8709 | return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_); |
| 8710 | } |
| 8711 | void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) { |
| 8712 | assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value)); |
| 8713 | set_has_optimize_for(); |
| 8714 | optimize_for_ = value; |
| 8715 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for) |
| 8716 | } |
| 8717 | |
| 8718 | // optional string go_package = 11; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8719 | bool FileOptions::has_go_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8720 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 8721 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8722 | void FileOptions::set_has_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8723 | _has_bits_[0] |= 0x00000040u; |
| 8724 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8725 | void FileOptions::clear_has_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8726 | _has_bits_[0] &= ~0x00000040u; |
| 8727 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8728 | void FileOptions::clear_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8729 | go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8730 | clear_has_go_package(); |
| 8731 | } |
| 8732 | const ::std::string& FileOptions::go_package() const { |
| 8733 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) |
| 8734 | return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8735 | } |
| 8736 | void FileOptions::set_go_package(const ::std::string& value) { |
| 8737 | set_has_go_package(); |
| 8738 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8739 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) |
| 8740 | } |
| 8741 | void FileOptions::set_go_package(const char* value) { |
| 8742 | set_has_go_package(); |
| 8743 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8744 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package) |
| 8745 | } |
| 8746 | void FileOptions::set_go_package(const char* value, size_t size) { |
| 8747 | set_has_go_package(); |
| 8748 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8749 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8750 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package) |
| 8751 | } |
| 8752 | ::std::string* FileOptions::mutable_go_package() { |
| 8753 | set_has_go_package(); |
| 8754 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) |
| 8755 | return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8756 | } |
| 8757 | ::std::string* FileOptions::release_go_package() { |
| 8758 | clear_has_go_package(); |
| 8759 | return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8760 | } |
| 8761 | void FileOptions::set_allocated_go_package(::std::string* go_package) { |
| 8762 | if (go_package != NULL) { |
| 8763 | set_has_go_package(); |
| 8764 | } else { |
| 8765 | clear_has_go_package(); |
| 8766 | } |
| 8767 | go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package); |
| 8768 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) |
| 8769 | } |
| 8770 | |
| 8771 | // optional bool cc_generic_services = 16 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8772 | bool FileOptions::has_cc_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8773 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 8774 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8775 | void FileOptions::set_has_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8776 | _has_bits_[0] |= 0x00000080u; |
| 8777 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8778 | void FileOptions::clear_has_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8779 | _has_bits_[0] &= ~0x00000080u; |
| 8780 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8781 | void FileOptions::clear_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8782 | cc_generic_services_ = false; |
| 8783 | clear_has_cc_generic_services(); |
| 8784 | } |
| 8785 | bool FileOptions::cc_generic_services() const { |
| 8786 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services) |
| 8787 | return cc_generic_services_; |
| 8788 | } |
| 8789 | void FileOptions::set_cc_generic_services(bool value) { |
| 8790 | set_has_cc_generic_services(); |
| 8791 | cc_generic_services_ = value; |
| 8792 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services) |
| 8793 | } |
| 8794 | |
| 8795 | // optional bool java_generic_services = 17 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8796 | bool FileOptions::has_java_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8797 | return (_has_bits_[0] & 0x00000100u) != 0; |
| 8798 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8799 | void FileOptions::set_has_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8800 | _has_bits_[0] |= 0x00000100u; |
| 8801 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8802 | void FileOptions::clear_has_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8803 | _has_bits_[0] &= ~0x00000100u; |
| 8804 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8805 | void FileOptions::clear_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8806 | java_generic_services_ = false; |
| 8807 | clear_has_java_generic_services(); |
| 8808 | } |
| 8809 | bool FileOptions::java_generic_services() const { |
| 8810 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services) |
| 8811 | return java_generic_services_; |
| 8812 | } |
| 8813 | void FileOptions::set_java_generic_services(bool value) { |
| 8814 | set_has_java_generic_services(); |
| 8815 | java_generic_services_ = value; |
| 8816 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services) |
| 8817 | } |
| 8818 | |
| 8819 | // optional bool py_generic_services = 18 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8820 | bool FileOptions::has_py_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8821 | return (_has_bits_[0] & 0x00000200u) != 0; |
| 8822 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8823 | void FileOptions::set_has_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8824 | _has_bits_[0] |= 0x00000200u; |
| 8825 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8826 | void FileOptions::clear_has_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8827 | _has_bits_[0] &= ~0x00000200u; |
| 8828 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8829 | void FileOptions::clear_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8830 | py_generic_services_ = false; |
| 8831 | clear_has_py_generic_services(); |
| 8832 | } |
| 8833 | bool FileOptions::py_generic_services() const { |
| 8834 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services) |
| 8835 | return py_generic_services_; |
| 8836 | } |
| 8837 | void FileOptions::set_py_generic_services(bool value) { |
| 8838 | set_has_py_generic_services(); |
| 8839 | py_generic_services_ = value; |
| 8840 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services) |
| 8841 | } |
| 8842 | |
| 8843 | // optional bool deprecated = 23 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8844 | bool FileOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8845 | return (_has_bits_[0] & 0x00000400u) != 0; |
| 8846 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8847 | void FileOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8848 | _has_bits_[0] |= 0x00000400u; |
| 8849 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8850 | void FileOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8851 | _has_bits_[0] &= ~0x00000400u; |
| 8852 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8853 | void FileOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8854 | deprecated_ = false; |
| 8855 | clear_has_deprecated(); |
| 8856 | } |
| 8857 | bool FileOptions::deprecated() const { |
| 8858 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated) |
| 8859 | return deprecated_; |
| 8860 | } |
| 8861 | void FileOptions::set_deprecated(bool value) { |
| 8862 | set_has_deprecated(); |
| 8863 | deprecated_ = value; |
| 8864 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated) |
| 8865 | } |
| 8866 | |
| 8867 | // optional bool cc_enable_arenas = 31 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8868 | bool FileOptions::has_cc_enable_arenas() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8869 | return (_has_bits_[0] & 0x00000800u) != 0; |
| 8870 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8871 | void FileOptions::set_has_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8872 | _has_bits_[0] |= 0x00000800u; |
| 8873 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8874 | void FileOptions::clear_has_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8875 | _has_bits_[0] &= ~0x00000800u; |
| 8876 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8877 | void FileOptions::clear_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8878 | cc_enable_arenas_ = false; |
| 8879 | clear_has_cc_enable_arenas(); |
| 8880 | } |
| 8881 | bool FileOptions::cc_enable_arenas() const { |
| 8882 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas) |
| 8883 | return cc_enable_arenas_; |
| 8884 | } |
| 8885 | void FileOptions::set_cc_enable_arenas(bool value) { |
| 8886 | set_has_cc_enable_arenas(); |
| 8887 | cc_enable_arenas_ = value; |
| 8888 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas) |
| 8889 | } |
| 8890 | |
| 8891 | // optional string objc_class_prefix = 36; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8892 | bool FileOptions::has_objc_class_prefix() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8893 | return (_has_bits_[0] & 0x00001000u) != 0; |
| 8894 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8895 | void FileOptions::set_has_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8896 | _has_bits_[0] |= 0x00001000u; |
| 8897 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8898 | void FileOptions::clear_has_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8899 | _has_bits_[0] &= ~0x00001000u; |
| 8900 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8901 | void FileOptions::clear_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8902 | objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8903 | clear_has_objc_class_prefix(); |
| 8904 | } |
| 8905 | const ::std::string& FileOptions::objc_class_prefix() const { |
| 8906 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix) |
| 8907 | return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8908 | } |
| 8909 | void FileOptions::set_objc_class_prefix(const ::std::string& value) { |
| 8910 | set_has_objc_class_prefix(); |
| 8911 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8912 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) |
| 8913 | } |
| 8914 | void FileOptions::set_objc_class_prefix(const char* value) { |
| 8915 | set_has_objc_class_prefix(); |
| 8916 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8917 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix) |
| 8918 | } |
| 8919 | void FileOptions::set_objc_class_prefix(const char* value, size_t size) { |
| 8920 | set_has_objc_class_prefix(); |
| 8921 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8922 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8923 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix) |
| 8924 | } |
| 8925 | ::std::string* FileOptions::mutable_objc_class_prefix() { |
| 8926 | set_has_objc_class_prefix(); |
| 8927 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix) |
| 8928 | return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8929 | } |
| 8930 | ::std::string* FileOptions::release_objc_class_prefix() { |
| 8931 | clear_has_objc_class_prefix(); |
| 8932 | return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8933 | } |
| 8934 | void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) { |
| 8935 | if (objc_class_prefix != NULL) { |
| 8936 | set_has_objc_class_prefix(); |
| 8937 | } else { |
| 8938 | clear_has_objc_class_prefix(); |
| 8939 | } |
| 8940 | objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix); |
| 8941 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix) |
| 8942 | } |
| 8943 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8944 | // optional string csharp_namespace = 37; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8945 | bool FileOptions::has_csharp_namespace() const { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8946 | return (_has_bits_[0] & 0x00002000u) != 0; |
| 8947 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8948 | void FileOptions::set_has_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8949 | _has_bits_[0] |= 0x00002000u; |
| 8950 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8951 | void FileOptions::clear_has_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8952 | _has_bits_[0] &= ~0x00002000u; |
| 8953 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8954 | void FileOptions::clear_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8955 | csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8956 | clear_has_csharp_namespace(); |
| 8957 | } |
| 8958 | const ::std::string& FileOptions::csharp_namespace() const { |
| 8959 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace) |
| 8960 | return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8961 | } |
| 8962 | void FileOptions::set_csharp_namespace(const ::std::string& value) { |
| 8963 | set_has_csharp_namespace(); |
| 8964 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8965 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) |
| 8966 | } |
| 8967 | void FileOptions::set_csharp_namespace(const char* value) { |
| 8968 | set_has_csharp_namespace(); |
| 8969 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8970 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace) |
| 8971 | } |
| 8972 | void FileOptions::set_csharp_namespace(const char* value, size_t size) { |
| 8973 | set_has_csharp_namespace(); |
| 8974 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8975 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8976 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace) |
| 8977 | } |
| 8978 | ::std::string* FileOptions::mutable_csharp_namespace() { |
| 8979 | set_has_csharp_namespace(); |
| 8980 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace) |
| 8981 | return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8982 | } |
| 8983 | ::std::string* FileOptions::release_csharp_namespace() { |
| 8984 | clear_has_csharp_namespace(); |
| 8985 | return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8986 | } |
| 8987 | void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) { |
| 8988 | if (csharp_namespace != NULL) { |
| 8989 | set_has_csharp_namespace(); |
| 8990 | } else { |
| 8991 | clear_has_csharp_namespace(); |
| 8992 | } |
| 8993 | csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace); |
| 8994 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace) |
| 8995 | } |
| 8996 | |
Xiao Hang | 801e920 | 2015-07-27 17:46:22 -0700 | [diff] [blame] | 8997 | // optional bool javanano_use_deprecated_package = 38; |
| 8998 | bool FileOptions::has_javanano_use_deprecated_package() const { |
| 8999 | return (_has_bits_[0] & 0x00004000u) != 0; |
| 9000 | } |
| 9001 | void FileOptions::set_has_javanano_use_deprecated_package() { |
| 9002 | _has_bits_[0] |= 0x00004000u; |
| 9003 | } |
| 9004 | void FileOptions::clear_has_javanano_use_deprecated_package() { |
| 9005 | _has_bits_[0] &= ~0x00004000u; |
| 9006 | } |
| 9007 | void FileOptions::clear_javanano_use_deprecated_package() { |
| 9008 | javanano_use_deprecated_package_ = false; |
| 9009 | clear_has_javanano_use_deprecated_package(); |
| 9010 | } |
| 9011 | bool FileOptions::javanano_use_deprecated_package() const { |
| 9012 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.javanano_use_deprecated_package) |
| 9013 | return javanano_use_deprecated_package_; |
| 9014 | } |
| 9015 | void FileOptions::set_javanano_use_deprecated_package(bool value) { |
| 9016 | set_has_javanano_use_deprecated_package(); |
| 9017 | javanano_use_deprecated_package_ = value; |
| 9018 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.javanano_use_deprecated_package) |
| 9019 | } |
| 9020 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9021 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9022 | int FileOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9023 | return uninterpreted_option_.size(); |
| 9024 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9025 | void FileOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9026 | uninterpreted_option_.Clear(); |
| 9027 | } |
| 9028 | const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const { |
| 9029 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option) |
| 9030 | return uninterpreted_option_.Get(index); |
| 9031 | } |
| 9032 | ::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) { |
| 9033 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option) |
| 9034 | return uninterpreted_option_.Mutable(index); |
| 9035 | } |
| 9036 | ::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() { |
| 9037 | // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option) |
| 9038 | return uninterpreted_option_.Add(); |
| 9039 | } |
| 9040 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 9041 | FileOptions::uninterpreted_option() const { |
| 9042 | // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option) |
| 9043 | return uninterpreted_option_; |
| 9044 | } |
| 9045 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 9046 | FileOptions::mutable_uninterpreted_option() { |
| 9047 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option) |
| 9048 | return &uninterpreted_option_; |
| 9049 | } |
| 9050 | |
| 9051 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9052 | |
| 9053 | // =================================================================== |
| 9054 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9055 | #ifndef _MSC_VER |
| 9056 | const int MessageOptions::kMessageSetWireFormatFieldNumber; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9057 | const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9058 | const int MessageOptions::kDeprecatedFieldNumber; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9059 | const int MessageOptions::kMapEntryFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9060 | const int MessageOptions::kUninterpretedOptionFieldNumber; |
| 9061 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9062 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9063 | MessageOptions::MessageOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9064 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9065 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9066 | // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9067 | } |
| 9068 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9069 | void MessageOptions::InitAsDefaultInstance() { |
| 9070 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9071 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9072 | MessageOptions::MessageOptions(const MessageOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9073 | : ::google::protobuf::Message(), |
| 9074 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9075 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9076 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9077 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9078 | } |
| 9079 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9080 | void MessageOptions::SharedCtor() { |
| 9081 | _cached_size_ = 0; |
| 9082 | message_set_wire_format_ = false; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9083 | no_standard_descriptor_accessor_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9084 | deprecated_ = false; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9085 | map_entry_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9086 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 9087 | } |
| 9088 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9089 | MessageOptions::~MessageOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9090 | // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9091 | SharedDtor(); |
| 9092 | } |
| 9093 | |
| 9094 | void MessageOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9095 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9096 | } |
| 9097 | } |
| 9098 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9099 | void MessageOptions::SetCachedSize(int size) const { |
| 9100 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 9101 | _cached_size_ = size; |
| 9102 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 9103 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9104 | const ::google::protobuf::Descriptor* MessageOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9105 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9106 | return MessageOptions_descriptor_; |
| 9107 | } |
| 9108 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9109 | const MessageOptions& MessageOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 9110 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 9111 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9112 | } |
| 9113 | |
| 9114 | MessageOptions* MessageOptions::default_instance_ = NULL; |
| 9115 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9116 | MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9117 | MessageOptions* n = new MessageOptions; |
| 9118 | if (arena != NULL) { |
| 9119 | arena->Own(n); |
| 9120 | } |
| 9121 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9122 | } |
| 9123 | |
| 9124 | void MessageOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9125 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9126 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 9127 | &reinterpret_cast<MessageOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9128 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9129 | #define ZR_(first, last) do {\ |
| 9130 | ::memset(&first, 0,\ |
| 9131 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 9132 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9133 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9134 | ZR_(message_set_wire_format_, map_entry_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9135 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9136 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9137 | #undef ZR_ |
| 9138 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9139 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9140 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9141 | if (_internal_metadata_.have_unknown_fields()) { |
| 9142 | mutable_unknown_fields()->Clear(); |
| 9143 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9144 | } |
| 9145 | |
| 9146 | bool MessageOptions::MergePartialFromCodedStream( |
| 9147 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9148 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9149 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9150 | // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions) |
| 9151 | for (;;) { |
| 9152 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 9153 | tag = p.first; |
| 9154 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9155 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9156 | // optional bool message_set_wire_format = 1 [default = false]; |
| 9157 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9158 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9159 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9160 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9161 | input, &message_set_wire_format_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9162 | set_has_message_set_wire_format(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9163 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9164 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9165 | } |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9166 | if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor; |
| 9167 | break; |
| 9168 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9169 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9170 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
| 9171 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9172 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9173 | parse_no_standard_descriptor_accessor: |
| 9174 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9175 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9176 | input, &no_standard_descriptor_accessor_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9177 | set_has_no_standard_descriptor_accessor(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9178 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9179 | goto handle_unusual; |
| 9180 | } |
| 9181 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 9182 | break; |
| 9183 | } |
| 9184 | |
| 9185 | // optional bool deprecated = 3 [default = false]; |
| 9186 | case 3: { |
| 9187 | if (tag == 24) { |
| 9188 | parse_deprecated: |
| 9189 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9190 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9191 | input, &deprecated_))); |
| 9192 | set_has_deprecated(); |
| 9193 | } else { |
| 9194 | goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9195 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9196 | if (input->ExpectTag(56)) goto parse_map_entry; |
| 9197 | break; |
| 9198 | } |
| 9199 | |
| 9200 | // optional bool map_entry = 7; |
| 9201 | case 7: { |
| 9202 | if (tag == 56) { |
| 9203 | parse_map_entry: |
| 9204 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9205 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9206 | input, &map_entry_))); |
| 9207 | set_has_map_entry(); |
| 9208 | } else { |
| 9209 | goto handle_unusual; |
| 9210 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9211 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 9212 | break; |
| 9213 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9214 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9215 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 9216 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9217 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9218 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9219 | DO_(input->IncrementRecursionDepth()); |
| 9220 | parse_loop_uninterpreted_option: |
| 9221 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9222 | input, add_uninterpreted_option())); |
| 9223 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9224 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9225 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9226 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 9227 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9228 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9229 | break; |
| 9230 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9231 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9232 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9233 | handle_unusual: |
| 9234 | if (tag == 0 || |
| 9235 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9236 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9237 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9238 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9239 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9240 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 9241 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9242 | continue; |
| 9243 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9244 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 9245 | input, tag, mutable_unknown_fields())); |
| 9246 | break; |
| 9247 | } |
| 9248 | } |
| 9249 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9250 | success: |
| 9251 | // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9252 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9253 | failure: |
| 9254 | // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions) |
| 9255 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9256 | #undef DO_ |
| 9257 | } |
| 9258 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9259 | void MessageOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9260 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9261 | // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9262 | // optional bool message_set_wire_format = 1 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9263 | if (has_message_set_wire_format()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9264 | ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); |
| 9265 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9266 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9267 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9268 | if (has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9269 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9270 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9271 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9272 | // optional bool deprecated = 3 [default = false]; |
| 9273 | if (has_deprecated()) { |
| 9274 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
| 9275 | } |
| 9276 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9277 | // optional bool map_entry = 7; |
| 9278 | if (has_map_entry()) { |
| 9279 | ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output); |
| 9280 | } |
| 9281 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9282 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9283 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9284 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9285 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9286 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9287 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9288 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9289 | _extensions_.SerializeWithCachedSizes( |
| 9290 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9291 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9292 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9293 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 9294 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9295 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9296 | // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9297 | } |
| 9298 | |
| 9299 | ::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray( |
| 9300 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9301 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9302 | // optional bool message_set_wire_format = 1 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9303 | if (has_message_set_wire_format()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9304 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); |
| 9305 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9306 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9307 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9308 | if (has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9309 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9310 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9311 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9312 | // optional bool deprecated = 3 [default = false]; |
| 9313 | if (has_deprecated()) { |
| 9314 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
| 9315 | } |
| 9316 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9317 | // optional bool map_entry = 7; |
| 9318 | if (has_map_entry()) { |
| 9319 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target); |
| 9320 | } |
| 9321 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9322 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9323 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9324 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9325 | WriteMessageNoVirtualToArray( |
| 9326 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9327 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9328 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9329 | // Extension range [1000, 536870912) |
| 9330 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 9331 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9332 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9333 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9334 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 9335 | unknown_fields(), target); |
| 9336 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9337 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9338 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9339 | } |
| 9340 | |
| 9341 | int MessageOptions::ByteSize() const { |
| 9342 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9343 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 9344 | if (_has_bits_[0 / 32] & 15u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9345 | // optional bool message_set_wire_format = 1 [default = false]; |
| 9346 | if (has_message_set_wire_format()) { |
| 9347 | total_size += 1 + 1; |
| 9348 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9349 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9350 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
| 9351 | if (has_no_standard_descriptor_accessor()) { |
| 9352 | total_size += 1 + 1; |
| 9353 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9354 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9355 | // optional bool deprecated = 3 [default = false]; |
| 9356 | if (has_deprecated()) { |
| 9357 | total_size += 1 + 1; |
| 9358 | } |
| 9359 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9360 | // optional bool map_entry = 7; |
| 9361 | if (has_map_entry()) { |
| 9362 | total_size += 1 + 1; |
| 9363 | } |
| 9364 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9365 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9366 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9367 | total_size += 2 * this->uninterpreted_option_size(); |
| 9368 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9369 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9370 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9371 | this->uninterpreted_option(i)); |
| 9372 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9373 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9374 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9375 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9376 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9377 | total_size += |
| 9378 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 9379 | unknown_fields()); |
| 9380 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9381 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9382 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9383 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9384 | return total_size; |
| 9385 | } |
| 9386 | |
| 9387 | void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9388 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9389 | const MessageOptions* source = |
| 9390 | ::google::protobuf::internal::DynamicCastToGenerated<const MessageOptions>( |
| 9391 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9392 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 9393 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9394 | } else { |
| 9395 | MergeFrom(*source); |
| 9396 | } |
| 9397 | } |
| 9398 | |
| 9399 | void MessageOptions::MergeFrom(const MessageOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9400 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9401 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9402 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9403 | if (from.has_message_set_wire_format()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9404 | set_message_set_wire_format(from.message_set_wire_format()); |
| 9405 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9406 | if (from.has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9407 | set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor()); |
| 9408 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9409 | if (from.has_deprecated()) { |
| 9410 | set_deprecated(from.deprecated()); |
| 9411 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9412 | if (from.has_map_entry()) { |
| 9413 | set_map_entry(from.map_entry()); |
| 9414 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9415 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9416 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9417 | if (from._internal_metadata_.have_unknown_fields()) { |
| 9418 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 9419 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9420 | } |
| 9421 | |
| 9422 | void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 9423 | if (&from == this) return; |
| 9424 | Clear(); |
| 9425 | MergeFrom(from); |
| 9426 | } |
| 9427 | |
| 9428 | void MessageOptions::CopyFrom(const MessageOptions& from) { |
| 9429 | if (&from == this) return; |
| 9430 | Clear(); |
| 9431 | MergeFrom(from); |
| 9432 | } |
| 9433 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 9434 | bool MessageOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9435 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9436 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9437 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 9438 | if (!_extensions_.IsInitialized()) return false; return true; |
| 9439 | } |
| 9440 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 9441 | void MessageOptions::Swap(MessageOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9442 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9443 | InternalSwap(other); |
| 9444 | } |
| 9445 | void MessageOptions::InternalSwap(MessageOptions* other) { |
| 9446 | std::swap(message_set_wire_format_, other->message_set_wire_format_); |
| 9447 | std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); |
| 9448 | std::swap(deprecated_, other->deprecated_); |
| 9449 | std::swap(map_entry_, other->map_entry_); |
| 9450 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 9451 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 9452 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 9453 | std::swap(_cached_size_, other->_cached_size_); |
| 9454 | _extensions_.Swap(&other->_extensions_); |
| 9455 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 9456 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9457 | ::google::protobuf::Metadata MessageOptions::GetMetadata() const { |
| 9458 | protobuf_AssignDescriptorsOnce(); |
| 9459 | ::google::protobuf::Metadata metadata; |
| 9460 | metadata.descriptor = MessageOptions_descriptor_; |
| 9461 | metadata.reflection = MessageOptions_reflection_; |
| 9462 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9463 | } |
| 9464 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9465 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 9466 | // MessageOptions |
| 9467 | |
| 9468 | // optional bool message_set_wire_format = 1 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9469 | bool MessageOptions::has_message_set_wire_format() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9470 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 9471 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9472 | void MessageOptions::set_has_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9473 | _has_bits_[0] |= 0x00000001u; |
| 9474 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9475 | void MessageOptions::clear_has_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9476 | _has_bits_[0] &= ~0x00000001u; |
| 9477 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9478 | void MessageOptions::clear_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9479 | message_set_wire_format_ = false; |
| 9480 | clear_has_message_set_wire_format(); |
| 9481 | } |
| 9482 | bool MessageOptions::message_set_wire_format() const { |
| 9483 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format) |
| 9484 | return message_set_wire_format_; |
| 9485 | } |
| 9486 | void MessageOptions::set_message_set_wire_format(bool value) { |
| 9487 | set_has_message_set_wire_format(); |
| 9488 | message_set_wire_format_ = value; |
| 9489 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format) |
| 9490 | } |
| 9491 | |
| 9492 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9493 | bool MessageOptions::has_no_standard_descriptor_accessor() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9494 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 9495 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9496 | void MessageOptions::set_has_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9497 | _has_bits_[0] |= 0x00000002u; |
| 9498 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9499 | void MessageOptions::clear_has_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9500 | _has_bits_[0] &= ~0x00000002u; |
| 9501 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9502 | void MessageOptions::clear_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9503 | no_standard_descriptor_accessor_ = false; |
| 9504 | clear_has_no_standard_descriptor_accessor(); |
| 9505 | } |
| 9506 | bool MessageOptions::no_standard_descriptor_accessor() const { |
| 9507 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor) |
| 9508 | return no_standard_descriptor_accessor_; |
| 9509 | } |
| 9510 | void MessageOptions::set_no_standard_descriptor_accessor(bool value) { |
| 9511 | set_has_no_standard_descriptor_accessor(); |
| 9512 | no_standard_descriptor_accessor_ = value; |
| 9513 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor) |
| 9514 | } |
| 9515 | |
| 9516 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9517 | bool MessageOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9518 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 9519 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9520 | void MessageOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9521 | _has_bits_[0] |= 0x00000004u; |
| 9522 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9523 | void MessageOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9524 | _has_bits_[0] &= ~0x00000004u; |
| 9525 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9526 | void MessageOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9527 | deprecated_ = false; |
| 9528 | clear_has_deprecated(); |
| 9529 | } |
| 9530 | bool MessageOptions::deprecated() const { |
| 9531 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated) |
| 9532 | return deprecated_; |
| 9533 | } |
| 9534 | void MessageOptions::set_deprecated(bool value) { |
| 9535 | set_has_deprecated(); |
| 9536 | deprecated_ = value; |
| 9537 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated) |
| 9538 | } |
| 9539 | |
| 9540 | // optional bool map_entry = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9541 | bool MessageOptions::has_map_entry() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9542 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 9543 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9544 | void MessageOptions::set_has_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9545 | _has_bits_[0] |= 0x00000008u; |
| 9546 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9547 | void MessageOptions::clear_has_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9548 | _has_bits_[0] &= ~0x00000008u; |
| 9549 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9550 | void MessageOptions::clear_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9551 | map_entry_ = false; |
| 9552 | clear_has_map_entry(); |
| 9553 | } |
| 9554 | bool MessageOptions::map_entry() const { |
| 9555 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry) |
| 9556 | return map_entry_; |
| 9557 | } |
| 9558 | void MessageOptions::set_map_entry(bool value) { |
| 9559 | set_has_map_entry(); |
| 9560 | map_entry_ = value; |
| 9561 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry) |
| 9562 | } |
| 9563 | |
| 9564 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9565 | int MessageOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9566 | return uninterpreted_option_.size(); |
| 9567 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9568 | void MessageOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9569 | uninterpreted_option_.Clear(); |
| 9570 | } |
| 9571 | const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const { |
| 9572 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option) |
| 9573 | return uninterpreted_option_.Get(index); |
| 9574 | } |
| 9575 | ::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) { |
| 9576 | // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option) |
| 9577 | return uninterpreted_option_.Mutable(index); |
| 9578 | } |
| 9579 | ::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() { |
| 9580 | // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option) |
| 9581 | return uninterpreted_option_.Add(); |
| 9582 | } |
| 9583 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 9584 | MessageOptions::uninterpreted_option() const { |
| 9585 | // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option) |
| 9586 | return uninterpreted_option_; |
| 9587 | } |
| 9588 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 9589 | MessageOptions::mutable_uninterpreted_option() { |
| 9590 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option) |
| 9591 | return &uninterpreted_option_; |
| 9592 | } |
| 9593 | |
| 9594 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9595 | |
| 9596 | // =================================================================== |
| 9597 | |
| 9598 | const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9599 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9600 | return FieldOptions_CType_descriptor_; |
| 9601 | } |
| 9602 | bool FieldOptions_CType_IsValid(int value) { |
| 9603 | switch(value) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9604 | case 0: |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9605 | case 1: |
| 9606 | case 2: |
| 9607 | return true; |
| 9608 | default: |
| 9609 | return false; |
| 9610 | } |
| 9611 | } |
| 9612 | |
| 9613 | #ifndef _MSC_VER |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9614 | const FieldOptions_CType FieldOptions::STRING; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9615 | const FieldOptions_CType FieldOptions::CORD; |
| 9616 | const FieldOptions_CType FieldOptions::STRING_PIECE; |
| 9617 | const FieldOptions_CType FieldOptions::CType_MIN; |
| 9618 | const FieldOptions_CType FieldOptions::CType_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9619 | const int FieldOptions::CType_ARRAYSIZE; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9620 | #endif // _MSC_VER |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9621 | const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() { |
| 9622 | protobuf_AssignDescriptorsOnce(); |
| 9623 | return FieldOptions_JSType_descriptor_; |
| 9624 | } |
| 9625 | bool FieldOptions_JSType_IsValid(int value) { |
| 9626 | switch(value) { |
| 9627 | case 0: |
| 9628 | case 1: |
| 9629 | case 2: |
| 9630 | return true; |
| 9631 | default: |
| 9632 | return false; |
| 9633 | } |
| 9634 | } |
| 9635 | |
| 9636 | #ifndef _MSC_VER |
| 9637 | const FieldOptions_JSType FieldOptions::JS_NORMAL; |
| 9638 | const FieldOptions_JSType FieldOptions::JS_STRING; |
| 9639 | const FieldOptions_JSType FieldOptions::JS_NUMBER; |
| 9640 | const FieldOptions_JSType FieldOptions::JSType_MIN; |
| 9641 | const FieldOptions_JSType FieldOptions::JSType_MAX; |
| 9642 | const int FieldOptions::JSType_ARRAYSIZE; |
| 9643 | #endif // _MSC_VER |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9644 | #ifndef _MSC_VER |
| 9645 | const int FieldOptions::kCtypeFieldNumber; |
| 9646 | const int FieldOptions::kPackedFieldNumber; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9647 | const int FieldOptions::kJstypeFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9648 | const int FieldOptions::kLazyFieldNumber; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9649 | const int FieldOptions::kDeprecatedFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9650 | const int FieldOptions::kWeakFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9651 | const int FieldOptions::kUninterpretedOptionFieldNumber; |
| 9652 | #endif // !_MSC_VER |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9653 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9654 | FieldOptions::FieldOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9655 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9656 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9657 | // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9658 | } |
| 9659 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9660 | void FieldOptions::InitAsDefaultInstance() { |
| 9661 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9662 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9663 | FieldOptions::FieldOptions(const FieldOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9664 | : ::google::protobuf::Message(), |
| 9665 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9666 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9667 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9668 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9669 | } |
| 9670 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9671 | void FieldOptions::SharedCtor() { |
| 9672 | _cached_size_ = 0; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9673 | ctype_ = 0; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9674 | packed_ = false; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9675 | jstype_ = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9676 | lazy_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9677 | deprecated_ = false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9678 | weak_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9679 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 9680 | } |
| 9681 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9682 | FieldOptions::~FieldOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9683 | // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9684 | SharedDtor(); |
| 9685 | } |
| 9686 | |
| 9687 | void FieldOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9688 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9689 | } |
| 9690 | } |
| 9691 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9692 | void FieldOptions::SetCachedSize(int size) const { |
| 9693 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 9694 | _cached_size_ = size; |
| 9695 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 9696 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9697 | const ::google::protobuf::Descriptor* FieldOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9698 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9699 | return FieldOptions_descriptor_; |
| 9700 | } |
| 9701 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9702 | const FieldOptions& FieldOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 9703 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 9704 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9705 | } |
| 9706 | |
| 9707 | FieldOptions* FieldOptions::default_instance_ = NULL; |
| 9708 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9709 | FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9710 | FieldOptions* n = new FieldOptions; |
| 9711 | if (arena != NULL) { |
| 9712 | arena->Own(n); |
| 9713 | } |
| 9714 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9715 | } |
| 9716 | |
| 9717 | void FieldOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9718 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9719 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 9720 | &reinterpret_cast<FieldOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9721 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9722 | #define ZR_(first, last) do {\ |
| 9723 | ::memset(&first, 0,\ |
| 9724 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 9725 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9726 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9727 | if (_has_bits_[0 / 32] & 63u) { |
| 9728 | ZR_(ctype_, jstype_); |
| 9729 | ZR_(packed_, weak_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9730 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9731 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9732 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9733 | #undef ZR_ |
| 9734 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9735 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9736 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9737 | if (_internal_metadata_.have_unknown_fields()) { |
| 9738 | mutable_unknown_fields()->Clear(); |
| 9739 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9740 | } |
| 9741 | |
| 9742 | bool FieldOptions::MergePartialFromCodedStream( |
| 9743 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9744 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9745 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9746 | // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions) |
| 9747 | for (;;) { |
| 9748 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 9749 | tag = p.first; |
| 9750 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9751 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9752 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9753 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9754 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9755 | int value; |
| 9756 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9757 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9758 | input, &value))); |
| 9759 | if (::google::protobuf::FieldOptions_CType_IsValid(value)) { |
| 9760 | set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); |
| 9761 | } else { |
| 9762 | mutable_unknown_fields()->AddVarint(1, value); |
| 9763 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9764 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9765 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9766 | } |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9767 | if (input->ExpectTag(16)) goto parse_packed; |
| 9768 | break; |
| 9769 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9770 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9771 | // optional bool packed = 2; |
| 9772 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9773 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9774 | parse_packed: |
| 9775 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9776 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9777 | input, &packed_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9778 | set_has_packed(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9779 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9780 | goto handle_unusual; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9781 | } |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9782 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 9783 | break; |
| 9784 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9785 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9786 | // optional bool deprecated = 3 [default = false]; |
| 9787 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9788 | if (tag == 24) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9789 | parse_deprecated: |
| 9790 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9791 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9792 | input, &deprecated_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9793 | set_has_deprecated(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9794 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9795 | goto handle_unusual; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9796 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9797 | if (input->ExpectTag(40)) goto parse_lazy; |
| 9798 | break; |
| 9799 | } |
| 9800 | |
| 9801 | // optional bool lazy = 5 [default = false]; |
| 9802 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9803 | if (tag == 40) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9804 | parse_lazy: |
| 9805 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9806 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9807 | input, &lazy_))); |
| 9808 | set_has_lazy(); |
| 9809 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9810 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9811 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9812 | if (input->ExpectTag(48)) goto parse_jstype; |
| 9813 | break; |
| 9814 | } |
| 9815 | |
| 9816 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 9817 | case 6: { |
| 9818 | if (tag == 48) { |
| 9819 | parse_jstype: |
| 9820 | int value; |
| 9821 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9822 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9823 | input, &value))); |
| 9824 | if (::google::protobuf::FieldOptions_JSType_IsValid(value)) { |
| 9825 | set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value)); |
| 9826 | } else { |
| 9827 | mutable_unknown_fields()->AddVarint(6, value); |
| 9828 | } |
| 9829 | } else { |
| 9830 | goto handle_unusual; |
| 9831 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9832 | if (input->ExpectTag(80)) goto parse_weak; |
| 9833 | break; |
| 9834 | } |
| 9835 | |
| 9836 | // optional bool weak = 10 [default = false]; |
| 9837 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9838 | if (tag == 80) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9839 | parse_weak: |
| 9840 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9841 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9842 | input, &weak_))); |
| 9843 | set_has_weak(); |
| 9844 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9845 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9846 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9847 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 9848 | break; |
| 9849 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9850 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9851 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 9852 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9853 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9854 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9855 | DO_(input->IncrementRecursionDepth()); |
| 9856 | parse_loop_uninterpreted_option: |
| 9857 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9858 | input, add_uninterpreted_option())); |
| 9859 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9860 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9861 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9862 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 9863 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9864 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9865 | break; |
| 9866 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9867 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9868 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9869 | handle_unusual: |
| 9870 | if (tag == 0 || |
| 9871 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9872 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9873 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9874 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9875 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9876 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 9877 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9878 | continue; |
| 9879 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9880 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 9881 | input, tag, mutable_unknown_fields())); |
| 9882 | break; |
| 9883 | } |
| 9884 | } |
| 9885 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9886 | success: |
| 9887 | // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9888 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9889 | failure: |
| 9890 | // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions) |
| 9891 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9892 | #undef DO_ |
| 9893 | } |
| 9894 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9895 | void FieldOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9896 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9897 | // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions) |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9898 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9899 | if (has_ctype()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9900 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 9901 | 1, this->ctype(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9902 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9903 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9904 | // optional bool packed = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9905 | if (has_packed()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9906 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9907 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9908 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9909 | // optional bool deprecated = 3 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9910 | if (has_deprecated()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9911 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9912 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9913 | |
| 9914 | // optional bool lazy = 5 [default = false]; |
| 9915 | if (has_lazy()) { |
| 9916 | ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output); |
| 9917 | } |
| 9918 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9919 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 9920 | if (has_jstype()) { |
| 9921 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 9922 | 6, this->jstype(), output); |
| 9923 | } |
| 9924 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9925 | // optional bool weak = 10 [default = false]; |
| 9926 | if (has_weak()) { |
| 9927 | ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output); |
| 9928 | } |
| 9929 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9930 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9931 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9932 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9933 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9934 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9935 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9936 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9937 | _extensions_.SerializeWithCachedSizes( |
| 9938 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9939 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9940 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9941 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 9942 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9943 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9944 | // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9945 | } |
| 9946 | |
| 9947 | ::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray( |
| 9948 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9949 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9950 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9951 | if (has_ctype()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9952 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 9953 | 1, this->ctype(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9954 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9955 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9956 | // optional bool packed = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9957 | if (has_packed()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9958 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9959 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9960 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9961 | // optional bool deprecated = 3 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9962 | if (has_deprecated()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9963 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9964 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9965 | |
| 9966 | // optional bool lazy = 5 [default = false]; |
| 9967 | if (has_lazy()) { |
| 9968 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target); |
| 9969 | } |
| 9970 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9971 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 9972 | if (has_jstype()) { |
| 9973 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 9974 | 6, this->jstype(), target); |
| 9975 | } |
| 9976 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9977 | // optional bool weak = 10 [default = false]; |
| 9978 | if (has_weak()) { |
| 9979 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target); |
| 9980 | } |
| 9981 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9982 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9983 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9984 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9985 | WriteMessageNoVirtualToArray( |
| 9986 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9987 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9988 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9989 | // Extension range [1000, 536870912) |
| 9990 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 9991 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9992 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9993 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9994 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 9995 | unknown_fields(), target); |
| 9996 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9997 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9998 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9999 | } |
| 10000 | |
| 10001 | int FieldOptions::ByteSize() const { |
| 10002 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10003 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 10004 | if (_has_bits_[0 / 32] & 63u) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10005 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10006 | if (has_ctype()) { |
| 10007 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10008 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10009 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10010 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10011 | // optional bool packed = 2; |
| 10012 | if (has_packed()) { |
| 10013 | total_size += 1 + 1; |
| 10014 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10015 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10016 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10017 | if (has_jstype()) { |
| 10018 | total_size += 1 + |
| 10019 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype()); |
| 10020 | } |
| 10021 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10022 | // optional bool lazy = 5 [default = false]; |
| 10023 | if (has_lazy()) { |
| 10024 | total_size += 1 + 1; |
| 10025 | } |
| 10026 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10027 | // optional bool deprecated = 3 [default = false]; |
| 10028 | if (has_deprecated()) { |
| 10029 | total_size += 1 + 1; |
| 10030 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10031 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10032 | // optional bool weak = 10 [default = false]; |
| 10033 | if (has_weak()) { |
| 10034 | total_size += 1 + 1; |
| 10035 | } |
| 10036 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10037 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10038 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10039 | total_size += 2 * this->uninterpreted_option_size(); |
| 10040 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10041 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10042 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10043 | this->uninterpreted_option(i)); |
| 10044 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10045 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10046 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10047 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10048 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10049 | total_size += |
| 10050 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 10051 | unknown_fields()); |
| 10052 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10053 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10054 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10055 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10056 | return total_size; |
| 10057 | } |
| 10058 | |
| 10059 | void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10060 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10061 | const FieldOptions* source = |
| 10062 | ::google::protobuf::internal::DynamicCastToGenerated<const FieldOptions>( |
| 10063 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10064 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 10065 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10066 | } else { |
| 10067 | MergeFrom(*source); |
| 10068 | } |
| 10069 | } |
| 10070 | |
| 10071 | void FieldOptions::MergeFrom(const FieldOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10072 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10073 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10074 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10075 | if (from.has_ctype()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10076 | set_ctype(from.ctype()); |
| 10077 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10078 | if (from.has_packed()) { |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10079 | set_packed(from.packed()); |
| 10080 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10081 | if (from.has_jstype()) { |
| 10082 | set_jstype(from.jstype()); |
| 10083 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10084 | if (from.has_lazy()) { |
| 10085 | set_lazy(from.lazy()); |
| 10086 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10087 | if (from.has_deprecated()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10088 | set_deprecated(from.deprecated()); |
| 10089 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10090 | if (from.has_weak()) { |
| 10091 | set_weak(from.weak()); |
| 10092 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10093 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10094 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10095 | if (from._internal_metadata_.have_unknown_fields()) { |
| 10096 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 10097 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10098 | } |
| 10099 | |
| 10100 | void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 10101 | if (&from == this) return; |
| 10102 | Clear(); |
| 10103 | MergeFrom(from); |
| 10104 | } |
| 10105 | |
| 10106 | void FieldOptions::CopyFrom(const FieldOptions& from) { |
| 10107 | if (&from == this) return; |
| 10108 | Clear(); |
| 10109 | MergeFrom(from); |
| 10110 | } |
| 10111 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10112 | bool FieldOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10113 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10114 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10115 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10116 | if (!_extensions_.IsInitialized()) return false; return true; |
| 10117 | } |
| 10118 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10119 | void FieldOptions::Swap(FieldOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10120 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10121 | InternalSwap(other); |
| 10122 | } |
| 10123 | void FieldOptions::InternalSwap(FieldOptions* other) { |
| 10124 | std::swap(ctype_, other->ctype_); |
| 10125 | std::swap(packed_, other->packed_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10126 | std::swap(jstype_, other->jstype_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10127 | std::swap(lazy_, other->lazy_); |
| 10128 | std::swap(deprecated_, other->deprecated_); |
| 10129 | std::swap(weak_, other->weak_); |
| 10130 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 10131 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 10132 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 10133 | std::swap(_cached_size_, other->_cached_size_); |
| 10134 | _extensions_.Swap(&other->_extensions_); |
| 10135 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10136 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10137 | ::google::protobuf::Metadata FieldOptions::GetMetadata() const { |
| 10138 | protobuf_AssignDescriptorsOnce(); |
| 10139 | ::google::protobuf::Metadata metadata; |
| 10140 | metadata.descriptor = FieldOptions_descriptor_; |
| 10141 | metadata.reflection = FieldOptions_reflection_; |
| 10142 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10143 | } |
| 10144 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10145 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 10146 | // FieldOptions |
| 10147 | |
| 10148 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10149 | bool FieldOptions::has_ctype() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10150 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 10151 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10152 | void FieldOptions::set_has_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10153 | _has_bits_[0] |= 0x00000001u; |
| 10154 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10155 | void FieldOptions::clear_has_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10156 | _has_bits_[0] &= ~0x00000001u; |
| 10157 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10158 | void FieldOptions::clear_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10159 | ctype_ = 0; |
| 10160 | clear_has_ctype(); |
| 10161 | } |
| 10162 | ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const { |
| 10163 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype) |
| 10164 | return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_); |
| 10165 | } |
| 10166 | void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) { |
| 10167 | assert(::google::protobuf::FieldOptions_CType_IsValid(value)); |
| 10168 | set_has_ctype(); |
| 10169 | ctype_ = value; |
| 10170 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype) |
| 10171 | } |
| 10172 | |
| 10173 | // optional bool packed = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10174 | bool FieldOptions::has_packed() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10175 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 10176 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10177 | void FieldOptions::set_has_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10178 | _has_bits_[0] |= 0x00000002u; |
| 10179 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10180 | void FieldOptions::clear_has_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10181 | _has_bits_[0] &= ~0x00000002u; |
| 10182 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10183 | void FieldOptions::clear_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10184 | packed_ = false; |
| 10185 | clear_has_packed(); |
| 10186 | } |
| 10187 | bool FieldOptions::packed() const { |
| 10188 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed) |
| 10189 | return packed_; |
| 10190 | } |
| 10191 | void FieldOptions::set_packed(bool value) { |
| 10192 | set_has_packed(); |
| 10193 | packed_ = value; |
| 10194 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed) |
| 10195 | } |
| 10196 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10197 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10198 | bool FieldOptions::has_jstype() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10199 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 10200 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10201 | void FieldOptions::set_has_jstype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10202 | _has_bits_[0] |= 0x00000004u; |
| 10203 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10204 | void FieldOptions::clear_has_jstype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10205 | _has_bits_[0] &= ~0x00000004u; |
| 10206 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10207 | void FieldOptions::clear_jstype() { |
| 10208 | jstype_ = 0; |
| 10209 | clear_has_jstype(); |
| 10210 | } |
| 10211 | ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const { |
| 10212 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype) |
| 10213 | return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_); |
| 10214 | } |
| 10215 | void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) { |
| 10216 | assert(::google::protobuf::FieldOptions_JSType_IsValid(value)); |
| 10217 | set_has_jstype(); |
| 10218 | jstype_ = value; |
| 10219 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype) |
| 10220 | } |
| 10221 | |
| 10222 | // optional bool lazy = 5 [default = false]; |
| 10223 | bool FieldOptions::has_lazy() const { |
| 10224 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 10225 | } |
| 10226 | void FieldOptions::set_has_lazy() { |
| 10227 | _has_bits_[0] |= 0x00000008u; |
| 10228 | } |
| 10229 | void FieldOptions::clear_has_lazy() { |
| 10230 | _has_bits_[0] &= ~0x00000008u; |
| 10231 | } |
| 10232 | void FieldOptions::clear_lazy() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10233 | lazy_ = false; |
| 10234 | clear_has_lazy(); |
| 10235 | } |
| 10236 | bool FieldOptions::lazy() const { |
| 10237 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy) |
| 10238 | return lazy_; |
| 10239 | } |
| 10240 | void FieldOptions::set_lazy(bool value) { |
| 10241 | set_has_lazy(); |
| 10242 | lazy_ = value; |
| 10243 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy) |
| 10244 | } |
| 10245 | |
| 10246 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10247 | bool FieldOptions::has_deprecated() const { |
| 10248 | return (_has_bits_[0] & 0x00000010u) != 0; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10249 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10250 | void FieldOptions::set_has_deprecated() { |
| 10251 | _has_bits_[0] |= 0x00000010u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10252 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10253 | void FieldOptions::clear_has_deprecated() { |
| 10254 | _has_bits_[0] &= ~0x00000010u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10255 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10256 | void FieldOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10257 | deprecated_ = false; |
| 10258 | clear_has_deprecated(); |
| 10259 | } |
| 10260 | bool FieldOptions::deprecated() const { |
| 10261 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated) |
| 10262 | return deprecated_; |
| 10263 | } |
| 10264 | void FieldOptions::set_deprecated(bool value) { |
| 10265 | set_has_deprecated(); |
| 10266 | deprecated_ = value; |
| 10267 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated) |
| 10268 | } |
| 10269 | |
| 10270 | // optional bool weak = 10 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10271 | bool FieldOptions::has_weak() const { |
| 10272 | return (_has_bits_[0] & 0x00000020u) != 0; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10273 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10274 | void FieldOptions::set_has_weak() { |
| 10275 | _has_bits_[0] |= 0x00000020u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10276 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10277 | void FieldOptions::clear_has_weak() { |
| 10278 | _has_bits_[0] &= ~0x00000020u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10279 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10280 | void FieldOptions::clear_weak() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10281 | weak_ = false; |
| 10282 | clear_has_weak(); |
| 10283 | } |
| 10284 | bool FieldOptions::weak() const { |
| 10285 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak) |
| 10286 | return weak_; |
| 10287 | } |
| 10288 | void FieldOptions::set_weak(bool value) { |
| 10289 | set_has_weak(); |
| 10290 | weak_ = value; |
| 10291 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak) |
| 10292 | } |
| 10293 | |
| 10294 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10295 | int FieldOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10296 | return uninterpreted_option_.size(); |
| 10297 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10298 | void FieldOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10299 | uninterpreted_option_.Clear(); |
| 10300 | } |
| 10301 | const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const { |
| 10302 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option) |
| 10303 | return uninterpreted_option_.Get(index); |
| 10304 | } |
| 10305 | ::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) { |
| 10306 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option) |
| 10307 | return uninterpreted_option_.Mutable(index); |
| 10308 | } |
| 10309 | ::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() { |
| 10310 | // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option) |
| 10311 | return uninterpreted_option_.Add(); |
| 10312 | } |
| 10313 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 10314 | FieldOptions::uninterpreted_option() const { |
| 10315 | // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option) |
| 10316 | return uninterpreted_option_; |
| 10317 | } |
| 10318 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 10319 | FieldOptions::mutable_uninterpreted_option() { |
| 10320 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option) |
| 10321 | return &uninterpreted_option_; |
| 10322 | } |
| 10323 | |
| 10324 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10325 | |
| 10326 | // =================================================================== |
| 10327 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10328 | #ifndef _MSC_VER |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10329 | const int EnumOptions::kAllowAliasFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10330 | const int EnumOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10331 | const int EnumOptions::kUninterpretedOptionFieldNumber; |
| 10332 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10333 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10334 | EnumOptions::EnumOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10335 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10336 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10337 | // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10338 | } |
| 10339 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10340 | void EnumOptions::InitAsDefaultInstance() { |
| 10341 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10342 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10343 | EnumOptions::EnumOptions(const EnumOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10344 | : ::google::protobuf::Message(), |
| 10345 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10346 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10347 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10348 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10349 | } |
| 10350 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10351 | void EnumOptions::SharedCtor() { |
| 10352 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10353 | allow_alias_ = false; |
| 10354 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10355 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 10356 | } |
| 10357 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10358 | EnumOptions::~EnumOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10359 | // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10360 | SharedDtor(); |
| 10361 | } |
| 10362 | |
| 10363 | void EnumOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10364 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10365 | } |
| 10366 | } |
| 10367 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10368 | void EnumOptions::SetCachedSize(int size) const { |
| 10369 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 10370 | _cached_size_ = size; |
| 10371 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 10372 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10373 | const ::google::protobuf::Descriptor* EnumOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10374 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10375 | return EnumOptions_descriptor_; |
| 10376 | } |
| 10377 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10378 | const EnumOptions& EnumOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 10379 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 10380 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10381 | } |
| 10382 | |
| 10383 | EnumOptions* EnumOptions::default_instance_ = NULL; |
| 10384 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10385 | EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10386 | EnumOptions* n = new EnumOptions; |
| 10387 | if (arena != NULL) { |
| 10388 | arena->Own(n); |
| 10389 | } |
| 10390 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10391 | } |
| 10392 | |
| 10393 | void EnumOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10394 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10395 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 10396 | &reinterpret_cast<EnumOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10397 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10398 | #define ZR_(first, last) do {\ |
| 10399 | ::memset(&first, 0,\ |
| 10400 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 10401 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10402 | |
| 10403 | ZR_(allow_alias_, deprecated_); |
| 10404 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10405 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10406 | #undef ZR_ |
| 10407 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10408 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10409 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10410 | if (_internal_metadata_.have_unknown_fields()) { |
| 10411 | mutable_unknown_fields()->Clear(); |
| 10412 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10413 | } |
| 10414 | |
| 10415 | bool EnumOptions::MergePartialFromCodedStream( |
| 10416 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10417 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10418 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10419 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions) |
| 10420 | for (;;) { |
| 10421 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 10422 | tag = p.first; |
| 10423 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10424 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10425 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10426 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10427 | if (tag == 16) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10428 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10429 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10430 | input, &allow_alias_))); |
| 10431 | set_has_allow_alias(); |
| 10432 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10433 | goto handle_unusual; |
| 10434 | } |
| 10435 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 10436 | break; |
| 10437 | } |
| 10438 | |
| 10439 | // optional bool deprecated = 3 [default = false]; |
| 10440 | case 3: { |
| 10441 | if (tag == 24) { |
| 10442 | parse_deprecated: |
| 10443 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10444 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10445 | input, &deprecated_))); |
| 10446 | set_has_deprecated(); |
| 10447 | } else { |
| 10448 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10449 | } |
| 10450 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 10451 | break; |
| 10452 | } |
| 10453 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10454 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 10455 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10456 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10457 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10458 | DO_(input->IncrementRecursionDepth()); |
| 10459 | parse_loop_uninterpreted_option: |
| 10460 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10461 | input, add_uninterpreted_option())); |
| 10462 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10463 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10464 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10465 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 10466 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10467 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10468 | break; |
| 10469 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10470 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10471 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10472 | handle_unusual: |
| 10473 | if (tag == 0 || |
| 10474 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10475 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10476 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10477 | } |
| 10478 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10479 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 10480 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10481 | continue; |
| 10482 | } |
| 10483 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 10484 | input, tag, mutable_unknown_fields())); |
| 10485 | break; |
| 10486 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10487 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10488 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10489 | success: |
| 10490 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10491 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10492 | failure: |
| 10493 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions) |
| 10494 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10495 | #undef DO_ |
| 10496 | } |
| 10497 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10498 | void EnumOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10499 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10500 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions) |
| 10501 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10502 | if (has_allow_alias()) { |
| 10503 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output); |
| 10504 | } |
| 10505 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10506 | // optional bool deprecated = 3 [default = false]; |
| 10507 | if (has_deprecated()) { |
| 10508 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
| 10509 | } |
| 10510 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10511 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10512 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10513 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10514 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10515 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10516 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10517 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10518 | _extensions_.SerializeWithCachedSizes( |
| 10519 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10520 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10521 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10522 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 10523 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10524 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10525 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10526 | } |
| 10527 | |
| 10528 | ::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray( |
| 10529 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10530 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) |
| 10531 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10532 | if (has_allow_alias()) { |
| 10533 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target); |
| 10534 | } |
| 10535 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10536 | // optional bool deprecated = 3 [default = false]; |
| 10537 | if (has_deprecated()) { |
| 10538 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
| 10539 | } |
| 10540 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10541 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10542 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10543 | target = ::google::protobuf::internal::WireFormatLite:: |
| 10544 | WriteMessageNoVirtualToArray( |
| 10545 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10546 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10547 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10548 | // Extension range [1000, 536870912) |
| 10549 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 10550 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10551 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10552 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10553 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 10554 | unknown_fields(), target); |
| 10555 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10556 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10557 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10558 | } |
| 10559 | |
| 10560 | int EnumOptions::ByteSize() const { |
| 10561 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10562 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 10563 | if (_has_bits_[0 / 32] & 3u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10564 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10565 | if (has_allow_alias()) { |
| 10566 | total_size += 1 + 1; |
| 10567 | } |
| 10568 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10569 | // optional bool deprecated = 3 [default = false]; |
| 10570 | if (has_deprecated()) { |
| 10571 | total_size += 1 + 1; |
| 10572 | } |
| 10573 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10574 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10575 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10576 | total_size += 2 * this->uninterpreted_option_size(); |
| 10577 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10578 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10579 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10580 | this->uninterpreted_option(i)); |
| 10581 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10582 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10583 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10584 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10585 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10586 | total_size += |
| 10587 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 10588 | unknown_fields()); |
| 10589 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10590 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10591 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10592 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10593 | return total_size; |
| 10594 | } |
| 10595 | |
| 10596 | void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10597 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10598 | const EnumOptions* source = |
| 10599 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumOptions>( |
| 10600 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10601 | if (source == NULL) { |
| 10602 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 10603 | } else { |
| 10604 | MergeFrom(*source); |
| 10605 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10606 | } |
| 10607 | |
| 10608 | void EnumOptions::MergeFrom(const EnumOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10609 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10610 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10611 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 10612 | if (from.has_allow_alias()) { |
| 10613 | set_allow_alias(from.allow_alias()); |
| 10614 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10615 | if (from.has_deprecated()) { |
| 10616 | set_deprecated(from.deprecated()); |
| 10617 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10618 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10619 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10620 | if (from._internal_metadata_.have_unknown_fields()) { |
| 10621 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 10622 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10623 | } |
| 10624 | |
| 10625 | void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 10626 | if (&from == this) return; |
| 10627 | Clear(); |
| 10628 | MergeFrom(from); |
| 10629 | } |
| 10630 | |
| 10631 | void EnumOptions::CopyFrom(const EnumOptions& from) { |
| 10632 | if (&from == this) return; |
| 10633 | Clear(); |
| 10634 | MergeFrom(from); |
| 10635 | } |
| 10636 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10637 | bool EnumOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10638 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10639 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10640 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10641 | if (!_extensions_.IsInitialized()) return false; return true; |
| 10642 | } |
| 10643 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10644 | void EnumOptions::Swap(EnumOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10645 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10646 | InternalSwap(other); |
| 10647 | } |
| 10648 | void EnumOptions::InternalSwap(EnumOptions* other) { |
| 10649 | std::swap(allow_alias_, other->allow_alias_); |
| 10650 | std::swap(deprecated_, other->deprecated_); |
| 10651 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 10652 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 10653 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 10654 | std::swap(_cached_size_, other->_cached_size_); |
| 10655 | _extensions_.Swap(&other->_extensions_); |
| 10656 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10657 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10658 | ::google::protobuf::Metadata EnumOptions::GetMetadata() const { |
| 10659 | protobuf_AssignDescriptorsOnce(); |
| 10660 | ::google::protobuf::Metadata metadata; |
| 10661 | metadata.descriptor = EnumOptions_descriptor_; |
| 10662 | metadata.reflection = EnumOptions_reflection_; |
| 10663 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10664 | } |
| 10665 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10666 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 10667 | // EnumOptions |
| 10668 | |
| 10669 | // optional bool allow_alias = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10670 | bool EnumOptions::has_allow_alias() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10671 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 10672 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10673 | void EnumOptions::set_has_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10674 | _has_bits_[0] |= 0x00000001u; |
| 10675 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10676 | void EnumOptions::clear_has_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10677 | _has_bits_[0] &= ~0x00000001u; |
| 10678 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10679 | void EnumOptions::clear_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10680 | allow_alias_ = false; |
| 10681 | clear_has_allow_alias(); |
| 10682 | } |
| 10683 | bool EnumOptions::allow_alias() const { |
| 10684 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias) |
| 10685 | return allow_alias_; |
| 10686 | } |
| 10687 | void EnumOptions::set_allow_alias(bool value) { |
| 10688 | set_has_allow_alias(); |
| 10689 | allow_alias_ = value; |
| 10690 | // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias) |
| 10691 | } |
| 10692 | |
| 10693 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10694 | bool EnumOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10695 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 10696 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10697 | void EnumOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10698 | _has_bits_[0] |= 0x00000002u; |
| 10699 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10700 | void EnumOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10701 | _has_bits_[0] &= ~0x00000002u; |
| 10702 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10703 | void EnumOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10704 | deprecated_ = false; |
| 10705 | clear_has_deprecated(); |
| 10706 | } |
| 10707 | bool EnumOptions::deprecated() const { |
| 10708 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated) |
| 10709 | return deprecated_; |
| 10710 | } |
| 10711 | void EnumOptions::set_deprecated(bool value) { |
| 10712 | set_has_deprecated(); |
| 10713 | deprecated_ = value; |
| 10714 | // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated) |
| 10715 | } |
| 10716 | |
| 10717 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10718 | int EnumOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10719 | return uninterpreted_option_.size(); |
| 10720 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10721 | void EnumOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10722 | uninterpreted_option_.Clear(); |
| 10723 | } |
| 10724 | const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const { |
| 10725 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option) |
| 10726 | return uninterpreted_option_.Get(index); |
| 10727 | } |
| 10728 | ::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) { |
| 10729 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option) |
| 10730 | return uninterpreted_option_.Mutable(index); |
| 10731 | } |
| 10732 | ::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() { |
| 10733 | // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option) |
| 10734 | return uninterpreted_option_.Add(); |
| 10735 | } |
| 10736 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 10737 | EnumOptions::uninterpreted_option() const { |
| 10738 | // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option) |
| 10739 | return uninterpreted_option_; |
| 10740 | } |
| 10741 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 10742 | EnumOptions::mutable_uninterpreted_option() { |
| 10743 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option) |
| 10744 | return &uninterpreted_option_; |
| 10745 | } |
| 10746 | |
| 10747 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10748 | |
| 10749 | // =================================================================== |
| 10750 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10751 | #ifndef _MSC_VER |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10752 | const int EnumValueOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10753 | const int EnumValueOptions::kUninterpretedOptionFieldNumber; |
| 10754 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10755 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10756 | EnumValueOptions::EnumValueOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10757 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10758 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10759 | // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10760 | } |
| 10761 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10762 | void EnumValueOptions::InitAsDefaultInstance() { |
| 10763 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10764 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10765 | EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10766 | : ::google::protobuf::Message(), |
| 10767 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10768 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10769 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10770 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10771 | } |
| 10772 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10773 | void EnumValueOptions::SharedCtor() { |
| 10774 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10775 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10776 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 10777 | } |
| 10778 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10779 | EnumValueOptions::~EnumValueOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10780 | // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10781 | SharedDtor(); |
| 10782 | } |
| 10783 | |
| 10784 | void EnumValueOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10785 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10786 | } |
| 10787 | } |
| 10788 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10789 | void EnumValueOptions::SetCachedSize(int size) const { |
| 10790 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 10791 | _cached_size_ = size; |
| 10792 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 10793 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10794 | const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10795 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10796 | return EnumValueOptions_descriptor_; |
| 10797 | } |
| 10798 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10799 | const EnumValueOptions& EnumValueOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 10800 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 10801 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10802 | } |
| 10803 | |
| 10804 | EnumValueOptions* EnumValueOptions::default_instance_ = NULL; |
| 10805 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10806 | EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10807 | EnumValueOptions* n = new EnumValueOptions; |
| 10808 | if (arena != NULL) { |
| 10809 | arena->Own(n); |
| 10810 | } |
| 10811 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10812 | } |
| 10813 | |
| 10814 | void EnumValueOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10815 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10816 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10817 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10818 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10819 | if (_internal_metadata_.have_unknown_fields()) { |
| 10820 | mutable_unknown_fields()->Clear(); |
| 10821 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10822 | } |
| 10823 | |
| 10824 | bool EnumValueOptions::MergePartialFromCodedStream( |
| 10825 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10826 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10827 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10828 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions) |
| 10829 | for (;;) { |
| 10830 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 10831 | tag = p.first; |
| 10832 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10833 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10834 | // optional bool deprecated = 1 [default = false]; |
| 10835 | case 1: { |
| 10836 | if (tag == 8) { |
| 10837 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10838 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10839 | input, &deprecated_))); |
| 10840 | set_has_deprecated(); |
| 10841 | } else { |
| 10842 | goto handle_unusual; |
| 10843 | } |
| 10844 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 10845 | break; |
| 10846 | } |
| 10847 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10848 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 10849 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10850 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10851 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10852 | DO_(input->IncrementRecursionDepth()); |
| 10853 | parse_loop_uninterpreted_option: |
| 10854 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10855 | input, add_uninterpreted_option())); |
| 10856 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10857 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10858 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10859 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 10860 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10861 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10862 | break; |
| 10863 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10864 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10865 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10866 | handle_unusual: |
| 10867 | if (tag == 0 || |
| 10868 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10869 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10870 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10871 | } |
| 10872 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10873 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 10874 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10875 | continue; |
| 10876 | } |
| 10877 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 10878 | input, tag, mutable_unknown_fields())); |
| 10879 | break; |
| 10880 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10881 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10882 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10883 | success: |
| 10884 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10885 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10886 | failure: |
| 10887 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions) |
| 10888 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10889 | #undef DO_ |
| 10890 | } |
| 10891 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10892 | void EnumValueOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10893 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10894 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions) |
| 10895 | // optional bool deprecated = 1 [default = false]; |
| 10896 | if (has_deprecated()) { |
| 10897 | ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output); |
| 10898 | } |
| 10899 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10900 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10901 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10902 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10903 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10904 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10905 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10906 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10907 | _extensions_.SerializeWithCachedSizes( |
| 10908 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10909 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10910 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10911 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 10912 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10913 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10914 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10915 | } |
| 10916 | |
| 10917 | ::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray( |
| 10918 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10919 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) |
| 10920 | // optional bool deprecated = 1 [default = false]; |
| 10921 | if (has_deprecated()) { |
| 10922 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target); |
| 10923 | } |
| 10924 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10925 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10926 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10927 | target = ::google::protobuf::internal::WireFormatLite:: |
| 10928 | WriteMessageNoVirtualToArray( |
| 10929 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10930 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10931 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10932 | // Extension range [1000, 536870912) |
| 10933 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 10934 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10935 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10936 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10937 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 10938 | unknown_fields(), target); |
| 10939 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10940 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10941 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10942 | } |
| 10943 | |
| 10944 | int EnumValueOptions::ByteSize() const { |
| 10945 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10946 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10947 | // optional bool deprecated = 1 [default = false]; |
| 10948 | if (has_deprecated()) { |
| 10949 | total_size += 1 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10950 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10951 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10952 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10953 | total_size += 2 * this->uninterpreted_option_size(); |
| 10954 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10955 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10956 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10957 | this->uninterpreted_option(i)); |
| 10958 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10959 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10960 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10961 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10962 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10963 | total_size += |
| 10964 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 10965 | unknown_fields()); |
| 10966 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10967 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10968 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10969 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10970 | return total_size; |
| 10971 | } |
| 10972 | |
| 10973 | void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10974 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10975 | const EnumValueOptions* source = |
| 10976 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueOptions>( |
| 10977 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10978 | if (source == NULL) { |
| 10979 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 10980 | } else { |
| 10981 | MergeFrom(*source); |
| 10982 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10983 | } |
| 10984 | |
| 10985 | void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10986 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10987 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10988 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 10989 | if (from.has_deprecated()) { |
| 10990 | set_deprecated(from.deprecated()); |
| 10991 | } |
| 10992 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10993 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10994 | if (from._internal_metadata_.have_unknown_fields()) { |
| 10995 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 10996 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10997 | } |
| 10998 | |
| 10999 | void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11000 | if (&from == this) return; |
| 11001 | Clear(); |
| 11002 | MergeFrom(from); |
| 11003 | } |
| 11004 | |
| 11005 | void EnumValueOptions::CopyFrom(const EnumValueOptions& from) { |
| 11006 | if (&from == this) return; |
| 11007 | Clear(); |
| 11008 | MergeFrom(from); |
| 11009 | } |
| 11010 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11011 | bool EnumValueOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11012 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11013 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11014 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11015 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11016 | } |
| 11017 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11018 | void EnumValueOptions::Swap(EnumValueOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11019 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11020 | InternalSwap(other); |
| 11021 | } |
| 11022 | void EnumValueOptions::InternalSwap(EnumValueOptions* other) { |
| 11023 | std::swap(deprecated_, other->deprecated_); |
| 11024 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11025 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11026 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11027 | std::swap(_cached_size_, other->_cached_size_); |
| 11028 | _extensions_.Swap(&other->_extensions_); |
| 11029 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11030 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11031 | ::google::protobuf::Metadata EnumValueOptions::GetMetadata() const { |
| 11032 | protobuf_AssignDescriptorsOnce(); |
| 11033 | ::google::protobuf::Metadata metadata; |
| 11034 | metadata.descriptor = EnumValueOptions_descriptor_; |
| 11035 | metadata.reflection = EnumValueOptions_reflection_; |
| 11036 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11037 | } |
| 11038 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11039 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11040 | // EnumValueOptions |
| 11041 | |
| 11042 | // optional bool deprecated = 1 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11043 | bool EnumValueOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11044 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11045 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11046 | void EnumValueOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11047 | _has_bits_[0] |= 0x00000001u; |
| 11048 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11049 | void EnumValueOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11050 | _has_bits_[0] &= ~0x00000001u; |
| 11051 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11052 | void EnumValueOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11053 | deprecated_ = false; |
| 11054 | clear_has_deprecated(); |
| 11055 | } |
| 11056 | bool EnumValueOptions::deprecated() const { |
| 11057 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated) |
| 11058 | return deprecated_; |
| 11059 | } |
| 11060 | void EnumValueOptions::set_deprecated(bool value) { |
| 11061 | set_has_deprecated(); |
| 11062 | deprecated_ = value; |
| 11063 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated) |
| 11064 | } |
| 11065 | |
| 11066 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11067 | int EnumValueOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11068 | return uninterpreted_option_.size(); |
| 11069 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11070 | void EnumValueOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11071 | uninterpreted_option_.Clear(); |
| 11072 | } |
| 11073 | const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const { |
| 11074 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11075 | return uninterpreted_option_.Get(index); |
| 11076 | } |
| 11077 | ::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) { |
| 11078 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11079 | return uninterpreted_option_.Mutable(index); |
| 11080 | } |
| 11081 | ::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { |
| 11082 | // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11083 | return uninterpreted_option_.Add(); |
| 11084 | } |
| 11085 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11086 | EnumValueOptions::uninterpreted_option() const { |
| 11087 | // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11088 | return uninterpreted_option_; |
| 11089 | } |
| 11090 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 11091 | EnumValueOptions::mutable_uninterpreted_option() { |
| 11092 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11093 | return &uninterpreted_option_; |
| 11094 | } |
| 11095 | |
| 11096 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11097 | |
| 11098 | // =================================================================== |
| 11099 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11100 | #ifndef _MSC_VER |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11101 | const int ServiceOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11102 | const int ServiceOptions::kUninterpretedOptionFieldNumber; |
| 11103 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11104 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11105 | ServiceOptions::ServiceOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11106 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11107 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11108 | // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11109 | } |
| 11110 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11111 | void ServiceOptions::InitAsDefaultInstance() { |
| 11112 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11113 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11114 | ServiceOptions::ServiceOptions(const ServiceOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11115 | : ::google::protobuf::Message(), |
| 11116 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11117 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11118 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11119 | // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11120 | } |
| 11121 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11122 | void ServiceOptions::SharedCtor() { |
| 11123 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11124 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11125 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11126 | } |
| 11127 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11128 | ServiceOptions::~ServiceOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11129 | // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11130 | SharedDtor(); |
| 11131 | } |
| 11132 | |
| 11133 | void ServiceOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11134 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11135 | } |
| 11136 | } |
| 11137 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11138 | void ServiceOptions::SetCachedSize(int size) const { |
| 11139 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11140 | _cached_size_ = size; |
| 11141 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11142 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11143 | const ::google::protobuf::Descriptor* ServiceOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11144 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11145 | return ServiceOptions_descriptor_; |
| 11146 | } |
| 11147 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11148 | const ServiceOptions& ServiceOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11149 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11150 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11151 | } |
| 11152 | |
| 11153 | ServiceOptions* ServiceOptions::default_instance_ = NULL; |
| 11154 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11155 | ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11156 | ServiceOptions* n = new ServiceOptions; |
| 11157 | if (arena != NULL) { |
| 11158 | arena->Own(n); |
| 11159 | } |
| 11160 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11161 | } |
| 11162 | |
| 11163 | void ServiceOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11164 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11165 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11166 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11167 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11168 | if (_internal_metadata_.have_unknown_fields()) { |
| 11169 | mutable_unknown_fields()->Clear(); |
| 11170 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11171 | } |
| 11172 | |
| 11173 | bool ServiceOptions::MergePartialFromCodedStream( |
| 11174 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11175 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11176 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11177 | // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions) |
| 11178 | for (;;) { |
| 11179 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 11180 | tag = p.first; |
| 11181 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11182 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11183 | // optional bool deprecated = 33 [default = false]; |
| 11184 | case 33: { |
| 11185 | if (tag == 264) { |
| 11186 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 11187 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 11188 | input, &deprecated_))); |
| 11189 | set_has_deprecated(); |
| 11190 | } else { |
| 11191 | goto handle_unusual; |
| 11192 | } |
| 11193 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 11194 | break; |
| 11195 | } |
| 11196 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11197 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 11198 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11199 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11200 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11201 | DO_(input->IncrementRecursionDepth()); |
| 11202 | parse_loop_uninterpreted_option: |
| 11203 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11204 | input, add_uninterpreted_option())); |
| 11205 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11206 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11207 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11208 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 11209 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11210 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11211 | break; |
| 11212 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11213 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11214 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11215 | handle_unusual: |
| 11216 | if (tag == 0 || |
| 11217 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11218 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11219 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11220 | } |
| 11221 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11222 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 11223 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11224 | continue; |
| 11225 | } |
| 11226 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 11227 | input, tag, mutable_unknown_fields())); |
| 11228 | break; |
| 11229 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11230 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11231 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11232 | success: |
| 11233 | // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11234 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11235 | failure: |
| 11236 | // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions) |
| 11237 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11238 | #undef DO_ |
| 11239 | } |
| 11240 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11241 | void ServiceOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11242 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11243 | // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions) |
| 11244 | // optional bool deprecated = 33 [default = false]; |
| 11245 | if (has_deprecated()) { |
| 11246 | ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); |
| 11247 | } |
| 11248 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11249 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11250 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11251 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11252 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11253 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11254 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11255 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11256 | _extensions_.SerializeWithCachedSizes( |
| 11257 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11258 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11259 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11260 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11261 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11262 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11263 | // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11264 | } |
| 11265 | |
| 11266 | ::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray( |
| 11267 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11268 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) |
| 11269 | // optional bool deprecated = 33 [default = false]; |
| 11270 | if (has_deprecated()) { |
| 11271 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); |
| 11272 | } |
| 11273 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11274 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11275 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11276 | target = ::google::protobuf::internal::WireFormatLite:: |
| 11277 | WriteMessageNoVirtualToArray( |
| 11278 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11279 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11280 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11281 | // Extension range [1000, 536870912) |
| 11282 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 11283 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11284 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11285 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11286 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11287 | unknown_fields(), target); |
| 11288 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11289 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11290 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11291 | } |
| 11292 | |
| 11293 | int ServiceOptions::ByteSize() const { |
| 11294 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11295 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11296 | // optional bool deprecated = 33 [default = false]; |
| 11297 | if (has_deprecated()) { |
| 11298 | total_size += 2 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11299 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11300 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11301 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 11302 | total_size += 2 * this->uninterpreted_option_size(); |
| 11303 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11304 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11305 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11306 | this->uninterpreted_option(i)); |
| 11307 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11308 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11309 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11310 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11311 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11312 | total_size += |
| 11313 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 11314 | unknown_fields()); |
| 11315 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11316 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11317 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11318 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11319 | return total_size; |
| 11320 | } |
| 11321 | |
| 11322 | void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11323 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11324 | const ServiceOptions* source = |
| 11325 | ::google::protobuf::internal::DynamicCastToGenerated<const ServiceOptions>( |
| 11326 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11327 | if (source == NULL) { |
| 11328 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 11329 | } else { |
| 11330 | MergeFrom(*source); |
| 11331 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11332 | } |
| 11333 | |
| 11334 | void ServiceOptions::MergeFrom(const ServiceOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11335 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11336 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11337 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 11338 | if (from.has_deprecated()) { |
| 11339 | set_deprecated(from.deprecated()); |
| 11340 | } |
| 11341 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11342 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11343 | if (from._internal_metadata_.have_unknown_fields()) { |
| 11344 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 11345 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11346 | } |
| 11347 | |
| 11348 | void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11349 | if (&from == this) return; |
| 11350 | Clear(); |
| 11351 | MergeFrom(from); |
| 11352 | } |
| 11353 | |
| 11354 | void ServiceOptions::CopyFrom(const ServiceOptions& from) { |
| 11355 | if (&from == this) return; |
| 11356 | Clear(); |
| 11357 | MergeFrom(from); |
| 11358 | } |
| 11359 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11360 | bool ServiceOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11361 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11362 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11363 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11364 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11365 | } |
| 11366 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11367 | void ServiceOptions::Swap(ServiceOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11368 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11369 | InternalSwap(other); |
| 11370 | } |
| 11371 | void ServiceOptions::InternalSwap(ServiceOptions* other) { |
| 11372 | std::swap(deprecated_, other->deprecated_); |
| 11373 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11374 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11375 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11376 | std::swap(_cached_size_, other->_cached_size_); |
| 11377 | _extensions_.Swap(&other->_extensions_); |
| 11378 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11379 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11380 | ::google::protobuf::Metadata ServiceOptions::GetMetadata() const { |
| 11381 | protobuf_AssignDescriptorsOnce(); |
| 11382 | ::google::protobuf::Metadata metadata; |
| 11383 | metadata.descriptor = ServiceOptions_descriptor_; |
| 11384 | metadata.reflection = ServiceOptions_reflection_; |
| 11385 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11386 | } |
| 11387 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11388 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11389 | // ServiceOptions |
| 11390 | |
| 11391 | // optional bool deprecated = 33 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11392 | bool ServiceOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11393 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11394 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11395 | void ServiceOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11396 | _has_bits_[0] |= 0x00000001u; |
| 11397 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11398 | void ServiceOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11399 | _has_bits_[0] &= ~0x00000001u; |
| 11400 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11401 | void ServiceOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11402 | deprecated_ = false; |
| 11403 | clear_has_deprecated(); |
| 11404 | } |
| 11405 | bool ServiceOptions::deprecated() const { |
| 11406 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated) |
| 11407 | return deprecated_; |
| 11408 | } |
| 11409 | void ServiceOptions::set_deprecated(bool value) { |
| 11410 | set_has_deprecated(); |
| 11411 | deprecated_ = value; |
| 11412 | // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated) |
| 11413 | } |
| 11414 | |
| 11415 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11416 | int ServiceOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11417 | return uninterpreted_option_.size(); |
| 11418 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11419 | void ServiceOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11420 | uninterpreted_option_.Clear(); |
| 11421 | } |
| 11422 | const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const { |
| 11423 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11424 | return uninterpreted_option_.Get(index); |
| 11425 | } |
| 11426 | ::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) { |
| 11427 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11428 | return uninterpreted_option_.Mutable(index); |
| 11429 | } |
| 11430 | ::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { |
| 11431 | // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11432 | return uninterpreted_option_.Add(); |
| 11433 | } |
| 11434 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11435 | ServiceOptions::uninterpreted_option() const { |
| 11436 | // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11437 | return uninterpreted_option_; |
| 11438 | } |
| 11439 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 11440 | ServiceOptions::mutable_uninterpreted_option() { |
| 11441 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11442 | return &uninterpreted_option_; |
| 11443 | } |
| 11444 | |
| 11445 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11446 | |
| 11447 | // =================================================================== |
| 11448 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11449 | #ifndef _MSC_VER |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11450 | const int MethodOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11451 | const int MethodOptions::kUninterpretedOptionFieldNumber; |
| 11452 | #endif // !_MSC_VER |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11453 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11454 | MethodOptions::MethodOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11455 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11456 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11457 | // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11458 | } |
| 11459 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11460 | void MethodOptions::InitAsDefaultInstance() { |
| 11461 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11462 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11463 | MethodOptions::MethodOptions(const MethodOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11464 | : ::google::protobuf::Message(), |
| 11465 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11466 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11467 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11468 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11469 | } |
| 11470 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11471 | void MethodOptions::SharedCtor() { |
| 11472 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11473 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11474 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11475 | } |
| 11476 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11477 | MethodOptions::~MethodOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11478 | // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11479 | SharedDtor(); |
| 11480 | } |
| 11481 | |
| 11482 | void MethodOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11483 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11484 | } |
| 11485 | } |
| 11486 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11487 | void MethodOptions::SetCachedSize(int size) const { |
| 11488 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11489 | _cached_size_ = size; |
| 11490 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11491 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11492 | const ::google::protobuf::Descriptor* MethodOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11493 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11494 | return MethodOptions_descriptor_; |
| 11495 | } |
| 11496 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11497 | const MethodOptions& MethodOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11498 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11499 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11500 | } |
| 11501 | |
| 11502 | MethodOptions* MethodOptions::default_instance_ = NULL; |
| 11503 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11504 | MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11505 | MethodOptions* n = new MethodOptions; |
| 11506 | if (arena != NULL) { |
| 11507 | arena->Own(n); |
| 11508 | } |
| 11509 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11510 | } |
| 11511 | |
| 11512 | void MethodOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11513 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11514 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11515 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11516 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11517 | if (_internal_metadata_.have_unknown_fields()) { |
| 11518 | mutable_unknown_fields()->Clear(); |
| 11519 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11520 | } |
| 11521 | |
| 11522 | bool MethodOptions::MergePartialFromCodedStream( |
| 11523 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11524 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11525 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11526 | // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions) |
| 11527 | for (;;) { |
| 11528 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 11529 | tag = p.first; |
| 11530 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11531 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11532 | // optional bool deprecated = 33 [default = false]; |
| 11533 | case 33: { |
| 11534 | if (tag == 264) { |
| 11535 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 11536 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 11537 | input, &deprecated_))); |
| 11538 | set_has_deprecated(); |
| 11539 | } else { |
| 11540 | goto handle_unusual; |
| 11541 | } |
| 11542 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 11543 | break; |
| 11544 | } |
| 11545 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11546 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 11547 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11548 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11549 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11550 | DO_(input->IncrementRecursionDepth()); |
| 11551 | parse_loop_uninterpreted_option: |
| 11552 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11553 | input, add_uninterpreted_option())); |
| 11554 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11555 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11556 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11557 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 11558 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11559 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11560 | break; |
| 11561 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11562 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11563 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11564 | handle_unusual: |
| 11565 | if (tag == 0 || |
| 11566 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11567 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11568 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11569 | } |
| 11570 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11571 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 11572 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11573 | continue; |
| 11574 | } |
| 11575 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 11576 | input, tag, mutable_unknown_fields())); |
| 11577 | break; |
| 11578 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11579 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11580 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11581 | success: |
| 11582 | // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11583 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11584 | failure: |
| 11585 | // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions) |
| 11586 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11587 | #undef DO_ |
| 11588 | } |
| 11589 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11590 | void MethodOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11591 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11592 | // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions) |
| 11593 | // optional bool deprecated = 33 [default = false]; |
| 11594 | if (has_deprecated()) { |
| 11595 | ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); |
| 11596 | } |
| 11597 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11598 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11599 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11600 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11601 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11602 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11603 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11604 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11605 | _extensions_.SerializeWithCachedSizes( |
| 11606 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11607 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11608 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11609 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11610 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11611 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11612 | // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11613 | } |
| 11614 | |
| 11615 | ::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray( |
| 11616 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11617 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) |
| 11618 | // optional bool deprecated = 33 [default = false]; |
| 11619 | if (has_deprecated()) { |
| 11620 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); |
| 11621 | } |
| 11622 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11623 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11624 | for (unsigned int i = 0, n = this->uninterpreted_option_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11625 | target = ::google::protobuf::internal::WireFormatLite:: |
| 11626 | WriteMessageNoVirtualToArray( |
| 11627 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11628 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11629 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11630 | // Extension range [1000, 536870912) |
| 11631 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 11632 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11633 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11634 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11635 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11636 | unknown_fields(), target); |
| 11637 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11638 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11639 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11640 | } |
| 11641 | |
| 11642 | int MethodOptions::ByteSize() const { |
| 11643 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11644 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11645 | // optional bool deprecated = 33 [default = false]; |
| 11646 | if (has_deprecated()) { |
| 11647 | total_size += 2 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11648 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11649 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11650 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 11651 | total_size += 2 * this->uninterpreted_option_size(); |
| 11652 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11653 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11654 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11655 | this->uninterpreted_option(i)); |
| 11656 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11657 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11658 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11659 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11660 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11661 | total_size += |
| 11662 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 11663 | unknown_fields()); |
| 11664 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11665 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11666 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11667 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11668 | return total_size; |
| 11669 | } |
| 11670 | |
| 11671 | void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11672 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11673 | const MethodOptions* source = |
| 11674 | ::google::protobuf::internal::DynamicCastToGenerated<const MethodOptions>( |
| 11675 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11676 | if (source == NULL) { |
| 11677 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 11678 | } else { |
| 11679 | MergeFrom(*source); |
| 11680 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11681 | } |
| 11682 | |
| 11683 | void MethodOptions::MergeFrom(const MethodOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11684 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11685 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11686 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 11687 | if (from.has_deprecated()) { |
| 11688 | set_deprecated(from.deprecated()); |
| 11689 | } |
| 11690 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11691 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11692 | if (from._internal_metadata_.have_unknown_fields()) { |
| 11693 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 11694 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11695 | } |
| 11696 | |
| 11697 | void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11698 | if (&from == this) return; |
| 11699 | Clear(); |
| 11700 | MergeFrom(from); |
| 11701 | } |
| 11702 | |
| 11703 | void MethodOptions::CopyFrom(const MethodOptions& from) { |
| 11704 | if (&from == this) return; |
| 11705 | Clear(); |
| 11706 | MergeFrom(from); |
| 11707 | } |
| 11708 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11709 | bool MethodOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11710 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11711 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11712 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11713 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11714 | } |
| 11715 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11716 | void MethodOptions::Swap(MethodOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11717 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11718 | InternalSwap(other); |
| 11719 | } |
| 11720 | void MethodOptions::InternalSwap(MethodOptions* other) { |
| 11721 | std::swap(deprecated_, other->deprecated_); |
| 11722 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11723 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11724 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11725 | std::swap(_cached_size_, other->_cached_size_); |
| 11726 | _extensions_.Swap(&other->_extensions_); |
| 11727 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11728 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11729 | ::google::protobuf::Metadata MethodOptions::GetMetadata() const { |
| 11730 | protobuf_AssignDescriptorsOnce(); |
| 11731 | ::google::protobuf::Metadata metadata; |
| 11732 | metadata.descriptor = MethodOptions_descriptor_; |
| 11733 | metadata.reflection = MethodOptions_reflection_; |
| 11734 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11735 | } |
| 11736 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11737 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11738 | // MethodOptions |
| 11739 | |
| 11740 | // optional bool deprecated = 33 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11741 | bool MethodOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11742 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11743 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11744 | void MethodOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11745 | _has_bits_[0] |= 0x00000001u; |
| 11746 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11747 | void MethodOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11748 | _has_bits_[0] &= ~0x00000001u; |
| 11749 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11750 | void MethodOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11751 | deprecated_ = false; |
| 11752 | clear_has_deprecated(); |
| 11753 | } |
| 11754 | bool MethodOptions::deprecated() const { |
| 11755 | // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated) |
| 11756 | return deprecated_; |
| 11757 | } |
| 11758 | void MethodOptions::set_deprecated(bool value) { |
| 11759 | set_has_deprecated(); |
| 11760 | deprecated_ = value; |
| 11761 | // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated) |
| 11762 | } |
| 11763 | |
| 11764 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11765 | int MethodOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11766 | return uninterpreted_option_.size(); |
| 11767 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11768 | void MethodOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11769 | uninterpreted_option_.Clear(); |
| 11770 | } |
| 11771 | const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const { |
| 11772 | // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option) |
| 11773 | return uninterpreted_option_.Get(index); |
| 11774 | } |
| 11775 | ::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) { |
| 11776 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option) |
| 11777 | return uninterpreted_option_.Mutable(index); |
| 11778 | } |
| 11779 | ::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() { |
| 11780 | // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option) |
| 11781 | return uninterpreted_option_.Add(); |
| 11782 | } |
| 11783 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11784 | MethodOptions::uninterpreted_option() const { |
| 11785 | // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option) |
| 11786 | return uninterpreted_option_; |
| 11787 | } |
| 11788 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
| 11789 | MethodOptions::mutable_uninterpreted_option() { |
| 11790 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option) |
| 11791 | return &uninterpreted_option_; |
| 11792 | } |
| 11793 | |
| 11794 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11795 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11796 | // =================================================================== |
| 11797 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11798 | #ifndef _MSC_VER |
| 11799 | const int UninterpretedOption_NamePart::kNamePartFieldNumber; |
| 11800 | const int UninterpretedOption_NamePart::kIsExtensionFieldNumber; |
| 11801 | #endif // !_MSC_VER |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11802 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11803 | UninterpretedOption_NamePart::UninterpretedOption_NamePart() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11804 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11805 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11806 | // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11807 | } |
| 11808 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11809 | void UninterpretedOption_NamePart::InitAsDefaultInstance() { |
| 11810 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11811 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11812 | UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11813 | : ::google::protobuf::Message(), |
| 11814 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11815 | SharedCtor(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11816 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11817 | // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11818 | } |
| 11819 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11820 | void UninterpretedOption_NamePart::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11821 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11822 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11823 | name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11824 | is_extension_ = false; |
| 11825 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11826 | } |
| 11827 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11828 | UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11829 | // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11830 | SharedDtor(); |
| 11831 | } |
| 11832 | |
| 11833 | void UninterpretedOption_NamePart::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11834 | name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11835 | if (this != default_instance_) { |
| 11836 | } |
| 11837 | } |
| 11838 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11839 | void UninterpretedOption_NamePart::SetCachedSize(int size) const { |
| 11840 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11841 | _cached_size_ = size; |
| 11842 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11843 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11844 | const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11845 | protobuf_AssignDescriptorsOnce(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11846 | return UninterpretedOption_NamePart_descriptor_; |
| 11847 | } |
| 11848 | |
| 11849 | const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11850 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11851 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11852 | } |
| 11853 | |
| 11854 | UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL; |
| 11855 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11856 | UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11857 | UninterpretedOption_NamePart* n = new UninterpretedOption_NamePart; |
| 11858 | if (arena != NULL) { |
| 11859 | arena->Own(n); |
| 11860 | } |
| 11861 | return n; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11862 | } |
| 11863 | |
| 11864 | void UninterpretedOption_NamePart::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 11865 | if (_has_bits_[0 / 32] & 3u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11866 | if (has_name_part()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11867 | name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11868 | } |
| 11869 | is_extension_ = false; |
| 11870 | } |
| 11871 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11872 | if (_internal_metadata_.have_unknown_fields()) { |
| 11873 | mutable_unknown_fields()->Clear(); |
| 11874 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11875 | } |
| 11876 | |
| 11877 | bool UninterpretedOption_NamePart::MergePartialFromCodedStream( |
| 11878 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11879 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11880 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11881 | // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart) |
| 11882 | for (;;) { |
| 11883 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 11884 | tag = p.first; |
| 11885 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11886 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11887 | // required string name_part = 1; |
| 11888 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11889 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11890 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 11891 | input, this->mutable_name_part())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11892 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11893 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11894 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11895 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11896 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11897 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11898 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11899 | if (input->ExpectTag(16)) goto parse_is_extension; |
| 11900 | break; |
| 11901 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11902 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11903 | // required bool is_extension = 2; |
| 11904 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11905 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11906 | parse_is_extension: |
| 11907 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 11908 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 11909 | input, &is_extension_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11910 | set_has_is_extension(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11911 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11912 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11913 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11914 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11915 | break; |
| 11916 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11917 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11918 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11919 | handle_unusual: |
| 11920 | if (tag == 0 || |
| 11921 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11922 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11923 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11924 | } |
| 11925 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 11926 | input, tag, mutable_unknown_fields())); |
| 11927 | break; |
| 11928 | } |
| 11929 | } |
| 11930 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11931 | success: |
| 11932 | // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11933 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11934 | failure: |
| 11935 | // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart) |
| 11936 | return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11937 | #undef DO_ |
| 11938 | } |
| 11939 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11940 | void UninterpretedOption_NamePart::SerializeWithCachedSizes( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11941 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11942 | // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11943 | // required string name_part = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11944 | if (has_name_part()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11945 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11946 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11947 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11948 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11949 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11950 | 1, this->name_part(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11951 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11952 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11953 | // required bool is_extension = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11954 | if (has_is_extension()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11955 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11956 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11957 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11958 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11959 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11960 | unknown_fields(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11961 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11962 | // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11963 | } |
| 11964 | |
| 11965 | ::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray( |
| 11966 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11967 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11968 | // required string name_part = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11969 | if (has_name_part()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11970 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11971 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11972 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11973 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11974 | target = |
| 11975 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 11976 | 1, this->name_part(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11977 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11978 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11979 | // required bool is_extension = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11980 | if (has_is_extension()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11981 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11982 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11983 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11984 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11985 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11986 | unknown_fields(), target); |
| 11987 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11988 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11989 | return target; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11990 | } |
| 11991 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11992 | int UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const { |
| 11993 | int total_size = 0; |
| 11994 | |
| 11995 | if (has_name_part()) { |
| 11996 | // required string name_part = 1; |
| 11997 | total_size += 1 + |
| 11998 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 11999 | this->name_part()); |
| 12000 | } |
| 12001 | |
| 12002 | if (has_is_extension()) { |
| 12003 | // required bool is_extension = 2; |
| 12004 | total_size += 1 + 1; |
| 12005 | } |
| 12006 | |
| 12007 | return total_size; |
| 12008 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12009 | int UninterpretedOption_NamePart::ByteSize() const { |
| 12010 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12011 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12012 | if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12013 | // required string name_part = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12014 | total_size += 1 + |
| 12015 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12016 | this->name_part()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12017 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12018 | // required bool is_extension = 2; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12019 | total_size += 1 + 1; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12020 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12021 | } else { |
| 12022 | total_size += RequiredFieldsByteSizeFallback(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12023 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12024 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12025 | total_size += |
| 12026 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 12027 | unknown_fields()); |
| 12028 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12029 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12030 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12031 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12032 | return total_size; |
| 12033 | } |
| 12034 | |
| 12035 | void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12036 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12037 | const UninterpretedOption_NamePart* source = |
| 12038 | ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption_NamePart>( |
| 12039 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12040 | if (source == NULL) { |
| 12041 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 12042 | } else { |
| 12043 | MergeFrom(*source); |
| 12044 | } |
| 12045 | } |
| 12046 | |
| 12047 | void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12048 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12049 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12050 | if (from.has_name_part()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12051 | set_has_name_part(); |
| 12052 | name_part_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12053 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12054 | if (from.has_is_extension()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12055 | set_is_extension(from.is_extension()); |
| 12056 | } |
| 12057 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12058 | if (from._internal_metadata_.have_unknown_fields()) { |
| 12059 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 12060 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12061 | } |
| 12062 | |
| 12063 | void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) { |
| 12064 | if (&from == this) return; |
| 12065 | Clear(); |
| 12066 | MergeFrom(from); |
| 12067 | } |
| 12068 | |
| 12069 | void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) { |
| 12070 | if (&from == this) return; |
| 12071 | Clear(); |
| 12072 | MergeFrom(from); |
| 12073 | } |
| 12074 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12075 | bool UninterpretedOption_NamePart::IsInitialized() const { |
| 12076 | if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12077 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12078 | return true; |
| 12079 | } |
| 12080 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12081 | void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12082 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12083 | InternalSwap(other); |
| 12084 | } |
| 12085 | void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) { |
| 12086 | name_part_.Swap(&other->name_part_); |
| 12087 | std::swap(is_extension_, other->is_extension_); |
| 12088 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 12089 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 12090 | std::swap(_cached_size_, other->_cached_size_); |
| 12091 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12092 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12093 | ::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const { |
| 12094 | protobuf_AssignDescriptorsOnce(); |
| 12095 | ::google::protobuf::Metadata metadata; |
| 12096 | metadata.descriptor = UninterpretedOption_NamePart_descriptor_; |
| 12097 | metadata.reflection = UninterpretedOption_NamePart_reflection_; |
| 12098 | return metadata; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12099 | } |
| 12100 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12101 | |
| 12102 | // ------------------------------------------------------------------- |
| 12103 | |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 12104 | #ifndef _MSC_VER |
| 12105 | const int UninterpretedOption::kNameFieldNumber; |
| 12106 | const int UninterpretedOption::kIdentifierValueFieldNumber; |
| 12107 | const int UninterpretedOption::kPositiveIntValueFieldNumber; |
| 12108 | const int UninterpretedOption::kNegativeIntValueFieldNumber; |
| 12109 | const int UninterpretedOption::kDoubleValueFieldNumber; |
| 12110 | const int UninterpretedOption::kStringValueFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12111 | const int UninterpretedOption::kAggregateValueFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 12112 | #endif // !_MSC_VER |
| 12113 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 12114 | UninterpretedOption::UninterpretedOption() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12115 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12116 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12117 | // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12118 | } |
| 12119 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12120 | void UninterpretedOption::InitAsDefaultInstance() { |
| 12121 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12122 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 12123 | UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12124 | : ::google::protobuf::Message(), |
| 12125 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12126 | SharedCtor(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12127 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12128 | // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12129 | } |
| 12130 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12131 | void UninterpretedOption::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12132 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12133 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12134 | identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12135 | positive_int_value_ = GOOGLE_ULONGLONG(0); |
| 12136 | negative_int_value_ = GOOGLE_LONGLONG(0); |
| 12137 | double_value_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12138 | string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12139 | aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12140 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 12141 | } |
| 12142 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12143 | UninterpretedOption::~UninterpretedOption() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12144 | // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12145 | SharedDtor(); |
| 12146 | } |
| 12147 | |
| 12148 | void UninterpretedOption::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12149 | identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12150 | string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12151 | aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12152 | if (this != default_instance_) { |
| 12153 | } |
| 12154 | } |
| 12155 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12156 | void UninterpretedOption::SetCachedSize(int size) const { |
| 12157 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 12158 | _cached_size_ = size; |
| 12159 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 12160 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12161 | const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12162 | protobuf_AssignDescriptorsOnce(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12163 | return UninterpretedOption_descriptor_; |
| 12164 | } |
| 12165 | |
| 12166 | const UninterpretedOption& UninterpretedOption::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 12167 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 12168 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12169 | } |
| 12170 | |
| 12171 | UninterpretedOption* UninterpretedOption::default_instance_ = NULL; |
| 12172 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12173 | UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12174 | UninterpretedOption* n = new UninterpretedOption; |
| 12175 | if (arena != NULL) { |
| 12176 | arena->Own(n); |
| 12177 | } |
| 12178 | return n; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12179 | } |
| 12180 | |
| 12181 | void UninterpretedOption::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12182 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 12183 | &reinterpret_cast<UninterpretedOption*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12184 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12185 | #define ZR_(first, last) do {\ |
| 12186 | ::memset(&first, 0,\ |
| 12187 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 12188 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12189 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 12190 | if (_has_bits_[0 / 32] & 126u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12191 | ZR_(positive_int_value_, double_value_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12192 | if (has_identifier_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12193 | identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12194 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12195 | if (has_string_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12196 | string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12197 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12198 | if (has_aggregate_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12199 | aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12200 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12201 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12202 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12203 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12204 | #undef ZR_ |
| 12205 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12206 | name_.Clear(); |
| 12207 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12208 | if (_internal_metadata_.have_unknown_fields()) { |
| 12209 | mutable_unknown_fields()->Clear(); |
| 12210 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12211 | } |
| 12212 | |
| 12213 | bool UninterpretedOption::MergePartialFromCodedStream( |
| 12214 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12215 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12216 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12217 | // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption) |
| 12218 | for (;;) { |
| 12219 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 12220 | tag = p.first; |
| 12221 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12222 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12223 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
| 12224 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12225 | if (tag == 18) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12226 | DO_(input->IncrementRecursionDepth()); |
| 12227 | parse_loop_name: |
| 12228 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12229 | input, add_name())); |
| 12230 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12231 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12232 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12233 | if (input->ExpectTag(18)) goto parse_loop_name; |
| 12234 | input->UnsafeDecrementRecursionDepth(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12235 | if (input->ExpectTag(26)) goto parse_identifier_value; |
| 12236 | break; |
| 12237 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12238 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12239 | // optional string identifier_value = 3; |
| 12240 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12241 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12242 | parse_identifier_value: |
| 12243 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 12244 | input, this->mutable_identifier_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12245 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12246 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12247 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12248 | "google.protobuf.UninterpretedOption.identifier_value"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12249 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12250 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12251 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12252 | if (input->ExpectTag(32)) goto parse_positive_int_value; |
| 12253 | break; |
| 12254 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12255 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12256 | // optional uint64 positive_int_value = 4; |
| 12257 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12258 | if (tag == 32) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12259 | parse_positive_int_value: |
| 12260 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12261 | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| 12262 | input, &positive_int_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12263 | set_has_positive_int_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12264 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12265 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12266 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12267 | if (input->ExpectTag(40)) goto parse_negative_int_value; |
| 12268 | break; |
| 12269 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12270 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12271 | // optional int64 negative_int_value = 5; |
| 12272 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12273 | if (tag == 40) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12274 | parse_negative_int_value: |
| 12275 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12276 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
| 12277 | input, &negative_int_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12278 | set_has_negative_int_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12279 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12280 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12281 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12282 | if (input->ExpectTag(49)) goto parse_double_value; |
| 12283 | break; |
| 12284 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12285 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12286 | // optional double double_value = 6; |
| 12287 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12288 | if (tag == 49) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12289 | parse_double_value: |
| 12290 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12291 | double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| 12292 | input, &double_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12293 | set_has_double_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12294 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12295 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12296 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12297 | if (input->ExpectTag(58)) goto parse_string_value; |
| 12298 | break; |
| 12299 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12300 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12301 | // optional bytes string_value = 7; |
| 12302 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12303 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12304 | parse_string_value: |
| 12305 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
| 12306 | input, this->mutable_string_value())); |
| 12307 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12308 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12309 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12310 | if (input->ExpectTag(66)) goto parse_aggregate_value; |
| 12311 | break; |
| 12312 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12313 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12314 | // optional string aggregate_value = 8; |
| 12315 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12316 | if (tag == 66) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12317 | parse_aggregate_value: |
| 12318 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 12319 | input, this->mutable_aggregate_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12320 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12321 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12322 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12323 | "google.protobuf.UninterpretedOption.aggregate_value"); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12324 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12325 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12326 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12327 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12328 | break; |
| 12329 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12330 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12331 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12332 | handle_unusual: |
| 12333 | if (tag == 0 || |
| 12334 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12335 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12336 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12337 | } |
| 12338 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 12339 | input, tag, mutable_unknown_fields())); |
| 12340 | break; |
| 12341 | } |
| 12342 | } |
| 12343 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12344 | success: |
| 12345 | // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12346 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12347 | failure: |
| 12348 | // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption) |
| 12349 | return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12350 | #undef DO_ |
| 12351 | } |
| 12352 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12353 | void UninterpretedOption::SerializeWithCachedSizes( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12354 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12355 | // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12356 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12357 | for (unsigned int i = 0, n = this->name_size(); i < n; i++) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12358 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12359 | 2, this->name(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12360 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12361 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12362 | // optional string identifier_value = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12363 | if (has_identifier_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12364 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12365 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12366 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12367 | "google.protobuf.UninterpretedOption.identifier_value"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12368 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12369 | 3, this->identifier_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12370 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12371 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12372 | // optional uint64 positive_int_value = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12373 | if (has_positive_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12374 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12375 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12376 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12377 | // optional int64 negative_int_value = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12378 | if (has_negative_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12379 | ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12380 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12381 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12382 | // optional double double_value = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12383 | if (has_double_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12384 | ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12385 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12386 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12387 | // optional bytes string_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12388 | if (has_string_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12389 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12390 | 7, this->string_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12391 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12392 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12393 | // optional string aggregate_value = 8; |
| 12394 | if (has_aggregate_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12395 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12396 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12397 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12398 | "google.protobuf.UninterpretedOption.aggregate_value"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12399 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12400 | 8, this->aggregate_value(), output); |
| 12401 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12402 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12403 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12404 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 12405 | unknown_fields(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12406 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12407 | // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12408 | } |
| 12409 | |
| 12410 | ::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray( |
| 12411 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12412 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12413 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12414 | for (unsigned int i = 0, n = this->name_size(); i < n; i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12415 | target = ::google::protobuf::internal::WireFormatLite:: |
| 12416 | WriteMessageNoVirtualToArray( |
| 12417 | 2, this->name(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12418 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12419 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12420 | // optional string identifier_value = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12421 | if (has_identifier_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12422 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12423 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12424 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12425 | "google.protobuf.UninterpretedOption.identifier_value"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12426 | target = |
| 12427 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 12428 | 3, this->identifier_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12429 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12430 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12431 | // optional uint64 positive_int_value = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12432 | if (has_positive_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12433 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12434 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12435 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12436 | // optional int64 negative_int_value = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12437 | if (has_negative_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12438 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12439 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12440 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12441 | // optional double double_value = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12442 | if (has_double_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12443 | target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12444 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12445 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12446 | // optional bytes string_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12447 | if (has_string_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12448 | target = |
| 12449 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
| 12450 | 7, this->string_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12451 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12452 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12453 | // optional string aggregate_value = 8; |
| 12454 | if (has_aggregate_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12455 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12456 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12457 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12458 | "google.protobuf.UninterpretedOption.aggregate_value"); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12459 | target = |
| 12460 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 12461 | 8, this->aggregate_value(), target); |
| 12462 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12463 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12464 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12465 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 12466 | unknown_fields(), target); |
| 12467 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12468 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12469 | return target; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12470 | } |
| 12471 | |
| 12472 | int UninterpretedOption::ByteSize() const { |
| 12473 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12474 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 12475 | if (_has_bits_[1 / 32] & 126u) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12476 | // optional string identifier_value = 3; |
| 12477 | if (has_identifier_value()) { |
| 12478 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12479 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12480 | this->identifier_value()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12481 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12482 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12483 | // optional uint64 positive_int_value = 4; |
| 12484 | if (has_positive_int_value()) { |
| 12485 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12486 | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12487 | this->positive_int_value()); |
| 12488 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12489 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12490 | // optional int64 negative_int_value = 5; |
| 12491 | if (has_negative_int_value()) { |
| 12492 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12493 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12494 | this->negative_int_value()); |
| 12495 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12496 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12497 | // optional double double_value = 6; |
| 12498 | if (has_double_value()) { |
| 12499 | total_size += 1 + 8; |
| 12500 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12501 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12502 | // optional bytes string_value = 7; |
| 12503 | if (has_string_value()) { |
| 12504 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12505 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
| 12506 | this->string_value()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12507 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12508 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12509 | // optional string aggregate_value = 8; |
| 12510 | if (has_aggregate_value()) { |
| 12511 | total_size += 1 + |
| 12512 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12513 | this->aggregate_value()); |
| 12514 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12515 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12516 | } |
| 12517 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 12518 | total_size += 1 * this->name_size(); |
| 12519 | for (int i = 0; i < this->name_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12520 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12521 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12522 | this->name(i)); |
| 12523 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12524 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12525 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12526 | total_size += |
| 12527 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 12528 | unknown_fields()); |
| 12529 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12530 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12531 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12532 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12533 | return total_size; |
| 12534 | } |
| 12535 | |
| 12536 | void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12537 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12538 | const UninterpretedOption* source = |
| 12539 | ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption>( |
| 12540 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12541 | if (source == NULL) { |
| 12542 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 12543 | } else { |
| 12544 | MergeFrom(*source); |
| 12545 | } |
| 12546 | } |
| 12547 | |
| 12548 | void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12549 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12550 | name_.MergeFrom(from.name_); |
| 12551 | if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12552 | if (from.has_identifier_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12553 | set_has_identifier_value(); |
| 12554 | identifier_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12555 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12556 | if (from.has_positive_int_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12557 | set_positive_int_value(from.positive_int_value()); |
| 12558 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12559 | if (from.has_negative_int_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12560 | set_negative_int_value(from.negative_int_value()); |
| 12561 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12562 | if (from.has_double_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12563 | set_double_value(from.double_value()); |
| 12564 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12565 | if (from.has_string_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12566 | set_has_string_value(); |
| 12567 | string_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12568 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12569 | if (from.has_aggregate_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12570 | set_has_aggregate_value(); |
| 12571 | aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12572 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12573 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12574 | if (from._internal_metadata_.have_unknown_fields()) { |
| 12575 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 12576 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12577 | } |
| 12578 | |
| 12579 | void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) { |
| 12580 | if (&from == this) return; |
| 12581 | Clear(); |
| 12582 | MergeFrom(from); |
| 12583 | } |
| 12584 | |
| 12585 | void UninterpretedOption::CopyFrom(const UninterpretedOption& from) { |
| 12586 | if (&from == this) return; |
| 12587 | Clear(); |
| 12588 | MergeFrom(from); |
| 12589 | } |
| 12590 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12591 | bool UninterpretedOption::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12592 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12593 | if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12594 | return true; |
| 12595 | } |
| 12596 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12597 | void UninterpretedOption::Swap(UninterpretedOption* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12598 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12599 | InternalSwap(other); |
| 12600 | } |
| 12601 | void UninterpretedOption::InternalSwap(UninterpretedOption* other) { |
| 12602 | name_.UnsafeArenaSwap(&other->name_); |
| 12603 | identifier_value_.Swap(&other->identifier_value_); |
| 12604 | std::swap(positive_int_value_, other->positive_int_value_); |
| 12605 | std::swap(negative_int_value_, other->negative_int_value_); |
| 12606 | std::swap(double_value_, other->double_value_); |
| 12607 | string_value_.Swap(&other->string_value_); |
| 12608 | aggregate_value_.Swap(&other->aggregate_value_); |
| 12609 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 12610 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 12611 | std::swap(_cached_size_, other->_cached_size_); |
| 12612 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12613 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12614 | ::google::protobuf::Metadata UninterpretedOption::GetMetadata() const { |
| 12615 | protobuf_AssignDescriptorsOnce(); |
| 12616 | ::google::protobuf::Metadata metadata; |
| 12617 | metadata.descriptor = UninterpretedOption_descriptor_; |
| 12618 | metadata.reflection = UninterpretedOption_reflection_; |
| 12619 | return metadata; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12620 | } |
| 12621 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12622 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 12623 | // UninterpretedOption_NamePart |
| 12624 | |
| 12625 | // required string name_part = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12626 | bool UninterpretedOption_NamePart::has_name_part() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12627 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 12628 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12629 | void UninterpretedOption_NamePart::set_has_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12630 | _has_bits_[0] |= 0x00000001u; |
| 12631 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12632 | void UninterpretedOption_NamePart::clear_has_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12633 | _has_bits_[0] &= ~0x00000001u; |
| 12634 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12635 | void UninterpretedOption_NamePart::clear_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12636 | name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12637 | clear_has_name_part(); |
| 12638 | } |
| 12639 | const ::std::string& UninterpretedOption_NamePart::name_part() const { |
| 12640 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12641 | return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12642 | } |
| 12643 | void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { |
| 12644 | set_has_name_part(); |
| 12645 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12646 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12647 | } |
| 12648 | void UninterpretedOption_NamePart::set_name_part(const char* value) { |
| 12649 | set_has_name_part(); |
| 12650 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12651 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12652 | } |
| 12653 | void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { |
| 12654 | set_has_name_part(); |
| 12655 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12656 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12657 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12658 | } |
| 12659 | ::std::string* UninterpretedOption_NamePart::mutable_name_part() { |
| 12660 | set_has_name_part(); |
| 12661 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12662 | return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12663 | } |
| 12664 | ::std::string* UninterpretedOption_NamePart::release_name_part() { |
| 12665 | clear_has_name_part(); |
| 12666 | return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12667 | } |
| 12668 | void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) { |
| 12669 | if (name_part != NULL) { |
| 12670 | set_has_name_part(); |
| 12671 | } else { |
| 12672 | clear_has_name_part(); |
| 12673 | } |
| 12674 | name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part); |
| 12675 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12676 | } |
| 12677 | |
| 12678 | // required bool is_extension = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12679 | bool UninterpretedOption_NamePart::has_is_extension() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12680 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 12681 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12682 | void UninterpretedOption_NamePart::set_has_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12683 | _has_bits_[0] |= 0x00000002u; |
| 12684 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12685 | void UninterpretedOption_NamePart::clear_has_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12686 | _has_bits_[0] &= ~0x00000002u; |
| 12687 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12688 | void UninterpretedOption_NamePart::clear_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12689 | is_extension_ = false; |
| 12690 | clear_has_is_extension(); |
| 12691 | } |
| 12692 | bool UninterpretedOption_NamePart::is_extension() const { |
| 12693 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension) |
| 12694 | return is_extension_; |
| 12695 | } |
| 12696 | void UninterpretedOption_NamePart::set_is_extension(bool value) { |
| 12697 | set_has_is_extension(); |
| 12698 | is_extension_ = value; |
| 12699 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension) |
| 12700 | } |
| 12701 | |
| 12702 | // ------------------------------------------------------------------- |
| 12703 | |
| 12704 | // UninterpretedOption |
| 12705 | |
| 12706 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12707 | int UninterpretedOption::name_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12708 | return name_.size(); |
| 12709 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12710 | void UninterpretedOption::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12711 | name_.Clear(); |
| 12712 | } |
| 12713 | const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const { |
| 12714 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name) |
| 12715 | return name_.Get(index); |
| 12716 | } |
| 12717 | ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) { |
| 12718 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name) |
| 12719 | return name_.Mutable(index); |
| 12720 | } |
| 12721 | ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() { |
| 12722 | // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name) |
| 12723 | return name_.Add(); |
| 12724 | } |
| 12725 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& |
| 12726 | UninterpretedOption::name() const { |
| 12727 | // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name) |
| 12728 | return name_; |
| 12729 | } |
| 12730 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* |
| 12731 | UninterpretedOption::mutable_name() { |
| 12732 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name) |
| 12733 | return &name_; |
| 12734 | } |
| 12735 | |
| 12736 | // optional string identifier_value = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12737 | bool UninterpretedOption::has_identifier_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12738 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 12739 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12740 | void UninterpretedOption::set_has_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12741 | _has_bits_[0] |= 0x00000002u; |
| 12742 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12743 | void UninterpretedOption::clear_has_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12744 | _has_bits_[0] &= ~0x00000002u; |
| 12745 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12746 | void UninterpretedOption::clear_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12747 | identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12748 | clear_has_identifier_value(); |
| 12749 | } |
| 12750 | const ::std::string& UninterpretedOption::identifier_value() const { |
| 12751 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) |
| 12752 | return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12753 | } |
| 12754 | void UninterpretedOption::set_identifier_value(const ::std::string& value) { |
| 12755 | set_has_identifier_value(); |
| 12756 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12757 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) |
| 12758 | } |
| 12759 | void UninterpretedOption::set_identifier_value(const char* value) { |
| 12760 | set_has_identifier_value(); |
| 12761 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12762 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value) |
| 12763 | } |
| 12764 | void UninterpretedOption::set_identifier_value(const char* value, size_t size) { |
| 12765 | set_has_identifier_value(); |
| 12766 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12767 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12768 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value) |
| 12769 | } |
| 12770 | ::std::string* UninterpretedOption::mutable_identifier_value() { |
| 12771 | set_has_identifier_value(); |
| 12772 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) |
| 12773 | return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12774 | } |
| 12775 | ::std::string* UninterpretedOption::release_identifier_value() { |
| 12776 | clear_has_identifier_value(); |
| 12777 | return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12778 | } |
| 12779 | void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) { |
| 12780 | if (identifier_value != NULL) { |
| 12781 | set_has_identifier_value(); |
| 12782 | } else { |
| 12783 | clear_has_identifier_value(); |
| 12784 | } |
| 12785 | identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value); |
| 12786 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) |
| 12787 | } |
| 12788 | |
| 12789 | // optional uint64 positive_int_value = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12790 | bool UninterpretedOption::has_positive_int_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12791 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 12792 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12793 | void UninterpretedOption::set_has_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12794 | _has_bits_[0] |= 0x00000004u; |
| 12795 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12796 | void UninterpretedOption::clear_has_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12797 | _has_bits_[0] &= ~0x00000004u; |
| 12798 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12799 | void UninterpretedOption::clear_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12800 | positive_int_value_ = GOOGLE_ULONGLONG(0); |
| 12801 | clear_has_positive_int_value(); |
| 12802 | } |
| 12803 | ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const { |
| 12804 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value) |
| 12805 | return positive_int_value_; |
| 12806 | } |
| 12807 | void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) { |
| 12808 | set_has_positive_int_value(); |
| 12809 | positive_int_value_ = value; |
| 12810 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value) |
| 12811 | } |
| 12812 | |
| 12813 | // optional int64 negative_int_value = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12814 | bool UninterpretedOption::has_negative_int_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12815 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 12816 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12817 | void UninterpretedOption::set_has_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12818 | _has_bits_[0] |= 0x00000008u; |
| 12819 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12820 | void UninterpretedOption::clear_has_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12821 | _has_bits_[0] &= ~0x00000008u; |
| 12822 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12823 | void UninterpretedOption::clear_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12824 | negative_int_value_ = GOOGLE_LONGLONG(0); |
| 12825 | clear_has_negative_int_value(); |
| 12826 | } |
| 12827 | ::google::protobuf::int64 UninterpretedOption::negative_int_value() const { |
| 12828 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value) |
| 12829 | return negative_int_value_; |
| 12830 | } |
| 12831 | void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) { |
| 12832 | set_has_negative_int_value(); |
| 12833 | negative_int_value_ = value; |
| 12834 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value) |
| 12835 | } |
| 12836 | |
| 12837 | // optional double double_value = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12838 | bool UninterpretedOption::has_double_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12839 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 12840 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12841 | void UninterpretedOption::set_has_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12842 | _has_bits_[0] |= 0x00000010u; |
| 12843 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12844 | void UninterpretedOption::clear_has_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12845 | _has_bits_[0] &= ~0x00000010u; |
| 12846 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12847 | void UninterpretedOption::clear_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12848 | double_value_ = 0; |
| 12849 | clear_has_double_value(); |
| 12850 | } |
| 12851 | double UninterpretedOption::double_value() const { |
| 12852 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value) |
| 12853 | return double_value_; |
| 12854 | } |
| 12855 | void UninterpretedOption::set_double_value(double value) { |
| 12856 | set_has_double_value(); |
| 12857 | double_value_ = value; |
| 12858 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value) |
| 12859 | } |
| 12860 | |
| 12861 | // optional bytes string_value = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12862 | bool UninterpretedOption::has_string_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12863 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 12864 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12865 | void UninterpretedOption::set_has_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12866 | _has_bits_[0] |= 0x00000020u; |
| 12867 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12868 | void UninterpretedOption::clear_has_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12869 | _has_bits_[0] &= ~0x00000020u; |
| 12870 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12871 | void UninterpretedOption::clear_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12872 | string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12873 | clear_has_string_value(); |
| 12874 | } |
| 12875 | const ::std::string& UninterpretedOption::string_value() const { |
| 12876 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) |
| 12877 | return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12878 | } |
| 12879 | void UninterpretedOption::set_string_value(const ::std::string& value) { |
| 12880 | set_has_string_value(); |
| 12881 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12882 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) |
| 12883 | } |
| 12884 | void UninterpretedOption::set_string_value(const char* value) { |
| 12885 | set_has_string_value(); |
| 12886 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12887 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value) |
| 12888 | } |
| 12889 | void UninterpretedOption::set_string_value(const void* value, size_t size) { |
| 12890 | set_has_string_value(); |
| 12891 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12892 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12893 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value) |
| 12894 | } |
| 12895 | ::std::string* UninterpretedOption::mutable_string_value() { |
| 12896 | set_has_string_value(); |
| 12897 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) |
| 12898 | return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12899 | } |
| 12900 | ::std::string* UninterpretedOption::release_string_value() { |
| 12901 | clear_has_string_value(); |
| 12902 | return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12903 | } |
| 12904 | void UninterpretedOption::set_allocated_string_value(::std::string* string_value) { |
| 12905 | if (string_value != NULL) { |
| 12906 | set_has_string_value(); |
| 12907 | } else { |
| 12908 | clear_has_string_value(); |
| 12909 | } |
| 12910 | string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value); |
| 12911 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) |
| 12912 | } |
| 12913 | |
| 12914 | // optional string aggregate_value = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12915 | bool UninterpretedOption::has_aggregate_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12916 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 12917 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12918 | void UninterpretedOption::set_has_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12919 | _has_bits_[0] |= 0x00000040u; |
| 12920 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12921 | void UninterpretedOption::clear_has_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12922 | _has_bits_[0] &= ~0x00000040u; |
| 12923 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12924 | void UninterpretedOption::clear_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12925 | aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12926 | clear_has_aggregate_value(); |
| 12927 | } |
| 12928 | const ::std::string& UninterpretedOption::aggregate_value() const { |
| 12929 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) |
| 12930 | return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12931 | } |
| 12932 | void UninterpretedOption::set_aggregate_value(const ::std::string& value) { |
| 12933 | set_has_aggregate_value(); |
| 12934 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12935 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) |
| 12936 | } |
| 12937 | void UninterpretedOption::set_aggregate_value(const char* value) { |
| 12938 | set_has_aggregate_value(); |
| 12939 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12940 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value) |
| 12941 | } |
| 12942 | void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { |
| 12943 | set_has_aggregate_value(); |
| 12944 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12945 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12946 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value) |
| 12947 | } |
| 12948 | ::std::string* UninterpretedOption::mutable_aggregate_value() { |
| 12949 | set_has_aggregate_value(); |
| 12950 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) |
| 12951 | return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12952 | } |
| 12953 | ::std::string* UninterpretedOption::release_aggregate_value() { |
| 12954 | clear_has_aggregate_value(); |
| 12955 | return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12956 | } |
| 12957 | void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) { |
| 12958 | if (aggregate_value != NULL) { |
| 12959 | set_has_aggregate_value(); |
| 12960 | } else { |
| 12961 | clear_has_aggregate_value(); |
| 12962 | } |
| 12963 | aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value); |
| 12964 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) |
| 12965 | } |
| 12966 | |
| 12967 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12968 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12969 | // =================================================================== |
| 12970 | |
| 12971 | #ifndef _MSC_VER |
| 12972 | const int SourceCodeInfo_Location::kPathFieldNumber; |
| 12973 | const int SourceCodeInfo_Location::kSpanFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12974 | const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber; |
| 12975 | const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12976 | const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12977 | #endif // !_MSC_VER |
| 12978 | |
| 12979 | SourceCodeInfo_Location::SourceCodeInfo_Location() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12980 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12981 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12982 | // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12983 | } |
| 12984 | |
| 12985 | void SourceCodeInfo_Location::InitAsDefaultInstance() { |
| 12986 | } |
| 12987 | |
| 12988 | SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12989 | : ::google::protobuf::Message(), |
| 12990 | _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12991 | SharedCtor(); |
| 12992 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12993 | // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12994 | } |
| 12995 | |
| 12996 | void SourceCodeInfo_Location::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12997 | ::google::protobuf::internal::GetEmptyString(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12998 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12999 | leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13000 | trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13001 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 13002 | } |
| 13003 | |
| 13004 | SourceCodeInfo_Location::~SourceCodeInfo_Location() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13005 | // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13006 | SharedDtor(); |
| 13007 | } |
| 13008 | |
| 13009 | void SourceCodeInfo_Location::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13010 | leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13011 | trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13012 | if (this != default_instance_) { |
| 13013 | } |
| 13014 | } |
| 13015 | |
| 13016 | void SourceCodeInfo_Location::SetCachedSize(int size) const { |
| 13017 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13018 | _cached_size_ = size; |
| 13019 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13020 | } |
| 13021 | const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() { |
| 13022 | protobuf_AssignDescriptorsOnce(); |
| 13023 | return SourceCodeInfo_Location_descriptor_; |
| 13024 | } |
| 13025 | |
| 13026 | const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 13027 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 13028 | return *default_instance_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13029 | } |
| 13030 | |
| 13031 | SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL; |
| 13032 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13033 | SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13034 | SourceCodeInfo_Location* n = new SourceCodeInfo_Location; |
| 13035 | if (arena != NULL) { |
| 13036 | arena->Own(n); |
| 13037 | } |
| 13038 | return n; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13039 | } |
| 13040 | |
| 13041 | void SourceCodeInfo_Location::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 13042 | if (_has_bits_[0 / 32] & 12u) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13043 | if (has_leading_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13044 | leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13045 | } |
| 13046 | if (has_trailing_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13047 | trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13048 | } |
| 13049 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13050 | path_.Clear(); |
| 13051 | span_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13052 | leading_detached_comments_.Clear(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13053 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13054 | if (_internal_metadata_.have_unknown_fields()) { |
| 13055 | mutable_unknown_fields()->Clear(); |
| 13056 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13057 | } |
| 13058 | |
| 13059 | bool SourceCodeInfo_Location::MergePartialFromCodedStream( |
| 13060 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13061 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13062 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13063 | // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location) |
| 13064 | for (;;) { |
| 13065 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 13066 | tag = p.first; |
| 13067 | if (!p.second) goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13068 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 13069 | // repeated int32 path = 1 [packed = true]; |
| 13070 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13071 | if (tag == 10) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13072 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 13073 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13074 | input, this->mutable_path()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13075 | } else if (tag == 8) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13076 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 13077 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13078 | 1, 10, input, this->mutable_path()))); |
| 13079 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13080 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13081 | } |
| 13082 | if (input->ExpectTag(18)) goto parse_span; |
| 13083 | break; |
| 13084 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13085 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13086 | // repeated int32 span = 2 [packed = true]; |
| 13087 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13088 | if (tag == 18) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13089 | parse_span: |
| 13090 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 13091 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13092 | input, this->mutable_span()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13093 | } else if (tag == 16) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13094 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 13095 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13096 | 1, 18, input, this->mutable_span()))); |
| 13097 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13098 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13099 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13100 | if (input->ExpectTag(26)) goto parse_leading_comments; |
| 13101 | break; |
| 13102 | } |
| 13103 | |
| 13104 | // optional string leading_comments = 3; |
| 13105 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13106 | if (tag == 26) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13107 | parse_leading_comments: |
| 13108 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13109 | input, this->mutable_leading_comments())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13110 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13111 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13112 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13113 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13114 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13115 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13116 | } |
| 13117 | if (input->ExpectTag(34)) goto parse_trailing_comments; |
| 13118 | break; |
| 13119 | } |
| 13120 | |
| 13121 | // optional string trailing_comments = 4; |
| 13122 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13123 | if (tag == 34) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13124 | parse_trailing_comments: |
| 13125 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13126 | input, this->mutable_trailing_comments())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13127 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13128 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13129 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13130 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13131 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13132 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13133 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13134 | if (input->ExpectTag(50)) goto parse_leading_detached_comments; |
| 13135 | break; |
| 13136 | } |
| 13137 | |
| 13138 | // repeated string leading_detached_comments = 6; |
| 13139 | case 6: { |
| 13140 | if (tag == 50) { |
| 13141 | parse_leading_detached_comments: |
| 13142 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13143 | input, this->add_leading_detached_comments())); |
| 13144 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13145 | this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(), |
| 13146 | this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(), |
| 13147 | ::google::protobuf::internal::WireFormat::PARSE, |
| 13148 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
| 13149 | } else { |
| 13150 | goto handle_unusual; |
| 13151 | } |
| 13152 | if (input->ExpectTag(50)) goto parse_leading_detached_comments; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13153 | if (input->ExpectAtEnd()) goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13154 | break; |
| 13155 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13156 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13157 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13158 | handle_unusual: |
| 13159 | if (tag == 0 || |
| 13160 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13161 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13162 | goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13163 | } |
| 13164 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 13165 | input, tag, mutable_unknown_fields())); |
| 13166 | break; |
| 13167 | } |
| 13168 | } |
| 13169 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13170 | success: |
| 13171 | // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13172 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13173 | failure: |
| 13174 | // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location) |
| 13175 | return false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13176 | #undef DO_ |
| 13177 | } |
| 13178 | |
| 13179 | void SourceCodeInfo_Location::SerializeWithCachedSizes( |
| 13180 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13181 | // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13182 | // repeated int32 path = 1 [packed = true]; |
| 13183 | if (this->path_size() > 0) { |
| 13184 | ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 13185 | output->WriteVarint32(_path_cached_byte_size_); |
| 13186 | } |
| 13187 | for (int i = 0; i < this->path_size(); i++) { |
| 13188 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 13189 | this->path(i), output); |
| 13190 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13191 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13192 | // repeated int32 span = 2 [packed = true]; |
| 13193 | if (this->span_size() > 0) { |
| 13194 | ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 13195 | output->WriteVarint32(_span_cached_byte_size_); |
| 13196 | } |
| 13197 | for (int i = 0; i < this->span_size(); i++) { |
| 13198 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 13199 | this->span(i), output); |
| 13200 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13201 | |
| 13202 | // optional string leading_comments = 3; |
| 13203 | if (has_leading_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13204 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13205 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13206 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13207 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13208 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13209 | 3, this->leading_comments(), output); |
| 13210 | } |
| 13211 | |
| 13212 | // optional string trailing_comments = 4; |
| 13213 | if (has_trailing_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13214 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13215 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13216 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13217 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13218 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13219 | 4, this->trailing_comments(), output); |
| 13220 | } |
| 13221 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13222 | // repeated string leading_detached_comments = 6; |
| 13223 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
| 13224 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13225 | this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), |
| 13226 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 13227 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
| 13228 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 13229 | 6, this->leading_detached_comments(i), output); |
| 13230 | } |
| 13231 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13232 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13233 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 13234 | unknown_fields(), output); |
| 13235 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13236 | // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13237 | } |
| 13238 | |
| 13239 | ::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray( |
| 13240 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13241 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13242 | // repeated int32 path = 1 [packed = true]; |
| 13243 | if (this->path_size() > 0) { |
| 13244 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 13245 | 1, |
| 13246 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 13247 | target); |
| 13248 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 13249 | _path_cached_byte_size_, target); |
| 13250 | } |
| 13251 | for (int i = 0; i < this->path_size(); i++) { |
| 13252 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13253 | WriteInt32NoTagToArray(this->path(i), target); |
| 13254 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13255 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13256 | // repeated int32 span = 2 [packed = true]; |
| 13257 | if (this->span_size() > 0) { |
| 13258 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 13259 | 2, |
| 13260 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 13261 | target); |
| 13262 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 13263 | _span_cached_byte_size_, target); |
| 13264 | } |
| 13265 | for (int i = 0; i < this->span_size(); i++) { |
| 13266 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13267 | WriteInt32NoTagToArray(this->span(i), target); |
| 13268 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13269 | |
| 13270 | // optional string leading_comments = 3; |
| 13271 | if (has_leading_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13272 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13273 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13274 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13275 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13276 | target = |
| 13277 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 13278 | 3, this->leading_comments(), target); |
| 13279 | } |
| 13280 | |
| 13281 | // optional string trailing_comments = 4; |
| 13282 | if (has_trailing_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13283 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13284 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13285 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13286 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13287 | target = |
| 13288 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 13289 | 4, this->trailing_comments(), target); |
| 13290 | } |
| 13291 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13292 | // repeated string leading_detached_comments = 6; |
| 13293 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
| 13294 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13295 | this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), |
| 13296 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 13297 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
| 13298 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13299 | WriteStringToArray(6, this->leading_detached_comments(i), target); |
| 13300 | } |
| 13301 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13302 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13303 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 13304 | unknown_fields(), target); |
| 13305 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13306 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13307 | return target; |
| 13308 | } |
| 13309 | |
| 13310 | int SourceCodeInfo_Location::ByteSize() const { |
| 13311 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13312 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 13313 | if (_has_bits_[2 / 32] & 12u) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13314 | // optional string leading_comments = 3; |
| 13315 | if (has_leading_comments()) { |
| 13316 | total_size += 1 + |
| 13317 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13318 | this->leading_comments()); |
| 13319 | } |
| 13320 | |
| 13321 | // optional string trailing_comments = 4; |
| 13322 | if (has_trailing_comments()) { |
| 13323 | total_size += 1 + |
| 13324 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13325 | this->trailing_comments()); |
| 13326 | } |
| 13327 | |
| 13328 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13329 | // repeated int32 path = 1 [packed = true]; |
| 13330 | { |
| 13331 | int data_size = 0; |
| 13332 | for (int i = 0; i < this->path_size(); i++) { |
| 13333 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 13334 | Int32Size(this->path(i)); |
| 13335 | } |
| 13336 | if (data_size > 0) { |
| 13337 | total_size += 1 + |
| 13338 | ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); |
| 13339 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13340 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13341 | _path_cached_byte_size_ = data_size; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13342 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13343 | total_size += data_size; |
| 13344 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13345 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13346 | // repeated int32 span = 2 [packed = true]; |
| 13347 | { |
| 13348 | int data_size = 0; |
| 13349 | for (int i = 0; i < this->span_size(); i++) { |
| 13350 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 13351 | Int32Size(this->span(i)); |
| 13352 | } |
| 13353 | if (data_size > 0) { |
| 13354 | total_size += 1 + |
| 13355 | ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); |
| 13356 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13357 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13358 | _span_cached_byte_size_ = data_size; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13359 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13360 | total_size += data_size; |
| 13361 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13362 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13363 | // repeated string leading_detached_comments = 6; |
| 13364 | total_size += 1 * this->leading_detached_comments_size(); |
| 13365 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
| 13366 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13367 | this->leading_detached_comments(i)); |
| 13368 | } |
| 13369 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13370 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13371 | total_size += |
| 13372 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 13373 | unknown_fields()); |
| 13374 | } |
| 13375 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13376 | _cached_size_ = total_size; |
| 13377 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13378 | return total_size; |
| 13379 | } |
| 13380 | |
| 13381 | void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13382 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13383 | const SourceCodeInfo_Location* source = |
| 13384 | ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo_Location>( |
| 13385 | &from); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13386 | if (source == NULL) { |
| 13387 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 13388 | } else { |
| 13389 | MergeFrom(*source); |
| 13390 | } |
| 13391 | } |
| 13392 | |
| 13393 | void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13394 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13395 | path_.MergeFrom(from.path_); |
| 13396 | span_.MergeFrom(from.span_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13397 | leading_detached_comments_.MergeFrom(from.leading_detached_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13398 | if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) { |
| 13399 | if (from.has_leading_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13400 | set_has_leading_comments(); |
| 13401 | leading_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13402 | } |
| 13403 | if (from.has_trailing_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13404 | set_has_trailing_comments(); |
| 13405 | trailing_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13406 | } |
| 13407 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13408 | if (from._internal_metadata_.have_unknown_fields()) { |
| 13409 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 13410 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13411 | } |
| 13412 | |
| 13413 | void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) { |
| 13414 | if (&from == this) return; |
| 13415 | Clear(); |
| 13416 | MergeFrom(from); |
| 13417 | } |
| 13418 | |
| 13419 | void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) { |
| 13420 | if (&from == this) return; |
| 13421 | Clear(); |
| 13422 | MergeFrom(from); |
| 13423 | } |
| 13424 | |
| 13425 | bool SourceCodeInfo_Location::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13426 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13427 | return true; |
| 13428 | } |
| 13429 | |
| 13430 | void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13431 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13432 | InternalSwap(other); |
| 13433 | } |
| 13434 | void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { |
| 13435 | path_.UnsafeArenaSwap(&other->path_); |
| 13436 | span_.UnsafeArenaSwap(&other->span_); |
| 13437 | leading_comments_.Swap(&other->leading_comments_); |
| 13438 | trailing_comments_.Swap(&other->trailing_comments_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13439 | leading_detached_comments_.UnsafeArenaSwap(&other->leading_detached_comments_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13440 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 13441 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 13442 | std::swap(_cached_size_, other->_cached_size_); |
| 13443 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13444 | |
| 13445 | ::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const { |
| 13446 | protobuf_AssignDescriptorsOnce(); |
| 13447 | ::google::protobuf::Metadata metadata; |
| 13448 | metadata.descriptor = SourceCodeInfo_Location_descriptor_; |
| 13449 | metadata.reflection = SourceCodeInfo_Location_reflection_; |
| 13450 | return metadata; |
| 13451 | } |
| 13452 | |
| 13453 | |
| 13454 | // ------------------------------------------------------------------- |
| 13455 | |
| 13456 | #ifndef _MSC_VER |
| 13457 | const int SourceCodeInfo::kLocationFieldNumber; |
| 13458 | #endif // !_MSC_VER |
| 13459 | |
| 13460 | SourceCodeInfo::SourceCodeInfo() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13461 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13462 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13463 | // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13464 | } |
| 13465 | |
| 13466 | void SourceCodeInfo::InitAsDefaultInstance() { |
| 13467 | } |
| 13468 | |
| 13469 | SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13470 | : ::google::protobuf::Message(), |
| 13471 | _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13472 | SharedCtor(); |
| 13473 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13474 | // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13475 | } |
| 13476 | |
| 13477 | void SourceCodeInfo::SharedCtor() { |
| 13478 | _cached_size_ = 0; |
| 13479 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 13480 | } |
| 13481 | |
| 13482 | SourceCodeInfo::~SourceCodeInfo() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13483 | // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13484 | SharedDtor(); |
| 13485 | } |
| 13486 | |
| 13487 | void SourceCodeInfo::SharedDtor() { |
| 13488 | if (this != default_instance_) { |
| 13489 | } |
| 13490 | } |
| 13491 | |
| 13492 | void SourceCodeInfo::SetCachedSize(int size) const { |
| 13493 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13494 | _cached_size_ = size; |
| 13495 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13496 | } |
| 13497 | const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() { |
| 13498 | protobuf_AssignDescriptorsOnce(); |
| 13499 | return SourceCodeInfo_descriptor_; |
| 13500 | } |
| 13501 | |
| 13502 | const SourceCodeInfo& SourceCodeInfo::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 13503 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 13504 | return *default_instance_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13505 | } |
| 13506 | |
| 13507 | SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL; |
| 13508 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13509 | SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13510 | SourceCodeInfo* n = new SourceCodeInfo; |
| 13511 | if (arena != NULL) { |
| 13512 | arena->Own(n); |
| 13513 | } |
| 13514 | return n; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13515 | } |
| 13516 | |
| 13517 | void SourceCodeInfo::Clear() { |
| 13518 | location_.Clear(); |
| 13519 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13520 | if (_internal_metadata_.have_unknown_fields()) { |
| 13521 | mutable_unknown_fields()->Clear(); |
| 13522 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13523 | } |
| 13524 | |
| 13525 | bool SourceCodeInfo::MergePartialFromCodedStream( |
| 13526 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13527 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13528 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13529 | // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo) |
| 13530 | for (;;) { |
| 13531 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 13532 | tag = p.first; |
| 13533 | if (!p.second) goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13534 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 13535 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
| 13536 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13537 | if (tag == 10) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13538 | DO_(input->IncrementRecursionDepth()); |
| 13539 | parse_loop_location: |
| 13540 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13541 | input, add_location())); |
| 13542 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13543 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13544 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13545 | if (input->ExpectTag(10)) goto parse_loop_location; |
| 13546 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13547 | if (input->ExpectAtEnd()) goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13548 | break; |
| 13549 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13550 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13551 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13552 | handle_unusual: |
| 13553 | if (tag == 0 || |
| 13554 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13555 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13556 | goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13557 | } |
| 13558 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 13559 | input, tag, mutable_unknown_fields())); |
| 13560 | break; |
| 13561 | } |
| 13562 | } |
| 13563 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13564 | success: |
| 13565 | // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13566 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13567 | failure: |
| 13568 | // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo) |
| 13569 | return false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13570 | #undef DO_ |
| 13571 | } |
| 13572 | |
| 13573 | void SourceCodeInfo::SerializeWithCachedSizes( |
| 13574 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13575 | // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13576 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13577 | for (unsigned int i = 0, n = this->location_size(); i < n; i++) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13578 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 13579 | 1, this->location(i), output); |
| 13580 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13581 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13582 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13583 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 13584 | unknown_fields(), output); |
| 13585 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13586 | // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13587 | } |
| 13588 | |
| 13589 | ::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray( |
| 13590 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13591 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13592 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13593 | for (unsigned int i = 0, n = this->location_size(); i < n; i++) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13594 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13595 | WriteMessageNoVirtualToArray( |
| 13596 | 1, this->location(i), target); |
| 13597 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13598 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13599 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13600 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 13601 | unknown_fields(), target); |
| 13602 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13603 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13604 | return target; |
| 13605 | } |
| 13606 | |
| 13607 | int SourceCodeInfo::ByteSize() const { |
| 13608 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13609 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13610 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
| 13611 | total_size += 1 * this->location_size(); |
| 13612 | for (int i = 0; i < this->location_size(); i++) { |
| 13613 | total_size += |
| 13614 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 13615 | this->location(i)); |
| 13616 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13617 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13618 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13619 | total_size += |
| 13620 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 13621 | unknown_fields()); |
| 13622 | } |
| 13623 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13624 | _cached_size_ = total_size; |
| 13625 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13626 | return total_size; |
| 13627 | } |
| 13628 | |
| 13629 | void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13630 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13631 | const SourceCodeInfo* source = |
| 13632 | ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo>( |
| 13633 | &from); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13634 | if (source == NULL) { |
| 13635 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 13636 | } else { |
| 13637 | MergeFrom(*source); |
| 13638 | } |
| 13639 | } |
| 13640 | |
| 13641 | void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13642 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13643 | location_.MergeFrom(from.location_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13644 | if (from._internal_metadata_.have_unknown_fields()) { |
| 13645 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 13646 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13647 | } |
| 13648 | |
| 13649 | void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { |
| 13650 | if (&from == this) return; |
| 13651 | Clear(); |
| 13652 | MergeFrom(from); |
| 13653 | } |
| 13654 | |
| 13655 | void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) { |
| 13656 | if (&from == this) return; |
| 13657 | Clear(); |
| 13658 | MergeFrom(from); |
| 13659 | } |
| 13660 | |
| 13661 | bool SourceCodeInfo::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13662 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13663 | return true; |
| 13664 | } |
| 13665 | |
| 13666 | void SourceCodeInfo::Swap(SourceCodeInfo* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13667 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13668 | InternalSwap(other); |
| 13669 | } |
| 13670 | void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { |
| 13671 | location_.UnsafeArenaSwap(&other->location_); |
| 13672 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 13673 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 13674 | std::swap(_cached_size_, other->_cached_size_); |
| 13675 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13676 | |
| 13677 | ::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const { |
| 13678 | protobuf_AssignDescriptorsOnce(); |
| 13679 | ::google::protobuf::Metadata metadata; |
| 13680 | metadata.descriptor = SourceCodeInfo_descriptor_; |
| 13681 | metadata.reflection = SourceCodeInfo_reflection_; |
| 13682 | return metadata; |
| 13683 | } |
| 13684 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13685 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 13686 | // SourceCodeInfo_Location |
| 13687 | |
| 13688 | // repeated int32 path = 1 [packed = true]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13689 | int SourceCodeInfo_Location::path_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13690 | return path_.size(); |
| 13691 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13692 | void SourceCodeInfo_Location::clear_path() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13693 | path_.Clear(); |
| 13694 | } |
| 13695 | ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const { |
| 13696 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path) |
| 13697 | return path_.Get(index); |
| 13698 | } |
| 13699 | void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) { |
| 13700 | path_.Set(index, value); |
| 13701 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path) |
| 13702 | } |
| 13703 | void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) { |
| 13704 | path_.Add(value); |
| 13705 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path) |
| 13706 | } |
| 13707 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 13708 | SourceCodeInfo_Location::path() const { |
| 13709 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path) |
| 13710 | return path_; |
| 13711 | } |
| 13712 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 13713 | SourceCodeInfo_Location::mutable_path() { |
| 13714 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path) |
| 13715 | return &path_; |
| 13716 | } |
| 13717 | |
| 13718 | // repeated int32 span = 2 [packed = true]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13719 | int SourceCodeInfo_Location::span_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13720 | return span_.size(); |
| 13721 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13722 | void SourceCodeInfo_Location::clear_span() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13723 | span_.Clear(); |
| 13724 | } |
| 13725 | ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const { |
| 13726 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span) |
| 13727 | return span_.Get(index); |
| 13728 | } |
| 13729 | void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) { |
| 13730 | span_.Set(index, value); |
| 13731 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span) |
| 13732 | } |
| 13733 | void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) { |
| 13734 | span_.Add(value); |
| 13735 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span) |
| 13736 | } |
| 13737 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 13738 | SourceCodeInfo_Location::span() const { |
| 13739 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span) |
| 13740 | return span_; |
| 13741 | } |
| 13742 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 13743 | SourceCodeInfo_Location::mutable_span() { |
| 13744 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span) |
| 13745 | return &span_; |
| 13746 | } |
| 13747 | |
| 13748 | // optional string leading_comments = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13749 | bool SourceCodeInfo_Location::has_leading_comments() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13750 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 13751 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13752 | void SourceCodeInfo_Location::set_has_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13753 | _has_bits_[0] |= 0x00000004u; |
| 13754 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13755 | void SourceCodeInfo_Location::clear_has_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13756 | _has_bits_[0] &= ~0x00000004u; |
| 13757 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13758 | void SourceCodeInfo_Location::clear_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13759 | leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13760 | clear_has_leading_comments(); |
| 13761 | } |
| 13762 | const ::std::string& SourceCodeInfo_Location::leading_comments() const { |
| 13763 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13764 | return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13765 | } |
| 13766 | void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) { |
| 13767 | set_has_leading_comments(); |
| 13768 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 13769 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13770 | } |
| 13771 | void SourceCodeInfo_Location::set_leading_comments(const char* value) { |
| 13772 | set_has_leading_comments(); |
| 13773 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 13774 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13775 | } |
| 13776 | void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) { |
| 13777 | set_has_leading_comments(); |
| 13778 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13779 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13780 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13781 | } |
| 13782 | ::std::string* SourceCodeInfo_Location::mutable_leading_comments() { |
| 13783 | set_has_leading_comments(); |
| 13784 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13785 | return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13786 | } |
| 13787 | ::std::string* SourceCodeInfo_Location::release_leading_comments() { |
| 13788 | clear_has_leading_comments(); |
| 13789 | return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13790 | } |
| 13791 | void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) { |
| 13792 | if (leading_comments != NULL) { |
| 13793 | set_has_leading_comments(); |
| 13794 | } else { |
| 13795 | clear_has_leading_comments(); |
| 13796 | } |
| 13797 | leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments); |
| 13798 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13799 | } |
| 13800 | |
| 13801 | // optional string trailing_comments = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13802 | bool SourceCodeInfo_Location::has_trailing_comments() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13803 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 13804 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13805 | void SourceCodeInfo_Location::set_has_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13806 | _has_bits_[0] |= 0x00000008u; |
| 13807 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13808 | void SourceCodeInfo_Location::clear_has_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13809 | _has_bits_[0] &= ~0x00000008u; |
| 13810 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13811 | void SourceCodeInfo_Location::clear_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13812 | trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13813 | clear_has_trailing_comments(); |
| 13814 | } |
| 13815 | const ::std::string& SourceCodeInfo_Location::trailing_comments() const { |
| 13816 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13817 | return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13818 | } |
| 13819 | void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) { |
| 13820 | set_has_trailing_comments(); |
| 13821 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 13822 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13823 | } |
| 13824 | void SourceCodeInfo_Location::set_trailing_comments(const char* value) { |
| 13825 | set_has_trailing_comments(); |
| 13826 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 13827 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13828 | } |
| 13829 | void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) { |
| 13830 | set_has_trailing_comments(); |
| 13831 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13832 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13833 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13834 | } |
| 13835 | ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() { |
| 13836 | set_has_trailing_comments(); |
| 13837 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13838 | return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13839 | } |
| 13840 | ::std::string* SourceCodeInfo_Location::release_trailing_comments() { |
| 13841 | clear_has_trailing_comments(); |
| 13842 | return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13843 | } |
| 13844 | void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) { |
| 13845 | if (trailing_comments != NULL) { |
| 13846 | set_has_trailing_comments(); |
| 13847 | } else { |
| 13848 | clear_has_trailing_comments(); |
| 13849 | } |
| 13850 | trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments); |
| 13851 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13852 | } |
| 13853 | |
| 13854 | // repeated string leading_detached_comments = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13855 | int SourceCodeInfo_Location::leading_detached_comments_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13856 | return leading_detached_comments_.size(); |
| 13857 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13858 | void SourceCodeInfo_Location::clear_leading_detached_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13859 | leading_detached_comments_.Clear(); |
| 13860 | } |
| 13861 | const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { |
| 13862 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13863 | return leading_detached_comments_.Get(index); |
| 13864 | } |
| 13865 | ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { |
| 13866 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13867 | return leading_detached_comments_.Mutable(index); |
| 13868 | } |
| 13869 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) { |
| 13870 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13871 | leading_detached_comments_.Mutable(index)->assign(value); |
| 13872 | } |
| 13873 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) { |
| 13874 | leading_detached_comments_.Mutable(index)->assign(value); |
| 13875 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13876 | } |
| 13877 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) { |
| 13878 | leading_detached_comments_.Mutable(index)->assign( |
| 13879 | reinterpret_cast<const char*>(value), size); |
| 13880 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13881 | } |
| 13882 | ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() { |
| 13883 | return leading_detached_comments_.Add(); |
| 13884 | } |
| 13885 | void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) { |
| 13886 | leading_detached_comments_.Add()->assign(value); |
| 13887 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13888 | } |
| 13889 | void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) { |
| 13890 | leading_detached_comments_.Add()->assign(value); |
| 13891 | // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13892 | } |
| 13893 | void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) { |
| 13894 | leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 13895 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13896 | } |
| 13897 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 13898 | SourceCodeInfo_Location::leading_detached_comments() const { |
| 13899 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13900 | return leading_detached_comments_; |
| 13901 | } |
| 13902 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 13903 | SourceCodeInfo_Location::mutable_leading_detached_comments() { |
| 13904 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13905 | return &leading_detached_comments_; |
| 13906 | } |
| 13907 | |
| 13908 | // ------------------------------------------------------------------- |
| 13909 | |
| 13910 | // SourceCodeInfo |
| 13911 | |
| 13912 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13913 | int SourceCodeInfo::location_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13914 | return location_.size(); |
| 13915 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13916 | void SourceCodeInfo::clear_location() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13917 | location_.Clear(); |
| 13918 | } |
| 13919 | const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const { |
| 13920 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location) |
| 13921 | return location_.Get(index); |
| 13922 | } |
| 13923 | ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) { |
| 13924 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location) |
| 13925 | return location_.Mutable(index); |
| 13926 | } |
| 13927 | ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() { |
| 13928 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location) |
| 13929 | return location_.Add(); |
| 13930 | } |
| 13931 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& |
| 13932 | SourceCodeInfo::location() const { |
| 13933 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location) |
| 13934 | return location_; |
| 13935 | } |
| 13936 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* |
| 13937 | SourceCodeInfo::mutable_location() { |
| 13938 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location) |
| 13939 | return &location_; |
| 13940 | } |
| 13941 | |
| 13942 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13943 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 13944 | // @@protoc_insertion_point(namespace_scope) |
| 13945 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 13946 | } // namespace protobuf |
| 13947 | } // namespace google |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 13948 | |
| 13949 | // @@protoc_insertion_point(global_scope) |