| 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/timestamp.proto | 2 // source: google/protobuf/timestamp.proto |
| 3 | 3 |
| 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION | 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| 5 #include <google/protobuf/timestamp.pb.h> | 5 #include <google/protobuf/timestamp.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> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 void protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto() { | 77 void protobuf_AddDesc_google_2fprotobuf_2ftimestamp_2eproto() { |
| 78 static bool already_here = false; | 78 static bool already_here = false; |
| 79 if (already_here) return; | 79 if (already_here) return; |
| 80 already_here = true; | 80 already_here = true; |
| 81 GOOGLE_PROTOBUF_VERIFY_VERSION; | 81 GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 82 | 82 |
| 83 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( | 83 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| 84 "\n\037google/protobuf/timestamp.proto\022\017googl" | 84 "\n\037google/protobuf/timestamp.proto\022\017googl" |
| 85 "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003" | 85 "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003" |
| 86 "\022\r\n\005nanos\030\002 \001(\005BT\n\023com.google.protobufB\016" | 86 "\022\r\n\005nanos\030\002 \001(\005B\201\001\n\023com.google.protobufB" |
| 87 "TimestampProtoP\001\240\001\001\370\001\001\242\002\003GPB\252\002\036Googl
e.Pr" | 87 "\016TimestampProtoP\001Z+github.com/golang/pro" |
| 88 "otobuf.WellKnownTypesb\006proto3", 189); | 88 "tobuf/ptypes/timestamp\240\001\001\370\001\001\242\002\003GPB\252\002\036Go
o" |
| 89 "gle.Protobuf.WellKnownTypesb\006proto3", 235); |
| 89 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( | 90 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| 90 "google/protobuf/timestamp.proto", &protobuf_RegisterTypes); | 91 "google/protobuf/timestamp.proto", &protobuf_RegisterTypes); |
| 91 Timestamp::default_instance_ = new Timestamp(); | 92 Timestamp::default_instance_ = new Timestamp(); |
| 92 Timestamp::default_instance_->InitAsDefaultInstance(); | 93 Timestamp::default_instance_->InitAsDefaultInstance(); |
| 93 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2ftimestamp_2eproto); | 94 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2ftimestamp_2eproto); |
| 94 } | 95 } |
| 95 | 96 |
| 96 // Force AddDescriptors() to be called at static initialization time. | 97 // Force AddDescriptors() to be called at static initialization time. |
| 97 struct StaticDescriptorInitializer_google_2fprotobuf_2ftimestamp_2eproto { | 98 struct StaticDescriptorInitializer_google_2fprotobuf_2ftimestamp_2eproto { |
| 98 StaticDescriptorInitializer_google_2fprotobuf_2ftimestamp_2eproto() { | 99 StaticDescriptorInitializer_google_2fprotobuf_2ftimestamp_2eproto() { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 return *default_instance_; | 186 return *default_instance_; |
| 186 } | 187 } |
| 187 | 188 |
| 188 Timestamp* Timestamp::default_instance_ = NULL; | 189 Timestamp* Timestamp::default_instance_ = NULL; |
| 189 | 190 |
| 190 Timestamp* Timestamp::New(::google::protobuf::Arena* arena) const { | 191 Timestamp* Timestamp::New(::google::protobuf::Arena* arena) const { |
| 191 return ::google::protobuf::Arena::CreateMessage<Timestamp>(arena); | 192 return ::google::protobuf::Arena::CreateMessage<Timestamp>(arena); |
| 192 } | 193 } |
| 193 | 194 |
| 194 void Timestamp::Clear() { | 195 void Timestamp::Clear() { |
| 196 // @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp) |
| 197 #if defined(__clang__) |
| 198 #define ZR_HELPER_(f) \ |
| 199 _Pragma("clang diagnostic push") \ |
| 200 _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ |
| 201 __builtin_offsetof(Timestamp, f) \ |
| 202 _Pragma("clang diagnostic pop") |
| 203 #else |
| 195 #define ZR_HELPER_(f) reinterpret_cast<char*>(\ | 204 #define ZR_HELPER_(f) reinterpret_cast<char*>(\ |
| 196 &reinterpret_cast<Timestamp*>(16)->f) | 205 &reinterpret_cast<Timestamp*>(16)->f) |
| 206 #endif |
| 197 | 207 |
| 198 #define ZR_(first, last) do {\ | 208 #define ZR_(first, last) do {\ |
| 199 ::memset(&first, 0,\ | 209 ::memset(&first, 0,\ |
| 200 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ | 210 ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ |
| 201 } while (0) | 211 } while (0) |
| 202 | 212 |
| 203 ZR_(seconds_, nanos_); | 213 ZR_(seconds_, nanos_); |
| 204 | 214 |
| 205 #undef ZR_HELPER_ | 215 #undef ZR_HELPER_ |
| 206 #undef ZR_ | 216 #undef ZR_ |
| 207 | 217 |
| 208 } | 218 } |
| 209 | 219 |
| 210 bool Timestamp::MergePartialFromCodedStream( | 220 bool Timestamp::MergePartialFromCodedStream( |
| 211 ::google::protobuf::io::CodedInputStream* input) { | 221 ::google::protobuf::io::CodedInputStream* input) { |
| 212 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure | 222 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
| 213 ::google::protobuf::uint32 tag; | 223 ::google::protobuf::uint32 tag; |
| 214 // @@protoc_insertion_point(parse_start:google.protobuf.Timestamp) | 224 // @@protoc_insertion_point(parse_start:google.protobuf.Timestamp) |
| 215 for (;;) { | 225 for (;;) { |
| 216 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 226 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); |
| 217 tag = p.first; | 227 tag = p.first; |
| 218 if (!p.second) goto handle_unusual; | 228 if (!p.second) goto handle_unusual; |
| 219 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 229 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
| 220 // optional int64 seconds = 1; | 230 // optional int64 seconds = 1; |
| 221 case 1: { | 231 case 1: { |
| 222 if (tag == 8) { | 232 if (tag == 8) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 // optional int32 nanos = 2; | 304 // optional int32 nanos = 2; |
| 295 if (this->nanos() != 0) { | 305 if (this->nanos() != 0) { |
| 296 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2,
this->nanos(), target); | 306 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2,
this->nanos(), target); |
| 297 } | 307 } |
| 298 | 308 |
| 299 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) | 309 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) |
| 300 return target; | 310 return target; |
| 301 } | 311 } |
| 302 | 312 |
| 303 int Timestamp::ByteSize() const { | 313 int Timestamp::ByteSize() const { |
| 314 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) |
| 304 int total_size = 0; | 315 int total_size = 0; |
| 305 | 316 |
| 306 // optional int64 seconds = 1; | 317 // optional int64 seconds = 1; |
| 307 if (this->seconds() != 0) { | 318 if (this->seconds() != 0) { |
| 308 total_size += 1 + | 319 total_size += 1 + |
| 309 ::google::protobuf::internal::WireFormatLite::Int64Size( | 320 ::google::protobuf::internal::WireFormatLite::Int64Size( |
| 310 this->seconds()); | 321 this->seconds()); |
| 311 } | 322 } |
| 312 | 323 |
| 313 // optional int32 nanos = 2; | 324 // optional int32 nanos = 2; |
| 314 if (this->nanos() != 0) { | 325 if (this->nanos() != 0) { |
| 315 total_size += 1 + | 326 total_size += 1 + |
| 316 ::google::protobuf::internal::WireFormatLite::Int32Size( | 327 ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 317 this->nanos()); | 328 this->nanos()); |
| 318 } | 329 } |
| 319 | 330 |
| 320 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 331 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| 321 _cached_size_ = total_size; | 332 _cached_size_ = total_size; |
| 322 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 333 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| 323 return total_size; | 334 return total_size; |
| 324 } | 335 } |
| 325 | 336 |
| 326 void Timestamp::MergeFrom(const ::google::protobuf::Message& from) { | 337 void Timestamp::MergeFrom(const ::google::protobuf::Message& from) { |
| 338 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Timesta
mp) |
| 327 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 339 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 328 const Timestamp* source = | 340 const Timestamp* source = |
| 329 ::google::protobuf::internal::DynamicCastToGenerated<const Timestamp>( | 341 ::google::protobuf::internal::DynamicCastToGenerated<const Timestamp>( |
| 330 &from); | 342 &from); |
| 331 if (source == NULL) { | 343 if (source == NULL) { |
| 344 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.T
imestamp) |
| 332 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 345 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 333 } else { | 346 } else { |
| 347 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.Timestamp) |
| 334 MergeFrom(*source); | 348 MergeFrom(*source); |
| 335 } | 349 } |
| 336 } | 350 } |
| 337 | 351 |
| 338 void Timestamp::MergeFrom(const Timestamp& from) { | 352 void Timestamp::MergeFrom(const Timestamp& from) { |
| 353 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Time
stamp) |
| 339 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 354 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); |
| 340 if (from.seconds() != 0) { | 355 if (from.seconds() != 0) { |
| 341 set_seconds(from.seconds()); | 356 set_seconds(from.seconds()); |
| 342 } | 357 } |
| 343 if (from.nanos() != 0) { | 358 if (from.nanos() != 0) { |
| 344 set_nanos(from.nanos()); | 359 set_nanos(from.nanos()); |
| 345 } | 360 } |
| 346 } | 361 } |
| 347 | 362 |
| 348 void Timestamp::CopyFrom(const ::google::protobuf::Message& from) { | 363 void Timestamp::CopyFrom(const ::google::protobuf::Message& from) { |
| 364 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Timestam
p) |
| 349 if (&from == this) return; | 365 if (&from == this) return; |
| 350 Clear(); | 366 Clear(); |
| 351 MergeFrom(from); | 367 MergeFrom(from); |
| 352 } | 368 } |
| 353 | 369 |
| 354 void Timestamp::CopyFrom(const Timestamp& from) { | 370 void Timestamp::CopyFrom(const Timestamp& from) { |
| 371 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Times
tamp) |
| 355 if (&from == this) return; | 372 if (&from == this) return; |
| 356 Clear(); | 373 Clear(); |
| 357 MergeFrom(from); | 374 MergeFrom(from); |
| 358 } | 375 } |
| 359 | 376 |
| 360 bool Timestamp::IsInitialized() const { | 377 bool Timestamp::IsInitialized() const { |
| 361 | 378 |
| 362 return true; | 379 return true; |
| 363 } | 380 } |
| 364 | 381 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 442 } |
| 426 | 443 |
| 427 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 444 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
| 428 | 445 |
| 429 // @@protoc_insertion_point(namespace_scope) | 446 // @@protoc_insertion_point(namespace_scope) |
| 430 | 447 |
| 431 } // namespace protobuf | 448 } // namespace protobuf |
| 432 } // namespace google | 449 } // namespace google |
| 433 | 450 |
| 434 // @@protoc_insertion_point(global_scope) | 451 // @@protoc_insertion_point(global_scope) |
| OLD | NEW |