| OLD | NEW |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: google/protobuf/empty.proto | 2 // source: google/protobuf/empty.proto |
| 3 | 3 |
| 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION | 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| 5 #include <google/protobuf/empty.pb.h> | 5 #include <google/protobuf/empty.pb.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
| 10 #include <google/protobuf/stubs/port.h> | 10 #include <google/protobuf/stubs/port.h> |
| 11 #include <google/protobuf/stubs/once.h> | 11 #include <google/protobuf/stubs/once.h> |
| 12 #include <google/protobuf/io/coded_stream.h> | 12 #include <google/protobuf/io/coded_stream.h> |
| 13 #include <google/protobuf/wire_format_lite_inl.h> | 13 #include <google/protobuf/wire_format_lite_inl.h> |
| 14 #include <google/protobuf/descriptor.h> | 14 #include <google/protobuf/descriptor.h> |
| 15 #include <google/protobuf/generated_message_reflection.h> | 15 #include <google/protobuf/generated_message_reflection.h> |
| 16 #include <google/protobuf/reflection_ops.h> | 16 #include <google/protobuf/reflection_ops.h> |
| 17 #include <google/protobuf/wire_format.h> | 17 #include <google/protobuf/wire_format.h> |
| 18 // @@protoc_insertion_point(includes) | 18 // @@protoc_insertion_point(includes) |
| 19 | 19 |
| 20 namespace google { | 20 namespace google { |
| 21 namespace protobuf { | 21 namespace protobuf { |
| 22 class EmptyDefaultTypeInternal : public ::google::protobuf::internal::Explicitly
Constructed<Empty> {}; |
| 23 EmptyDefaultTypeInternal _Empty_default_instance_; |
| 22 | 24 |
| 23 namespace { | 25 namespace { |
| 24 | 26 |
| 25 const ::google::protobuf::Descriptor* Empty_descriptor_ = NULL; | 27 ::google::protobuf::Metadata file_level_metadata[1]; |
| 26 const ::google::protobuf::internal::GeneratedMessageReflection* | |
| 27 Empty_reflection_ = NULL; | |
| 28 | 28 |
| 29 } // namespace | 29 } // namespace |
| 30 | 30 |
| 31 | 31 |
| 32 void protobuf_AssignDesc_google_2fprotobuf_2fempty_2eproto() { | 32 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fempty_2ep
roto() GOOGLE_ATTRIBUTE_COLD; |
| 33 protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto(); | 33 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fempty_2ep
roto() { |
| 34 const ::google::protobuf::FileDescriptor* file = | 34 static const ::google::protobuf::uint32 offsets[] = { |
| 35 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( | 35 ~0u, // no _has_bits_ |
| 36 "google/protobuf/empty.proto"); | 36 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Empty, _internal_metadata_), |
| 37 GOOGLE_CHECK(file != NULL); | 37 ~0u, // no _extensions_ |
| 38 Empty_descriptor_ = file->message_type(0); | 38 ~0u, // no _oneof_case_ |
| 39 static const int Empty_offsets_[1] = { | |
| 40 }; | 39 }; |
| 41 Empty_reflection_ = | 40 return offsets; |
| 42 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( | |
| 43 Empty_descriptor_, | |
| 44 Empty::default_instance_, | |
| 45 Empty_offsets_, | |
| 46 -1, | |
| 47 -1, | |
| 48 -1, | |
| 49 sizeof(Empty), | |
| 50 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Empty, _internal_metadata_)
, | |
| 51 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Empty, _is_default_instance
_)); | |
| 52 } | 41 } |
| 53 | 42 |
| 43 static const ::google::protobuf::internal::MigrationSchema schemas[] = { |
| 44 { 0, -1, sizeof(Empty)}, |
| 45 }; |
| 46 |
| 47 static const ::google::protobuf::internal::DefaultInstanceData file_default_inst
ances[] = { |
| 48 {reinterpret_cast<const ::google::protobuf::Message*>(&_Empty_default_instance
_), NULL}, |
| 49 }; |
| 50 |
| 54 namespace { | 51 namespace { |
| 55 | 52 |
| 56 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); | 53 void protobuf_AssignDescriptors() { |
| 57 inline void protobuf_AssignDescriptorsOnce() { | 54 protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto(); |
| 58 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, | 55 ::google::protobuf::MessageFactory* factory = NULL; |
| 59 &protobuf_AssignDesc_google_2fprotobuf_2fempty_2eproto); | 56 AssignDescriptors( |
| 57 "google/protobuf/empty.proto", schemas, file_default_instances, protobuf_O
ffsets_google_2fprotobuf_2fempty_2eproto(), factory, |
| 58 file_level_metadata, NULL, NULL); |
| 60 } | 59 } |
| 61 | 60 |
| 61 void protobuf_AssignDescriptorsOnce() { |
| 62 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
| 63 ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
| 64 } |
| 65 |
| 66 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; |
| 62 void protobuf_RegisterTypes(const ::std::string&) { | 67 void protobuf_RegisterTypes(const ::std::string&) { |
| 63 protobuf_AssignDescriptorsOnce(); | 68 protobuf_AssignDescriptorsOnce(); |
| 64 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( | 69 ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); |
| 65 Empty_descriptor_, &Empty::default_instance()); | |
| 66 } | 70 } |
| 67 | 71 |
| 68 } // namespace | 72 } // namespace |
| 69 | 73 |
| 70 void protobuf_ShutdownFile_google_2fprotobuf_2fempty_2eproto() { | 74 void protobuf_ShutdownFile_google_2fprotobuf_2fempty_2eproto() { |
| 71 delete Empty::default_instance_; | 75 _Empty_default_instance_.Shutdown(); |
| 72 delete Empty_reflection_; | 76 delete file_level_metadata[0].reflection; |
| 73 } | 77 } |
| 74 | 78 |
| 75 void protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto() { | 79 void protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto_impl() { |
| 76 static bool already_here = false; | |
| 77 if (already_here) return; | |
| 78 already_here = true; | |
| 79 GOOGLE_PROTOBUF_VERIFY_VERSION; | 80 GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 80 | 81 |
| 82 ::google::protobuf::internal::InitProtobufDefaults(); |
| 83 _Empty_default_instance_.DefaultConstruct(); |
| 84 } |
| 85 |
| 86 void protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto() { |
| 87 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
| 88 ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprot
obuf_2fempty_2eproto_impl); |
| 89 } |
| 90 void protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto_impl() { |
| 91 protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto(); |
| 92 static const char descriptor[] = { |
| 93 "\n\033google/protobuf/empty.proto\022\017google.pr" |
| 94 "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" |
| 95 "EmptyProtoP\001Z\'github.com/golang/protobuf" |
| 96 "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf" |
| 97 ".WellKnownTypesb\006proto3" |
| 98 }; |
| 81 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( | 99 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| 82 "\n\033google/protobuf/empty.proto\022\017google.pr" | 100 descriptor, 183); |
| 83 "otobuf\"\007\n\005EmptyBy\n\023com.google.protobufB\n" | |
| 84 "EmptyProtoP\001Z\'github.com/golang/protobuf" | |
| 85 "/ptypes/empty\240\001\001\370\001\001\242\002\003GPB\252\002\036Google.Prot
o" | |
| 86 "buf.WellKnownTypesb\006proto3", 186); | |
| 87 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( | 101 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 88 "google/protobuf/empty.proto", &protobuf_RegisterTypes); | 102 "google/protobuf/empty.proto", &protobuf_RegisterTypes); |
| 89 Empty::default_instance_ = new Empty(); | |
| 90 Empty::default_instance_->InitAsDefaultInstance(); | |
| 91 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fempty_2eproto); | 103 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fempty_2eproto); |
| 92 } | 104 } |
| 93 | 105 |
| 106 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto_
once_); |
| 107 void protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto() { |
| 108 ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2fempty
_2eproto_once_, |
| 109 &protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto_impl); |
| 110 } |
| 94 // Force AddDescriptors() to be called at static initialization time. | 111 // Force AddDescriptors() to be called at static initialization time. |
| 95 struct StaticDescriptorInitializer_google_2fprotobuf_2fempty_2eproto { | 112 struct StaticDescriptorInitializer_google_2fprotobuf_2fempty_2eproto { |
| 96 StaticDescriptorInitializer_google_2fprotobuf_2fempty_2eproto() { | 113 StaticDescriptorInitializer_google_2fprotobuf_2fempty_2eproto() { |
| 97 protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto(); | 114 protobuf_AddDesc_google_2fprotobuf_2fempty_2eproto(); |
| 98 } | 115 } |
| 99 } static_descriptor_initializer_google_2fprotobuf_2fempty_2eproto_; | 116 } static_descriptor_initializer_google_2fprotobuf_2fempty_2eproto_; |
| 100 | 117 |
| 101 namespace { | |
| 102 | |
| 103 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; | |
| 104 static void MergeFromFail(int line) { | |
| 105 GOOGLE_CHECK(false) << __FILE__ << ":" << line; | |
| 106 } | |
| 107 | |
| 108 } // namespace | |
| 109 | |
| 110 | |
| 111 // =================================================================== | 118 // =================================================================== |
| 112 | 119 |
| 113 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 120 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 114 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 121 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 115 | 122 |
| 116 Empty::Empty() | 123 Empty::Empty() |
| 117 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 124 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 125 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
| 126 protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto(); |
| 127 } |
| 118 SharedCtor(); | 128 SharedCtor(); |
| 119 // @@protoc_insertion_point(constructor:google.protobuf.Empty) | 129 // @@protoc_insertion_point(constructor:google.protobuf.Empty) |
| 120 } | 130 } |
| 121 | |
| 122 Empty::Empty(::google::protobuf::Arena* arena) | 131 Empty::Empty(::google::protobuf::Arena* arena) |
| 123 : ::google::protobuf::Message(), | 132 : ::google::protobuf::Message(), |
| 124 _internal_metadata_(arena) { | 133 _internal_metadata_(arena) { |
| 134 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| 135 protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto(); |
| 136 #endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| 125 SharedCtor(); | 137 SharedCtor(); |
| 126 RegisterArenaDtor(arena); | 138 RegisterArenaDtor(arena); |
| 127 // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) | 139 // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) |
| 128 } | 140 } |
| 129 | |
| 130 void Empty::InitAsDefaultInstance() { | |
| 131 _is_default_instance_ = true; | |
| 132 } | |
| 133 | |
| 134 Empty::Empty(const Empty& from) | 141 Empty::Empty(const Empty& from) |
| 135 : ::google::protobuf::Message(), | 142 : ::google::protobuf::Message(), |
| 136 _internal_metadata_(NULL) { | 143 _internal_metadata_(NULL), |
| 137 SharedCtor(); | 144 _cached_size_(0) { |
| 138 MergeFrom(from); | 145 _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 139 // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) | 146 // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) |
| 140 } | 147 } |
| 141 | 148 |
| 142 void Empty::SharedCtor() { | 149 void Empty::SharedCtor() { |
| 143 _is_default_instance_ = false; | |
| 144 _cached_size_ = 0; | 150 _cached_size_ = 0; |
| 145 } | 151 } |
| 146 | 152 |
| 147 Empty::~Empty() { | 153 Empty::~Empty() { |
| 148 // @@protoc_insertion_point(destructor:google.protobuf.Empty) | 154 // @@protoc_insertion_point(destructor:google.protobuf.Empty) |
| 149 SharedDtor(); | 155 SharedDtor(); |
| 150 } | 156 } |
| 151 | 157 |
| 152 void Empty::SharedDtor() { | 158 void Empty::SharedDtor() { |
| 153 if (GetArenaNoVirtual() != NULL) { | 159 ::google::protobuf::Arena* arena = GetArenaNoVirtual(); |
| 160 if (arena != NULL) { |
| 154 return; | 161 return; |
| 155 } | 162 } |
| 156 | 163 |
| 157 if (this != default_instance_) { | |
| 158 } | |
| 159 } | 164 } |
| 160 | 165 |
| 161 void Empty::ArenaDtor(void* object) { | 166 void Empty::ArenaDtor(void* object) { |
| 162 Empty* _this = reinterpret_cast< Empty* >(object); | 167 Empty* _this = reinterpret_cast< Empty* >(object); |
| 163 (void)_this; | 168 (void)_this; |
| 164 } | 169 } |
| 165 void Empty::RegisterArenaDtor(::google::protobuf::Arena* arena) { | 170 void Empty::RegisterArenaDtor(::google::protobuf::Arena* arena) { |
| 166 } | 171 } |
| 167 void Empty::SetCachedSize(int size) const { | 172 void Empty::SetCachedSize(int size) const { |
| 168 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 173 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 169 _cached_size_ = size; | 174 _cached_size_ = size; |
| 170 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 175 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 171 } | 176 } |
| 172 const ::google::protobuf::Descriptor* Empty::descriptor() { | 177 const ::google::protobuf::Descriptor* Empty::descriptor() { |
| 173 protobuf_AssignDescriptorsOnce(); | 178 protobuf_AssignDescriptorsOnce(); |
| 174 return Empty_descriptor_; | 179 return file_level_metadata[0].descriptor; |
| 175 } | 180 } |
| 176 | 181 |
| 177 const Empty& Empty::default_instance() { | 182 const Empty& Empty::default_instance() { |
| 178 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fempty_2epr
oto(); | 183 protobuf_InitDefaults_google_2fprotobuf_2fempty_2eproto(); |
| 179 return *default_instance_; | 184 return *internal_default_instance(); |
| 180 } | 185 } |
| 181 | 186 |
| 182 Empty* Empty::default_instance_ = NULL; | |
| 183 | |
| 184 Empty* Empty::New(::google::protobuf::Arena* arena) const { | 187 Empty* Empty::New(::google::protobuf::Arena* arena) const { |
| 185 return ::google::protobuf::Arena::CreateMessage<Empty>(arena); | 188 return ::google::protobuf::Arena::CreateMessage<Empty>(arena); |
| 186 } | 189 } |
| 187 | 190 |
| 188 void Empty::Clear() { | 191 void Empty::Clear() { |
| 189 // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty) | 192 // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty) |
| 190 } | 193 } |
| 191 | 194 |
| 192 bool Empty::MergePartialFromCodedStream( | 195 bool Empty::MergePartialFromCodedStream( |
| 193 ::google::protobuf::io::CodedInputStream* input) { | 196 ::google::protobuf::io::CodedInputStream* input) { |
| 194 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 197 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 195 ::google::protobuf::uint32 tag; | 198 ::google::protobuf::uint32 tag; |
| 196 // @@protoc_insertion_point(parse_start:google.protobuf.Empty) | 199 // @@protoc_insertion_point(parse_start:google.protobuf.Empty) |
| 197 for (;;) { | 200 for (;;) { |
| 198 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 201 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); |
| 199 tag = p.first; | 202 tag = p.first; |
| 200 if (!p.second) goto handle_unusual; | 203 if (!p.second) goto handle_unusual; |
| 201 handle_unusual: | 204 handle_unusual: |
| 202 if (tag == 0 || | 205 if (tag == 0 || |
| 203 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 206 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| 204 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 207 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| 205 goto success; | 208 goto success; |
| 206 } | 209 } |
| 207 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); | 210 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); |
| 208 } | 211 } |
| 209 success: | 212 success: |
| 210 // @@protoc_insertion_point(parse_success:google.protobuf.Empty) | 213 // @@protoc_insertion_point(parse_success:google.protobuf.Empty) |
| 211 return true; | 214 return true; |
| 212 failure: | 215 failure: |
| 213 // @@protoc_insertion_point(parse_failure:google.protobuf.Empty) | 216 // @@protoc_insertion_point(parse_failure:google.protobuf.Empty) |
| 214 return false; | 217 return false; |
| 215 #undef DO_ | 218 #undef DO_ |
| 216 } | 219 } |
| 217 | 220 |
| 218 void Empty::SerializeWithCachedSizes( | 221 void Empty::SerializeWithCachedSizes( |
| 219 ::google::protobuf::io::CodedOutputStream* output) const { | 222 ::google::protobuf::io::CodedOutputStream* output) const { |
| 220 // @@protoc_insertion_point(serialize_start:google.protobuf.Empty) | 223 // @@protoc_insertion_point(serialize_start:google.protobuf.Empty) |
| 221 // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) | 224 // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) |
| 222 } | 225 } |
| 223 | 226 |
| 224 ::google::protobuf::uint8* Empty::SerializeWithCachedSizesToArray( | 227 ::google::protobuf::uint8* Empty::InternalSerializeWithCachedSizesToArray( |
| 225 ::google::protobuf::uint8* target) const { | 228 bool deterministic, ::google::protobuf::uint8* target) const { |
| 229 (void)deterministic; // Unused |
| 226 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty) | 230 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty) |
| 227 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) | 231 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) |
| 228 return target; | 232 return target; |
| 229 } | 233 } |
| 230 | 234 |
| 231 int Empty::ByteSize() const { | 235 size_t Empty::ByteSizeLong() const { |
| 232 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty) | 236 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty) |
| 233 int total_size = 0; | 237 size_t total_size = 0; |
| 234 | 238 |
| 239 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 235 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 240 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 236 _cached_size_ = total_size; | 241 _cached_size_ = cached_size; |
| 237 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 242 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 238 return total_size; | 243 return total_size; |
| 239 } | 244 } |
| 240 | 245 |
| 241 void Empty::MergeFrom(const ::google::protobuf::Message& from) { | 246 void Empty::MergeFrom(const ::google::protobuf::Message& from) { |
| 242 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty) | 247 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty) |
| 243 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 248 GOOGLE_DCHECK_NE(&from, this); |
| 244 const Empty* source = | 249 const Empty* source = |
| 245 ::google::protobuf::internal::DynamicCastToGenerated<const Empty>( | 250 ::google::protobuf::internal::DynamicCastToGenerated<const Empty>( |
| 246 &from); | 251 &from); |
| 247 if (source == NULL) { | 252 if (source == NULL) { |
| 248 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
mpty) | 253 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.E
mpty) |
| 249 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 254 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 250 } else { | 255 } else { |
| 251 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Empty) | 256 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Empty) |
| 252 MergeFrom(*source); | 257 MergeFrom(*source); |
| 253 } | 258 } |
| 254 } | 259 } |
| 255 | 260 |
| 256 void Empty::MergeFrom(const Empty& from) { | 261 void Empty::MergeFrom(const Empty& from) { |
| 257 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empt
y) | 262 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empt
y) |
| 258 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 263 GOOGLE_DCHECK_NE(&from, this); |
| 264 _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 259 } | 265 } |
| 260 | 266 |
| 261 void Empty::CopyFrom(const ::google::protobuf::Message& from) { | 267 void Empty::CopyFrom(const ::google::protobuf::Message& from) { |
| 262 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Empty) | 268 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Empty) |
| 263 if (&from == this) return; | 269 if (&from == this) return; |
| 264 Clear(); | 270 Clear(); |
| 265 MergeFrom(from); | 271 MergeFrom(from); |
| 266 } | 272 } |
| 267 | 273 |
| 268 void Empty::CopyFrom(const Empty& from) { | 274 void Empty::CopyFrom(const Empty& from) { |
| 269 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Empty
) | 275 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Empty
) |
| 270 if (&from == this) return; | 276 if (&from == this) return; |
| 271 Clear(); | 277 Clear(); |
| 272 MergeFrom(from); | 278 MergeFrom(from); |
| 273 } | 279 } |
| 274 | 280 |
| 275 bool Empty::IsInitialized() const { | 281 bool Empty::IsInitialized() const { |
| 276 | |
| 277 return true; | 282 return true; |
| 278 } | 283 } |
| 279 | 284 |
| 280 void Empty::Swap(Empty* other) { | 285 void Empty::Swap(Empty* other) { |
| 281 if (other == this) return; | 286 if (other == this) return; |
| 282 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { | 287 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { |
| 283 InternalSwap(other); | 288 InternalSwap(other); |
| 284 } else { | 289 } else { |
| 285 Empty temp; | 290 Empty* temp = New(GetArenaNoVirtual()); |
| 286 temp.MergeFrom(*this); | 291 temp->MergeFrom(*other); |
| 287 CopyFrom(*other); | 292 other->CopyFrom(*this); |
| 288 other->CopyFrom(temp); | 293 InternalSwap(temp); |
| 294 if (GetArenaNoVirtual() == NULL) { |
| 295 delete temp; |
| 296 } |
| 289 } | 297 } |
| 290 } | 298 } |
| 291 void Empty::UnsafeArenaSwap(Empty* other) { | 299 void Empty::UnsafeArenaSwap(Empty* other) { |
| 292 if (other == this) return; | 300 if (other == this) return; |
| 293 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); | 301 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); |
| 294 InternalSwap(other); | 302 InternalSwap(other); |
| 295 } | 303 } |
| 296 void Empty::InternalSwap(Empty* other) { | 304 void Empty::InternalSwap(Empty* other) { |
| 297 _internal_metadata_.Swap(&other->_internal_metadata_); | |
| 298 std::swap(_cached_size_, other->_cached_size_); | 305 std::swap(_cached_size_, other->_cached_size_); |
| 299 } | 306 } |
| 300 | 307 |
| 301 ::google::protobuf::Metadata Empty::GetMetadata() const { | 308 ::google::protobuf::Metadata Empty::GetMetadata() const { |
| 302 protobuf_AssignDescriptorsOnce(); | 309 protobuf_AssignDescriptorsOnce(); |
| 303 ::google::protobuf::Metadata metadata; | 310 return file_level_metadata[0]; |
| 304 metadata.descriptor = Empty_descriptor_; | |
| 305 metadata.reflection = Empty_reflection_; | |
| 306 return metadata; | |
| 307 } | 311 } |
| 308 | 312 |
| 309 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 313 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
| 310 // Empty | 314 // Empty |
| 311 | 315 |
| 312 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 316 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 313 | 317 |
| 314 // @@protoc_insertion_point(namespace_scope) | 318 // @@protoc_insertion_point(namespace_scope) |
| 315 | 319 |
| 316 } // namespace protobuf | 320 } // namespace protobuf |
| 317 } // namespace google | 321 } // namespace google |
| 318 | 322 |
| 319 // @@protoc_insertion_point(global_scope) | 323 // @@protoc_insertion_point(global_scope) |
| OLD | NEW |