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 |
Bo Yang | 1f0286a | 2015-12-04 13:18:44 -0800 | [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> |
Feng Xiao | e841bac | 2015-12-11 17:09:20 -0800 | [diff] [blame] | 10 | #include <google/protobuf/stubs/port.h> |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11 | #include <google/protobuf/stubs/once.h> |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 12 | #include <google/protobuf/io/coded_stream.h> |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 13 | #include <google/protobuf/wire_format_lite_inl.h> |
| 14 | #include <google/protobuf/descriptor.h> |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 15 | #include <google/protobuf/generated_message_reflection.h> |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 16 | #include <google/protobuf/reflection_ops.h> |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 17 | #include <google/protobuf/wire_format.h> |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 18 | // @@protoc_insertion_point(includes) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 19 | |
| 20 | namespace google { |
| 21 | namespace protobuf { |
| 22 | |
| 23 | namespace { |
| 24 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 25 | const ::google::protobuf::Descriptor* FileDescriptorSet_descriptor_ = NULL; |
| 26 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 27 | FileDescriptorSet_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 28 | const ::google::protobuf::Descriptor* FileDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 29 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 30 | FileDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 31 | const ::google::protobuf::Descriptor* DescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 32 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 33 | DescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 34 | const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 35 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 36 | DescriptorProto_ExtensionRange_reflection_ = NULL; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 37 | const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange_descriptor_ = NULL; |
| 38 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 39 | DescriptorProto_ReservedRange_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 40 | const ::google::protobuf::Descriptor* FieldDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 41 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 42 | FieldDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 43 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor_ = NULL; |
| 44 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor_ = NULL; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 45 | const ::google::protobuf::Descriptor* OneofDescriptorProto_descriptor_ = NULL; |
| 46 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 47 | OneofDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 48 | const ::google::protobuf::Descriptor* EnumDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 49 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 50 | EnumDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 51 | const ::google::protobuf::Descriptor* EnumValueDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 52 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 53 | EnumValueDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 54 | const ::google::protobuf::Descriptor* ServiceDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 55 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 56 | ServiceDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 57 | const ::google::protobuf::Descriptor* MethodDescriptorProto_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 58 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 59 | MethodDescriptorProto_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 60 | const ::google::protobuf::Descriptor* FileOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 61 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 62 | FileOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 63 | const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor_ = NULL; |
| 64 | const ::google::protobuf::Descriptor* MessageOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 65 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 66 | MessageOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 67 | const ::google::protobuf::Descriptor* FieldOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 68 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 69 | FieldOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 70 | const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor_ = NULL; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 71 | const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 72 | const ::google::protobuf::Descriptor* EnumOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 73 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 74 | EnumOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 75 | const ::google::protobuf::Descriptor* EnumValueOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 76 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 77 | EnumValueOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 78 | const ::google::protobuf::Descriptor* ServiceOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 79 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 80 | ServiceOptions_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 81 | const ::google::protobuf::Descriptor* MethodOptions_descriptor_ = NULL; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 82 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 83 | MethodOptions_reflection_ = NULL; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 84 | const ::google::protobuf::Descriptor* UninterpretedOption_descriptor_ = NULL; |
| 85 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 86 | UninterpretedOption_reflection_ = NULL; |
| 87 | const ::google::protobuf::Descriptor* UninterpretedOption_NamePart_descriptor_ = NULL; |
| 88 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 89 | UninterpretedOption_NamePart_reflection_ = NULL; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 90 | const ::google::protobuf::Descriptor* SourceCodeInfo_descriptor_ = NULL; |
| 91 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 92 | SourceCodeInfo_reflection_ = NULL; |
| 93 | const ::google::protobuf::Descriptor* SourceCodeInfo_Location_descriptor_ = NULL; |
| 94 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 95 | SourceCodeInfo_Location_reflection_ = NULL; |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 96 | const ::google::protobuf::Descriptor* GeneratedCodeInfo_descriptor_ = NULL; |
| 97 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 98 | GeneratedCodeInfo_reflection_ = NULL; |
| 99 | const ::google::protobuf::Descriptor* GeneratedCodeInfo_Annotation_descriptor_ = NULL; |
| 100 | const ::google::protobuf::internal::GeneratedMessageReflection* |
| 101 | GeneratedCodeInfo_Annotation_reflection_ = NULL; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 102 | |
| 103 | } // namespace |
| 104 | |
| 105 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 106 | void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
| 107 | protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 108 | const ::google::protobuf::FileDescriptor* file = |
| 109 | ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| 110 | "google/protobuf/descriptor.proto"); |
| 111 | GOOGLE_CHECK(file != NULL); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 112 | FileDescriptorSet_descriptor_ = file->message_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 113 | static const int FileDescriptorSet_offsets_[1] = { |
| 114 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, file_), |
| 115 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 116 | FileDescriptorSet_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 117 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 118 | FileDescriptorSet_descriptor_, |
| 119 | FileDescriptorSet::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 120 | FileDescriptorSet_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 121 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 122 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 123 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 124 | sizeof(FileDescriptorSet), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 125 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorSet, _internal_metadata_), |
| 126 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 127 | FileDescriptorProto_descriptor_ = file->message_type(1); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 128 | static const int FileDescriptorProto_offsets_[12] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 129 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, name_), |
| 130 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, package_), |
| 131 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, dependency_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 132 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, public_dependency_), |
| 133 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, weak_dependency_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 134 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, message_type_), |
| 135 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, enum_type_), |
| 136 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, service_), |
| 137 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, extension_), |
| 138 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, options_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 139 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, source_code_info_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 140 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, syntax_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 141 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 142 | FileDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 143 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 144 | FileDescriptorProto_descriptor_, |
| 145 | FileDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 146 | FileDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 147 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 148 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 149 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 150 | sizeof(FileDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 151 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorProto, _internal_metadata_), |
| 152 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 153 | DescriptorProto_descriptor_ = file->message_type(2); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 154 | static const int DescriptorProto_offsets_[10] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 155 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, name_), |
| 156 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, field_), |
| 157 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_), |
| 158 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, nested_type_), |
| 159 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, enum_type_), |
| 160 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, extension_range_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 161 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, oneof_decl_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 162 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, options_), |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 163 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_range_), |
| 164 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, reserved_name_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 165 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 166 | DescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 167 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 168 | DescriptorProto_descriptor_, |
| 169 | DescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 170 | DescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 171 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 172 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 173 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 174 | sizeof(DescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 175 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto, _internal_metadata_), |
| 176 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 177 | DescriptorProto_ExtensionRange_descriptor_ = DescriptorProto_descriptor_->nested_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 178 | static const int DescriptorProto_ExtensionRange_offsets_[2] = { |
| 179 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, start_), |
| 180 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, end_), |
| 181 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 182 | DescriptorProto_ExtensionRange_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 183 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 184 | DescriptorProto_ExtensionRange_descriptor_, |
| 185 | DescriptorProto_ExtensionRange::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 186 | DescriptorProto_ExtensionRange_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 187 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 188 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 189 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 190 | sizeof(DescriptorProto_ExtensionRange), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 191 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ExtensionRange, _internal_metadata_), |
| 192 | -1); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 193 | DescriptorProto_ReservedRange_descriptor_ = DescriptorProto_descriptor_->nested_type(1); |
| 194 | static const int DescriptorProto_ReservedRange_offsets_[2] = { |
| 195 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, start_), |
| 196 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, end_), |
| 197 | }; |
| 198 | DescriptorProto_ReservedRange_reflection_ = |
| 199 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| 200 | DescriptorProto_ReservedRange_descriptor_, |
| 201 | DescriptorProto_ReservedRange::default_instance_, |
| 202 | DescriptorProto_ReservedRange_offsets_, |
| 203 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _has_bits_[0]), |
| 204 | -1, |
| 205 | -1, |
| 206 | sizeof(DescriptorProto_ReservedRange), |
| 207 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorProto_ReservedRange, _internal_metadata_), |
| 208 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 209 | FieldDescriptorProto_descriptor_ = file->message_type(3); |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 210 | static const int FieldDescriptorProto_offsets_[10] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 211 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, name_), |
| 212 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, number_), |
| 213 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, label_), |
| 214 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_), |
| 215 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, type_name_), |
| 216 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, extendee_), |
| 217 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, default_value_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 218 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, oneof_index_), |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 219 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, json_name_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 220 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, options_), |
| 221 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 222 | FieldDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 223 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 224 | FieldDescriptorProto_descriptor_, |
| 225 | FieldDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 226 | FieldDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 227 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 228 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 229 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 230 | sizeof(FieldDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 231 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldDescriptorProto, _internal_metadata_), |
| 232 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 233 | FieldDescriptorProto_Type_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(0); |
| 234 | FieldDescriptorProto_Label_descriptor_ = FieldDescriptorProto_descriptor_->enum_type(1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 235 | OneofDescriptorProto_descriptor_ = file->message_type(4); |
| 236 | static const int OneofDescriptorProto_offsets_[1] = { |
| 237 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, name_), |
| 238 | }; |
| 239 | OneofDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 240 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 241 | OneofDescriptorProto_descriptor_, |
| 242 | OneofDescriptorProto::default_instance_, |
| 243 | OneofDescriptorProto_offsets_, |
| 244 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 245 | -1, |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 246 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 247 | sizeof(OneofDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 248 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(OneofDescriptorProto, _internal_metadata_), |
| 249 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 250 | EnumDescriptorProto_descriptor_ = file->message_type(5); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 251 | static const int EnumDescriptorProto_offsets_[3] = { |
| 252 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, name_), |
| 253 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, value_), |
| 254 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, options_), |
| 255 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 256 | EnumDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 257 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 258 | EnumDescriptorProto_descriptor_, |
| 259 | EnumDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 260 | EnumDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 261 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 262 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 263 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 264 | sizeof(EnumDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 265 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumDescriptorProto, _internal_metadata_), |
| 266 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 267 | EnumValueDescriptorProto_descriptor_ = file->message_type(6); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 268 | static const int EnumValueDescriptorProto_offsets_[3] = { |
| 269 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, name_), |
| 270 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, number_), |
| 271 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, options_), |
| 272 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 273 | EnumValueDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 274 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 275 | EnumValueDescriptorProto_descriptor_, |
| 276 | EnumValueDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 277 | EnumValueDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 278 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 279 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 280 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 281 | sizeof(EnumValueDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 282 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueDescriptorProto, _internal_metadata_), |
| 283 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 284 | ServiceDescriptorProto_descriptor_ = file->message_type(7); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 285 | static const int ServiceDescriptorProto_offsets_[3] = { |
| 286 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, name_), |
| 287 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, method_), |
| 288 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, options_), |
| 289 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 290 | ServiceDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 291 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 292 | ServiceDescriptorProto_descriptor_, |
| 293 | ServiceDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 294 | ServiceDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 295 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 296 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 297 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 298 | sizeof(ServiceDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 299 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceDescriptorProto, _internal_metadata_), |
| 300 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 301 | MethodDescriptorProto_descriptor_ = file->message_type(8); |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 302 | static const int MethodDescriptorProto_offsets_[6] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 303 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, name_), |
| 304 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, input_type_), |
| 305 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, output_type_), |
| 306 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, options_), |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 307 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, client_streaming_), |
| 308 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, server_streaming_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 309 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 310 | MethodDescriptorProto_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 311 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 312 | MethodDescriptorProto_descriptor_, |
| 313 | MethodDescriptorProto::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 314 | MethodDescriptorProto_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 315 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 316 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 317 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 318 | sizeof(MethodDescriptorProto), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 319 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodDescriptorProto, _internal_metadata_), |
| 320 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 321 | FileOptions_descriptor_ = file->message_type(9); |
Jisi Liu | 3b3c8ab | 2016-03-30 11:39:59 -0700 | [diff] [blame] | 322 | static const int FileOptions_offsets_[15] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 323 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_package_), |
| 324 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_outer_classname_), |
| 325 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_multiple_files_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 326 | 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] | 327 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_string_check_utf8_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 328 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, optimize_for_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 329 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, go_package_), |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 330 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_generic_services_), |
| 331 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, java_generic_services_), |
| 332 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, py_generic_services_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 333 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, deprecated_), |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 334 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, cc_enable_arenas_), |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 335 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, objc_class_prefix_), |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 336 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, csharp_namespace_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 337 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, uninterpreted_option_), |
| 338 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 339 | FileOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 340 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 341 | FileOptions_descriptor_, |
| 342 | FileOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 343 | FileOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 344 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 345 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 346 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 347 | sizeof(FileOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 348 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileOptions, _internal_metadata_), |
| 349 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 350 | FileOptions_OptimizeMode_descriptor_ = FileOptions_descriptor_->enum_type(0); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 351 | MessageOptions_descriptor_ = file->message_type(10); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 352 | static const int MessageOptions_offsets_[5] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 353 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, message_set_wire_format_), |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 354 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, no_standard_descriptor_accessor_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 355 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, deprecated_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 356 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, map_entry_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 357 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, uninterpreted_option_), |
| 358 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 359 | MessageOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 360 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 361 | MessageOptions_descriptor_, |
| 362 | MessageOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 363 | MessageOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 364 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 365 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 366 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 367 | sizeof(MessageOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 368 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MessageOptions, _internal_metadata_), |
| 369 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 370 | FieldOptions_descriptor_ = file->message_type(11); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 371 | static const int FieldOptions_offsets_[7] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 372 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, ctype_), |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 373 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, packed_), |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 374 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, jstype_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 375 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, lazy_), |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 376 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, deprecated_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 377 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, weak_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 378 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, uninterpreted_option_), |
| 379 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 380 | FieldOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 381 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 382 | FieldOptions_descriptor_, |
| 383 | FieldOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 384 | FieldOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 385 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 386 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 387 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 388 | sizeof(FieldOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 389 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldOptions, _internal_metadata_), |
| 390 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 391 | FieldOptions_CType_descriptor_ = FieldOptions_descriptor_->enum_type(0); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 392 | FieldOptions_JSType_descriptor_ = FieldOptions_descriptor_->enum_type(1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 393 | EnumOptions_descriptor_ = file->message_type(12); |
| 394 | static const int EnumOptions_offsets_[3] = { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 395 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, allow_alias_), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 396 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 397 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, uninterpreted_option_), |
| 398 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 399 | EnumOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 400 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 401 | EnumOptions_descriptor_, |
| 402 | EnumOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 403 | EnumOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 404 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 405 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 406 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 407 | sizeof(EnumOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 408 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumOptions, _internal_metadata_), |
| 409 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 410 | EnumValueOptions_descriptor_ = file->message_type(13); |
| 411 | static const int EnumValueOptions_offsets_[2] = { |
| 412 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 413 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, uninterpreted_option_), |
| 414 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 415 | EnumValueOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 416 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 417 | EnumValueOptions_descriptor_, |
| 418 | EnumValueOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 419 | EnumValueOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 420 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 421 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 422 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 423 | sizeof(EnumValueOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 424 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EnumValueOptions, _internal_metadata_), |
| 425 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 426 | ServiceOptions_descriptor_ = file->message_type(14); |
| 427 | static const int ServiceOptions_offsets_[2] = { |
| 428 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 429 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, uninterpreted_option_), |
| 430 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 431 | ServiceOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 432 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 433 | ServiceOptions_descriptor_, |
| 434 | ServiceOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 435 | ServiceOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 436 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 437 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 438 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 439 | sizeof(ServiceOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 440 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceOptions, _internal_metadata_), |
| 441 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 442 | MethodOptions_descriptor_ = file->message_type(15); |
| 443 | static const int MethodOptions_offsets_[2] = { |
| 444 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, deprecated_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 445 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, uninterpreted_option_), |
| 446 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 447 | MethodOptions_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 448 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 449 | MethodOptions_descriptor_, |
| 450 | MethodOptions::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 451 | MethodOptions_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 452 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 453 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 454 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _extensions_), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 455 | sizeof(MethodOptions), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 456 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MethodOptions, _internal_metadata_), |
| 457 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 458 | UninterpretedOption_descriptor_ = file->message_type(16); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 459 | static const int UninterpretedOption_offsets_[7] = { |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 460 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, name_), |
| 461 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, identifier_value_), |
| 462 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, positive_int_value_), |
| 463 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, negative_int_value_), |
| 464 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, double_value_), |
| 465 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, string_value_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 466 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, aggregate_value_), |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 467 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 468 | UninterpretedOption_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 469 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 470 | UninterpretedOption_descriptor_, |
| 471 | UninterpretedOption::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 472 | UninterpretedOption_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 473 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 474 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 475 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 476 | sizeof(UninterpretedOption), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 477 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption, _internal_metadata_), |
| 478 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 479 | UninterpretedOption_NamePart_descriptor_ = UninterpretedOption_descriptor_->nested_type(0); |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 480 | static const int UninterpretedOption_NamePart_offsets_[2] = { |
| 481 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, name_part_), |
| 482 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, is_extension_), |
| 483 | }; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 484 | UninterpretedOption_NamePart_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 485 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 486 | UninterpretedOption_NamePart_descriptor_, |
| 487 | UninterpretedOption_NamePart::default_instance_, |
kenton@google.com | 3e91fcd | 2008-11-06 04:37:30 +0000 | [diff] [blame] | 488 | UninterpretedOption_NamePart_offsets_, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 489 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 490 | -1, |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 491 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 492 | sizeof(UninterpretedOption_NamePart), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 493 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UninterpretedOption_NamePart, _internal_metadata_), |
| 494 | -1); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 495 | SourceCodeInfo_descriptor_ = file->message_type(17); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 496 | static const int SourceCodeInfo_offsets_[1] = { |
| 497 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, location_), |
| 498 | }; |
| 499 | SourceCodeInfo_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 500 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 501 | SourceCodeInfo_descriptor_, |
| 502 | SourceCodeInfo::default_instance_, |
| 503 | SourceCodeInfo_offsets_, |
| 504 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 505 | -1, |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 506 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 507 | sizeof(SourceCodeInfo), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 508 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo, _internal_metadata_), |
| 509 | -1); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 510 | SourceCodeInfo_Location_descriptor_ = SourceCodeInfo_descriptor_->nested_type(0); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 511 | static const int SourceCodeInfo_Location_offsets_[5] = { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 512 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, path_), |
| 513 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, span_), |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 514 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_comments_), |
| 515 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, trailing_comments_), |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 516 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, leading_detached_comments_), |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 517 | }; |
| 518 | SourceCodeInfo_Location_reflection_ = |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 519 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 520 | SourceCodeInfo_Location_descriptor_, |
| 521 | SourceCodeInfo_Location::default_instance_, |
| 522 | SourceCodeInfo_Location_offsets_, |
| 523 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _has_bits_[0]), |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 524 | -1, |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 525 | -1, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 526 | sizeof(SourceCodeInfo_Location), |
Feng Xiao | c25d9fe | 2014-11-26 16:15:29 -0800 | [diff] [blame] | 527 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceCodeInfo_Location, _internal_metadata_), |
| 528 | -1); |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 529 | GeneratedCodeInfo_descriptor_ = file->message_type(18); |
| 530 | static const int GeneratedCodeInfo_offsets_[1] = { |
| 531 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, annotation_), |
| 532 | }; |
| 533 | GeneratedCodeInfo_reflection_ = |
| 534 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| 535 | GeneratedCodeInfo_descriptor_, |
| 536 | GeneratedCodeInfo::default_instance_, |
| 537 | GeneratedCodeInfo_offsets_, |
| 538 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _has_bits_[0]), |
| 539 | -1, |
| 540 | -1, |
| 541 | sizeof(GeneratedCodeInfo), |
| 542 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo, _internal_metadata_), |
| 543 | -1); |
| 544 | GeneratedCodeInfo_Annotation_descriptor_ = GeneratedCodeInfo_descriptor_->nested_type(0); |
| 545 | static const int GeneratedCodeInfo_Annotation_offsets_[4] = { |
| 546 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, path_), |
| 547 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, source_file_), |
| 548 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, begin_), |
| 549 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, end_), |
| 550 | }; |
| 551 | GeneratedCodeInfo_Annotation_reflection_ = |
| 552 | ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( |
| 553 | GeneratedCodeInfo_Annotation_descriptor_, |
| 554 | GeneratedCodeInfo_Annotation::default_instance_, |
| 555 | GeneratedCodeInfo_Annotation_offsets_, |
| 556 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _has_bits_[0]), |
| 557 | -1, |
| 558 | -1, |
| 559 | sizeof(GeneratedCodeInfo_Annotation), |
| 560 | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GeneratedCodeInfo_Annotation, _internal_metadata_), |
| 561 | -1); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 562 | } |
| 563 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 564 | namespace { |
| 565 | |
| 566 | GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| 567 | inline void protobuf_AssignDescriptorsOnce() { |
| 568 | ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| 569 | &protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto); |
| 570 | } |
| 571 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 572 | void protobuf_RegisterTypes(const ::std::string&) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 573 | protobuf_AssignDescriptorsOnce(); |
| 574 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 575 | FileDescriptorSet_descriptor_, &FileDescriptorSet::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 576 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 577 | FileDescriptorProto_descriptor_, &FileDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 578 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 579 | DescriptorProto_descriptor_, &DescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 580 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 581 | DescriptorProto_ExtensionRange_descriptor_, &DescriptorProto_ExtensionRange::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 582 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 583 | DescriptorProto_ReservedRange_descriptor_, &DescriptorProto_ReservedRange::default_instance()); |
| 584 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 585 | FieldDescriptorProto_descriptor_, &FieldDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 586 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 587 | OneofDescriptorProto_descriptor_, &OneofDescriptorProto::default_instance()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 588 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 589 | EnumDescriptorProto_descriptor_, &EnumDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 590 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 591 | EnumValueDescriptorProto_descriptor_, &EnumValueDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 592 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 593 | ServiceDescriptorProto_descriptor_, &ServiceDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 594 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 595 | MethodDescriptorProto_descriptor_, &MethodDescriptorProto::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 596 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 597 | FileOptions_descriptor_, &FileOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 598 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 599 | MessageOptions_descriptor_, &MessageOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 600 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 601 | FieldOptions_descriptor_, &FieldOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 602 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 603 | EnumOptions_descriptor_, &EnumOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 604 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 605 | EnumValueOptions_descriptor_, &EnumValueOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 606 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 607 | ServiceOptions_descriptor_, &ServiceOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 608 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 609 | MethodOptions_descriptor_, &MethodOptions::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 610 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 611 | UninterpretedOption_descriptor_, &UninterpretedOption::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 612 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 613 | UninterpretedOption_NamePart_descriptor_, &UninterpretedOption_NamePart::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 614 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 615 | SourceCodeInfo_descriptor_, &SourceCodeInfo::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 616 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 617 | SourceCodeInfo_Location_descriptor_, &SourceCodeInfo_Location::default_instance()); |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 618 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 619 | GeneratedCodeInfo_descriptor_, &GeneratedCodeInfo::default_instance()); |
| 620 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| 621 | GeneratedCodeInfo_Annotation_descriptor_, &GeneratedCodeInfo_Annotation::default_instance()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 622 | } |
| 623 | |
| 624 | } // namespace |
| 625 | |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 626 | void protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto() { |
| 627 | delete FileDescriptorSet::default_instance_; |
| 628 | delete FileDescriptorSet_reflection_; |
| 629 | delete FileDescriptorProto::default_instance_; |
| 630 | delete FileDescriptorProto_reflection_; |
| 631 | delete DescriptorProto::default_instance_; |
| 632 | delete DescriptorProto_reflection_; |
| 633 | delete DescriptorProto_ExtensionRange::default_instance_; |
| 634 | delete DescriptorProto_ExtensionRange_reflection_; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 635 | delete DescriptorProto_ReservedRange::default_instance_; |
| 636 | delete DescriptorProto_ReservedRange_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 637 | delete FieldDescriptorProto::default_instance_; |
| 638 | delete FieldDescriptorProto_reflection_; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 639 | delete OneofDescriptorProto::default_instance_; |
| 640 | delete OneofDescriptorProto_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 641 | delete EnumDescriptorProto::default_instance_; |
| 642 | delete EnumDescriptorProto_reflection_; |
| 643 | delete EnumValueDescriptorProto::default_instance_; |
| 644 | delete EnumValueDescriptorProto_reflection_; |
| 645 | delete ServiceDescriptorProto::default_instance_; |
| 646 | delete ServiceDescriptorProto_reflection_; |
| 647 | delete MethodDescriptorProto::default_instance_; |
| 648 | delete MethodDescriptorProto_reflection_; |
| 649 | delete FileOptions::default_instance_; |
| 650 | delete FileOptions_reflection_; |
| 651 | delete MessageOptions::default_instance_; |
| 652 | delete MessageOptions_reflection_; |
| 653 | delete FieldOptions::default_instance_; |
| 654 | delete FieldOptions_reflection_; |
| 655 | delete EnumOptions::default_instance_; |
| 656 | delete EnumOptions_reflection_; |
| 657 | delete EnumValueOptions::default_instance_; |
| 658 | delete EnumValueOptions_reflection_; |
| 659 | delete ServiceOptions::default_instance_; |
| 660 | delete ServiceOptions_reflection_; |
| 661 | delete MethodOptions::default_instance_; |
| 662 | delete MethodOptions_reflection_; |
| 663 | delete UninterpretedOption::default_instance_; |
| 664 | delete UninterpretedOption_reflection_; |
| 665 | delete UninterpretedOption_NamePart::default_instance_; |
| 666 | delete UninterpretedOption_NamePart_reflection_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 667 | delete SourceCodeInfo::default_instance_; |
| 668 | delete SourceCodeInfo_reflection_; |
| 669 | delete SourceCodeInfo_Location::default_instance_; |
| 670 | delete SourceCodeInfo_Location_reflection_; |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 671 | delete GeneratedCodeInfo::default_instance_; |
| 672 | delete GeneratedCodeInfo_reflection_; |
| 673 | delete GeneratedCodeInfo_Annotation::default_instance_; |
| 674 | delete GeneratedCodeInfo_Annotation_reflection_; |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 675 | } |
| 676 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 677 | void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 678 | static bool already_here = false; |
| 679 | if (already_here) return; |
| 680 | already_here = true; |
| 681 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 682 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 683 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 684 | "\n google/protobuf/descriptor.proto\022\017goog" |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 685 | "le.protobuf\"G\n\021FileDescriptorSet\0222\n\004file" |
| 686 | "\030\001 \003(\0132$.google.protobuf.FileDescriptorP" |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 687 | "roto\"\333\003\n\023FileDescriptorProto\022\014\n\004name\030\001 \001" |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 688 | "(\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] | 689 | "\031\n\021public_dependency\030\n \003(\005\022\027\n\017weak_depen" |
| 690 | "dency\030\013 \003(\005\0226\n\014message_type\030\004 \003(\0132 .goog" |
| 691 | "le.protobuf.DescriptorProto\0227\n\tenum_type" |
| 692 | "\030\005 \003(\0132$.google.protobuf.EnumDescriptorP" |
| 693 | "roto\0228\n\007service\030\006 \003(\0132\'.google.protobuf." |
| 694 | "ServiceDescriptorProto\0228\n\textension\030\007 \003(" |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 695 | "\0132%.google.protobuf.FieldDescriptorProto" |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 696 | "\022-\n\007options\030\010 \001(\0132\034.google.protobuf.File" |
| 697 | "Options\0229\n\020source_code_info\030\t \001(\0132\037.goog" |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 698 | "le.protobuf.SourceCodeInfo\022\016\n\006syntax\030\014 \001" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 699 | "(\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] | 700 | "field\030\002 \003(\0132%.google.protobuf.FieldDescr" |
| 701 | "iptorProto\0228\n\textension\030\006 \003(\0132%.google.p" |
| 702 | "rotobuf.FieldDescriptorProto\0225\n\013nested_t" |
| 703 | "ype\030\003 \003(\0132 .google.protobuf.DescriptorPr" |
| 704 | "oto\0227\n\tenum_type\030\004 \003(\0132$.google.protobuf" |
| 705 | ".EnumDescriptorProto\022H\n\017extension_range\030" |
| 706 | "\005 \003(\0132/.google.protobuf.DescriptorProto." |
| 707 | "ExtensionRange\0229\n\noneof_decl\030\010 \003(\0132%.goo" |
| 708 | "gle.protobuf.OneofDescriptorProto\0220\n\007opt" |
| 709 | "ions\030\007 \001(\0132\037.google.protobuf.MessageOpti" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 710 | "ons\022F\n\016reserved_range\030\t \003(\0132..google.pro" |
| 711 | "tobuf.DescriptorProto.ReservedRange\022\025\n\rr" |
| 712 | "eserved_name\030\n \003(\t\032,\n\016ExtensionRange\022\r\n\005" |
| 713 | "start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\032+\n\rReservedRang" |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 714 | "e\022\r\n\005start\030\001 \001(\005\022\013\n\003end\030\002 \001(\005\"\274\005\n\024FieldD" |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 715 | "escriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006number\030\003" |
| 716 | " \001(\005\022:\n\005label\030\004 \001(\0162+.google.protobuf.Fi" |
| 717 | "eldDescriptorProto.Label\0228\n\004type\030\005 \001(\0162*" |
| 718 | ".google.protobuf.FieldDescriptorProto.Ty" |
| 719 | "pe\022\021\n\ttype_name\030\006 \001(\t\022\020\n\010extendee\030\002 \001(\t\022" |
| 720 | "\025\n\rdefault_value\030\007 \001(\t\022\023\n\013oneof_index\030\t " |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 721 | "\001(\005\022\021\n\tjson_name\030\n \001(\t\022.\n\007options\030\010 \001(\0132" |
| 722 | "\035.google.protobuf.FieldOptions\"\266\002\n\004Type\022" |
| 723 | "\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE" |
| 724 | "_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020" |
| 725 | "\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n" |
| 726 | "\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GR" |
| 727 | "OUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022" |
| 728 | "\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_" |
| 729 | "SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SI" |
| 730 | "NT32\020\021\022\017\n\013TYPE_SINT64\020\022\"C\n\005Label\022\022\n\016LABE" |
| 731 | "L_OPTIONAL\020\001\022\022\n\016LABEL_REQUIRED\020\002\022\022\n\016LABE" |
| 732 | "L_REPEATED\020\003\"$\n\024OneofDescriptorProto\022\014\n\004" |
| 733 | "name\030\001 \001(\t\"\214\001\n\023EnumDescriptorProto\022\014\n\004na" |
| 734 | "me\030\001 \001(\t\0228\n\005value\030\002 \003(\0132).google.protobu" |
| 735 | "f.EnumValueDescriptorProto\022-\n\007options\030\003 " |
| 736 | "\001(\0132\034.google.protobuf.EnumOptions\"l\n\030Enu" |
| 737 | "mValueDescriptorProto\022\014\n\004name\030\001 \001(\t\022\016\n\006n" |
| 738 | "umber\030\002 \001(\005\0222\n\007options\030\003 \001(\0132!.google.pr" |
| 739 | "otobuf.EnumValueOptions\"\220\001\n\026ServiceDescr" |
| 740 | "iptorProto\022\014\n\004name\030\001 \001(\t\0226\n\006method\030\002 \003(\013" |
| 741 | "2&.google.protobuf.MethodDescriptorProto" |
| 742 | "\0220\n\007options\030\003 \001(\0132\037.google.protobuf.Serv" |
| 743 | "iceOptions\"\301\001\n\025MethodDescriptorProto\022\014\n\004" |
| 744 | "name\030\001 \001(\t\022\022\n\ninput_type\030\002 \001(\t\022\023\n\013output" |
| 745 | "_type\030\003 \001(\t\022/\n\007options\030\004 \001(\0132\036.google.pr" |
| 746 | "otobuf.MethodOptions\022\037\n\020client_streaming" |
| 747 | "\030\005 \001(\010:\005false\022\037\n\020server_streaming\030\006 \001(\010:" |
Jisi Liu | 3b3c8ab | 2016-03-30 11:39:59 -0700 | [diff] [blame] | 748 | "\005false\"\207\005\n\013FileOptions\022\024\n\014java_package\030\001" |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 749 | " \001(\t\022\034\n\024java_outer_classname\030\010 \001(\t\022\"\n\023ja" |
| 750 | "va_multiple_files\030\n \001(\010:\005false\022,\n\035java_g" |
| 751 | "enerate_equals_and_hash\030\024 \001(\010:\005false\022%\n\026" |
| 752 | "java_string_check_utf8\030\033 \001(\010:\005false\022F\n\014o" |
| 753 | "ptimize_for\030\t \001(\0162).google.protobuf.File" |
| 754 | "Options.OptimizeMode:\005SPEED\022\022\n\ngo_packag" |
| 755 | "e\030\013 \001(\t\022\"\n\023cc_generic_services\030\020 \001(\010:\005fa" |
| 756 | "lse\022$\n\025java_generic_services\030\021 \001(\010:\005fals" |
| 757 | "e\022\"\n\023py_generic_services\030\022 \001(\010:\005false\022\031\n" |
| 758 | "\ndeprecated\030\027 \001(\010:\005false\022\037\n\020cc_enable_ar" |
| 759 | "enas\030\037 \001(\010:\005false\022\031\n\021objc_class_prefix\030$" |
Jisi Liu | 3b3c8ab | 2016-03-30 11:39:59 -0700 | [diff] [blame] | 760 | " \001(\t\022\030\n\020csharp_namespace\030% \001(\t\022C\n\024uninte" |
| 761 | "rpreted_option\030\347\007 \003(\0132$.google.protobuf." |
| 762 | "UninterpretedOption\":\n\014OptimizeMode\022\t\n\005S" |
| 763 | "PEED\020\001\022\r\n\tCODE_SIZE\020\002\022\020\n\014LITE_RUNTIME\020\003*" |
| 764 | "\t\010\350\007\020\200\200\200\200\002J\004\010&\020\'\"\346\001\n\016MessageOptions\022&\n\027m" |
| 765 | "essage_set_wire_format\030\001 \001(\010:\005false\022.\n\037n" |
| 766 | "o_standard_descriptor_accessor\030\002 \001(\010:\005fa" |
| 767 | "lse\022\031\n\ndeprecated\030\003 \001(\010:\005false\022\021\n\tmap_en" |
| 768 | "try\030\007 \001(\010\022C\n\024uninterpreted_option\030\347\007 \003(\013" |
| 769 | "2$.google.protobuf.UninterpretedOption*\t" |
| 770 | "\010\350\007\020\200\200\200\200\002\"\230\003\n\014FieldOptions\022:\n\005ctype\030\001 \001(" |
| 771 | "\0162#.google.protobuf.FieldOptions.CType:\006" |
| 772 | "STRING\022\016\n\006packed\030\002 \001(\010\022\?\n\006jstype\030\006 \001(\0162$" |
| 773 | ".google.protobuf.FieldOptions.JSType:\tJS" |
| 774 | "_NORMAL\022\023\n\004lazy\030\005 \001(\010:\005false\022\031\n\ndeprecat" |
| 775 | "ed\030\003 \001(\010:\005false\022\023\n\004weak\030\n \001(\010:\005false\022C\n\024" |
| 776 | "uninterpreted_option\030\347\007 \003(\0132$.google.pro" |
| 777 | "tobuf.UninterpretedOption\"/\n\005CType\022\n\n\006ST" |
| 778 | "RING\020\000\022\010\n\004CORD\020\001\022\020\n\014STRING_PIECE\020\002\"5\n\006JS" |
| 779 | "Type\022\r\n\tJS_NORMAL\020\000\022\r\n\tJS_STRING\020\001\022\r\n\tJS" |
| 780 | "_NUMBER\020\002*\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013EnumOptions\022\023\n\013" |
| 781 | "allow_alias\030\002 \001(\010\022\031\n\ndeprecated\030\003 \001(\010:\005f" |
| 782 | "alse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.go" |
| 783 | "ogle.protobuf.UninterpretedOption*\t\010\350\007\020\200" |
| 784 | "\200\200\200\002\"}\n\020EnumValueOptions\022\031\n\ndeprecated\030\001" |
| 785 | " \001(\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003" |
| 786 | "(\0132$.google.protobuf.UninterpretedOption" |
| 787 | "*\t\010\350\007\020\200\200\200\200\002\"{\n\016ServiceOptions\022\031\n\ndepreca" |
| 788 | "ted\030! \001(\010:\005false\022C\n\024uninterpreted_option" |
| 789 | "\030\347\007 \003(\0132$.google.protobuf.UninterpretedO" |
| 790 | "ption*\t\010\350\007\020\200\200\200\200\002\"z\n\rMethodOptions\022\031\n\ndep" |
| 791 | "recated\030! \001(\010:\005false\022C\n\024uninterpreted_op" |
| 792 | "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre" |
| 793 | "tedOption*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023UninterpretedOp" |
| 794 | "tion\022;\n\004name\030\002 \003(\0132-.google.protobuf.Uni" |
| 795 | "nterpretedOption.NamePart\022\030\n\020identifier_" |
| 796 | "value\030\003 \001(\t\022\032\n\022positive_int_value\030\004 \001(\004\022" |
| 797 | "\032\n\022negative_int_value\030\005 \001(\003\022\024\n\014double_va" |
| 798 | "lue\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017aggre" |
| 799 | "gate_value\030\010 \001(\t\0323\n\010NamePart\022\021\n\tname_par" |
| 800 | "t\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016Source" |
| 801 | "CodeInfo\022:\n\010location\030\001 \003(\0132(.google.prot" |
| 802 | "obuf.SourceCodeInfo.Location\032\206\001\n\010Locatio" |
| 803 | "n\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005B\002\020\001\022\030\n" |
| 804 | "\020leading_comments\030\003 \001(\t\022\031\n\021trailing_comm" |
| 805 | "ents\030\004 \001(\t\022!\n\031leading_detached_comments\030" |
| 806 | "\006 \003(\t\"\247\001\n\021GeneratedCodeInfo\022A\n\nannotatio" |
| 807 | "n\030\001 \003(\0132-.google.protobuf.GeneratedCodeI" |
| 808 | "nfo.Annotation\032O\n\nAnnotation\022\020\n\004path\030\001 \003" |
| 809 | "(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030\003 \001" |
| 810 | "(\005\022\013\n\003end\030\004 \001(\005BX\n\023com.google.protobufB\020" |
| 811 | "DescriptorProtosH\001Z\ndescriptor\242\002\003GPB\252\002\032G" |
| 812 | "oogle.Protobuf.Reflection", 5145); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 813 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 814 | "google/protobuf/descriptor.proto", &protobuf_RegisterTypes); |
| 815 | FileDescriptorSet::default_instance_ = new FileDescriptorSet(); |
| 816 | FileDescriptorProto::default_instance_ = new FileDescriptorProto(); |
| 817 | DescriptorProto::default_instance_ = new DescriptorProto(); |
| 818 | DescriptorProto_ExtensionRange::default_instance_ = new DescriptorProto_ExtensionRange(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 819 | DescriptorProto_ReservedRange::default_instance_ = new DescriptorProto_ReservedRange(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 820 | FieldDescriptorProto::default_instance_ = new FieldDescriptorProto(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 821 | OneofDescriptorProto::default_instance_ = new OneofDescriptorProto(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 822 | EnumDescriptorProto::default_instance_ = new EnumDescriptorProto(); |
| 823 | EnumValueDescriptorProto::default_instance_ = new EnumValueDescriptorProto(); |
| 824 | ServiceDescriptorProto::default_instance_ = new ServiceDescriptorProto(); |
| 825 | MethodDescriptorProto::default_instance_ = new MethodDescriptorProto(); |
| 826 | FileOptions::default_instance_ = new FileOptions(); |
| 827 | MessageOptions::default_instance_ = new MessageOptions(); |
| 828 | FieldOptions::default_instance_ = new FieldOptions(); |
| 829 | EnumOptions::default_instance_ = new EnumOptions(); |
| 830 | EnumValueOptions::default_instance_ = new EnumValueOptions(); |
| 831 | ServiceOptions::default_instance_ = new ServiceOptions(); |
| 832 | MethodOptions::default_instance_ = new MethodOptions(); |
| 833 | UninterpretedOption::default_instance_ = new UninterpretedOption(); |
| 834 | UninterpretedOption_NamePart::default_instance_ = new UninterpretedOption_NamePart(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 835 | SourceCodeInfo::default_instance_ = new SourceCodeInfo(); |
| 836 | SourceCodeInfo_Location::default_instance_ = new SourceCodeInfo_Location(); |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 837 | GeneratedCodeInfo::default_instance_ = new GeneratedCodeInfo(); |
| 838 | GeneratedCodeInfo_Annotation::default_instance_ = new GeneratedCodeInfo_Annotation(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 839 | FileDescriptorSet::default_instance_->InitAsDefaultInstance(); |
| 840 | FileDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 841 | DescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 842 | DescriptorProto_ExtensionRange::default_instance_->InitAsDefaultInstance(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 843 | DescriptorProto_ReservedRange::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 844 | FieldDescriptorProto::default_instance_->InitAsDefaultInstance(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 845 | OneofDescriptorProto::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 846 | EnumDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 847 | EnumValueDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 848 | ServiceDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 849 | MethodDescriptorProto::default_instance_->InitAsDefaultInstance(); |
| 850 | FileOptions::default_instance_->InitAsDefaultInstance(); |
| 851 | MessageOptions::default_instance_->InitAsDefaultInstance(); |
| 852 | FieldOptions::default_instance_->InitAsDefaultInstance(); |
| 853 | EnumOptions::default_instance_->InitAsDefaultInstance(); |
| 854 | EnumValueOptions::default_instance_->InitAsDefaultInstance(); |
| 855 | ServiceOptions::default_instance_->InitAsDefaultInstance(); |
| 856 | MethodOptions::default_instance_->InitAsDefaultInstance(); |
| 857 | UninterpretedOption::default_instance_->InitAsDefaultInstance(); |
| 858 | UninterpretedOption_NamePart::default_instance_->InitAsDefaultInstance(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 859 | SourceCodeInfo::default_instance_->InitAsDefaultInstance(); |
| 860 | SourceCodeInfo_Location::default_instance_->InitAsDefaultInstance(); |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 861 | GeneratedCodeInfo::default_instance_->InitAsDefaultInstance(); |
| 862 | GeneratedCodeInfo_Annotation::default_instance_->InitAsDefaultInstance(); |
kenton@google.com | 63e646b | 2009-05-06 19:27:03 +0000 | [diff] [blame] | 863 | ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fdescriptor_2eproto); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 864 | } |
| 865 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 866 | // Force AddDescriptors() to be called at static initialization time. |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 867 | struct StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto { |
| 868 | StaticDescriptorInitializer_google_2fprotobuf_2fdescriptor_2eproto() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 869 | protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 870 | } |
| 871 | } static_descriptor_initializer_google_2fprotobuf_2fdescriptor_2eproto_; |
| 872 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 873 | namespace { |
| 874 | |
| 875 | static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; |
| 876 | static void MergeFromFail(int line) { |
| 877 | GOOGLE_CHECK(false) << __FILE__ << ":" << line; |
| 878 | } |
| 879 | |
| 880 | } // namespace |
| 881 | |
| 882 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 883 | // =================================================================== |
| 884 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 885 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 886 | const int FileDescriptorSet::kFileFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 887 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 888 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 889 | FileDescriptorSet::FileDescriptorSet() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 890 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 891 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 892 | // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 893 | } |
| 894 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 895 | void FileDescriptorSet::InitAsDefaultInstance() { |
| 896 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 897 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 898 | FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 899 | : ::google::protobuf::Message(), |
| 900 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 901 | SharedCtor(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 902 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 903 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 904 | } |
| 905 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 906 | void FileDescriptorSet::SharedCtor() { |
| 907 | _cached_size_ = 0; |
| 908 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 909 | } |
| 910 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 911 | FileDescriptorSet::~FileDescriptorSet() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 912 | // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 913 | SharedDtor(); |
| 914 | } |
| 915 | |
| 916 | void FileDescriptorSet::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 917 | if (this != default_instance_) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 918 | } |
| 919 | } |
| 920 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 921 | void FileDescriptorSet::SetCachedSize(int size) const { |
| 922 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 923 | _cached_size_ = size; |
| 924 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 925 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 926 | const ::google::protobuf::Descriptor* FileDescriptorSet::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 927 | protobuf_AssignDescriptorsOnce(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 928 | return FileDescriptorSet_descriptor_; |
| 929 | } |
| 930 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 931 | const FileDescriptorSet& FileDescriptorSet::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 932 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 933 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 934 | } |
| 935 | |
| 936 | FileDescriptorSet* FileDescriptorSet::default_instance_ = NULL; |
| 937 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 938 | FileDescriptorSet* FileDescriptorSet::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 939 | FileDescriptorSet* n = new FileDescriptorSet; |
| 940 | if (arena != NULL) { |
| 941 | arena->Own(n); |
| 942 | } |
| 943 | return n; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 944 | } |
| 945 | |
| 946 | void FileDescriptorSet::Clear() { |
| 947 | file_.Clear(); |
| 948 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 949 | if (_internal_metadata_.have_unknown_fields()) { |
| 950 | mutable_unknown_fields()->Clear(); |
| 951 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 952 | } |
| 953 | |
| 954 | bool FileDescriptorSet::MergePartialFromCodedStream( |
| 955 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 956 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 957 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 958 | // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet) |
| 959 | for (;;) { |
| 960 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 961 | tag = p.first; |
| 962 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 963 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 964 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
| 965 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 966 | if (tag == 10) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 967 | DO_(input->IncrementRecursionDepth()); |
| 968 | parse_loop_file: |
| 969 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 970 | input, add_file())); |
| 971 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 972 | goto handle_unusual; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 973 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 974 | if (input->ExpectTag(10)) goto parse_loop_file; |
| 975 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 976 | if (input->ExpectAtEnd()) goto success; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 977 | break; |
| 978 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 979 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 980 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 981 | handle_unusual: |
| 982 | if (tag == 0 || |
| 983 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 984 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 985 | goto success; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 986 | } |
| 987 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 988 | input, tag, mutable_unknown_fields())); |
| 989 | break; |
| 990 | } |
| 991 | } |
| 992 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 993 | success: |
| 994 | // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 995 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 996 | failure: |
| 997 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorSet) |
| 998 | return false; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 999 | #undef DO_ |
| 1000 | } |
| 1001 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1002 | void FileDescriptorSet::SerializeWithCachedSizes( |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1003 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1004 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet) |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1005 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1006 | 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] | 1007 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1008 | 1, this->file(i), output); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1009 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1010 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1011 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1012 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1013 | unknown_fields(), output); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1014 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1015 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1016 | } |
| 1017 | |
| 1018 | ::google::protobuf::uint8* FileDescriptorSet::SerializeWithCachedSizesToArray( |
| 1019 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1020 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1021 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1022 | 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] | 1023 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1024 | WriteMessageNoVirtualToArray( |
| 1025 | 1, this->file(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1026 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1027 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1028 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1029 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1030 | unknown_fields(), target); |
| 1031 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1032 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1033 | return target; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1034 | } |
| 1035 | |
| 1036 | int FileDescriptorSet::ByteSize() const { |
| 1037 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1038 | |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1039 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1040 | total_size += 1 * this->file_size(); |
| 1041 | for (int i = 0; i < this->file_size(); i++) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1042 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1043 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1044 | this->file(i)); |
| 1045 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1046 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1047 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1048 | total_size += |
| 1049 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1050 | unknown_fields()); |
| 1051 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1052 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1053 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1054 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1055 | return total_size; |
| 1056 | } |
| 1057 | |
| 1058 | void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1059 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1060 | const FileDescriptorSet* source = |
| 1061 | ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorSet>( |
| 1062 | &from); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1063 | if (source == NULL) { |
| 1064 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1065 | } else { |
| 1066 | MergeFrom(*source); |
| 1067 | } |
| 1068 | } |
| 1069 | |
| 1070 | void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1071 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1072 | file_.MergeFrom(from.file_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1073 | if (from._internal_metadata_.have_unknown_fields()) { |
| 1074 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 1075 | } |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1076 | } |
| 1077 | |
| 1078 | void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) { |
| 1079 | if (&from == this) return; |
| 1080 | Clear(); |
| 1081 | MergeFrom(from); |
| 1082 | } |
| 1083 | |
| 1084 | void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) { |
| 1085 | if (&from == this) return; |
| 1086 | Clear(); |
| 1087 | MergeFrom(from); |
| 1088 | } |
| 1089 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1090 | bool FileDescriptorSet::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1091 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1092 | if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1093 | return true; |
| 1094 | } |
| 1095 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 1096 | void FileDescriptorSet::Swap(FileDescriptorSet* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1097 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1098 | InternalSwap(other); |
| 1099 | } |
| 1100 | void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { |
| 1101 | file_.UnsafeArenaSwap(&other->file_); |
| 1102 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 1103 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1104 | std::swap(_cached_size_, other->_cached_size_); |
| 1105 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 1106 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1107 | ::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const { |
| 1108 | protobuf_AssignDescriptorsOnce(); |
| 1109 | ::google::protobuf::Metadata metadata; |
| 1110 | metadata.descriptor = FileDescriptorSet_descriptor_; |
| 1111 | metadata.reflection = FileDescriptorSet_reflection_; |
| 1112 | return metadata; |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1113 | } |
| 1114 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1115 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1116 | // FileDescriptorSet |
| 1117 | |
| 1118 | // repeated .google.protobuf.FileDescriptorProto file = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1119 | int FileDescriptorSet::file_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1120 | return file_.size(); |
| 1121 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1122 | void FileDescriptorSet::clear_file() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1123 | file_.Clear(); |
| 1124 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 1125 | const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1126 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file) |
| 1127 | return file_.Get(index); |
| 1128 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 1129 | ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1130 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file) |
| 1131 | return file_.Mutable(index); |
| 1132 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 1133 | ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1134 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file) |
| 1135 | return file_.Add(); |
| 1136 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 1137 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1138 | FileDescriptorSet::mutable_file() { |
| 1139 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file) |
| 1140 | return &file_; |
| 1141 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 1142 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& |
| 1143 | FileDescriptorSet::file() const { |
| 1144 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file) |
| 1145 | return file_; |
| 1146 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1147 | |
| 1148 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1149 | |
| 1150 | // =================================================================== |
| 1151 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 1152 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 1153 | const int FileDescriptorProto::kNameFieldNumber; |
| 1154 | const int FileDescriptorProto::kPackageFieldNumber; |
| 1155 | const int FileDescriptorProto::kDependencyFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1156 | const int FileDescriptorProto::kPublicDependencyFieldNumber; |
| 1157 | const int FileDescriptorProto::kWeakDependencyFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 1158 | const int FileDescriptorProto::kMessageTypeFieldNumber; |
| 1159 | const int FileDescriptorProto::kEnumTypeFieldNumber; |
| 1160 | const int FileDescriptorProto::kServiceFieldNumber; |
| 1161 | const int FileDescriptorProto::kExtensionFieldNumber; |
| 1162 | const int FileDescriptorProto::kOptionsFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1163 | const int FileDescriptorProto::kSourceCodeInfoFieldNumber; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1164 | const int FileDescriptorProto::kSyntaxFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 1165 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1166 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 1167 | FileDescriptorProto::FileDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1168 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1169 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1170 | // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1171 | } |
| 1172 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1173 | void FileDescriptorProto::InitAsDefaultInstance() { |
| 1174 | options_ = const_cast< ::google::protobuf::FileOptions*>(&::google::protobuf::FileOptions::default_instance()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1175 | source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>(&::google::protobuf::SourceCodeInfo::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1176 | } |
| 1177 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 1178 | FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1179 | : ::google::protobuf::Message(), |
| 1180 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1181 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1182 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1183 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1184 | } |
| 1185 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1186 | void FileDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1187 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1188 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1189 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1190 | package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1191 | options_ = NULL; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1192 | source_code_info_ = NULL; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1193 | syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1194 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 1195 | } |
| 1196 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1197 | FileDescriptorProto::~FileDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1198 | // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1199 | SharedDtor(); |
| 1200 | } |
| 1201 | |
| 1202 | void FileDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1203 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1204 | package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1205 | syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1206 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1207 | delete options_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1208 | delete source_code_info_; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1209 | } |
| 1210 | } |
| 1211 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1212 | void FileDescriptorProto::SetCachedSize(int size) const { |
| 1213 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 1214 | _cached_size_ = size; |
| 1215 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 1216 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1217 | const ::google::protobuf::Descriptor* FileDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1218 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1219 | return FileDescriptorProto_descriptor_; |
| 1220 | } |
| 1221 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1222 | const FileDescriptorProto& FileDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 1223 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 1224 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1225 | } |
| 1226 | |
| 1227 | FileDescriptorProto* FileDescriptorProto::default_instance_ = NULL; |
| 1228 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1229 | FileDescriptorProto* FileDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1230 | FileDescriptorProto* n = new FileDescriptorProto; |
| 1231 | if (arena != NULL) { |
| 1232 | arena->Own(n); |
| 1233 | } |
| 1234 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1235 | } |
| 1236 | |
| 1237 | void FileDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 1238 | if (_has_bits_[0 / 32] & 3u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1239 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1240 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1241 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1242 | if (has_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1243 | package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1244 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1245 | } |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 1246 | if (_has_bits_[8 / 32] & 3584u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1247 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1248 | if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); |
| 1249 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1250 | if (has_source_code_info()) { |
| 1251 | if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); |
| 1252 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1253 | if (has_syntax()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1254 | syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1255 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1256 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1257 | dependency_.Clear(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1258 | public_dependency_.Clear(); |
| 1259 | weak_dependency_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1260 | message_type_.Clear(); |
| 1261 | enum_type_.Clear(); |
| 1262 | service_.Clear(); |
| 1263 | extension_.Clear(); |
| 1264 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1265 | if (_internal_metadata_.have_unknown_fields()) { |
| 1266 | mutable_unknown_fields()->Clear(); |
| 1267 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1268 | } |
| 1269 | |
| 1270 | bool FileDescriptorProto::MergePartialFromCodedStream( |
| 1271 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1272 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1273 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1274 | // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto) |
| 1275 | for (;;) { |
| 1276 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 1277 | tag = p.first; |
| 1278 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1279 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1280 | // optional string name = 1; |
| 1281 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1282 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1283 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1284 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1285 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1286 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1287 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1288 | "google.protobuf.FileDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1289 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1290 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1291 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1292 | if (input->ExpectTag(18)) goto parse_package; |
| 1293 | break; |
| 1294 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1295 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1296 | // optional string package = 2; |
| 1297 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1298 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1299 | parse_package: |
| 1300 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1301 | input, this->mutable_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1302 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1303 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1304 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1305 | "google.protobuf.FileDescriptorProto.package"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1306 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1307 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1308 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1309 | if (input->ExpectTag(26)) goto parse_dependency; |
| 1310 | break; |
| 1311 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1312 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1313 | // repeated string dependency = 3; |
| 1314 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1315 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1316 | parse_dependency: |
| 1317 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1318 | input, this->add_dependency())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1319 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | 2072421 | 2012-05-16 05:41:31 +0000 | [diff] [blame] | 1320 | this->dependency(this->dependency_size() - 1).data(), |
| 1321 | this->dependency(this->dependency_size() - 1).length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1322 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1323 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1324 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1325 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1326 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1327 | if (input->ExpectTag(26)) goto parse_dependency; |
| 1328 | if (input->ExpectTag(34)) goto parse_message_type; |
| 1329 | break; |
| 1330 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1331 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1332 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
| 1333 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1334 | if (tag == 34) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1335 | parse_message_type: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1336 | DO_(input->IncrementRecursionDepth()); |
| 1337 | parse_loop_message_type: |
| 1338 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1339 | input, add_message_type())); |
| 1340 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1341 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1342 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1343 | if (input->ExpectTag(34)) goto parse_loop_message_type; |
| 1344 | if (input->ExpectTag(42)) goto parse_loop_enum_type; |
| 1345 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1346 | break; |
| 1347 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1348 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1349 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
| 1350 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1351 | if (tag == 42) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1352 | DO_(input->IncrementRecursionDepth()); |
| 1353 | parse_loop_enum_type: |
| 1354 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1355 | input, add_enum_type())); |
| 1356 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1357 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1358 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1359 | if (input->ExpectTag(42)) goto parse_loop_enum_type; |
| 1360 | if (input->ExpectTag(50)) goto parse_loop_service; |
| 1361 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1362 | break; |
| 1363 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1364 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1365 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
| 1366 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1367 | if (tag == 50) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1368 | DO_(input->IncrementRecursionDepth()); |
| 1369 | parse_loop_service: |
| 1370 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1371 | input, add_service())); |
| 1372 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1373 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1374 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1375 | if (input->ExpectTag(50)) goto parse_loop_service; |
| 1376 | if (input->ExpectTag(58)) goto parse_loop_extension; |
| 1377 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1378 | break; |
| 1379 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1380 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1381 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
| 1382 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1383 | if (tag == 58) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1384 | DO_(input->IncrementRecursionDepth()); |
| 1385 | parse_loop_extension: |
| 1386 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1387 | input, add_extension())); |
| 1388 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1389 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1390 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1391 | if (input->ExpectTag(58)) goto parse_loop_extension; |
| 1392 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1393 | if (input->ExpectTag(66)) goto parse_options; |
| 1394 | break; |
| 1395 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1396 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1397 | // optional .google.protobuf.FileOptions options = 8; |
| 1398 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1399 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1400 | parse_options: |
| 1401 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 1402 | input, mutable_options())); |
| 1403 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1404 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1405 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1406 | if (input->ExpectTag(74)) goto parse_source_code_info; |
| 1407 | break; |
| 1408 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1409 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1410 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1411 | case 9: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1412 | if (tag == 74) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1413 | parse_source_code_info: |
| 1414 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 1415 | input, mutable_source_code_info())); |
| 1416 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1417 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1418 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1419 | if (input->ExpectTag(80)) goto parse_public_dependency; |
| 1420 | break; |
| 1421 | } |
| 1422 | |
| 1423 | // repeated int32 public_dependency = 10; |
| 1424 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1425 | if (tag == 80) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1426 | parse_public_dependency: |
| 1427 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< |
| 1428 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1429 | 1, 80, input, this->mutable_public_dependency()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1430 | } else if (tag == 82) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1431 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< |
| 1432 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1433 | input, this->mutable_public_dependency()))); |
| 1434 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1435 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1436 | } |
| 1437 | if (input->ExpectTag(80)) goto parse_public_dependency; |
| 1438 | if (input->ExpectTag(88)) goto parse_weak_dependency; |
| 1439 | break; |
| 1440 | } |
| 1441 | |
| 1442 | // repeated int32 weak_dependency = 11; |
| 1443 | case 11: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1444 | if (tag == 88) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1445 | parse_weak_dependency: |
| 1446 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< |
| 1447 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1448 | 1, 88, input, this->mutable_weak_dependency()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1449 | } else if (tag == 90) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1450 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< |
| 1451 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 1452 | input, this->mutable_weak_dependency()))); |
| 1453 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1454 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1455 | } |
| 1456 | if (input->ExpectTag(88)) goto parse_weak_dependency; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1457 | if (input->ExpectTag(98)) goto parse_syntax; |
| 1458 | break; |
| 1459 | } |
| 1460 | |
| 1461 | // optional string syntax = 12; |
| 1462 | case 12: { |
| 1463 | if (tag == 98) { |
| 1464 | parse_syntax: |
| 1465 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1466 | input, this->mutable_syntax())); |
| 1467 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1468 | this->syntax().data(), this->syntax().length(), |
| 1469 | ::google::protobuf::internal::WireFormat::PARSE, |
| 1470 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1471 | } else { |
| 1472 | goto handle_unusual; |
| 1473 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1474 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1475 | break; |
| 1476 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1477 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1478 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1479 | handle_unusual: |
| 1480 | if (tag == 0 || |
| 1481 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1482 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1483 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1484 | } |
| 1485 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1486 | input, tag, mutable_unknown_fields())); |
| 1487 | break; |
| 1488 | } |
| 1489 | } |
| 1490 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1491 | success: |
| 1492 | // @@protoc_insertion_point(parse_success:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1493 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1494 | failure: |
| 1495 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileDescriptorProto) |
| 1496 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1497 | #undef DO_ |
| 1498 | } |
| 1499 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1500 | void FileDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1501 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1502 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1503 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1504 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1505 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1506 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1507 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1508 | "google.protobuf.FileDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1509 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1510 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1511 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1512 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1513 | // optional string package = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1514 | if (has_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1515 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1516 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1517 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1518 | "google.protobuf.FileDescriptorProto.package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1519 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1520 | 2, this->package(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1521 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1522 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1523 | // repeated string dependency = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1524 | for (int i = 0; i < this->dependency_size(); i++) { |
Jisi Liu | 4c663d8 | 2015-08-25 17:03:05 -0700 | [diff] [blame] | 1525 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1526 | this->dependency(i).data(), this->dependency(i).length(), |
| 1527 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 1528 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1529 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 1530 | 3, this->dependency(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1531 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1532 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1533 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1534 | 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] | 1535 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1536 | 4, this->message_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1537 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1538 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1539 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1540 | 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] | 1541 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1542 | 5, this->enum_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1543 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1544 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1545 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1546 | 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] | 1547 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1548 | 6, this->service(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1549 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1550 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1551 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1552 | 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] | 1553 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1554 | 7, this->extension(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1555 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1556 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1557 | // optional .google.protobuf.FileOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1558 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1559 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1560 | 8, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1561 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1562 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1563 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1564 | if (has_source_code_info()) { |
| 1565 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1566 | 9, *this->source_code_info_, output); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1567 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1568 | |
| 1569 | // repeated int32 public_dependency = 10; |
| 1570 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1571 | ::google::protobuf::internal::WireFormatLite::WriteInt32( |
| 1572 | 10, this->public_dependency(i), output); |
| 1573 | } |
| 1574 | |
| 1575 | // repeated int32 weak_dependency = 11; |
| 1576 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1577 | ::google::protobuf::internal::WireFormatLite::WriteInt32( |
| 1578 | 11, this->weak_dependency(i), output); |
| 1579 | } |
| 1580 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1581 | // optional string syntax = 12; |
| 1582 | if (has_syntax()) { |
| 1583 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1584 | this->syntax().data(), this->syntax().length(), |
| 1585 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 1586 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1587 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1588 | 12, this->syntax(), output); |
| 1589 | } |
| 1590 | |
| 1591 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1592 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1593 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1594 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1595 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1596 | } |
| 1597 | |
| 1598 | ::google::protobuf::uint8* FileDescriptorProto::SerializeWithCachedSizesToArray( |
| 1599 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1600 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1601 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1602 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1603 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1604 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1605 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1606 | "google.protobuf.FileDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1607 | target = |
| 1608 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1609 | 1, this->name(), 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 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1612 | // optional string package = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1613 | if (has_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1614 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1615 | this->package().data(), this->package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1616 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1617 | "google.protobuf.FileDescriptorProto.package"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1618 | target = |
| 1619 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1620 | 2, this->package(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1621 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1622 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1623 | // repeated string dependency = 3; |
| 1624 | for (int i = 0; i < this->dependency_size(); i++) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1625 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1626 | this->dependency(i).data(), this->dependency(i).length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1627 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1628 | "google.protobuf.FileDescriptorProto.dependency"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1629 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1630 | WriteStringToArray(3, this->dependency(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1631 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1632 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1633 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1634 | 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] | 1635 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1636 | WriteMessageNoVirtualToArray( |
| 1637 | 4, this->message_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1638 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1639 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1640 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1641 | 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] | 1642 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1643 | WriteMessageNoVirtualToArray( |
| 1644 | 5, this->enum_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1645 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1646 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1647 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1648 | 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] | 1649 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1650 | WriteMessageNoVirtualToArray( |
| 1651 | 6, this->service(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1652 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1653 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1654 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1655 | 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] | 1656 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1657 | WriteMessageNoVirtualToArray( |
| 1658 | 7, this->extension(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1659 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1660 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1661 | // optional .google.protobuf.FileOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1662 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1663 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1664 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1665 | 8, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1666 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1667 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1668 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1669 | if (has_source_code_info()) { |
| 1670 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1671 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1672 | 9, *this->source_code_info_, target); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1673 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1674 | |
| 1675 | // repeated int32 public_dependency = 10; |
| 1676 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1677 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1678 | WriteInt32ToArray(10, this->public_dependency(i), target); |
| 1679 | } |
| 1680 | |
| 1681 | // repeated int32 weak_dependency = 11; |
| 1682 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1683 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1684 | WriteInt32ToArray(11, this->weak_dependency(i), target); |
| 1685 | } |
| 1686 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1687 | // optional string syntax = 12; |
| 1688 | if (has_syntax()) { |
| 1689 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 1690 | this->syntax().data(), this->syntax().length(), |
| 1691 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 1692 | "google.protobuf.FileDescriptorProto.syntax"); |
| 1693 | target = |
| 1694 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1695 | 12, this->syntax(), target); |
| 1696 | } |
| 1697 | |
| 1698 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1699 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1700 | unknown_fields(), target); |
| 1701 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1702 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 1703 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1704 | } |
| 1705 | |
| 1706 | int FileDescriptorProto::ByteSize() const { |
| 1707 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1708 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 1709 | if (_has_bits_[0 / 32] & 3u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1710 | // optional string name = 1; |
| 1711 | if (has_name()) { |
| 1712 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1713 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1714 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1715 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1716 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1717 | // optional string package = 2; |
| 1718 | if (has_package()) { |
| 1719 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1720 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1721 | this->package()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1722 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1723 | |
| 1724 | } |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 1725 | if (_has_bits_[9 / 32] & 3584u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1726 | // optional .google.protobuf.FileOptions options = 8; |
| 1727 | if (has_options()) { |
| 1728 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1729 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1730 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1731 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1732 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1733 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
| 1734 | if (has_source_code_info()) { |
| 1735 | total_size += 1 + |
| 1736 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1737 | *this->source_code_info_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1738 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1739 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1740 | // optional string syntax = 12; |
| 1741 | if (has_syntax()) { |
| 1742 | total_size += 1 + |
| 1743 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1744 | this->syntax()); |
| 1745 | } |
| 1746 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1747 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1748 | // repeated string dependency = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1749 | total_size += 1 * this->dependency_size(); |
| 1750 | for (int i = 0; i < this->dependency_size(); i++) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1751 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1752 | this->dependency(i)); |
| 1753 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1754 | |
| 1755 | // repeated int32 public_dependency = 10; |
| 1756 | { |
| 1757 | int data_size = 0; |
| 1758 | for (int i = 0; i < this->public_dependency_size(); i++) { |
| 1759 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 1760 | Int32Size(this->public_dependency(i)); |
| 1761 | } |
| 1762 | total_size += 1 * this->public_dependency_size() + data_size; |
| 1763 | } |
| 1764 | |
| 1765 | // repeated int32 weak_dependency = 11; |
| 1766 | { |
| 1767 | int data_size = 0; |
| 1768 | for (int i = 0; i < this->weak_dependency_size(); i++) { |
| 1769 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 1770 | Int32Size(this->weak_dependency(i)); |
| 1771 | } |
| 1772 | total_size += 1 * this->weak_dependency_size() + data_size; |
| 1773 | } |
| 1774 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1775 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1776 | total_size += 1 * this->message_type_size(); |
| 1777 | for (int i = 0; i < this->message_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1778 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1779 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1780 | this->message_type(i)); |
| 1781 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1782 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1783 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1784 | total_size += 1 * this->enum_type_size(); |
| 1785 | for (int i = 0; i < this->enum_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1786 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1787 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1788 | this->enum_type(i)); |
| 1789 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1790 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1791 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1792 | total_size += 1 * this->service_size(); |
| 1793 | for (int i = 0; i < this->service_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1794 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1795 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1796 | this->service(i)); |
| 1797 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1798 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1799 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 1800 | total_size += 1 * this->extension_size(); |
| 1801 | for (int i = 0; i < this->extension_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1802 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1803 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1804 | this->extension(i)); |
| 1805 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1806 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1807 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1808 | total_size += |
| 1809 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1810 | unknown_fields()); |
| 1811 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1812 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1813 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 1814 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1815 | return total_size; |
| 1816 | } |
| 1817 | |
| 1818 | void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1819 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1820 | const FileDescriptorProto* source = |
| 1821 | ::google::protobuf::internal::DynamicCastToGenerated<const FileDescriptorProto>( |
| 1822 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1823 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 1824 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1825 | } else { |
| 1826 | MergeFrom(*source); |
| 1827 | } |
| 1828 | } |
| 1829 | |
| 1830 | void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1831 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1832 | dependency_.MergeFrom(from.dependency_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1833 | public_dependency_.MergeFrom(from.public_dependency_); |
| 1834 | weak_dependency_.MergeFrom(from.weak_dependency_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1835 | message_type_.MergeFrom(from.message_type_); |
| 1836 | enum_type_.MergeFrom(from.enum_type_); |
| 1837 | service_.MergeFrom(from.service_); |
| 1838 | extension_.MergeFrom(from.extension_); |
| 1839 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1840 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1841 | set_has_name(); |
| 1842 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1843 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1844 | if (from.has_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1845 | set_has_package(); |
| 1846 | package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1847 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1848 | } |
| 1849 | if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1850 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1851 | mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options()); |
| 1852 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1853 | if (from.has_source_code_info()) { |
| 1854 | mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info()); |
| 1855 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1856 | if (from.has_syntax()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1857 | set_has_syntax(); |
| 1858 | syntax_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1859 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 1860 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1861 | if (from._internal_metadata_.have_unknown_fields()) { |
| 1862 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 1863 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1864 | } |
| 1865 | |
| 1866 | void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 1867 | if (&from == this) return; |
| 1868 | Clear(); |
| 1869 | MergeFrom(from); |
| 1870 | } |
| 1871 | |
| 1872 | void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) { |
| 1873 | if (&from == this) return; |
| 1874 | Clear(); |
| 1875 | MergeFrom(from); |
| 1876 | } |
| 1877 | |
| 1878 | bool FileDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 1879 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 1880 | if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false; |
| 1881 | if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; |
| 1882 | if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false; |
| 1883 | if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1884 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 1885 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 1886 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1887 | return true; |
| 1888 | } |
| 1889 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1890 | void FileDescriptorProto::Swap(FileDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1891 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 1892 | InternalSwap(other); |
| 1893 | } |
| 1894 | void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { |
| 1895 | name_.Swap(&other->name_); |
| 1896 | package_.Swap(&other->package_); |
| 1897 | dependency_.UnsafeArenaSwap(&other->dependency_); |
| 1898 | public_dependency_.UnsafeArenaSwap(&other->public_dependency_); |
| 1899 | weak_dependency_.UnsafeArenaSwap(&other->weak_dependency_); |
| 1900 | message_type_.UnsafeArenaSwap(&other->message_type_); |
| 1901 | enum_type_.UnsafeArenaSwap(&other->enum_type_); |
| 1902 | service_.UnsafeArenaSwap(&other->service_); |
| 1903 | extension_.UnsafeArenaSwap(&other->extension_); |
| 1904 | std::swap(options_, other->options_); |
| 1905 | std::swap(source_code_info_, other->source_code_info_); |
| 1906 | syntax_.Swap(&other->syntax_); |
| 1907 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 1908 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1909 | std::swap(_cached_size_, other->_cached_size_); |
| 1910 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 1911 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 1912 | ::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const { |
| 1913 | protobuf_AssignDescriptorsOnce(); |
| 1914 | ::google::protobuf::Metadata metadata; |
| 1915 | metadata.descriptor = FileDescriptorProto_descriptor_; |
| 1916 | metadata.reflection = FileDescriptorProto_reflection_; |
| 1917 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1918 | } |
| 1919 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1920 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 1921 | // FileDescriptorProto |
| 1922 | |
| 1923 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1924 | bool FileDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1925 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 1926 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1927 | void FileDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1928 | _has_bits_[0] |= 0x00000001u; |
| 1929 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1930 | void FileDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1931 | _has_bits_[0] &= ~0x00000001u; |
| 1932 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1933 | void FileDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1934 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1935 | clear_has_name(); |
| 1936 | } |
| 1937 | const ::std::string& FileDescriptorProto::name() const { |
| 1938 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) |
| 1939 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1940 | } |
| 1941 | void FileDescriptorProto::set_name(const ::std::string& value) { |
| 1942 | set_has_name(); |
| 1943 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 1944 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) |
| 1945 | } |
| 1946 | void FileDescriptorProto::set_name(const char* value) { |
| 1947 | set_has_name(); |
| 1948 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 1949 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name) |
| 1950 | } |
| 1951 | void FileDescriptorProto::set_name(const char* value, size_t size) { |
| 1952 | set_has_name(); |
| 1953 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1954 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 1955 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name) |
| 1956 | } |
| 1957 | ::std::string* FileDescriptorProto::mutable_name() { |
| 1958 | set_has_name(); |
| 1959 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) |
| 1960 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1961 | } |
| 1962 | ::std::string* FileDescriptorProto::release_name() { |
| 1963 | clear_has_name(); |
| 1964 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1965 | } |
| 1966 | void FileDescriptorProto::set_allocated_name(::std::string* name) { |
| 1967 | if (name != NULL) { |
| 1968 | set_has_name(); |
| 1969 | } else { |
| 1970 | clear_has_name(); |
| 1971 | } |
| 1972 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 1973 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) |
| 1974 | } |
| 1975 | |
| 1976 | // optional string package = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1977 | bool FileDescriptorProto::has_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1978 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 1979 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1980 | void FileDescriptorProto::set_has_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1981 | _has_bits_[0] |= 0x00000002u; |
| 1982 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1983 | void FileDescriptorProto::clear_has_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1984 | _has_bits_[0] &= ~0x00000002u; |
| 1985 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 1986 | void FileDescriptorProto::clear_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 1987 | package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1988 | clear_has_package(); |
| 1989 | } |
| 1990 | const ::std::string& FileDescriptorProto::package() const { |
| 1991 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) |
| 1992 | return package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1993 | } |
| 1994 | void FileDescriptorProto::set_package(const ::std::string& value) { |
| 1995 | set_has_package(); |
| 1996 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 1997 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) |
| 1998 | } |
| 1999 | void FileDescriptorProto::set_package(const char* value) { |
| 2000 | set_has_package(); |
| 2001 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 2002 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package) |
| 2003 | } |
| 2004 | void FileDescriptorProto::set_package(const char* value, size_t size) { |
| 2005 | set_has_package(); |
| 2006 | package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 2007 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2008 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package) |
| 2009 | } |
| 2010 | ::std::string* FileDescriptorProto::mutable_package() { |
| 2011 | set_has_package(); |
| 2012 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) |
| 2013 | return package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2014 | } |
| 2015 | ::std::string* FileDescriptorProto::release_package() { |
| 2016 | clear_has_package(); |
| 2017 | return package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2018 | } |
| 2019 | void FileDescriptorProto::set_allocated_package(::std::string* package) { |
| 2020 | if (package != NULL) { |
| 2021 | set_has_package(); |
| 2022 | } else { |
| 2023 | clear_has_package(); |
| 2024 | } |
| 2025 | package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package); |
| 2026 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) |
| 2027 | } |
| 2028 | |
| 2029 | // repeated string dependency = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2030 | int FileDescriptorProto::dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2031 | return dependency_.size(); |
| 2032 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2033 | void FileDescriptorProto::clear_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2034 | dependency_.Clear(); |
| 2035 | } |
| 2036 | const ::std::string& FileDescriptorProto::dependency(int index) const { |
| 2037 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) |
| 2038 | return dependency_.Get(index); |
| 2039 | } |
| 2040 | ::std::string* FileDescriptorProto::mutable_dependency(int index) { |
| 2041 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) |
| 2042 | return dependency_.Mutable(index); |
| 2043 | } |
| 2044 | void FileDescriptorProto::set_dependency(int index, const ::std::string& value) { |
| 2045 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) |
| 2046 | dependency_.Mutable(index)->assign(value); |
| 2047 | } |
| 2048 | void FileDescriptorProto::set_dependency(int index, const char* value) { |
| 2049 | dependency_.Mutable(index)->assign(value); |
| 2050 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.dependency) |
| 2051 | } |
| 2052 | void FileDescriptorProto::set_dependency(int index, const char* value, size_t size) { |
| 2053 | dependency_.Mutable(index)->assign( |
| 2054 | reinterpret_cast<const char*>(value), size); |
| 2055 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency) |
| 2056 | } |
| 2057 | ::std::string* FileDescriptorProto::add_dependency() { |
| 2058 | return dependency_.Add(); |
| 2059 | } |
| 2060 | void FileDescriptorProto::add_dependency(const ::std::string& value) { |
| 2061 | dependency_.Add()->assign(value); |
| 2062 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) |
| 2063 | } |
| 2064 | void FileDescriptorProto::add_dependency(const char* value) { |
| 2065 | dependency_.Add()->assign(value); |
| 2066 | // @@protoc_insertion_point(field_add_char:google.protobuf.FileDescriptorProto.dependency) |
| 2067 | } |
| 2068 | void FileDescriptorProto::add_dependency(const char* value, size_t size) { |
| 2069 | dependency_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 2070 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency) |
| 2071 | } |
| 2072 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 2073 | FileDescriptorProto::dependency() const { |
| 2074 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency) |
| 2075 | return dependency_; |
| 2076 | } |
| 2077 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 2078 | FileDescriptorProto::mutable_dependency() { |
| 2079 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency) |
| 2080 | return &dependency_; |
| 2081 | } |
| 2082 | |
| 2083 | // repeated int32 public_dependency = 10; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2084 | int FileDescriptorProto::public_dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2085 | return public_dependency_.size(); |
| 2086 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2087 | void FileDescriptorProto::clear_public_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2088 | public_dependency_.Clear(); |
| 2089 | } |
| 2090 | ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const { |
| 2091 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency) |
| 2092 | return public_dependency_.Get(index); |
| 2093 | } |
| 2094 | void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) { |
| 2095 | public_dependency_.Set(index, value); |
| 2096 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency) |
| 2097 | } |
| 2098 | void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) { |
| 2099 | public_dependency_.Add(value); |
| 2100 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency) |
| 2101 | } |
| 2102 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 2103 | FileDescriptorProto::public_dependency() const { |
| 2104 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency) |
| 2105 | return public_dependency_; |
| 2106 | } |
| 2107 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 2108 | FileDescriptorProto::mutable_public_dependency() { |
| 2109 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency) |
| 2110 | return &public_dependency_; |
| 2111 | } |
| 2112 | |
| 2113 | // repeated int32 weak_dependency = 11; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2114 | int FileDescriptorProto::weak_dependency_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2115 | return weak_dependency_.size(); |
| 2116 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2117 | void FileDescriptorProto::clear_weak_dependency() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2118 | weak_dependency_.Clear(); |
| 2119 | } |
| 2120 | ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const { |
| 2121 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2122 | return weak_dependency_.Get(index); |
| 2123 | } |
| 2124 | void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) { |
| 2125 | weak_dependency_.Set(index, value); |
| 2126 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2127 | } |
| 2128 | void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) { |
| 2129 | weak_dependency_.Add(value); |
| 2130 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2131 | } |
| 2132 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 2133 | FileDescriptorProto::weak_dependency() const { |
| 2134 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2135 | return weak_dependency_; |
| 2136 | } |
| 2137 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 2138 | FileDescriptorProto::mutable_weak_dependency() { |
| 2139 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency) |
| 2140 | return &weak_dependency_; |
| 2141 | } |
| 2142 | |
| 2143 | // repeated .google.protobuf.DescriptorProto message_type = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2144 | int FileDescriptorProto::message_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2145 | return message_type_.size(); |
| 2146 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2147 | void FileDescriptorProto::clear_message_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2148 | message_type_.Clear(); |
| 2149 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2150 | const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2151 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type) |
| 2152 | return message_type_.Get(index); |
| 2153 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2154 | ::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2155 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type) |
| 2156 | return message_type_.Mutable(index); |
| 2157 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2158 | ::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2159 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type) |
| 2160 | return message_type_.Add(); |
| 2161 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2162 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2163 | FileDescriptorProto::mutable_message_type() { |
| 2164 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type) |
| 2165 | return &message_type_; |
| 2166 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2167 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& |
| 2168 | FileDescriptorProto::message_type() const { |
| 2169 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type) |
| 2170 | return message_type_; |
| 2171 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2172 | |
| 2173 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2174 | int FileDescriptorProto::enum_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2175 | return enum_type_.size(); |
| 2176 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2177 | void FileDescriptorProto::clear_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2178 | enum_type_.Clear(); |
| 2179 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2180 | const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2181 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type) |
| 2182 | return enum_type_.Get(index); |
| 2183 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2184 | ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2185 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type) |
| 2186 | return enum_type_.Mutable(index); |
| 2187 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2188 | ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2189 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type) |
| 2190 | return enum_type_.Add(); |
| 2191 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2192 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2193 | FileDescriptorProto::mutable_enum_type() { |
| 2194 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type) |
| 2195 | return &enum_type_; |
| 2196 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2197 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& |
| 2198 | FileDescriptorProto::enum_type() const { |
| 2199 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type) |
| 2200 | return enum_type_; |
| 2201 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2202 | |
| 2203 | // repeated .google.protobuf.ServiceDescriptorProto service = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2204 | int FileDescriptorProto::service_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2205 | return service_.size(); |
| 2206 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2207 | void FileDescriptorProto::clear_service() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2208 | service_.Clear(); |
| 2209 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2210 | const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2211 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service) |
| 2212 | return service_.Get(index); |
| 2213 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2214 | ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2215 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service) |
| 2216 | return service_.Mutable(index); |
| 2217 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2218 | ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2219 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service) |
| 2220 | return service_.Add(); |
| 2221 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2222 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2223 | FileDescriptorProto::mutable_service() { |
| 2224 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service) |
| 2225 | return &service_; |
| 2226 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2227 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& |
| 2228 | FileDescriptorProto::service() const { |
| 2229 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service) |
| 2230 | return service_; |
| 2231 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2232 | |
| 2233 | // repeated .google.protobuf.FieldDescriptorProto extension = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2234 | int FileDescriptorProto::extension_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2235 | return extension_.size(); |
| 2236 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2237 | void FileDescriptorProto::clear_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2238 | extension_.Clear(); |
| 2239 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2240 | const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2241 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension) |
| 2242 | return extension_.Get(index); |
| 2243 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2244 | ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2245 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension) |
| 2246 | return extension_.Mutable(index); |
| 2247 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2248 | ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2249 | // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension) |
| 2250 | return extension_.Add(); |
| 2251 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2252 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2253 | FileDescriptorProto::mutable_extension() { |
| 2254 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension) |
| 2255 | return &extension_; |
| 2256 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2257 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 2258 | FileDescriptorProto::extension() const { |
| 2259 | // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension) |
| 2260 | return extension_; |
| 2261 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2262 | |
| 2263 | // optional .google.protobuf.FileOptions options = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2264 | bool FileDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2265 | return (_has_bits_[0] & 0x00000200u) != 0; |
| 2266 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2267 | void FileDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2268 | _has_bits_[0] |= 0x00000200u; |
| 2269 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2270 | void FileDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2271 | _has_bits_[0] &= ~0x00000200u; |
| 2272 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2273 | void FileDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2274 | if (options_ != NULL) options_->::google::protobuf::FileOptions::Clear(); |
| 2275 | clear_has_options(); |
| 2276 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2277 | const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2278 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) |
| 2279 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 2280 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2281 | ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2282 | set_has_options(); |
| 2283 | if (options_ == NULL) { |
| 2284 | options_ = new ::google::protobuf::FileOptions; |
| 2285 | } |
| 2286 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) |
| 2287 | return options_; |
| 2288 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2289 | ::google::protobuf::FileOptions* FileDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2290 | clear_has_options(); |
| 2291 | ::google::protobuf::FileOptions* temp = options_; |
| 2292 | options_ = NULL; |
| 2293 | return temp; |
| 2294 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2295 | void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2296 | delete options_; |
| 2297 | options_ = options; |
| 2298 | if (options) { |
| 2299 | set_has_options(); |
| 2300 | } else { |
| 2301 | clear_has_options(); |
| 2302 | } |
| 2303 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.options) |
| 2304 | } |
| 2305 | |
| 2306 | // optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2307 | bool FileDescriptorProto::has_source_code_info() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2308 | return (_has_bits_[0] & 0x00000400u) != 0; |
| 2309 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2310 | void FileDescriptorProto::set_has_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2311 | _has_bits_[0] |= 0x00000400u; |
| 2312 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2313 | void FileDescriptorProto::clear_has_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2314 | _has_bits_[0] &= ~0x00000400u; |
| 2315 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2316 | void FileDescriptorProto::clear_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2317 | if (source_code_info_ != NULL) source_code_info_->::google::protobuf::SourceCodeInfo::Clear(); |
| 2318 | clear_has_source_code_info(); |
| 2319 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2320 | const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2321 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) |
| 2322 | return source_code_info_ != NULL ? *source_code_info_ : *default_instance_->source_code_info_; |
| 2323 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2324 | ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2325 | set_has_source_code_info(); |
| 2326 | if (source_code_info_ == NULL) { |
| 2327 | source_code_info_ = new ::google::protobuf::SourceCodeInfo; |
| 2328 | } |
| 2329 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) |
| 2330 | return source_code_info_; |
| 2331 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2332 | ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2333 | clear_has_source_code_info(); |
| 2334 | ::google::protobuf::SourceCodeInfo* temp = source_code_info_; |
| 2335 | source_code_info_ = NULL; |
| 2336 | return temp; |
| 2337 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 2338 | void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2339 | delete source_code_info_; |
| 2340 | source_code_info_ = source_code_info; |
| 2341 | if (source_code_info) { |
| 2342 | set_has_source_code_info(); |
| 2343 | } else { |
| 2344 | clear_has_source_code_info(); |
| 2345 | } |
| 2346 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.source_code_info) |
| 2347 | } |
| 2348 | |
| 2349 | // optional string syntax = 12; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2350 | bool FileDescriptorProto::has_syntax() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2351 | return (_has_bits_[0] & 0x00000800u) != 0; |
| 2352 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2353 | void FileDescriptorProto::set_has_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2354 | _has_bits_[0] |= 0x00000800u; |
| 2355 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2356 | void FileDescriptorProto::clear_has_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2357 | _has_bits_[0] &= ~0x00000800u; |
| 2358 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2359 | void FileDescriptorProto::clear_syntax() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2360 | syntax_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2361 | clear_has_syntax(); |
| 2362 | } |
| 2363 | const ::std::string& FileDescriptorProto::syntax() const { |
| 2364 | // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) |
| 2365 | return syntax_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2366 | } |
| 2367 | void FileDescriptorProto::set_syntax(const ::std::string& value) { |
| 2368 | set_has_syntax(); |
| 2369 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 2370 | // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) |
| 2371 | } |
| 2372 | void FileDescriptorProto::set_syntax(const char* value) { |
| 2373 | set_has_syntax(); |
| 2374 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 2375 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax) |
| 2376 | } |
| 2377 | void FileDescriptorProto::set_syntax(const char* value, size_t size) { |
| 2378 | set_has_syntax(); |
| 2379 | syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 2380 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 2381 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax) |
| 2382 | } |
| 2383 | ::std::string* FileDescriptorProto::mutable_syntax() { |
| 2384 | set_has_syntax(); |
| 2385 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) |
| 2386 | return syntax_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2387 | } |
| 2388 | ::std::string* FileDescriptorProto::release_syntax() { |
| 2389 | clear_has_syntax(); |
| 2390 | return syntax_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2391 | } |
| 2392 | void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) { |
| 2393 | if (syntax != NULL) { |
| 2394 | set_has_syntax(); |
| 2395 | } else { |
| 2396 | clear_has_syntax(); |
| 2397 | } |
| 2398 | syntax_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax); |
| 2399 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) |
| 2400 | } |
| 2401 | |
| 2402 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2403 | |
| 2404 | // =================================================================== |
| 2405 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2406 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2407 | const int DescriptorProto_ExtensionRange::kStartFieldNumber; |
| 2408 | const int DescriptorProto_ExtensionRange::kEndFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2409 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2410 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2411 | DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2412 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2413 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2414 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2415 | } |
| 2416 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2417 | void DescriptorProto_ExtensionRange::InitAsDefaultInstance() { |
| 2418 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2419 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2420 | DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2421 | : ::google::protobuf::Message(), |
| 2422 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2423 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2424 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2425 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2426 | } |
| 2427 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2428 | void DescriptorProto_ExtensionRange::SharedCtor() { |
| 2429 | _cached_size_ = 0; |
| 2430 | start_ = 0; |
| 2431 | end_ = 0; |
| 2432 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2433 | } |
| 2434 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2435 | DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2436 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2437 | SharedDtor(); |
| 2438 | } |
| 2439 | |
| 2440 | void DescriptorProto_ExtensionRange::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2441 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2442 | } |
| 2443 | } |
| 2444 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2445 | void DescriptorProto_ExtensionRange::SetCachedSize(int size) const { |
| 2446 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2447 | _cached_size_ = size; |
| 2448 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2449 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2450 | const ::google::protobuf::Descriptor* DescriptorProto_ExtensionRange::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2451 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2452 | return DescriptorProto_ExtensionRange_descriptor_; |
| 2453 | } |
| 2454 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2455 | const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 2456 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 2457 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2458 | } |
| 2459 | |
| 2460 | DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::default_instance_ = NULL; |
| 2461 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2462 | DescriptorProto_ExtensionRange* DescriptorProto_ExtensionRange::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2463 | DescriptorProto_ExtensionRange* n = new DescriptorProto_ExtensionRange; |
| 2464 | if (arena != NULL) { |
| 2465 | arena->Own(n); |
| 2466 | } |
| 2467 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2468 | } |
| 2469 | |
| 2470 | void DescriptorProto_ExtensionRange::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2471 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 2472 | &reinterpret_cast<DescriptorProto_ExtensionRange*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2473 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2474 | #define ZR_(first, last) do {\ |
| 2475 | ::memset(&first, 0,\ |
| 2476 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 2477 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2478 | |
| 2479 | ZR_(start_, end_); |
| 2480 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 2481 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2482 | #undef ZR_ |
| 2483 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2484 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2485 | if (_internal_metadata_.have_unknown_fields()) { |
| 2486 | mutable_unknown_fields()->Clear(); |
| 2487 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2488 | } |
| 2489 | |
| 2490 | bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( |
| 2491 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2492 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2493 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2494 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange) |
| 2495 | for (;;) { |
| 2496 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 2497 | tag = p.first; |
| 2498 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2499 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2500 | // optional int32 start = 1; |
| 2501 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2502 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2503 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2504 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2505 | input, &start_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2506 | set_has_start(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2507 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2508 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2509 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2510 | if (input->ExpectTag(16)) goto parse_end; |
| 2511 | break; |
| 2512 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2513 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2514 | // optional int32 end = 2; |
| 2515 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2516 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2517 | parse_end: |
| 2518 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2519 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2520 | input, &end_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2521 | set_has_end(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2522 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2523 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2524 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2525 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2526 | break; |
| 2527 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2528 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2529 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2530 | handle_unusual: |
| 2531 | if (tag == 0 || |
| 2532 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2533 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2534 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2535 | } |
| 2536 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2537 | input, tag, mutable_unknown_fields())); |
| 2538 | break; |
| 2539 | } |
| 2540 | } |
| 2541 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2542 | success: |
| 2543 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2544 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2545 | failure: |
| 2546 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ExtensionRange) |
| 2547 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2548 | #undef DO_ |
| 2549 | } |
| 2550 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2551 | void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2552 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2553 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2554 | // optional int32 start = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2555 | if (has_start()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2556 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2557 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2558 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2559 | // optional int32 end = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2560 | if (has_end()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2561 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2562 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2563 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2564 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2565 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2566 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2567 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2568 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2569 | } |
| 2570 | |
| 2571 | ::google::protobuf::uint8* DescriptorProto_ExtensionRange::SerializeWithCachedSizesToArray( |
| 2572 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2573 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2574 | // optional int32 start = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2575 | if (has_start()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2576 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2577 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2578 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2579 | // optional int32 end = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2580 | if (has_end()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2581 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2582 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2583 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2584 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2585 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2586 | unknown_fields(), target); |
| 2587 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2588 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2589 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2590 | } |
| 2591 | |
| 2592 | int DescriptorProto_ExtensionRange::ByteSize() const { |
| 2593 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2594 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 2595 | if (_has_bits_[0 / 32] & 3u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2596 | // optional int32 start = 1; |
| 2597 | if (has_start()) { |
| 2598 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2599 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2600 | this->start()); |
| 2601 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2602 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2603 | // optional int32 end = 2; |
| 2604 | if (has_end()) { |
| 2605 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2606 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2607 | this->end()); |
| 2608 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2609 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2610 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2611 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2612 | total_size += |
| 2613 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2614 | unknown_fields()); |
| 2615 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2616 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2617 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 2618 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2619 | return total_size; |
| 2620 | } |
| 2621 | |
| 2622 | void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2623 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2624 | const DescriptorProto_ExtensionRange* source = |
| 2625 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ExtensionRange>( |
| 2626 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2627 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 2628 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2629 | } else { |
| 2630 | MergeFrom(*source); |
| 2631 | } |
| 2632 | } |
| 2633 | |
| 2634 | void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRange& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 2635 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2636 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2637 | if (from.has_start()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2638 | set_start(from.start()); |
| 2639 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 2640 | if (from.has_end()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2641 | set_end(from.end()); |
| 2642 | } |
| 2643 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2644 | if (from._internal_metadata_.have_unknown_fields()) { |
| 2645 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 2646 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2647 | } |
| 2648 | |
| 2649 | void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) { |
| 2650 | if (&from == this) return; |
| 2651 | Clear(); |
| 2652 | MergeFrom(from); |
| 2653 | } |
| 2654 | |
| 2655 | void DescriptorProto_ExtensionRange::CopyFrom(const DescriptorProto_ExtensionRange& from) { |
| 2656 | if (&from == this) return; |
| 2657 | Clear(); |
| 2658 | MergeFrom(from); |
| 2659 | } |
| 2660 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 2661 | bool DescriptorProto_ExtensionRange::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 2662 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 2663 | return true; |
| 2664 | } |
| 2665 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 2666 | void DescriptorProto_ExtensionRange::Swap(DescriptorProto_ExtensionRange* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2667 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2668 | InternalSwap(other); |
| 2669 | } |
| 2670 | void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) { |
| 2671 | std::swap(start_, other->start_); |
| 2672 | std::swap(end_, other->end_); |
| 2673 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 2674 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2675 | std::swap(_cached_size_, other->_cached_size_); |
| 2676 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 2677 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2678 | ::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { |
| 2679 | protobuf_AssignDescriptorsOnce(); |
| 2680 | ::google::protobuf::Metadata metadata; |
| 2681 | metadata.descriptor = DescriptorProto_ExtensionRange_descriptor_; |
| 2682 | metadata.reflection = DescriptorProto_ExtensionRange_reflection_; |
| 2683 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2684 | } |
| 2685 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2686 | |
| 2687 | // ------------------------------------------------------------------- |
| 2688 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2689 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2690 | const int DescriptorProto_ReservedRange::kStartFieldNumber; |
| 2691 | const int DescriptorProto_ReservedRange::kEndFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2692 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2693 | |
| 2694 | DescriptorProto_ReservedRange::DescriptorProto_ReservedRange() |
| 2695 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 2696 | SharedCtor(); |
| 2697 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2698 | } |
| 2699 | |
| 2700 | void DescriptorProto_ReservedRange::InitAsDefaultInstance() { |
| 2701 | } |
| 2702 | |
| 2703 | DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) |
| 2704 | : ::google::protobuf::Message(), |
| 2705 | _internal_metadata_(NULL) { |
| 2706 | SharedCtor(); |
| 2707 | MergeFrom(from); |
| 2708 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2709 | } |
| 2710 | |
| 2711 | void DescriptorProto_ReservedRange::SharedCtor() { |
| 2712 | _cached_size_ = 0; |
| 2713 | start_ = 0; |
| 2714 | end_ = 0; |
| 2715 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2716 | } |
| 2717 | |
| 2718 | DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() { |
| 2719 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange) |
| 2720 | SharedDtor(); |
| 2721 | } |
| 2722 | |
| 2723 | void DescriptorProto_ReservedRange::SharedDtor() { |
| 2724 | if (this != default_instance_) { |
| 2725 | } |
| 2726 | } |
| 2727 | |
| 2728 | void DescriptorProto_ReservedRange::SetCachedSize(int size) const { |
| 2729 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2730 | _cached_size_ = size; |
| 2731 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2732 | } |
| 2733 | const ::google::protobuf::Descriptor* DescriptorProto_ReservedRange::descriptor() { |
| 2734 | protobuf_AssignDescriptorsOnce(); |
| 2735 | return DescriptorProto_ReservedRange_descriptor_; |
| 2736 | } |
| 2737 | |
| 2738 | const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() { |
| 2739 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 2740 | return *default_instance_; |
| 2741 | } |
| 2742 | |
| 2743 | DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::default_instance_ = NULL; |
| 2744 | |
| 2745 | DescriptorProto_ReservedRange* DescriptorProto_ReservedRange::New(::google::protobuf::Arena* arena) const { |
| 2746 | DescriptorProto_ReservedRange* n = new DescriptorProto_ReservedRange; |
| 2747 | if (arena != NULL) { |
| 2748 | arena->Own(n); |
| 2749 | } |
| 2750 | return n; |
| 2751 | } |
| 2752 | |
| 2753 | void DescriptorProto_ReservedRange::Clear() { |
| 2754 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 2755 | &reinterpret_cast<DescriptorProto_ReservedRange*>(16)->f) |
| 2756 | |
| 2757 | #define ZR_(first, last) do {\ |
| 2758 | ::memset(&first, 0,\ |
| 2759 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 2760 | } while (0) |
| 2761 | |
| 2762 | ZR_(start_, end_); |
| 2763 | |
| 2764 | #undef ZR_HELPER_ |
| 2765 | #undef ZR_ |
| 2766 | |
| 2767 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 2768 | if (_internal_metadata_.have_unknown_fields()) { |
| 2769 | mutable_unknown_fields()->Clear(); |
| 2770 | } |
| 2771 | } |
| 2772 | |
| 2773 | bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( |
| 2774 | ::google::protobuf::io::CodedInputStream* input) { |
| 2775 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 2776 | ::google::protobuf::uint32 tag; |
| 2777 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2778 | for (;;) { |
| 2779 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 2780 | tag = p.first; |
| 2781 | if (!p.second) goto handle_unusual; |
| 2782 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2783 | // optional int32 start = 1; |
| 2784 | case 1: { |
| 2785 | if (tag == 8) { |
| 2786 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2787 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2788 | input, &start_))); |
| 2789 | set_has_start(); |
| 2790 | } else { |
| 2791 | goto handle_unusual; |
| 2792 | } |
| 2793 | if (input->ExpectTag(16)) goto parse_end; |
| 2794 | break; |
| 2795 | } |
| 2796 | |
| 2797 | // optional int32 end = 2; |
| 2798 | case 2: { |
| 2799 | if (tag == 16) { |
| 2800 | parse_end: |
| 2801 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2802 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2803 | input, &end_))); |
| 2804 | set_has_end(); |
| 2805 | } else { |
| 2806 | goto handle_unusual; |
| 2807 | } |
| 2808 | if (input->ExpectAtEnd()) goto success; |
| 2809 | break; |
| 2810 | } |
| 2811 | |
| 2812 | default: { |
| 2813 | handle_unusual: |
| 2814 | if (tag == 0 || |
| 2815 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 2816 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 2817 | goto success; |
| 2818 | } |
| 2819 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2820 | input, tag, mutable_unknown_fields())); |
| 2821 | break; |
| 2822 | } |
| 2823 | } |
| 2824 | } |
| 2825 | success: |
| 2826 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto.ReservedRange) |
| 2827 | return true; |
| 2828 | failure: |
| 2829 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto.ReservedRange) |
| 2830 | return false; |
| 2831 | #undef DO_ |
| 2832 | } |
| 2833 | |
| 2834 | void DescriptorProto_ReservedRange::SerializeWithCachedSizes( |
| 2835 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2836 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2837 | // optional int32 start = 1; |
| 2838 | if (has_start()) { |
| 2839 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); |
| 2840 | } |
| 2841 | |
| 2842 | // optional int32 end = 2; |
| 2843 | if (has_end()) { |
| 2844 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); |
| 2845 | } |
| 2846 | |
| 2847 | if (_internal_metadata_.have_unknown_fields()) { |
| 2848 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2849 | unknown_fields(), output); |
| 2850 | } |
| 2851 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) |
| 2852 | } |
| 2853 | |
| 2854 | ::google::protobuf::uint8* DescriptorProto_ReservedRange::SerializeWithCachedSizesToArray( |
| 2855 | ::google::protobuf::uint8* target) const { |
| 2856 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) |
| 2857 | // optional int32 start = 1; |
| 2858 | if (has_start()) { |
| 2859 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); |
| 2860 | } |
| 2861 | |
| 2862 | // optional int32 end = 2; |
| 2863 | if (has_end()) { |
| 2864 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); |
| 2865 | } |
| 2866 | |
| 2867 | if (_internal_metadata_.have_unknown_fields()) { |
| 2868 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2869 | unknown_fields(), target); |
| 2870 | } |
| 2871 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) |
| 2872 | return target; |
| 2873 | } |
| 2874 | |
| 2875 | int DescriptorProto_ReservedRange::ByteSize() const { |
| 2876 | int total_size = 0; |
| 2877 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 2878 | if (_has_bits_[0 / 32] & 3u) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2879 | // optional int32 start = 1; |
| 2880 | if (has_start()) { |
| 2881 | total_size += 1 + |
| 2882 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 2883 | this->start()); |
| 2884 | } |
| 2885 | |
| 2886 | // optional int32 end = 2; |
| 2887 | if (has_end()) { |
| 2888 | total_size += 1 + |
| 2889 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 2890 | this->end()); |
| 2891 | } |
| 2892 | |
| 2893 | } |
| 2894 | if (_internal_metadata_.have_unknown_fields()) { |
| 2895 | total_size += |
| 2896 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2897 | unknown_fields()); |
| 2898 | } |
| 2899 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 2900 | _cached_size_ = total_size; |
| 2901 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 2902 | return total_size; |
| 2903 | } |
| 2904 | |
| 2905 | void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) { |
| 2906 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2907 | const DescriptorProto_ReservedRange* source = |
| 2908 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto_ReservedRange>( |
| 2909 | &from); |
| 2910 | if (source == NULL) { |
| 2911 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 2912 | } else { |
| 2913 | MergeFrom(*source); |
| 2914 | } |
| 2915 | } |
| 2916 | |
| 2917 | void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRange& from) { |
| 2918 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 2919 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 2920 | if (from.has_start()) { |
| 2921 | set_start(from.start()); |
| 2922 | } |
| 2923 | if (from.has_end()) { |
| 2924 | set_end(from.end()); |
| 2925 | } |
| 2926 | } |
| 2927 | if (from._internal_metadata_.have_unknown_fields()) { |
| 2928 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 2929 | } |
| 2930 | } |
| 2931 | |
| 2932 | void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) { |
| 2933 | if (&from == this) return; |
| 2934 | Clear(); |
| 2935 | MergeFrom(from); |
| 2936 | } |
| 2937 | |
| 2938 | void DescriptorProto_ReservedRange::CopyFrom(const DescriptorProto_ReservedRange& from) { |
| 2939 | if (&from == this) return; |
| 2940 | Clear(); |
| 2941 | MergeFrom(from); |
| 2942 | } |
| 2943 | |
| 2944 | bool DescriptorProto_ReservedRange::IsInitialized() const { |
| 2945 | |
| 2946 | return true; |
| 2947 | } |
| 2948 | |
| 2949 | void DescriptorProto_ReservedRange::Swap(DescriptorProto_ReservedRange* other) { |
| 2950 | if (other == this) return; |
| 2951 | InternalSwap(other); |
| 2952 | } |
| 2953 | void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* other) { |
| 2954 | std::swap(start_, other->start_); |
| 2955 | std::swap(end_, other->end_); |
| 2956 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 2957 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2958 | std::swap(_cached_size_, other->_cached_size_); |
| 2959 | } |
| 2960 | |
| 2961 | ::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const { |
| 2962 | protobuf_AssignDescriptorsOnce(); |
| 2963 | ::google::protobuf::Metadata metadata; |
| 2964 | metadata.descriptor = DescriptorProto_ReservedRange_descriptor_; |
| 2965 | metadata.reflection = DescriptorProto_ReservedRange_reflection_; |
| 2966 | return metadata; |
| 2967 | } |
| 2968 | |
| 2969 | |
| 2970 | // ------------------------------------------------------------------- |
| 2971 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2972 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2973 | const int DescriptorProto::kNameFieldNumber; |
| 2974 | const int DescriptorProto::kFieldFieldNumber; |
| 2975 | const int DescriptorProto::kExtensionFieldNumber; |
| 2976 | const int DescriptorProto::kNestedTypeFieldNumber; |
| 2977 | const int DescriptorProto::kEnumTypeFieldNumber; |
| 2978 | const int DescriptorProto::kExtensionRangeFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2979 | const int DescriptorProto::kOneofDeclFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 2980 | const int DescriptorProto::kOptionsFieldNumber; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2981 | const int DescriptorProto::kReservedRangeFieldNumber; |
| 2982 | const int DescriptorProto::kReservedNameFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 2983 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2984 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2985 | DescriptorProto::DescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 2986 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2987 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 2988 | // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 2989 | } |
| 2990 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 2991 | void DescriptorProto::InitAsDefaultInstance() { |
| 2992 | options_ = const_cast< ::google::protobuf::MessageOptions*>(&::google::protobuf::MessageOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2993 | } |
| 2994 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 2995 | DescriptorProto::DescriptorProto(const DescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 2996 | : ::google::protobuf::Message(), |
| 2997 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 2998 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 2999 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3000 | // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3001 | } |
| 3002 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3003 | void DescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3004 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3005 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3006 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3007 | options_ = NULL; |
| 3008 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 3009 | } |
| 3010 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3011 | DescriptorProto::~DescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3012 | // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3013 | SharedDtor(); |
| 3014 | } |
| 3015 | |
| 3016 | void DescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3017 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3018 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3019 | delete options_; |
| 3020 | } |
| 3021 | } |
| 3022 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3023 | void DescriptorProto::SetCachedSize(int size) const { |
| 3024 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 3025 | _cached_size_ = size; |
| 3026 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 3027 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3028 | const ::google::protobuf::Descriptor* DescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3029 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3030 | return DescriptorProto_descriptor_; |
| 3031 | } |
| 3032 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3033 | const DescriptorProto& DescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 3034 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 3035 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3036 | } |
| 3037 | |
| 3038 | DescriptorProto* DescriptorProto::default_instance_ = NULL; |
| 3039 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3040 | DescriptorProto* DescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3041 | DescriptorProto* n = new DescriptorProto; |
| 3042 | if (arena != NULL) { |
| 3043 | arena->Own(n); |
| 3044 | } |
| 3045 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3046 | } |
| 3047 | |
| 3048 | void DescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 3049 | if (_has_bits_[0 / 32] & 129u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3050 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3051 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3052 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3053 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3054 | if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); |
| 3055 | } |
| 3056 | } |
| 3057 | field_.Clear(); |
| 3058 | extension_.Clear(); |
| 3059 | nested_type_.Clear(); |
| 3060 | enum_type_.Clear(); |
| 3061 | extension_range_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3062 | oneof_decl_.Clear(); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3063 | reserved_range_.Clear(); |
| 3064 | reserved_name_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3065 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3066 | if (_internal_metadata_.have_unknown_fields()) { |
| 3067 | mutable_unknown_fields()->Clear(); |
| 3068 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3069 | } |
| 3070 | |
| 3071 | bool DescriptorProto::MergePartialFromCodedStream( |
| 3072 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3073 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3074 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3075 | // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto) |
| 3076 | for (;;) { |
| 3077 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 3078 | tag = p.first; |
| 3079 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3080 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3081 | // optional string name = 1; |
| 3082 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3083 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3084 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3085 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3086 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3087 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3088 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3089 | "google.protobuf.DescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3090 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3091 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3092 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3093 | if (input->ExpectTag(18)) goto parse_field; |
| 3094 | break; |
| 3095 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3096 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3097 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
| 3098 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3099 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3100 | parse_field: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3101 | DO_(input->IncrementRecursionDepth()); |
| 3102 | parse_loop_field: |
| 3103 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3104 | input, add_field())); |
| 3105 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3106 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3107 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3108 | if (input->ExpectTag(18)) goto parse_loop_field; |
| 3109 | if (input->ExpectTag(26)) goto parse_loop_nested_type; |
| 3110 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3111 | break; |
| 3112 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3113 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3114 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
| 3115 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3116 | if (tag == 26) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3117 | DO_(input->IncrementRecursionDepth()); |
| 3118 | parse_loop_nested_type: |
| 3119 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3120 | input, add_nested_type())); |
| 3121 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3122 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3123 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3124 | if (input->ExpectTag(26)) goto parse_loop_nested_type; |
| 3125 | if (input->ExpectTag(34)) goto parse_loop_enum_type; |
| 3126 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3127 | break; |
| 3128 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3129 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3130 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
| 3131 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3132 | if (tag == 34) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3133 | DO_(input->IncrementRecursionDepth()); |
| 3134 | parse_loop_enum_type: |
| 3135 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3136 | input, add_enum_type())); |
| 3137 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3138 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3139 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3140 | if (input->ExpectTag(34)) goto parse_loop_enum_type; |
| 3141 | if (input->ExpectTag(42)) goto parse_loop_extension_range; |
| 3142 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3143 | break; |
| 3144 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3145 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3146 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
| 3147 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3148 | if (tag == 42) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3149 | DO_(input->IncrementRecursionDepth()); |
| 3150 | parse_loop_extension_range: |
| 3151 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3152 | input, add_extension_range())); |
| 3153 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3154 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3155 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3156 | if (input->ExpectTag(42)) goto parse_loop_extension_range; |
| 3157 | if (input->ExpectTag(50)) goto parse_loop_extension; |
| 3158 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3159 | break; |
| 3160 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3161 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3162 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
| 3163 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3164 | if (tag == 50) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3165 | DO_(input->IncrementRecursionDepth()); |
| 3166 | parse_loop_extension: |
| 3167 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3168 | input, add_extension())); |
| 3169 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3170 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3171 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3172 | if (input->ExpectTag(50)) goto parse_loop_extension; |
| 3173 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3174 | if (input->ExpectTag(58)) goto parse_options; |
| 3175 | break; |
| 3176 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3177 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3178 | // optional .google.protobuf.MessageOptions options = 7; |
| 3179 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3180 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3181 | parse_options: |
| 3182 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 3183 | input, mutable_options())); |
| 3184 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3185 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3186 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3187 | if (input->ExpectTag(66)) goto parse_oneof_decl; |
| 3188 | break; |
| 3189 | } |
| 3190 | |
| 3191 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
| 3192 | case 8: { |
| 3193 | if (tag == 66) { |
| 3194 | parse_oneof_decl: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3195 | DO_(input->IncrementRecursionDepth()); |
| 3196 | parse_loop_oneof_decl: |
| 3197 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3198 | input, add_oneof_decl())); |
| 3199 | } else { |
| 3200 | goto handle_unusual; |
| 3201 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3202 | if (input->ExpectTag(66)) goto parse_loop_oneof_decl; |
| 3203 | if (input->ExpectTag(74)) goto parse_loop_reserved_range; |
| 3204 | input->UnsafeDecrementRecursionDepth(); |
| 3205 | break; |
| 3206 | } |
| 3207 | |
| 3208 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3209 | case 9: { |
| 3210 | if (tag == 74) { |
| 3211 | DO_(input->IncrementRecursionDepth()); |
| 3212 | parse_loop_reserved_range: |
| 3213 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| 3214 | input, add_reserved_range())); |
| 3215 | } else { |
| 3216 | goto handle_unusual; |
| 3217 | } |
| 3218 | if (input->ExpectTag(74)) goto parse_loop_reserved_range; |
| 3219 | input->UnsafeDecrementRecursionDepth(); |
| 3220 | if (input->ExpectTag(82)) goto parse_reserved_name; |
| 3221 | break; |
| 3222 | } |
| 3223 | |
| 3224 | // repeated string reserved_name = 10; |
| 3225 | case 10: { |
| 3226 | if (tag == 82) { |
| 3227 | parse_reserved_name: |
| 3228 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3229 | input, this->add_reserved_name())); |
| 3230 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3231 | this->reserved_name(this->reserved_name_size() - 1).data(), |
| 3232 | this->reserved_name(this->reserved_name_size() - 1).length(), |
| 3233 | ::google::protobuf::internal::WireFormat::PARSE, |
| 3234 | "google.protobuf.DescriptorProto.reserved_name"); |
| 3235 | } else { |
| 3236 | goto handle_unusual; |
| 3237 | } |
| 3238 | if (input->ExpectTag(82)) goto parse_reserved_name; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3239 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3240 | break; |
| 3241 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3242 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3243 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3244 | handle_unusual: |
| 3245 | if (tag == 0 || |
| 3246 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3247 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3248 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3249 | } |
| 3250 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 3251 | input, tag, mutable_unknown_fields())); |
| 3252 | break; |
| 3253 | } |
| 3254 | } |
| 3255 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3256 | success: |
| 3257 | // @@protoc_insertion_point(parse_success:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3258 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3259 | failure: |
| 3260 | // @@protoc_insertion_point(parse_failure:google.protobuf.DescriptorProto) |
| 3261 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3262 | #undef DO_ |
| 3263 | } |
| 3264 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3265 | void DescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3266 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3267 | // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3268 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3269 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3270 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3271 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3272 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3273 | "google.protobuf.DescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3274 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3275 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3276 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3277 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3278 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3279 | 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] | 3280 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3281 | 2, this->field(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3282 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3283 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3284 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3285 | 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] | 3286 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3287 | 3, this->nested_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3288 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3289 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3290 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3291 | 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] | 3292 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3293 | 4, this->enum_type(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3294 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3295 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3296 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3297 | 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] | 3298 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3299 | 5, this->extension_range(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3300 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3301 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3302 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3303 | 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] | 3304 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3305 | 6, this->extension(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3306 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3307 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3308 | // optional .google.protobuf.MessageOptions options = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3309 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3310 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3311 | 7, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3312 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3313 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3314 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3315 | 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] | 3316 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3317 | 8, this->oneof_decl(i), output); |
| 3318 | } |
| 3319 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3320 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3321 | for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { |
| 3322 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3323 | 9, this->reserved_range(i), output); |
| 3324 | } |
| 3325 | |
| 3326 | // repeated string reserved_name = 10; |
| 3327 | for (int i = 0; i < this->reserved_name_size(); i++) { |
Jisi Liu | 4c663d8 | 2015-08-25 17:03:05 -0700 | [diff] [blame] | 3328 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3329 | this->reserved_name(i).data(), this->reserved_name(i).length(), |
| 3330 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 3331 | "google.protobuf.DescriptorProto.reserved_name"); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3332 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 3333 | 10, this->reserved_name(i), output); |
| 3334 | } |
| 3335 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3336 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3337 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3338 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3339 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3340 | // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3341 | } |
| 3342 | |
| 3343 | ::google::protobuf::uint8* DescriptorProto::SerializeWithCachedSizesToArray( |
| 3344 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3345 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3346 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3347 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3348 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3349 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3350 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3351 | "google.protobuf.DescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3352 | target = |
| 3353 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3354 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3355 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3356 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3357 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3358 | 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] | 3359 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3360 | WriteMessageNoVirtualToArray( |
| 3361 | 2, this->field(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3362 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3363 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3364 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3365 | 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] | 3366 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3367 | WriteMessageNoVirtualToArray( |
| 3368 | 3, this->nested_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3369 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3370 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3371 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3372 | 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] | 3373 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3374 | WriteMessageNoVirtualToArray( |
| 3375 | 4, this->enum_type(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3376 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3377 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3378 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3379 | 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] | 3380 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3381 | WriteMessageNoVirtualToArray( |
| 3382 | 5, this->extension_range(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3383 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3384 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3385 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3386 | 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] | 3387 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3388 | WriteMessageNoVirtualToArray( |
| 3389 | 6, this->extension(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3390 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3391 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3392 | // optional .google.protobuf.MessageOptions options = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3393 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3394 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3395 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3396 | 7, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3397 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3398 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3399 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3400 | 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] | 3401 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3402 | WriteMessageNoVirtualToArray( |
| 3403 | 8, this->oneof_decl(i), target); |
| 3404 | } |
| 3405 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3406 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3407 | for (unsigned int i = 0, n = this->reserved_range_size(); i < n; i++) { |
| 3408 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3409 | WriteMessageNoVirtualToArray( |
| 3410 | 9, this->reserved_range(i), target); |
| 3411 | } |
| 3412 | |
| 3413 | // repeated string reserved_name = 10; |
| 3414 | for (int i = 0; i < this->reserved_name_size(); i++) { |
| 3415 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 3416 | this->reserved_name(i).data(), this->reserved_name(i).length(), |
| 3417 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 3418 | "google.protobuf.DescriptorProto.reserved_name"); |
| 3419 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3420 | WriteStringToArray(10, this->reserved_name(i), target); |
| 3421 | } |
| 3422 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3423 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3424 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3425 | unknown_fields(), target); |
| 3426 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3427 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 3428 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3429 | } |
| 3430 | |
| 3431 | int DescriptorProto::ByteSize() const { |
| 3432 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3433 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 3434 | if (_has_bits_[0 / 32] & 129u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3435 | // optional string name = 1; |
| 3436 | if (has_name()) { |
| 3437 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3438 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3439 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3440 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3441 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3442 | // optional .google.protobuf.MessageOptions options = 7; |
| 3443 | if (has_options()) { |
| 3444 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3445 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3446 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3447 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3448 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3449 | } |
| 3450 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3451 | total_size += 1 * this->field_size(); |
| 3452 | for (int i = 0; i < this->field_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3453 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3454 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3455 | this->field(i)); |
| 3456 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3457 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3458 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3459 | total_size += 1 * this->extension_size(); |
| 3460 | for (int i = 0; i < this->extension_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3461 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3462 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3463 | this->extension(i)); |
| 3464 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3465 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3466 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3467 | total_size += 1 * this->nested_type_size(); |
| 3468 | for (int i = 0; i < this->nested_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3469 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3470 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3471 | this->nested_type(i)); |
| 3472 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3473 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3474 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3475 | total_size += 1 * this->enum_type_size(); |
| 3476 | for (int i = 0; i < this->enum_type_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3477 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3478 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3479 | this->enum_type(i)); |
| 3480 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3481 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3482 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 3483 | total_size += 1 * this->extension_range_size(); |
| 3484 | for (int i = 0; i < this->extension_range_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3485 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3486 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3487 | this->extension_range(i)); |
| 3488 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3489 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3490 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
| 3491 | total_size += 1 * this->oneof_decl_size(); |
| 3492 | for (int i = 0; i < this->oneof_decl_size(); i++) { |
| 3493 | total_size += |
| 3494 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 3495 | this->oneof_decl(i)); |
| 3496 | } |
| 3497 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3498 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3499 | total_size += 1 * this->reserved_range_size(); |
| 3500 | for (int i = 0; i < this->reserved_range_size(); i++) { |
| 3501 | total_size += |
| 3502 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 3503 | this->reserved_range(i)); |
| 3504 | } |
| 3505 | |
| 3506 | // repeated string reserved_name = 10; |
| 3507 | total_size += 1 * this->reserved_name_size(); |
| 3508 | for (int i = 0; i < this->reserved_name_size(); i++) { |
| 3509 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3510 | this->reserved_name(i)); |
| 3511 | } |
| 3512 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3513 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3514 | total_size += |
| 3515 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3516 | unknown_fields()); |
| 3517 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3518 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3519 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 3520 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3521 | return total_size; |
| 3522 | } |
| 3523 | |
| 3524 | void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3525 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3526 | const DescriptorProto* source = |
| 3527 | ::google::protobuf::internal::DynamicCastToGenerated<const DescriptorProto>( |
| 3528 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3529 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 3530 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3531 | } else { |
| 3532 | MergeFrom(*source); |
| 3533 | } |
| 3534 | } |
| 3535 | |
| 3536 | void DescriptorProto::MergeFrom(const DescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3537 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3538 | field_.MergeFrom(from.field_); |
| 3539 | extension_.MergeFrom(from.extension_); |
| 3540 | nested_type_.MergeFrom(from.nested_type_); |
| 3541 | enum_type_.MergeFrom(from.enum_type_); |
| 3542 | extension_range_.MergeFrom(from.extension_range_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3543 | oneof_decl_.MergeFrom(from.oneof_decl_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3544 | reserved_range_.MergeFrom(from.reserved_range_); |
| 3545 | reserved_name_.MergeFrom(from.reserved_name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3546 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3547 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3548 | set_has_name(); |
| 3549 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3550 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 3551 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3552 | mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options()); |
| 3553 | } |
| 3554 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3555 | if (from._internal_metadata_.have_unknown_fields()) { |
| 3556 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 3557 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3558 | } |
| 3559 | |
| 3560 | void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 3561 | if (&from == this) return; |
| 3562 | Clear(); |
| 3563 | MergeFrom(from); |
| 3564 | } |
| 3565 | |
| 3566 | void DescriptorProto::CopyFrom(const DescriptorProto& from) { |
| 3567 | if (&from == this) return; |
| 3568 | Clear(); |
| 3569 | MergeFrom(from); |
| 3570 | } |
| 3571 | |
| 3572 | bool DescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 3573 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 3574 | if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false; |
| 3575 | if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; |
| 3576 | if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false; |
| 3577 | if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3578 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 3579 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 3580 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3581 | return true; |
| 3582 | } |
| 3583 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 3584 | void DescriptorProto::Swap(DescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3585 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3586 | InternalSwap(other); |
| 3587 | } |
| 3588 | void DescriptorProto::InternalSwap(DescriptorProto* other) { |
| 3589 | name_.Swap(&other->name_); |
| 3590 | field_.UnsafeArenaSwap(&other->field_); |
| 3591 | extension_.UnsafeArenaSwap(&other->extension_); |
| 3592 | nested_type_.UnsafeArenaSwap(&other->nested_type_); |
| 3593 | enum_type_.UnsafeArenaSwap(&other->enum_type_); |
| 3594 | extension_range_.UnsafeArenaSwap(&other->extension_range_); |
| 3595 | oneof_decl_.UnsafeArenaSwap(&other->oneof_decl_); |
| 3596 | std::swap(options_, other->options_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3597 | reserved_range_.UnsafeArenaSwap(&other->reserved_range_); |
| 3598 | reserved_name_.UnsafeArenaSwap(&other->reserved_name_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 3599 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 3600 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3601 | std::swap(_cached_size_, other->_cached_size_); |
| 3602 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 3603 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 3604 | ::google::protobuf::Metadata DescriptorProto::GetMetadata() const { |
| 3605 | protobuf_AssignDescriptorsOnce(); |
| 3606 | ::google::protobuf::Metadata metadata; |
| 3607 | metadata.descriptor = DescriptorProto_descriptor_; |
| 3608 | metadata.reflection = DescriptorProto_reflection_; |
| 3609 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 3610 | } |
| 3611 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3612 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 3613 | // DescriptorProto_ExtensionRange |
| 3614 | |
| 3615 | // optional int32 start = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3616 | bool DescriptorProto_ExtensionRange::has_start() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3617 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3618 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3619 | void DescriptorProto_ExtensionRange::set_has_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3620 | _has_bits_[0] |= 0x00000001u; |
| 3621 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3622 | void DescriptorProto_ExtensionRange::clear_has_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3623 | _has_bits_[0] &= ~0x00000001u; |
| 3624 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3625 | void DescriptorProto_ExtensionRange::clear_start() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3626 | start_ = 0; |
| 3627 | clear_has_start(); |
| 3628 | } |
| 3629 | ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const { |
| 3630 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start) |
| 3631 | return start_; |
| 3632 | } |
| 3633 | void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) { |
| 3634 | set_has_start(); |
| 3635 | start_ = value; |
| 3636 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start) |
| 3637 | } |
| 3638 | |
| 3639 | // optional int32 end = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3640 | bool DescriptorProto_ExtensionRange::has_end() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3641 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 3642 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3643 | void DescriptorProto_ExtensionRange::set_has_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3644 | _has_bits_[0] |= 0x00000002u; |
| 3645 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3646 | void DescriptorProto_ExtensionRange::clear_has_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3647 | _has_bits_[0] &= ~0x00000002u; |
| 3648 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3649 | void DescriptorProto_ExtensionRange::clear_end() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3650 | end_ = 0; |
| 3651 | clear_has_end(); |
| 3652 | } |
| 3653 | ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const { |
| 3654 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end) |
| 3655 | return end_; |
| 3656 | } |
| 3657 | void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) { |
| 3658 | set_has_end(); |
| 3659 | end_ = value; |
| 3660 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end) |
| 3661 | } |
| 3662 | |
| 3663 | // ------------------------------------------------------------------- |
| 3664 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3665 | // DescriptorProto_ReservedRange |
| 3666 | |
| 3667 | // optional int32 start = 1; |
| 3668 | bool DescriptorProto_ReservedRange::has_start() const { |
| 3669 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3670 | } |
| 3671 | void DescriptorProto_ReservedRange::set_has_start() { |
| 3672 | _has_bits_[0] |= 0x00000001u; |
| 3673 | } |
| 3674 | void DescriptorProto_ReservedRange::clear_has_start() { |
| 3675 | _has_bits_[0] &= ~0x00000001u; |
| 3676 | } |
| 3677 | void DescriptorProto_ReservedRange::clear_start() { |
| 3678 | start_ = 0; |
| 3679 | clear_has_start(); |
| 3680 | } |
| 3681 | ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const { |
| 3682 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start) |
| 3683 | return start_; |
| 3684 | } |
| 3685 | void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) { |
| 3686 | set_has_start(); |
| 3687 | start_ = value; |
| 3688 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start) |
| 3689 | } |
| 3690 | |
| 3691 | // optional int32 end = 2; |
| 3692 | bool DescriptorProto_ReservedRange::has_end() const { |
| 3693 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 3694 | } |
| 3695 | void DescriptorProto_ReservedRange::set_has_end() { |
| 3696 | _has_bits_[0] |= 0x00000002u; |
| 3697 | } |
| 3698 | void DescriptorProto_ReservedRange::clear_has_end() { |
| 3699 | _has_bits_[0] &= ~0x00000002u; |
| 3700 | } |
| 3701 | void DescriptorProto_ReservedRange::clear_end() { |
| 3702 | end_ = 0; |
| 3703 | clear_has_end(); |
| 3704 | } |
| 3705 | ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const { |
| 3706 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end) |
| 3707 | return end_; |
| 3708 | } |
| 3709 | void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) { |
| 3710 | set_has_end(); |
| 3711 | end_ = value; |
| 3712 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end) |
| 3713 | } |
| 3714 | |
| 3715 | // ------------------------------------------------------------------- |
| 3716 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3717 | // DescriptorProto |
| 3718 | |
| 3719 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3720 | bool DescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3721 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 3722 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3723 | void DescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3724 | _has_bits_[0] |= 0x00000001u; |
| 3725 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3726 | void DescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3727 | _has_bits_[0] &= ~0x00000001u; |
| 3728 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3729 | void DescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3730 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3731 | clear_has_name(); |
| 3732 | } |
| 3733 | const ::std::string& DescriptorProto::name() const { |
| 3734 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) |
| 3735 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3736 | } |
| 3737 | void DescriptorProto::set_name(const ::std::string& value) { |
| 3738 | set_has_name(); |
| 3739 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 3740 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) |
| 3741 | } |
| 3742 | void DescriptorProto::set_name(const char* value) { |
| 3743 | set_has_name(); |
| 3744 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 3745 | // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name) |
| 3746 | } |
| 3747 | void DescriptorProto::set_name(const char* value, size_t size) { |
| 3748 | set_has_name(); |
| 3749 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3750 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 3751 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name) |
| 3752 | } |
| 3753 | ::std::string* DescriptorProto::mutable_name() { |
| 3754 | set_has_name(); |
| 3755 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) |
| 3756 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3757 | } |
| 3758 | ::std::string* DescriptorProto::release_name() { |
| 3759 | clear_has_name(); |
| 3760 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3761 | } |
| 3762 | void DescriptorProto::set_allocated_name(::std::string* name) { |
| 3763 | if (name != NULL) { |
| 3764 | set_has_name(); |
| 3765 | } else { |
| 3766 | clear_has_name(); |
| 3767 | } |
| 3768 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 3769 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) |
| 3770 | } |
| 3771 | |
| 3772 | // repeated .google.protobuf.FieldDescriptorProto field = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3773 | int DescriptorProto::field_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3774 | return field_.size(); |
| 3775 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3776 | void DescriptorProto::clear_field() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3777 | field_.Clear(); |
| 3778 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3779 | const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3780 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field) |
| 3781 | return field_.Get(index); |
| 3782 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3783 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3784 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field) |
| 3785 | return field_.Mutable(index); |
| 3786 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3787 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3788 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field) |
| 3789 | return field_.Add(); |
| 3790 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3791 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3792 | DescriptorProto::mutable_field() { |
| 3793 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field) |
| 3794 | return &field_; |
| 3795 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3796 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 3797 | DescriptorProto::field() const { |
| 3798 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field) |
| 3799 | return field_; |
| 3800 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3801 | |
| 3802 | // repeated .google.protobuf.FieldDescriptorProto extension = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3803 | int DescriptorProto::extension_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3804 | return extension_.size(); |
| 3805 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3806 | void DescriptorProto::clear_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3807 | extension_.Clear(); |
| 3808 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3809 | const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3810 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension) |
| 3811 | return extension_.Get(index); |
| 3812 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3813 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3814 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension) |
| 3815 | return extension_.Mutable(index); |
| 3816 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3817 | ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3818 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension) |
| 3819 | return extension_.Add(); |
| 3820 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3821 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3822 | DescriptorProto::mutable_extension() { |
| 3823 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension) |
| 3824 | return &extension_; |
| 3825 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3826 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& |
| 3827 | DescriptorProto::extension() const { |
| 3828 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension) |
| 3829 | return extension_; |
| 3830 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3831 | |
| 3832 | // repeated .google.protobuf.DescriptorProto nested_type = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3833 | int DescriptorProto::nested_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3834 | return nested_type_.size(); |
| 3835 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3836 | void DescriptorProto::clear_nested_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3837 | nested_type_.Clear(); |
| 3838 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3839 | const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3840 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type) |
| 3841 | return nested_type_.Get(index); |
| 3842 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3843 | ::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3844 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type) |
| 3845 | return nested_type_.Mutable(index); |
| 3846 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3847 | ::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3848 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type) |
| 3849 | return nested_type_.Add(); |
| 3850 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3851 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3852 | DescriptorProto::mutable_nested_type() { |
| 3853 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type) |
| 3854 | return &nested_type_; |
| 3855 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3856 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& |
| 3857 | DescriptorProto::nested_type() const { |
| 3858 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type) |
| 3859 | return nested_type_; |
| 3860 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3861 | |
| 3862 | // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3863 | int DescriptorProto::enum_type_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3864 | return enum_type_.size(); |
| 3865 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3866 | void DescriptorProto::clear_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3867 | enum_type_.Clear(); |
| 3868 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3869 | const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3870 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type) |
| 3871 | return enum_type_.Get(index); |
| 3872 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3873 | ::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3874 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type) |
| 3875 | return enum_type_.Mutable(index); |
| 3876 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3877 | ::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3878 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type) |
| 3879 | return enum_type_.Add(); |
| 3880 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3881 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3882 | DescriptorProto::mutable_enum_type() { |
| 3883 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type) |
| 3884 | return &enum_type_; |
| 3885 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3886 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& |
| 3887 | DescriptorProto::enum_type() const { |
| 3888 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type) |
| 3889 | return enum_type_; |
| 3890 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3891 | |
| 3892 | // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3893 | int DescriptorProto::extension_range_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3894 | return extension_range_.size(); |
| 3895 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3896 | void DescriptorProto::clear_extension_range() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3897 | extension_range_.Clear(); |
| 3898 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3899 | const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3900 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range) |
| 3901 | return extension_range_.Get(index); |
| 3902 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3903 | ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3904 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range) |
| 3905 | return extension_range_.Mutable(index); |
| 3906 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3907 | ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3908 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range) |
| 3909 | return extension_range_.Add(); |
| 3910 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3911 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3912 | DescriptorProto::mutable_extension_range() { |
| 3913 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range) |
| 3914 | return &extension_range_; |
| 3915 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3916 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& |
| 3917 | DescriptorProto::extension_range() const { |
| 3918 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range) |
| 3919 | return extension_range_; |
| 3920 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3921 | |
| 3922 | // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3923 | int DescriptorProto::oneof_decl_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3924 | return oneof_decl_.size(); |
| 3925 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3926 | void DescriptorProto::clear_oneof_decl() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3927 | oneof_decl_.Clear(); |
| 3928 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3929 | const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3930 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl) |
| 3931 | return oneof_decl_.Get(index); |
| 3932 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3933 | ::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3934 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl) |
| 3935 | return oneof_decl_.Mutable(index); |
| 3936 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3937 | ::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3938 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl) |
| 3939 | return oneof_decl_.Add(); |
| 3940 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3941 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3942 | DescriptorProto::mutable_oneof_decl() { |
| 3943 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl) |
| 3944 | return &oneof_decl_; |
| 3945 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3946 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >& |
| 3947 | DescriptorProto::oneof_decl() const { |
| 3948 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl) |
| 3949 | return oneof_decl_; |
| 3950 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3951 | |
| 3952 | // optional .google.protobuf.MessageOptions options = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3953 | bool DescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3954 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 3955 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3956 | void DescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3957 | _has_bits_[0] |= 0x00000080u; |
| 3958 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3959 | void DescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3960 | _has_bits_[0] &= ~0x00000080u; |
| 3961 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3962 | void DescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3963 | if (options_ != NULL) options_->::google::protobuf::MessageOptions::Clear(); |
| 3964 | clear_has_options(); |
| 3965 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3966 | const ::google::protobuf::MessageOptions& DescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3967 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) |
| 3968 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 3969 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3970 | ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3971 | set_has_options(); |
| 3972 | if (options_ == NULL) { |
| 3973 | options_ = new ::google::protobuf::MessageOptions; |
| 3974 | } |
| 3975 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) |
| 3976 | return options_; |
| 3977 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3978 | ::google::protobuf::MessageOptions* DescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3979 | clear_has_options(); |
| 3980 | ::google::protobuf::MessageOptions* temp = options_; |
| 3981 | options_ = NULL; |
| 3982 | return temp; |
| 3983 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 3984 | void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 3985 | delete options_; |
| 3986 | options_ = options; |
| 3987 | if (options) { |
| 3988 | set_has_options(); |
| 3989 | } else { |
| 3990 | clear_has_options(); |
| 3991 | } |
| 3992 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.options) |
| 3993 | } |
| 3994 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 3995 | // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; |
| 3996 | int DescriptorProto::reserved_range_size() const { |
| 3997 | return reserved_range_.size(); |
| 3998 | } |
| 3999 | void DescriptorProto::clear_reserved_range() { |
| 4000 | reserved_range_.Clear(); |
| 4001 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 4002 | const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4003 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range) |
| 4004 | return reserved_range_.Get(index); |
| 4005 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 4006 | ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4007 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range) |
| 4008 | return reserved_range_.Mutable(index); |
| 4009 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 4010 | ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4011 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range) |
| 4012 | return reserved_range_.Add(); |
| 4013 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 4014 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >* |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4015 | DescriptorProto::mutable_reserved_range() { |
| 4016 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range) |
| 4017 | return &reserved_range_; |
| 4018 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 4019 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >& |
| 4020 | DescriptorProto::reserved_range() const { |
| 4021 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range) |
| 4022 | return reserved_range_; |
| 4023 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4024 | |
| 4025 | // repeated string reserved_name = 10; |
| 4026 | int DescriptorProto::reserved_name_size() const { |
| 4027 | return reserved_name_.size(); |
| 4028 | } |
| 4029 | void DescriptorProto::clear_reserved_name() { |
| 4030 | reserved_name_.Clear(); |
| 4031 | } |
| 4032 | const ::std::string& DescriptorProto::reserved_name(int index) const { |
| 4033 | // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) |
| 4034 | return reserved_name_.Get(index); |
| 4035 | } |
| 4036 | ::std::string* DescriptorProto::mutable_reserved_name(int index) { |
| 4037 | // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) |
| 4038 | return reserved_name_.Mutable(index); |
| 4039 | } |
| 4040 | void DescriptorProto::set_reserved_name(int index, const ::std::string& value) { |
| 4041 | // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) |
| 4042 | reserved_name_.Mutable(index)->assign(value); |
| 4043 | } |
| 4044 | void DescriptorProto::set_reserved_name(int index, const char* value) { |
| 4045 | reserved_name_.Mutable(index)->assign(value); |
| 4046 | // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.reserved_name) |
| 4047 | } |
| 4048 | void DescriptorProto::set_reserved_name(int index, const char* value, size_t size) { |
| 4049 | reserved_name_.Mutable(index)->assign( |
| 4050 | reinterpret_cast<const char*>(value), size); |
| 4051 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name) |
| 4052 | } |
| 4053 | ::std::string* DescriptorProto::add_reserved_name() { |
| 4054 | return reserved_name_.Add(); |
| 4055 | } |
| 4056 | void DescriptorProto::add_reserved_name(const ::std::string& value) { |
| 4057 | reserved_name_.Add()->assign(value); |
| 4058 | // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) |
| 4059 | } |
| 4060 | void DescriptorProto::add_reserved_name(const char* value) { |
| 4061 | reserved_name_.Add()->assign(value); |
| 4062 | // @@protoc_insertion_point(field_add_char:google.protobuf.DescriptorProto.reserved_name) |
| 4063 | } |
| 4064 | void DescriptorProto::add_reserved_name(const char* value, size_t size) { |
| 4065 | reserved_name_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 4066 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name) |
| 4067 | } |
| 4068 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 4069 | DescriptorProto::reserved_name() const { |
| 4070 | // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name) |
| 4071 | return reserved_name_; |
| 4072 | } |
| 4073 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 4074 | DescriptorProto::mutable_reserved_name() { |
| 4075 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name) |
| 4076 | return &reserved_name_; |
| 4077 | } |
| 4078 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4079 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4080 | |
| 4081 | // =================================================================== |
| 4082 | |
| 4083 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4084 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4085 | return FieldDescriptorProto_Type_descriptor_; |
| 4086 | } |
| 4087 | bool FieldDescriptorProto_Type_IsValid(int value) { |
| 4088 | switch(value) { |
| 4089 | case 1: |
| 4090 | case 2: |
| 4091 | case 3: |
| 4092 | case 4: |
| 4093 | case 5: |
| 4094 | case 6: |
| 4095 | case 7: |
| 4096 | case 8: |
| 4097 | case 9: |
| 4098 | case 10: |
| 4099 | case 11: |
| 4100 | case 12: |
| 4101 | case 13: |
| 4102 | case 14: |
| 4103 | case 15: |
| 4104 | case 16: |
| 4105 | case 17: |
| 4106 | case 18: |
| 4107 | return true; |
| 4108 | default: |
| 4109 | return false; |
| 4110 | } |
| 4111 | } |
| 4112 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 4113 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4114 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_DOUBLE; |
| 4115 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FLOAT; |
| 4116 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT64; |
| 4117 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT64; |
| 4118 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_INT32; |
| 4119 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED64; |
| 4120 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_FIXED32; |
| 4121 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BOOL; |
| 4122 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_STRING; |
| 4123 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_GROUP; |
| 4124 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_MESSAGE; |
| 4125 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_BYTES; |
| 4126 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_UINT32; |
| 4127 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_ENUM; |
| 4128 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED32; |
| 4129 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SFIXED64; |
| 4130 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT32; |
| 4131 | const FieldDescriptorProto_Type FieldDescriptorProto::TYPE_SINT64; |
| 4132 | const FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN; |
| 4133 | const FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4134 | const int FieldDescriptorProto::Type_ARRAYSIZE; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 4135 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4136 | const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4137 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4138 | return FieldDescriptorProto_Label_descriptor_; |
| 4139 | } |
| 4140 | bool FieldDescriptorProto_Label_IsValid(int value) { |
| 4141 | switch(value) { |
| 4142 | case 1: |
| 4143 | case 2: |
| 4144 | case 3: |
| 4145 | return true; |
| 4146 | default: |
| 4147 | return false; |
| 4148 | } |
| 4149 | } |
| 4150 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 4151 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4152 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_OPTIONAL; |
| 4153 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REQUIRED; |
| 4154 | const FieldDescriptorProto_Label FieldDescriptorProto::LABEL_REPEATED; |
| 4155 | const FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN; |
| 4156 | const FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4157 | const int FieldDescriptorProto::Label_ARRAYSIZE; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 4158 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4159 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 4160 | const int FieldDescriptorProto::kNameFieldNumber; |
| 4161 | const int FieldDescriptorProto::kNumberFieldNumber; |
| 4162 | const int FieldDescriptorProto::kLabelFieldNumber; |
| 4163 | const int FieldDescriptorProto::kTypeFieldNumber; |
| 4164 | const int FieldDescriptorProto::kTypeNameFieldNumber; |
| 4165 | const int FieldDescriptorProto::kExtendeeFieldNumber; |
| 4166 | const int FieldDescriptorProto::kDefaultValueFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4167 | const int FieldDescriptorProto::kOneofIndexFieldNumber; |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4168 | const int FieldDescriptorProto::kJsonNameFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 4169 | const int FieldDescriptorProto::kOptionsFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 4170 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4171 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 4172 | FieldDescriptorProto::FieldDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4173 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4174 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4175 | // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4176 | } |
| 4177 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4178 | void FieldDescriptorProto::InitAsDefaultInstance() { |
| 4179 | options_ = const_cast< ::google::protobuf::FieldOptions*>(&::google::protobuf::FieldOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4180 | } |
| 4181 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 4182 | FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4183 | : ::google::protobuf::Message(), |
| 4184 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4185 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4186 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4187 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4188 | } |
| 4189 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4190 | void FieldDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4191 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4192 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4193 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4194 | number_ = 0; |
| 4195 | label_ = 1; |
| 4196 | type_ = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4197 | type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4198 | extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4199 | default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4200 | oneof_index_ = 0; |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4201 | json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4202 | options_ = NULL; |
| 4203 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 4204 | } |
| 4205 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4206 | FieldDescriptorProto::~FieldDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4207 | // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4208 | SharedDtor(); |
| 4209 | } |
| 4210 | |
| 4211 | void FieldDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4212 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4213 | type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4214 | extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4215 | default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4216 | json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4217 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4218 | delete options_; |
| 4219 | } |
| 4220 | } |
| 4221 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4222 | void FieldDescriptorProto::SetCachedSize(int size) const { |
| 4223 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 4224 | _cached_size_ = size; |
| 4225 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 4226 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4227 | const ::google::protobuf::Descriptor* FieldDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4228 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4229 | return FieldDescriptorProto_descriptor_; |
| 4230 | } |
| 4231 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4232 | const FieldDescriptorProto& FieldDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 4233 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 4234 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 4235 | } |
| 4236 | |
| 4237 | FieldDescriptorProto* FieldDescriptorProto::default_instance_ = NULL; |
| 4238 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4239 | FieldDescriptorProto* FieldDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4240 | FieldDescriptorProto* n = new FieldDescriptorProto; |
| 4241 | if (arena != NULL) { |
| 4242 | arena->Own(n); |
| 4243 | } |
| 4244 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4245 | } |
| 4246 | |
| 4247 | void FieldDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 4248 | if (_has_bits_[0 / 32] & 255u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4249 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4250 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4251 | } |
| 4252 | number_ = 0; |
| 4253 | label_ = 1; |
| 4254 | type_ = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4255 | if (has_type_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4256 | type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4257 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4258 | if (has_extendee()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4259 | extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4260 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4261 | if (has_default_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4262 | default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4263 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4264 | oneof_index_ = 0; |
| 4265 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4266 | if (_has_bits_[8 / 32] & 768u) { |
| 4267 | if (has_json_name()) { |
| 4268 | json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4269 | } |
| 4270 | if (has_options()) { |
| 4271 | if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); |
| 4272 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4273 | } |
| 4274 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4275 | if (_internal_metadata_.have_unknown_fields()) { |
| 4276 | mutable_unknown_fields()->Clear(); |
| 4277 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4278 | } |
| 4279 | |
| 4280 | bool FieldDescriptorProto::MergePartialFromCodedStream( |
| 4281 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4282 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4283 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4284 | // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto) |
| 4285 | for (;;) { |
| 4286 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 4287 | tag = p.first; |
| 4288 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4289 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4290 | // optional string name = 1; |
| 4291 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4292 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4293 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4294 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4295 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4296 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4297 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4298 | "google.protobuf.FieldDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4299 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4300 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4301 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4302 | if (input->ExpectTag(18)) goto parse_extendee; |
| 4303 | break; |
| 4304 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4305 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4306 | // optional string extendee = 2; |
| 4307 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4308 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4309 | parse_extendee: |
| 4310 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4311 | input, this->mutable_extendee())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4312 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4313 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4314 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4315 | "google.protobuf.FieldDescriptorProto.extendee"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4316 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4317 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4318 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4319 | if (input->ExpectTag(24)) goto parse_number; |
| 4320 | break; |
| 4321 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4322 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4323 | // optional int32 number = 3; |
| 4324 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4325 | if (tag == 24) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4326 | parse_number: |
| 4327 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4328 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 4329 | input, &number_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4330 | set_has_number(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4331 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4332 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4333 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4334 | if (input->ExpectTag(32)) goto parse_label; |
| 4335 | break; |
| 4336 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4337 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4338 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
| 4339 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4340 | if (tag == 32) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4341 | parse_label: |
| 4342 | int value; |
| 4343 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4344 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4345 | input, &value))); |
| 4346 | if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) { |
| 4347 | set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); |
| 4348 | } else { |
| 4349 | mutable_unknown_fields()->AddVarint(4, value); |
| 4350 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4351 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4352 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4353 | } |
| 4354 | if (input->ExpectTag(40)) goto parse_type; |
| 4355 | break; |
| 4356 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4357 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4358 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
| 4359 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4360 | if (tag == 40) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4361 | parse_type: |
| 4362 | int value; |
| 4363 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4364 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4365 | input, &value))); |
| 4366 | if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) { |
| 4367 | set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); |
| 4368 | } else { |
| 4369 | mutable_unknown_fields()->AddVarint(5, value); |
| 4370 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4371 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4372 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4373 | } |
| 4374 | if (input->ExpectTag(50)) goto parse_type_name; |
| 4375 | break; |
| 4376 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4377 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4378 | // optional string type_name = 6; |
| 4379 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4380 | if (tag == 50) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4381 | parse_type_name: |
| 4382 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4383 | input, this->mutable_type_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4384 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4385 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4386 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4387 | "google.protobuf.FieldDescriptorProto.type_name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4388 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4389 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4390 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4391 | if (input->ExpectTag(58)) goto parse_default_value; |
| 4392 | break; |
| 4393 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4394 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4395 | // optional string default_value = 7; |
| 4396 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4397 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4398 | parse_default_value: |
| 4399 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4400 | input, this->mutable_default_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4401 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4402 | this->default_value().data(), this->default_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4403 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4404 | "google.protobuf.FieldDescriptorProto.default_value"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4405 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4406 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4407 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4408 | if (input->ExpectTag(66)) goto parse_options; |
| 4409 | break; |
| 4410 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4411 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4412 | // optional .google.protobuf.FieldOptions options = 8; |
| 4413 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4414 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4415 | parse_options: |
| 4416 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 4417 | input, mutable_options())); |
| 4418 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4419 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4420 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4421 | if (input->ExpectTag(72)) goto parse_oneof_index; |
| 4422 | break; |
| 4423 | } |
| 4424 | |
| 4425 | // optional int32 oneof_index = 9; |
| 4426 | case 9: { |
| 4427 | if (tag == 72) { |
| 4428 | parse_oneof_index: |
| 4429 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4430 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 4431 | input, &oneof_index_))); |
| 4432 | set_has_oneof_index(); |
| 4433 | } else { |
| 4434 | goto handle_unusual; |
| 4435 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4436 | if (input->ExpectTag(82)) goto parse_json_name; |
| 4437 | break; |
| 4438 | } |
| 4439 | |
| 4440 | // optional string json_name = 10; |
| 4441 | case 10: { |
| 4442 | if (tag == 82) { |
| 4443 | parse_json_name: |
| 4444 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4445 | input, this->mutable_json_name())); |
| 4446 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 4447 | this->json_name().data(), this->json_name().length(), |
| 4448 | ::google::protobuf::internal::WireFormat::PARSE, |
| 4449 | "google.protobuf.FieldDescriptorProto.json_name"); |
| 4450 | } else { |
| 4451 | goto handle_unusual; |
| 4452 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4453 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4454 | break; |
| 4455 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4456 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4457 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4458 | handle_unusual: |
| 4459 | if (tag == 0 || |
| 4460 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4461 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4462 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4463 | } |
| 4464 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4465 | input, tag, mutable_unknown_fields())); |
| 4466 | break; |
| 4467 | } |
| 4468 | } |
| 4469 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4470 | success: |
| 4471 | // @@protoc_insertion_point(parse_success:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4472 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4473 | failure: |
| 4474 | // @@protoc_insertion_point(parse_failure:google.protobuf.FieldDescriptorProto) |
| 4475 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4476 | #undef DO_ |
| 4477 | } |
| 4478 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4479 | void FieldDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4480 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4481 | // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4482 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4483 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4484 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4485 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4486 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4487 | "google.protobuf.FieldDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4488 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4489 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4490 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4491 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4492 | // optional string extendee = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4493 | if (has_extendee()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4494 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4495 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4496 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4497 | "google.protobuf.FieldDescriptorProto.extendee"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4498 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4499 | 2, this->extendee(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4500 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4501 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4502 | // optional int32 number = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4503 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4504 | ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4505 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4506 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4507 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4508 | if (has_label()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4509 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4510 | 4, this->label(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4511 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4512 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4513 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4514 | if (has_type()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4515 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4516 | 5, this->type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4517 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4518 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4519 | // optional string type_name = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4520 | if (has_type_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4521 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4522 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4523 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4524 | "google.protobuf.FieldDescriptorProto.type_name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4525 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4526 | 6, this->type_name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4527 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4528 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +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"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4535 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4536 | 7, this->default_value(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4537 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4538 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4539 | // optional .google.protobuf.FieldOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4540 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4541 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4542 | 8, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4543 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4544 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4545 | // optional int32 oneof_index = 9; |
| 4546 | if (has_oneof_index()) { |
| 4547 | ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output); |
| 4548 | } |
| 4549 | |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4550 | // optional string json_name = 10; |
| 4551 | if (has_json_name()) { |
| 4552 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 4553 | this->json_name().data(), this->json_name().length(), |
| 4554 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 4555 | "google.protobuf.FieldDescriptorProto.json_name"); |
| 4556 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 4557 | 10, this->json_name(), output); |
| 4558 | } |
| 4559 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4560 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4561 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4562 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4563 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4564 | // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4565 | } |
| 4566 | |
| 4567 | ::google::protobuf::uint8* FieldDescriptorProto::SerializeWithCachedSizesToArray( |
| 4568 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4569 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4570 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4571 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4572 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4573 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4574 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4575 | "google.protobuf.FieldDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4576 | target = |
| 4577 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4578 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4579 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4580 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4581 | // optional string extendee = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4582 | if (has_extendee()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4583 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4584 | this->extendee().data(), this->extendee().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4585 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4586 | "google.protobuf.FieldDescriptorProto.extendee"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4587 | target = |
| 4588 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4589 | 2, this->extendee(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4590 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4591 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4592 | // optional int32 number = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4593 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4594 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4595 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4596 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4597 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4598 | if (has_label()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4599 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4600 | 4, this->label(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4601 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4602 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4603 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4604 | if (has_type()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4605 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4606 | 5, this->type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4607 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4608 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4609 | // optional string type_name = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4610 | if (has_type_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4611 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4612 | this->type_name().data(), this->type_name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4613 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4614 | "google.protobuf.FieldDescriptorProto.type_name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4615 | target = |
| 4616 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4617 | 6, this->type_name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4618 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4619 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4620 | // optional string default_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4621 | if (has_default_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4622 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4623 | this->default_value().data(), this->default_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4624 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4625 | "google.protobuf.FieldDescriptorProto.default_value"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4626 | target = |
| 4627 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4628 | 7, this->default_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4629 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4630 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4631 | // optional .google.protobuf.FieldOptions options = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4632 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4633 | target = ::google::protobuf::internal::WireFormatLite:: |
| 4634 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4635 | 8, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4636 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4637 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4638 | // optional int32 oneof_index = 9; |
| 4639 | if (has_oneof_index()) { |
| 4640 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target); |
| 4641 | } |
| 4642 | |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4643 | // optional string json_name = 10; |
| 4644 | if (has_json_name()) { |
| 4645 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 4646 | this->json_name().data(), this->json_name().length(), |
| 4647 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 4648 | "google.protobuf.FieldDescriptorProto.json_name"); |
| 4649 | target = |
| 4650 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4651 | 10, this->json_name(), target); |
| 4652 | } |
| 4653 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4654 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4655 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4656 | unknown_fields(), target); |
| 4657 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4658 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 4659 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4660 | } |
| 4661 | |
| 4662 | int FieldDescriptorProto::ByteSize() const { |
| 4663 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4664 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 4665 | if (_has_bits_[0 / 32] & 255u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4666 | // optional string name = 1; |
| 4667 | if (has_name()) { |
| 4668 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4669 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4670 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4671 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4672 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4673 | // optional int32 number = 3; |
| 4674 | if (has_number()) { |
| 4675 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4676 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4677 | this->number()); |
| 4678 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4679 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4680 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
| 4681 | if (has_label()) { |
| 4682 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4683 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->label()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4684 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4685 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4686 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
| 4687 | if (has_type()) { |
| 4688 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4689 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4690 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4691 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4692 | // optional string type_name = 6; |
| 4693 | if (has_type_name()) { |
| 4694 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4695 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4696 | this->type_name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4697 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4698 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4699 | // optional string extendee = 2; |
| 4700 | if (has_extendee()) { |
| 4701 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4702 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4703 | this->extendee()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4704 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4705 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4706 | // optional string default_value = 7; |
| 4707 | if (has_default_value()) { |
| 4708 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4709 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4710 | this->default_value()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4711 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4712 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4713 | // optional int32 oneof_index = 9; |
| 4714 | if (has_oneof_index()) { |
| 4715 | total_size += 1 + |
| 4716 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 4717 | this->oneof_index()); |
| 4718 | } |
| 4719 | |
| 4720 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4721 | if (_has_bits_[8 / 32] & 768u) { |
| 4722 | // optional string json_name = 10; |
| 4723 | if (has_json_name()) { |
| 4724 | total_size += 1 + |
| 4725 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4726 | this->json_name()); |
| 4727 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4728 | |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4729 | // optional .google.protobuf.FieldOptions options = 8; |
| 4730 | if (has_options()) { |
| 4731 | total_size += 1 + |
| 4732 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 4733 | *this->options_); |
| 4734 | } |
| 4735 | |
| 4736 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4737 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4738 | total_size += |
| 4739 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4740 | unknown_fields()); |
| 4741 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4742 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4743 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 4744 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4745 | return total_size; |
| 4746 | } |
| 4747 | |
| 4748 | void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4749 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4750 | const FieldDescriptorProto* source = |
| 4751 | ::google::protobuf::internal::DynamicCastToGenerated<const FieldDescriptorProto>( |
| 4752 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4753 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 4754 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4755 | } else { |
| 4756 | MergeFrom(*source); |
| 4757 | } |
| 4758 | } |
| 4759 | |
| 4760 | void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4761 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4762 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4763 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4764 | set_has_name(); |
| 4765 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4766 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4767 | if (from.has_number()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4768 | set_number(from.number()); |
| 4769 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4770 | if (from.has_label()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4771 | set_label(from.label()); |
| 4772 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4773 | if (from.has_type()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4774 | set_type(from.type()); |
| 4775 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4776 | if (from.has_type_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4777 | set_has_type_name(); |
| 4778 | type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4779 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4780 | if (from.has_extendee()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4781 | set_has_extendee(); |
| 4782 | extendee_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4783 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4784 | if (from.has_default_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4785 | set_has_default_value(); |
| 4786 | default_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4787 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 4788 | if (from.has_oneof_index()) { |
| 4789 | set_oneof_index(from.oneof_index()); |
| 4790 | } |
| 4791 | } |
| 4792 | if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4793 | if (from.has_json_name()) { |
| 4794 | set_has_json_name(); |
| 4795 | json_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name_); |
| 4796 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 4797 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4798 | mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options()); |
| 4799 | } |
| 4800 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4801 | if (from._internal_metadata_.have_unknown_fields()) { |
| 4802 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 4803 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4804 | } |
| 4805 | |
| 4806 | void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 4807 | if (&from == this) return; |
| 4808 | Clear(); |
| 4809 | MergeFrom(from); |
| 4810 | } |
| 4811 | |
| 4812 | void FieldDescriptorProto::CopyFrom(const FieldDescriptorProto& from) { |
| 4813 | if (&from == this) return; |
| 4814 | Clear(); |
| 4815 | MergeFrom(from); |
| 4816 | } |
| 4817 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4818 | bool FieldDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 4819 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4820 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 4821 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 4822 | } |
| 4823 | return true; |
| 4824 | } |
| 4825 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 4826 | void FieldDescriptorProto::Swap(FieldDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4827 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4828 | InternalSwap(other); |
| 4829 | } |
| 4830 | void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { |
| 4831 | name_.Swap(&other->name_); |
| 4832 | std::swap(number_, other->number_); |
| 4833 | std::swap(label_, other->label_); |
| 4834 | std::swap(type_, other->type_); |
| 4835 | type_name_.Swap(&other->type_name_); |
| 4836 | extendee_.Swap(&other->extendee_); |
| 4837 | default_value_.Swap(&other->default_value_); |
| 4838 | std::swap(oneof_index_, other->oneof_index_); |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 4839 | json_name_.Swap(&other->json_name_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 4840 | std::swap(options_, other->options_); |
| 4841 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 4842 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4843 | std::swap(_cached_size_, other->_cached_size_); |
| 4844 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 4845 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 4846 | ::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const { |
| 4847 | protobuf_AssignDescriptorsOnce(); |
| 4848 | ::google::protobuf::Metadata metadata; |
| 4849 | metadata.descriptor = FieldDescriptorProto_descriptor_; |
| 4850 | metadata.reflection = FieldDescriptorProto_reflection_; |
| 4851 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 4852 | } |
| 4853 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4854 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 4855 | // FieldDescriptorProto |
| 4856 | |
| 4857 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4858 | bool FieldDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4859 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 4860 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4861 | void FieldDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4862 | _has_bits_[0] |= 0x00000001u; |
| 4863 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4864 | void FieldDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4865 | _has_bits_[0] &= ~0x00000001u; |
| 4866 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4867 | void FieldDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4868 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4869 | clear_has_name(); |
| 4870 | } |
| 4871 | const ::std::string& FieldDescriptorProto::name() const { |
| 4872 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) |
| 4873 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4874 | } |
| 4875 | void FieldDescriptorProto::set_name(const ::std::string& value) { |
| 4876 | set_has_name(); |
| 4877 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 4878 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) |
| 4879 | } |
| 4880 | void FieldDescriptorProto::set_name(const char* value) { |
| 4881 | set_has_name(); |
| 4882 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 4883 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name) |
| 4884 | } |
| 4885 | void FieldDescriptorProto::set_name(const char* value, size_t size) { |
| 4886 | set_has_name(); |
| 4887 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4888 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 4889 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name) |
| 4890 | } |
| 4891 | ::std::string* FieldDescriptorProto::mutable_name() { |
| 4892 | set_has_name(); |
| 4893 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) |
| 4894 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4895 | } |
| 4896 | ::std::string* FieldDescriptorProto::release_name() { |
| 4897 | clear_has_name(); |
| 4898 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4899 | } |
| 4900 | void FieldDescriptorProto::set_allocated_name(::std::string* name) { |
| 4901 | if (name != NULL) { |
| 4902 | set_has_name(); |
| 4903 | } else { |
| 4904 | clear_has_name(); |
| 4905 | } |
| 4906 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 4907 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) |
| 4908 | } |
| 4909 | |
| 4910 | // optional int32 number = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4911 | bool FieldDescriptorProto::has_number() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4912 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 4913 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4914 | void FieldDescriptorProto::set_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4915 | _has_bits_[0] |= 0x00000002u; |
| 4916 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4917 | void FieldDescriptorProto::clear_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4918 | _has_bits_[0] &= ~0x00000002u; |
| 4919 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4920 | void FieldDescriptorProto::clear_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4921 | number_ = 0; |
| 4922 | clear_has_number(); |
| 4923 | } |
| 4924 | ::google::protobuf::int32 FieldDescriptorProto::number() const { |
| 4925 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number) |
| 4926 | return number_; |
| 4927 | } |
| 4928 | void FieldDescriptorProto::set_number(::google::protobuf::int32 value) { |
| 4929 | set_has_number(); |
| 4930 | number_ = value; |
| 4931 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number) |
| 4932 | } |
| 4933 | |
| 4934 | // optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4935 | bool FieldDescriptorProto::has_label() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4936 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 4937 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4938 | void FieldDescriptorProto::set_has_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4939 | _has_bits_[0] |= 0x00000004u; |
| 4940 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4941 | void FieldDescriptorProto::clear_has_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4942 | _has_bits_[0] &= ~0x00000004u; |
| 4943 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4944 | void FieldDescriptorProto::clear_label() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4945 | label_ = 1; |
| 4946 | clear_has_label(); |
| 4947 | } |
| 4948 | ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const { |
| 4949 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label) |
| 4950 | return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_); |
| 4951 | } |
| 4952 | void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) { |
| 4953 | assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value)); |
| 4954 | set_has_label(); |
| 4955 | label_ = value; |
| 4956 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label) |
| 4957 | } |
| 4958 | |
| 4959 | // optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4960 | bool FieldDescriptorProto::has_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4961 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 4962 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4963 | void FieldDescriptorProto::set_has_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4964 | _has_bits_[0] |= 0x00000008u; |
| 4965 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4966 | void FieldDescriptorProto::clear_has_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4967 | _has_bits_[0] &= ~0x00000008u; |
| 4968 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4969 | void FieldDescriptorProto::clear_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4970 | type_ = 1; |
| 4971 | clear_has_type(); |
| 4972 | } |
| 4973 | ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const { |
| 4974 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type) |
| 4975 | return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_); |
| 4976 | } |
| 4977 | void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) { |
| 4978 | assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value)); |
| 4979 | set_has_type(); |
| 4980 | type_ = value; |
| 4981 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type) |
| 4982 | } |
| 4983 | |
| 4984 | // optional string type_name = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4985 | bool FieldDescriptorProto::has_type_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4986 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 4987 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4988 | void FieldDescriptorProto::set_has_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4989 | _has_bits_[0] |= 0x00000010u; |
| 4990 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4991 | void FieldDescriptorProto::clear_has_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4992 | _has_bits_[0] &= ~0x00000010u; |
| 4993 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 4994 | void FieldDescriptorProto::clear_type_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 4995 | type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4996 | clear_has_type_name(); |
| 4997 | } |
| 4998 | const ::std::string& FieldDescriptorProto::type_name() const { |
| 4999 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) |
| 5000 | return type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5001 | } |
| 5002 | void FieldDescriptorProto::set_type_name(const ::std::string& value) { |
| 5003 | set_has_type_name(); |
| 5004 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5005 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) |
| 5006 | } |
| 5007 | void FieldDescriptorProto::set_type_name(const char* value) { |
| 5008 | set_has_type_name(); |
| 5009 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5010 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name) |
| 5011 | } |
| 5012 | void FieldDescriptorProto::set_type_name(const char* value, size_t size) { |
| 5013 | set_has_type_name(); |
| 5014 | type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5015 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5016 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name) |
| 5017 | } |
| 5018 | ::std::string* FieldDescriptorProto::mutable_type_name() { |
| 5019 | set_has_type_name(); |
| 5020 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) |
| 5021 | return type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5022 | } |
| 5023 | ::std::string* FieldDescriptorProto::release_type_name() { |
| 5024 | clear_has_type_name(); |
| 5025 | return type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5026 | } |
| 5027 | void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) { |
| 5028 | if (type_name != NULL) { |
| 5029 | set_has_type_name(); |
| 5030 | } else { |
| 5031 | clear_has_type_name(); |
| 5032 | } |
| 5033 | type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name); |
| 5034 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) |
| 5035 | } |
| 5036 | |
| 5037 | // optional string extendee = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5038 | bool FieldDescriptorProto::has_extendee() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5039 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 5040 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5041 | void FieldDescriptorProto::set_has_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5042 | _has_bits_[0] |= 0x00000020u; |
| 5043 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5044 | void FieldDescriptorProto::clear_has_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5045 | _has_bits_[0] &= ~0x00000020u; |
| 5046 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5047 | void FieldDescriptorProto::clear_extendee() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5048 | extendee_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5049 | clear_has_extendee(); |
| 5050 | } |
| 5051 | const ::std::string& FieldDescriptorProto::extendee() const { |
| 5052 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) |
| 5053 | return extendee_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5054 | } |
| 5055 | void FieldDescriptorProto::set_extendee(const ::std::string& value) { |
| 5056 | set_has_extendee(); |
| 5057 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5058 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) |
| 5059 | } |
| 5060 | void FieldDescriptorProto::set_extendee(const char* value) { |
| 5061 | set_has_extendee(); |
| 5062 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5063 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee) |
| 5064 | } |
| 5065 | void FieldDescriptorProto::set_extendee(const char* value, size_t size) { |
| 5066 | set_has_extendee(); |
| 5067 | extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5068 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5069 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee) |
| 5070 | } |
| 5071 | ::std::string* FieldDescriptorProto::mutable_extendee() { |
| 5072 | set_has_extendee(); |
| 5073 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) |
| 5074 | return extendee_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5075 | } |
| 5076 | ::std::string* FieldDescriptorProto::release_extendee() { |
| 5077 | clear_has_extendee(); |
| 5078 | return extendee_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5079 | } |
| 5080 | void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) { |
| 5081 | if (extendee != NULL) { |
| 5082 | set_has_extendee(); |
| 5083 | } else { |
| 5084 | clear_has_extendee(); |
| 5085 | } |
| 5086 | extendee_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee); |
| 5087 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) |
| 5088 | } |
| 5089 | |
| 5090 | // optional string default_value = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5091 | bool FieldDescriptorProto::has_default_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5092 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 5093 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5094 | void FieldDescriptorProto::set_has_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5095 | _has_bits_[0] |= 0x00000040u; |
| 5096 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5097 | void FieldDescriptorProto::clear_has_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5098 | _has_bits_[0] &= ~0x00000040u; |
| 5099 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5100 | void FieldDescriptorProto::clear_default_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5101 | default_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5102 | clear_has_default_value(); |
| 5103 | } |
| 5104 | const ::std::string& FieldDescriptorProto::default_value() const { |
| 5105 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) |
| 5106 | return default_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5107 | } |
| 5108 | void FieldDescriptorProto::set_default_value(const ::std::string& value) { |
| 5109 | set_has_default_value(); |
| 5110 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5111 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) |
| 5112 | } |
| 5113 | void FieldDescriptorProto::set_default_value(const char* value) { |
| 5114 | set_has_default_value(); |
| 5115 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5116 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value) |
| 5117 | } |
| 5118 | void FieldDescriptorProto::set_default_value(const char* value, size_t size) { |
| 5119 | set_has_default_value(); |
| 5120 | default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5121 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5122 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value) |
| 5123 | } |
| 5124 | ::std::string* FieldDescriptorProto::mutable_default_value() { |
| 5125 | set_has_default_value(); |
| 5126 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) |
| 5127 | return default_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5128 | } |
| 5129 | ::std::string* FieldDescriptorProto::release_default_value() { |
| 5130 | clear_has_default_value(); |
| 5131 | return default_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5132 | } |
| 5133 | void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) { |
| 5134 | if (default_value != NULL) { |
| 5135 | set_has_default_value(); |
| 5136 | } else { |
| 5137 | clear_has_default_value(); |
| 5138 | } |
| 5139 | default_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value); |
| 5140 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) |
| 5141 | } |
| 5142 | |
| 5143 | // optional int32 oneof_index = 9; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5144 | bool FieldDescriptorProto::has_oneof_index() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5145 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 5146 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5147 | void FieldDescriptorProto::set_has_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5148 | _has_bits_[0] |= 0x00000080u; |
| 5149 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5150 | void FieldDescriptorProto::clear_has_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5151 | _has_bits_[0] &= ~0x00000080u; |
| 5152 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5153 | void FieldDescriptorProto::clear_oneof_index() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5154 | oneof_index_ = 0; |
| 5155 | clear_has_oneof_index(); |
| 5156 | } |
| 5157 | ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const { |
| 5158 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index) |
| 5159 | return oneof_index_; |
| 5160 | } |
| 5161 | void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) { |
| 5162 | set_has_oneof_index(); |
| 5163 | oneof_index_ = value; |
| 5164 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index) |
| 5165 | } |
| 5166 | |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 5167 | // optional string json_name = 10; |
| 5168 | bool FieldDescriptorProto::has_json_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5169 | return (_has_bits_[0] & 0x00000100u) != 0; |
| 5170 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 5171 | void FieldDescriptorProto::set_has_json_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5172 | _has_bits_[0] |= 0x00000100u; |
| 5173 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 5174 | void FieldDescriptorProto::clear_has_json_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5175 | _has_bits_[0] &= ~0x00000100u; |
| 5176 | } |
Jisi Liu | 46e8ff6 | 2015-10-05 11:59:43 -0700 | [diff] [blame] | 5177 | void FieldDescriptorProto::clear_json_name() { |
| 5178 | json_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5179 | clear_has_json_name(); |
| 5180 | } |
| 5181 | const ::std::string& FieldDescriptorProto::json_name() const { |
| 5182 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name) |
| 5183 | return json_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5184 | } |
| 5185 | void FieldDescriptorProto::set_json_name(const ::std::string& value) { |
| 5186 | set_has_json_name(); |
| 5187 | json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5188 | // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name) |
| 5189 | } |
| 5190 | void FieldDescriptorProto::set_json_name(const char* value) { |
| 5191 | set_has_json_name(); |
| 5192 | json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5193 | // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name) |
| 5194 | } |
| 5195 | void FieldDescriptorProto::set_json_name(const char* value, size_t size) { |
| 5196 | set_has_json_name(); |
| 5197 | json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5198 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5199 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name) |
| 5200 | } |
| 5201 | ::std::string* FieldDescriptorProto::mutable_json_name() { |
| 5202 | set_has_json_name(); |
| 5203 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name) |
| 5204 | return json_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5205 | } |
| 5206 | ::std::string* FieldDescriptorProto::release_json_name() { |
| 5207 | clear_has_json_name(); |
| 5208 | return json_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5209 | } |
| 5210 | void FieldDescriptorProto::set_allocated_json_name(::std::string* json_name) { |
| 5211 | if (json_name != NULL) { |
| 5212 | set_has_json_name(); |
| 5213 | } else { |
| 5214 | clear_has_json_name(); |
| 5215 | } |
| 5216 | json_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name); |
| 5217 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name) |
| 5218 | } |
| 5219 | |
| 5220 | // optional .google.protobuf.FieldOptions options = 8; |
| 5221 | bool FieldDescriptorProto::has_options() const { |
| 5222 | return (_has_bits_[0] & 0x00000200u) != 0; |
| 5223 | } |
| 5224 | void FieldDescriptorProto::set_has_options() { |
| 5225 | _has_bits_[0] |= 0x00000200u; |
| 5226 | } |
| 5227 | void FieldDescriptorProto::clear_has_options() { |
| 5228 | _has_bits_[0] &= ~0x00000200u; |
| 5229 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5230 | void FieldDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5231 | if (options_ != NULL) options_->::google::protobuf::FieldOptions::Clear(); |
| 5232 | clear_has_options(); |
| 5233 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5234 | const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5235 | // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) |
| 5236 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 5237 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5238 | ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5239 | set_has_options(); |
| 5240 | if (options_ == NULL) { |
| 5241 | options_ = new ::google::protobuf::FieldOptions; |
| 5242 | } |
| 5243 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) |
| 5244 | return options_; |
| 5245 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5246 | ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5247 | clear_has_options(); |
| 5248 | ::google::protobuf::FieldOptions* temp = options_; |
| 5249 | options_ = NULL; |
| 5250 | return temp; |
| 5251 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5252 | void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5253 | delete options_; |
| 5254 | options_ = options; |
| 5255 | if (options) { |
| 5256 | set_has_options(); |
| 5257 | } else { |
| 5258 | clear_has_options(); |
| 5259 | } |
| 5260 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.options) |
| 5261 | } |
| 5262 | |
| 5263 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5264 | |
| 5265 | // =================================================================== |
| 5266 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 5267 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5268 | const int OneofDescriptorProto::kNameFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 5269 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5270 | |
| 5271 | OneofDescriptorProto::OneofDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5272 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5273 | SharedCtor(); |
| 5274 | // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto) |
| 5275 | } |
| 5276 | |
| 5277 | void OneofDescriptorProto::InitAsDefaultInstance() { |
| 5278 | } |
| 5279 | |
| 5280 | OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5281 | : ::google::protobuf::Message(), |
| 5282 | _internal_metadata_(NULL) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5283 | SharedCtor(); |
| 5284 | MergeFrom(from); |
| 5285 | // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) |
| 5286 | } |
| 5287 | |
| 5288 | void OneofDescriptorProto::SharedCtor() { |
| 5289 | ::google::protobuf::internal::GetEmptyString(); |
| 5290 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5291 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5292 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 5293 | } |
| 5294 | |
| 5295 | OneofDescriptorProto::~OneofDescriptorProto() { |
| 5296 | // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto) |
| 5297 | SharedDtor(); |
| 5298 | } |
| 5299 | |
| 5300 | void OneofDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5301 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5302 | if (this != default_instance_) { |
| 5303 | } |
| 5304 | } |
| 5305 | |
| 5306 | void OneofDescriptorProto::SetCachedSize(int size) const { |
| 5307 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5308 | _cached_size_ = size; |
| 5309 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5310 | } |
| 5311 | const ::google::protobuf::Descriptor* OneofDescriptorProto::descriptor() { |
| 5312 | protobuf_AssignDescriptorsOnce(); |
| 5313 | return OneofDescriptorProto_descriptor_; |
| 5314 | } |
| 5315 | |
| 5316 | const OneofDescriptorProto& OneofDescriptorProto::default_instance() { |
| 5317 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 5318 | return *default_instance_; |
| 5319 | } |
| 5320 | |
| 5321 | OneofDescriptorProto* OneofDescriptorProto::default_instance_ = NULL; |
| 5322 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5323 | OneofDescriptorProto* OneofDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5324 | OneofDescriptorProto* n = new OneofDescriptorProto; |
| 5325 | if (arena != NULL) { |
| 5326 | arena->Own(n); |
| 5327 | } |
| 5328 | return n; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5329 | } |
| 5330 | |
| 5331 | void OneofDescriptorProto::Clear() { |
| 5332 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5333 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5334 | } |
| 5335 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5336 | if (_internal_metadata_.have_unknown_fields()) { |
| 5337 | mutable_unknown_fields()->Clear(); |
| 5338 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5339 | } |
| 5340 | |
| 5341 | bool OneofDescriptorProto::MergePartialFromCodedStream( |
| 5342 | ::google::protobuf::io::CodedInputStream* input) { |
| 5343 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 5344 | ::google::protobuf::uint32 tag; |
| 5345 | // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto) |
| 5346 | for (;;) { |
| 5347 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 5348 | tag = p.first; |
| 5349 | if (!p.second) goto handle_unusual; |
| 5350 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5351 | // optional string name = 1; |
| 5352 | case 1: { |
| 5353 | if (tag == 10) { |
| 5354 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5355 | input, this->mutable_name())); |
| 5356 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5357 | this->name().data(), this->name().length(), |
| 5358 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5359 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5360 | } else { |
| 5361 | goto handle_unusual; |
| 5362 | } |
| 5363 | if (input->ExpectAtEnd()) goto success; |
| 5364 | break; |
| 5365 | } |
| 5366 | |
| 5367 | default: { |
| 5368 | handle_unusual: |
| 5369 | if (tag == 0 || |
| 5370 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 5371 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 5372 | goto success; |
| 5373 | } |
| 5374 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5375 | input, tag, mutable_unknown_fields())); |
| 5376 | break; |
| 5377 | } |
| 5378 | } |
| 5379 | } |
| 5380 | success: |
| 5381 | // @@protoc_insertion_point(parse_success:google.protobuf.OneofDescriptorProto) |
| 5382 | return true; |
| 5383 | failure: |
| 5384 | // @@protoc_insertion_point(parse_failure:google.protobuf.OneofDescriptorProto) |
| 5385 | return false; |
| 5386 | #undef DO_ |
| 5387 | } |
| 5388 | |
| 5389 | void OneofDescriptorProto::SerializeWithCachedSizes( |
| 5390 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5391 | // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto) |
| 5392 | // optional string name = 1; |
| 5393 | if (has_name()) { |
| 5394 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5395 | this->name().data(), this->name().length(), |
| 5396 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5397 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5398 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 5399 | 1, this->name(), output); |
| 5400 | } |
| 5401 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5402 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5403 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5404 | unknown_fields(), output); |
| 5405 | } |
| 5406 | // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) |
| 5407 | } |
| 5408 | |
| 5409 | ::google::protobuf::uint8* OneofDescriptorProto::SerializeWithCachedSizesToArray( |
| 5410 | ::google::protobuf::uint8* target) const { |
| 5411 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) |
| 5412 | // optional string name = 1; |
| 5413 | if (has_name()) { |
| 5414 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 5415 | this->name().data(), this->name().length(), |
| 5416 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5417 | "google.protobuf.OneofDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5418 | target = |
| 5419 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 5420 | 1, this->name(), target); |
| 5421 | } |
| 5422 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5423 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5424 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5425 | unknown_fields(), target); |
| 5426 | } |
| 5427 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) |
| 5428 | return target; |
| 5429 | } |
| 5430 | |
| 5431 | int OneofDescriptorProto::ByteSize() const { |
| 5432 | int total_size = 0; |
| 5433 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5434 | // optional string name = 1; |
| 5435 | if (has_name()) { |
| 5436 | total_size += 1 + |
| 5437 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 5438 | this->name()); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5439 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5440 | |
| 5441 | if (_internal_metadata_.have_unknown_fields()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5442 | total_size += |
| 5443 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5444 | unknown_fields()); |
| 5445 | } |
| 5446 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5447 | _cached_size_ = total_size; |
| 5448 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5449 | return total_size; |
| 5450 | } |
| 5451 | |
| 5452 | void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5453 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5454 | const OneofDescriptorProto* source = |
| 5455 | ::google::protobuf::internal::DynamicCastToGenerated<const OneofDescriptorProto>( |
| 5456 | &from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5457 | if (source == NULL) { |
| 5458 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5459 | } else { |
| 5460 | MergeFrom(*source); |
| 5461 | } |
| 5462 | } |
| 5463 | |
| 5464 | void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5465 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5466 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 5467 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5468 | set_has_name(); |
| 5469 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5470 | } |
| 5471 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5472 | if (from._internal_metadata_.have_unknown_fields()) { |
| 5473 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 5474 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5475 | } |
| 5476 | |
| 5477 | void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 5478 | if (&from == this) return; |
| 5479 | Clear(); |
| 5480 | MergeFrom(from); |
| 5481 | } |
| 5482 | |
| 5483 | void OneofDescriptorProto::CopyFrom(const OneofDescriptorProto& from) { |
| 5484 | if (&from == this) return; |
| 5485 | Clear(); |
| 5486 | MergeFrom(from); |
| 5487 | } |
| 5488 | |
| 5489 | bool OneofDescriptorProto::IsInitialized() const { |
| 5490 | |
| 5491 | return true; |
| 5492 | } |
| 5493 | |
| 5494 | void OneofDescriptorProto::Swap(OneofDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5495 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5496 | InternalSwap(other); |
| 5497 | } |
| 5498 | void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { |
| 5499 | name_.Swap(&other->name_); |
| 5500 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 5501 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5502 | std::swap(_cached_size_, other->_cached_size_); |
| 5503 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5504 | |
| 5505 | ::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const { |
| 5506 | protobuf_AssignDescriptorsOnce(); |
| 5507 | ::google::protobuf::Metadata metadata; |
| 5508 | metadata.descriptor = OneofDescriptorProto_descriptor_; |
| 5509 | metadata.reflection = OneofDescriptorProto_reflection_; |
| 5510 | return metadata; |
| 5511 | } |
| 5512 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5513 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 5514 | // OneofDescriptorProto |
| 5515 | |
| 5516 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5517 | bool OneofDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5518 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 5519 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5520 | void OneofDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5521 | _has_bits_[0] |= 0x00000001u; |
| 5522 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5523 | void OneofDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5524 | _has_bits_[0] &= ~0x00000001u; |
| 5525 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5526 | void OneofDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5527 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5528 | clear_has_name(); |
| 5529 | } |
| 5530 | const ::std::string& OneofDescriptorProto::name() const { |
| 5531 | // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) |
| 5532 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5533 | } |
| 5534 | void OneofDescriptorProto::set_name(const ::std::string& value) { |
| 5535 | set_has_name(); |
| 5536 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5537 | // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) |
| 5538 | } |
| 5539 | void OneofDescriptorProto::set_name(const char* value) { |
| 5540 | set_has_name(); |
| 5541 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5542 | // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name) |
| 5543 | } |
| 5544 | void OneofDescriptorProto::set_name(const char* value, size_t size) { |
| 5545 | set_has_name(); |
| 5546 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5547 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5548 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name) |
| 5549 | } |
| 5550 | ::std::string* OneofDescriptorProto::mutable_name() { |
| 5551 | set_has_name(); |
| 5552 | // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) |
| 5553 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5554 | } |
| 5555 | ::std::string* OneofDescriptorProto::release_name() { |
| 5556 | clear_has_name(); |
| 5557 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5558 | } |
| 5559 | void OneofDescriptorProto::set_allocated_name(::std::string* name) { |
| 5560 | if (name != NULL) { |
| 5561 | set_has_name(); |
| 5562 | } else { |
| 5563 | clear_has_name(); |
| 5564 | } |
| 5565 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 5566 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) |
| 5567 | } |
| 5568 | |
| 5569 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5570 | |
| 5571 | // =================================================================== |
| 5572 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 5573 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 5574 | const int EnumDescriptorProto::kNameFieldNumber; |
| 5575 | const int EnumDescriptorProto::kValueFieldNumber; |
| 5576 | const int EnumDescriptorProto::kOptionsFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 5577 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5578 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5579 | EnumDescriptorProto::EnumDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5580 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5581 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5582 | // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5583 | } |
| 5584 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5585 | void EnumDescriptorProto::InitAsDefaultInstance() { |
| 5586 | options_ = const_cast< ::google::protobuf::EnumOptions*>(&::google::protobuf::EnumOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5587 | } |
| 5588 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 5589 | EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5590 | : ::google::protobuf::Message(), |
| 5591 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5592 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5593 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5594 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5595 | } |
| 5596 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5597 | void EnumDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5598 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5599 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5600 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5601 | options_ = NULL; |
| 5602 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 5603 | } |
| 5604 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5605 | EnumDescriptorProto::~EnumDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5606 | // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5607 | SharedDtor(); |
| 5608 | } |
| 5609 | |
| 5610 | void EnumDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5611 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5612 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5613 | delete options_; |
| 5614 | } |
| 5615 | } |
| 5616 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5617 | void EnumDescriptorProto::SetCachedSize(int size) const { |
| 5618 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 5619 | _cached_size_ = size; |
| 5620 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 5621 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5622 | const ::google::protobuf::Descriptor* EnumDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5623 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5624 | return EnumDescriptorProto_descriptor_; |
| 5625 | } |
| 5626 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5627 | const EnumDescriptorProto& EnumDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 5628 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 5629 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5630 | } |
| 5631 | |
| 5632 | EnumDescriptorProto* EnumDescriptorProto::default_instance_ = NULL; |
| 5633 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5634 | EnumDescriptorProto* EnumDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5635 | EnumDescriptorProto* n = new EnumDescriptorProto; |
| 5636 | if (arena != NULL) { |
| 5637 | arena->Own(n); |
| 5638 | } |
| 5639 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5640 | } |
| 5641 | |
| 5642 | void EnumDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 5643 | if (_has_bits_[0 / 32] & 5u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5644 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5645 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5646 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5647 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5648 | if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); |
| 5649 | } |
| 5650 | } |
| 5651 | value_.Clear(); |
| 5652 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5653 | if (_internal_metadata_.have_unknown_fields()) { |
| 5654 | mutable_unknown_fields()->Clear(); |
| 5655 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5656 | } |
| 5657 | |
| 5658 | bool EnumDescriptorProto::MergePartialFromCodedStream( |
| 5659 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5660 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5661 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5662 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto) |
| 5663 | for (;;) { |
| 5664 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 5665 | tag = p.first; |
| 5666 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5667 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5668 | // optional string name = 1; |
| 5669 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5670 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5671 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5672 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5673 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5674 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5675 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5676 | "google.protobuf.EnumDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5677 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5678 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5679 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5680 | if (input->ExpectTag(18)) goto parse_value; |
| 5681 | break; |
| 5682 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5683 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5684 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
| 5685 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5686 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5687 | parse_value: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5688 | DO_(input->IncrementRecursionDepth()); |
| 5689 | parse_loop_value: |
| 5690 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5691 | input, add_value())); |
| 5692 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5693 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5694 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5695 | if (input->ExpectTag(18)) goto parse_loop_value; |
| 5696 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5697 | if (input->ExpectTag(26)) goto parse_options; |
| 5698 | break; |
| 5699 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5700 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5701 | // optional .google.protobuf.EnumOptions options = 3; |
| 5702 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5703 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5704 | parse_options: |
| 5705 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 5706 | input, mutable_options())); |
| 5707 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5708 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5709 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5710 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5711 | break; |
| 5712 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5713 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5714 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5715 | handle_unusual: |
| 5716 | if (tag == 0 || |
| 5717 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5718 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5719 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5720 | } |
| 5721 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5722 | input, tag, mutable_unknown_fields())); |
| 5723 | break; |
| 5724 | } |
| 5725 | } |
| 5726 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5727 | success: |
| 5728 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5729 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5730 | failure: |
| 5731 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumDescriptorProto) |
| 5732 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5733 | #undef DO_ |
| 5734 | } |
| 5735 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5736 | void EnumDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5737 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5738 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5739 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5740 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5741 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5742 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5743 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5744 | "google.protobuf.EnumDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5745 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5746 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5747 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5748 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5749 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5750 | 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] | 5751 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5752 | 2, this->value(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5753 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5754 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5755 | // optional .google.protobuf.EnumOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5756 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5757 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5758 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5759 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5760 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5761 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5762 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5763 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5764 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5765 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5766 | } |
| 5767 | |
| 5768 | ::google::protobuf::uint8* EnumDescriptorProto::SerializeWithCachedSizesToArray( |
| 5769 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5770 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5771 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5772 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5773 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5774 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5775 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5776 | "google.protobuf.EnumDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5777 | target = |
| 5778 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 5779 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5780 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5781 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5782 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5783 | 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] | 5784 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5785 | WriteMessageNoVirtualToArray( |
| 5786 | 2, this->value(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5787 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5788 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5789 | // optional .google.protobuf.EnumOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5790 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5791 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5792 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5793 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5794 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5795 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5796 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5797 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5798 | unknown_fields(), target); |
| 5799 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5800 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 5801 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5802 | } |
| 5803 | |
| 5804 | int EnumDescriptorProto::ByteSize() const { |
| 5805 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5806 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 5807 | if (_has_bits_[0 / 32] & 5u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5808 | // optional string name = 1; |
| 5809 | if (has_name()) { |
| 5810 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5811 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 5812 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5813 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5814 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5815 | // optional .google.protobuf.EnumOptions options = 3; |
| 5816 | if (has_options()) { |
| 5817 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5818 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5819 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5820 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5821 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5822 | } |
| 5823 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 5824 | total_size += 1 * this->value_size(); |
| 5825 | for (int i = 0; i < this->value_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5826 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5827 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5828 | this->value(i)); |
| 5829 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5830 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5831 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5832 | total_size += |
| 5833 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5834 | unknown_fields()); |
| 5835 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5836 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5837 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 5838 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5839 | return total_size; |
| 5840 | } |
| 5841 | |
| 5842 | void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5843 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5844 | const EnumDescriptorProto* source = |
| 5845 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumDescriptorProto>( |
| 5846 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5847 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 5848 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5849 | } else { |
| 5850 | MergeFrom(*source); |
| 5851 | } |
| 5852 | } |
| 5853 | |
| 5854 | void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5855 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5856 | value_.MergeFrom(from.value_); |
| 5857 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5858 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5859 | set_has_name(); |
| 5860 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5861 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 5862 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5863 | mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options()); |
| 5864 | } |
| 5865 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5866 | if (from._internal_metadata_.have_unknown_fields()) { |
| 5867 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 5868 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5869 | } |
| 5870 | |
| 5871 | void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 5872 | if (&from == this) return; |
| 5873 | Clear(); |
| 5874 | MergeFrom(from); |
| 5875 | } |
| 5876 | |
| 5877 | void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) { |
| 5878 | if (&from == this) return; |
| 5879 | Clear(); |
| 5880 | MergeFrom(from); |
| 5881 | } |
| 5882 | |
| 5883 | bool EnumDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 5884 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 5885 | if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5886 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 5887 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 5888 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5889 | return true; |
| 5890 | } |
| 5891 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 5892 | void EnumDescriptorProto::Swap(EnumDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5893 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 5894 | InternalSwap(other); |
| 5895 | } |
| 5896 | void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { |
| 5897 | name_.Swap(&other->name_); |
| 5898 | value_.UnsafeArenaSwap(&other->value_); |
| 5899 | std::swap(options_, other->options_); |
| 5900 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 5901 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5902 | std::swap(_cached_size_, other->_cached_size_); |
| 5903 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 5904 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 5905 | ::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const { |
| 5906 | protobuf_AssignDescriptorsOnce(); |
| 5907 | ::google::protobuf::Metadata metadata; |
| 5908 | metadata.descriptor = EnumDescriptorProto_descriptor_; |
| 5909 | metadata.reflection = EnumDescriptorProto_reflection_; |
| 5910 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 5911 | } |
| 5912 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5913 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 5914 | // EnumDescriptorProto |
| 5915 | |
| 5916 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5917 | bool EnumDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5918 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 5919 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5920 | void EnumDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5921 | _has_bits_[0] |= 0x00000001u; |
| 5922 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5923 | void EnumDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5924 | _has_bits_[0] &= ~0x00000001u; |
| 5925 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5926 | void EnumDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5927 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5928 | clear_has_name(); |
| 5929 | } |
| 5930 | const ::std::string& EnumDescriptorProto::name() const { |
| 5931 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) |
| 5932 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5933 | } |
| 5934 | void EnumDescriptorProto::set_name(const ::std::string& value) { |
| 5935 | set_has_name(); |
| 5936 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 5937 | // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) |
| 5938 | } |
| 5939 | void EnumDescriptorProto::set_name(const char* value) { |
| 5940 | set_has_name(); |
| 5941 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 5942 | // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name) |
| 5943 | } |
| 5944 | void EnumDescriptorProto::set_name(const char* value, size_t size) { |
| 5945 | set_has_name(); |
| 5946 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5947 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 5948 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name) |
| 5949 | } |
| 5950 | ::std::string* EnumDescriptorProto::mutable_name() { |
| 5951 | set_has_name(); |
| 5952 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) |
| 5953 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5954 | } |
| 5955 | ::std::string* EnumDescriptorProto::release_name() { |
| 5956 | clear_has_name(); |
| 5957 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5958 | } |
| 5959 | void EnumDescriptorProto::set_allocated_name(::std::string* name) { |
| 5960 | if (name != NULL) { |
| 5961 | set_has_name(); |
| 5962 | } else { |
| 5963 | clear_has_name(); |
| 5964 | } |
| 5965 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 5966 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) |
| 5967 | } |
| 5968 | |
| 5969 | // repeated .google.protobuf.EnumValueDescriptorProto value = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5970 | int EnumDescriptorProto::value_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5971 | return value_.size(); |
| 5972 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 5973 | void EnumDescriptorProto::clear_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5974 | value_.Clear(); |
| 5975 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5976 | const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5977 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value) |
| 5978 | return value_.Get(index); |
| 5979 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5980 | ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5981 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value) |
| 5982 | return value_.Mutable(index); |
| 5983 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5984 | ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5985 | // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value) |
| 5986 | return value_.Add(); |
| 5987 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5988 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5989 | EnumDescriptorProto::mutable_value() { |
| 5990 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value) |
| 5991 | return &value_; |
| 5992 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 5993 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& |
| 5994 | EnumDescriptorProto::value() const { |
| 5995 | // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value) |
| 5996 | return value_; |
| 5997 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 5998 | |
| 5999 | // optional .google.protobuf.EnumOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6000 | bool EnumDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6001 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 6002 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6003 | void EnumDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6004 | _has_bits_[0] |= 0x00000004u; |
| 6005 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6006 | void EnumDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6007 | _has_bits_[0] &= ~0x00000004u; |
| 6008 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6009 | void EnumDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6010 | if (options_ != NULL) options_->::google::protobuf::EnumOptions::Clear(); |
| 6011 | clear_has_options(); |
| 6012 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6013 | const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6014 | // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) |
| 6015 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 6016 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6017 | ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6018 | set_has_options(); |
| 6019 | if (options_ == NULL) { |
| 6020 | options_ = new ::google::protobuf::EnumOptions; |
| 6021 | } |
| 6022 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) |
| 6023 | return options_; |
| 6024 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6025 | ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6026 | clear_has_options(); |
| 6027 | ::google::protobuf::EnumOptions* temp = options_; |
| 6028 | options_ = NULL; |
| 6029 | return temp; |
| 6030 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6031 | void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6032 | delete options_; |
| 6033 | options_ = options; |
| 6034 | if (options) { |
| 6035 | set_has_options(); |
| 6036 | } else { |
| 6037 | clear_has_options(); |
| 6038 | } |
| 6039 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.options) |
| 6040 | } |
| 6041 | |
| 6042 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6043 | |
| 6044 | // =================================================================== |
| 6045 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6046 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6047 | const int EnumValueDescriptorProto::kNameFieldNumber; |
| 6048 | const int EnumValueDescriptorProto::kNumberFieldNumber; |
| 6049 | const int EnumValueDescriptorProto::kOptionsFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6050 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6051 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6052 | EnumValueDescriptorProto::EnumValueDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6053 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6054 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6055 | // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6056 | } |
| 6057 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6058 | void EnumValueDescriptorProto::InitAsDefaultInstance() { |
| 6059 | options_ = const_cast< ::google::protobuf::EnumValueOptions*>(&::google::protobuf::EnumValueOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6060 | } |
| 6061 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6062 | EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6063 | : ::google::protobuf::Message(), |
| 6064 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6065 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6066 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6067 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6068 | } |
| 6069 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6070 | void EnumValueDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6071 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6072 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6073 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6074 | number_ = 0; |
| 6075 | options_ = NULL; |
| 6076 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 6077 | } |
| 6078 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6079 | EnumValueDescriptorProto::~EnumValueDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6080 | // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6081 | SharedDtor(); |
| 6082 | } |
| 6083 | |
| 6084 | void EnumValueDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6085 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6086 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6087 | delete options_; |
| 6088 | } |
| 6089 | } |
| 6090 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6091 | void EnumValueDescriptorProto::SetCachedSize(int size) const { |
| 6092 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 6093 | _cached_size_ = size; |
| 6094 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 6095 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6096 | const ::google::protobuf::Descriptor* EnumValueDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6097 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6098 | return EnumValueDescriptorProto_descriptor_; |
| 6099 | } |
| 6100 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6101 | const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 6102 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 6103 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6104 | } |
| 6105 | |
| 6106 | EnumValueDescriptorProto* EnumValueDescriptorProto::default_instance_ = NULL; |
| 6107 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6108 | EnumValueDescriptorProto* EnumValueDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6109 | EnumValueDescriptorProto* n = new EnumValueDescriptorProto; |
| 6110 | if (arena != NULL) { |
| 6111 | arena->Own(n); |
| 6112 | } |
| 6113 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6114 | } |
| 6115 | |
| 6116 | void EnumValueDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 6117 | if (_has_bits_[0 / 32] & 7u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6118 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6119 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6120 | } |
| 6121 | number_ = 0; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6122 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6123 | if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); |
| 6124 | } |
| 6125 | } |
| 6126 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6127 | if (_internal_metadata_.have_unknown_fields()) { |
| 6128 | mutable_unknown_fields()->Clear(); |
| 6129 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6130 | } |
| 6131 | |
| 6132 | bool EnumValueDescriptorProto::MergePartialFromCodedStream( |
| 6133 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6134 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6135 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6136 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto) |
| 6137 | for (;;) { |
| 6138 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 6139 | tag = p.first; |
| 6140 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6141 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6142 | // optional string name = 1; |
| 6143 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6144 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6145 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6146 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6147 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6148 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6149 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6150 | "google.protobuf.EnumValueDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6151 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6152 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6153 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6154 | if (input->ExpectTag(16)) goto parse_number; |
| 6155 | break; |
| 6156 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6157 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6158 | // optional int32 number = 2; |
| 6159 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6160 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6161 | parse_number: |
| 6162 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6163 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 6164 | input, &number_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6165 | set_has_number(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6166 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6167 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6168 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6169 | if (input->ExpectTag(26)) goto parse_options; |
| 6170 | break; |
| 6171 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6172 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6173 | // optional .google.protobuf.EnumValueOptions options = 3; |
| 6174 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6175 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6176 | parse_options: |
| 6177 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 6178 | input, mutable_options())); |
| 6179 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6180 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6181 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6182 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6183 | break; |
| 6184 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6185 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6186 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6187 | handle_unusual: |
| 6188 | if (tag == 0 || |
| 6189 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6190 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6191 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6192 | } |
| 6193 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6194 | input, tag, mutable_unknown_fields())); |
| 6195 | break; |
| 6196 | } |
| 6197 | } |
| 6198 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6199 | success: |
| 6200 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6201 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6202 | failure: |
| 6203 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueDescriptorProto) |
| 6204 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6205 | #undef DO_ |
| 6206 | } |
| 6207 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6208 | void EnumValueDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6209 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6210 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6211 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6212 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6213 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6214 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6215 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6216 | "google.protobuf.EnumValueDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6217 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6218 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6219 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6220 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6221 | // optional int32 number = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6222 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6223 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6224 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6225 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6226 | // optional .google.protobuf.EnumValueOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6227 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6228 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6229 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6230 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6231 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6232 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6233 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6234 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6235 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6236 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6237 | } |
| 6238 | |
| 6239 | ::google::protobuf::uint8* EnumValueDescriptorProto::SerializeWithCachedSizesToArray( |
| 6240 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6241 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6242 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6243 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6244 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6245 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6246 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6247 | "google.protobuf.EnumValueDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6248 | target = |
| 6249 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6250 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6251 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6252 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6253 | // optional int32 number = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6254 | if (has_number()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6255 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6256 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6257 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6258 | // optional .google.protobuf.EnumValueOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6259 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6260 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6261 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6262 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6263 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6264 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6265 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6266 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 6267 | unknown_fields(), target); |
| 6268 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6269 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6270 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6271 | } |
| 6272 | |
| 6273 | int EnumValueDescriptorProto::ByteSize() const { |
| 6274 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6275 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 6276 | if (_has_bits_[0 / 32] & 7u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6277 | // optional string name = 1; |
| 6278 | if (has_name()) { |
| 6279 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6280 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 6281 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6282 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6283 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6284 | // optional int32 number = 2; |
| 6285 | if (has_number()) { |
| 6286 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6287 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6288 | this->number()); |
| 6289 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6290 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6291 | // optional .google.protobuf.EnumValueOptions options = 3; |
| 6292 | if (has_options()) { |
| 6293 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6294 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6295 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6296 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6297 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6298 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6299 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6300 | total_size += |
| 6301 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 6302 | unknown_fields()); |
| 6303 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6304 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6305 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6306 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6307 | return total_size; |
| 6308 | } |
| 6309 | |
| 6310 | void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6311 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6312 | const EnumValueDescriptorProto* source = |
| 6313 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueDescriptorProto>( |
| 6314 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6315 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 6316 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6317 | } else { |
| 6318 | MergeFrom(*source); |
| 6319 | } |
| 6320 | } |
| 6321 | |
| 6322 | void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6323 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6324 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6325 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6326 | set_has_name(); |
| 6327 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6328 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6329 | if (from.has_number()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6330 | set_number(from.number()); |
| 6331 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6332 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6333 | mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options()); |
| 6334 | } |
| 6335 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6336 | if (from._internal_metadata_.have_unknown_fields()) { |
| 6337 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 6338 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6339 | } |
| 6340 | |
| 6341 | void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 6342 | if (&from == this) return; |
| 6343 | Clear(); |
| 6344 | MergeFrom(from); |
| 6345 | } |
| 6346 | |
| 6347 | void EnumValueDescriptorProto::CopyFrom(const EnumValueDescriptorProto& from) { |
| 6348 | if (&from == this) return; |
| 6349 | Clear(); |
| 6350 | MergeFrom(from); |
| 6351 | } |
| 6352 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6353 | bool EnumValueDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6354 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6355 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6356 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6357 | } |
| 6358 | return true; |
| 6359 | } |
| 6360 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 6361 | void EnumValueDescriptorProto::Swap(EnumValueDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6362 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6363 | InternalSwap(other); |
| 6364 | } |
| 6365 | void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { |
| 6366 | name_.Swap(&other->name_); |
| 6367 | std::swap(number_, other->number_); |
| 6368 | std::swap(options_, other->options_); |
| 6369 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 6370 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 6371 | std::swap(_cached_size_, other->_cached_size_); |
| 6372 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 6373 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6374 | ::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const { |
| 6375 | protobuf_AssignDescriptorsOnce(); |
| 6376 | ::google::protobuf::Metadata metadata; |
| 6377 | metadata.descriptor = EnumValueDescriptorProto_descriptor_; |
| 6378 | metadata.reflection = EnumValueDescriptorProto_reflection_; |
| 6379 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6380 | } |
| 6381 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6382 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 6383 | // EnumValueDescriptorProto |
| 6384 | |
| 6385 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6386 | bool EnumValueDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6387 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 6388 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6389 | void EnumValueDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6390 | _has_bits_[0] |= 0x00000001u; |
| 6391 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6392 | void EnumValueDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6393 | _has_bits_[0] &= ~0x00000001u; |
| 6394 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6395 | void EnumValueDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6396 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6397 | clear_has_name(); |
| 6398 | } |
| 6399 | const ::std::string& EnumValueDescriptorProto::name() const { |
| 6400 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) |
| 6401 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6402 | } |
| 6403 | void EnumValueDescriptorProto::set_name(const ::std::string& value) { |
| 6404 | set_has_name(); |
| 6405 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 6406 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) |
| 6407 | } |
| 6408 | void EnumValueDescriptorProto::set_name(const char* value) { |
| 6409 | set_has_name(); |
| 6410 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 6411 | // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name) |
| 6412 | } |
| 6413 | void EnumValueDescriptorProto::set_name(const char* value, size_t size) { |
| 6414 | set_has_name(); |
| 6415 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 6416 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 6417 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name) |
| 6418 | } |
| 6419 | ::std::string* EnumValueDescriptorProto::mutable_name() { |
| 6420 | set_has_name(); |
| 6421 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) |
| 6422 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6423 | } |
| 6424 | ::std::string* EnumValueDescriptorProto::release_name() { |
| 6425 | clear_has_name(); |
| 6426 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6427 | } |
| 6428 | void EnumValueDescriptorProto::set_allocated_name(::std::string* name) { |
| 6429 | if (name != NULL) { |
| 6430 | set_has_name(); |
| 6431 | } else { |
| 6432 | clear_has_name(); |
| 6433 | } |
| 6434 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 6435 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) |
| 6436 | } |
| 6437 | |
| 6438 | // optional int32 number = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6439 | bool EnumValueDescriptorProto::has_number() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6440 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 6441 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6442 | void EnumValueDescriptorProto::set_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6443 | _has_bits_[0] |= 0x00000002u; |
| 6444 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6445 | void EnumValueDescriptorProto::clear_has_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6446 | _has_bits_[0] &= ~0x00000002u; |
| 6447 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6448 | void EnumValueDescriptorProto::clear_number() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6449 | number_ = 0; |
| 6450 | clear_has_number(); |
| 6451 | } |
| 6452 | ::google::protobuf::int32 EnumValueDescriptorProto::number() const { |
| 6453 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number) |
| 6454 | return number_; |
| 6455 | } |
| 6456 | void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) { |
| 6457 | set_has_number(); |
| 6458 | number_ = value; |
| 6459 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number) |
| 6460 | } |
| 6461 | |
| 6462 | // optional .google.protobuf.EnumValueOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6463 | bool EnumValueDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6464 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 6465 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6466 | void EnumValueDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6467 | _has_bits_[0] |= 0x00000004u; |
| 6468 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6469 | void EnumValueDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6470 | _has_bits_[0] &= ~0x00000004u; |
| 6471 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6472 | void EnumValueDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6473 | if (options_ != NULL) options_->::google::protobuf::EnumValueOptions::Clear(); |
| 6474 | clear_has_options(); |
| 6475 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6476 | const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6477 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) |
| 6478 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 6479 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6480 | ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6481 | set_has_options(); |
| 6482 | if (options_ == NULL) { |
| 6483 | options_ = new ::google::protobuf::EnumValueOptions; |
| 6484 | } |
| 6485 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) |
| 6486 | return options_; |
| 6487 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6488 | ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6489 | clear_has_options(); |
| 6490 | ::google::protobuf::EnumValueOptions* temp = options_; |
| 6491 | options_ = NULL; |
| 6492 | return temp; |
| 6493 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6494 | void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6495 | delete options_; |
| 6496 | options_ = options; |
| 6497 | if (options) { |
| 6498 | set_has_options(); |
| 6499 | } else { |
| 6500 | clear_has_options(); |
| 6501 | } |
| 6502 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.options) |
| 6503 | } |
| 6504 | |
| 6505 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6506 | |
| 6507 | // =================================================================== |
| 6508 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6509 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6510 | const int ServiceDescriptorProto::kNameFieldNumber; |
| 6511 | const int ServiceDescriptorProto::kMethodFieldNumber; |
| 6512 | const int ServiceDescriptorProto::kOptionsFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6513 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6514 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6515 | ServiceDescriptorProto::ServiceDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6516 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6517 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6518 | // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6519 | } |
| 6520 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6521 | void ServiceDescriptorProto::InitAsDefaultInstance() { |
| 6522 | options_ = const_cast< ::google::protobuf::ServiceOptions*>(&::google::protobuf::ServiceOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6523 | } |
| 6524 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6525 | ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6526 | : ::google::protobuf::Message(), |
| 6527 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6528 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6529 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6530 | // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6531 | } |
| 6532 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6533 | void ServiceDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6534 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6535 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6536 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6537 | options_ = NULL; |
| 6538 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 6539 | } |
| 6540 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6541 | ServiceDescriptorProto::~ServiceDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6542 | // @@protoc_insertion_point(destructor:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6543 | SharedDtor(); |
| 6544 | } |
| 6545 | |
| 6546 | void ServiceDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6547 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6548 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6549 | delete options_; |
| 6550 | } |
| 6551 | } |
| 6552 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6553 | void ServiceDescriptorProto::SetCachedSize(int size) const { |
| 6554 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 6555 | _cached_size_ = size; |
| 6556 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 6557 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6558 | const ::google::protobuf::Descriptor* ServiceDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6559 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6560 | return ServiceDescriptorProto_descriptor_; |
| 6561 | } |
| 6562 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6563 | const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 6564 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 6565 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6566 | } |
| 6567 | |
| 6568 | ServiceDescriptorProto* ServiceDescriptorProto::default_instance_ = NULL; |
| 6569 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6570 | ServiceDescriptorProto* ServiceDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6571 | ServiceDescriptorProto* n = new ServiceDescriptorProto; |
| 6572 | if (arena != NULL) { |
| 6573 | arena->Own(n); |
| 6574 | } |
| 6575 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6576 | } |
| 6577 | |
| 6578 | void ServiceDescriptorProto::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 6579 | if (_has_bits_[0 / 32] & 5u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6580 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6581 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6582 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6583 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6584 | if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); |
| 6585 | } |
| 6586 | } |
| 6587 | method_.Clear(); |
| 6588 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6589 | if (_internal_metadata_.have_unknown_fields()) { |
| 6590 | mutable_unknown_fields()->Clear(); |
| 6591 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6592 | } |
| 6593 | |
| 6594 | bool ServiceDescriptorProto::MergePartialFromCodedStream( |
| 6595 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6596 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6597 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6598 | // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto) |
| 6599 | for (;;) { |
| 6600 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 6601 | tag = p.first; |
| 6602 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6603 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6604 | // optional string name = 1; |
| 6605 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6606 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6607 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6608 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6609 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6610 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6611 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6612 | "google.protobuf.ServiceDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6613 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6614 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6615 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6616 | if (input->ExpectTag(18)) goto parse_method; |
| 6617 | break; |
| 6618 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6619 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6620 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
| 6621 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6622 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6623 | parse_method: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6624 | DO_(input->IncrementRecursionDepth()); |
| 6625 | parse_loop_method: |
| 6626 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6627 | input, add_method())); |
| 6628 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6629 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6630 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6631 | if (input->ExpectTag(18)) goto parse_loop_method; |
| 6632 | input->UnsafeDecrementRecursionDepth(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6633 | if (input->ExpectTag(26)) goto parse_options; |
| 6634 | break; |
| 6635 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6636 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6637 | // optional .google.protobuf.ServiceOptions options = 3; |
| 6638 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6639 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6640 | parse_options: |
| 6641 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 6642 | input, mutable_options())); |
| 6643 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6644 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6645 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6646 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6647 | break; |
| 6648 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6649 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6650 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6651 | handle_unusual: |
| 6652 | if (tag == 0 || |
| 6653 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6654 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6655 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6656 | } |
| 6657 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6658 | input, tag, mutable_unknown_fields())); |
| 6659 | break; |
| 6660 | } |
| 6661 | } |
| 6662 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6663 | success: |
| 6664 | // @@protoc_insertion_point(parse_success:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6665 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6666 | failure: |
| 6667 | // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceDescriptorProto) |
| 6668 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6669 | #undef DO_ |
| 6670 | } |
| 6671 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6672 | void ServiceDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6673 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6674 | // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6675 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6676 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6677 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6678 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6679 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6680 | "google.protobuf.ServiceDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6681 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6682 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6683 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6684 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6685 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6686 | 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] | 6687 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6688 | 2, this->method(i), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6689 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6690 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6691 | // optional .google.protobuf.ServiceOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6692 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6693 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6694 | 3, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6695 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6696 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6697 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6698 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6699 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6700 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6701 | // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6702 | } |
| 6703 | |
| 6704 | ::google::protobuf::uint8* ServiceDescriptorProto::SerializeWithCachedSizesToArray( |
| 6705 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6706 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6707 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6708 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6709 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6710 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6711 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6712 | "google.protobuf.ServiceDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6713 | target = |
| 6714 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6715 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6716 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6717 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6718 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6719 | 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] | 6720 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6721 | WriteMessageNoVirtualToArray( |
| 6722 | 2, this->method(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6723 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6724 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6725 | // optional .google.protobuf.ServiceOptions options = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6726 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6727 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6728 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6729 | 3, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6730 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6731 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6732 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6733 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 6734 | unknown_fields(), target); |
| 6735 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6736 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6737 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6738 | } |
| 6739 | |
| 6740 | int ServiceDescriptorProto::ByteSize() const { |
| 6741 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6742 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 6743 | if (_has_bits_[0 / 32] & 5u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6744 | // optional string name = 1; |
| 6745 | if (has_name()) { |
| 6746 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6747 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 6748 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6749 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6750 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6751 | // optional .google.protobuf.ServiceOptions options = 3; |
| 6752 | if (has_options()) { |
| 6753 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6754 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6755 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6756 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6757 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6758 | } |
| 6759 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 6760 | total_size += 1 * this->method_size(); |
| 6761 | for (int i = 0; i < this->method_size(); i++) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6762 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6763 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6764 | this->method(i)); |
| 6765 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6766 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6767 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6768 | total_size += |
| 6769 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 6770 | unknown_fields()); |
| 6771 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6772 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6773 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 6774 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6775 | return total_size; |
| 6776 | } |
| 6777 | |
| 6778 | void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6779 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6780 | const ServiceDescriptorProto* source = |
| 6781 | ::google::protobuf::internal::DynamicCastToGenerated<const ServiceDescriptorProto>( |
| 6782 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6783 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 6784 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6785 | } else { |
| 6786 | MergeFrom(*source); |
| 6787 | } |
| 6788 | } |
| 6789 | |
| 6790 | void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6791 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6792 | method_.MergeFrom(from.method_); |
| 6793 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6794 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6795 | set_has_name(); |
| 6796 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6797 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 6798 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6799 | mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options()); |
| 6800 | } |
| 6801 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6802 | if (from._internal_metadata_.have_unknown_fields()) { |
| 6803 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 6804 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6805 | } |
| 6806 | |
| 6807 | void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 6808 | if (&from == this) return; |
| 6809 | Clear(); |
| 6810 | MergeFrom(from); |
| 6811 | } |
| 6812 | |
| 6813 | void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) { |
| 6814 | if (&from == this) return; |
| 6815 | Clear(); |
| 6816 | MergeFrom(from); |
| 6817 | } |
| 6818 | |
| 6819 | bool ServiceDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 6820 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6821 | if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6822 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 6823 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6824 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6825 | return true; |
| 6826 | } |
| 6827 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6828 | void ServiceDescriptorProto::Swap(ServiceDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6829 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 6830 | InternalSwap(other); |
| 6831 | } |
| 6832 | void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { |
| 6833 | name_.Swap(&other->name_); |
| 6834 | method_.UnsafeArenaSwap(&other->method_); |
| 6835 | std::swap(options_, other->options_); |
| 6836 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 6837 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 6838 | std::swap(_cached_size_, other->_cached_size_); |
| 6839 | } |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 6840 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6841 | ::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const { |
| 6842 | protobuf_AssignDescriptorsOnce(); |
| 6843 | ::google::protobuf::Metadata metadata; |
| 6844 | metadata.descriptor = ServiceDescriptorProto_descriptor_; |
| 6845 | metadata.reflection = ServiceDescriptorProto_reflection_; |
| 6846 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6847 | } |
| 6848 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6849 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 6850 | // ServiceDescriptorProto |
| 6851 | |
| 6852 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6853 | bool ServiceDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6854 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 6855 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6856 | void ServiceDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6857 | _has_bits_[0] |= 0x00000001u; |
| 6858 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6859 | void ServiceDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6860 | _has_bits_[0] &= ~0x00000001u; |
| 6861 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6862 | void ServiceDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6863 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6864 | clear_has_name(); |
| 6865 | } |
| 6866 | const ::std::string& ServiceDescriptorProto::name() const { |
| 6867 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) |
| 6868 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6869 | } |
| 6870 | void ServiceDescriptorProto::set_name(const ::std::string& value) { |
| 6871 | set_has_name(); |
| 6872 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 6873 | // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) |
| 6874 | } |
| 6875 | void ServiceDescriptorProto::set_name(const char* value) { |
| 6876 | set_has_name(); |
| 6877 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 6878 | // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name) |
| 6879 | } |
| 6880 | void ServiceDescriptorProto::set_name(const char* value, size_t size) { |
| 6881 | set_has_name(); |
| 6882 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 6883 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 6884 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name) |
| 6885 | } |
| 6886 | ::std::string* ServiceDescriptorProto::mutable_name() { |
| 6887 | set_has_name(); |
| 6888 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) |
| 6889 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6890 | } |
| 6891 | ::std::string* ServiceDescriptorProto::release_name() { |
| 6892 | clear_has_name(); |
| 6893 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6894 | } |
| 6895 | void ServiceDescriptorProto::set_allocated_name(::std::string* name) { |
| 6896 | if (name != NULL) { |
| 6897 | set_has_name(); |
| 6898 | } else { |
| 6899 | clear_has_name(); |
| 6900 | } |
| 6901 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 6902 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) |
| 6903 | } |
| 6904 | |
| 6905 | // repeated .google.protobuf.MethodDescriptorProto method = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6906 | int ServiceDescriptorProto::method_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6907 | return method_.size(); |
| 6908 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6909 | void ServiceDescriptorProto::clear_method() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6910 | method_.Clear(); |
| 6911 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6912 | const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6913 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method) |
| 6914 | return method_.Get(index); |
| 6915 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6916 | ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6917 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method) |
| 6918 | return method_.Mutable(index); |
| 6919 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6920 | ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6921 | // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method) |
| 6922 | return method_.Add(); |
| 6923 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6924 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6925 | ServiceDescriptorProto::mutable_method() { |
| 6926 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method) |
| 6927 | return &method_; |
| 6928 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6929 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& |
| 6930 | ServiceDescriptorProto::method() const { |
| 6931 | // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method) |
| 6932 | return method_; |
| 6933 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6934 | |
| 6935 | // optional .google.protobuf.ServiceOptions options = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6936 | bool ServiceDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6937 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 6938 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6939 | void ServiceDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6940 | _has_bits_[0] |= 0x00000004u; |
| 6941 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6942 | void ServiceDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6943 | _has_bits_[0] &= ~0x00000004u; |
| 6944 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6945 | void ServiceDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6946 | if (options_ != NULL) options_->::google::protobuf::ServiceOptions::Clear(); |
| 6947 | clear_has_options(); |
| 6948 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6949 | const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6950 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) |
| 6951 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 6952 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6953 | ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6954 | set_has_options(); |
| 6955 | if (options_ == NULL) { |
| 6956 | options_ = new ::google::protobuf::ServiceOptions; |
| 6957 | } |
| 6958 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) |
| 6959 | return options_; |
| 6960 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6961 | ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6962 | clear_has_options(); |
| 6963 | ::google::protobuf::ServiceOptions* temp = options_; |
| 6964 | options_ = NULL; |
| 6965 | return temp; |
| 6966 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 6967 | void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 6968 | delete options_; |
| 6969 | options_ = options; |
| 6970 | if (options) { |
| 6971 | set_has_options(); |
| 6972 | } else { |
| 6973 | clear_has_options(); |
| 6974 | } |
| 6975 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.options) |
| 6976 | } |
| 6977 | |
| 6978 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6979 | |
| 6980 | // =================================================================== |
| 6981 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6982 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 6983 | const int MethodDescriptorProto::kNameFieldNumber; |
| 6984 | const int MethodDescriptorProto::kInputTypeFieldNumber; |
| 6985 | const int MethodDescriptorProto::kOutputTypeFieldNumber; |
| 6986 | const int MethodDescriptorProto::kOptionsFieldNumber; |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 6987 | const int MethodDescriptorProto::kClientStreamingFieldNumber; |
| 6988 | const int MethodDescriptorProto::kServerStreamingFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 6989 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6990 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 6991 | MethodDescriptorProto::MethodDescriptorProto() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 6992 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 6993 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 6994 | // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 6995 | } |
| 6996 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 6997 | void MethodDescriptorProto::InitAsDefaultInstance() { |
| 6998 | options_ = const_cast< ::google::protobuf::MethodOptions*>(&::google::protobuf::MethodOptions::default_instance()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 6999 | } |
| 7000 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 7001 | MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7002 | : ::google::protobuf::Message(), |
| 7003 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7004 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7005 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7006 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7007 | } |
| 7008 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7009 | void MethodDescriptorProto::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7010 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7011 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7012 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7013 | input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7014 | output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7015 | options_ = NULL; |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7016 | client_streaming_ = false; |
| 7017 | server_streaming_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7018 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 7019 | } |
| 7020 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7021 | MethodDescriptorProto::~MethodDescriptorProto() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7022 | // @@protoc_insertion_point(destructor:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7023 | SharedDtor(); |
| 7024 | } |
| 7025 | |
| 7026 | void MethodDescriptorProto::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7027 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7028 | input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7029 | output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7030 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7031 | delete options_; |
| 7032 | } |
| 7033 | } |
| 7034 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7035 | void MethodDescriptorProto::SetCachedSize(int size) const { |
| 7036 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 7037 | _cached_size_ = size; |
| 7038 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 7039 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7040 | const ::google::protobuf::Descriptor* MethodDescriptorProto::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7041 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7042 | return MethodDescriptorProto_descriptor_; |
| 7043 | } |
| 7044 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7045 | const MethodDescriptorProto& MethodDescriptorProto::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 7046 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 7047 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7048 | } |
| 7049 | |
| 7050 | MethodDescriptorProto* MethodDescriptorProto::default_instance_ = NULL; |
| 7051 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7052 | MethodDescriptorProto* MethodDescriptorProto::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7053 | MethodDescriptorProto* n = new MethodDescriptorProto; |
| 7054 | if (arena != NULL) { |
| 7055 | arena->Own(n); |
| 7056 | } |
| 7057 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7058 | } |
| 7059 | |
| 7060 | void MethodDescriptorProto::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7061 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 7062 | &reinterpret_cast<MethodDescriptorProto*>(16)->f) |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7063 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7064 | #define ZR_(first, last) do {\ |
| 7065 | ::memset(&first, 0,\ |
| 7066 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 7067 | } while (0) |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7068 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 7069 | if (_has_bits_[0 / 32] & 63u) { |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7070 | ZR_(client_streaming_, server_streaming_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7071 | if (has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7072 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7073 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7074 | if (has_input_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7075 | input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7076 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7077 | if (has_output_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7078 | output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7079 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7080 | if (has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7081 | if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); |
| 7082 | } |
| 7083 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7084 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7085 | #undef ZR_HELPER_ |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7086 | #undef ZR_ |
| 7087 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7088 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7089 | if (_internal_metadata_.have_unknown_fields()) { |
| 7090 | mutable_unknown_fields()->Clear(); |
| 7091 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7092 | } |
| 7093 | |
| 7094 | bool MethodDescriptorProto::MergePartialFromCodedStream( |
| 7095 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7096 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7097 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7098 | // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto) |
| 7099 | for (;;) { |
| 7100 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 7101 | tag = p.first; |
| 7102 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7103 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7104 | // optional string name = 1; |
| 7105 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7106 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7107 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7108 | input, this->mutable_name())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7109 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7110 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7111 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7112 | "google.protobuf.MethodDescriptorProto.name"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7113 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7114 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7115 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7116 | if (input->ExpectTag(18)) goto parse_input_type; |
| 7117 | break; |
| 7118 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7119 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7120 | // optional string input_type = 2; |
| 7121 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7122 | if (tag == 18) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7123 | parse_input_type: |
| 7124 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7125 | input, this->mutable_input_type())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7126 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7127 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7128 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7129 | "google.protobuf.MethodDescriptorProto.input_type"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7130 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7131 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7132 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7133 | if (input->ExpectTag(26)) goto parse_output_type; |
| 7134 | break; |
| 7135 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7136 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7137 | // optional string output_type = 3; |
| 7138 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7139 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7140 | parse_output_type: |
| 7141 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7142 | input, this->mutable_output_type())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7143 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7144 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7145 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7146 | "google.protobuf.MethodDescriptorProto.output_type"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7147 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7148 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7149 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7150 | if (input->ExpectTag(34)) goto parse_options; |
| 7151 | break; |
| 7152 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7153 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7154 | // optional .google.protobuf.MethodOptions options = 4; |
| 7155 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7156 | if (tag == 34) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7157 | parse_options: |
| 7158 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| 7159 | input, mutable_options())); |
| 7160 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7161 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7162 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7163 | if (input->ExpectTag(40)) goto parse_client_streaming; |
| 7164 | break; |
| 7165 | } |
| 7166 | |
| 7167 | // optional bool client_streaming = 5 [default = false]; |
| 7168 | case 5: { |
| 7169 | if (tag == 40) { |
| 7170 | parse_client_streaming: |
| 7171 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7172 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7173 | input, &client_streaming_))); |
| 7174 | set_has_client_streaming(); |
| 7175 | } else { |
| 7176 | goto handle_unusual; |
| 7177 | } |
| 7178 | if (input->ExpectTag(48)) goto parse_server_streaming; |
| 7179 | break; |
| 7180 | } |
| 7181 | |
| 7182 | // optional bool server_streaming = 6 [default = false]; |
| 7183 | case 6: { |
| 7184 | if (tag == 48) { |
| 7185 | parse_server_streaming: |
| 7186 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7187 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7188 | input, &server_streaming_))); |
| 7189 | set_has_server_streaming(); |
| 7190 | } else { |
| 7191 | goto handle_unusual; |
| 7192 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7193 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7194 | break; |
| 7195 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7196 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7197 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7198 | handle_unusual: |
| 7199 | if (tag == 0 || |
| 7200 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7201 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7202 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7203 | } |
| 7204 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 7205 | input, tag, mutable_unknown_fields())); |
| 7206 | break; |
| 7207 | } |
| 7208 | } |
| 7209 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7210 | success: |
| 7211 | // @@protoc_insertion_point(parse_success:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7212 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7213 | failure: |
| 7214 | // @@protoc_insertion_point(parse_failure:google.protobuf.MethodDescriptorProto) |
| 7215 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7216 | #undef DO_ |
| 7217 | } |
| 7218 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7219 | void MethodDescriptorProto::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7220 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7221 | // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7222 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7223 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7224 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7225 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7226 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7227 | "google.protobuf.MethodDescriptorProto.name"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7228 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7229 | 1, this->name(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7230 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7231 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7232 | // optional string input_type = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7233 | if (has_input_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7234 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7235 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7236 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7237 | "google.protobuf.MethodDescriptorProto.input_type"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7238 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7239 | 2, this->input_type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7240 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7241 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7242 | // optional string output_type = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7243 | if (has_output_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7244 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7245 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7246 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7247 | "google.protobuf.MethodDescriptorProto.output_type"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7248 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7249 | 3, this->output_type(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7250 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7251 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7252 | // optional .google.protobuf.MethodOptions options = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7253 | if (has_options()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7254 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7255 | 4, *this->options_, output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7256 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7257 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7258 | // optional bool client_streaming = 5 [default = false]; |
| 7259 | if (has_client_streaming()) { |
| 7260 | ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output); |
| 7261 | } |
| 7262 | |
| 7263 | // optional bool server_streaming = 6 [default = false]; |
| 7264 | if (has_server_streaming()) { |
| 7265 | ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output); |
| 7266 | } |
| 7267 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7268 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7269 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 7270 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7271 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7272 | // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7273 | } |
| 7274 | |
| 7275 | ::google::protobuf::uint8* MethodDescriptorProto::SerializeWithCachedSizesToArray( |
| 7276 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7277 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7278 | // optional string name = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7279 | if (has_name()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7280 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7281 | this->name().data(), this->name().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7282 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7283 | "google.protobuf.MethodDescriptorProto.name"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7284 | target = |
| 7285 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7286 | 1, this->name(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7287 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7288 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7289 | // optional string input_type = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7290 | if (has_input_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7291 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7292 | this->input_type().data(), this->input_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7293 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7294 | "google.protobuf.MethodDescriptorProto.input_type"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7295 | target = |
| 7296 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7297 | 2, this->input_type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7298 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7299 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7300 | // optional string output_type = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7301 | if (has_output_type()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7302 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7303 | this->output_type().data(), this->output_type().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7304 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7305 | "google.protobuf.MethodDescriptorProto.output_type"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7306 | target = |
| 7307 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7308 | 3, this->output_type(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7309 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7310 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7311 | // optional .google.protobuf.MethodOptions options = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7312 | if (has_options()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7313 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7314 | WriteMessageNoVirtualToArray( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7315 | 4, *this->options_, target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7316 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7317 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7318 | // optional bool client_streaming = 5 [default = false]; |
| 7319 | if (has_client_streaming()) { |
| 7320 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target); |
| 7321 | } |
| 7322 | |
| 7323 | // optional bool server_streaming = 6 [default = false]; |
| 7324 | if (has_server_streaming()) { |
| 7325 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target); |
| 7326 | } |
| 7327 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7328 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7329 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 7330 | unknown_fields(), target); |
| 7331 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7332 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7333 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7334 | } |
| 7335 | |
| 7336 | int MethodDescriptorProto::ByteSize() const { |
| 7337 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7338 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 7339 | if (_has_bits_[0 / 32] & 63u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7340 | // optional string name = 1; |
| 7341 | if (has_name()) { |
| 7342 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7343 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7344 | this->name()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7345 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7346 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7347 | // optional string input_type = 2; |
| 7348 | if (has_input_type()) { |
| 7349 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7350 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7351 | this->input_type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7352 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7353 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7354 | // optional string output_type = 3; |
| 7355 | if (has_output_type()) { |
| 7356 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7357 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7358 | this->output_type()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7359 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7360 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7361 | // optional .google.protobuf.MethodOptions options = 4; |
| 7362 | if (has_options()) { |
| 7363 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7364 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7365 | *this->options_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7366 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7367 | |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7368 | // optional bool client_streaming = 5 [default = false]; |
| 7369 | if (has_client_streaming()) { |
| 7370 | total_size += 1 + 1; |
| 7371 | } |
| 7372 | |
| 7373 | // optional bool server_streaming = 6 [default = false]; |
| 7374 | if (has_server_streaming()) { |
| 7375 | total_size += 1 + 1; |
| 7376 | } |
| 7377 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7378 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7379 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7380 | total_size += |
| 7381 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 7382 | unknown_fields()); |
| 7383 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7384 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7385 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7386 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7387 | return total_size; |
| 7388 | } |
| 7389 | |
| 7390 | void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7391 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7392 | const MethodDescriptorProto* source = |
| 7393 | ::google::protobuf::internal::DynamicCastToGenerated<const MethodDescriptorProto>( |
| 7394 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7395 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 7396 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7397 | } else { |
| 7398 | MergeFrom(*source); |
| 7399 | } |
| 7400 | } |
| 7401 | |
| 7402 | void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7403 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7404 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7405 | if (from.has_name()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7406 | set_has_name(); |
| 7407 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7408 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7409 | if (from.has_input_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7410 | set_has_input_type(); |
| 7411 | input_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7412 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7413 | if (from.has_output_type()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7414 | set_has_output_type(); |
| 7415 | output_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7416 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7417 | if (from.has_options()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7418 | mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options()); |
| 7419 | } |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7420 | if (from.has_client_streaming()) { |
| 7421 | set_client_streaming(from.client_streaming()); |
| 7422 | } |
| 7423 | if (from.has_server_streaming()) { |
| 7424 | set_server_streaming(from.server_streaming()); |
| 7425 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7426 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7427 | if (from._internal_metadata_.have_unknown_fields()) { |
| 7428 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 7429 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7430 | } |
| 7431 | |
| 7432 | void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { |
| 7433 | if (&from == this) return; |
| 7434 | Clear(); |
| 7435 | MergeFrom(from); |
| 7436 | } |
| 7437 | |
| 7438 | void MethodDescriptorProto::CopyFrom(const MethodDescriptorProto& from) { |
| 7439 | if (&from == this) return; |
| 7440 | Clear(); |
| 7441 | MergeFrom(from); |
| 7442 | } |
| 7443 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7444 | bool MethodDescriptorProto::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7445 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7446 | if (has_options()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7447 | if (!this->options_->IsInitialized()) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 7448 | } |
| 7449 | return true; |
| 7450 | } |
| 7451 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 7452 | void MethodDescriptorProto::Swap(MethodDescriptorProto* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7453 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7454 | InternalSwap(other); |
| 7455 | } |
| 7456 | void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { |
| 7457 | name_.Swap(&other->name_); |
| 7458 | input_type_.Swap(&other->input_type_); |
| 7459 | output_type_.Swap(&other->output_type_); |
| 7460 | std::swap(options_, other->options_); |
Feng Xiao | 99aa0f9 | 2014-11-20 16:18:53 -0800 | [diff] [blame] | 7461 | std::swap(client_streaming_, other->client_streaming_); |
| 7462 | std::swap(server_streaming_, other->server_streaming_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7463 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 7464 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 7465 | std::swap(_cached_size_, other->_cached_size_); |
| 7466 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 7467 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7468 | ::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const { |
| 7469 | protobuf_AssignDescriptorsOnce(); |
| 7470 | ::google::protobuf::Metadata metadata; |
| 7471 | metadata.descriptor = MethodDescriptorProto_descriptor_; |
| 7472 | metadata.reflection = MethodDescriptorProto_reflection_; |
| 7473 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7474 | } |
| 7475 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7476 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 7477 | // MethodDescriptorProto |
| 7478 | |
| 7479 | // optional string name = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7480 | bool MethodDescriptorProto::has_name() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7481 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 7482 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7483 | void MethodDescriptorProto::set_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7484 | _has_bits_[0] |= 0x00000001u; |
| 7485 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7486 | void MethodDescriptorProto::clear_has_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7487 | _has_bits_[0] &= ~0x00000001u; |
| 7488 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7489 | void MethodDescriptorProto::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7490 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7491 | clear_has_name(); |
| 7492 | } |
| 7493 | const ::std::string& MethodDescriptorProto::name() const { |
| 7494 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) |
| 7495 | return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7496 | } |
| 7497 | void MethodDescriptorProto::set_name(const ::std::string& value) { |
| 7498 | set_has_name(); |
| 7499 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7500 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) |
| 7501 | } |
| 7502 | void MethodDescriptorProto::set_name(const char* value) { |
| 7503 | set_has_name(); |
| 7504 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7505 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name) |
| 7506 | } |
| 7507 | void MethodDescriptorProto::set_name(const char* value, size_t size) { |
| 7508 | set_has_name(); |
| 7509 | name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7510 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7511 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name) |
| 7512 | } |
| 7513 | ::std::string* MethodDescriptorProto::mutable_name() { |
| 7514 | set_has_name(); |
| 7515 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) |
| 7516 | return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7517 | } |
| 7518 | ::std::string* MethodDescriptorProto::release_name() { |
| 7519 | clear_has_name(); |
| 7520 | return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7521 | } |
| 7522 | void MethodDescriptorProto::set_allocated_name(::std::string* name) { |
| 7523 | if (name != NULL) { |
| 7524 | set_has_name(); |
| 7525 | } else { |
| 7526 | clear_has_name(); |
| 7527 | } |
| 7528 | name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); |
| 7529 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) |
| 7530 | } |
| 7531 | |
| 7532 | // optional string input_type = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7533 | bool MethodDescriptorProto::has_input_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7534 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 7535 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7536 | void MethodDescriptorProto::set_has_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7537 | _has_bits_[0] |= 0x00000002u; |
| 7538 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7539 | void MethodDescriptorProto::clear_has_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7540 | _has_bits_[0] &= ~0x00000002u; |
| 7541 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7542 | void MethodDescriptorProto::clear_input_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7543 | input_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7544 | clear_has_input_type(); |
| 7545 | } |
| 7546 | const ::std::string& MethodDescriptorProto::input_type() const { |
| 7547 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) |
| 7548 | return input_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7549 | } |
| 7550 | void MethodDescriptorProto::set_input_type(const ::std::string& value) { |
| 7551 | set_has_input_type(); |
| 7552 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7553 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) |
| 7554 | } |
| 7555 | void MethodDescriptorProto::set_input_type(const char* value) { |
| 7556 | set_has_input_type(); |
| 7557 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7558 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type) |
| 7559 | } |
| 7560 | void MethodDescriptorProto::set_input_type(const char* value, size_t size) { |
| 7561 | set_has_input_type(); |
| 7562 | input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7563 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7564 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type) |
| 7565 | } |
| 7566 | ::std::string* MethodDescriptorProto::mutable_input_type() { |
| 7567 | set_has_input_type(); |
| 7568 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) |
| 7569 | return input_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7570 | } |
| 7571 | ::std::string* MethodDescriptorProto::release_input_type() { |
| 7572 | clear_has_input_type(); |
| 7573 | return input_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7574 | } |
| 7575 | void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) { |
| 7576 | if (input_type != NULL) { |
| 7577 | set_has_input_type(); |
| 7578 | } else { |
| 7579 | clear_has_input_type(); |
| 7580 | } |
| 7581 | input_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type); |
| 7582 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) |
| 7583 | } |
| 7584 | |
| 7585 | // optional string output_type = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7586 | bool MethodDescriptorProto::has_output_type() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7587 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 7588 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7589 | void MethodDescriptorProto::set_has_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7590 | _has_bits_[0] |= 0x00000004u; |
| 7591 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7592 | void MethodDescriptorProto::clear_has_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7593 | _has_bits_[0] &= ~0x00000004u; |
| 7594 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7595 | void MethodDescriptorProto::clear_output_type() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7596 | output_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7597 | clear_has_output_type(); |
| 7598 | } |
| 7599 | const ::std::string& MethodDescriptorProto::output_type() const { |
| 7600 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) |
| 7601 | return output_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7602 | } |
| 7603 | void MethodDescriptorProto::set_output_type(const ::std::string& value) { |
| 7604 | set_has_output_type(); |
| 7605 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 7606 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) |
| 7607 | } |
| 7608 | void MethodDescriptorProto::set_output_type(const char* value) { |
| 7609 | set_has_output_type(); |
| 7610 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 7611 | // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type) |
| 7612 | } |
| 7613 | void MethodDescriptorProto::set_output_type(const char* value, size_t size) { |
| 7614 | set_has_output_type(); |
| 7615 | output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7616 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 7617 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type) |
| 7618 | } |
| 7619 | ::std::string* MethodDescriptorProto::mutable_output_type() { |
| 7620 | set_has_output_type(); |
| 7621 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) |
| 7622 | return output_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7623 | } |
| 7624 | ::std::string* MethodDescriptorProto::release_output_type() { |
| 7625 | clear_has_output_type(); |
| 7626 | return output_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7627 | } |
| 7628 | void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) { |
| 7629 | if (output_type != NULL) { |
| 7630 | set_has_output_type(); |
| 7631 | } else { |
| 7632 | clear_has_output_type(); |
| 7633 | } |
| 7634 | output_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type); |
| 7635 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) |
| 7636 | } |
| 7637 | |
| 7638 | // optional .google.protobuf.MethodOptions options = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7639 | bool MethodDescriptorProto::has_options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7640 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 7641 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7642 | void MethodDescriptorProto::set_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7643 | _has_bits_[0] |= 0x00000008u; |
| 7644 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7645 | void MethodDescriptorProto::clear_has_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7646 | _has_bits_[0] &= ~0x00000008u; |
| 7647 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7648 | void MethodDescriptorProto::clear_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7649 | if (options_ != NULL) options_->::google::protobuf::MethodOptions::Clear(); |
| 7650 | clear_has_options(); |
| 7651 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 7652 | const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7653 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) |
| 7654 | return options_ != NULL ? *options_ : *default_instance_->options_; |
| 7655 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 7656 | ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7657 | set_has_options(); |
| 7658 | if (options_ == NULL) { |
| 7659 | options_ = new ::google::protobuf::MethodOptions; |
| 7660 | } |
| 7661 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) |
| 7662 | return options_; |
| 7663 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 7664 | ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7665 | clear_has_options(); |
| 7666 | ::google::protobuf::MethodOptions* temp = options_; |
| 7667 | options_ = NULL; |
| 7668 | return temp; |
| 7669 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 7670 | void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7671 | delete options_; |
| 7672 | options_ = options; |
| 7673 | if (options) { |
| 7674 | set_has_options(); |
| 7675 | } else { |
| 7676 | clear_has_options(); |
| 7677 | } |
| 7678 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.options) |
| 7679 | } |
| 7680 | |
| 7681 | // optional bool client_streaming = 5 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7682 | bool MethodDescriptorProto::has_client_streaming() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7683 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 7684 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7685 | void MethodDescriptorProto::set_has_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7686 | _has_bits_[0] |= 0x00000010u; |
| 7687 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7688 | void MethodDescriptorProto::clear_has_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7689 | _has_bits_[0] &= ~0x00000010u; |
| 7690 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7691 | void MethodDescriptorProto::clear_client_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7692 | client_streaming_ = false; |
| 7693 | clear_has_client_streaming(); |
| 7694 | } |
| 7695 | bool MethodDescriptorProto::client_streaming() const { |
| 7696 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.client_streaming) |
| 7697 | return client_streaming_; |
| 7698 | } |
| 7699 | void MethodDescriptorProto::set_client_streaming(bool value) { |
| 7700 | set_has_client_streaming(); |
| 7701 | client_streaming_ = value; |
| 7702 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.client_streaming) |
| 7703 | } |
| 7704 | |
| 7705 | // optional bool server_streaming = 6 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7706 | bool MethodDescriptorProto::has_server_streaming() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7707 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 7708 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7709 | void MethodDescriptorProto::set_has_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7710 | _has_bits_[0] |= 0x00000020u; |
| 7711 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7712 | void MethodDescriptorProto::clear_has_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7713 | _has_bits_[0] &= ~0x00000020u; |
| 7714 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7715 | void MethodDescriptorProto::clear_server_streaming() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7716 | server_streaming_ = false; |
| 7717 | clear_has_server_streaming(); |
| 7718 | } |
| 7719 | bool MethodDescriptorProto::server_streaming() const { |
| 7720 | // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.server_streaming) |
| 7721 | return server_streaming_; |
| 7722 | } |
| 7723 | void MethodDescriptorProto::set_server_streaming(bool value) { |
| 7724 | set_has_server_streaming(); |
| 7725 | server_streaming_ = value; |
| 7726 | // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.server_streaming) |
| 7727 | } |
| 7728 | |
| 7729 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7730 | |
| 7731 | // =================================================================== |
| 7732 | |
| 7733 | const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7734 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7735 | return FileOptions_OptimizeMode_descriptor_; |
| 7736 | } |
| 7737 | bool FileOptions_OptimizeMode_IsValid(int value) { |
| 7738 | switch(value) { |
| 7739 | case 1: |
| 7740 | case 2: |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7741 | case 3: |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7742 | return true; |
| 7743 | default: |
| 7744 | return false; |
| 7745 | } |
| 7746 | } |
| 7747 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 7748 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7749 | const FileOptions_OptimizeMode FileOptions::SPEED; |
| 7750 | const FileOptions_OptimizeMode FileOptions::CODE_SIZE; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7751 | const FileOptions_OptimizeMode FileOptions::LITE_RUNTIME; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7752 | const FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN; |
| 7753 | const FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7754 | const int FileOptions::OptimizeMode_ARRAYSIZE; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 7755 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 7756 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7757 | const int FileOptions::kJavaPackageFieldNumber; |
| 7758 | const int FileOptions::kJavaOuterClassnameFieldNumber; |
| 7759 | const int FileOptions::kJavaMultipleFilesFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7760 | const int FileOptions::kJavaGenerateEqualsAndHashFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7761 | const int FileOptions::kJavaStringCheckUtf8FieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7762 | const int FileOptions::kOptimizeForFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7763 | const int FileOptions::kGoPackageFieldNumber; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7764 | const int FileOptions::kCcGenericServicesFieldNumber; |
| 7765 | const int FileOptions::kJavaGenericServicesFieldNumber; |
| 7766 | const int FileOptions::kPyGenericServicesFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7767 | const int FileOptions::kDeprecatedFieldNumber; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7768 | const int FileOptions::kCcEnableArenasFieldNumber; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7769 | const int FileOptions::kObjcClassPrefixFieldNumber; |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7770 | const int FileOptions::kCsharpNamespaceFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 7771 | const int FileOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 7772 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7773 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 7774 | FileOptions::FileOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 7775 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7776 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7777 | // @@protoc_insertion_point(constructor:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7778 | } |
| 7779 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7780 | void FileOptions::InitAsDefaultInstance() { |
| 7781 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7782 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 7783 | FileOptions::FileOptions(const FileOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7784 | : ::google::protobuf::Message(), |
| 7785 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7786 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7787 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7788 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7789 | } |
| 7790 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7791 | void FileOptions::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7792 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7793 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7794 | java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7795 | java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7796 | java_multiple_files_ = false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7797 | java_generate_equals_and_hash_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7798 | java_string_check_utf8_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7799 | optimize_for_ = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7800 | go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7801 | cc_generic_services_ = false; |
| 7802 | java_generic_services_ = false; |
| 7803 | py_generic_services_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7804 | deprecated_ = false; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7805 | cc_enable_arenas_ = false; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7806 | objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7807 | csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7808 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 7809 | } |
| 7810 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7811 | FileOptions::~FileOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7812 | // @@protoc_insertion_point(destructor:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7813 | SharedDtor(); |
| 7814 | } |
| 7815 | |
| 7816 | void FileOptions::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7817 | java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7818 | java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7819 | go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7820 | objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7821 | csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7822 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7823 | } |
| 7824 | } |
| 7825 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7826 | void FileOptions::SetCachedSize(int size) const { |
| 7827 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 7828 | _cached_size_ = size; |
| 7829 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 7830 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7831 | const ::google::protobuf::Descriptor* FileOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7832 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7833 | return FileOptions_descriptor_; |
| 7834 | } |
| 7835 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7836 | const FileOptions& FileOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 7837 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 7838 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7839 | } |
| 7840 | |
| 7841 | FileOptions* FileOptions::default_instance_ = NULL; |
| 7842 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7843 | FileOptions* FileOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7844 | FileOptions* n = new FileOptions; |
| 7845 | if (arena != NULL) { |
| 7846 | arena->Own(n); |
| 7847 | } |
| 7848 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7849 | } |
| 7850 | |
| 7851 | void FileOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7852 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7853 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 7854 | &reinterpret_cast<FileOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7855 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7856 | #define ZR_(first, last) do {\ |
| 7857 | ::memset(&first, 0,\ |
| 7858 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 7859 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7860 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 7861 | if (_has_bits_[0 / 32] & 255u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7862 | ZR_(java_multiple_files_, cc_generic_services_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7863 | if (has_java_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7864 | java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7865 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7866 | if (has_java_outer_classname()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7867 | java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7868 | } |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7869 | optimize_for_ = 1; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7870 | if (has_go_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 7871 | go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7872 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7873 | } |
Jisi Liu | 3b3c8ab | 2016-03-30 11:39:59 -0700 | [diff] [blame] | 7874 | if (_has_bits_[8 / 32] & 16128u) { |
| 7875 | ZR_(java_generic_services_, cc_enable_arenas_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7876 | if (has_objc_class_prefix()) { |
| 7877 | objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7878 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 7879 | if (has_csharp_namespace()) { |
| 7880 | csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 7881 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7882 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7883 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 7884 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7885 | #undef ZR_ |
| 7886 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 7887 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7888 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7889 | if (_internal_metadata_.have_unknown_fields()) { |
| 7890 | mutable_unknown_fields()->Clear(); |
| 7891 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7892 | } |
| 7893 | |
| 7894 | bool FileOptions::MergePartialFromCodedStream( |
| 7895 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7896 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7897 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7898 | // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions) |
| 7899 | for (;;) { |
| 7900 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 7901 | tag = p.first; |
| 7902 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 7903 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7904 | // optional string java_package = 1; |
| 7905 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7906 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7907 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7908 | input, this->mutable_java_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7909 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7910 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7911 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7912 | "google.protobuf.FileOptions.java_package"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7913 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7914 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7915 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7916 | if (input->ExpectTag(66)) goto parse_java_outer_classname; |
| 7917 | break; |
| 7918 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7919 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7920 | // optional string java_outer_classname = 8; |
| 7921 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7922 | if (tag == 66) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7923 | parse_java_outer_classname: |
| 7924 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7925 | input, this->mutable_java_outer_classname())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7926 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7927 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7928 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7929 | "google.protobuf.FileOptions.java_outer_classname"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7930 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7931 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7932 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7933 | if (input->ExpectTag(72)) goto parse_optimize_for; |
| 7934 | break; |
| 7935 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7936 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 7937 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7938 | case 9: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7939 | if (tag == 72) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7940 | parse_optimize_for: |
| 7941 | int value; |
| 7942 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7943 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 7944 | input, &value))); |
| 7945 | if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) { |
| 7946 | set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); |
| 7947 | } else { |
| 7948 | mutable_unknown_fields()->AddVarint(9, value); |
| 7949 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7950 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7951 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7952 | } |
| 7953 | if (input->ExpectTag(80)) goto parse_java_multiple_files; |
| 7954 | break; |
| 7955 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7956 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7957 | // optional bool java_multiple_files = 10 [default = false]; |
| 7958 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7959 | if (tag == 80) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7960 | parse_java_multiple_files: |
| 7961 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7962 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7963 | input, &java_multiple_files_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7964 | set_has_java_multiple_files(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7965 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7966 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 7967 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7968 | if (input->ExpectTag(90)) goto parse_go_package; |
| 7969 | break; |
| 7970 | } |
| 7971 | |
| 7972 | // optional string go_package = 11; |
| 7973 | case 11: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7974 | if (tag == 90) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7975 | parse_go_package: |
| 7976 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7977 | input, this->mutable_go_package())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7978 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7979 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7980 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 7981 | "google.protobuf.FileOptions.go_package"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7982 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7983 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7984 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7985 | if (input->ExpectTag(128)) goto parse_cc_generic_services; |
| 7986 | break; |
| 7987 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 7988 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7989 | // optional bool cc_generic_services = 16 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7990 | case 16: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7991 | if (tag == 128) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7992 | parse_cc_generic_services: |
| 7993 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7994 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7995 | input, &cc_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 7996 | set_has_cc_generic_services(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7997 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 7998 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 7999 | } |
| 8000 | if (input->ExpectTag(136)) goto parse_java_generic_services; |
| 8001 | break; |
| 8002 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8003 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8004 | // optional bool java_generic_services = 17 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8005 | case 17: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8006 | if (tag == 136) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8007 | parse_java_generic_services: |
| 8008 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8009 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8010 | input, &java_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8011 | set_has_java_generic_services(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8012 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8013 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8014 | } |
| 8015 | if (input->ExpectTag(144)) goto parse_py_generic_services; |
| 8016 | break; |
| 8017 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8018 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8019 | // optional bool py_generic_services = 18 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8020 | case 18: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8021 | if (tag == 144) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8022 | parse_py_generic_services: |
| 8023 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8024 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8025 | input, &py_generic_services_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8026 | set_has_py_generic_services(); |
| 8027 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8028 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8029 | } |
| 8030 | if (input->ExpectTag(160)) goto parse_java_generate_equals_and_hash; |
| 8031 | break; |
| 8032 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8033 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8034 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8035 | case 20: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8036 | if (tag == 160) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8037 | parse_java_generate_equals_and_hash: |
| 8038 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8039 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8040 | input, &java_generate_equals_and_hash_))); |
| 8041 | set_has_java_generate_equals_and_hash(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8042 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8043 | goto handle_unusual; |
| 8044 | } |
| 8045 | if (input->ExpectTag(184)) goto parse_deprecated; |
| 8046 | break; |
| 8047 | } |
| 8048 | |
| 8049 | // optional bool deprecated = 23 [default = false]; |
| 8050 | case 23: { |
| 8051 | if (tag == 184) { |
| 8052 | parse_deprecated: |
| 8053 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8054 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8055 | input, &deprecated_))); |
| 8056 | set_has_deprecated(); |
| 8057 | } else { |
| 8058 | goto handle_unusual; |
| 8059 | } |
| 8060 | if (input->ExpectTag(216)) goto parse_java_string_check_utf8; |
| 8061 | break; |
| 8062 | } |
| 8063 | |
| 8064 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8065 | case 27: { |
| 8066 | if (tag == 216) { |
| 8067 | parse_java_string_check_utf8: |
| 8068 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8069 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8070 | input, &java_string_check_utf8_))); |
| 8071 | set_has_java_string_check_utf8(); |
| 8072 | } else { |
| 8073 | goto handle_unusual; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8074 | } |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8075 | if (input->ExpectTag(248)) goto parse_cc_enable_arenas; |
| 8076 | break; |
| 8077 | } |
| 8078 | |
| 8079 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8080 | case 31: { |
| 8081 | if (tag == 248) { |
| 8082 | parse_cc_enable_arenas: |
| 8083 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8084 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 8085 | input, &cc_enable_arenas_))); |
| 8086 | set_has_cc_enable_arenas(); |
| 8087 | } else { |
| 8088 | goto handle_unusual; |
| 8089 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8090 | if (input->ExpectTag(290)) goto parse_objc_class_prefix; |
| 8091 | break; |
| 8092 | } |
| 8093 | |
| 8094 | // optional string objc_class_prefix = 36; |
| 8095 | case 36: { |
| 8096 | if (tag == 290) { |
| 8097 | parse_objc_class_prefix: |
| 8098 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 8099 | input, this->mutable_objc_class_prefix())); |
| 8100 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8101 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 8102 | ::google::protobuf::internal::WireFormat::PARSE, |
| 8103 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 8104 | } else { |
| 8105 | goto handle_unusual; |
| 8106 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8107 | if (input->ExpectTag(298)) goto parse_csharp_namespace; |
| 8108 | break; |
| 8109 | } |
| 8110 | |
| 8111 | // optional string csharp_namespace = 37; |
| 8112 | case 37: { |
| 8113 | if (tag == 298) { |
| 8114 | parse_csharp_namespace: |
| 8115 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 8116 | input, this->mutable_csharp_namespace())); |
| 8117 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8118 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 8119 | ::google::protobuf::internal::WireFormat::PARSE, |
| 8120 | "google.protobuf.FileOptions.csharp_namespace"); |
| 8121 | } else { |
| 8122 | goto handle_unusual; |
| 8123 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8124 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 8125 | break; |
| 8126 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8127 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8128 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 8129 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8130 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8131 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8132 | DO_(input->IncrementRecursionDepth()); |
| 8133 | parse_loop_uninterpreted_option: |
| 8134 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8135 | input, add_uninterpreted_option())); |
| 8136 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8137 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8138 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8139 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 8140 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8141 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8142 | break; |
| 8143 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8144 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8145 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8146 | handle_unusual: |
| 8147 | if (tag == 0 || |
| 8148 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8149 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8150 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8151 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8152 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8153 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 8154 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8155 | continue; |
| 8156 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8157 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 8158 | input, tag, mutable_unknown_fields())); |
| 8159 | break; |
| 8160 | } |
| 8161 | } |
| 8162 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8163 | success: |
| 8164 | // @@protoc_insertion_point(parse_success:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8165 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8166 | failure: |
| 8167 | // @@protoc_insertion_point(parse_failure:google.protobuf.FileOptions) |
| 8168 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8169 | #undef DO_ |
| 8170 | } |
| 8171 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8172 | void FileOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8173 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8174 | // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8175 | // optional string java_package = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8176 | if (has_java_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8177 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8178 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8179 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8180 | "google.protobuf.FileOptions.java_package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8181 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8182 | 1, this->java_package(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8183 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8184 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8185 | // optional string java_outer_classname = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8186 | if (has_java_outer_classname()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8187 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8188 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8189 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8190 | "google.protobuf.FileOptions.java_outer_classname"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8191 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8192 | 8, this->java_outer_classname(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8193 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8194 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8195 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8196 | if (has_optimize_for()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8197 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 8198 | 9, this->optimize_for(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8199 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8200 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8201 | // optional bool java_multiple_files = 10 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8202 | if (has_java_multiple_files()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8203 | ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8204 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8205 | |
| 8206 | // optional string go_package = 11; |
| 8207 | if (has_go_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8208 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8209 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8210 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8211 | "google.protobuf.FileOptions.go_package"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8212 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8213 | 11, this->go_package(), output); |
| 8214 | } |
| 8215 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8216 | // optional bool cc_generic_services = 16 [default = false]; |
| 8217 | if (has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8218 | ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); |
| 8219 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8220 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8221 | // optional bool java_generic_services = 17 [default = false]; |
| 8222 | if (has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8223 | ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); |
| 8224 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8225 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8226 | // optional bool py_generic_services = 18 [default = false]; |
| 8227 | if (has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8228 | ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); |
| 8229 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8230 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8231 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8232 | if (has_java_generate_equals_and_hash()) { |
| 8233 | ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); |
| 8234 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8235 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8236 | // optional bool deprecated = 23 [default = false]; |
| 8237 | if (has_deprecated()) { |
| 8238 | ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output); |
| 8239 | } |
| 8240 | |
| 8241 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8242 | if (has_java_string_check_utf8()) { |
| 8243 | ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output); |
| 8244 | } |
| 8245 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8246 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8247 | if (has_cc_enable_arenas()) { |
| 8248 | ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output); |
| 8249 | } |
| 8250 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8251 | // optional string objc_class_prefix = 36; |
| 8252 | if (has_objc_class_prefix()) { |
| 8253 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8254 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 8255 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8256 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 8257 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8258 | 36, this->objc_class_prefix(), output); |
| 8259 | } |
| 8260 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8261 | // optional string csharp_namespace = 37; |
| 8262 | if (has_csharp_namespace()) { |
| 8263 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8264 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 8265 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8266 | "google.protobuf.FileOptions.csharp_namespace"); |
| 8267 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8268 | 37, this->csharp_namespace(), output); |
| 8269 | } |
| 8270 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8271 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8272 | 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] | 8273 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8274 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8275 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8276 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8277 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8278 | _extensions_.SerializeWithCachedSizes( |
| 8279 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8280 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8281 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8282 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 8283 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8284 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8285 | // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8286 | } |
| 8287 | |
| 8288 | ::google::protobuf::uint8* FileOptions::SerializeWithCachedSizesToArray( |
| 8289 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8290 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8291 | // optional string java_package = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8292 | if (has_java_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8293 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8294 | this->java_package().data(), this->java_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8295 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8296 | "google.protobuf.FileOptions.java_package"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8297 | target = |
| 8298 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8299 | 1, this->java_package(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8300 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8301 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8302 | // optional string java_outer_classname = 8; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8303 | if (has_java_outer_classname()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8304 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8305 | this->java_outer_classname().data(), this->java_outer_classname().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8306 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8307 | "google.protobuf.FileOptions.java_outer_classname"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8308 | target = |
| 8309 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8310 | 8, this->java_outer_classname(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8311 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8312 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8313 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8314 | if (has_optimize_for()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8315 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 8316 | 9, this->optimize_for(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8317 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8318 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8319 | // optional bool java_multiple_files = 10 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8320 | if (has_java_multiple_files()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8321 | 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] | 8322 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8323 | |
| 8324 | // optional string go_package = 11; |
| 8325 | if (has_go_package()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8326 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8327 | this->go_package().data(), this->go_package().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8328 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8329 | "google.protobuf.FileOptions.go_package"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8330 | target = |
| 8331 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8332 | 11, this->go_package(), target); |
| 8333 | } |
| 8334 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8335 | // optional bool cc_generic_services = 16 [default = false]; |
| 8336 | if (has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8337 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); |
| 8338 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8339 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8340 | // optional bool java_generic_services = 17 [default = false]; |
| 8341 | if (has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8342 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); |
| 8343 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8344 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8345 | // optional bool py_generic_services = 18 [default = false]; |
| 8346 | if (has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8347 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); |
| 8348 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8349 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8350 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8351 | if (has_java_generate_equals_and_hash()) { |
| 8352 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); |
| 8353 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8354 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8355 | // optional bool deprecated = 23 [default = false]; |
| 8356 | if (has_deprecated()) { |
| 8357 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target); |
| 8358 | } |
| 8359 | |
| 8360 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8361 | if (has_java_string_check_utf8()) { |
| 8362 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target); |
| 8363 | } |
| 8364 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8365 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8366 | if (has_cc_enable_arenas()) { |
| 8367 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target); |
| 8368 | } |
| 8369 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8370 | // optional string objc_class_prefix = 36; |
| 8371 | if (has_objc_class_prefix()) { |
| 8372 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8373 | this->objc_class_prefix().data(), this->objc_class_prefix().length(), |
| 8374 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8375 | "google.protobuf.FileOptions.objc_class_prefix"); |
| 8376 | target = |
| 8377 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8378 | 36, this->objc_class_prefix(), target); |
| 8379 | } |
| 8380 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8381 | // optional string csharp_namespace = 37; |
| 8382 | if (has_csharp_namespace()) { |
| 8383 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 8384 | this->csharp_namespace().data(), this->csharp_namespace().length(), |
| 8385 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 8386 | "google.protobuf.FileOptions.csharp_namespace"); |
| 8387 | target = |
| 8388 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8389 | 37, this->csharp_namespace(), target); |
| 8390 | } |
| 8391 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8392 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8393 | 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] | 8394 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8395 | WriteMessageNoVirtualToArray( |
| 8396 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8397 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8398 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8399 | // Extension range [1000, 536870912) |
| 8400 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 8401 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8402 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8403 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8404 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 8405 | unknown_fields(), target); |
| 8406 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8407 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8408 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8409 | } |
| 8410 | |
| 8411 | int FileOptions::ByteSize() const { |
| 8412 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8413 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 8414 | if (_has_bits_[0 / 32] & 255u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8415 | // optional string java_package = 1; |
| 8416 | if (has_java_package()) { |
| 8417 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8418 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8419 | this->java_package()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8420 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8421 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8422 | // optional string java_outer_classname = 8; |
| 8423 | if (has_java_outer_classname()) { |
| 8424 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8425 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8426 | this->java_outer_classname()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8427 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8428 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8429 | // optional bool java_multiple_files = 10 [default = false]; |
| 8430 | if (has_java_multiple_files()) { |
| 8431 | total_size += 1 + 1; |
| 8432 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8433 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8434 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
| 8435 | if (has_java_generate_equals_and_hash()) { |
| 8436 | total_size += 2 + 1; |
| 8437 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8438 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8439 | // optional bool java_string_check_utf8 = 27 [default = false]; |
| 8440 | if (has_java_string_check_utf8()) { |
| 8441 | total_size += 2 + 1; |
| 8442 | } |
| 8443 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8444 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8445 | if (has_optimize_for()) { |
| 8446 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8447 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8448 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8449 | |
| 8450 | // optional string go_package = 11; |
| 8451 | if (has_go_package()) { |
| 8452 | total_size += 1 + |
| 8453 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8454 | this->go_package()); |
| 8455 | } |
| 8456 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8457 | // optional bool cc_generic_services = 16 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8458 | if (has_cc_generic_services()) { |
| 8459 | total_size += 2 + 1; |
| 8460 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8461 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8462 | } |
Jisi Liu | 3b3c8ab | 2016-03-30 11:39:59 -0700 | [diff] [blame] | 8463 | if (_has_bits_[8 / 32] & 16128u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8464 | // optional bool java_generic_services = 17 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8465 | if (has_java_generic_services()) { |
| 8466 | total_size += 2 + 1; |
| 8467 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8468 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8469 | // optional bool py_generic_services = 18 [default = false]; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8470 | if (has_py_generic_services()) { |
| 8471 | total_size += 2 + 1; |
| 8472 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8473 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8474 | // optional bool deprecated = 23 [default = false]; |
| 8475 | if (has_deprecated()) { |
| 8476 | total_size += 2 + 1; |
| 8477 | } |
| 8478 | |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8479 | // optional bool cc_enable_arenas = 31 [default = false]; |
| 8480 | if (has_cc_enable_arenas()) { |
| 8481 | total_size += 2 + 1; |
| 8482 | } |
| 8483 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8484 | // optional string objc_class_prefix = 36; |
| 8485 | if (has_objc_class_prefix()) { |
| 8486 | total_size += 2 + |
| 8487 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8488 | this->objc_class_prefix()); |
| 8489 | } |
| 8490 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8491 | // optional string csharp_namespace = 37; |
| 8492 | if (has_csharp_namespace()) { |
| 8493 | total_size += 2 + |
| 8494 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8495 | this->csharp_namespace()); |
| 8496 | } |
| 8497 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8498 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8499 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 8500 | total_size += 2 * this->uninterpreted_option_size(); |
| 8501 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8502 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8503 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8504 | this->uninterpreted_option(i)); |
| 8505 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8506 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 8507 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8508 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8509 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8510 | total_size += |
| 8511 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 8512 | unknown_fields()); |
| 8513 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8514 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8515 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8516 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8517 | return total_size; |
| 8518 | } |
| 8519 | |
| 8520 | void FileOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8521 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8522 | const FileOptions* source = |
| 8523 | ::google::protobuf::internal::DynamicCastToGenerated<const FileOptions>( |
| 8524 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8525 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 8526 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8527 | } else { |
| 8528 | MergeFrom(*source); |
| 8529 | } |
| 8530 | } |
| 8531 | |
| 8532 | void FileOptions::MergeFrom(const FileOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8533 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8534 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8535 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8536 | if (from.has_java_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8537 | set_has_java_package(); |
| 8538 | java_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8539 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8540 | if (from.has_java_outer_classname()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8541 | set_has_java_outer_classname(); |
| 8542 | java_outer_classname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8543 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8544 | if (from.has_java_multiple_files()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8545 | set_java_multiple_files(from.java_multiple_files()); |
| 8546 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8547 | if (from.has_java_generate_equals_and_hash()) { |
| 8548 | set_java_generate_equals_and_hash(from.java_generate_equals_and_hash()); |
| 8549 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8550 | if (from.has_java_string_check_utf8()) { |
| 8551 | set_java_string_check_utf8(from.java_string_check_utf8()); |
| 8552 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8553 | if (from.has_optimize_for()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8554 | set_optimize_for(from.optimize_for()); |
| 8555 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8556 | if (from.has_go_package()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8557 | set_has_go_package(); |
| 8558 | go_package_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8559 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8560 | if (from.has_cc_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8561 | set_cc_generic_services(from.cc_generic_services()); |
| 8562 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8563 | } |
| 8564 | if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8565 | if (from.has_java_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8566 | set_java_generic_services(from.java_generic_services()); |
| 8567 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 8568 | if (from.has_py_generic_services()) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 8569 | set_py_generic_services(from.py_generic_services()); |
| 8570 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8571 | if (from.has_deprecated()) { |
| 8572 | set_deprecated(from.deprecated()); |
| 8573 | } |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8574 | if (from.has_cc_enable_arenas()) { |
| 8575 | set_cc_enable_arenas(from.cc_enable_arenas()); |
| 8576 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8577 | if (from.has_objc_class_prefix()) { |
| 8578 | set_has_objc_class_prefix(); |
| 8579 | objc_class_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix_); |
| 8580 | } |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8581 | if (from.has_csharp_namespace()) { |
| 8582 | set_has_csharp_namespace(); |
| 8583 | csharp_namespace_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace_); |
| 8584 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8585 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 8586 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8587 | if (from._internal_metadata_.have_unknown_fields()) { |
| 8588 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 8589 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8590 | } |
| 8591 | |
| 8592 | void FileOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 8593 | if (&from == this) return; |
| 8594 | Clear(); |
| 8595 | MergeFrom(from); |
| 8596 | } |
| 8597 | |
| 8598 | void FileOptions::CopyFrom(const FileOptions& from) { |
| 8599 | if (&from == this) return; |
| 8600 | Clear(); |
| 8601 | MergeFrom(from); |
| 8602 | } |
| 8603 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 8604 | bool FileOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8605 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 8606 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 8607 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 8608 | if (!_extensions_.IsInitialized()) return false; return true; |
| 8609 | } |
| 8610 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 8611 | void FileOptions::Swap(FileOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8612 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8613 | InternalSwap(other); |
| 8614 | } |
| 8615 | void FileOptions::InternalSwap(FileOptions* other) { |
| 8616 | java_package_.Swap(&other->java_package_); |
| 8617 | java_outer_classname_.Swap(&other->java_outer_classname_); |
| 8618 | std::swap(java_multiple_files_, other->java_multiple_files_); |
| 8619 | std::swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); |
| 8620 | std::swap(java_string_check_utf8_, other->java_string_check_utf8_); |
| 8621 | std::swap(optimize_for_, other->optimize_for_); |
| 8622 | go_package_.Swap(&other->go_package_); |
| 8623 | std::swap(cc_generic_services_, other->cc_generic_services_); |
| 8624 | std::swap(java_generic_services_, other->java_generic_services_); |
| 8625 | std::swap(py_generic_services_, other->py_generic_services_); |
| 8626 | std::swap(deprecated_, other->deprecated_); |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 8627 | std::swap(cc_enable_arenas_, other->cc_enable_arenas_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8628 | objc_class_prefix_.Swap(&other->objc_class_prefix_); |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 8629 | csharp_namespace_.Swap(&other->csharp_namespace_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 8630 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 8631 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 8632 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 8633 | std::swap(_cached_size_, other->_cached_size_); |
| 8634 | _extensions_.Swap(&other->_extensions_); |
| 8635 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 8636 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 8637 | ::google::protobuf::Metadata FileOptions::GetMetadata() const { |
| 8638 | protobuf_AssignDescriptorsOnce(); |
| 8639 | ::google::protobuf::Metadata metadata; |
| 8640 | metadata.descriptor = FileOptions_descriptor_; |
| 8641 | metadata.reflection = FileOptions_reflection_; |
| 8642 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 8643 | } |
| 8644 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8645 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 8646 | // FileOptions |
| 8647 | |
| 8648 | // optional string java_package = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8649 | bool FileOptions::has_java_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8650 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 8651 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8652 | void FileOptions::set_has_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8653 | _has_bits_[0] |= 0x00000001u; |
| 8654 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8655 | void FileOptions::clear_has_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8656 | _has_bits_[0] &= ~0x00000001u; |
| 8657 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8658 | void FileOptions::clear_java_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8659 | java_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8660 | clear_has_java_package(); |
| 8661 | } |
| 8662 | const ::std::string& FileOptions::java_package() const { |
| 8663 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) |
| 8664 | return java_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8665 | } |
| 8666 | void FileOptions::set_java_package(const ::std::string& value) { |
| 8667 | set_has_java_package(); |
| 8668 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8669 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) |
| 8670 | } |
| 8671 | void FileOptions::set_java_package(const char* value) { |
| 8672 | set_has_java_package(); |
| 8673 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8674 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package) |
| 8675 | } |
| 8676 | void FileOptions::set_java_package(const char* value, size_t size) { |
| 8677 | set_has_java_package(); |
| 8678 | java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8679 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8680 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package) |
| 8681 | } |
| 8682 | ::std::string* FileOptions::mutable_java_package() { |
| 8683 | set_has_java_package(); |
| 8684 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) |
| 8685 | return java_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8686 | } |
| 8687 | ::std::string* FileOptions::release_java_package() { |
| 8688 | clear_has_java_package(); |
| 8689 | return java_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8690 | } |
| 8691 | void FileOptions::set_allocated_java_package(::std::string* java_package) { |
| 8692 | if (java_package != NULL) { |
| 8693 | set_has_java_package(); |
| 8694 | } else { |
| 8695 | clear_has_java_package(); |
| 8696 | } |
| 8697 | java_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package); |
| 8698 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) |
| 8699 | } |
| 8700 | |
| 8701 | // optional string java_outer_classname = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8702 | bool FileOptions::has_java_outer_classname() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8703 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 8704 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8705 | void FileOptions::set_has_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8706 | _has_bits_[0] |= 0x00000002u; |
| 8707 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8708 | void FileOptions::clear_has_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8709 | _has_bits_[0] &= ~0x00000002u; |
| 8710 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8711 | void FileOptions::clear_java_outer_classname() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8712 | java_outer_classname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8713 | clear_has_java_outer_classname(); |
| 8714 | } |
| 8715 | const ::std::string& FileOptions::java_outer_classname() const { |
| 8716 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) |
| 8717 | return java_outer_classname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8718 | } |
| 8719 | void FileOptions::set_java_outer_classname(const ::std::string& value) { |
| 8720 | set_has_java_outer_classname(); |
| 8721 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8722 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) |
| 8723 | } |
| 8724 | void FileOptions::set_java_outer_classname(const char* value) { |
| 8725 | set_has_java_outer_classname(); |
| 8726 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8727 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname) |
| 8728 | } |
| 8729 | void FileOptions::set_java_outer_classname(const char* value, size_t size) { |
| 8730 | set_has_java_outer_classname(); |
| 8731 | java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8732 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8733 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname) |
| 8734 | } |
| 8735 | ::std::string* FileOptions::mutable_java_outer_classname() { |
| 8736 | set_has_java_outer_classname(); |
| 8737 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) |
| 8738 | return java_outer_classname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8739 | } |
| 8740 | ::std::string* FileOptions::release_java_outer_classname() { |
| 8741 | clear_has_java_outer_classname(); |
| 8742 | return java_outer_classname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8743 | } |
| 8744 | void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) { |
| 8745 | if (java_outer_classname != NULL) { |
| 8746 | set_has_java_outer_classname(); |
| 8747 | } else { |
| 8748 | clear_has_java_outer_classname(); |
| 8749 | } |
| 8750 | java_outer_classname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname); |
| 8751 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) |
| 8752 | } |
| 8753 | |
| 8754 | // optional bool java_multiple_files = 10 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8755 | bool FileOptions::has_java_multiple_files() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8756 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 8757 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8758 | void FileOptions::set_has_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8759 | _has_bits_[0] |= 0x00000004u; |
| 8760 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8761 | void FileOptions::clear_has_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8762 | _has_bits_[0] &= ~0x00000004u; |
| 8763 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8764 | void FileOptions::clear_java_multiple_files() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8765 | java_multiple_files_ = false; |
| 8766 | clear_has_java_multiple_files(); |
| 8767 | } |
| 8768 | bool FileOptions::java_multiple_files() const { |
| 8769 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_multiple_files) |
| 8770 | return java_multiple_files_; |
| 8771 | } |
| 8772 | void FileOptions::set_java_multiple_files(bool value) { |
| 8773 | set_has_java_multiple_files(); |
| 8774 | java_multiple_files_ = value; |
| 8775 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_multiple_files) |
| 8776 | } |
| 8777 | |
| 8778 | // optional bool java_generate_equals_and_hash = 20 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8779 | bool FileOptions::has_java_generate_equals_and_hash() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8780 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 8781 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8782 | void FileOptions::set_has_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8783 | _has_bits_[0] |= 0x00000008u; |
| 8784 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8785 | void FileOptions::clear_has_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8786 | _has_bits_[0] &= ~0x00000008u; |
| 8787 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8788 | void FileOptions::clear_java_generate_equals_and_hash() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8789 | java_generate_equals_and_hash_ = false; |
| 8790 | clear_has_java_generate_equals_and_hash(); |
| 8791 | } |
| 8792 | bool FileOptions::java_generate_equals_and_hash() const { |
| 8793 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generate_equals_and_hash) |
| 8794 | return java_generate_equals_and_hash_; |
| 8795 | } |
| 8796 | void FileOptions::set_java_generate_equals_and_hash(bool value) { |
| 8797 | set_has_java_generate_equals_and_hash(); |
| 8798 | java_generate_equals_and_hash_ = value; |
| 8799 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generate_equals_and_hash) |
| 8800 | } |
| 8801 | |
| 8802 | // optional bool java_string_check_utf8 = 27 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8803 | bool FileOptions::has_java_string_check_utf8() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8804 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 8805 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8806 | void FileOptions::set_has_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8807 | _has_bits_[0] |= 0x00000010u; |
| 8808 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8809 | void FileOptions::clear_has_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8810 | _has_bits_[0] &= ~0x00000010u; |
| 8811 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8812 | void FileOptions::clear_java_string_check_utf8() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8813 | java_string_check_utf8_ = false; |
| 8814 | clear_has_java_string_check_utf8(); |
| 8815 | } |
| 8816 | bool FileOptions::java_string_check_utf8() const { |
| 8817 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_string_check_utf8) |
| 8818 | return java_string_check_utf8_; |
| 8819 | } |
| 8820 | void FileOptions::set_java_string_check_utf8(bool value) { |
| 8821 | set_has_java_string_check_utf8(); |
| 8822 | java_string_check_utf8_ = value; |
| 8823 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_string_check_utf8) |
| 8824 | } |
| 8825 | |
| 8826 | // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8827 | bool FileOptions::has_optimize_for() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8828 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 8829 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8830 | void FileOptions::set_has_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8831 | _has_bits_[0] |= 0x00000020u; |
| 8832 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8833 | void FileOptions::clear_has_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8834 | _has_bits_[0] &= ~0x00000020u; |
| 8835 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8836 | void FileOptions::clear_optimize_for() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8837 | optimize_for_ = 1; |
| 8838 | clear_has_optimize_for(); |
| 8839 | } |
| 8840 | ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const { |
| 8841 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for) |
| 8842 | return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_); |
| 8843 | } |
| 8844 | void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) { |
| 8845 | assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value)); |
| 8846 | set_has_optimize_for(); |
| 8847 | optimize_for_ = value; |
| 8848 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for) |
| 8849 | } |
| 8850 | |
| 8851 | // optional string go_package = 11; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8852 | bool FileOptions::has_go_package() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8853 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 8854 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8855 | void FileOptions::set_has_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8856 | _has_bits_[0] |= 0x00000040u; |
| 8857 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8858 | void FileOptions::clear_has_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8859 | _has_bits_[0] &= ~0x00000040u; |
| 8860 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8861 | void FileOptions::clear_go_package() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8862 | go_package_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8863 | clear_has_go_package(); |
| 8864 | } |
| 8865 | const ::std::string& FileOptions::go_package() const { |
| 8866 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) |
| 8867 | return go_package_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8868 | } |
| 8869 | void FileOptions::set_go_package(const ::std::string& value) { |
| 8870 | set_has_go_package(); |
| 8871 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 8872 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) |
| 8873 | } |
| 8874 | void FileOptions::set_go_package(const char* value) { |
| 8875 | set_has_go_package(); |
| 8876 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 8877 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package) |
| 8878 | } |
| 8879 | void FileOptions::set_go_package(const char* value, size_t size) { |
| 8880 | set_has_go_package(); |
| 8881 | go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8882 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 8883 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package) |
| 8884 | } |
| 8885 | ::std::string* FileOptions::mutable_go_package() { |
| 8886 | set_has_go_package(); |
| 8887 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) |
| 8888 | return go_package_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8889 | } |
| 8890 | ::std::string* FileOptions::release_go_package() { |
| 8891 | clear_has_go_package(); |
| 8892 | return go_package_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8893 | } |
| 8894 | void FileOptions::set_allocated_go_package(::std::string* go_package) { |
| 8895 | if (go_package != NULL) { |
| 8896 | set_has_go_package(); |
| 8897 | } else { |
| 8898 | clear_has_go_package(); |
| 8899 | } |
| 8900 | go_package_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package); |
| 8901 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) |
| 8902 | } |
| 8903 | |
| 8904 | // optional bool cc_generic_services = 16 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8905 | bool FileOptions::has_cc_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8906 | return (_has_bits_[0] & 0x00000080u) != 0; |
| 8907 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8908 | void FileOptions::set_has_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8909 | _has_bits_[0] |= 0x00000080u; |
| 8910 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8911 | void FileOptions::clear_has_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8912 | _has_bits_[0] &= ~0x00000080u; |
| 8913 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8914 | void FileOptions::clear_cc_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8915 | cc_generic_services_ = false; |
| 8916 | clear_has_cc_generic_services(); |
| 8917 | } |
| 8918 | bool FileOptions::cc_generic_services() const { |
| 8919 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services) |
| 8920 | return cc_generic_services_; |
| 8921 | } |
| 8922 | void FileOptions::set_cc_generic_services(bool value) { |
| 8923 | set_has_cc_generic_services(); |
| 8924 | cc_generic_services_ = value; |
| 8925 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_generic_services) |
| 8926 | } |
| 8927 | |
| 8928 | // optional bool java_generic_services = 17 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8929 | bool FileOptions::has_java_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8930 | return (_has_bits_[0] & 0x00000100u) != 0; |
| 8931 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8932 | void FileOptions::set_has_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8933 | _has_bits_[0] |= 0x00000100u; |
| 8934 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8935 | void FileOptions::clear_has_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8936 | _has_bits_[0] &= ~0x00000100u; |
| 8937 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8938 | void FileOptions::clear_java_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8939 | java_generic_services_ = false; |
| 8940 | clear_has_java_generic_services(); |
| 8941 | } |
| 8942 | bool FileOptions::java_generic_services() const { |
| 8943 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_generic_services) |
| 8944 | return java_generic_services_; |
| 8945 | } |
| 8946 | void FileOptions::set_java_generic_services(bool value) { |
| 8947 | set_has_java_generic_services(); |
| 8948 | java_generic_services_ = value; |
| 8949 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_generic_services) |
| 8950 | } |
| 8951 | |
| 8952 | // optional bool py_generic_services = 18 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8953 | bool FileOptions::has_py_generic_services() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8954 | return (_has_bits_[0] & 0x00000200u) != 0; |
| 8955 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8956 | void FileOptions::set_has_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8957 | _has_bits_[0] |= 0x00000200u; |
| 8958 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8959 | void FileOptions::clear_has_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8960 | _has_bits_[0] &= ~0x00000200u; |
| 8961 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8962 | void FileOptions::clear_py_generic_services() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8963 | py_generic_services_ = false; |
| 8964 | clear_has_py_generic_services(); |
| 8965 | } |
| 8966 | bool FileOptions::py_generic_services() const { |
| 8967 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.py_generic_services) |
| 8968 | return py_generic_services_; |
| 8969 | } |
| 8970 | void FileOptions::set_py_generic_services(bool value) { |
| 8971 | set_has_py_generic_services(); |
| 8972 | py_generic_services_ = value; |
| 8973 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.py_generic_services) |
| 8974 | } |
| 8975 | |
| 8976 | // optional bool deprecated = 23 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8977 | bool FileOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8978 | return (_has_bits_[0] & 0x00000400u) != 0; |
| 8979 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8980 | void FileOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8981 | _has_bits_[0] |= 0x00000400u; |
| 8982 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8983 | void FileOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8984 | _has_bits_[0] &= ~0x00000400u; |
| 8985 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 8986 | void FileOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 8987 | deprecated_ = false; |
| 8988 | clear_has_deprecated(); |
| 8989 | } |
| 8990 | bool FileOptions::deprecated() const { |
| 8991 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.deprecated) |
| 8992 | return deprecated_; |
| 8993 | } |
| 8994 | void FileOptions::set_deprecated(bool value) { |
| 8995 | set_has_deprecated(); |
| 8996 | deprecated_ = value; |
| 8997 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.deprecated) |
| 8998 | } |
| 8999 | |
| 9000 | // optional bool cc_enable_arenas = 31 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9001 | bool FileOptions::has_cc_enable_arenas() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9002 | return (_has_bits_[0] & 0x00000800u) != 0; |
| 9003 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9004 | void FileOptions::set_has_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9005 | _has_bits_[0] |= 0x00000800u; |
| 9006 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9007 | void FileOptions::clear_has_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9008 | _has_bits_[0] &= ~0x00000800u; |
| 9009 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9010 | void FileOptions::clear_cc_enable_arenas() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9011 | cc_enable_arenas_ = false; |
| 9012 | clear_has_cc_enable_arenas(); |
| 9013 | } |
| 9014 | bool FileOptions::cc_enable_arenas() const { |
| 9015 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_enable_arenas) |
| 9016 | return cc_enable_arenas_; |
| 9017 | } |
| 9018 | void FileOptions::set_cc_enable_arenas(bool value) { |
| 9019 | set_has_cc_enable_arenas(); |
| 9020 | cc_enable_arenas_ = value; |
| 9021 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.cc_enable_arenas) |
| 9022 | } |
| 9023 | |
| 9024 | // optional string objc_class_prefix = 36; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9025 | bool FileOptions::has_objc_class_prefix() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9026 | return (_has_bits_[0] & 0x00001000u) != 0; |
| 9027 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9028 | void FileOptions::set_has_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9029 | _has_bits_[0] |= 0x00001000u; |
| 9030 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9031 | void FileOptions::clear_has_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9032 | _has_bits_[0] &= ~0x00001000u; |
| 9033 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9034 | void FileOptions::clear_objc_class_prefix() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9035 | objc_class_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9036 | clear_has_objc_class_prefix(); |
| 9037 | } |
| 9038 | const ::std::string& FileOptions::objc_class_prefix() const { |
| 9039 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix) |
| 9040 | return objc_class_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9041 | } |
| 9042 | void FileOptions::set_objc_class_prefix(const ::std::string& value) { |
| 9043 | set_has_objc_class_prefix(); |
| 9044 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 9045 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) |
| 9046 | } |
| 9047 | void FileOptions::set_objc_class_prefix(const char* value) { |
| 9048 | set_has_objc_class_prefix(); |
| 9049 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 9050 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix) |
| 9051 | } |
| 9052 | void FileOptions::set_objc_class_prefix(const char* value, size_t size) { |
| 9053 | set_has_objc_class_prefix(); |
| 9054 | objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 9055 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 9056 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix) |
| 9057 | } |
| 9058 | ::std::string* FileOptions::mutable_objc_class_prefix() { |
| 9059 | set_has_objc_class_prefix(); |
| 9060 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix) |
| 9061 | return objc_class_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9062 | } |
| 9063 | ::std::string* FileOptions::release_objc_class_prefix() { |
| 9064 | clear_has_objc_class_prefix(); |
| 9065 | return objc_class_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9066 | } |
| 9067 | void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) { |
| 9068 | if (objc_class_prefix != NULL) { |
| 9069 | set_has_objc_class_prefix(); |
| 9070 | } else { |
| 9071 | clear_has_objc_class_prefix(); |
| 9072 | } |
| 9073 | objc_class_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix); |
| 9074 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix) |
| 9075 | } |
| 9076 | |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 9077 | // optional string csharp_namespace = 37; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9078 | bool FileOptions::has_csharp_namespace() const { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 9079 | return (_has_bits_[0] & 0x00002000u) != 0; |
| 9080 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9081 | void FileOptions::set_has_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 9082 | _has_bits_[0] |= 0x00002000u; |
| 9083 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9084 | void FileOptions::clear_has_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 9085 | _has_bits_[0] &= ~0x00002000u; |
| 9086 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9087 | void FileOptions::clear_csharp_namespace() { |
Jan Tattermusch | 685ae36 | 2015-03-16 19:07:16 -0700 | [diff] [blame] | 9088 | csharp_namespace_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9089 | clear_has_csharp_namespace(); |
| 9090 | } |
| 9091 | const ::std::string& FileOptions::csharp_namespace() const { |
| 9092 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace) |
| 9093 | return csharp_namespace_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9094 | } |
| 9095 | void FileOptions::set_csharp_namespace(const ::std::string& value) { |
| 9096 | set_has_csharp_namespace(); |
| 9097 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 9098 | // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) |
| 9099 | } |
| 9100 | void FileOptions::set_csharp_namespace(const char* value) { |
| 9101 | set_has_csharp_namespace(); |
| 9102 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 9103 | // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace) |
| 9104 | } |
| 9105 | void FileOptions::set_csharp_namespace(const char* value, size_t size) { |
| 9106 | set_has_csharp_namespace(); |
| 9107 | csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 9108 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 9109 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace) |
| 9110 | } |
| 9111 | ::std::string* FileOptions::mutable_csharp_namespace() { |
| 9112 | set_has_csharp_namespace(); |
| 9113 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace) |
| 9114 | return csharp_namespace_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9115 | } |
| 9116 | ::std::string* FileOptions::release_csharp_namespace() { |
| 9117 | clear_has_csharp_namespace(); |
| 9118 | return csharp_namespace_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9119 | } |
| 9120 | void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) { |
| 9121 | if (csharp_namespace != NULL) { |
| 9122 | set_has_csharp_namespace(); |
| 9123 | } else { |
| 9124 | clear_has_csharp_namespace(); |
| 9125 | } |
| 9126 | csharp_namespace_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace); |
| 9127 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace) |
| 9128 | } |
| 9129 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9130 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9131 | int FileOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9132 | return uninterpreted_option_.size(); |
| 9133 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9134 | void FileOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9135 | uninterpreted_option_.Clear(); |
| 9136 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9137 | const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9138 | // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option) |
| 9139 | return uninterpreted_option_.Get(index); |
| 9140 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9141 | ::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9142 | // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option) |
| 9143 | return uninterpreted_option_.Mutable(index); |
| 9144 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9145 | ::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9146 | // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option) |
| 9147 | return uninterpreted_option_.Add(); |
| 9148 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9149 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9150 | FileOptions::mutable_uninterpreted_option() { |
| 9151 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option) |
| 9152 | return &uninterpreted_option_; |
| 9153 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9154 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 9155 | FileOptions::uninterpreted_option() const { |
| 9156 | // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option) |
| 9157 | return uninterpreted_option_; |
| 9158 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9159 | |
| 9160 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9161 | |
| 9162 | // =================================================================== |
| 9163 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9164 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9165 | const int MessageOptions::kMessageSetWireFormatFieldNumber; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9166 | const int MessageOptions::kNoStandardDescriptorAccessorFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9167 | const int MessageOptions::kDeprecatedFieldNumber; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9168 | const int MessageOptions::kMapEntryFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9169 | const int MessageOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9170 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9171 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9172 | MessageOptions::MessageOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9173 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9174 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9175 | // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9176 | } |
| 9177 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9178 | void MessageOptions::InitAsDefaultInstance() { |
| 9179 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9180 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9181 | MessageOptions::MessageOptions(const MessageOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9182 | : ::google::protobuf::Message(), |
| 9183 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9184 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9185 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9186 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9187 | } |
| 9188 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9189 | void MessageOptions::SharedCtor() { |
| 9190 | _cached_size_ = 0; |
| 9191 | message_set_wire_format_ = false; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9192 | no_standard_descriptor_accessor_ = false; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9193 | deprecated_ = false; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9194 | map_entry_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9195 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 9196 | } |
| 9197 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9198 | MessageOptions::~MessageOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9199 | // @@protoc_insertion_point(destructor:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9200 | SharedDtor(); |
| 9201 | } |
| 9202 | |
| 9203 | void MessageOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9204 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9205 | } |
| 9206 | } |
| 9207 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9208 | void MessageOptions::SetCachedSize(int size) const { |
| 9209 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 9210 | _cached_size_ = size; |
| 9211 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 9212 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9213 | const ::google::protobuf::Descriptor* MessageOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9214 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9215 | return MessageOptions_descriptor_; |
| 9216 | } |
| 9217 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9218 | const MessageOptions& MessageOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 9219 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 9220 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9221 | } |
| 9222 | |
| 9223 | MessageOptions* MessageOptions::default_instance_ = NULL; |
| 9224 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9225 | MessageOptions* MessageOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9226 | MessageOptions* n = new MessageOptions; |
| 9227 | if (arena != NULL) { |
| 9228 | arena->Own(n); |
| 9229 | } |
| 9230 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9231 | } |
| 9232 | |
| 9233 | void MessageOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9234 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9235 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 9236 | &reinterpret_cast<MessageOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9237 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9238 | #define ZR_(first, last) do {\ |
| 9239 | ::memset(&first, 0,\ |
| 9240 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 9241 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9242 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9243 | ZR_(message_set_wire_format_, map_entry_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9244 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9245 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9246 | #undef ZR_ |
| 9247 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9248 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9249 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9250 | if (_internal_metadata_.have_unknown_fields()) { |
| 9251 | mutable_unknown_fields()->Clear(); |
| 9252 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9253 | } |
| 9254 | |
| 9255 | bool MessageOptions::MergePartialFromCodedStream( |
| 9256 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9257 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9258 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9259 | // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions) |
| 9260 | for (;;) { |
| 9261 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 9262 | tag = p.first; |
| 9263 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9264 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9265 | // optional bool message_set_wire_format = 1 [default = false]; |
| 9266 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9267 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9268 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9269 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9270 | input, &message_set_wire_format_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9271 | set_has_message_set_wire_format(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9272 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9273 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9274 | } |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9275 | if (input->ExpectTag(16)) goto parse_no_standard_descriptor_accessor; |
| 9276 | break; |
| 9277 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9278 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9279 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
| 9280 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9281 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9282 | parse_no_standard_descriptor_accessor: |
| 9283 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9284 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9285 | input, &no_standard_descriptor_accessor_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9286 | set_has_no_standard_descriptor_accessor(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9287 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9288 | goto handle_unusual; |
| 9289 | } |
| 9290 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 9291 | break; |
| 9292 | } |
| 9293 | |
| 9294 | // optional bool deprecated = 3 [default = false]; |
| 9295 | case 3: { |
| 9296 | if (tag == 24) { |
| 9297 | parse_deprecated: |
| 9298 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9299 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9300 | input, &deprecated_))); |
| 9301 | set_has_deprecated(); |
| 9302 | } else { |
| 9303 | goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9304 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9305 | if (input->ExpectTag(56)) goto parse_map_entry; |
| 9306 | break; |
| 9307 | } |
| 9308 | |
| 9309 | // optional bool map_entry = 7; |
| 9310 | case 7: { |
| 9311 | if (tag == 56) { |
| 9312 | parse_map_entry: |
| 9313 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9314 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9315 | input, &map_entry_))); |
| 9316 | set_has_map_entry(); |
| 9317 | } else { |
| 9318 | goto handle_unusual; |
| 9319 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9320 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 9321 | break; |
| 9322 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9323 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9324 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 9325 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9326 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9327 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9328 | DO_(input->IncrementRecursionDepth()); |
| 9329 | parse_loop_uninterpreted_option: |
| 9330 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9331 | input, add_uninterpreted_option())); |
| 9332 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9333 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9334 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9335 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 9336 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9337 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9338 | break; |
| 9339 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9340 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9341 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9342 | handle_unusual: |
| 9343 | if (tag == 0 || |
| 9344 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9345 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9346 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9347 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9348 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9349 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 9350 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9351 | continue; |
| 9352 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9353 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 9354 | input, tag, mutable_unknown_fields())); |
| 9355 | break; |
| 9356 | } |
| 9357 | } |
| 9358 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9359 | success: |
| 9360 | // @@protoc_insertion_point(parse_success:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9361 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9362 | failure: |
| 9363 | // @@protoc_insertion_point(parse_failure:google.protobuf.MessageOptions) |
| 9364 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9365 | #undef DO_ |
| 9366 | } |
| 9367 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9368 | void MessageOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9369 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9370 | // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9371 | // optional bool message_set_wire_format = 1 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9372 | if (has_message_set_wire_format()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9373 | ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); |
| 9374 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9375 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9376 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9377 | if (has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9378 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9379 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9380 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9381 | // optional bool deprecated = 3 [default = false]; |
| 9382 | if (has_deprecated()) { |
| 9383 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
| 9384 | } |
| 9385 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9386 | // optional bool map_entry = 7; |
| 9387 | if (has_map_entry()) { |
| 9388 | ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output); |
| 9389 | } |
| 9390 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9391 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9392 | 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] | 9393 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9394 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9395 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9396 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9397 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9398 | _extensions_.SerializeWithCachedSizes( |
| 9399 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9400 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9401 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9402 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 9403 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9404 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9405 | // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9406 | } |
| 9407 | |
| 9408 | ::google::protobuf::uint8* MessageOptions::SerializeWithCachedSizesToArray( |
| 9409 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9410 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9411 | // optional bool message_set_wire_format = 1 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9412 | if (has_message_set_wire_format()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9413 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); |
| 9414 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9415 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9416 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9417 | if (has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9418 | 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] | 9419 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9420 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9421 | // optional bool deprecated = 3 [default = false]; |
| 9422 | if (has_deprecated()) { |
| 9423 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
| 9424 | } |
| 9425 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9426 | // optional bool map_entry = 7; |
| 9427 | if (has_map_entry()) { |
| 9428 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target); |
| 9429 | } |
| 9430 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9431 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9432 | 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] | 9433 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9434 | WriteMessageNoVirtualToArray( |
| 9435 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9436 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9437 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9438 | // Extension range [1000, 536870912) |
| 9439 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 9440 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9441 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9442 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9443 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 9444 | unknown_fields(), target); |
| 9445 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9446 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9447 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9448 | } |
| 9449 | |
| 9450 | int MessageOptions::ByteSize() const { |
| 9451 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9452 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 9453 | if (_has_bits_[0 / 32] & 15u) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9454 | // optional bool message_set_wire_format = 1 [default = false]; |
| 9455 | if (has_message_set_wire_format()) { |
| 9456 | total_size += 1 + 1; |
| 9457 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9458 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9459 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
| 9460 | if (has_no_standard_descriptor_accessor()) { |
| 9461 | total_size += 1 + 1; |
| 9462 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9463 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9464 | // optional bool deprecated = 3 [default = false]; |
| 9465 | if (has_deprecated()) { |
| 9466 | total_size += 1 + 1; |
| 9467 | } |
| 9468 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9469 | // optional bool map_entry = 7; |
| 9470 | if (has_map_entry()) { |
| 9471 | total_size += 1 + 1; |
| 9472 | } |
| 9473 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9474 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9475 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9476 | total_size += 2 * this->uninterpreted_option_size(); |
| 9477 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9478 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9479 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9480 | this->uninterpreted_option(i)); |
| 9481 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9482 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9483 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9484 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9485 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9486 | total_size += |
| 9487 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 9488 | unknown_fields()); |
| 9489 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9490 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9491 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9492 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9493 | return total_size; |
| 9494 | } |
| 9495 | |
| 9496 | void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9497 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9498 | const MessageOptions* source = |
| 9499 | ::google::protobuf::internal::DynamicCastToGenerated<const MessageOptions>( |
| 9500 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9501 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 9502 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9503 | } else { |
| 9504 | MergeFrom(*source); |
| 9505 | } |
| 9506 | } |
| 9507 | |
| 9508 | void MessageOptions::MergeFrom(const MessageOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9509 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9510 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9511 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9512 | if (from.has_message_set_wire_format()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9513 | set_message_set_wire_format(from.message_set_wire_format()); |
| 9514 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9515 | if (from.has_no_standard_descriptor_accessor()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9516 | set_no_standard_descriptor_accessor(from.no_standard_descriptor_accessor()); |
| 9517 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9518 | if (from.has_deprecated()) { |
| 9519 | set_deprecated(from.deprecated()); |
| 9520 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9521 | if (from.has_map_entry()) { |
| 9522 | set_map_entry(from.map_entry()); |
| 9523 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9524 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9525 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9526 | if (from._internal_metadata_.have_unknown_fields()) { |
| 9527 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 9528 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9529 | } |
| 9530 | |
| 9531 | void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 9532 | if (&from == this) return; |
| 9533 | Clear(); |
| 9534 | MergeFrom(from); |
| 9535 | } |
| 9536 | |
| 9537 | void MessageOptions::CopyFrom(const MessageOptions& from) { |
| 9538 | if (&from == this) return; |
| 9539 | Clear(); |
| 9540 | MergeFrom(from); |
| 9541 | } |
| 9542 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 9543 | bool MessageOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9544 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9545 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9546 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 9547 | if (!_extensions_.IsInitialized()) return false; return true; |
| 9548 | } |
| 9549 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 9550 | void MessageOptions::Swap(MessageOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9551 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9552 | InternalSwap(other); |
| 9553 | } |
| 9554 | void MessageOptions::InternalSwap(MessageOptions* other) { |
| 9555 | std::swap(message_set_wire_format_, other->message_set_wire_format_); |
| 9556 | std::swap(no_standard_descriptor_accessor_, other->no_standard_descriptor_accessor_); |
| 9557 | std::swap(deprecated_, other->deprecated_); |
| 9558 | std::swap(map_entry_, other->map_entry_); |
| 9559 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 9560 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 9561 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 9562 | std::swap(_cached_size_, other->_cached_size_); |
| 9563 | _extensions_.Swap(&other->_extensions_); |
| 9564 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 9565 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9566 | ::google::protobuf::Metadata MessageOptions::GetMetadata() const { |
| 9567 | protobuf_AssignDescriptorsOnce(); |
| 9568 | ::google::protobuf::Metadata metadata; |
| 9569 | metadata.descriptor = MessageOptions_descriptor_; |
| 9570 | metadata.reflection = MessageOptions_reflection_; |
| 9571 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9572 | } |
| 9573 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9574 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 9575 | // MessageOptions |
| 9576 | |
| 9577 | // optional bool message_set_wire_format = 1 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9578 | bool MessageOptions::has_message_set_wire_format() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9579 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 9580 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9581 | void MessageOptions::set_has_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9582 | _has_bits_[0] |= 0x00000001u; |
| 9583 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9584 | void MessageOptions::clear_has_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9585 | _has_bits_[0] &= ~0x00000001u; |
| 9586 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9587 | void MessageOptions::clear_message_set_wire_format() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9588 | message_set_wire_format_ = false; |
| 9589 | clear_has_message_set_wire_format(); |
| 9590 | } |
| 9591 | bool MessageOptions::message_set_wire_format() const { |
| 9592 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.message_set_wire_format) |
| 9593 | return message_set_wire_format_; |
| 9594 | } |
| 9595 | void MessageOptions::set_message_set_wire_format(bool value) { |
| 9596 | set_has_message_set_wire_format(); |
| 9597 | message_set_wire_format_ = value; |
| 9598 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.message_set_wire_format) |
| 9599 | } |
| 9600 | |
| 9601 | // optional bool no_standard_descriptor_accessor = 2 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9602 | bool MessageOptions::has_no_standard_descriptor_accessor() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9603 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 9604 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9605 | void MessageOptions::set_has_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9606 | _has_bits_[0] |= 0x00000002u; |
| 9607 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9608 | void MessageOptions::clear_has_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9609 | _has_bits_[0] &= ~0x00000002u; |
| 9610 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9611 | void MessageOptions::clear_no_standard_descriptor_accessor() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9612 | no_standard_descriptor_accessor_ = false; |
| 9613 | clear_has_no_standard_descriptor_accessor(); |
| 9614 | } |
| 9615 | bool MessageOptions::no_standard_descriptor_accessor() const { |
| 9616 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.no_standard_descriptor_accessor) |
| 9617 | return no_standard_descriptor_accessor_; |
| 9618 | } |
| 9619 | void MessageOptions::set_no_standard_descriptor_accessor(bool value) { |
| 9620 | set_has_no_standard_descriptor_accessor(); |
| 9621 | no_standard_descriptor_accessor_ = value; |
| 9622 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.no_standard_descriptor_accessor) |
| 9623 | } |
| 9624 | |
| 9625 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9626 | bool MessageOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9627 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 9628 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9629 | void MessageOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9630 | _has_bits_[0] |= 0x00000004u; |
| 9631 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9632 | void MessageOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9633 | _has_bits_[0] &= ~0x00000004u; |
| 9634 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9635 | void MessageOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9636 | deprecated_ = false; |
| 9637 | clear_has_deprecated(); |
| 9638 | } |
| 9639 | bool MessageOptions::deprecated() const { |
| 9640 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.deprecated) |
| 9641 | return deprecated_; |
| 9642 | } |
| 9643 | void MessageOptions::set_deprecated(bool value) { |
| 9644 | set_has_deprecated(); |
| 9645 | deprecated_ = value; |
| 9646 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.deprecated) |
| 9647 | } |
| 9648 | |
| 9649 | // optional bool map_entry = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9650 | bool MessageOptions::has_map_entry() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9651 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 9652 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9653 | void MessageOptions::set_has_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9654 | _has_bits_[0] |= 0x00000008u; |
| 9655 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9656 | void MessageOptions::clear_has_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9657 | _has_bits_[0] &= ~0x00000008u; |
| 9658 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9659 | void MessageOptions::clear_map_entry() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9660 | map_entry_ = false; |
| 9661 | clear_has_map_entry(); |
| 9662 | } |
| 9663 | bool MessageOptions::map_entry() const { |
| 9664 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry) |
| 9665 | return map_entry_; |
| 9666 | } |
| 9667 | void MessageOptions::set_map_entry(bool value) { |
| 9668 | set_has_map_entry(); |
| 9669 | map_entry_ = value; |
| 9670 | // @@protoc_insertion_point(field_set:google.protobuf.MessageOptions.map_entry) |
| 9671 | } |
| 9672 | |
| 9673 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9674 | int MessageOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9675 | return uninterpreted_option_.size(); |
| 9676 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9677 | void MessageOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9678 | uninterpreted_option_.Clear(); |
| 9679 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9680 | const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9681 | // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option) |
| 9682 | return uninterpreted_option_.Get(index); |
| 9683 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9684 | ::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9685 | // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option) |
| 9686 | return uninterpreted_option_.Mutable(index); |
| 9687 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9688 | ::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9689 | // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option) |
| 9690 | return uninterpreted_option_.Add(); |
| 9691 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9692 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9693 | MessageOptions::mutable_uninterpreted_option() { |
| 9694 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option) |
| 9695 | return &uninterpreted_option_; |
| 9696 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 9697 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 9698 | MessageOptions::uninterpreted_option() const { |
| 9699 | // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option) |
| 9700 | return uninterpreted_option_; |
| 9701 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9702 | |
| 9703 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9704 | |
| 9705 | // =================================================================== |
| 9706 | |
| 9707 | const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9708 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9709 | return FieldOptions_CType_descriptor_; |
| 9710 | } |
| 9711 | bool FieldOptions_CType_IsValid(int value) { |
| 9712 | switch(value) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9713 | case 0: |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9714 | case 1: |
| 9715 | case 2: |
| 9716 | return true; |
| 9717 | default: |
| 9718 | return false; |
| 9719 | } |
| 9720 | } |
| 9721 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9722 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9723 | const FieldOptions_CType FieldOptions::STRING; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9724 | const FieldOptions_CType FieldOptions::CORD; |
| 9725 | const FieldOptions_CType FieldOptions::STRING_PIECE; |
| 9726 | const FieldOptions_CType FieldOptions::CType_MIN; |
| 9727 | const FieldOptions_CType FieldOptions::CType_MAX; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9728 | const int FieldOptions::CType_ARRAYSIZE; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9729 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9730 | const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() { |
| 9731 | protobuf_AssignDescriptorsOnce(); |
| 9732 | return FieldOptions_JSType_descriptor_; |
| 9733 | } |
| 9734 | bool FieldOptions_JSType_IsValid(int value) { |
| 9735 | switch(value) { |
| 9736 | case 0: |
| 9737 | case 1: |
| 9738 | case 2: |
| 9739 | return true; |
| 9740 | default: |
| 9741 | return false; |
| 9742 | } |
| 9743 | } |
| 9744 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9745 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9746 | const FieldOptions_JSType FieldOptions::JS_NORMAL; |
| 9747 | const FieldOptions_JSType FieldOptions::JS_STRING; |
| 9748 | const FieldOptions_JSType FieldOptions::JS_NUMBER; |
| 9749 | const FieldOptions_JSType FieldOptions::JSType_MIN; |
| 9750 | const FieldOptions_JSType FieldOptions::JSType_MAX; |
| 9751 | const int FieldOptions::JSType_ARRAYSIZE; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9752 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 9753 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9754 | const int FieldOptions::kCtypeFieldNumber; |
| 9755 | const int FieldOptions::kPackedFieldNumber; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9756 | const int FieldOptions::kJstypeFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9757 | const int FieldOptions::kLazyFieldNumber; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9758 | const int FieldOptions::kDeprecatedFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9759 | const int FieldOptions::kWeakFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 9760 | const int FieldOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 9761 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9762 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9763 | FieldOptions::FieldOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9764 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9765 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9766 | // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9767 | } |
| 9768 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9769 | void FieldOptions::InitAsDefaultInstance() { |
| 9770 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9771 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 9772 | FieldOptions::FieldOptions(const FieldOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9773 | : ::google::protobuf::Message(), |
| 9774 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9775 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9776 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9777 | // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9778 | } |
| 9779 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9780 | void FieldOptions::SharedCtor() { |
| 9781 | _cached_size_ = 0; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9782 | ctype_ = 0; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9783 | packed_ = false; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9784 | jstype_ = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9785 | lazy_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9786 | deprecated_ = false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9787 | weak_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9788 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 9789 | } |
| 9790 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9791 | FieldOptions::~FieldOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9792 | // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9793 | SharedDtor(); |
| 9794 | } |
| 9795 | |
| 9796 | void FieldOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9797 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9798 | } |
| 9799 | } |
| 9800 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9801 | void FieldOptions::SetCachedSize(int size) const { |
| 9802 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 9803 | _cached_size_ = size; |
| 9804 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 9805 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9806 | const ::google::protobuf::Descriptor* FieldOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9807 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9808 | return FieldOptions_descriptor_; |
| 9809 | } |
| 9810 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9811 | const FieldOptions& FieldOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 9812 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 9813 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9814 | } |
| 9815 | |
| 9816 | FieldOptions* FieldOptions::default_instance_ = NULL; |
| 9817 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9818 | FieldOptions* FieldOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 9819 | FieldOptions* n = new FieldOptions; |
| 9820 | if (arena != NULL) { |
| 9821 | arena->Own(n); |
| 9822 | } |
| 9823 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9824 | } |
| 9825 | |
| 9826 | void FieldOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9827 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9828 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 9829 | &reinterpret_cast<FieldOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9830 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9831 | #define ZR_(first, last) do {\ |
| 9832 | ::memset(&first, 0,\ |
| 9833 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 9834 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9835 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9836 | if (_has_bits_[0 / 32] & 63u) { |
| 9837 | ZR_(ctype_, jstype_); |
| 9838 | ZR_(packed_, weak_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9839 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9840 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 9841 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9842 | #undef ZR_ |
| 9843 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9844 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9845 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 9846 | if (_internal_metadata_.have_unknown_fields()) { |
| 9847 | mutable_unknown_fields()->Clear(); |
| 9848 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9849 | } |
| 9850 | |
| 9851 | bool FieldOptions::MergePartialFromCodedStream( |
| 9852 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9853 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9854 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9855 | // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions) |
| 9856 | for (;;) { |
| 9857 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 9858 | tag = p.first; |
| 9859 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9860 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9861 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9862 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9863 | if (tag == 8) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9864 | int value; |
| 9865 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9866 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9867 | input, &value))); |
| 9868 | if (::google::protobuf::FieldOptions_CType_IsValid(value)) { |
| 9869 | set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); |
| 9870 | } else { |
| 9871 | mutable_unknown_fields()->AddVarint(1, value); |
| 9872 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9873 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9874 | goto handle_unusual; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9875 | } |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9876 | if (input->ExpectTag(16)) goto parse_packed; |
| 9877 | break; |
| 9878 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9879 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9880 | // optional bool packed = 2; |
| 9881 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9882 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9883 | parse_packed: |
| 9884 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9885 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9886 | input, &packed_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9887 | set_has_packed(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9888 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9889 | goto handle_unusual; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 9890 | } |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9891 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 9892 | break; |
| 9893 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9894 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9895 | // optional bool deprecated = 3 [default = false]; |
| 9896 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9897 | if (tag == 24) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9898 | parse_deprecated: |
| 9899 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9900 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9901 | input, &deprecated_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 9902 | set_has_deprecated(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9903 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9904 | goto handle_unusual; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9905 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9906 | if (input->ExpectTag(40)) goto parse_lazy; |
| 9907 | break; |
| 9908 | } |
| 9909 | |
| 9910 | // optional bool lazy = 5 [default = false]; |
| 9911 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9912 | if (tag == 40) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9913 | parse_lazy: |
| 9914 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9915 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9916 | input, &lazy_))); |
| 9917 | set_has_lazy(); |
| 9918 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9919 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9920 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9921 | if (input->ExpectTag(48)) goto parse_jstype; |
| 9922 | break; |
| 9923 | } |
| 9924 | |
| 9925 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 9926 | case 6: { |
| 9927 | if (tag == 48) { |
| 9928 | parse_jstype: |
| 9929 | int value; |
| 9930 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9931 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9932 | input, &value))); |
| 9933 | if (::google::protobuf::FieldOptions_JSType_IsValid(value)) { |
| 9934 | set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value)); |
| 9935 | } else { |
| 9936 | mutable_unknown_fields()->AddVarint(6, value); |
| 9937 | } |
| 9938 | } else { |
| 9939 | goto handle_unusual; |
| 9940 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9941 | if (input->ExpectTag(80)) goto parse_weak; |
| 9942 | break; |
| 9943 | } |
| 9944 | |
| 9945 | // optional bool weak = 10 [default = false]; |
| 9946 | case 10: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9947 | if (tag == 80) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9948 | parse_weak: |
| 9949 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9950 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 9951 | input, &weak_))); |
| 9952 | set_has_weak(); |
| 9953 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9954 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9955 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9956 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 9957 | break; |
| 9958 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9959 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9960 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 9961 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9962 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9963 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9964 | DO_(input->IncrementRecursionDepth()); |
| 9965 | parse_loop_uninterpreted_option: |
| 9966 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 9967 | input, add_uninterpreted_option())); |
| 9968 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9969 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9970 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 9971 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 9972 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9973 | if (input->ExpectAtEnd()) goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9974 | break; |
| 9975 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 9976 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9977 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9978 | handle_unusual: |
| 9979 | if (tag == 0 || |
| 9980 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 9981 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9982 | goto success; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9983 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9984 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 9985 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 9986 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 9987 | continue; |
| 9988 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9989 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 9990 | input, tag, mutable_unknown_fields())); |
| 9991 | break; |
| 9992 | } |
| 9993 | } |
| 9994 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9995 | success: |
| 9996 | // @@protoc_insertion_point(parse_success:google.protobuf.FieldOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 9997 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 9998 | failure: |
| 9999 | // @@protoc_insertion_point(parse_failure:google.protobuf.FieldOptions) |
| 10000 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10001 | #undef DO_ |
| 10002 | } |
| 10003 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10004 | void FieldOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10005 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10006 | // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions) |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10007 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10008 | if (has_ctype()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10009 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 10010 | 1, this->ctype(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10011 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10012 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10013 | // optional bool packed = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10014 | if (has_packed()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10015 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10016 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10017 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10018 | // optional bool deprecated = 3 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10019 | if (has_deprecated()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10020 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10021 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10022 | |
| 10023 | // optional bool lazy = 5 [default = false]; |
| 10024 | if (has_lazy()) { |
| 10025 | ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output); |
| 10026 | } |
| 10027 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10028 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10029 | if (has_jstype()) { |
| 10030 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 10031 | 6, this->jstype(), output); |
| 10032 | } |
| 10033 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10034 | // optional bool weak = 10 [default = false]; |
| 10035 | if (has_weak()) { |
| 10036 | ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output); |
| 10037 | } |
| 10038 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10039 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10040 | 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] | 10041 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10042 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10043 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10044 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10045 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10046 | _extensions_.SerializeWithCachedSizes( |
| 10047 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10048 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10049 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10050 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 10051 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10052 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10053 | // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10054 | } |
| 10055 | |
| 10056 | ::google::protobuf::uint8* FieldOptions::SerializeWithCachedSizesToArray( |
| 10057 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10058 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10059 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10060 | if (has_ctype()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10061 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 10062 | 1, this->ctype(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10063 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10064 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10065 | // optional bool packed = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10066 | if (has_packed()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10067 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10068 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10069 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10070 | // optional bool deprecated = 3 [default = false]; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10071 | if (has_deprecated()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10072 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10073 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10074 | |
| 10075 | // optional bool lazy = 5 [default = false]; |
| 10076 | if (has_lazy()) { |
| 10077 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target); |
| 10078 | } |
| 10079 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10080 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10081 | if (has_jstype()) { |
| 10082 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 10083 | 6, this->jstype(), target); |
| 10084 | } |
| 10085 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10086 | // optional bool weak = 10 [default = false]; |
| 10087 | if (has_weak()) { |
| 10088 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target); |
| 10089 | } |
| 10090 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10091 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10092 | 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] | 10093 | target = ::google::protobuf::internal::WireFormatLite:: |
| 10094 | WriteMessageNoVirtualToArray( |
| 10095 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10096 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10097 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10098 | // Extension range [1000, 536870912) |
| 10099 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 10100 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10101 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10102 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10103 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 10104 | unknown_fields(), target); |
| 10105 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10106 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10107 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10108 | } |
| 10109 | |
| 10110 | int FieldOptions::ByteSize() const { |
| 10111 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10112 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 10113 | if (_has_bits_[0 / 32] & 63u) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10114 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10115 | if (has_ctype()) { |
| 10116 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10117 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype()); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10118 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10119 | |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10120 | // optional bool packed = 2; |
| 10121 | if (has_packed()) { |
| 10122 | total_size += 1 + 1; |
| 10123 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10124 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10125 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10126 | if (has_jstype()) { |
| 10127 | total_size += 1 + |
| 10128 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype()); |
| 10129 | } |
| 10130 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10131 | // optional bool lazy = 5 [default = false]; |
| 10132 | if (has_lazy()) { |
| 10133 | total_size += 1 + 1; |
| 10134 | } |
| 10135 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10136 | // optional bool deprecated = 3 [default = false]; |
| 10137 | if (has_deprecated()) { |
| 10138 | total_size += 1 + 1; |
| 10139 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10140 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10141 | // optional bool weak = 10 [default = false]; |
| 10142 | if (has_weak()) { |
| 10143 | total_size += 1 + 1; |
| 10144 | } |
| 10145 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10146 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10147 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10148 | total_size += 2 * this->uninterpreted_option_size(); |
| 10149 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10150 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10151 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10152 | this->uninterpreted_option(i)); |
| 10153 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10154 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10155 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10156 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10157 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10158 | total_size += |
| 10159 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 10160 | unknown_fields()); |
| 10161 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10162 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10163 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10164 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10165 | return total_size; |
| 10166 | } |
| 10167 | |
| 10168 | void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10169 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10170 | const FieldOptions* source = |
| 10171 | ::google::protobuf::internal::DynamicCastToGenerated<const FieldOptions>( |
| 10172 | &from); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10173 | if (source == NULL) { |
temporal | 779f61c | 2008-08-13 03:15:00 +0000 | [diff] [blame] | 10174 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10175 | } else { |
| 10176 | MergeFrom(*source); |
| 10177 | } |
| 10178 | } |
| 10179 | |
| 10180 | void FieldOptions::MergeFrom(const FieldOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10181 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10182 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10183 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10184 | if (from.has_ctype()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10185 | set_ctype(from.ctype()); |
| 10186 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10187 | if (from.has_packed()) { |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10188 | set_packed(from.packed()); |
| 10189 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10190 | if (from.has_jstype()) { |
| 10191 | set_jstype(from.jstype()); |
| 10192 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10193 | if (from.has_lazy()) { |
| 10194 | set_lazy(from.lazy()); |
| 10195 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 10196 | if (from.has_deprecated()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10197 | set_deprecated(from.deprecated()); |
| 10198 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10199 | if (from.has_weak()) { |
| 10200 | set_weak(from.weak()); |
| 10201 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10202 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10203 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10204 | if (from._internal_metadata_.have_unknown_fields()) { |
| 10205 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 10206 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10207 | } |
| 10208 | |
| 10209 | void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 10210 | if (&from == this) return; |
| 10211 | Clear(); |
| 10212 | MergeFrom(from); |
| 10213 | } |
| 10214 | |
| 10215 | void FieldOptions::CopyFrom(const FieldOptions& from) { |
| 10216 | if (&from == this) return; |
| 10217 | Clear(); |
| 10218 | MergeFrom(from); |
| 10219 | } |
| 10220 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10221 | bool FieldOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10222 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10223 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10224 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10225 | if (!_extensions_.IsInitialized()) return false; return true; |
| 10226 | } |
| 10227 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10228 | void FieldOptions::Swap(FieldOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10229 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10230 | InternalSwap(other); |
| 10231 | } |
| 10232 | void FieldOptions::InternalSwap(FieldOptions* other) { |
| 10233 | std::swap(ctype_, other->ctype_); |
| 10234 | std::swap(packed_, other->packed_); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10235 | std::swap(jstype_, other->jstype_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10236 | std::swap(lazy_, other->lazy_); |
| 10237 | std::swap(deprecated_, other->deprecated_); |
| 10238 | std::swap(weak_, other->weak_); |
| 10239 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 10240 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 10241 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 10242 | std::swap(_cached_size_, other->_cached_size_); |
| 10243 | _extensions_.Swap(&other->_extensions_); |
| 10244 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10245 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10246 | ::google::protobuf::Metadata FieldOptions::GetMetadata() const { |
| 10247 | protobuf_AssignDescriptorsOnce(); |
| 10248 | ::google::protobuf::Metadata metadata; |
| 10249 | metadata.descriptor = FieldOptions_descriptor_; |
| 10250 | metadata.reflection = FieldOptions_reflection_; |
| 10251 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10252 | } |
| 10253 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10254 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 10255 | // FieldOptions |
| 10256 | |
| 10257 | // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10258 | bool FieldOptions::has_ctype() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10259 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 10260 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10261 | void FieldOptions::set_has_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10262 | _has_bits_[0] |= 0x00000001u; |
| 10263 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10264 | void FieldOptions::clear_has_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10265 | _has_bits_[0] &= ~0x00000001u; |
| 10266 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10267 | void FieldOptions::clear_ctype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10268 | ctype_ = 0; |
| 10269 | clear_has_ctype(); |
| 10270 | } |
| 10271 | ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const { |
| 10272 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype) |
| 10273 | return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_); |
| 10274 | } |
| 10275 | void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) { |
| 10276 | assert(::google::protobuf::FieldOptions_CType_IsValid(value)); |
| 10277 | set_has_ctype(); |
| 10278 | ctype_ = value; |
| 10279 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype) |
| 10280 | } |
| 10281 | |
| 10282 | // optional bool packed = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10283 | bool FieldOptions::has_packed() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10284 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 10285 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10286 | void FieldOptions::set_has_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10287 | _has_bits_[0] |= 0x00000002u; |
| 10288 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10289 | void FieldOptions::clear_has_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10290 | _has_bits_[0] &= ~0x00000002u; |
| 10291 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10292 | void FieldOptions::clear_packed() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10293 | packed_ = false; |
| 10294 | clear_has_packed(); |
| 10295 | } |
| 10296 | bool FieldOptions::packed() const { |
| 10297 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed) |
| 10298 | return packed_; |
| 10299 | } |
| 10300 | void FieldOptions::set_packed(bool value) { |
| 10301 | set_has_packed(); |
| 10302 | packed_ = value; |
| 10303 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.packed) |
| 10304 | } |
| 10305 | |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10306 | // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; |
| 10307 | bool FieldOptions::has_jstype() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10308 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 10309 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10310 | void FieldOptions::set_has_jstype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10311 | _has_bits_[0] |= 0x00000004u; |
| 10312 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10313 | void FieldOptions::clear_has_jstype() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10314 | _has_bits_[0] &= ~0x00000004u; |
| 10315 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10316 | void FieldOptions::clear_jstype() { |
| 10317 | jstype_ = 0; |
| 10318 | clear_has_jstype(); |
| 10319 | } |
| 10320 | ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const { |
| 10321 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype) |
| 10322 | return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_); |
| 10323 | } |
| 10324 | void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) { |
| 10325 | assert(::google::protobuf::FieldOptions_JSType_IsValid(value)); |
| 10326 | set_has_jstype(); |
| 10327 | jstype_ = value; |
| 10328 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype) |
| 10329 | } |
| 10330 | |
| 10331 | // optional bool lazy = 5 [default = false]; |
| 10332 | bool FieldOptions::has_lazy() const { |
| 10333 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 10334 | } |
| 10335 | void FieldOptions::set_has_lazy() { |
| 10336 | _has_bits_[0] |= 0x00000008u; |
| 10337 | } |
| 10338 | void FieldOptions::clear_has_lazy() { |
| 10339 | _has_bits_[0] &= ~0x00000008u; |
| 10340 | } |
| 10341 | void FieldOptions::clear_lazy() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10342 | lazy_ = false; |
| 10343 | clear_has_lazy(); |
| 10344 | } |
| 10345 | bool FieldOptions::lazy() const { |
| 10346 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.lazy) |
| 10347 | return lazy_; |
| 10348 | } |
| 10349 | void FieldOptions::set_lazy(bool value) { |
| 10350 | set_has_lazy(); |
| 10351 | lazy_ = value; |
| 10352 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.lazy) |
| 10353 | } |
| 10354 | |
| 10355 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10356 | bool FieldOptions::has_deprecated() const { |
| 10357 | return (_has_bits_[0] & 0x00000010u) != 0; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10358 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10359 | void FieldOptions::set_has_deprecated() { |
| 10360 | _has_bits_[0] |= 0x00000010u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10361 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10362 | void FieldOptions::clear_has_deprecated() { |
| 10363 | _has_bits_[0] &= ~0x00000010u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10364 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10365 | void FieldOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10366 | deprecated_ = false; |
| 10367 | clear_has_deprecated(); |
| 10368 | } |
| 10369 | bool FieldOptions::deprecated() const { |
| 10370 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.deprecated) |
| 10371 | return deprecated_; |
| 10372 | } |
| 10373 | void FieldOptions::set_deprecated(bool value) { |
| 10374 | set_has_deprecated(); |
| 10375 | deprecated_ = value; |
| 10376 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.deprecated) |
| 10377 | } |
| 10378 | |
| 10379 | // optional bool weak = 10 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10380 | bool FieldOptions::has_weak() const { |
| 10381 | return (_has_bits_[0] & 0x00000020u) != 0; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10382 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10383 | void FieldOptions::set_has_weak() { |
| 10384 | _has_bits_[0] |= 0x00000020u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10385 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10386 | void FieldOptions::clear_has_weak() { |
| 10387 | _has_bits_[0] &= ~0x00000020u; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10388 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10389 | void FieldOptions::clear_weak() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10390 | weak_ = false; |
| 10391 | clear_has_weak(); |
| 10392 | } |
| 10393 | bool FieldOptions::weak() const { |
| 10394 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak) |
| 10395 | return weak_; |
| 10396 | } |
| 10397 | void FieldOptions::set_weak(bool value) { |
| 10398 | set_has_weak(); |
| 10399 | weak_ = value; |
| 10400 | // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak) |
| 10401 | } |
| 10402 | |
| 10403 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10404 | int FieldOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10405 | return uninterpreted_option_.size(); |
| 10406 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10407 | void FieldOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10408 | uninterpreted_option_.Clear(); |
| 10409 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10410 | const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10411 | // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option) |
| 10412 | return uninterpreted_option_.Get(index); |
| 10413 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10414 | ::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10415 | // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option) |
| 10416 | return uninterpreted_option_.Mutable(index); |
| 10417 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10418 | ::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10419 | // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option) |
| 10420 | return uninterpreted_option_.Add(); |
| 10421 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10422 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10423 | FieldOptions::mutable_uninterpreted_option() { |
| 10424 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option) |
| 10425 | return &uninterpreted_option_; |
| 10426 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10427 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 10428 | FieldOptions::uninterpreted_option() const { |
| 10429 | // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option) |
| 10430 | return uninterpreted_option_; |
| 10431 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10432 | |
| 10433 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10434 | |
| 10435 | // =================================================================== |
| 10436 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 10437 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10438 | const int EnumOptions::kAllowAliasFieldNumber; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10439 | const int EnumOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10440 | const int EnumOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 10441 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10442 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10443 | EnumOptions::EnumOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10444 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10445 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10446 | // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10447 | } |
| 10448 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10449 | void EnumOptions::InitAsDefaultInstance() { |
| 10450 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10451 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10452 | EnumOptions::EnumOptions(const EnumOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10453 | : ::google::protobuf::Message(), |
| 10454 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10455 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10456 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10457 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10458 | } |
| 10459 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10460 | void EnumOptions::SharedCtor() { |
| 10461 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10462 | allow_alias_ = false; |
| 10463 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10464 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 10465 | } |
| 10466 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10467 | EnumOptions::~EnumOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10468 | // @@protoc_insertion_point(destructor:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10469 | SharedDtor(); |
| 10470 | } |
| 10471 | |
| 10472 | void EnumOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10473 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10474 | } |
| 10475 | } |
| 10476 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10477 | void EnumOptions::SetCachedSize(int size) const { |
| 10478 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 10479 | _cached_size_ = size; |
| 10480 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 10481 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10482 | const ::google::protobuf::Descriptor* EnumOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10483 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10484 | return EnumOptions_descriptor_; |
| 10485 | } |
| 10486 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10487 | const EnumOptions& EnumOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 10488 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 10489 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10490 | } |
| 10491 | |
| 10492 | EnumOptions* EnumOptions::default_instance_ = NULL; |
| 10493 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10494 | EnumOptions* EnumOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10495 | EnumOptions* n = new EnumOptions; |
| 10496 | if (arena != NULL) { |
| 10497 | arena->Own(n); |
| 10498 | } |
| 10499 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10500 | } |
| 10501 | |
| 10502 | void EnumOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10503 | _extensions_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10504 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 10505 | &reinterpret_cast<EnumOptions*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10506 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10507 | #define ZR_(first, last) do {\ |
| 10508 | ::memset(&first, 0,\ |
| 10509 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 10510 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10511 | |
| 10512 | ZR_(allow_alias_, deprecated_); |
| 10513 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10514 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10515 | #undef ZR_ |
| 10516 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10517 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10518 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10519 | if (_internal_metadata_.have_unknown_fields()) { |
| 10520 | mutable_unknown_fields()->Clear(); |
| 10521 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10522 | } |
| 10523 | |
| 10524 | bool EnumOptions::MergePartialFromCodedStream( |
| 10525 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10526 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10527 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10528 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions) |
| 10529 | for (;;) { |
| 10530 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 10531 | tag = p.first; |
| 10532 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10533 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10534 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10535 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10536 | if (tag == 16) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10537 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10538 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10539 | input, &allow_alias_))); |
| 10540 | set_has_allow_alias(); |
| 10541 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10542 | goto handle_unusual; |
| 10543 | } |
| 10544 | if (input->ExpectTag(24)) goto parse_deprecated; |
| 10545 | break; |
| 10546 | } |
| 10547 | |
| 10548 | // optional bool deprecated = 3 [default = false]; |
| 10549 | case 3: { |
| 10550 | if (tag == 24) { |
| 10551 | parse_deprecated: |
| 10552 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10553 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10554 | input, &deprecated_))); |
| 10555 | set_has_deprecated(); |
| 10556 | } else { |
| 10557 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10558 | } |
| 10559 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 10560 | break; |
| 10561 | } |
| 10562 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10563 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 10564 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10565 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10566 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10567 | DO_(input->IncrementRecursionDepth()); |
| 10568 | parse_loop_uninterpreted_option: |
| 10569 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10570 | input, add_uninterpreted_option())); |
| 10571 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10572 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10573 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10574 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 10575 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10576 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10577 | break; |
| 10578 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10579 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10580 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10581 | handle_unusual: |
| 10582 | if (tag == 0 || |
| 10583 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10584 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10585 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10586 | } |
| 10587 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10588 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 10589 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10590 | continue; |
| 10591 | } |
| 10592 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 10593 | input, tag, mutable_unknown_fields())); |
| 10594 | break; |
| 10595 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10596 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10597 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10598 | success: |
| 10599 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10600 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10601 | failure: |
| 10602 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumOptions) |
| 10603 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10604 | #undef DO_ |
| 10605 | } |
| 10606 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10607 | void EnumOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10608 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10609 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions) |
| 10610 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10611 | if (has_allow_alias()) { |
| 10612 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output); |
| 10613 | } |
| 10614 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10615 | // optional bool deprecated = 3 [default = false]; |
| 10616 | if (has_deprecated()) { |
| 10617 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); |
| 10618 | } |
| 10619 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10620 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10621 | 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] | 10622 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10623 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10624 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10625 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10626 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10627 | _extensions_.SerializeWithCachedSizes( |
| 10628 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10629 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10630 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10631 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 10632 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10633 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10634 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10635 | } |
| 10636 | |
| 10637 | ::google::protobuf::uint8* EnumOptions::SerializeWithCachedSizesToArray( |
| 10638 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10639 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) |
| 10640 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10641 | if (has_allow_alias()) { |
| 10642 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target); |
| 10643 | } |
| 10644 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10645 | // optional bool deprecated = 3 [default = false]; |
| 10646 | if (has_deprecated()) { |
| 10647 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); |
| 10648 | } |
| 10649 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10650 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10651 | 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] | 10652 | target = ::google::protobuf::internal::WireFormatLite:: |
| 10653 | WriteMessageNoVirtualToArray( |
| 10654 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10655 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10656 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10657 | // Extension range [1000, 536870912) |
| 10658 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 10659 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10660 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10661 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10662 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 10663 | unknown_fields(), target); |
| 10664 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10665 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10666 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10667 | } |
| 10668 | |
| 10669 | int EnumOptions::ByteSize() const { |
| 10670 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10671 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 10672 | if (_has_bits_[0 / 32] & 3u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10673 | // optional bool allow_alias = 2; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10674 | if (has_allow_alias()) { |
| 10675 | total_size += 1 + 1; |
| 10676 | } |
| 10677 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10678 | // optional bool deprecated = 3 [default = false]; |
| 10679 | if (has_deprecated()) { |
| 10680 | total_size += 1 + 1; |
| 10681 | } |
| 10682 | |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10683 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10684 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 10685 | total_size += 2 * this->uninterpreted_option_size(); |
| 10686 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10687 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10688 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10689 | this->uninterpreted_option(i)); |
| 10690 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10691 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10692 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10693 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10694 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10695 | total_size += |
| 10696 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 10697 | unknown_fields()); |
| 10698 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10699 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10700 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10701 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10702 | return total_size; |
| 10703 | } |
| 10704 | |
| 10705 | void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10706 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10707 | const EnumOptions* source = |
| 10708 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumOptions>( |
| 10709 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10710 | if (source == NULL) { |
| 10711 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 10712 | } else { |
| 10713 | MergeFrom(*source); |
| 10714 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10715 | } |
| 10716 | |
| 10717 | void EnumOptions::MergeFrom(const EnumOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10718 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10719 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10720 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 10721 | if (from.has_allow_alias()) { |
| 10722 | set_allow_alias(from.allow_alias()); |
| 10723 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10724 | if (from.has_deprecated()) { |
| 10725 | set_deprecated(from.deprecated()); |
| 10726 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10727 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10728 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10729 | if (from._internal_metadata_.have_unknown_fields()) { |
| 10730 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 10731 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10732 | } |
| 10733 | |
| 10734 | void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 10735 | if (&from == this) return; |
| 10736 | Clear(); |
| 10737 | MergeFrom(from); |
| 10738 | } |
| 10739 | |
| 10740 | void EnumOptions::CopyFrom(const EnumOptions& from) { |
| 10741 | if (&from == this) return; |
| 10742 | Clear(); |
| 10743 | MergeFrom(from); |
| 10744 | } |
| 10745 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10746 | bool EnumOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10747 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10748 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10749 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 10750 | if (!_extensions_.IsInitialized()) return false; return true; |
| 10751 | } |
| 10752 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10753 | void EnumOptions::Swap(EnumOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10754 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10755 | InternalSwap(other); |
| 10756 | } |
| 10757 | void EnumOptions::InternalSwap(EnumOptions* other) { |
| 10758 | std::swap(allow_alias_, other->allow_alias_); |
| 10759 | std::swap(deprecated_, other->deprecated_); |
| 10760 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 10761 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 10762 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 10763 | std::swap(_cached_size_, other->_cached_size_); |
| 10764 | _extensions_.Swap(&other->_extensions_); |
| 10765 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 10766 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10767 | ::google::protobuf::Metadata EnumOptions::GetMetadata() const { |
| 10768 | protobuf_AssignDescriptorsOnce(); |
| 10769 | ::google::protobuf::Metadata metadata; |
| 10770 | metadata.descriptor = EnumOptions_descriptor_; |
| 10771 | metadata.reflection = EnumOptions_reflection_; |
| 10772 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10773 | } |
| 10774 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10775 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 10776 | // EnumOptions |
| 10777 | |
| 10778 | // optional bool allow_alias = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10779 | bool EnumOptions::has_allow_alias() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10780 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 10781 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10782 | void EnumOptions::set_has_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10783 | _has_bits_[0] |= 0x00000001u; |
| 10784 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10785 | void EnumOptions::clear_has_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10786 | _has_bits_[0] &= ~0x00000001u; |
| 10787 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10788 | void EnumOptions::clear_allow_alias() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10789 | allow_alias_ = false; |
| 10790 | clear_has_allow_alias(); |
| 10791 | } |
| 10792 | bool EnumOptions::allow_alias() const { |
| 10793 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.allow_alias) |
| 10794 | return allow_alias_; |
| 10795 | } |
| 10796 | void EnumOptions::set_allow_alias(bool value) { |
| 10797 | set_has_allow_alias(); |
| 10798 | allow_alias_ = value; |
| 10799 | // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.allow_alias) |
| 10800 | } |
| 10801 | |
| 10802 | // optional bool deprecated = 3 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10803 | bool EnumOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10804 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 10805 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10806 | void EnumOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10807 | _has_bits_[0] |= 0x00000002u; |
| 10808 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10809 | void EnumOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10810 | _has_bits_[0] &= ~0x00000002u; |
| 10811 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10812 | void EnumOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10813 | deprecated_ = false; |
| 10814 | clear_has_deprecated(); |
| 10815 | } |
| 10816 | bool EnumOptions::deprecated() const { |
| 10817 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.deprecated) |
| 10818 | return deprecated_; |
| 10819 | } |
| 10820 | void EnumOptions::set_deprecated(bool value) { |
| 10821 | set_has_deprecated(); |
| 10822 | deprecated_ = value; |
| 10823 | // @@protoc_insertion_point(field_set:google.protobuf.EnumOptions.deprecated) |
| 10824 | } |
| 10825 | |
| 10826 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10827 | int EnumOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10828 | return uninterpreted_option_.size(); |
| 10829 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10830 | void EnumOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10831 | uninterpreted_option_.Clear(); |
| 10832 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10833 | const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10834 | // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option) |
| 10835 | return uninterpreted_option_.Get(index); |
| 10836 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10837 | ::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10838 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option) |
| 10839 | return uninterpreted_option_.Mutable(index); |
| 10840 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10841 | ::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10842 | // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option) |
| 10843 | return uninterpreted_option_.Add(); |
| 10844 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10845 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10846 | EnumOptions::mutable_uninterpreted_option() { |
| 10847 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option) |
| 10848 | return &uninterpreted_option_; |
| 10849 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 10850 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 10851 | EnumOptions::uninterpreted_option() const { |
| 10852 | // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option) |
| 10853 | return uninterpreted_option_; |
| 10854 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 10855 | |
| 10856 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10857 | |
| 10858 | // =================================================================== |
| 10859 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 10860 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10861 | const int EnumValueOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 10862 | const int EnumValueOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 10863 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10864 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10865 | EnumValueOptions::EnumValueOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10866 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10867 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10868 | // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10869 | } |
| 10870 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10871 | void EnumValueOptions::InitAsDefaultInstance() { |
| 10872 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10873 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 10874 | EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10875 | : ::google::protobuf::Message(), |
| 10876 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10877 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10878 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10879 | // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10880 | } |
| 10881 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10882 | void EnumValueOptions::SharedCtor() { |
| 10883 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10884 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10885 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 10886 | } |
| 10887 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10888 | EnumValueOptions::~EnumValueOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10889 | // @@protoc_insertion_point(destructor:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10890 | SharedDtor(); |
| 10891 | } |
| 10892 | |
| 10893 | void EnumValueOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10894 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10895 | } |
| 10896 | } |
| 10897 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10898 | void EnumValueOptions::SetCachedSize(int size) const { |
| 10899 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 10900 | _cached_size_ = size; |
| 10901 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 10902 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10903 | const ::google::protobuf::Descriptor* EnumValueOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10904 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10905 | return EnumValueOptions_descriptor_; |
| 10906 | } |
| 10907 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10908 | const EnumValueOptions& EnumValueOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 10909 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 10910 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10911 | } |
| 10912 | |
| 10913 | EnumValueOptions* EnumValueOptions::default_instance_ = NULL; |
| 10914 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10915 | EnumValueOptions* EnumValueOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 10916 | EnumValueOptions* n = new EnumValueOptions; |
| 10917 | if (arena != NULL) { |
| 10918 | arena->Own(n); |
| 10919 | } |
| 10920 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10921 | } |
| 10922 | |
| 10923 | void EnumValueOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10924 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10925 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10926 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10927 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 10928 | if (_internal_metadata_.have_unknown_fields()) { |
| 10929 | mutable_unknown_fields()->Clear(); |
| 10930 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10931 | } |
| 10932 | |
| 10933 | bool EnumValueOptions::MergePartialFromCodedStream( |
| 10934 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10935 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10936 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10937 | // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions) |
| 10938 | for (;;) { |
| 10939 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 10940 | tag = p.first; |
| 10941 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10942 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10943 | // optional bool deprecated = 1 [default = false]; |
| 10944 | case 1: { |
| 10945 | if (tag == 8) { |
| 10946 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 10947 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 10948 | input, &deprecated_))); |
| 10949 | set_has_deprecated(); |
| 10950 | } else { |
| 10951 | goto handle_unusual; |
| 10952 | } |
| 10953 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 10954 | break; |
| 10955 | } |
| 10956 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10957 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 10958 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10959 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10960 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10961 | DO_(input->IncrementRecursionDepth()); |
| 10962 | parse_loop_uninterpreted_option: |
| 10963 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 10964 | input, add_uninterpreted_option())); |
| 10965 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10966 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10967 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 10968 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 10969 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10970 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10971 | break; |
| 10972 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 10973 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10974 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10975 | handle_unusual: |
| 10976 | if (tag == 0 || |
| 10977 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 10978 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10979 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10980 | } |
| 10981 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 10982 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 10983 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 10984 | continue; |
| 10985 | } |
| 10986 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 10987 | input, tag, mutable_unknown_fields())); |
| 10988 | break; |
| 10989 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10990 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10991 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10992 | success: |
| 10993 | // @@protoc_insertion_point(parse_success:google.protobuf.EnumValueOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10994 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 10995 | failure: |
| 10996 | // @@protoc_insertion_point(parse_failure:google.protobuf.EnumValueOptions) |
| 10997 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 10998 | #undef DO_ |
| 10999 | } |
| 11000 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11001 | void EnumValueOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11002 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11003 | // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions) |
| 11004 | // optional bool deprecated = 1 [default = false]; |
| 11005 | if (has_deprecated()) { |
| 11006 | ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output); |
| 11007 | } |
| 11008 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11009 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11010 | 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] | 11011 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11012 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11013 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11014 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11015 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11016 | _extensions_.SerializeWithCachedSizes( |
| 11017 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11018 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11019 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11020 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11021 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11022 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11023 | // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11024 | } |
| 11025 | |
| 11026 | ::google::protobuf::uint8* EnumValueOptions::SerializeWithCachedSizesToArray( |
| 11027 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11028 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) |
| 11029 | // optional bool deprecated = 1 [default = false]; |
| 11030 | if (has_deprecated()) { |
| 11031 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target); |
| 11032 | } |
| 11033 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11034 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11035 | 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] | 11036 | target = ::google::protobuf::internal::WireFormatLite:: |
| 11037 | WriteMessageNoVirtualToArray( |
| 11038 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11039 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11040 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11041 | // Extension range [1000, 536870912) |
| 11042 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 11043 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11044 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11045 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11046 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11047 | unknown_fields(), target); |
| 11048 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11049 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11050 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11051 | } |
| 11052 | |
| 11053 | int EnumValueOptions::ByteSize() const { |
| 11054 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11055 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11056 | // optional bool deprecated = 1 [default = false]; |
| 11057 | if (has_deprecated()) { |
| 11058 | total_size += 1 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11059 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11060 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11061 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 11062 | total_size += 2 * this->uninterpreted_option_size(); |
| 11063 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11064 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11065 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11066 | this->uninterpreted_option(i)); |
| 11067 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11068 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11069 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11070 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11071 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11072 | total_size += |
| 11073 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 11074 | unknown_fields()); |
| 11075 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11076 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11077 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11078 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11079 | return total_size; |
| 11080 | } |
| 11081 | |
| 11082 | void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11083 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11084 | const EnumValueOptions* source = |
| 11085 | ::google::protobuf::internal::DynamicCastToGenerated<const EnumValueOptions>( |
| 11086 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11087 | if (source == NULL) { |
| 11088 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 11089 | } else { |
| 11090 | MergeFrom(*source); |
| 11091 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11092 | } |
| 11093 | |
| 11094 | void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11095 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11096 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11097 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 11098 | if (from.has_deprecated()) { |
| 11099 | set_deprecated(from.deprecated()); |
| 11100 | } |
| 11101 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11102 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11103 | if (from._internal_metadata_.have_unknown_fields()) { |
| 11104 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 11105 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11106 | } |
| 11107 | |
| 11108 | void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11109 | if (&from == this) return; |
| 11110 | Clear(); |
| 11111 | MergeFrom(from); |
| 11112 | } |
| 11113 | |
| 11114 | void EnumValueOptions::CopyFrom(const EnumValueOptions& from) { |
| 11115 | if (&from == this) return; |
| 11116 | Clear(); |
| 11117 | MergeFrom(from); |
| 11118 | } |
| 11119 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11120 | bool EnumValueOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11121 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11122 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11123 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11124 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11125 | } |
| 11126 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11127 | void EnumValueOptions::Swap(EnumValueOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11128 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11129 | InternalSwap(other); |
| 11130 | } |
| 11131 | void EnumValueOptions::InternalSwap(EnumValueOptions* other) { |
| 11132 | std::swap(deprecated_, other->deprecated_); |
| 11133 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11134 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11135 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11136 | std::swap(_cached_size_, other->_cached_size_); |
| 11137 | _extensions_.Swap(&other->_extensions_); |
| 11138 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11139 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11140 | ::google::protobuf::Metadata EnumValueOptions::GetMetadata() const { |
| 11141 | protobuf_AssignDescriptorsOnce(); |
| 11142 | ::google::protobuf::Metadata metadata; |
| 11143 | metadata.descriptor = EnumValueOptions_descriptor_; |
| 11144 | metadata.reflection = EnumValueOptions_reflection_; |
| 11145 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11146 | } |
| 11147 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11148 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11149 | // EnumValueOptions |
| 11150 | |
| 11151 | // optional bool deprecated = 1 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11152 | bool EnumValueOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11153 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11154 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11155 | void EnumValueOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11156 | _has_bits_[0] |= 0x00000001u; |
| 11157 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11158 | void EnumValueOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11159 | _has_bits_[0] &= ~0x00000001u; |
| 11160 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11161 | void EnumValueOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11162 | deprecated_ = false; |
| 11163 | clear_has_deprecated(); |
| 11164 | } |
| 11165 | bool EnumValueOptions::deprecated() const { |
| 11166 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.deprecated) |
| 11167 | return deprecated_; |
| 11168 | } |
| 11169 | void EnumValueOptions::set_deprecated(bool value) { |
| 11170 | set_has_deprecated(); |
| 11171 | deprecated_ = value; |
| 11172 | // @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.deprecated) |
| 11173 | } |
| 11174 | |
| 11175 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11176 | int EnumValueOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11177 | return uninterpreted_option_.size(); |
| 11178 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11179 | void EnumValueOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11180 | uninterpreted_option_.Clear(); |
| 11181 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11182 | const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11183 | // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11184 | return uninterpreted_option_.Get(index); |
| 11185 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11186 | ::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11187 | // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11188 | return uninterpreted_option_.Mutable(index); |
| 11189 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11190 | ::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11191 | // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11192 | return uninterpreted_option_.Add(); |
| 11193 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11194 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11195 | EnumValueOptions::mutable_uninterpreted_option() { |
| 11196 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11197 | return &uninterpreted_option_; |
| 11198 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11199 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11200 | EnumValueOptions::uninterpreted_option() const { |
| 11201 | // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option) |
| 11202 | return uninterpreted_option_; |
| 11203 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11204 | |
| 11205 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11206 | |
| 11207 | // =================================================================== |
| 11208 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11209 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11210 | const int ServiceOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11211 | const int ServiceOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11212 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11213 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11214 | ServiceOptions::ServiceOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11215 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11216 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11217 | // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11218 | } |
| 11219 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11220 | void ServiceOptions::InitAsDefaultInstance() { |
| 11221 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11222 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11223 | ServiceOptions::ServiceOptions(const ServiceOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11224 | : ::google::protobuf::Message(), |
| 11225 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11226 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11227 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11228 | // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11229 | } |
| 11230 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11231 | void ServiceOptions::SharedCtor() { |
| 11232 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11233 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11234 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11235 | } |
| 11236 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11237 | ServiceOptions::~ServiceOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11238 | // @@protoc_insertion_point(destructor:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11239 | SharedDtor(); |
| 11240 | } |
| 11241 | |
| 11242 | void ServiceOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11243 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11244 | } |
| 11245 | } |
| 11246 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11247 | void ServiceOptions::SetCachedSize(int size) const { |
| 11248 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11249 | _cached_size_ = size; |
| 11250 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11251 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11252 | const ::google::protobuf::Descriptor* ServiceOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11253 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11254 | return ServiceOptions_descriptor_; |
| 11255 | } |
| 11256 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11257 | const ServiceOptions& ServiceOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11258 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11259 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11260 | } |
| 11261 | |
| 11262 | ServiceOptions* ServiceOptions::default_instance_ = NULL; |
| 11263 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11264 | ServiceOptions* ServiceOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11265 | ServiceOptions* n = new ServiceOptions; |
| 11266 | if (arena != NULL) { |
| 11267 | arena->Own(n); |
| 11268 | } |
| 11269 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11270 | } |
| 11271 | |
| 11272 | void ServiceOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11273 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11274 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11275 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11276 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11277 | if (_internal_metadata_.have_unknown_fields()) { |
| 11278 | mutable_unknown_fields()->Clear(); |
| 11279 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11280 | } |
| 11281 | |
| 11282 | bool ServiceOptions::MergePartialFromCodedStream( |
| 11283 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11284 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11285 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11286 | // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions) |
| 11287 | for (;;) { |
| 11288 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 11289 | tag = p.first; |
| 11290 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11291 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11292 | // optional bool deprecated = 33 [default = false]; |
| 11293 | case 33: { |
| 11294 | if (tag == 264) { |
| 11295 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 11296 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 11297 | input, &deprecated_))); |
| 11298 | set_has_deprecated(); |
| 11299 | } else { |
| 11300 | goto handle_unusual; |
| 11301 | } |
| 11302 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 11303 | break; |
| 11304 | } |
| 11305 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11306 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 11307 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11308 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11309 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11310 | DO_(input->IncrementRecursionDepth()); |
| 11311 | parse_loop_uninterpreted_option: |
| 11312 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11313 | input, add_uninterpreted_option())); |
| 11314 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11315 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11316 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11317 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 11318 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11319 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11320 | break; |
| 11321 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11322 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11323 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11324 | handle_unusual: |
| 11325 | if (tag == 0 || |
| 11326 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11327 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11328 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11329 | } |
| 11330 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11331 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 11332 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11333 | continue; |
| 11334 | } |
| 11335 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 11336 | input, tag, mutable_unknown_fields())); |
| 11337 | break; |
| 11338 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11339 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11340 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11341 | success: |
| 11342 | // @@protoc_insertion_point(parse_success:google.protobuf.ServiceOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11343 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11344 | failure: |
| 11345 | // @@protoc_insertion_point(parse_failure:google.protobuf.ServiceOptions) |
| 11346 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11347 | #undef DO_ |
| 11348 | } |
| 11349 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11350 | void ServiceOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11351 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11352 | // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions) |
| 11353 | // optional bool deprecated = 33 [default = false]; |
| 11354 | if (has_deprecated()) { |
| 11355 | ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); |
| 11356 | } |
| 11357 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11358 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11359 | 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] | 11360 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11361 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11362 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11363 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11364 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11365 | _extensions_.SerializeWithCachedSizes( |
| 11366 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11367 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11368 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11369 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11370 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11371 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11372 | // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11373 | } |
| 11374 | |
| 11375 | ::google::protobuf::uint8* ServiceOptions::SerializeWithCachedSizesToArray( |
| 11376 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11377 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) |
| 11378 | // optional bool deprecated = 33 [default = false]; |
| 11379 | if (has_deprecated()) { |
| 11380 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); |
| 11381 | } |
| 11382 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11383 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11384 | 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] | 11385 | target = ::google::protobuf::internal::WireFormatLite:: |
| 11386 | WriteMessageNoVirtualToArray( |
| 11387 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11388 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11389 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11390 | // Extension range [1000, 536870912) |
| 11391 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 11392 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11393 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11394 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11395 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11396 | unknown_fields(), target); |
| 11397 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11398 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11399 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11400 | } |
| 11401 | |
| 11402 | int ServiceOptions::ByteSize() const { |
| 11403 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11404 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11405 | // optional bool deprecated = 33 [default = false]; |
| 11406 | if (has_deprecated()) { |
| 11407 | total_size += 2 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11408 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11409 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11410 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 11411 | total_size += 2 * this->uninterpreted_option_size(); |
| 11412 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11413 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11414 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11415 | this->uninterpreted_option(i)); |
| 11416 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11417 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11418 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11419 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11420 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11421 | total_size += |
| 11422 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 11423 | unknown_fields()); |
| 11424 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11425 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11426 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11427 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11428 | return total_size; |
| 11429 | } |
| 11430 | |
| 11431 | void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11432 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11433 | const ServiceOptions* source = |
| 11434 | ::google::protobuf::internal::DynamicCastToGenerated<const ServiceOptions>( |
| 11435 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11436 | if (source == NULL) { |
| 11437 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 11438 | } else { |
| 11439 | MergeFrom(*source); |
| 11440 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11441 | } |
| 11442 | |
| 11443 | void ServiceOptions::MergeFrom(const ServiceOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11444 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11445 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11446 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 11447 | if (from.has_deprecated()) { |
| 11448 | set_deprecated(from.deprecated()); |
| 11449 | } |
| 11450 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11451 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11452 | if (from._internal_metadata_.have_unknown_fields()) { |
| 11453 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 11454 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11455 | } |
| 11456 | |
| 11457 | void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11458 | if (&from == this) return; |
| 11459 | Clear(); |
| 11460 | MergeFrom(from); |
| 11461 | } |
| 11462 | |
| 11463 | void ServiceOptions::CopyFrom(const ServiceOptions& from) { |
| 11464 | if (&from == this) return; |
| 11465 | Clear(); |
| 11466 | MergeFrom(from); |
| 11467 | } |
| 11468 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11469 | bool ServiceOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11470 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11471 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11472 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11473 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11474 | } |
| 11475 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11476 | void ServiceOptions::Swap(ServiceOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11477 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11478 | InternalSwap(other); |
| 11479 | } |
| 11480 | void ServiceOptions::InternalSwap(ServiceOptions* other) { |
| 11481 | std::swap(deprecated_, other->deprecated_); |
| 11482 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11483 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11484 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11485 | std::swap(_cached_size_, other->_cached_size_); |
| 11486 | _extensions_.Swap(&other->_extensions_); |
| 11487 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11488 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11489 | ::google::protobuf::Metadata ServiceOptions::GetMetadata() const { |
| 11490 | protobuf_AssignDescriptorsOnce(); |
| 11491 | ::google::protobuf::Metadata metadata; |
| 11492 | metadata.descriptor = ServiceOptions_descriptor_; |
| 11493 | metadata.reflection = ServiceOptions_reflection_; |
| 11494 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11495 | } |
| 11496 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11497 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11498 | // ServiceOptions |
| 11499 | |
| 11500 | // optional bool deprecated = 33 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11501 | bool ServiceOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11502 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11503 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11504 | void ServiceOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11505 | _has_bits_[0] |= 0x00000001u; |
| 11506 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11507 | void ServiceOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11508 | _has_bits_[0] &= ~0x00000001u; |
| 11509 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11510 | void ServiceOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11511 | deprecated_ = false; |
| 11512 | clear_has_deprecated(); |
| 11513 | } |
| 11514 | bool ServiceOptions::deprecated() const { |
| 11515 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.deprecated) |
| 11516 | return deprecated_; |
| 11517 | } |
| 11518 | void ServiceOptions::set_deprecated(bool value) { |
| 11519 | set_has_deprecated(); |
| 11520 | deprecated_ = value; |
| 11521 | // @@protoc_insertion_point(field_set:google.protobuf.ServiceOptions.deprecated) |
| 11522 | } |
| 11523 | |
| 11524 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11525 | int ServiceOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11526 | return uninterpreted_option_.size(); |
| 11527 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11528 | void ServiceOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11529 | uninterpreted_option_.Clear(); |
| 11530 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11531 | const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11532 | // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11533 | return uninterpreted_option_.Get(index); |
| 11534 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11535 | ::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11536 | // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11537 | return uninterpreted_option_.Mutable(index); |
| 11538 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11539 | ::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11540 | // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11541 | return uninterpreted_option_.Add(); |
| 11542 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11543 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11544 | ServiceOptions::mutable_uninterpreted_option() { |
| 11545 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11546 | return &uninterpreted_option_; |
| 11547 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11548 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11549 | ServiceOptions::uninterpreted_option() const { |
| 11550 | // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option) |
| 11551 | return uninterpreted_option_; |
| 11552 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11553 | |
| 11554 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11555 | |
| 11556 | // =================================================================== |
| 11557 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11558 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11559 | const int MethodOptions::kDeprecatedFieldNumber; |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11560 | const int MethodOptions::kUninterpretedOptionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11561 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11562 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11563 | MethodOptions::MethodOptions() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11564 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11565 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11566 | // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11567 | } |
| 11568 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11569 | void MethodOptions::InitAsDefaultInstance() { |
| 11570 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11571 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11572 | MethodOptions::MethodOptions(const MethodOptions& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11573 | : ::google::protobuf::Message(), |
| 11574 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11575 | SharedCtor(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11576 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11577 | // @@protoc_insertion_point(copy_constructor:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11578 | } |
| 11579 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11580 | void MethodOptions::SharedCtor() { |
| 11581 | _cached_size_ = 0; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11582 | deprecated_ = false; |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11583 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11584 | } |
| 11585 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11586 | MethodOptions::~MethodOptions() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11587 | // @@protoc_insertion_point(destructor:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11588 | SharedDtor(); |
| 11589 | } |
| 11590 | |
| 11591 | void MethodOptions::SharedDtor() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11592 | if (this != default_instance_) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11593 | } |
| 11594 | } |
| 11595 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11596 | void MethodOptions::SetCachedSize(int size) const { |
| 11597 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11598 | _cached_size_ = size; |
| 11599 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11600 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11601 | const ::google::protobuf::Descriptor* MethodOptions::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11602 | protobuf_AssignDescriptorsOnce(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11603 | return MethodOptions_descriptor_; |
| 11604 | } |
| 11605 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11606 | const MethodOptions& MethodOptions::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11607 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11608 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11609 | } |
| 11610 | |
| 11611 | MethodOptions* MethodOptions::default_instance_ = NULL; |
| 11612 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11613 | MethodOptions* MethodOptions::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11614 | MethodOptions* n = new MethodOptions; |
| 11615 | if (arena != NULL) { |
| 11616 | arena->Own(n); |
| 11617 | } |
| 11618 | return n; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11619 | } |
| 11620 | |
| 11621 | void MethodOptions::Clear() { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11622 | _extensions_.Clear(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11623 | deprecated_ = false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11624 | uninterpreted_option_.Clear(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11625 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11626 | if (_internal_metadata_.have_unknown_fields()) { |
| 11627 | mutable_unknown_fields()->Clear(); |
| 11628 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11629 | } |
| 11630 | |
| 11631 | bool MethodOptions::MergePartialFromCodedStream( |
| 11632 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11633 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11634 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11635 | // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions) |
| 11636 | for (;;) { |
| 11637 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| 11638 | tag = p.first; |
| 11639 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11640 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11641 | // optional bool deprecated = 33 [default = false]; |
| 11642 | case 33: { |
| 11643 | if (tag == 264) { |
| 11644 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 11645 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 11646 | input, &deprecated_))); |
| 11647 | set_has_deprecated(); |
| 11648 | } else { |
| 11649 | goto handle_unusual; |
| 11650 | } |
| 11651 | if (input->ExpectTag(7994)) goto parse_uninterpreted_option; |
| 11652 | break; |
| 11653 | } |
| 11654 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11655 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
| 11656 | case 999: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11657 | if (tag == 7994) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11658 | parse_uninterpreted_option: |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11659 | DO_(input->IncrementRecursionDepth()); |
| 11660 | parse_loop_uninterpreted_option: |
| 11661 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11662 | input, add_uninterpreted_option())); |
| 11663 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11664 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11665 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11666 | if (input->ExpectTag(7994)) goto parse_loop_uninterpreted_option; |
| 11667 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11668 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11669 | break; |
| 11670 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11671 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11672 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11673 | handle_unusual: |
| 11674 | if (tag == 0 || |
| 11675 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11676 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11677 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11678 | } |
| 11679 | if ((8000u <= tag)) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11680 | DO_(_extensions_.ParseField(tag, input, default_instance_, |
| 11681 | mutable_unknown_fields())); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11682 | continue; |
| 11683 | } |
| 11684 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 11685 | input, tag, mutable_unknown_fields())); |
| 11686 | break; |
| 11687 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11688 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11689 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11690 | success: |
| 11691 | // @@protoc_insertion_point(parse_success:google.protobuf.MethodOptions) |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11692 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11693 | failure: |
| 11694 | // @@protoc_insertion_point(parse_failure:google.protobuf.MethodOptions) |
| 11695 | return false; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11696 | #undef DO_ |
| 11697 | } |
| 11698 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11699 | void MethodOptions::SerializeWithCachedSizes( |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11700 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11701 | // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions) |
| 11702 | // optional bool deprecated = 33 [default = false]; |
| 11703 | if (has_deprecated()) { |
| 11704 | ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); |
| 11705 | } |
| 11706 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11707 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11708 | 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] | 11709 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11710 | 999, this->uninterpreted_option(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11711 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11712 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11713 | // Extension range [1000, 536870912) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11714 | _extensions_.SerializeWithCachedSizes( |
| 11715 | 1000, 536870912, output); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11716 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11717 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11718 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 11719 | unknown_fields(), output); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11720 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11721 | // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11722 | } |
| 11723 | |
| 11724 | ::google::protobuf::uint8* MethodOptions::SerializeWithCachedSizesToArray( |
| 11725 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11726 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) |
| 11727 | // optional bool deprecated = 33 [default = false]; |
| 11728 | if (has_deprecated()) { |
| 11729 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); |
| 11730 | } |
| 11731 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11732 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11733 | 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] | 11734 | target = ::google::protobuf::internal::WireFormatLite:: |
| 11735 | WriteMessageNoVirtualToArray( |
| 11736 | 999, this->uninterpreted_option(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11737 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11738 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11739 | // Extension range [1000, 536870912) |
| 11740 | target = _extensions_.SerializeWithCachedSizesToArray( |
| 11741 | 1000, 536870912, target); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11742 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11743 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11744 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 11745 | unknown_fields(), target); |
| 11746 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11747 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11748 | return target; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11749 | } |
| 11750 | |
| 11751 | int MethodOptions::ByteSize() const { |
| 11752 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11753 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11754 | // optional bool deprecated = 33 [default = false]; |
| 11755 | if (has_deprecated()) { |
| 11756 | total_size += 2 + 1; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11757 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11758 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11759 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 11760 | total_size += 2 * this->uninterpreted_option_size(); |
| 11761 | for (int i = 0; i < this->uninterpreted_option_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11762 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11763 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11764 | this->uninterpreted_option(i)); |
| 11765 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11766 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11767 | total_size += _extensions_.ByteSize(); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11768 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11769 | if (_internal_metadata_.have_unknown_fields()) { |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11770 | total_size += |
| 11771 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 11772 | unknown_fields()); |
| 11773 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11774 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11775 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11776 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11777 | return total_size; |
| 11778 | } |
| 11779 | |
| 11780 | void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11781 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11782 | const MethodOptions* source = |
| 11783 | ::google::protobuf::internal::DynamicCastToGenerated<const MethodOptions>( |
| 11784 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11785 | if (source == NULL) { |
| 11786 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 11787 | } else { |
| 11788 | MergeFrom(*source); |
| 11789 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11790 | } |
| 11791 | |
| 11792 | void MethodOptions::MergeFrom(const MethodOptions& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11793 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11794 | uninterpreted_option_.MergeFrom(from.uninterpreted_option_); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11795 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| 11796 | if (from.has_deprecated()) { |
| 11797 | set_deprecated(from.deprecated()); |
| 11798 | } |
| 11799 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11800 | _extensions_.MergeFrom(from._extensions_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11801 | if (from._internal_metadata_.have_unknown_fields()) { |
| 11802 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 11803 | } |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11804 | } |
| 11805 | |
| 11806 | void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) { |
| 11807 | if (&from == this) return; |
| 11808 | Clear(); |
| 11809 | MergeFrom(from); |
| 11810 | } |
| 11811 | |
| 11812 | void MethodOptions::CopyFrom(const MethodOptions& from) { |
| 11813 | if (&from == this) return; |
| 11814 | Clear(); |
| 11815 | MergeFrom(from); |
| 11816 | } |
| 11817 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11818 | bool MethodOptions::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11819 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11820 | if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 11821 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 11822 | if (!_extensions_.IsInitialized()) return false; return true; |
| 11823 | } |
| 11824 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11825 | void MethodOptions::Swap(MethodOptions* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11826 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11827 | InternalSwap(other); |
| 11828 | } |
| 11829 | void MethodOptions::InternalSwap(MethodOptions* other) { |
| 11830 | std::swap(deprecated_, other->deprecated_); |
| 11831 | uninterpreted_option_.UnsafeArenaSwap(&other->uninterpreted_option_); |
| 11832 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 11833 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 11834 | std::swap(_cached_size_, other->_cached_size_); |
| 11835 | _extensions_.Swap(&other->_extensions_); |
| 11836 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 11837 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11838 | ::google::protobuf::Metadata MethodOptions::GetMetadata() const { |
| 11839 | protobuf_AssignDescriptorsOnce(); |
| 11840 | ::google::protobuf::Metadata metadata; |
| 11841 | metadata.descriptor = MethodOptions_descriptor_; |
| 11842 | metadata.reflection = MethodOptions_reflection_; |
| 11843 | return metadata; |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11844 | } |
| 11845 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11846 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 11847 | // MethodOptions |
| 11848 | |
| 11849 | // optional bool deprecated = 33 [default = false]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11850 | bool MethodOptions::has_deprecated() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11851 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 11852 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11853 | void MethodOptions::set_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11854 | _has_bits_[0] |= 0x00000001u; |
| 11855 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11856 | void MethodOptions::clear_has_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11857 | _has_bits_[0] &= ~0x00000001u; |
| 11858 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11859 | void MethodOptions::clear_deprecated() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11860 | deprecated_ = false; |
| 11861 | clear_has_deprecated(); |
| 11862 | } |
| 11863 | bool MethodOptions::deprecated() const { |
| 11864 | // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.deprecated) |
| 11865 | return deprecated_; |
| 11866 | } |
| 11867 | void MethodOptions::set_deprecated(bool value) { |
| 11868 | set_has_deprecated(); |
| 11869 | deprecated_ = value; |
| 11870 | // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.deprecated) |
| 11871 | } |
| 11872 | |
| 11873 | // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11874 | int MethodOptions::uninterpreted_option_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11875 | return uninterpreted_option_.size(); |
| 11876 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11877 | void MethodOptions::clear_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11878 | uninterpreted_option_.Clear(); |
| 11879 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11880 | const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11881 | // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option) |
| 11882 | return uninterpreted_option_.Get(index); |
| 11883 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11884 | ::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11885 | // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option) |
| 11886 | return uninterpreted_option_.Mutable(index); |
| 11887 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11888 | ::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11889 | // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option) |
| 11890 | return uninterpreted_option_.Add(); |
| 11891 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11892 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11893 | MethodOptions::mutable_uninterpreted_option() { |
| 11894 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option) |
| 11895 | return &uninterpreted_option_; |
| 11896 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 11897 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& |
| 11898 | MethodOptions::uninterpreted_option() const { |
| 11899 | // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option) |
| 11900 | return uninterpreted_option_; |
| 11901 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 11902 | |
| 11903 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 11904 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11905 | // =================================================================== |
| 11906 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11907 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 11908 | const int UninterpretedOption_NamePart::kNamePartFieldNumber; |
| 11909 | const int UninterpretedOption_NamePart::kIsExtensionFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 11910 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11911 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11912 | UninterpretedOption_NamePart::UninterpretedOption_NamePart() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 11913 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11914 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11915 | // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11916 | } |
| 11917 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11918 | void UninterpretedOption_NamePart::InitAsDefaultInstance() { |
| 11919 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11920 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 11921 | UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11922 | : ::google::protobuf::Message(), |
| 11923 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11924 | SharedCtor(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11925 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11926 | // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11927 | } |
| 11928 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11929 | void UninterpretedOption_NamePart::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11930 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11931 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11932 | name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11933 | is_extension_ = false; |
| 11934 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 11935 | } |
| 11936 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11937 | UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11938 | // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11939 | SharedDtor(); |
| 11940 | } |
| 11941 | |
| 11942 | void UninterpretedOption_NamePart::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11943 | name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11944 | if (this != default_instance_) { |
| 11945 | } |
| 11946 | } |
| 11947 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11948 | void UninterpretedOption_NamePart::SetCachedSize(int size) const { |
| 11949 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 11950 | _cached_size_ = size; |
| 11951 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 11952 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11953 | const ::google::protobuf::Descriptor* UninterpretedOption_NamePart::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 11954 | protobuf_AssignDescriptorsOnce(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11955 | return UninterpretedOption_NamePart_descriptor_; |
| 11956 | } |
| 11957 | |
| 11958 | const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 11959 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 11960 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11961 | } |
| 11962 | |
| 11963 | UninterpretedOption_NamePart* UninterpretedOption_NamePart::default_instance_ = NULL; |
| 11964 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11965 | UninterpretedOption_NamePart* UninterpretedOption_NamePart::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11966 | UninterpretedOption_NamePart* n = new UninterpretedOption_NamePart; |
| 11967 | if (arena != NULL) { |
| 11968 | arena->Own(n); |
| 11969 | } |
| 11970 | return n; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11971 | } |
| 11972 | |
| 11973 | void UninterpretedOption_NamePart::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 11974 | if (_has_bits_[0 / 32] & 3u) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 11975 | if (has_name_part()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 11976 | name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11977 | } |
| 11978 | is_extension_ = false; |
| 11979 | } |
| 11980 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 11981 | if (_internal_metadata_.have_unknown_fields()) { |
| 11982 | mutable_unknown_fields()->Clear(); |
| 11983 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11984 | } |
| 11985 | |
| 11986 | bool UninterpretedOption_NamePart::MergePartialFromCodedStream( |
| 11987 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11988 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11989 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11990 | // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart) |
| 11991 | for (;;) { |
| 11992 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 11993 | tag = p.first; |
| 11994 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 11995 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 11996 | // required string name_part = 1; |
| 11997 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 11998 | if (tag == 10) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 11999 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 12000 | input, this->mutable_name_part())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12001 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12002 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12003 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12004 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12005 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12006 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12007 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12008 | if (input->ExpectTag(16)) goto parse_is_extension; |
| 12009 | break; |
| 12010 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12011 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12012 | // required bool is_extension = 2; |
| 12013 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12014 | if (tag == 16) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12015 | parse_is_extension: |
| 12016 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12017 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 12018 | input, &is_extension_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12019 | set_has_is_extension(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12020 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12021 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12022 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12023 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12024 | break; |
| 12025 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12026 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12027 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12028 | handle_unusual: |
| 12029 | if (tag == 0 || |
| 12030 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12031 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12032 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12033 | } |
| 12034 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 12035 | input, tag, mutable_unknown_fields())); |
| 12036 | break; |
| 12037 | } |
| 12038 | } |
| 12039 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12040 | success: |
| 12041 | // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12042 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12043 | failure: |
| 12044 | // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption.NamePart) |
| 12045 | return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12046 | #undef DO_ |
| 12047 | } |
| 12048 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12049 | void UninterpretedOption_NamePart::SerializeWithCachedSizes( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12050 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12051 | // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12052 | // required string name_part = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12053 | if (has_name_part()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12054 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12055 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12056 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12057 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12058 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12059 | 1, this->name_part(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12060 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12061 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12062 | // required bool is_extension = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12063 | if (has_is_extension()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12064 | ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12065 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12066 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12067 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12068 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 12069 | unknown_fields(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12070 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12071 | // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12072 | } |
| 12073 | |
| 12074 | ::google::protobuf::uint8* UninterpretedOption_NamePart::SerializeWithCachedSizesToArray( |
| 12075 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12076 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12077 | // required string name_part = 1; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12078 | if (has_name_part()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12079 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12080 | this->name_part().data(), this->name_part().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12081 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12082 | "google.protobuf.UninterpretedOption.NamePart.name_part"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12083 | target = |
| 12084 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 12085 | 1, this->name_part(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12086 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12087 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12088 | // required bool is_extension = 2; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12089 | if (has_is_extension()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12090 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12091 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12092 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12093 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12094 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 12095 | unknown_fields(), target); |
| 12096 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12097 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12098 | return target; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12099 | } |
| 12100 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12101 | int UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const { |
| 12102 | int total_size = 0; |
| 12103 | |
| 12104 | if (has_name_part()) { |
| 12105 | // required string name_part = 1; |
| 12106 | total_size += 1 + |
| 12107 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12108 | this->name_part()); |
| 12109 | } |
| 12110 | |
| 12111 | if (has_is_extension()) { |
| 12112 | // required bool is_extension = 2; |
| 12113 | total_size += 1 + 1; |
| 12114 | } |
| 12115 | |
| 12116 | return total_size; |
| 12117 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12118 | int UninterpretedOption_NamePart::ByteSize() const { |
| 12119 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12120 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12121 | 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] | 12122 | // required string name_part = 1; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12123 | total_size += 1 + |
| 12124 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12125 | this->name_part()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12126 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12127 | // required bool is_extension = 2; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12128 | total_size += 1 + 1; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12129 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12130 | } else { |
| 12131 | total_size += RequiredFieldsByteSizeFallback(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12132 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12133 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12134 | total_size += |
| 12135 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 12136 | unknown_fields()); |
| 12137 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12138 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12139 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12140 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12141 | return total_size; |
| 12142 | } |
| 12143 | |
| 12144 | void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12145 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12146 | const UninterpretedOption_NamePart* source = |
| 12147 | ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption_NamePart>( |
| 12148 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12149 | if (source == NULL) { |
| 12150 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 12151 | } else { |
| 12152 | MergeFrom(*source); |
| 12153 | } |
| 12154 | } |
| 12155 | |
| 12156 | void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12157 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12158 | if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12159 | if (from.has_name_part()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12160 | set_has_name_part(); |
| 12161 | name_part_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12162 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12163 | if (from.has_is_extension()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12164 | set_is_extension(from.is_extension()); |
| 12165 | } |
| 12166 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12167 | if (from._internal_metadata_.have_unknown_fields()) { |
| 12168 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 12169 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12170 | } |
| 12171 | |
| 12172 | void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) { |
| 12173 | if (&from == this) return; |
| 12174 | Clear(); |
| 12175 | MergeFrom(from); |
| 12176 | } |
| 12177 | |
| 12178 | void UninterpretedOption_NamePart::CopyFrom(const UninterpretedOption_NamePart& from) { |
| 12179 | if (&from == this) return; |
| 12180 | Clear(); |
| 12181 | MergeFrom(from); |
| 12182 | } |
| 12183 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12184 | bool UninterpretedOption_NamePart::IsInitialized() const { |
| 12185 | if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12186 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12187 | return true; |
| 12188 | } |
| 12189 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12190 | void UninterpretedOption_NamePart::Swap(UninterpretedOption_NamePart* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12191 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12192 | InternalSwap(other); |
| 12193 | } |
| 12194 | void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* other) { |
| 12195 | name_part_.Swap(&other->name_part_); |
| 12196 | std::swap(is_extension_, other->is_extension_); |
| 12197 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 12198 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 12199 | std::swap(_cached_size_, other->_cached_size_); |
| 12200 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12201 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12202 | ::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const { |
| 12203 | protobuf_AssignDescriptorsOnce(); |
| 12204 | ::google::protobuf::Metadata metadata; |
| 12205 | metadata.descriptor = UninterpretedOption_NamePart_descriptor_; |
| 12206 | metadata.reflection = UninterpretedOption_NamePart_reflection_; |
| 12207 | return metadata; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12208 | } |
| 12209 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12210 | |
| 12211 | // ------------------------------------------------------------------- |
| 12212 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 12213 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 12214 | const int UninterpretedOption::kNameFieldNumber; |
| 12215 | const int UninterpretedOption::kIdentifierValueFieldNumber; |
| 12216 | const int UninterpretedOption::kPositiveIntValueFieldNumber; |
| 12217 | const int UninterpretedOption::kNegativeIntValueFieldNumber; |
| 12218 | const int UninterpretedOption::kDoubleValueFieldNumber; |
| 12219 | const int UninterpretedOption::kStringValueFieldNumber; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12220 | const int UninterpretedOption::kAggregateValueFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 12221 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
kenton@google.com | cfa2d8a | 2009-04-18 00:02:12 +0000 | [diff] [blame] | 12222 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 12223 | UninterpretedOption::UninterpretedOption() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12224 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12225 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12226 | // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12227 | } |
| 12228 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12229 | void UninterpretedOption::InitAsDefaultInstance() { |
| 12230 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12231 | |
kenton@google.com | 573989f | 2009-10-30 22:02:17 +0000 | [diff] [blame] | 12232 | UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12233 | : ::google::protobuf::Message(), |
| 12234 | _internal_metadata_(NULL) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12235 | SharedCtor(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12236 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12237 | // @@protoc_insertion_point(copy_constructor:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12238 | } |
| 12239 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12240 | void UninterpretedOption::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12241 | ::google::protobuf::internal::GetEmptyString(); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12242 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12243 | identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12244 | positive_int_value_ = GOOGLE_ULONGLONG(0); |
| 12245 | negative_int_value_ = GOOGLE_LONGLONG(0); |
| 12246 | double_value_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12247 | string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12248 | aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12249 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 12250 | } |
| 12251 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12252 | UninterpretedOption::~UninterpretedOption() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12253 | // @@protoc_insertion_point(destructor:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12254 | SharedDtor(); |
| 12255 | } |
| 12256 | |
| 12257 | void UninterpretedOption::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12258 | identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12259 | string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12260 | aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12261 | if (this != default_instance_) { |
| 12262 | } |
| 12263 | } |
| 12264 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12265 | void UninterpretedOption::SetCachedSize(int size) const { |
| 12266 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 12267 | _cached_size_ = size; |
| 12268 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 12269 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12270 | const ::google::protobuf::Descriptor* UninterpretedOption::descriptor() { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12271 | protobuf_AssignDescriptorsOnce(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12272 | return UninterpretedOption_descriptor_; |
| 12273 | } |
| 12274 | |
| 12275 | const UninterpretedOption& UninterpretedOption::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 12276 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 12277 | return *default_instance_; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12278 | } |
| 12279 | |
| 12280 | UninterpretedOption* UninterpretedOption::default_instance_ = NULL; |
| 12281 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12282 | UninterpretedOption* UninterpretedOption::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12283 | UninterpretedOption* n = new UninterpretedOption; |
| 12284 | if (arena != NULL) { |
| 12285 | arena->Own(n); |
| 12286 | } |
| 12287 | return n; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12288 | } |
| 12289 | |
| 12290 | void UninterpretedOption::Clear() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12291 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 12292 | &reinterpret_cast<UninterpretedOption*>(16)->f) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12293 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12294 | #define ZR_(first, last) do {\ |
| 12295 | ::memset(&first, 0,\ |
| 12296 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 12297 | } while (0) |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12298 | |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 12299 | if (_has_bits_[0 / 32] & 126u) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12300 | ZR_(positive_int_value_, double_value_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12301 | if (has_identifier_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12302 | identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12303 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12304 | if (has_string_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12305 | string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12306 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12307 | if (has_aggregate_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12308 | aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12309 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12310 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12311 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12312 | #undef ZR_HELPER_ |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12313 | #undef ZR_ |
| 12314 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12315 | name_.Clear(); |
| 12316 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12317 | if (_internal_metadata_.have_unknown_fields()) { |
| 12318 | mutable_unknown_fields()->Clear(); |
| 12319 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12320 | } |
| 12321 | |
| 12322 | bool UninterpretedOption::MergePartialFromCodedStream( |
| 12323 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12324 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12325 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12326 | // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption) |
| 12327 | for (;;) { |
| 12328 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 12329 | tag = p.first; |
| 12330 | if (!p.second) goto handle_unusual; |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12331 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12332 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
| 12333 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12334 | if (tag == 18) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12335 | DO_(input->IncrementRecursionDepth()); |
| 12336 | parse_loop_name: |
| 12337 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12338 | input, add_name())); |
| 12339 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12340 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12341 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12342 | if (input->ExpectTag(18)) goto parse_loop_name; |
| 12343 | input->UnsafeDecrementRecursionDepth(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12344 | if (input->ExpectTag(26)) goto parse_identifier_value; |
| 12345 | break; |
| 12346 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12347 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12348 | // optional string identifier_value = 3; |
| 12349 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12350 | if (tag == 26) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12351 | parse_identifier_value: |
| 12352 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 12353 | input, this->mutable_identifier_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12354 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12355 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12356 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12357 | "google.protobuf.UninterpretedOption.identifier_value"); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12358 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12359 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12360 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12361 | if (input->ExpectTag(32)) goto parse_positive_int_value; |
| 12362 | break; |
| 12363 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12364 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12365 | // optional uint64 positive_int_value = 4; |
| 12366 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12367 | if (tag == 32) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12368 | parse_positive_int_value: |
| 12369 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12370 | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| 12371 | input, &positive_int_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12372 | set_has_positive_int_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12373 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12374 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12375 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12376 | if (input->ExpectTag(40)) goto parse_negative_int_value; |
| 12377 | break; |
| 12378 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12379 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12380 | // optional int64 negative_int_value = 5; |
| 12381 | case 5: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12382 | if (tag == 40) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12383 | parse_negative_int_value: |
| 12384 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12385 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
| 12386 | input, &negative_int_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12387 | set_has_negative_int_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12388 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12389 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12390 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12391 | if (input->ExpectTag(49)) goto parse_double_value; |
| 12392 | break; |
| 12393 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12394 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12395 | // optional double double_value = 6; |
| 12396 | case 6: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12397 | if (tag == 49) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12398 | parse_double_value: |
| 12399 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 12400 | double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| 12401 | input, &double_value_))); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12402 | set_has_double_value(); |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12403 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12404 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12405 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12406 | if (input->ExpectTag(58)) goto parse_string_value; |
| 12407 | break; |
| 12408 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12409 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12410 | // optional bytes string_value = 7; |
| 12411 | case 7: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12412 | if (tag == 58) { |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12413 | parse_string_value: |
| 12414 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
| 12415 | input, this->mutable_string_value())); |
| 12416 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12417 | goto handle_unusual; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12418 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12419 | if (input->ExpectTag(66)) goto parse_aggregate_value; |
| 12420 | break; |
| 12421 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12422 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12423 | // optional string aggregate_value = 8; |
| 12424 | case 8: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12425 | if (tag == 66) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12426 | parse_aggregate_value: |
| 12427 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 12428 | input, this->mutable_aggregate_value())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12429 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12430 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12431 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12432 | "google.protobuf.UninterpretedOption.aggregate_value"); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12433 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12434 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12435 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12436 | if (input->ExpectAtEnd()) goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12437 | break; |
| 12438 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12439 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12440 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12441 | handle_unusual: |
| 12442 | if (tag == 0 || |
| 12443 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12444 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12445 | goto success; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12446 | } |
| 12447 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 12448 | input, tag, mutable_unknown_fields())); |
| 12449 | break; |
| 12450 | } |
| 12451 | } |
| 12452 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12453 | success: |
| 12454 | // @@protoc_insertion_point(parse_success:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12455 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12456 | failure: |
| 12457 | // @@protoc_insertion_point(parse_failure:google.protobuf.UninterpretedOption) |
| 12458 | return false; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12459 | #undef DO_ |
| 12460 | } |
| 12461 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12462 | void UninterpretedOption::SerializeWithCachedSizes( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12463 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12464 | // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption) |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12465 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12466 | 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] | 12467 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12468 | 2, this->name(i), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12469 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12470 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12471 | // optional string identifier_value = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12472 | if (has_identifier_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12473 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12474 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12475 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12476 | "google.protobuf.UninterpretedOption.identifier_value"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12477 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12478 | 3, this->identifier_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12479 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12480 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12481 | // optional uint64 positive_int_value = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12482 | if (has_positive_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12483 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12484 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12485 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12486 | // optional int64 negative_int_value = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12487 | if (has_negative_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12488 | ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12489 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12490 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12491 | // optional double double_value = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12492 | if (has_double_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12493 | ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12494 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12495 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12496 | // optional bytes string_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12497 | if (has_string_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12498 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12499 | 7, this->string_value(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12500 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12501 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12502 | // optional string aggregate_value = 8; |
| 12503 | if (has_aggregate_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12504 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12505 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12506 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12507 | "google.protobuf.UninterpretedOption.aggregate_value"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12508 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12509 | 8, this->aggregate_value(), output); |
| 12510 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12511 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12512 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12513 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 12514 | unknown_fields(), output); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12515 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12516 | // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12517 | } |
| 12518 | |
| 12519 | ::google::protobuf::uint8* UninterpretedOption::SerializeWithCachedSizesToArray( |
| 12520 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12521 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12522 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12523 | 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] | 12524 | target = ::google::protobuf::internal::WireFormatLite:: |
| 12525 | WriteMessageNoVirtualToArray( |
| 12526 | 2, this->name(i), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12527 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12528 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12529 | // optional string identifier_value = 3; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12530 | if (has_identifier_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12531 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12532 | this->identifier_value().data(), this->identifier_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12533 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12534 | "google.protobuf.UninterpretedOption.identifier_value"); |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12535 | target = |
| 12536 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 12537 | 3, this->identifier_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12538 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12539 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12540 | // optional uint64 positive_int_value = 4; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12541 | if (has_positive_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12542 | 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] | 12543 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12544 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12545 | // optional int64 negative_int_value = 5; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12546 | if (has_negative_int_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12547 | 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] | 12548 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12549 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12550 | // optional double double_value = 6; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12551 | if (has_double_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12552 | target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12553 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12554 | |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12555 | // optional bytes string_value = 7; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12556 | if (has_string_value()) { |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12557 | target = |
| 12558 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
| 12559 | 7, this->string_value(), target); |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12560 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12561 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12562 | // optional string aggregate_value = 8; |
| 12563 | if (has_aggregate_value()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12564 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12565 | this->aggregate_value().data(), this->aggregate_value().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12566 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12567 | "google.protobuf.UninterpretedOption.aggregate_value"); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12568 | target = |
| 12569 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 12570 | 8, this->aggregate_value(), target); |
| 12571 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12572 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12573 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12574 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 12575 | unknown_fields(), target); |
| 12576 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12577 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) |
kenton@google.com | d37d46d | 2009-04-25 02:53:47 +0000 | [diff] [blame] | 12578 | return target; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12579 | } |
| 12580 | |
| 12581 | int UninterpretedOption::ByteSize() const { |
| 12582 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12583 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 12584 | if (_has_bits_[1 / 32] & 126u) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12585 | // optional string identifier_value = 3; |
| 12586 | if (has_identifier_value()) { |
| 12587 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12588 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12589 | this->identifier_value()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12590 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12591 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12592 | // optional uint64 positive_int_value = 4; |
| 12593 | if (has_positive_int_value()) { |
| 12594 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12595 | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12596 | this->positive_int_value()); |
| 12597 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12598 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12599 | // optional int64 negative_int_value = 5; |
| 12600 | if (has_negative_int_value()) { |
| 12601 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12602 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12603 | this->negative_int_value()); |
| 12604 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12605 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12606 | // optional double double_value = 6; |
| 12607 | if (has_double_value()) { |
| 12608 | total_size += 1 + 8; |
| 12609 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12610 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12611 | // optional bytes string_value = 7; |
| 12612 | if (has_string_value()) { |
| 12613 | total_size += 1 + |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12614 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
| 12615 | this->string_value()); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12616 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12617 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12618 | // optional string aggregate_value = 8; |
| 12619 | if (has_aggregate_value()) { |
| 12620 | total_size += 1 + |
| 12621 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 12622 | this->aggregate_value()); |
| 12623 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12624 | |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12625 | } |
| 12626 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
kenton@google.com | 2d6daa7 | 2009-01-22 01:27:00 +0000 | [diff] [blame] | 12627 | total_size += 1 * this->name_size(); |
| 12628 | for (int i = 0; i < this->name_size(); i++) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12629 | total_size += |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12630 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12631 | this->name(i)); |
| 12632 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12633 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12634 | if (_internal_metadata_.have_unknown_fields()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12635 | total_size += |
| 12636 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 12637 | unknown_fields()); |
| 12638 | } |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12639 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12640 | _cached_size_ = total_size; |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 12641 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12642 | return total_size; |
| 12643 | } |
| 12644 | |
| 12645 | void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12646 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12647 | const UninterpretedOption* source = |
| 12648 | ::google::protobuf::internal::DynamicCastToGenerated<const UninterpretedOption>( |
| 12649 | &from); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12650 | if (source == NULL) { |
| 12651 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 12652 | } else { |
| 12653 | MergeFrom(*source); |
| 12654 | } |
| 12655 | } |
| 12656 | |
| 12657 | void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12658 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12659 | name_.MergeFrom(from.name_); |
| 12660 | if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12661 | if (from.has_identifier_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12662 | set_has_identifier_value(); |
| 12663 | identifier_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12664 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12665 | if (from.has_positive_int_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12666 | set_positive_int_value(from.positive_int_value()); |
| 12667 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12668 | if (from.has_negative_int_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12669 | set_negative_int_value(from.negative_int_value()); |
| 12670 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12671 | if (from.has_double_value()) { |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12672 | set_double_value(from.double_value()); |
| 12673 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12674 | if (from.has_string_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12675 | set_has_string_value(); |
| 12676 | string_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value_); |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12677 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12678 | if (from.has_aggregate_value()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 12679 | set_has_aggregate_value(); |
| 12680 | aggregate_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value_); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 12681 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12682 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12683 | if (from._internal_metadata_.have_unknown_fields()) { |
| 12684 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 12685 | } |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12686 | } |
| 12687 | |
| 12688 | void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) { |
| 12689 | if (&from == this) return; |
| 12690 | Clear(); |
| 12691 | MergeFrom(from); |
| 12692 | } |
| 12693 | |
| 12694 | void UninterpretedOption::CopyFrom(const UninterpretedOption& from) { |
| 12695 | if (&from == this) return; |
| 12696 | Clear(); |
| 12697 | MergeFrom(from); |
| 12698 | } |
| 12699 | |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12700 | bool UninterpretedOption::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 12701 | |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 12702 | if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false; |
kenton@google.com | ceb561d | 2009-06-25 19:05:36 +0000 | [diff] [blame] | 12703 | return true; |
| 12704 | } |
| 12705 | |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12706 | void UninterpretedOption::Swap(UninterpretedOption* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12707 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 12708 | InternalSwap(other); |
| 12709 | } |
| 12710 | void UninterpretedOption::InternalSwap(UninterpretedOption* other) { |
| 12711 | name_.UnsafeArenaSwap(&other->name_); |
| 12712 | identifier_value_.Swap(&other->identifier_value_); |
| 12713 | std::swap(positive_int_value_, other->positive_int_value_); |
| 12714 | std::swap(negative_int_value_, other->negative_int_value_); |
| 12715 | std::swap(double_value_, other->double_value_); |
| 12716 | string_value_.Swap(&other->string_value_); |
| 12717 | aggregate_value_.Swap(&other->aggregate_value_); |
| 12718 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 12719 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 12720 | std::swap(_cached_size_, other->_cached_size_); |
| 12721 | } |
kenton@google.com | 26bd9ee | 2008-11-21 00:06:27 +0000 | [diff] [blame] | 12722 | |
kenton@google.com | 80b1d62 | 2009-07-29 01:13:20 +0000 | [diff] [blame] | 12723 | ::google::protobuf::Metadata UninterpretedOption::GetMetadata() const { |
| 12724 | protobuf_AssignDescriptorsOnce(); |
| 12725 | ::google::protobuf::Metadata metadata; |
| 12726 | metadata.descriptor = UninterpretedOption_descriptor_; |
| 12727 | metadata.reflection = UninterpretedOption_reflection_; |
| 12728 | return metadata; |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 12729 | } |
| 12730 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12731 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 12732 | // UninterpretedOption_NamePart |
| 12733 | |
| 12734 | // required string name_part = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12735 | bool UninterpretedOption_NamePart::has_name_part() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12736 | return (_has_bits_[0] & 0x00000001u) != 0; |
| 12737 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12738 | void UninterpretedOption_NamePart::set_has_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12739 | _has_bits_[0] |= 0x00000001u; |
| 12740 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12741 | void UninterpretedOption_NamePart::clear_has_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12742 | _has_bits_[0] &= ~0x00000001u; |
| 12743 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12744 | void UninterpretedOption_NamePart::clear_name_part() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12745 | name_part_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12746 | clear_has_name_part(); |
| 12747 | } |
| 12748 | const ::std::string& UninterpretedOption_NamePart::name_part() const { |
| 12749 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12750 | return name_part_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12751 | } |
| 12752 | void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { |
| 12753 | set_has_name_part(); |
| 12754 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12755 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12756 | } |
| 12757 | void UninterpretedOption_NamePart::set_name_part(const char* value) { |
| 12758 | set_has_name_part(); |
| 12759 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12760 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12761 | } |
| 12762 | void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { |
| 12763 | set_has_name_part(); |
| 12764 | name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12765 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12766 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12767 | } |
| 12768 | ::std::string* UninterpretedOption_NamePart::mutable_name_part() { |
| 12769 | set_has_name_part(); |
| 12770 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12771 | return name_part_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12772 | } |
| 12773 | ::std::string* UninterpretedOption_NamePart::release_name_part() { |
| 12774 | clear_has_name_part(); |
| 12775 | return name_part_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12776 | } |
| 12777 | void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) { |
| 12778 | if (name_part != NULL) { |
| 12779 | set_has_name_part(); |
| 12780 | } else { |
| 12781 | clear_has_name_part(); |
| 12782 | } |
| 12783 | name_part_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part); |
| 12784 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) |
| 12785 | } |
| 12786 | |
| 12787 | // required bool is_extension = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12788 | bool UninterpretedOption_NamePart::has_is_extension() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12789 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 12790 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12791 | void UninterpretedOption_NamePart::set_has_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12792 | _has_bits_[0] |= 0x00000002u; |
| 12793 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12794 | void UninterpretedOption_NamePart::clear_has_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12795 | _has_bits_[0] &= ~0x00000002u; |
| 12796 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12797 | void UninterpretedOption_NamePart::clear_is_extension() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12798 | is_extension_ = false; |
| 12799 | clear_has_is_extension(); |
| 12800 | } |
| 12801 | bool UninterpretedOption_NamePart::is_extension() const { |
| 12802 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.is_extension) |
| 12803 | return is_extension_; |
| 12804 | } |
| 12805 | void UninterpretedOption_NamePart::set_is_extension(bool value) { |
| 12806 | set_has_is_extension(); |
| 12807 | is_extension_ = value; |
| 12808 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.is_extension) |
| 12809 | } |
| 12810 | |
| 12811 | // ------------------------------------------------------------------- |
| 12812 | |
| 12813 | // UninterpretedOption |
| 12814 | |
| 12815 | // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12816 | int UninterpretedOption::name_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12817 | return name_.size(); |
| 12818 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12819 | void UninterpretedOption::clear_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12820 | name_.Clear(); |
| 12821 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 12822 | const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12823 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name) |
| 12824 | return name_.Get(index); |
| 12825 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 12826 | ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12827 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name) |
| 12828 | return name_.Mutable(index); |
| 12829 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 12830 | ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12831 | // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name) |
| 12832 | return name_.Add(); |
| 12833 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 12834 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12835 | UninterpretedOption::mutable_name() { |
| 12836 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name) |
| 12837 | return &name_; |
| 12838 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 12839 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& |
| 12840 | UninterpretedOption::name() const { |
| 12841 | // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name) |
| 12842 | return name_; |
| 12843 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12844 | |
| 12845 | // optional string identifier_value = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12846 | bool UninterpretedOption::has_identifier_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12847 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 12848 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12849 | void UninterpretedOption::set_has_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12850 | _has_bits_[0] |= 0x00000002u; |
| 12851 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12852 | void UninterpretedOption::clear_has_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12853 | _has_bits_[0] &= ~0x00000002u; |
| 12854 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12855 | void UninterpretedOption::clear_identifier_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12856 | identifier_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12857 | clear_has_identifier_value(); |
| 12858 | } |
| 12859 | const ::std::string& UninterpretedOption::identifier_value() const { |
| 12860 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) |
| 12861 | return identifier_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12862 | } |
| 12863 | void UninterpretedOption::set_identifier_value(const ::std::string& value) { |
| 12864 | set_has_identifier_value(); |
| 12865 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12866 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) |
| 12867 | } |
| 12868 | void UninterpretedOption::set_identifier_value(const char* value) { |
| 12869 | set_has_identifier_value(); |
| 12870 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12871 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value) |
| 12872 | } |
| 12873 | void UninterpretedOption::set_identifier_value(const char* value, size_t size) { |
| 12874 | set_has_identifier_value(); |
| 12875 | identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 12876 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 12877 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value) |
| 12878 | } |
| 12879 | ::std::string* UninterpretedOption::mutable_identifier_value() { |
| 12880 | set_has_identifier_value(); |
| 12881 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) |
| 12882 | return identifier_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12883 | } |
| 12884 | ::std::string* UninterpretedOption::release_identifier_value() { |
| 12885 | clear_has_identifier_value(); |
| 12886 | return identifier_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12887 | } |
| 12888 | void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) { |
| 12889 | if (identifier_value != NULL) { |
| 12890 | set_has_identifier_value(); |
| 12891 | } else { |
| 12892 | clear_has_identifier_value(); |
| 12893 | } |
| 12894 | identifier_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value); |
| 12895 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) |
| 12896 | } |
| 12897 | |
| 12898 | // optional uint64 positive_int_value = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12899 | bool UninterpretedOption::has_positive_int_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12900 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 12901 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12902 | void UninterpretedOption::set_has_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12903 | _has_bits_[0] |= 0x00000004u; |
| 12904 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12905 | void UninterpretedOption::clear_has_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12906 | _has_bits_[0] &= ~0x00000004u; |
| 12907 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12908 | void UninterpretedOption::clear_positive_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12909 | positive_int_value_ = GOOGLE_ULONGLONG(0); |
| 12910 | clear_has_positive_int_value(); |
| 12911 | } |
| 12912 | ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const { |
| 12913 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value) |
| 12914 | return positive_int_value_; |
| 12915 | } |
| 12916 | void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) { |
| 12917 | set_has_positive_int_value(); |
| 12918 | positive_int_value_ = value; |
| 12919 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value) |
| 12920 | } |
| 12921 | |
| 12922 | // optional int64 negative_int_value = 5; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12923 | bool UninterpretedOption::has_negative_int_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12924 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 12925 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12926 | void UninterpretedOption::set_has_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12927 | _has_bits_[0] |= 0x00000008u; |
| 12928 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12929 | void UninterpretedOption::clear_has_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12930 | _has_bits_[0] &= ~0x00000008u; |
| 12931 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12932 | void UninterpretedOption::clear_negative_int_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12933 | negative_int_value_ = GOOGLE_LONGLONG(0); |
| 12934 | clear_has_negative_int_value(); |
| 12935 | } |
| 12936 | ::google::protobuf::int64 UninterpretedOption::negative_int_value() const { |
| 12937 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value) |
| 12938 | return negative_int_value_; |
| 12939 | } |
| 12940 | void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) { |
| 12941 | set_has_negative_int_value(); |
| 12942 | negative_int_value_ = value; |
| 12943 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value) |
| 12944 | } |
| 12945 | |
| 12946 | // optional double double_value = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12947 | bool UninterpretedOption::has_double_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12948 | return (_has_bits_[0] & 0x00000010u) != 0; |
| 12949 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12950 | void UninterpretedOption::set_has_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12951 | _has_bits_[0] |= 0x00000010u; |
| 12952 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12953 | void UninterpretedOption::clear_has_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12954 | _has_bits_[0] &= ~0x00000010u; |
| 12955 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12956 | void UninterpretedOption::clear_double_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12957 | double_value_ = 0; |
| 12958 | clear_has_double_value(); |
| 12959 | } |
| 12960 | double UninterpretedOption::double_value() const { |
| 12961 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.double_value) |
| 12962 | return double_value_; |
| 12963 | } |
| 12964 | void UninterpretedOption::set_double_value(double value) { |
| 12965 | set_has_double_value(); |
| 12966 | double_value_ = value; |
| 12967 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.double_value) |
| 12968 | } |
| 12969 | |
| 12970 | // optional bytes string_value = 7; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12971 | bool UninterpretedOption::has_string_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12972 | return (_has_bits_[0] & 0x00000020u) != 0; |
| 12973 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12974 | void UninterpretedOption::set_has_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12975 | _has_bits_[0] |= 0x00000020u; |
| 12976 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12977 | void UninterpretedOption::clear_has_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12978 | _has_bits_[0] &= ~0x00000020u; |
| 12979 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 12980 | void UninterpretedOption::clear_string_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 12981 | string_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12982 | clear_has_string_value(); |
| 12983 | } |
| 12984 | const ::std::string& UninterpretedOption::string_value() const { |
| 12985 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) |
| 12986 | return string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 12987 | } |
| 12988 | void UninterpretedOption::set_string_value(const ::std::string& value) { |
| 12989 | set_has_string_value(); |
| 12990 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 12991 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) |
| 12992 | } |
| 12993 | void UninterpretedOption::set_string_value(const char* value) { |
| 12994 | set_has_string_value(); |
| 12995 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 12996 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value) |
| 12997 | } |
| 12998 | void UninterpretedOption::set_string_value(const void* value, size_t size) { |
| 12999 | set_has_string_value(); |
| 13000 | string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13001 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13002 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value) |
| 13003 | } |
| 13004 | ::std::string* UninterpretedOption::mutable_string_value() { |
| 13005 | set_has_string_value(); |
| 13006 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) |
| 13007 | return string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13008 | } |
| 13009 | ::std::string* UninterpretedOption::release_string_value() { |
| 13010 | clear_has_string_value(); |
| 13011 | return string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13012 | } |
| 13013 | void UninterpretedOption::set_allocated_string_value(::std::string* string_value) { |
| 13014 | if (string_value != NULL) { |
| 13015 | set_has_string_value(); |
| 13016 | } else { |
| 13017 | clear_has_string_value(); |
| 13018 | } |
| 13019 | string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value); |
| 13020 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) |
| 13021 | } |
| 13022 | |
| 13023 | // optional string aggregate_value = 8; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13024 | bool UninterpretedOption::has_aggregate_value() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13025 | return (_has_bits_[0] & 0x00000040u) != 0; |
| 13026 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13027 | void UninterpretedOption::set_has_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13028 | _has_bits_[0] |= 0x00000040u; |
| 13029 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13030 | void UninterpretedOption::clear_has_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13031 | _has_bits_[0] &= ~0x00000040u; |
| 13032 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13033 | void UninterpretedOption::clear_aggregate_value() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13034 | aggregate_value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13035 | clear_has_aggregate_value(); |
| 13036 | } |
| 13037 | const ::std::string& UninterpretedOption::aggregate_value() const { |
| 13038 | // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) |
| 13039 | return aggregate_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13040 | } |
| 13041 | void UninterpretedOption::set_aggregate_value(const ::std::string& value) { |
| 13042 | set_has_aggregate_value(); |
| 13043 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 13044 | // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) |
| 13045 | } |
| 13046 | void UninterpretedOption::set_aggregate_value(const char* value) { |
| 13047 | set_has_aggregate_value(); |
| 13048 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 13049 | // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value) |
| 13050 | } |
| 13051 | void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { |
| 13052 | set_has_aggregate_value(); |
| 13053 | aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13054 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13055 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value) |
| 13056 | } |
| 13057 | ::std::string* UninterpretedOption::mutable_aggregate_value() { |
| 13058 | set_has_aggregate_value(); |
| 13059 | // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) |
| 13060 | return aggregate_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13061 | } |
| 13062 | ::std::string* UninterpretedOption::release_aggregate_value() { |
| 13063 | clear_has_aggregate_value(); |
| 13064 | return aggregate_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13065 | } |
| 13066 | void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) { |
| 13067 | if (aggregate_value != NULL) { |
| 13068 | set_has_aggregate_value(); |
| 13069 | } else { |
| 13070 | clear_has_aggregate_value(); |
| 13071 | } |
| 13072 | aggregate_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value); |
| 13073 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) |
| 13074 | } |
| 13075 | |
| 13076 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
kenton@google.com | 24bf56f | 2008-09-24 20:31:01 +0000 | [diff] [blame] | 13077 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13078 | // =================================================================== |
| 13079 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 13080 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13081 | const int SourceCodeInfo_Location::kPathFieldNumber; |
| 13082 | const int SourceCodeInfo_Location::kSpanFieldNumber; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13083 | const int SourceCodeInfo_Location::kLeadingCommentsFieldNumber; |
| 13084 | const int SourceCodeInfo_Location::kTrailingCommentsFieldNumber; |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13085 | const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 13086 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13087 | |
| 13088 | SourceCodeInfo_Location::SourceCodeInfo_Location() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13089 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13090 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13091 | // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13092 | } |
| 13093 | |
| 13094 | void SourceCodeInfo_Location::InitAsDefaultInstance() { |
| 13095 | } |
| 13096 | |
| 13097 | SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13098 | : ::google::protobuf::Message(), |
| 13099 | _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13100 | SharedCtor(); |
| 13101 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13102 | // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13103 | } |
| 13104 | |
| 13105 | void SourceCodeInfo_Location::SharedCtor() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13106 | ::google::protobuf::internal::GetEmptyString(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13107 | _cached_size_ = 0; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13108 | leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13109 | trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13110 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 13111 | } |
| 13112 | |
| 13113 | SourceCodeInfo_Location::~SourceCodeInfo_Location() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13114 | // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13115 | SharedDtor(); |
| 13116 | } |
| 13117 | |
| 13118 | void SourceCodeInfo_Location::SharedDtor() { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13119 | leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13120 | trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13121 | if (this != default_instance_) { |
| 13122 | } |
| 13123 | } |
| 13124 | |
| 13125 | void SourceCodeInfo_Location::SetCachedSize(int size) const { |
| 13126 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13127 | _cached_size_ = size; |
| 13128 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13129 | } |
| 13130 | const ::google::protobuf::Descriptor* SourceCodeInfo_Location::descriptor() { |
| 13131 | protobuf_AssignDescriptorsOnce(); |
| 13132 | return SourceCodeInfo_Location_descriptor_; |
| 13133 | } |
| 13134 | |
| 13135 | const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 13136 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 13137 | return *default_instance_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13138 | } |
| 13139 | |
| 13140 | SourceCodeInfo_Location* SourceCodeInfo_Location::default_instance_ = NULL; |
| 13141 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13142 | SourceCodeInfo_Location* SourceCodeInfo_Location::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13143 | SourceCodeInfo_Location* n = new SourceCodeInfo_Location; |
| 13144 | if (arena != NULL) { |
| 13145 | arena->Own(n); |
| 13146 | } |
| 13147 | return n; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13148 | } |
| 13149 | |
| 13150 | void SourceCodeInfo_Location::Clear() { |
Austin Schuh | e826837 | 2015-05-19 23:22:20 -0700 | [diff] [blame] | 13151 | if (_has_bits_[0 / 32] & 12u) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13152 | if (has_leading_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13153 | leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13154 | } |
| 13155 | if (has_trailing_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13156 | trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13157 | } |
| 13158 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13159 | path_.Clear(); |
| 13160 | span_.Clear(); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13161 | leading_detached_comments_.Clear(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13162 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13163 | if (_internal_metadata_.have_unknown_fields()) { |
| 13164 | mutable_unknown_fields()->Clear(); |
| 13165 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13166 | } |
| 13167 | |
| 13168 | bool SourceCodeInfo_Location::MergePartialFromCodedStream( |
| 13169 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13170 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13171 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13172 | // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location) |
| 13173 | for (;;) { |
| 13174 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 13175 | tag = p.first; |
| 13176 | if (!p.second) goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13177 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 13178 | // repeated int32 path = 1 [packed = true]; |
| 13179 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13180 | if (tag == 10) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13181 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 13182 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13183 | input, this->mutable_path()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13184 | } else if (tag == 8) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13185 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 13186 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13187 | 1, 10, input, this->mutable_path()))); |
| 13188 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13189 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13190 | } |
| 13191 | if (input->ExpectTag(18)) goto parse_span; |
| 13192 | break; |
| 13193 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13194 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13195 | // repeated int32 span = 2 [packed = true]; |
| 13196 | case 2: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13197 | if (tag == 18) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13198 | parse_span: |
| 13199 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 13200 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13201 | input, this->mutable_span()))); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13202 | } else if (tag == 16) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13203 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 13204 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 13205 | 1, 18, input, this->mutable_span()))); |
| 13206 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13207 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13208 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13209 | if (input->ExpectTag(26)) goto parse_leading_comments; |
| 13210 | break; |
| 13211 | } |
| 13212 | |
| 13213 | // optional string leading_comments = 3; |
| 13214 | case 3: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13215 | if (tag == 26) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13216 | parse_leading_comments: |
| 13217 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13218 | input, this->mutable_leading_comments())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13219 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13220 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13221 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13222 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13223 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13224 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13225 | } |
| 13226 | if (input->ExpectTag(34)) goto parse_trailing_comments; |
| 13227 | break; |
| 13228 | } |
| 13229 | |
| 13230 | // optional string trailing_comments = 4; |
| 13231 | case 4: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13232 | if (tag == 34) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13233 | parse_trailing_comments: |
| 13234 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13235 | input, this->mutable_trailing_comments())); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13236 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13237 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13238 | ::google::protobuf::internal::WireFormat::PARSE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13239 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13240 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13241 | goto handle_unusual; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13242 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13243 | if (input->ExpectTag(50)) goto parse_leading_detached_comments; |
| 13244 | break; |
| 13245 | } |
| 13246 | |
| 13247 | // repeated string leading_detached_comments = 6; |
| 13248 | case 6: { |
| 13249 | if (tag == 50) { |
| 13250 | parse_leading_detached_comments: |
| 13251 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 13252 | input, this->add_leading_detached_comments())); |
| 13253 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13254 | this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(), |
| 13255 | this->leading_detached_comments(this->leading_detached_comments_size() - 1).length(), |
| 13256 | ::google::protobuf::internal::WireFormat::PARSE, |
| 13257 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
| 13258 | } else { |
| 13259 | goto handle_unusual; |
| 13260 | } |
| 13261 | if (input->ExpectTag(50)) goto parse_leading_detached_comments; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13262 | if (input->ExpectAtEnd()) goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13263 | break; |
| 13264 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13265 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13266 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13267 | handle_unusual: |
| 13268 | if (tag == 0 || |
| 13269 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13270 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13271 | goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13272 | } |
| 13273 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 13274 | input, tag, mutable_unknown_fields())); |
| 13275 | break; |
| 13276 | } |
| 13277 | } |
| 13278 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13279 | success: |
| 13280 | // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13281 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13282 | failure: |
| 13283 | // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo.Location) |
| 13284 | return false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13285 | #undef DO_ |
| 13286 | } |
| 13287 | |
| 13288 | void SourceCodeInfo_Location::SerializeWithCachedSizes( |
| 13289 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13290 | // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13291 | // repeated int32 path = 1 [packed = true]; |
| 13292 | if (this->path_size() > 0) { |
| 13293 | ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 13294 | output->WriteVarint32(_path_cached_byte_size_); |
| 13295 | } |
| 13296 | for (int i = 0; i < this->path_size(); i++) { |
| 13297 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 13298 | this->path(i), output); |
| 13299 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13300 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13301 | // repeated int32 span = 2 [packed = true]; |
| 13302 | if (this->span_size() > 0) { |
| 13303 | ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 13304 | output->WriteVarint32(_span_cached_byte_size_); |
| 13305 | } |
| 13306 | for (int i = 0; i < this->span_size(); i++) { |
| 13307 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 13308 | this->span(i), output); |
| 13309 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13310 | |
| 13311 | // optional string leading_comments = 3; |
| 13312 | if (has_leading_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13313 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13314 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13315 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13316 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13317 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13318 | 3, this->leading_comments(), output); |
| 13319 | } |
| 13320 | |
| 13321 | // optional string trailing_comments = 4; |
| 13322 | if (has_trailing_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13323 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13324 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13325 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13326 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13327 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13328 | 4, this->trailing_comments(), output); |
| 13329 | } |
| 13330 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13331 | // repeated string leading_detached_comments = 6; |
| 13332 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
Jisi Liu | 4c663d8 | 2015-08-25 17:03:05 -0700 | [diff] [blame] | 13333 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13334 | this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), |
| 13335 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 13336 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13337 | ::google::protobuf::internal::WireFormatLite::WriteString( |
| 13338 | 6, this->leading_detached_comments(i), output); |
| 13339 | } |
| 13340 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13341 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13342 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 13343 | unknown_fields(), output); |
| 13344 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13345 | // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13346 | } |
| 13347 | |
| 13348 | ::google::protobuf::uint8* SourceCodeInfo_Location::SerializeWithCachedSizesToArray( |
| 13349 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13350 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13351 | // repeated int32 path = 1 [packed = true]; |
| 13352 | if (this->path_size() > 0) { |
| 13353 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 13354 | 1, |
| 13355 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 13356 | target); |
| 13357 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 13358 | _path_cached_byte_size_, target); |
| 13359 | } |
| 13360 | for (int i = 0; i < this->path_size(); i++) { |
| 13361 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13362 | WriteInt32NoTagToArray(this->path(i), target); |
| 13363 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13364 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13365 | // repeated int32 span = 2 [packed = true]; |
| 13366 | if (this->span_size() > 0) { |
| 13367 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 13368 | 2, |
| 13369 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 13370 | target); |
| 13371 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 13372 | _span_cached_byte_size_, target); |
| 13373 | } |
| 13374 | for (int i = 0; i < this->span_size(); i++) { |
| 13375 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13376 | WriteInt32NoTagToArray(this->span(i), target); |
| 13377 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13378 | |
| 13379 | // optional string leading_comments = 3; |
| 13380 | if (has_leading_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13381 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13382 | this->leading_comments().data(), this->leading_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13383 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13384 | "google.protobuf.SourceCodeInfo.Location.leading_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13385 | target = |
| 13386 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 13387 | 3, this->leading_comments(), target); |
| 13388 | } |
| 13389 | |
| 13390 | // optional string trailing_comments = 4; |
| 13391 | if (has_trailing_comments()) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13392 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13393 | this->trailing_comments().data(), this->trailing_comments().length(), |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13394 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13395 | "google.protobuf.SourceCodeInfo.Location.trailing_comments"); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13396 | target = |
| 13397 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 13398 | 4, this->trailing_comments(), target); |
| 13399 | } |
| 13400 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13401 | // repeated string leading_detached_comments = 6; |
| 13402 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
| 13403 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 13404 | this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(), |
| 13405 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 13406 | "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); |
| 13407 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13408 | WriteStringToArray(6, this->leading_detached_comments(i), target); |
| 13409 | } |
| 13410 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13411 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13412 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 13413 | unknown_fields(), target); |
| 13414 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13415 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13416 | return target; |
| 13417 | } |
| 13418 | |
| 13419 | int SourceCodeInfo_Location::ByteSize() const { |
| 13420 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13421 | |
Austin Schuh | 307af62 | 2015-06-05 22:46:01 -0700 | [diff] [blame] | 13422 | if (_has_bits_[2 / 32] & 12u) { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13423 | // optional string leading_comments = 3; |
| 13424 | if (has_leading_comments()) { |
| 13425 | total_size += 1 + |
| 13426 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13427 | this->leading_comments()); |
| 13428 | } |
| 13429 | |
| 13430 | // optional string trailing_comments = 4; |
| 13431 | if (has_trailing_comments()) { |
| 13432 | total_size += 1 + |
| 13433 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13434 | this->trailing_comments()); |
| 13435 | } |
| 13436 | |
| 13437 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13438 | // repeated int32 path = 1 [packed = true]; |
| 13439 | { |
| 13440 | int data_size = 0; |
| 13441 | for (int i = 0; i < this->path_size(); i++) { |
| 13442 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 13443 | Int32Size(this->path(i)); |
| 13444 | } |
| 13445 | if (data_size > 0) { |
| 13446 | total_size += 1 + |
| 13447 | ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); |
| 13448 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13449 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13450 | _path_cached_byte_size_ = data_size; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13451 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13452 | total_size += data_size; |
| 13453 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13454 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13455 | // repeated int32 span = 2 [packed = true]; |
| 13456 | { |
| 13457 | int data_size = 0; |
| 13458 | for (int i = 0; i < this->span_size(); i++) { |
| 13459 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 13460 | Int32Size(this->span(i)); |
| 13461 | } |
| 13462 | if (data_size > 0) { |
| 13463 | total_size += 1 + |
| 13464 | ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); |
| 13465 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13466 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13467 | _span_cached_byte_size_ = data_size; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13468 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13469 | total_size += data_size; |
| 13470 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13471 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13472 | // repeated string leading_detached_comments = 6; |
| 13473 | total_size += 1 * this->leading_detached_comments_size(); |
| 13474 | for (int i = 0; i < this->leading_detached_comments_size(); i++) { |
| 13475 | total_size += ::google::protobuf::internal::WireFormatLite::StringSize( |
| 13476 | this->leading_detached_comments(i)); |
| 13477 | } |
| 13478 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13479 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13480 | total_size += |
| 13481 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 13482 | unknown_fields()); |
| 13483 | } |
| 13484 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13485 | _cached_size_ = total_size; |
| 13486 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13487 | return total_size; |
| 13488 | } |
| 13489 | |
| 13490 | void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13491 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13492 | const SourceCodeInfo_Location* source = |
| 13493 | ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo_Location>( |
| 13494 | &from); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13495 | if (source == NULL) { |
| 13496 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 13497 | } else { |
| 13498 | MergeFrom(*source); |
| 13499 | } |
| 13500 | } |
| 13501 | |
| 13502 | void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13503 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13504 | path_.MergeFrom(from.path_); |
| 13505 | span_.MergeFrom(from.span_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13506 | leading_detached_comments_.MergeFrom(from.leading_detached_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13507 | if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) { |
| 13508 | if (from.has_leading_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13509 | set_has_leading_comments(); |
| 13510 | leading_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13511 | } |
| 13512 | if (from.has_trailing_comments()) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13513 | set_has_trailing_comments(); |
| 13514 | trailing_comments_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments_); |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13515 | } |
| 13516 | } |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13517 | if (from._internal_metadata_.have_unknown_fields()) { |
| 13518 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 13519 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13520 | } |
| 13521 | |
| 13522 | void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) { |
| 13523 | if (&from == this) return; |
| 13524 | Clear(); |
| 13525 | MergeFrom(from); |
| 13526 | } |
| 13527 | |
| 13528 | void SourceCodeInfo_Location::CopyFrom(const SourceCodeInfo_Location& from) { |
| 13529 | if (&from == this) return; |
| 13530 | Clear(); |
| 13531 | MergeFrom(from); |
| 13532 | } |
| 13533 | |
| 13534 | bool SourceCodeInfo_Location::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13535 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13536 | return true; |
| 13537 | } |
| 13538 | |
| 13539 | void SourceCodeInfo_Location::Swap(SourceCodeInfo_Location* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13540 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13541 | InternalSwap(other); |
| 13542 | } |
| 13543 | void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { |
| 13544 | path_.UnsafeArenaSwap(&other->path_); |
| 13545 | span_.UnsafeArenaSwap(&other->span_); |
| 13546 | leading_comments_.Swap(&other->leading_comments_); |
| 13547 | trailing_comments_.Swap(&other->trailing_comments_); |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13548 | leading_detached_comments_.UnsafeArenaSwap(&other->leading_detached_comments_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13549 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 13550 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 13551 | std::swap(_cached_size_, other->_cached_size_); |
| 13552 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13553 | |
| 13554 | ::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const { |
| 13555 | protobuf_AssignDescriptorsOnce(); |
| 13556 | ::google::protobuf::Metadata metadata; |
| 13557 | metadata.descriptor = SourceCodeInfo_Location_descriptor_; |
| 13558 | metadata.reflection = SourceCodeInfo_Location_reflection_; |
| 13559 | return metadata; |
| 13560 | } |
| 13561 | |
| 13562 | |
| 13563 | // ------------------------------------------------------------------- |
| 13564 | |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 13565 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13566 | const int SourceCodeInfo::kLocationFieldNumber; |
Bruce Dawson | 86ba70e | 2015-10-29 12:41:29 -0700 | [diff] [blame] | 13567 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13568 | |
| 13569 | SourceCodeInfo::SourceCodeInfo() |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13570 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13571 | SharedCtor(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13572 | // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13573 | } |
| 13574 | |
| 13575 | void SourceCodeInfo::InitAsDefaultInstance() { |
| 13576 | } |
| 13577 | |
| 13578 | SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13579 | : ::google::protobuf::Message(), |
| 13580 | _internal_metadata_(NULL) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13581 | SharedCtor(); |
| 13582 | MergeFrom(from); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13583 | // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13584 | } |
| 13585 | |
| 13586 | void SourceCodeInfo::SharedCtor() { |
| 13587 | _cached_size_ = 0; |
| 13588 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 13589 | } |
| 13590 | |
| 13591 | SourceCodeInfo::~SourceCodeInfo() { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13592 | // @@protoc_insertion_point(destructor:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13593 | SharedDtor(); |
| 13594 | } |
| 13595 | |
| 13596 | void SourceCodeInfo::SharedDtor() { |
| 13597 | if (this != default_instance_) { |
| 13598 | } |
| 13599 | } |
| 13600 | |
| 13601 | void SourceCodeInfo::SetCachedSize(int size) const { |
| 13602 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13603 | _cached_size_ = size; |
| 13604 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13605 | } |
| 13606 | const ::google::protobuf::Descriptor* SourceCodeInfo::descriptor() { |
| 13607 | protobuf_AssignDescriptorsOnce(); |
| 13608 | return SourceCodeInfo_descriptor_; |
| 13609 | } |
| 13610 | |
| 13611 | const SourceCodeInfo& SourceCodeInfo::default_instance() { |
pliard@google.com | 6103d4e | 2012-05-04 11:16:09 +0000 | [diff] [blame] | 13612 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 13613 | return *default_instance_; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13614 | } |
| 13615 | |
| 13616 | SourceCodeInfo* SourceCodeInfo::default_instance_ = NULL; |
| 13617 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13618 | SourceCodeInfo* SourceCodeInfo::New(::google::protobuf::Arena* arena) const { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13619 | SourceCodeInfo* n = new SourceCodeInfo; |
| 13620 | if (arena != NULL) { |
| 13621 | arena->Own(n); |
| 13622 | } |
| 13623 | return n; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13624 | } |
| 13625 | |
| 13626 | void SourceCodeInfo::Clear() { |
| 13627 | location_.Clear(); |
| 13628 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13629 | if (_internal_metadata_.have_unknown_fields()) { |
| 13630 | mutable_unknown_fields()->Clear(); |
| 13631 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13632 | } |
| 13633 | |
| 13634 | bool SourceCodeInfo::MergePartialFromCodedStream( |
| 13635 | ::google::protobuf::io::CodedInputStream* input) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13636 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13637 | ::google::protobuf::uint32 tag; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13638 | // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo) |
| 13639 | for (;;) { |
| 13640 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 13641 | tag = p.first; |
| 13642 | if (!p.second) goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13643 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 13644 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
| 13645 | case 1: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13646 | if (tag == 10) { |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13647 | DO_(input->IncrementRecursionDepth()); |
| 13648 | parse_loop_location: |
| 13649 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13650 | input, add_location())); |
| 13651 | } else { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13652 | goto handle_unusual; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13653 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13654 | if (input->ExpectTag(10)) goto parse_loop_location; |
| 13655 | input->UnsafeDecrementRecursionDepth(); |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13656 | if (input->ExpectAtEnd()) goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13657 | break; |
| 13658 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13659 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13660 | default: { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13661 | handle_unusual: |
| 13662 | if (tag == 0 || |
| 13663 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13664 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13665 | goto success; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13666 | } |
| 13667 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 13668 | input, tag, mutable_unknown_fields())); |
| 13669 | break; |
| 13670 | } |
| 13671 | } |
| 13672 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13673 | success: |
| 13674 | // @@protoc_insertion_point(parse_success:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13675 | return true; |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13676 | failure: |
| 13677 | // @@protoc_insertion_point(parse_failure:google.protobuf.SourceCodeInfo) |
| 13678 | return false; |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13679 | #undef DO_ |
| 13680 | } |
| 13681 | |
| 13682 | void SourceCodeInfo::SerializeWithCachedSizes( |
| 13683 | ::google::protobuf::io::CodedOutputStream* output) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13684 | // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13685 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13686 | 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] | 13687 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 13688 | 1, this->location(i), output); |
| 13689 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13690 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13691 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13692 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 13693 | unknown_fields(), output); |
| 13694 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13695 | // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13696 | } |
| 13697 | |
| 13698 | ::google::protobuf::uint8* SourceCodeInfo::SerializeWithCachedSizesToArray( |
| 13699 | ::google::protobuf::uint8* target) const { |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13700 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13701 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13702 | 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] | 13703 | target = ::google::protobuf::internal::WireFormatLite:: |
| 13704 | WriteMessageNoVirtualToArray( |
| 13705 | 1, this->location(i), target); |
| 13706 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13707 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13708 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13709 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 13710 | unknown_fields(), target); |
| 13711 | } |
jieluo@google.com | 4de8f55 | 2014-07-18 00:47:59 +0000 | [diff] [blame] | 13712 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13713 | return target; |
| 13714 | } |
| 13715 | |
| 13716 | int SourceCodeInfo::ByteSize() const { |
| 13717 | int total_size = 0; |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13718 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13719 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
| 13720 | total_size += 1 * this->location_size(); |
| 13721 | for (int i = 0; i < this->location_size(); i++) { |
| 13722 | total_size += |
| 13723 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 13724 | this->location(i)); |
| 13725 | } |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13726 | |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13727 | if (_internal_metadata_.have_unknown_fields()) { |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13728 | total_size += |
| 13729 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 13730 | unknown_fields()); |
| 13731 | } |
| 13732 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 13733 | _cached_size_ = total_size; |
| 13734 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 13735 | return total_size; |
| 13736 | } |
| 13737 | |
| 13738 | void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13739 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13740 | const SourceCodeInfo* source = |
| 13741 | ::google::protobuf::internal::DynamicCastToGenerated<const SourceCodeInfo>( |
| 13742 | &from); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13743 | if (source == NULL) { |
| 13744 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 13745 | } else { |
| 13746 | MergeFrom(*source); |
| 13747 | } |
| 13748 | } |
| 13749 | |
| 13750 | void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) { |
Feng Xiao | f157a56 | 2014-11-14 11:50:31 -0800 | [diff] [blame] | 13751 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13752 | location_.MergeFrom(from.location_); |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13753 | if (from._internal_metadata_.have_unknown_fields()) { |
| 13754 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 13755 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13756 | } |
| 13757 | |
| 13758 | void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { |
| 13759 | if (&from == this) return; |
| 13760 | Clear(); |
| 13761 | MergeFrom(from); |
| 13762 | } |
| 13763 | |
| 13764 | void SourceCodeInfo::CopyFrom(const SourceCodeInfo& from) { |
| 13765 | if (&from == this) return; |
| 13766 | Clear(); |
| 13767 | MergeFrom(from); |
| 13768 | } |
| 13769 | |
| 13770 | bool SourceCodeInfo::IsInitialized() const { |
xiaofeng@google.com | b55a20f | 2012-09-22 02:40:50 +0000 | [diff] [blame] | 13771 | |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13772 | return true; |
| 13773 | } |
| 13774 | |
| 13775 | void SourceCodeInfo::Swap(SourceCodeInfo* other) { |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13776 | if (other == this) return; |
Feng Xiao | 6ef984a | 2014-11-10 17:34:54 -0800 | [diff] [blame] | 13777 | InternalSwap(other); |
| 13778 | } |
| 13779 | void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { |
| 13780 | location_.UnsafeArenaSwap(&other->location_); |
| 13781 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 13782 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 13783 | std::swap(_cached_size_, other->_cached_size_); |
| 13784 | } |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 13785 | |
| 13786 | ::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const { |
| 13787 | protobuf_AssignDescriptorsOnce(); |
| 13788 | ::google::protobuf::Metadata metadata; |
| 13789 | metadata.descriptor = SourceCodeInfo_descriptor_; |
| 13790 | metadata.reflection = SourceCodeInfo_reflection_; |
| 13791 | return metadata; |
| 13792 | } |
| 13793 | |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13794 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 13795 | // SourceCodeInfo_Location |
| 13796 | |
| 13797 | // repeated int32 path = 1 [packed = true]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13798 | int SourceCodeInfo_Location::path_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13799 | return path_.size(); |
| 13800 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13801 | void SourceCodeInfo_Location::clear_path() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13802 | path_.Clear(); |
| 13803 | } |
| 13804 | ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const { |
| 13805 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path) |
| 13806 | return path_.Get(index); |
| 13807 | } |
| 13808 | void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) { |
| 13809 | path_.Set(index, value); |
| 13810 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path) |
| 13811 | } |
| 13812 | void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) { |
| 13813 | path_.Add(value); |
| 13814 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path) |
| 13815 | } |
| 13816 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 13817 | SourceCodeInfo_Location::path() const { |
| 13818 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path) |
| 13819 | return path_; |
| 13820 | } |
| 13821 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 13822 | SourceCodeInfo_Location::mutable_path() { |
| 13823 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path) |
| 13824 | return &path_; |
| 13825 | } |
| 13826 | |
| 13827 | // repeated int32 span = 2 [packed = true]; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13828 | int SourceCodeInfo_Location::span_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13829 | return span_.size(); |
| 13830 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13831 | void SourceCodeInfo_Location::clear_span() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13832 | span_.Clear(); |
| 13833 | } |
| 13834 | ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const { |
| 13835 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span) |
| 13836 | return span_.Get(index); |
| 13837 | } |
| 13838 | void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) { |
| 13839 | span_.Set(index, value); |
| 13840 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span) |
| 13841 | } |
| 13842 | void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) { |
| 13843 | span_.Add(value); |
| 13844 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span) |
| 13845 | } |
| 13846 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 13847 | SourceCodeInfo_Location::span() const { |
| 13848 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span) |
| 13849 | return span_; |
| 13850 | } |
| 13851 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 13852 | SourceCodeInfo_Location::mutable_span() { |
| 13853 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span) |
| 13854 | return &span_; |
| 13855 | } |
| 13856 | |
| 13857 | // optional string leading_comments = 3; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13858 | bool SourceCodeInfo_Location::has_leading_comments() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13859 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 13860 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13861 | void SourceCodeInfo_Location::set_has_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13862 | _has_bits_[0] |= 0x00000004u; |
| 13863 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13864 | void SourceCodeInfo_Location::clear_has_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13865 | _has_bits_[0] &= ~0x00000004u; |
| 13866 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13867 | void SourceCodeInfo_Location::clear_leading_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13868 | leading_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13869 | clear_has_leading_comments(); |
| 13870 | } |
| 13871 | const ::std::string& SourceCodeInfo_Location::leading_comments() const { |
| 13872 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13873 | return leading_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13874 | } |
| 13875 | void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) { |
| 13876 | set_has_leading_comments(); |
| 13877 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 13878 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13879 | } |
| 13880 | void SourceCodeInfo_Location::set_leading_comments(const char* value) { |
| 13881 | set_has_leading_comments(); |
| 13882 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 13883 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13884 | } |
| 13885 | void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) { |
| 13886 | set_has_leading_comments(); |
| 13887 | leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13888 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13889 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13890 | } |
| 13891 | ::std::string* SourceCodeInfo_Location::mutable_leading_comments() { |
| 13892 | set_has_leading_comments(); |
| 13893 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13894 | return leading_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13895 | } |
| 13896 | ::std::string* SourceCodeInfo_Location::release_leading_comments() { |
| 13897 | clear_has_leading_comments(); |
| 13898 | return leading_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13899 | } |
| 13900 | void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) { |
| 13901 | if (leading_comments != NULL) { |
| 13902 | set_has_leading_comments(); |
| 13903 | } else { |
| 13904 | clear_has_leading_comments(); |
| 13905 | } |
| 13906 | leading_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments); |
| 13907 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) |
| 13908 | } |
| 13909 | |
| 13910 | // optional string trailing_comments = 4; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13911 | bool SourceCodeInfo_Location::has_trailing_comments() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13912 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 13913 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13914 | void SourceCodeInfo_Location::set_has_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13915 | _has_bits_[0] |= 0x00000008u; |
| 13916 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13917 | void SourceCodeInfo_Location::clear_has_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13918 | _has_bits_[0] &= ~0x00000008u; |
| 13919 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13920 | void SourceCodeInfo_Location::clear_trailing_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13921 | trailing_comments_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13922 | clear_has_trailing_comments(); |
| 13923 | } |
| 13924 | const ::std::string& SourceCodeInfo_Location::trailing_comments() const { |
| 13925 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13926 | return trailing_comments_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13927 | } |
| 13928 | void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) { |
| 13929 | set_has_trailing_comments(); |
| 13930 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 13931 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13932 | } |
| 13933 | void SourceCodeInfo_Location::set_trailing_comments(const char* value) { |
| 13934 | set_has_trailing_comments(); |
| 13935 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 13936 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13937 | } |
| 13938 | void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) { |
| 13939 | set_has_trailing_comments(); |
| 13940 | trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 13941 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 13942 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13943 | } |
| 13944 | ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() { |
| 13945 | set_has_trailing_comments(); |
| 13946 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13947 | return trailing_comments_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13948 | } |
| 13949 | ::std::string* SourceCodeInfo_Location::release_trailing_comments() { |
| 13950 | clear_has_trailing_comments(); |
| 13951 | return trailing_comments_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 13952 | } |
| 13953 | void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) { |
| 13954 | if (trailing_comments != NULL) { |
| 13955 | set_has_trailing_comments(); |
| 13956 | } else { |
| 13957 | clear_has_trailing_comments(); |
| 13958 | } |
| 13959 | trailing_comments_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments); |
| 13960 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) |
| 13961 | } |
| 13962 | |
| 13963 | // repeated string leading_detached_comments = 6; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13964 | int SourceCodeInfo_Location::leading_detached_comments_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13965 | return leading_detached_comments_.size(); |
| 13966 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 13967 | void SourceCodeInfo_Location::clear_leading_detached_comments() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 13968 | leading_detached_comments_.Clear(); |
| 13969 | } |
| 13970 | const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { |
| 13971 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13972 | return leading_detached_comments_.Get(index); |
| 13973 | } |
| 13974 | ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { |
| 13975 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13976 | return leading_detached_comments_.Mutable(index); |
| 13977 | } |
| 13978 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) { |
| 13979 | // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13980 | leading_detached_comments_.Mutable(index)->assign(value); |
| 13981 | } |
| 13982 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) { |
| 13983 | leading_detached_comments_.Mutable(index)->assign(value); |
| 13984 | // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13985 | } |
| 13986 | void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value, size_t size) { |
| 13987 | leading_detached_comments_.Mutable(index)->assign( |
| 13988 | reinterpret_cast<const char*>(value), size); |
| 13989 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13990 | } |
| 13991 | ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() { |
| 13992 | return leading_detached_comments_.Add(); |
| 13993 | } |
| 13994 | void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) { |
| 13995 | leading_detached_comments_.Add()->assign(value); |
| 13996 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 13997 | } |
| 13998 | void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) { |
| 13999 | leading_detached_comments_.Add()->assign(value); |
| 14000 | // @@protoc_insertion_point(field_add_char:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 14001 | } |
| 14002 | void SourceCodeInfo_Location::add_leading_detached_comments(const char* value, size_t size) { |
| 14003 | leading_detached_comments_.Add()->assign(reinterpret_cast<const char*>(value), size); |
| 14004 | // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 14005 | } |
| 14006 | const ::google::protobuf::RepeatedPtrField< ::std::string>& |
| 14007 | SourceCodeInfo_Location::leading_detached_comments() const { |
| 14008 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 14009 | return leading_detached_comments_; |
| 14010 | } |
| 14011 | ::google::protobuf::RepeatedPtrField< ::std::string>* |
| 14012 | SourceCodeInfo_Location::mutable_leading_detached_comments() { |
| 14013 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) |
| 14014 | return &leading_detached_comments_; |
| 14015 | } |
| 14016 | |
| 14017 | // ------------------------------------------------------------------- |
| 14018 | |
| 14019 | // SourceCodeInfo |
| 14020 | |
| 14021 | // repeated .google.protobuf.SourceCodeInfo.Location location = 1; |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 14022 | int SourceCodeInfo::location_size() const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14023 | return location_.size(); |
| 14024 | } |
Bo Yang | 5db2173 | 2015-05-21 14:28:59 -0700 | [diff] [blame] | 14025 | void SourceCodeInfo::clear_location() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14026 | location_.Clear(); |
| 14027 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 14028 | const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14029 | // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location) |
| 14030 | return location_.Get(index); |
| 14031 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 14032 | ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14033 | // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location) |
| 14034 | return location_.Mutable(index); |
| 14035 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 14036 | ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() { |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14037 | // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location) |
| 14038 | return location_.Add(); |
| 14039 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 14040 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14041 | SourceCodeInfo::mutable_location() { |
| 14042 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location) |
| 14043 | return &location_; |
| 14044 | } |
Feng Xiao | eee38b0 | 2015-08-22 18:25:48 -0700 | [diff] [blame] | 14045 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& |
| 14046 | SourceCodeInfo::location() const { |
| 14047 | // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location) |
| 14048 | return location_; |
| 14049 | } |
Jisi Liu | 885b612 | 2015-02-28 14:51:22 -0800 | [diff] [blame] | 14050 | |
| 14051 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
liujisi@google.com | 33165fe | 2010-11-02 13:14:58 +0000 | [diff] [blame] | 14052 | |
Jisi Liu | 5221dcb | 2016-01-29 13:51:05 -0800 | [diff] [blame] | 14053 | // =================================================================== |
| 14054 | |
| 14055 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 14056 | const int GeneratedCodeInfo_Annotation::kPathFieldNumber; |
| 14057 | const int GeneratedCodeInfo_Annotation::kSourceFileFieldNumber; |
| 14058 | const int GeneratedCodeInfo_Annotation::kBeginFieldNumber; |
| 14059 | const int GeneratedCodeInfo_Annotation::kEndFieldNumber; |
| 14060 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 14061 | |
| 14062 | GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation() |
| 14063 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 14064 | SharedCtor(); |
| 14065 | // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14066 | } |
| 14067 | |
| 14068 | void GeneratedCodeInfo_Annotation::InitAsDefaultInstance() { |
| 14069 | } |
| 14070 | |
| 14071 | GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from) |
| 14072 | : ::google::protobuf::Message(), |
| 14073 | _internal_metadata_(NULL) { |
| 14074 | SharedCtor(); |
| 14075 | MergeFrom(from); |
| 14076 | // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14077 | } |
| 14078 | |
| 14079 | void GeneratedCodeInfo_Annotation::SharedCtor() { |
| 14080 | ::google::protobuf::internal::GetEmptyString(); |
| 14081 | _cached_size_ = 0; |
| 14082 | source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14083 | begin_ = 0; |
| 14084 | end_ = 0; |
| 14085 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 14086 | } |
| 14087 | |
| 14088 | GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() { |
| 14089 | // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14090 | SharedDtor(); |
| 14091 | } |
| 14092 | |
| 14093 | void GeneratedCodeInfo_Annotation::SharedDtor() { |
| 14094 | source_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14095 | if (this != default_instance_) { |
| 14096 | } |
| 14097 | } |
| 14098 | |
| 14099 | void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const { |
| 14100 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 14101 | _cached_size_ = size; |
| 14102 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 14103 | } |
| 14104 | const ::google::protobuf::Descriptor* GeneratedCodeInfo_Annotation::descriptor() { |
| 14105 | protobuf_AssignDescriptorsOnce(); |
| 14106 | return GeneratedCodeInfo_Annotation_descriptor_; |
| 14107 | } |
| 14108 | |
| 14109 | const GeneratedCodeInfo_Annotation& GeneratedCodeInfo_Annotation::default_instance() { |
| 14110 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 14111 | return *default_instance_; |
| 14112 | } |
| 14113 | |
| 14114 | GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::default_instance_ = NULL; |
| 14115 | |
| 14116 | GeneratedCodeInfo_Annotation* GeneratedCodeInfo_Annotation::New(::google::protobuf::Arena* arena) const { |
| 14117 | GeneratedCodeInfo_Annotation* n = new GeneratedCodeInfo_Annotation; |
| 14118 | if (arena != NULL) { |
| 14119 | arena->Own(n); |
| 14120 | } |
| 14121 | return n; |
| 14122 | } |
| 14123 | |
| 14124 | void GeneratedCodeInfo_Annotation::Clear() { |
| 14125 | #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 14126 | &reinterpret_cast<GeneratedCodeInfo_Annotation*>(16)->f) |
| 14127 | |
| 14128 | #define ZR_(first, last) do {\ |
| 14129 | ::memset(&first, 0,\ |
| 14130 | ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 14131 | } while (0) |
| 14132 | |
| 14133 | if (_has_bits_[0 / 32] & 14u) { |
| 14134 | ZR_(begin_, end_); |
| 14135 | if (has_source_file()) { |
| 14136 | source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14137 | } |
| 14138 | } |
| 14139 | |
| 14140 | #undef ZR_HELPER_ |
| 14141 | #undef ZR_ |
| 14142 | |
| 14143 | path_.Clear(); |
| 14144 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 14145 | if (_internal_metadata_.have_unknown_fields()) { |
| 14146 | mutable_unknown_fields()->Clear(); |
| 14147 | } |
| 14148 | } |
| 14149 | |
| 14150 | bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( |
| 14151 | ::google::protobuf::io::CodedInputStream* input) { |
| 14152 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 14153 | ::google::protobuf::uint32 tag; |
| 14154 | // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14155 | for (;;) { |
| 14156 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 14157 | tag = p.first; |
| 14158 | if (!p.second) goto handle_unusual; |
| 14159 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 14160 | // repeated int32 path = 1 [packed = true]; |
| 14161 | case 1: { |
| 14162 | if (tag == 10) { |
| 14163 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 14164 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 14165 | input, this->mutable_path()))); |
| 14166 | } else if (tag == 8) { |
| 14167 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 14168 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 14169 | 1, 10, input, this->mutable_path()))); |
| 14170 | } else { |
| 14171 | goto handle_unusual; |
| 14172 | } |
| 14173 | if (input->ExpectTag(18)) goto parse_source_file; |
| 14174 | break; |
| 14175 | } |
| 14176 | |
| 14177 | // optional string source_file = 2; |
| 14178 | case 2: { |
| 14179 | if (tag == 18) { |
| 14180 | parse_source_file: |
| 14181 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 14182 | input, this->mutable_source_file())); |
| 14183 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 14184 | this->source_file().data(), this->source_file().length(), |
| 14185 | ::google::protobuf::internal::WireFormat::PARSE, |
| 14186 | "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); |
| 14187 | } else { |
| 14188 | goto handle_unusual; |
| 14189 | } |
| 14190 | if (input->ExpectTag(24)) goto parse_begin; |
| 14191 | break; |
| 14192 | } |
| 14193 | |
| 14194 | // optional int32 begin = 3; |
| 14195 | case 3: { |
| 14196 | if (tag == 24) { |
| 14197 | parse_begin: |
| 14198 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 14199 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 14200 | input, &begin_))); |
| 14201 | set_has_begin(); |
| 14202 | } else { |
| 14203 | goto handle_unusual; |
| 14204 | } |
| 14205 | if (input->ExpectTag(32)) goto parse_end; |
| 14206 | break; |
| 14207 | } |
| 14208 | |
| 14209 | // optional int32 end = 4; |
| 14210 | case 4: { |
| 14211 | if (tag == 32) { |
| 14212 | parse_end: |
| 14213 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 14214 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 14215 | input, &end_))); |
| 14216 | set_has_end(); |
| 14217 | } else { |
| 14218 | goto handle_unusual; |
| 14219 | } |
| 14220 | if (input->ExpectAtEnd()) goto success; |
| 14221 | break; |
| 14222 | } |
| 14223 | |
| 14224 | default: { |
| 14225 | handle_unusual: |
| 14226 | if (tag == 0 || |
| 14227 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 14228 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 14229 | goto success; |
| 14230 | } |
| 14231 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 14232 | input, tag, mutable_unknown_fields())); |
| 14233 | break; |
| 14234 | } |
| 14235 | } |
| 14236 | } |
| 14237 | success: |
| 14238 | // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14239 | return true; |
| 14240 | failure: |
| 14241 | // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14242 | return false; |
| 14243 | #undef DO_ |
| 14244 | } |
| 14245 | |
| 14246 | void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( |
| 14247 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 14248 | // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14249 | // repeated int32 path = 1 [packed = true]; |
| 14250 | if (this->path_size() > 0) { |
| 14251 | ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 14252 | output->WriteVarint32(_path_cached_byte_size_); |
| 14253 | } |
| 14254 | for (int i = 0; i < this->path_size(); i++) { |
| 14255 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 14256 | this->path(i), output); |
| 14257 | } |
| 14258 | |
| 14259 | // optional string source_file = 2; |
| 14260 | if (has_source_file()) { |
| 14261 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 14262 | this->source_file().data(), this->source_file().length(), |
| 14263 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 14264 | "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); |
| 14265 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 14266 | 2, this->source_file(), output); |
| 14267 | } |
| 14268 | |
| 14269 | // optional int32 begin = 3; |
| 14270 | if (has_begin()) { |
| 14271 | ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->begin(), output); |
| 14272 | } |
| 14273 | |
| 14274 | // optional int32 end = 4; |
| 14275 | if (has_end()) { |
| 14276 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->end(), output); |
| 14277 | } |
| 14278 | |
| 14279 | if (_internal_metadata_.have_unknown_fields()) { |
| 14280 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 14281 | unknown_fields(), output); |
| 14282 | } |
| 14283 | // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14284 | } |
| 14285 | |
| 14286 | ::google::protobuf::uint8* GeneratedCodeInfo_Annotation::SerializeWithCachedSizesToArray( |
| 14287 | ::google::protobuf::uint8* target) const { |
| 14288 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14289 | // repeated int32 path = 1 [packed = true]; |
| 14290 | if (this->path_size() > 0) { |
| 14291 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 14292 | 1, |
| 14293 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 14294 | target); |
| 14295 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 14296 | _path_cached_byte_size_, target); |
| 14297 | } |
| 14298 | for (int i = 0; i < this->path_size(); i++) { |
| 14299 | target = ::google::protobuf::internal::WireFormatLite:: |
| 14300 | WriteInt32NoTagToArray(this->path(i), target); |
| 14301 | } |
| 14302 | |
| 14303 | // optional string source_file = 2; |
| 14304 | if (has_source_file()) { |
| 14305 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
| 14306 | this->source_file().data(), this->source_file().length(), |
| 14307 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
| 14308 | "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); |
| 14309 | target = |
| 14310 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 14311 | 2, this->source_file(), target); |
| 14312 | } |
| 14313 | |
| 14314 | // optional int32 begin = 3; |
| 14315 | if (has_begin()) { |
| 14316 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target); |
| 14317 | } |
| 14318 | |
| 14319 | // optional int32 end = 4; |
| 14320 | if (has_end()) { |
| 14321 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target); |
| 14322 | } |
| 14323 | |
| 14324 | if (_internal_metadata_.have_unknown_fields()) { |
| 14325 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 14326 | unknown_fields(), target); |
| 14327 | } |
| 14328 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation) |
| 14329 | return target; |
| 14330 | } |
| 14331 | |
| 14332 | int GeneratedCodeInfo_Annotation::ByteSize() const { |
| 14333 | int total_size = 0; |
| 14334 | |
| 14335 | if (_has_bits_[1 / 32] & 14u) { |
| 14336 | // optional string source_file = 2; |
| 14337 | if (has_source_file()) { |
| 14338 | total_size += 1 + |
| 14339 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 14340 | this->source_file()); |
| 14341 | } |
| 14342 | |
| 14343 | // optional int32 begin = 3; |
| 14344 | if (has_begin()) { |
| 14345 | total_size += 1 + |
| 14346 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 14347 | this->begin()); |
| 14348 | } |
| 14349 | |
| 14350 | // optional int32 end = 4; |
| 14351 | if (has_end()) { |
| 14352 | total_size += 1 + |
| 14353 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 14354 | this->end()); |
| 14355 | } |
| 14356 | |
| 14357 | } |
| 14358 | // repeated int32 path = 1 [packed = true]; |
| 14359 | { |
| 14360 | int data_size = 0; |
| 14361 | for (int i = 0; i < this->path_size(); i++) { |
| 14362 | data_size += ::google::protobuf::internal::WireFormatLite:: |
| 14363 | Int32Size(this->path(i)); |
| 14364 | } |
| 14365 | if (data_size > 0) { |
| 14366 | total_size += 1 + |
| 14367 | ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); |
| 14368 | } |
| 14369 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 14370 | _path_cached_byte_size_ = data_size; |
| 14371 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 14372 | total_size += data_size; |
| 14373 | } |
| 14374 | |
| 14375 | if (_internal_metadata_.have_unknown_fields()) { |
| 14376 | total_size += |
| 14377 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 14378 | unknown_fields()); |
| 14379 | } |
| 14380 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 14381 | _cached_size_ = total_size; |
| 14382 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 14383 | return total_size; |
| 14384 | } |
| 14385 | |
| 14386 | void GeneratedCodeInfo_Annotation::MergeFrom(const ::google::protobuf::Message& from) { |
| 14387 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 14388 | const GeneratedCodeInfo_Annotation* source = |
| 14389 | ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo_Annotation>( |
| 14390 | &from); |
| 14391 | if (source == NULL) { |
| 14392 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 14393 | } else { |
| 14394 | MergeFrom(*source); |
| 14395 | } |
| 14396 | } |
| 14397 | |
| 14398 | void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& from) { |
| 14399 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 14400 | path_.MergeFrom(from.path_); |
| 14401 | if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { |
| 14402 | if (from.has_source_file()) { |
| 14403 | set_has_source_file(); |
| 14404 | source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_); |
| 14405 | } |
| 14406 | if (from.has_begin()) { |
| 14407 | set_begin(from.begin()); |
| 14408 | } |
| 14409 | if (from.has_end()) { |
| 14410 | set_end(from.end()); |
| 14411 | } |
| 14412 | } |
| 14413 | if (from._internal_metadata_.have_unknown_fields()) { |
| 14414 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 14415 | } |
| 14416 | } |
| 14417 | |
| 14418 | void GeneratedCodeInfo_Annotation::CopyFrom(const ::google::protobuf::Message& from) { |
| 14419 | if (&from == this) return; |
| 14420 | Clear(); |
| 14421 | MergeFrom(from); |
| 14422 | } |
| 14423 | |
| 14424 | void GeneratedCodeInfo_Annotation::CopyFrom(const GeneratedCodeInfo_Annotation& from) { |
| 14425 | if (&from == this) return; |
| 14426 | Clear(); |
| 14427 | MergeFrom(from); |
| 14428 | } |
| 14429 | |
| 14430 | bool GeneratedCodeInfo_Annotation::IsInitialized() const { |
| 14431 | |
| 14432 | return true; |
| 14433 | } |
| 14434 | |
| 14435 | void GeneratedCodeInfo_Annotation::Swap(GeneratedCodeInfo_Annotation* other) { |
| 14436 | if (other == this) return; |
| 14437 | InternalSwap(other); |
| 14438 | } |
| 14439 | void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* other) { |
| 14440 | path_.UnsafeArenaSwap(&other->path_); |
| 14441 | source_file_.Swap(&other->source_file_); |
| 14442 | std::swap(begin_, other->begin_); |
| 14443 | std::swap(end_, other->end_); |
| 14444 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 14445 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 14446 | std::swap(_cached_size_, other->_cached_size_); |
| 14447 | } |
| 14448 | |
| 14449 | ::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const { |
| 14450 | protobuf_AssignDescriptorsOnce(); |
| 14451 | ::google::protobuf::Metadata metadata; |
| 14452 | metadata.descriptor = GeneratedCodeInfo_Annotation_descriptor_; |
| 14453 | metadata.reflection = GeneratedCodeInfo_Annotation_reflection_; |
| 14454 | return metadata; |
| 14455 | } |
| 14456 | |
| 14457 | |
| 14458 | // ------------------------------------------------------------------- |
| 14459 | |
| 14460 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 14461 | const int GeneratedCodeInfo::kAnnotationFieldNumber; |
| 14462 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 14463 | |
| 14464 | GeneratedCodeInfo::GeneratedCodeInfo() |
| 14465 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 14466 | SharedCtor(); |
| 14467 | // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo) |
| 14468 | } |
| 14469 | |
| 14470 | void GeneratedCodeInfo::InitAsDefaultInstance() { |
| 14471 | } |
| 14472 | |
| 14473 | GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) |
| 14474 | : ::google::protobuf::Message(), |
| 14475 | _internal_metadata_(NULL) { |
| 14476 | SharedCtor(); |
| 14477 | MergeFrom(from); |
| 14478 | // @@protoc_insertion_point(copy_constructor:google.protobuf.GeneratedCodeInfo) |
| 14479 | } |
| 14480 | |
| 14481 | void GeneratedCodeInfo::SharedCtor() { |
| 14482 | _cached_size_ = 0; |
| 14483 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 14484 | } |
| 14485 | |
| 14486 | GeneratedCodeInfo::~GeneratedCodeInfo() { |
| 14487 | // @@protoc_insertion_point(destructor:google.protobuf.GeneratedCodeInfo) |
| 14488 | SharedDtor(); |
| 14489 | } |
| 14490 | |
| 14491 | void GeneratedCodeInfo::SharedDtor() { |
| 14492 | if (this != default_instance_) { |
| 14493 | } |
| 14494 | } |
| 14495 | |
| 14496 | void GeneratedCodeInfo::SetCachedSize(int size) const { |
| 14497 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 14498 | _cached_size_ = size; |
| 14499 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 14500 | } |
| 14501 | const ::google::protobuf::Descriptor* GeneratedCodeInfo::descriptor() { |
| 14502 | protobuf_AssignDescriptorsOnce(); |
| 14503 | return GeneratedCodeInfo_descriptor_; |
| 14504 | } |
| 14505 | |
| 14506 | const GeneratedCodeInfo& GeneratedCodeInfo::default_instance() { |
| 14507 | if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); |
| 14508 | return *default_instance_; |
| 14509 | } |
| 14510 | |
| 14511 | GeneratedCodeInfo* GeneratedCodeInfo::default_instance_ = NULL; |
| 14512 | |
| 14513 | GeneratedCodeInfo* GeneratedCodeInfo::New(::google::protobuf::Arena* arena) const { |
| 14514 | GeneratedCodeInfo* n = new GeneratedCodeInfo; |
| 14515 | if (arena != NULL) { |
| 14516 | arena->Own(n); |
| 14517 | } |
| 14518 | return n; |
| 14519 | } |
| 14520 | |
| 14521 | void GeneratedCodeInfo::Clear() { |
| 14522 | annotation_.Clear(); |
| 14523 | ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| 14524 | if (_internal_metadata_.have_unknown_fields()) { |
| 14525 | mutable_unknown_fields()->Clear(); |
| 14526 | } |
| 14527 | } |
| 14528 | |
| 14529 | bool GeneratedCodeInfo::MergePartialFromCodedStream( |
| 14530 | ::google::protobuf::io::CodedInputStream* input) { |
| 14531 | #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure |
| 14532 | ::google::protobuf::uint32 tag; |
| 14533 | // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo) |
| 14534 | for (;;) { |
| 14535 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| 14536 | tag = p.first; |
| 14537 | if (!p.second) goto handle_unusual; |
| 14538 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 14539 | // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
| 14540 | case 1: { |
| 14541 | if (tag == 10) { |
| 14542 | DO_(input->IncrementRecursionDepth()); |
| 14543 | parse_loop_annotation: |
| 14544 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( |
| 14545 | input, add_annotation())); |
| 14546 | } else { |
| 14547 | goto handle_unusual; |
| 14548 | } |
| 14549 | if (input->ExpectTag(10)) goto parse_loop_annotation; |
| 14550 | input->UnsafeDecrementRecursionDepth(); |
| 14551 | if (input->ExpectAtEnd()) goto success; |
| 14552 | break; |
| 14553 | } |
| 14554 | |
| 14555 | default: { |
| 14556 | handle_unusual: |
| 14557 | if (tag == 0 || |
| 14558 | ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 14559 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 14560 | goto success; |
| 14561 | } |
| 14562 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 14563 | input, tag, mutable_unknown_fields())); |
| 14564 | break; |
| 14565 | } |
| 14566 | } |
| 14567 | } |
| 14568 | success: |
| 14569 | // @@protoc_insertion_point(parse_success:google.protobuf.GeneratedCodeInfo) |
| 14570 | return true; |
| 14571 | failure: |
| 14572 | // @@protoc_insertion_point(parse_failure:google.protobuf.GeneratedCodeInfo) |
| 14573 | return false; |
| 14574 | #undef DO_ |
| 14575 | } |
| 14576 | |
| 14577 | void GeneratedCodeInfo::SerializeWithCachedSizes( |
| 14578 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 14579 | // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo) |
| 14580 | // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
| 14581 | for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) { |
| 14582 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 14583 | 1, this->annotation(i), output); |
| 14584 | } |
| 14585 | |
| 14586 | if (_internal_metadata_.have_unknown_fields()) { |
| 14587 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 14588 | unknown_fields(), output); |
| 14589 | } |
| 14590 | // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo) |
| 14591 | } |
| 14592 | |
| 14593 | ::google::protobuf::uint8* GeneratedCodeInfo::SerializeWithCachedSizesToArray( |
| 14594 | ::google::protobuf::uint8* target) const { |
| 14595 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) |
| 14596 | // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
| 14597 | for (unsigned int i = 0, n = this->annotation_size(); i < n; i++) { |
| 14598 | target = ::google::protobuf::internal::WireFormatLite:: |
| 14599 | WriteMessageNoVirtualToArray( |
| 14600 | 1, this->annotation(i), target); |
| 14601 | } |
| 14602 | |
| 14603 | if (_internal_metadata_.have_unknown_fields()) { |
| 14604 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 14605 | unknown_fields(), target); |
| 14606 | } |
| 14607 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo) |
| 14608 | return target; |
| 14609 | } |
| 14610 | |
| 14611 | int GeneratedCodeInfo::ByteSize() const { |
| 14612 | int total_size = 0; |
| 14613 | |
| 14614 | // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
| 14615 | total_size += 1 * this->annotation_size(); |
| 14616 | for (int i = 0; i < this->annotation_size(); i++) { |
| 14617 | total_size += |
| 14618 | ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| 14619 | this->annotation(i)); |
| 14620 | } |
| 14621 | |
| 14622 | if (_internal_metadata_.have_unknown_fields()) { |
| 14623 | total_size += |
| 14624 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 14625 | unknown_fields()); |
| 14626 | } |
| 14627 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 14628 | _cached_size_ = total_size; |
| 14629 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 14630 | return total_size; |
| 14631 | } |
| 14632 | |
| 14633 | void GeneratedCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { |
| 14634 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 14635 | const GeneratedCodeInfo* source = |
| 14636 | ::google::protobuf::internal::DynamicCastToGenerated<const GeneratedCodeInfo>( |
| 14637 | &from); |
| 14638 | if (source == NULL) { |
| 14639 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 14640 | } else { |
| 14641 | MergeFrom(*source); |
| 14642 | } |
| 14643 | } |
| 14644 | |
| 14645 | void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) { |
| 14646 | if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 14647 | annotation_.MergeFrom(from.annotation_); |
| 14648 | if (from._internal_metadata_.have_unknown_fields()) { |
| 14649 | mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| 14650 | } |
| 14651 | } |
| 14652 | |
| 14653 | void GeneratedCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { |
| 14654 | if (&from == this) return; |
| 14655 | Clear(); |
| 14656 | MergeFrom(from); |
| 14657 | } |
| 14658 | |
| 14659 | void GeneratedCodeInfo::CopyFrom(const GeneratedCodeInfo& from) { |
| 14660 | if (&from == this) return; |
| 14661 | Clear(); |
| 14662 | MergeFrom(from); |
| 14663 | } |
| 14664 | |
| 14665 | bool GeneratedCodeInfo::IsInitialized() const { |
| 14666 | |
| 14667 | return true; |
| 14668 | } |
| 14669 | |
| 14670 | void GeneratedCodeInfo::Swap(GeneratedCodeInfo* other) { |
| 14671 | if (other == this) return; |
| 14672 | InternalSwap(other); |
| 14673 | } |
| 14674 | void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) { |
| 14675 | annotation_.UnsafeArenaSwap(&other->annotation_); |
| 14676 | std::swap(_has_bits_[0], other->_has_bits_[0]); |
| 14677 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 14678 | std::swap(_cached_size_, other->_cached_size_); |
| 14679 | } |
| 14680 | |
| 14681 | ::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const { |
| 14682 | protobuf_AssignDescriptorsOnce(); |
| 14683 | ::google::protobuf::Metadata metadata; |
| 14684 | metadata.descriptor = GeneratedCodeInfo_descriptor_; |
| 14685 | metadata.reflection = GeneratedCodeInfo_reflection_; |
| 14686 | return metadata; |
| 14687 | } |
| 14688 | |
| 14689 | #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 14690 | // GeneratedCodeInfo_Annotation |
| 14691 | |
| 14692 | // repeated int32 path = 1 [packed = true]; |
| 14693 | int GeneratedCodeInfo_Annotation::path_size() const { |
| 14694 | return path_.size(); |
| 14695 | } |
| 14696 | void GeneratedCodeInfo_Annotation::clear_path() { |
| 14697 | path_.Clear(); |
| 14698 | } |
| 14699 | ::google::protobuf::int32 GeneratedCodeInfo_Annotation::path(int index) const { |
| 14700 | // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path) |
| 14701 | return path_.Get(index); |
| 14702 | } |
| 14703 | void GeneratedCodeInfo_Annotation::set_path(int index, ::google::protobuf::int32 value) { |
| 14704 | path_.Set(index, value); |
| 14705 | // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path) |
| 14706 | } |
| 14707 | void GeneratedCodeInfo_Annotation::add_path(::google::protobuf::int32 value) { |
| 14708 | path_.Add(value); |
| 14709 | // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path) |
| 14710 | } |
| 14711 | const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& |
| 14712 | GeneratedCodeInfo_Annotation::path() const { |
| 14713 | // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path) |
| 14714 | return path_; |
| 14715 | } |
| 14716 | ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* |
| 14717 | GeneratedCodeInfo_Annotation::mutable_path() { |
| 14718 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path) |
| 14719 | return &path_; |
| 14720 | } |
| 14721 | |
| 14722 | // optional string source_file = 2; |
| 14723 | bool GeneratedCodeInfo_Annotation::has_source_file() const { |
| 14724 | return (_has_bits_[0] & 0x00000002u) != 0; |
| 14725 | } |
| 14726 | void GeneratedCodeInfo_Annotation::set_has_source_file() { |
| 14727 | _has_bits_[0] |= 0x00000002u; |
| 14728 | } |
| 14729 | void GeneratedCodeInfo_Annotation::clear_has_source_file() { |
| 14730 | _has_bits_[0] &= ~0x00000002u; |
| 14731 | } |
| 14732 | void GeneratedCodeInfo_Annotation::clear_source_file() { |
| 14733 | source_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14734 | clear_has_source_file(); |
| 14735 | } |
| 14736 | const ::std::string& GeneratedCodeInfo_Annotation::source_file() const { |
| 14737 | // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14738 | return source_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14739 | } |
| 14740 | void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) { |
| 14741 | set_has_source_file(); |
| 14742 | source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
| 14743 | // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14744 | } |
| 14745 | void GeneratedCodeInfo_Annotation::set_source_file(const char* value) { |
| 14746 | set_has_source_file(); |
| 14747 | source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
| 14748 | // @@protoc_insertion_point(field_set_char:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14749 | } |
| 14750 | void GeneratedCodeInfo_Annotation::set_source_file(const char* value, size_t size) { |
| 14751 | set_has_source_file(); |
| 14752 | source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 14753 | ::std::string(reinterpret_cast<const char*>(value), size)); |
| 14754 | // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14755 | } |
| 14756 | ::std::string* GeneratedCodeInfo_Annotation::mutable_source_file() { |
| 14757 | set_has_source_file(); |
| 14758 | // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14759 | return source_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14760 | } |
| 14761 | ::std::string* GeneratedCodeInfo_Annotation::release_source_file() { |
| 14762 | clear_has_source_file(); |
| 14763 | return source_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 14764 | } |
| 14765 | void GeneratedCodeInfo_Annotation::set_allocated_source_file(::std::string* source_file) { |
| 14766 | if (source_file != NULL) { |
| 14767 | set_has_source_file(); |
| 14768 | } else { |
| 14769 | clear_has_source_file(); |
| 14770 | } |
| 14771 | source_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source_file); |
| 14772 | // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file) |
| 14773 | } |
| 14774 | |
| 14775 | // optional int32 begin = 3; |
| 14776 | bool GeneratedCodeInfo_Annotation::has_begin() const { |
| 14777 | return (_has_bits_[0] & 0x00000004u) != 0; |
| 14778 | } |
| 14779 | void GeneratedCodeInfo_Annotation::set_has_begin() { |
| 14780 | _has_bits_[0] |= 0x00000004u; |
| 14781 | } |
| 14782 | void GeneratedCodeInfo_Annotation::clear_has_begin() { |
| 14783 | _has_bits_[0] &= ~0x00000004u; |
| 14784 | } |
| 14785 | void GeneratedCodeInfo_Annotation::clear_begin() { |
| 14786 | begin_ = 0; |
| 14787 | clear_has_begin(); |
| 14788 | } |
| 14789 | ::google::protobuf::int32 GeneratedCodeInfo_Annotation::begin() const { |
| 14790 | // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin) |
| 14791 | return begin_; |
| 14792 | } |
| 14793 | void GeneratedCodeInfo_Annotation::set_begin(::google::protobuf::int32 value) { |
| 14794 | set_has_begin(); |
| 14795 | begin_ = value; |
| 14796 | // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin) |
| 14797 | } |
| 14798 | |
| 14799 | // optional int32 end = 4; |
| 14800 | bool GeneratedCodeInfo_Annotation::has_end() const { |
| 14801 | return (_has_bits_[0] & 0x00000008u) != 0; |
| 14802 | } |
| 14803 | void GeneratedCodeInfo_Annotation::set_has_end() { |
| 14804 | _has_bits_[0] |= 0x00000008u; |
| 14805 | } |
| 14806 | void GeneratedCodeInfo_Annotation::clear_has_end() { |
| 14807 | _has_bits_[0] &= ~0x00000008u; |
| 14808 | } |
| 14809 | void GeneratedCodeInfo_Annotation::clear_end() { |
| 14810 | end_ = 0; |
| 14811 | clear_has_end(); |
| 14812 | } |
| 14813 | ::google::protobuf::int32 GeneratedCodeInfo_Annotation::end() const { |
| 14814 | // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end) |
| 14815 | return end_; |
| 14816 | } |
| 14817 | void GeneratedCodeInfo_Annotation::set_end(::google::protobuf::int32 value) { |
| 14818 | set_has_end(); |
| 14819 | end_ = value; |
| 14820 | // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end) |
| 14821 | } |
| 14822 | |
| 14823 | // ------------------------------------------------------------------- |
| 14824 | |
| 14825 | // GeneratedCodeInfo |
| 14826 | |
| 14827 | // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; |
| 14828 | int GeneratedCodeInfo::annotation_size() const { |
| 14829 | return annotation_.size(); |
| 14830 | } |
| 14831 | void GeneratedCodeInfo::clear_annotation() { |
| 14832 | annotation_.Clear(); |
| 14833 | } |
| 14834 | const ::google::protobuf::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const { |
| 14835 | // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.annotation) |
| 14836 | return annotation_.Get(index); |
| 14837 | } |
| 14838 | ::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) { |
| 14839 | // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation) |
| 14840 | return annotation_.Mutable(index); |
| 14841 | } |
| 14842 | ::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() { |
| 14843 | // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation) |
| 14844 | return annotation_.Add(); |
| 14845 | } |
| 14846 | ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >* |
| 14847 | GeneratedCodeInfo::mutable_annotation() { |
| 14848 | // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation) |
| 14849 | return &annotation_; |
| 14850 | } |
| 14851 | const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >& |
| 14852 | GeneratedCodeInfo::annotation() const { |
| 14853 | // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation) |
| 14854 | return annotation_; |
| 14855 | } |
| 14856 | |
| 14857 | #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 14858 | |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 14859 | // @@protoc_insertion_point(namespace_scope) |
| 14860 | |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 14861 | } // namespace protobuf |
| 14862 | } // namespace google |
kenton@google.com | fccb146 | 2009-12-18 02:11:36 +0000 | [diff] [blame] | 14863 | |
| 14864 | // @@protoc_insertion_point(global_scope) |