From 5968344d38bad146b1573f96f68fdbea9e59b573 Mon Sep 17 00:00:00 2001 From: Robert Bryce Date: Mon, 29 Jul 2024 11:28:45 -0500 Subject: [PATCH 1/4] Tweaks to keep code somewhat consistent with internal work, but without breaking any build (hopefully). --- cxx/include/internal/WTimeProto.h | 2 +- cxx/src/WTimeProto.cpp | 35 +++++++++++++++++++------------ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/cxx/include/internal/WTimeProto.h b/cxx/include/internal/WTimeProto.h index 249d39e..27ffe31 100644 --- a/cxx/include/internal/WTimeProto.h +++ b/cxx/include/internal/WTimeProto.h @@ -54,7 +54,7 @@ namespace HSS_Time static HSS::Times::WTimeZone* serializeTimeZone(const WorldLocation& worldLocation, const std::uint32_t version); - static void deserializeTimeZone(const HSS::Times::WTimeZone& zone, WorldLocation& worldLocation, std::shared_ptr valid, const std::string& name); + static bool deserializeTimeZone(const HSS::Times::WTimeZone& zone, WorldLocation& worldLocation, std::shared_ptr valid, const std::string& name); }; } } \ No newline at end of file diff --git a/cxx/src/WTimeProto.cpp b/cxx/src/WTimeProto.cpp index ca70d2a..9625f4c 100644 --- a/cxx/src/WTimeProto.cpp +++ b/cxx/src/WTimeProto.cpp @@ -268,7 +268,7 @@ HSS::Times::WTimeZone* HSS_Time::Serialization::TimeSerializer::serializeTimeZon return ret; } -void HSS_Time::Serialization::TimeSerializer::deserializeTimeZone(const HSS::Times::WTimeZone& zone, HSS_Time::WorldLocation& worldLocation, std::shared_ptr valid, const std::string& name) { +bool HSS_Time::Serialization::TimeSerializer::deserializeTimeZone(const HSS::Times::WTimeZone& zone, HSS_Time::WorldLocation& worldLocation, std::shared_ptr valid, const std::string& name) { if ((zone.version() != 1) && (zone.version() != 2)) { weak_assert(false); if (valid) @@ -287,14 +287,14 @@ void HSS_Time::Serialization::TimeSerializer::deserializeTimeZone(const HSS::Tim auto sdst = deserializeTimeSpan(zone.timezonedetails().startdst(), v, "timezoneDetails.startDST"); auto edst = deserializeTimeSpan(zone.timezonedetails().enddst(), v, "timezoneDetails.endDst"); auto adst = deserializeTimeSpan(zone.timezonedetails().amtdst(), v, "timezoneDetails.amtDST"); - worldLocation.m_timezone(*tz); - worldLocation.m_startDST(*sdst); - worldLocation.m_endDST(*edst); - worldLocation.m_amtDST(*adst); - delete tz; - delete sdst; - delete edst; - delete adst; + if (tz) worldLocation.m_timezone(*tz); + if (sdst) worldLocation.m_startDST(*sdst); + if (edst) worldLocation.m_endDST(*edst); + if (adst) worldLocation.m_amtDST(*adst); + if (tz) delete tz; + if (sdst) delete sdst; + if (edst) delete edst; + if (adst) delete adst; // try to guess what the timezone ID is const HSS_Time::TimeZoneInfo* tzz; @@ -307,16 +307,25 @@ void HSS_Time::Serialization::TimeSerializer::deserializeTimeZone(const HSS::Tim } tzz++; } + + if (!adst) + return false; } else if (zone.msg_case() == HSS::Times::WTimeZone::kTimezoneIndex) { if (!worldLocation.SetTimeZoneOffset(zone.timezoneindex()) && (valid)) { - valid->add_child_validation("HSS.Times.WTimeZone", name, validation::error_level::WARNING, validation::id::index_invalid, std::to_string(zone.timezoneindex())); + valid->add_child_validation("HSS.Times.WTimeZone", name, validation::error_level::SEVERE, validation::id::index_invalid, std::to_string(zone.timezoneindex())); + return false; } } else if (zone.msg_case() == HSS::Times::WTimeZone::kTztimezone) { const TimeZoneInfo* tzi; - if (!(tzi = worldLocation.TimeZoneFromName(zone.tztimezone().name(), zone.tztimezone().has_daylight() && zone.tztimezone().daylight() ? 1 : 0))) - valid->add_child_validation("HSS.Times.WTimeZone", name, validation::error_level::WARNING, validation::id::index_invalid, zone.tztimezone().name()); + if (!(tzi = worldLocation.TimeZoneFromName(zone.tztimezone().name(), zone.tztimezone().has_daylight() && zone.tztimezone().daylight() ? 1 : 0))) { + valid->add_child_validation("HSS.Times.WTimeZone", name, validation::error_level::SEVERE, validation::id::index_invalid, zone.tztimezone().name()); + return false; + } else worldLocation.SetTimeZoneOffset(tzi); - } else if (valid) + } else if (valid) { valid->add_child_validation("HSS.Times.WTimeZone", name, validation::error_level::WARNING, validation::id::object_invalid, "Time Zone"); + return false; + } + return true; } From 397c163179cf678eee272016595a39569f86374f Mon Sep 17 00:00:00 2001 From: Robert Bryce Date: Mon, 29 Jul 2024 11:34:13 -0500 Subject: [PATCH 2/4] Update to the generated file from the proto file - not sure why this is in the repository but putting in the update that was built on my machine --- cxx/src/generated/wtime.pb.cc | 1696 ++++++++++++++++----------------- 1 file changed, 808 insertions(+), 888 deletions(-) diff --git a/cxx/src/generated/wtime.pb.cc b/cxx/src/generated/wtime.pb.cc index 431b8b8..bf874c2 100644 --- a/cxx/src/generated/wtime.pb.cc +++ b/cxx/src/generated/wtime.pb.cc @@ -14,176 +14,159 @@ #include // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_wtime_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WTimeSpan_wtime_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_wtime_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WTimeZone_TZTimeZone_wtime_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_wtime_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_WTimeZone_WTZDetails_wtime_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fwrappers_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fwrappers_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto; + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + namespace HSS { namespace Times { -class WTimeDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _WTime_default_instance_; -class WTimeSpanDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _WTimeSpan_default_instance_; -class WTimeZone_WTZDetailsDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _WTimeZone_WTZDetails_default_instance_; -class WTimeZone_TZTimeZoneDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _WTimeZone_TZTimeZone_default_instance_; -class WTimeZoneDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; - ::PROTOBUF_NAMESPACE_ID::int32 timezoneindex_; - const ::HSS::Times::WTimeZone_WTZDetails* timezonedetails_; - const ::HSS::Times::WTimeZone_TZTimeZone* tztimezone_; -} _WTimeZone_default_instance_; +PROTOBUF_CONSTEXPR WTime::WTime( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.daylight_)*/nullptr + , /*decltype(_impl_.timezone_)*/nullptr + , /*decltype(_impl_.timezone_id_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct WTimeDefaultTypeInternal { + PROTOBUF_CONSTEXPR WTimeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WTimeDefaultTypeInternal() {} + union { + WTime _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WTimeDefaultTypeInternal _WTime_default_instance_; +PROTOBUF_CONSTEXPR WTimeSpan::WTimeSpan( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct WTimeSpanDefaultTypeInternal { + PROTOBUF_CONSTEXPR WTimeSpanDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WTimeSpanDefaultTypeInternal() {} + union { + WTimeSpan _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WTimeSpanDefaultTypeInternal _WTimeSpan_default_instance_; +PROTOBUF_CONSTEXPR WTimeZone_WTZDetails::WTimeZone_WTZDetails( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.amttimezone_)*/nullptr + , /*decltype(_impl_.startdst_)*/nullptr + , /*decltype(_impl_.enddst_)*/nullptr + , /*decltype(_impl_.amtdst_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct WTimeZone_WTZDetailsDefaultTypeInternal { + PROTOBUF_CONSTEXPR WTimeZone_WTZDetailsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WTimeZone_WTZDetailsDefaultTypeInternal() {} + union { + WTimeZone_WTZDetails _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WTimeZone_WTZDetailsDefaultTypeInternal _WTimeZone_WTZDetails_default_instance_; +PROTOBUF_CONSTEXPR WTimeZone_TZTimeZone::WTimeZone_TZTimeZone( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.daylight_)*/false} {} +struct WTimeZone_TZTimeZoneDefaultTypeInternal { + PROTOBUF_CONSTEXPR WTimeZone_TZTimeZoneDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WTimeZone_TZTimeZoneDefaultTypeInternal() {} + union { + WTimeZone_TZTimeZone _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WTimeZone_TZTimeZoneDefaultTypeInternal _WTimeZone_TZTimeZone_default_instance_; +PROTOBUF_CONSTEXPR WTimeZone::WTimeZone( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.version_)*/0 + , /*decltype(_impl_.msg_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct WTimeZoneDefaultTypeInternal { + PROTOBUF_CONSTEXPR WTimeZoneDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WTimeZoneDefaultTypeInternal() {} + union { + WTimeZone _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WTimeZoneDefaultTypeInternal _WTimeZone_default_instance_; } // namespace Times } // namespace HSS -static void InitDefaultsscc_info_WTime_wtime_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::HSS::Times::_WTime_default_instance_; - new (ptr) ::HSS::Times::WTime(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::HSS::Times::WTime::InitAsDefaultInstance(); -} - -TIMES_API ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WTime_wtime_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WTime_wtime_2eproto}, { - &scc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto.base, - &scc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto.base,}}; - -static void InitDefaultsscc_info_WTimeSpan_wtime_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::HSS::Times::_WTimeSpan_default_instance_; - new (ptr) ::HSS::Times::WTimeSpan(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::HSS::Times::WTimeSpan::InitAsDefaultInstance(); -} - -TIMES_API ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WTimeSpan_wtime_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_WTimeSpan_wtime_2eproto}, {}}; - -static void InitDefaultsscc_info_WTimeZone_wtime_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; +static ::_pb::Metadata file_level_metadata_wtime_2eproto[5]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_wtime_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_wtime_2eproto = nullptr; - { - void* ptr = &::HSS::Times::_WTimeZone_default_instance_; - new (ptr) ::HSS::Times::WTimeZone(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::HSS::Times::WTimeZone::InitAsDefaultInstance(); -} - -TIMES_API ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WTimeZone_wtime_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WTimeZone_wtime_2eproto}, { - &scc_info_WTimeZone_WTZDetails_wtime_2eproto.base, - &scc_info_WTimeZone_TZTimeZone_wtime_2eproto.base,}}; - -static void InitDefaultsscc_info_WTimeZone_TZTimeZone_wtime_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::HSS::Times::_WTimeZone_TZTimeZone_default_instance_; - new (ptr) ::HSS::Times::WTimeZone_TZTimeZone(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::HSS::Times::WTimeZone_TZTimeZone::InitAsDefaultInstance(); -} - -TIMES_API ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WTimeZone_TZTimeZone_wtime_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_WTimeZone_TZTimeZone_wtime_2eproto}, {}}; - -static void InitDefaultsscc_info_WTimeZone_WTZDetails_wtime_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::HSS::Times::_WTimeZone_WTZDetails_default_instance_; - new (ptr) ::HSS::Times::WTimeZone_WTZDetails(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::HSS::Times::WTimeZone_WTZDetails::InitAsDefaultInstance(); -} - -TIMES_API ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_WTimeZone_WTZDetails_wtime_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_WTimeZone_WTZDetails_wtime_2eproto}, { - &scc_info_WTimeSpan_wtime_2eproto.base,}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_wtime_2eproto[5]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_wtime_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_wtime_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_wtime_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const uint32_t TableStruct_wtime_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, time_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, daylight_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, timezone_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, timezone_id_), + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, _impl_.time_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, _impl_.daylight_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, _impl_.timezone_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTime, _impl_.timezone_id_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeSpan, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeSpan, time_), + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeSpan, _impl_.time_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, amttimezone_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, startdst_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, enddst_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, amtdst_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, _has_bits_), + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, _impl_.amttimezone_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, _impl_.startdst_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, _impl_.enddst_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_WTZDetails, _impl_.amtdst_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, name_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, daylight_), + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone_TZTimeZone, _impl_.daylight_), ~0u, 0, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, _internal_metadata_), ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, _oneof_case_[0]), + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, _impl_._oneof_case_[0]), ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, version_), - offsetof(::HSS::Times::WTimeZoneDefaultTypeInternal, timezoneindex_), - offsetof(::HSS::Times::WTimeZoneDefaultTypeInternal, timezonedetails_), - offsetof(::HSS::Times::WTimeZoneDefaultTypeInternal, tztimezone_), - PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, msg_), + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, _impl_.version_), + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::HSS::Times::WTimeZone, _impl_.msg_), }; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::HSS::Times::WTime)}, - { 9, -1, sizeof(::HSS::Times::WTimeSpan)}, - { 15, -1, sizeof(::HSS::Times::WTimeZone_WTZDetails)}, - { 24, 31, sizeof(::HSS::Times::WTimeZone_TZTimeZone)}, - { 33, -1, sizeof(::HSS::Times::WTimeZone)}, +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::HSS::Times::WTime)}, + { 10, -1, -1, sizeof(::HSS::Times::WTimeSpan)}, + { 17, -1, -1, sizeof(::HSS::Times::WTimeZone_WTZDetails)}, + { 27, 35, -1, sizeof(::HSS::Times::WTimeZone_TZTimeZone)}, + { 37, -1, -1, sizeof(::HSS::Times::WTimeZone)}, }; -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::HSS::Times::_WTime_default_instance_), - reinterpret_cast(&::HSS::Times::_WTimeSpan_default_instance_), - reinterpret_cast(&::HSS::Times::_WTimeZone_WTZDetails_default_instance_), - reinterpret_cast(&::HSS::Times::_WTimeZone_TZTimeZone_default_instance_), - reinterpret_cast(&::HSS::Times::_WTimeZone_default_instance_), +static const ::_pb::Message* const file_default_instances[] = { + &::HSS::Times::_WTime_default_instance_._instance, + &::HSS::Times::_WTimeSpan_default_instance_._instance, + &::HSS::Times::_WTimeZone_WTZDetails_default_instance_._instance, + &::HSS::Times::_WTimeZone_TZTimeZone_default_instance_._instance, + &::HSS::Times::_WTimeZone_default_instance_._instance, }; const char descriptor_table_protodef_wtime_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -193,249 +176,248 @@ const char descriptor_table_protodef_wtime_2eproto[] PROTOBUF_SECTION_VARIABLE(p "ingValue\022.\n\010timezone\030\003 \001(\0132\034.google.prot" "obuf.StringValue\0224\n\013timezone_id\030\004 \001(\0132\033." "google.protobuf.Int32ValueB\002\030\001\"\031\n\tWTimeS" - "pan\022\014\n\004time\030\001 \001(\t\"\241\003\n\tWTimeZone\022\017\n\007versi" - "on\030\001 \001(\005\022\027\n\rtimezoneIndex\030\002 \001(\005H\000\022>\n\017tim" - "ezoneDetails\030\003 \001(\0132\037.HSS.Times.WTimeZone" - ".WTZDetailsB\002\030\001H\000\0225\n\ntztimezone\030\004 \001(\0132\037." - "HSS.Times.WTimeZone.TZTimeZoneH\000\032\253\001\n\nWTZ" - "Details\022)\n\013amtTimeZone\030\001 \001(\0132\024.HSS.Times" - ".WTimeSpan\022&\n\010startDST\030\002 \001(\0132\024.HSS.Times" - ".WTimeSpan\022$\n\006endDST\030\003 \001(\0132\024.HSS.Times.W" - "TimeSpan\022$\n\006amtDST\030\004 \001(\0132\024.HSS.Times.WTi" - "meSpan\032>\n\nTZTimeZone\022\014\n\004name\030\001 \001(\t\022\025\n\010da" - "ylight\030\002 \001(\010H\000\210\001\001B\013\n\t_daylightB\005\n\003msgB0\n" - "\022ca.hss.times.protoB\014WTimePackageP\001\252\002\tHS" - "S.Timesb\006proto3" + "pan\022\014\n\004time\030\001 \001(\t\"\245\003\n\tWTimeZone\022\017\n\007versi" + "on\030\001 \001(\005\022\033\n\rtimezoneIndex\030\002 \001(\005B\002\030\001H\000\022>\n" + "\017timezoneDetails\030\003 \001(\0132\037.HSS.Times.WTime" + "Zone.WTZDetailsB\002\030\001H\000\0225\n\ntztimezone\030\004 \001(" + "\0132\037.HSS.Times.WTimeZone.TZTimeZoneH\000\032\253\001\n" + "\nWTZDetails\022)\n\013amtTimeZone\030\001 \001(\0132\024.HSS.T" + "imes.WTimeSpan\022&\n\010startDST\030\002 \001(\0132\024.HSS.T" + "imes.WTimeSpan\022$\n\006endDST\030\003 \001(\0132\024.HSS.Tim" + "es.WTimeSpan\022$\n\006amtDST\030\004 \001(\0132\024.HSS.Times" + ".WTimeSpan\032>\n\nTZTimeZone\022\014\n\004name\030\001 \001(\t\022\025" + "\n\010daylight\030\002 \001(\010H\000\210\001\001B\013\n\t_daylightB\005\n\003ms" + "gB0\n\022ca.hss.times.protoB\014WTimePackageP\001\252" + "\002\tHSS.Timesb\006proto3" ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_wtime_2eproto_deps[1] = { +static const ::_pbi::DescriptorTable* const descriptor_table_wtime_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fwrappers_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_wtime_2eproto_sccs[5] = { - &scc_info_WTime_wtime_2eproto.base, - &scc_info_WTimeSpan_wtime_2eproto.base, - &scc_info_WTimeZone_wtime_2eproto.base, - &scc_info_WTimeZone_TZTimeZone_wtime_2eproto.base, - &scc_info_WTimeZone_WTZDetails_wtime_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_wtime_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_wtime_2eproto = { - false, false, descriptor_table_protodef_wtime_2eproto, "wtime.proto", 735, - &descriptor_table_wtime_2eproto_once, descriptor_table_wtime_2eproto_sccs, descriptor_table_wtime_2eproto_deps, 5, 1, - schemas, file_default_instances, TableStruct_wtime_2eproto::offsets, - file_level_metadata_wtime_2eproto, 5, file_level_enum_descriptors_wtime_2eproto, file_level_service_descriptors_wtime_2eproto, +static ::_pbi::once_flag descriptor_table_wtime_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_wtime_2eproto = { + false, false, 739, descriptor_table_protodef_wtime_2eproto, + "wtime.proto", + &descriptor_table_wtime_2eproto_once, descriptor_table_wtime_2eproto_deps, 1, 5, + schemas, file_default_instances, TableStruct_wtime_2eproto::offsets, + file_level_metadata_wtime_2eproto, file_level_enum_descriptors_wtime_2eproto, + file_level_service_descriptors_wtime_2eproto, }; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_wtime_2eproto_getter() { + return &descriptor_table_wtime_2eproto; +} // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_wtime_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_wtime_2eproto)), true); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_wtime_2eproto(&descriptor_table_wtime_2eproto); namespace HSS { namespace Times { // =================================================================== -void WTime::InitAsDefaultInstance() { - ::HSS::Times::_WTime_default_instance_._instance.get_mutable()->daylight_ = const_cast< PROTOBUF_NAMESPACE_ID::StringValue*>( - PROTOBUF_NAMESPACE_ID::StringValue::internal_default_instance()); - ::HSS::Times::_WTime_default_instance_._instance.get_mutable()->timezone_ = const_cast< PROTOBUF_NAMESPACE_ID::StringValue*>( - PROTOBUF_NAMESPACE_ID::StringValue::internal_default_instance()); - ::HSS::Times::_WTime_default_instance_._instance.get_mutable()->timezone_id_ = const_cast< PROTOBUF_NAMESPACE_ID::Int32Value*>( - PROTOBUF_NAMESPACE_ID::Int32Value::internal_default_instance()); -} class WTime::_Internal { public: - static const PROTOBUF_NAMESPACE_ID::StringValue& daylight(const WTime* msg); - static const PROTOBUF_NAMESPACE_ID::StringValue& timezone(const WTime* msg); - static const PROTOBUF_NAMESPACE_ID::Int32Value& timezone_id(const WTime* msg); + static const ::PROTOBUF_NAMESPACE_ID::StringValue& daylight(const WTime* msg); + static const ::PROTOBUF_NAMESPACE_ID::StringValue& timezone(const WTime* msg); + static const ::PROTOBUF_NAMESPACE_ID::Int32Value& timezone_id(const WTime* msg); }; -const PROTOBUF_NAMESPACE_ID::StringValue& +const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::_Internal::daylight(const WTime* msg) { - return *msg->daylight_; + return *msg->_impl_.daylight_; } -const PROTOBUF_NAMESPACE_ID::StringValue& +const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::_Internal::timezone(const WTime* msg) { - return *msg->timezone_; + return *msg->_impl_.timezone_; } -const PROTOBUF_NAMESPACE_ID::Int32Value& +const ::PROTOBUF_NAMESPACE_ID::Int32Value& WTime::_Internal::timezone_id(const WTime* msg) { - return *msg->timezone_id_; + return *msg->_impl_.timezone_id_; } void WTime::clear_daylight() { - if (GetArena() == nullptr && daylight_ != nullptr) { - delete daylight_; + if (GetArenaForAllocation() == nullptr && _impl_.daylight_ != nullptr) { + delete _impl_.daylight_; } - daylight_ = nullptr; + _impl_.daylight_ = nullptr; } void WTime::clear_timezone() { - if (GetArena() == nullptr && timezone_ != nullptr) { - delete timezone_; + if (GetArenaForAllocation() == nullptr && _impl_.timezone_ != nullptr) { + delete _impl_.timezone_; } - timezone_ = nullptr; + _impl_.timezone_ = nullptr; } void WTime::clear_timezone_id() { - if (GetArena() == nullptr && timezone_id_ != nullptr) { - delete timezone_id_; + if (GetArenaForAllocation() == nullptr && _impl_.timezone_id_ != nullptr) { + delete _impl_.timezone_id_; } - timezone_id_ = nullptr; + _impl_.timezone_id_ = nullptr; } -WTime::WTime(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); +WTime::WTime(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:HSS.Times.WTime) } WTime::WTime(const WTime& from) : ::PROTOBUF_NAMESPACE_ID::Message() { + WTime* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.time_){} + , decltype(_impl_.daylight_){nullptr} + , decltype(_impl_.timezone_){nullptr} + , decltype(_impl_.timezone_id_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _impl_.time_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.time_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (!from._internal_time().empty()) { - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_time(), - GetArena()); + _this->_impl_.time_.Set(from._internal_time(), + _this->GetArenaForAllocation()); } if (from._internal_has_daylight()) { - daylight_ = new PROTOBUF_NAMESPACE_ID::StringValue(*from.daylight_); - } else { - daylight_ = nullptr; + _this->_impl_.daylight_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.daylight_); } if (from._internal_has_timezone()) { - timezone_ = new PROTOBUF_NAMESPACE_ID::StringValue(*from.timezone_); - } else { - timezone_ = nullptr; + _this->_impl_.timezone_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.timezone_); } if (from._internal_has_timezone_id()) { - timezone_id_ = new PROTOBUF_NAMESPACE_ID::Int32Value(*from.timezone_id_); - } else { - timezone_id_ = nullptr; + _this->_impl_.timezone_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.timezone_id_); } // @@protoc_insertion_point(copy_constructor:HSS.Times.WTime) } -void WTime::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WTime_wtime_2eproto.base); - time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&daylight_, 0, static_cast( - reinterpret_cast(&timezone_id_) - - reinterpret_cast(&daylight_)) + sizeof(timezone_id_)); +inline void WTime::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.time_){} + , decltype(_impl_.daylight_){nullptr} + , decltype(_impl_.timezone_){nullptr} + , decltype(_impl_.timezone_id_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.time_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.time_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } WTime::~WTime() { // @@protoc_insertion_point(destructor:HSS.Times.WTime) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void WTime::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - time_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete daylight_; - if (this != internal_default_instance()) delete timezone_; - if (this != internal_default_instance()) delete timezone_id_; +inline void WTime::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.time_.Destroy(); + if (this != internal_default_instance()) delete _impl_.daylight_; + if (this != internal_default_instance()) delete _impl_.timezone_; + if (this != internal_default_instance()) delete _impl_.timezone_id_; } -void WTime::ArenaDtor(void* object) { - WTime* _this = reinterpret_cast< WTime* >(object); - (void)_this; -} -void WTime::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} void WTime::SetCachedSize(int size) const { - _cached_size_.Set(size); + _impl_._cached_size_.Set(size); } -const WTime& WTime::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WTime_wtime_2eproto.base); - return *internal_default_instance(); -} - void WTime::Clear() { // @@protoc_insertion_point(message_clear_start:HSS.Times.WTime) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - time_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && daylight_ != nullptr) { - delete daylight_; + _impl_.time_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.daylight_ != nullptr) { + delete _impl_.daylight_; } - daylight_ = nullptr; - if (GetArena() == nullptr && timezone_ != nullptr) { - delete timezone_; + _impl_.daylight_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.timezone_ != nullptr) { + delete _impl_.timezone_; } - timezone_ = nullptr; - if (GetArena() == nullptr && timezone_id_ != nullptr) { - delete timezone_id_; + _impl_.timezone_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.timezone_id_ != nullptr) { + delete _impl_.timezone_id_; } - timezone_id_ = nullptr; + _impl_.timezone_id_ = nullptr; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* WTime::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* WTime::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // string time = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_time(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "HSS.Times.WTime.time")); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); - } else goto handle_unusual; + CHK_(::_pbi::VerifyUTF8(str, "HSS.Times.WTime.time")); + } else + goto handle_unusual; continue; // .google.protobuf.StringValue daylight = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_daylight(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .google.protobuf.StringValue timezone = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_timezone(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .google.protobuf.Int32Value timezone_id = 4 [deprecated = true]; case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { ptr = ctx->ParseMessage(_internal_mutable_timezone_id(), ptr); CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); + } else + goto handle_unusual; continue; - } + default: + goto handle_unusual; } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); } // while -success: +message_done: return ptr; failure: ptr = nullptr; - goto success; + goto message_done; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* WTime::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { +uint8_t* WTime::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:HSS.Times.WTime) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; (void) cached_has_bits; // string time = 1; - if (this->time().size() > 0) { + if (!this->_internal_time().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_time().data(), static_cast(this->_internal_time().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -445,31 +427,28 @@ ::PROTOBUF_NAMESPACE_ID::uint8* WTime::_InternalSerialize( } // .google.protobuf.StringValue daylight = 2; - if (this->has_daylight()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_daylight()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::daylight(this), target, stream); + InternalWriteMessage(2, _Internal::daylight(this), + _Internal::daylight(this).GetCachedSize(), target, stream); } // .google.protobuf.StringValue timezone = 3; - if (this->has_timezone()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_timezone()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::timezone(this), target, stream); + InternalWriteMessage(3, _Internal::timezone(this), + _Internal::timezone(this).GetCachedSize(), target, stream); } // .google.protobuf.Int32Value timezone_id = 4 [deprecated = true]; - if (this->has_timezone_id()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_timezone_id()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 4, _Internal::timezone_id(this), target, stream); + InternalWriteMessage(4, _Internal::timezone_id(this), + _Internal::timezone_id(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:HSS.Times.WTime) @@ -480,88 +459,72 @@ size_t WTime::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:HSS.Times.WTime) size_t total_size = 0; - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string time = 1; - if (this->time().size() > 0) { + if (!this->_internal_time().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_time()); } // .google.protobuf.StringValue daylight = 2; - if (this->has_daylight()) { + if (this->_internal_has_daylight()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *daylight_); + *_impl_.daylight_); } // .google.protobuf.StringValue timezone = 3; - if (this->has_timezone()) { + if (this->_internal_has_timezone()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *timezone_); + *_impl_.timezone_); } // .google.protobuf.Int32Value timezone_id = 4 [deprecated = true]; - if (this->has_timezone_id()) { + if (this->_internal_has_timezone_id()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *timezone_id_); + *_impl_.timezone_id_); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -void WTime::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:HSS.Times.WTime) - GOOGLE_DCHECK_NE(&from, this); - const WTime* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:HSS.Times.WTime) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:HSS.Times.WTime) - MergeFrom(*source); - } -} +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WTime::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + WTime::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WTime::GetClassData() const { return &_class_data_; } -void WTime::MergeFrom(const WTime& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTime) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + +void WTime::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTime) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from.time().size() > 0) { - _internal_set_time(from._internal_time()); + if (!from._internal_time().empty()) { + _this->_internal_set_time(from._internal_time()); } - if (from.has_daylight()) { - _internal_mutable_daylight()->PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(from._internal_daylight()); + if (from._internal_has_daylight()) { + _this->_internal_mutable_daylight()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom( + from._internal_daylight()); } - if (from.has_timezone()) { - _internal_mutable_timezone()->PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(from._internal_timezone()); + if (from._internal_has_timezone()) { + _this->_internal_mutable_timezone()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom( + from._internal_timezone()); } - if (from.has_timezone_id()) { - _internal_mutable_timezone_id()->PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(from._internal_timezone_id()); + if (from._internal_has_timezone_id()) { + _this->_internal_mutable_timezone_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom( + from._internal_timezone_id()); } -} - -void WTime::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:HSS.Times.WTime) - if (&from == this) return; - Clear(); - MergeFrom(from); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void WTime::CopyFrom(const WTime& from) { @@ -577,134 +540,147 @@ bool WTime::IsInitialized() const { void WTime::InternalSwap(WTime* other) { using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - time_.Swap(&other->time_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.time_, lhs_arena, + &other->_impl_.time_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(WTime, timezone_id_) - + sizeof(WTime::timezone_id_) - - PROTOBUF_FIELD_OFFSET(WTime, daylight_)>( - reinterpret_cast(&daylight_), - reinterpret_cast(&other->daylight_)); + PROTOBUF_FIELD_OFFSET(WTime, _impl_.timezone_id_) + + sizeof(WTime::_impl_.timezone_id_) + - PROTOBUF_FIELD_OFFSET(WTime, _impl_.daylight_)>( + reinterpret_cast(&_impl_.daylight_), + reinterpret_cast(&other->_impl_.daylight_)); } ::PROTOBUF_NAMESPACE_ID::Metadata WTime::GetMetadata() const { - return GetMetadataStatic(); + return ::_pbi::AssignDescriptors( + &descriptor_table_wtime_2eproto_getter, &descriptor_table_wtime_2eproto_once, + file_level_metadata_wtime_2eproto[0]); } - // =================================================================== -void WTimeSpan::InitAsDefaultInstance() { -} class WTimeSpan::_Internal { public: }; -WTimeSpan::WTimeSpan(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); +WTimeSpan::WTimeSpan(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:HSS.Times.WTimeSpan) } WTimeSpan::WTimeSpan(const WTimeSpan& from) : ::PROTOBUF_NAMESPACE_ID::Message() { + WTimeSpan* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.time_){} + , /*decltype(_impl_._cached_size_)*/{}}; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _impl_.time_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.time_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (!from._internal_time().empty()) { - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_time(), - GetArena()); + _this->_impl_.time_.Set(from._internal_time(), + _this->GetArenaForAllocation()); } // @@protoc_insertion_point(copy_constructor:HSS.Times.WTimeSpan) } -void WTimeSpan::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WTimeSpan_wtime_2eproto.base); - time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +inline void WTimeSpan::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.time_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.time_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.time_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } WTimeSpan::~WTimeSpan() { // @@protoc_insertion_point(destructor:HSS.Times.WTimeSpan) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void WTimeSpan::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - time_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +inline void WTimeSpan::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.time_.Destroy(); } -void WTimeSpan::ArenaDtor(void* object) { - WTimeSpan* _this = reinterpret_cast< WTimeSpan* >(object); - (void)_this; -} -void WTimeSpan::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} void WTimeSpan::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const WTimeSpan& WTimeSpan::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WTimeSpan_wtime_2eproto.base); - return *internal_default_instance(); + _impl_._cached_size_.Set(size); } - void WTimeSpan::Clear() { // @@protoc_insertion_point(message_clear_start:HSS.Times.WTimeSpan) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - time_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _impl_.time_.ClearToEmpty(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* WTimeSpan::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* WTimeSpan::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // string time = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_time(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "HSS.Times.WTimeSpan.time")); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); + CHK_(::_pbi::VerifyUTF8(str, "HSS.Times.WTimeSpan.time")); + } else + goto handle_unusual; continue; - } + default: + goto handle_unusual; } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); } // while -success: +message_done: return ptr; failure: ptr = nullptr; - goto success; + goto message_done; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* WTimeSpan::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { +uint8_t* WTimeSpan::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:HSS.Times.WTimeSpan) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; (void) cached_has_bits; // string time = 1; - if (this->time().size() > 0) { + if (!this->_internal_time().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_time().data(), static_cast(this->_internal_time().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -714,7 +690,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* WTimeSpan::_InternalSerialize( } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:HSS.Times.WTimeSpan) @@ -725,58 +701,39 @@ size_t WTimeSpan::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:HSS.Times.WTimeSpan) size_t total_size = 0; - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string time = 1; - if (this->time().size() > 0) { + if (!this->_internal_time().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_time()); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -void WTimeSpan::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:HSS.Times.WTimeSpan) - GOOGLE_DCHECK_NE(&from, this); - const WTimeSpan* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:HSS.Times.WTimeSpan) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:HSS.Times.WTimeSpan) - MergeFrom(*source); - } -} +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WTimeSpan::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + WTimeSpan::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WTimeSpan::GetClassData() const { return &_class_data_; } -void WTimeSpan::MergeFrom(const WTimeSpan& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeSpan) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + +void WTimeSpan::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeSpan) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from.time().size() > 0) { - _internal_set_time(from._internal_time()); + if (!from._internal_time().empty()) { + _this->_internal_set_time(from._internal_time()); } -} - -void WTimeSpan::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:HSS.Times.WTimeSpan) - if (&from == this) return; - Clear(); - MergeFrom(from); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void WTimeSpan::CopyFrom(const WTimeSpan& from) { @@ -792,27 +749,23 @@ bool WTimeSpan::IsInitialized() const { void WTimeSpan::InternalSwap(WTimeSpan* other) { using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - time_.Swap(&other->time_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.time_, lhs_arena, + &other->_impl_.time_, rhs_arena + ); } ::PROTOBUF_NAMESPACE_ID::Metadata WTimeSpan::GetMetadata() const { - return GetMetadataStatic(); + return ::_pbi::AssignDescriptors( + &descriptor_table_wtime_2eproto_getter, &descriptor_table_wtime_2eproto_once, + file_level_metadata_wtime_2eproto[1]); } - // =================================================================== -void WTimeZone_WTZDetails::InitAsDefaultInstance() { - ::HSS::Times::_WTimeZone_WTZDetails_default_instance_._instance.get_mutable()->amttimezone_ = const_cast< ::HSS::Times::WTimeSpan*>( - ::HSS::Times::WTimeSpan::internal_default_instance()); - ::HSS::Times::_WTimeZone_WTZDetails_default_instance_._instance.get_mutable()->startdst_ = const_cast< ::HSS::Times::WTimeSpan*>( - ::HSS::Times::WTimeSpan::internal_default_instance()); - ::HSS::Times::_WTimeZone_WTZDetails_default_instance_._instance.get_mutable()->enddst_ = const_cast< ::HSS::Times::WTimeSpan*>( - ::HSS::Times::WTimeSpan::internal_default_instance()); - ::HSS::Times::_WTimeZone_WTZDetails_default_instance_._instance.get_mutable()->amtdst_ = const_cast< ::HSS::Times::WTimeSpan*>( - ::HSS::Times::WTimeSpan::internal_default_instance()); -} class WTimeZone_WTZDetails::_Internal { public: static const ::HSS::Times::WTimeSpan& amttimezone(const WTimeZone_WTZDetails* msg); @@ -823,211 +776,208 @@ class WTimeZone_WTZDetails::_Internal { const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_Internal::amttimezone(const WTimeZone_WTZDetails* msg) { - return *msg->amttimezone_; + return *msg->_impl_.amttimezone_; } const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_Internal::startdst(const WTimeZone_WTZDetails* msg) { - return *msg->startdst_; + return *msg->_impl_.startdst_; } const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_Internal::enddst(const WTimeZone_WTZDetails* msg) { - return *msg->enddst_; + return *msg->_impl_.enddst_; } const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_Internal::amtdst(const WTimeZone_WTZDetails* msg) { - return *msg->amtdst_; + return *msg->_impl_.amtdst_; } -WTimeZone_WTZDetails::WTimeZone_WTZDetails(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); +WTimeZone_WTZDetails::WTimeZone_WTZDetails(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:HSS.Times.WTimeZone.WTZDetails) } WTimeZone_WTZDetails::WTimeZone_WTZDetails(const WTimeZone_WTZDetails& from) : ::PROTOBUF_NAMESPACE_ID::Message() { + WTimeZone_WTZDetails* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.amttimezone_){nullptr} + , decltype(_impl_.startdst_){nullptr} + , decltype(_impl_.enddst_){nullptr} + , decltype(_impl_.amtdst_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); if (from._internal_has_amttimezone()) { - amttimezone_ = new ::HSS::Times::WTimeSpan(*from.amttimezone_); - } else { - amttimezone_ = nullptr; + _this->_impl_.amttimezone_ = new ::HSS::Times::WTimeSpan(*from._impl_.amttimezone_); } if (from._internal_has_startdst()) { - startdst_ = new ::HSS::Times::WTimeSpan(*from.startdst_); - } else { - startdst_ = nullptr; + _this->_impl_.startdst_ = new ::HSS::Times::WTimeSpan(*from._impl_.startdst_); } if (from._internal_has_enddst()) { - enddst_ = new ::HSS::Times::WTimeSpan(*from.enddst_); - } else { - enddst_ = nullptr; + _this->_impl_.enddst_ = new ::HSS::Times::WTimeSpan(*from._impl_.enddst_); } if (from._internal_has_amtdst()) { - amtdst_ = new ::HSS::Times::WTimeSpan(*from.amtdst_); - } else { - amtdst_ = nullptr; + _this->_impl_.amtdst_ = new ::HSS::Times::WTimeSpan(*from._impl_.amtdst_); } // @@protoc_insertion_point(copy_constructor:HSS.Times.WTimeZone.WTZDetails) } -void WTimeZone_WTZDetails::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WTimeZone_WTZDetails_wtime_2eproto.base); - ::memset(&amttimezone_, 0, static_cast( - reinterpret_cast(&amtdst_) - - reinterpret_cast(&amttimezone_)) + sizeof(amtdst_)); +inline void WTimeZone_WTZDetails::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.amttimezone_){nullptr} + , decltype(_impl_.startdst_){nullptr} + , decltype(_impl_.enddst_){nullptr} + , decltype(_impl_.amtdst_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; } WTimeZone_WTZDetails::~WTimeZone_WTZDetails() { // @@protoc_insertion_point(destructor:HSS.Times.WTimeZone.WTZDetails) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void WTimeZone_WTZDetails::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (this != internal_default_instance()) delete amttimezone_; - if (this != internal_default_instance()) delete startdst_; - if (this != internal_default_instance()) delete enddst_; - if (this != internal_default_instance()) delete amtdst_; +inline void WTimeZone_WTZDetails::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.amttimezone_; + if (this != internal_default_instance()) delete _impl_.startdst_; + if (this != internal_default_instance()) delete _impl_.enddst_; + if (this != internal_default_instance()) delete _impl_.amtdst_; } -void WTimeZone_WTZDetails::ArenaDtor(void* object) { - WTimeZone_WTZDetails* _this = reinterpret_cast< WTimeZone_WTZDetails* >(object); - (void)_this; -} -void WTimeZone_WTZDetails::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} void WTimeZone_WTZDetails::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const WTimeZone_WTZDetails& WTimeZone_WTZDetails::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WTimeZone_WTZDetails_wtime_2eproto.base); - return *internal_default_instance(); + _impl_._cached_size_.Set(size); } - void WTimeZone_WTZDetails::Clear() { // @@protoc_insertion_point(message_clear_start:HSS.Times.WTimeZone.WTZDetails) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArena() == nullptr && amttimezone_ != nullptr) { - delete amttimezone_; + if (GetArenaForAllocation() == nullptr && _impl_.amttimezone_ != nullptr) { + delete _impl_.amttimezone_; } - amttimezone_ = nullptr; - if (GetArena() == nullptr && startdst_ != nullptr) { - delete startdst_; + _impl_.amttimezone_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.startdst_ != nullptr) { + delete _impl_.startdst_; } - startdst_ = nullptr; - if (GetArena() == nullptr && enddst_ != nullptr) { - delete enddst_; + _impl_.startdst_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.enddst_ != nullptr) { + delete _impl_.enddst_; } - enddst_ = nullptr; - if (GetArena() == nullptr && amtdst_ != nullptr) { - delete amtdst_; + _impl_.enddst_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.amtdst_ != nullptr) { + delete _impl_.amtdst_; } - amtdst_ = nullptr; + _impl_.amtdst_ = nullptr; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* WTimeZone_WTZDetails::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* WTimeZone_WTZDetails::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // .HSS.Times.WTimeSpan amtTimeZone = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { ptr = ctx->ParseMessage(_internal_mutable_amttimezone(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .HSS.Times.WTimeSpan startDST = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_startdst(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .HSS.Times.WTimeSpan endDST = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_enddst(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .HSS.Times.WTimeSpan amtDST = 4; case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { ptr = ctx->ParseMessage(_internal_mutable_amtdst(), ptr); CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); + } else + goto handle_unusual; continue; - } + default: + goto handle_unusual; } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); } // while -success: +message_done: return ptr; failure: ptr = nullptr; - goto success; + goto message_done; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* WTimeZone_WTZDetails::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { +uint8_t* WTimeZone_WTZDetails::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:HSS.Times.WTimeZone.WTZDetails) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; (void) cached_has_bits; // .HSS.Times.WTimeSpan amtTimeZone = 1; - if (this->has_amttimezone()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_amttimezone()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 1, _Internal::amttimezone(this), target, stream); + InternalWriteMessage(1, _Internal::amttimezone(this), + _Internal::amttimezone(this).GetCachedSize(), target, stream); } // .HSS.Times.WTimeSpan startDST = 2; - if (this->has_startdst()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_startdst()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::startdst(this), target, stream); + InternalWriteMessage(2, _Internal::startdst(this), + _Internal::startdst(this).GetCachedSize(), target, stream); } // .HSS.Times.WTimeSpan endDST = 3; - if (this->has_enddst()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_enddst()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::enddst(this), target, stream); + InternalWriteMessage(3, _Internal::enddst(this), + _Internal::enddst(this).GetCachedSize(), target, stream); } // .HSS.Times.WTimeSpan amtDST = 4; - if (this->has_amtdst()) { - target = stream->EnsureSpace(target); + if (this->_internal_has_amtdst()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 4, _Internal::amtdst(this), target, stream); + InternalWriteMessage(4, _Internal::amtdst(this), + _Internal::amtdst(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:HSS.Times.WTimeZone.WTZDetails) @@ -1038,88 +988,73 @@ size_t WTimeZone_WTZDetails::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:HSS.Times.WTimeZone.WTZDetails) size_t total_size = 0; - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // .HSS.Times.WTimeSpan amtTimeZone = 1; - if (this->has_amttimezone()) { + if (this->_internal_has_amttimezone()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *amttimezone_); + *_impl_.amttimezone_); } // .HSS.Times.WTimeSpan startDST = 2; - if (this->has_startdst()) { + if (this->_internal_has_startdst()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *startdst_); + *_impl_.startdst_); } // .HSS.Times.WTimeSpan endDST = 3; - if (this->has_enddst()) { + if (this->_internal_has_enddst()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *enddst_); + *_impl_.enddst_); } // .HSS.Times.WTimeSpan amtDST = 4; - if (this->has_amtdst()) { + if (this->_internal_has_amtdst()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *amtdst_); + *_impl_.amtdst_); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -void WTimeZone_WTZDetails::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:HSS.Times.WTimeZone.WTZDetails) - GOOGLE_DCHECK_NE(&from, this); - const WTimeZone_WTZDetails* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:HSS.Times.WTimeZone.WTZDetails) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:HSS.Times.WTimeZone.WTZDetails) - MergeFrom(*source); - } -} +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WTimeZone_WTZDetails::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + WTimeZone_WTZDetails::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WTimeZone_WTZDetails::GetClassData() const { return &_class_data_; } -void WTimeZone_WTZDetails::MergeFrom(const WTimeZone_WTZDetails& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone.WTZDetails) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + +void WTimeZone_WTZDetails::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone.WTZDetails) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from.has_amttimezone()) { - _internal_mutable_amttimezone()->::HSS::Times::WTimeSpan::MergeFrom(from._internal_amttimezone()); + if (from._internal_has_amttimezone()) { + _this->_internal_mutable_amttimezone()->::HSS::Times::WTimeSpan::MergeFrom( + from._internal_amttimezone()); } - if (from.has_startdst()) { - _internal_mutable_startdst()->::HSS::Times::WTimeSpan::MergeFrom(from._internal_startdst()); + if (from._internal_has_startdst()) { + _this->_internal_mutable_startdst()->::HSS::Times::WTimeSpan::MergeFrom( + from._internal_startdst()); } - if (from.has_enddst()) { - _internal_mutable_enddst()->::HSS::Times::WTimeSpan::MergeFrom(from._internal_enddst()); + if (from._internal_has_enddst()) { + _this->_internal_mutable_enddst()->::HSS::Times::WTimeSpan::MergeFrom( + from._internal_enddst()); } - if (from.has_amtdst()) { - _internal_mutable_amtdst()->::HSS::Times::WTimeSpan::MergeFrom(from._internal_amtdst()); + if (from._internal_has_amtdst()) { + _this->_internal_mutable_amtdst()->::HSS::Times::WTimeSpan::MergeFrom( + from._internal_amtdst()); } -} - -void WTimeZone_WTZDetails::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:HSS.Times.WTimeZone.WTZDetails) - if (&from == this) return; - Clear(); - MergeFrom(from); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void WTimeZone_WTZDetails::CopyFrom(const WTimeZone_WTZDetails& from) { @@ -1135,152 +1070,163 @@ bool WTimeZone_WTZDetails::IsInitialized() const { void WTimeZone_WTZDetails::InternalSwap(WTimeZone_WTZDetails* other) { using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(WTimeZone_WTZDetails, amtdst_) - + sizeof(WTimeZone_WTZDetails::amtdst_) - - PROTOBUF_FIELD_OFFSET(WTimeZone_WTZDetails, amttimezone_)>( - reinterpret_cast(&amttimezone_), - reinterpret_cast(&other->amttimezone_)); + PROTOBUF_FIELD_OFFSET(WTimeZone_WTZDetails, _impl_.amtdst_) + + sizeof(WTimeZone_WTZDetails::_impl_.amtdst_) + - PROTOBUF_FIELD_OFFSET(WTimeZone_WTZDetails, _impl_.amttimezone_)>( + reinterpret_cast(&_impl_.amttimezone_), + reinterpret_cast(&other->_impl_.amttimezone_)); } ::PROTOBUF_NAMESPACE_ID::Metadata WTimeZone_WTZDetails::GetMetadata() const { - return GetMetadataStatic(); + return ::_pbi::AssignDescriptors( + &descriptor_table_wtime_2eproto_getter, &descriptor_table_wtime_2eproto_once, + file_level_metadata_wtime_2eproto[2]); } - // =================================================================== -void WTimeZone_TZTimeZone::InitAsDefaultInstance() { -} class WTimeZone_TZTimeZone::_Internal { public: - using HasBits = decltype(std::declval()._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static void set_has_daylight(HasBits* has_bits) { (*has_bits)[0] |= 1u; } }; -WTimeZone_TZTimeZone::WTimeZone_TZTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); +WTimeZone_TZTimeZone::WTimeZone_TZTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:HSS.Times.WTimeZone.TZTimeZone) } WTimeZone_TZTimeZone::WTimeZone_TZTimeZone(const WTimeZone_TZTimeZone& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _has_bits_(from._has_bits_) { + : ::PROTOBUF_NAMESPACE_ID::Message() { + WTimeZone_TZTimeZone* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.daylight_){}}; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING if (!from._internal_name().empty()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), - GetArena()); + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); } - daylight_ = from.daylight_; + _this->_impl_.daylight_ = from._impl_.daylight_; // @@protoc_insertion_point(copy_constructor:HSS.Times.WTimeZone.TZTimeZone) } -void WTimeZone_TZTimeZone::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WTimeZone_TZTimeZone_wtime_2eproto.base); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - daylight_ = false; +inline void WTimeZone_TZTimeZone::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.daylight_){false} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } WTimeZone_TZTimeZone::~WTimeZone_TZTimeZone() { // @@protoc_insertion_point(destructor:HSS.Times.WTimeZone.TZTimeZone) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void WTimeZone_TZTimeZone::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +inline void WTimeZone_TZTimeZone::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); } -void WTimeZone_TZTimeZone::ArenaDtor(void* object) { - WTimeZone_TZTimeZone* _this = reinterpret_cast< WTimeZone_TZTimeZone* >(object); - (void)_this; -} -void WTimeZone_TZTimeZone::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} void WTimeZone_TZTimeZone::SetCachedSize(int size) const { - _cached_size_.Set(size); + _impl_._cached_size_.Set(size); } -const WTimeZone_TZTimeZone& WTimeZone_TZTimeZone::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WTimeZone_TZTimeZone_wtime_2eproto.base); - return *internal_default_instance(); -} - void WTimeZone_TZTimeZone::Clear() { // @@protoc_insertion_point(message_clear_start:HSS.Times.WTimeZone.TZTimeZone) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - daylight_ = false; - _has_bits_.Clear(); + _impl_.name_.ClearToEmpty(); + _impl_.daylight_ = false; + _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* WTimeZone_TZTimeZone::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* WTimeZone_TZTimeZone::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // string name = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "HSS.Times.WTimeZone.TZTimeZone.name")); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); - } else goto handle_unusual; + CHK_(::_pbi::VerifyUTF8(str, "HSS.Times.WTimeZone.TZTimeZone.name")); + } else + goto handle_unusual; continue; - // bool daylight = 2; + // optional bool daylight = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { _Internal::set_has_daylight(&has_bits); - daylight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.daylight_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } + default: + goto handle_unusual; } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); } // while -success: - _has_bits_.Or(has_bits); +message_done: + _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; - goto success; + goto message_done; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* WTimeZone_TZTimeZone::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { +uint8_t* WTimeZone_TZTimeZone::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:HSS.Times.WTimeZone.TZTimeZone) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; (void) cached_has_bits; // string name = 1; - if (this->name().size() > 0) { + if (!this->_internal_name().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -1289,14 +1235,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* WTimeZone_TZTimeZone::_InternalSerialize( 1, this->_internal_name(), target); } - // bool daylight = 2; + // optional bool daylight = 2; if (_internal_has_daylight()) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_daylight(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_daylight(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:HSS.Times.WTimeZone.TZTimeZone) @@ -1307,67 +1253,48 @@ size_t WTimeZone_TZTimeZone::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:HSS.Times.WTimeZone.TZTimeZone) size_t total_size = 0; - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string name = 1; - if (this->name().size() > 0) { + if (!this->_internal_name().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_name()); } - // bool daylight = 2; - cached_has_bits = _has_bits_[0]; + // optional bool daylight = 2; + cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + 1; } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -void WTimeZone_TZTimeZone::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:HSS.Times.WTimeZone.TZTimeZone) - GOOGLE_DCHECK_NE(&from, this); - const WTimeZone_TZTimeZone* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:HSS.Times.WTimeZone.TZTimeZone) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:HSS.Times.WTimeZone.TZTimeZone) - MergeFrom(*source); - } -} +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WTimeZone_TZTimeZone::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + WTimeZone_TZTimeZone::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WTimeZone_TZTimeZone::GetClassData() const { return &_class_data_; } -void WTimeZone_TZTimeZone::MergeFrom(const WTimeZone_TZTimeZone& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone.TZTimeZone) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + +void WTimeZone_TZTimeZone::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone.TZTimeZone) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from.name().size() > 0) { - _internal_set_name(from._internal_name()); + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); } if (from._internal_has_daylight()) { - _internal_set_daylight(from._internal_daylight()); + _this->_internal_set_daylight(from._internal_daylight()); } -} - -void WTimeZone_TZTimeZone::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:HSS.Times.WTimeZone.TZTimeZone) - if (&from == this) return; - Clear(); - MergeFrom(from); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void WTimeZone_TZTimeZone::CopyFrom(const WTimeZone_TZTimeZone& from) { @@ -1383,26 +1310,25 @@ bool WTimeZone_TZTimeZone::IsInitialized() const { void WTimeZone_TZTimeZone::InternalSwap(WTimeZone_TZTimeZone* other) { using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(daylight_, other->daylight_); + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.daylight_, other->_impl_.daylight_); } ::PROTOBUF_NAMESPACE_ID::Metadata WTimeZone_TZTimeZone::GetMetadata() const { - return GetMetadataStatic(); + return ::_pbi::AssignDescriptors( + &descriptor_table_wtime_2eproto_getter, &descriptor_table_wtime_2eproto_once, + file_level_metadata_wtime_2eproto[3]); } - // =================================================================== -void WTimeZone::InitAsDefaultInstance() { - ::HSS::Times::_WTimeZone_default_instance_.timezoneindex_ = 0; - ::HSS::Times::_WTimeZone_default_instance_.timezonedetails_ = const_cast< ::HSS::Times::WTimeZone_WTZDetails*>( - ::HSS::Times::WTimeZone_WTZDetails::internal_default_instance()); - ::HSS::Times::_WTimeZone_default_instance_.tztimezone_ = const_cast< ::HSS::Times::WTimeZone_TZTimeZone*>( - ::HSS::Times::WTimeZone_TZTimeZone::internal_default_instance()); -} class WTimeZone::_Internal { public: static const ::HSS::Times::WTimeZone_WTZDetails& timezonedetails(const WTimeZone* msg); @@ -1411,64 +1337,73 @@ class WTimeZone::_Internal { const ::HSS::Times::WTimeZone_WTZDetails& WTimeZone::_Internal::timezonedetails(const WTimeZone* msg) { - return *msg->msg_.timezonedetails_; + return *msg->_impl_.msg_.timezonedetails_; } const ::HSS::Times::WTimeZone_TZTimeZone& WTimeZone::_Internal::tztimezone(const WTimeZone* msg) { - return *msg->msg_.tztimezone_; + return *msg->_impl_.msg_.tztimezone_; } void WTimeZone::set_allocated_timezonedetails(::HSS::Times::WTimeZone_WTZDetails* timezonedetails) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_msg(); if (timezonedetails) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(timezonedetails); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(timezonedetails); if (message_arena != submessage_arena) { timezonedetails = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, timezonedetails, submessage_arena); } set_has_timezonedetails(); - msg_.timezonedetails_ = timezonedetails; + _impl_.msg_.timezonedetails_ = timezonedetails; } // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.timezoneDetails) } void WTimeZone::set_allocated_tztimezone(::HSS::Times::WTimeZone_TZTimeZone* tztimezone) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_msg(); if (tztimezone) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(tztimezone); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tztimezone); if (message_arena != submessage_arena) { tztimezone = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, tztimezone, submessage_arena); } set_has_tztimezone(); - msg_.tztimezone_ = tztimezone; + _impl_.msg_.tztimezone_ = tztimezone; } // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.tztimezone) } -WTimeZone::WTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); +WTimeZone::WTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:HSS.Times.WTimeZone) } WTimeZone::WTimeZone(const WTimeZone& from) : ::PROTOBUF_NAMESPACE_ID::Message() { + WTimeZone* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.version_){} + , decltype(_impl_.msg_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - version_ = from.version_; + _this->_impl_.version_ = from._impl_.version_; clear_has_msg(); switch (from.msg_case()) { case kTimezoneIndex: { - _internal_set_timezoneindex(from._internal_timezoneindex()); + _this->_internal_set_timezoneindex(from._internal_timezoneindex()); break; } case kTimezoneDetails: { - _internal_mutable_timezonedetails()->::HSS::Times::WTimeZone_WTZDetails::MergeFrom(from._internal_timezonedetails()); + _this->_internal_mutable_timezonedetails()->::HSS::Times::WTimeZone_WTZDetails::MergeFrom( + from._internal_timezonedetails()); break; } case kTztimezone: { - _internal_mutable_tztimezone()->::HSS::Times::WTimeZone_TZTimeZone::MergeFrom(from._internal_tztimezone()); + _this->_internal_mutable_tztimezone()->::HSS::Times::WTimeZone_TZTimeZone::MergeFrom( + from._internal_tztimezone()); break; } case MSG_NOT_SET: { @@ -1478,39 +1413,38 @@ WTimeZone::WTimeZone(const WTimeZone& from) // @@protoc_insertion_point(copy_constructor:HSS.Times.WTimeZone) } -void WTimeZone::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WTimeZone_wtime_2eproto.base); - version_ = 0; +inline void WTimeZone::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.version_){0} + , decltype(_impl_.msg_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; clear_has_msg(); } WTimeZone::~WTimeZone() { // @@protoc_insertion_point(destructor:HSS.Times.WTimeZone) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void WTimeZone::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); +inline void WTimeZone::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (has_msg()) { clear_msg(); } } -void WTimeZone::ArenaDtor(void* object) { - WTimeZone* _this = reinterpret_cast< WTimeZone* >(object); - (void)_this; -} -void WTimeZone::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} void WTimeZone::SetCachedSize(int size) const { - _cached_size_.Set(size); + _impl_._cached_size_.Set(size); } -const WTimeZone& WTimeZone::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WTimeZone_wtime_2eproto.base); - return *internal_default_instance(); -} - void WTimeZone::clear_msg() { // @@protoc_insertion_point(one_of_clear_start:HSS.Times.WTimeZone) @@ -1520,14 +1454,14 @@ void WTimeZone::clear_msg() { break; } case kTimezoneDetails: { - if (GetArena() == nullptr) { - delete msg_.timezonedetails_; + if (GetArenaForAllocation() == nullptr) { + delete _impl_.msg_.timezonedetails_; } break; } case kTztimezone: { - if (GetArena() == nullptr) { - delete msg_.tztimezone_; + if (GetArenaForAllocation() == nullptr) { + delete _impl_.msg_.tztimezone_; } break; } @@ -1535,115 +1469,116 @@ void WTimeZone::clear_msg() { break; } } - _oneof_case_[0] = MSG_NOT_SET; + _impl_._oneof_case_[0] = MSG_NOT_SET; } void WTimeZone::Clear() { // @@protoc_insertion_point(message_clear_start:HSS.Times.WTimeZone) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - version_ = 0; + _impl_.version_ = 0; clear_msg(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* WTimeZone::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* WTimeZone::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // int32 version = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; - // int32 timezoneIndex = 2; + // int32 timezoneIndex = 2 [deprecated = true]; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - _internal_set_timezoneindex(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _internal_set_timezoneindex(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .HSS.Times.WTimeZone.WTZDetails timezoneDetails = 3 [deprecated = true]; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_timezonedetails(), ptr); CHK_(ptr); - } else goto handle_unusual; + } else + goto handle_unusual; continue; // .HSS.Times.WTimeZone.TZTimeZone tztimezone = 4; case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { ptr = ctx->ParseMessage(_internal_mutable_tztimezone(), ptr); CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); + } else + goto handle_unusual; continue; - } + default: + goto handle_unusual; } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); } // while -success: +message_done: return ptr; failure: ptr = nullptr; - goto success; + goto message_done; #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* WTimeZone::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { +uint8_t* WTimeZone::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:HSS.Times.WTimeZone) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; (void) cached_has_bits; // int32 version = 1; - if (this->version() != 0) { + if (this->_internal_version() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target); } - // int32 timezoneIndex = 2; + // int32 timezoneIndex = 2 [deprecated = true]; if (_internal_has_timezoneindex()) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_timezoneindex(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_timezoneindex(), target); } // .HSS.Times.WTimeZone.WTZDetails timezoneDetails = 3 [deprecated = true]; if (_internal_has_timezonedetails()) { - target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::timezonedetails(this), target, stream); + InternalWriteMessage(3, _Internal::timezonedetails(this), + _Internal::timezonedetails(this).GetCachedSize(), target, stream); } // .HSS.Times.WTimeZone.TZTimeZone tztimezone = 4; if (_internal_has_tztimezone()) { - target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 4, _Internal::tztimezone(this), target, stream); + InternalWriteMessage(4, _Internal::tztimezone(this), + _Internal::tztimezone(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:HSS.Times.WTimeZone) @@ -1654,101 +1589,80 @@ size_t WTimeZone::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:HSS.Times.WTimeZone) size_t total_size = 0; - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // int32 version = 1; - if (this->version() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_version()); + if (this->_internal_version() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_version()); } switch (msg_case()) { - // int32 timezoneIndex = 2; + // int32 timezoneIndex = 2 [deprecated = true]; case kTimezoneIndex: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_timezoneindex()); + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_timezoneindex()); break; } // .HSS.Times.WTimeZone.WTZDetails timezoneDetails = 3 [deprecated = true]; case kTimezoneDetails: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *msg_.timezonedetails_); + *_impl_.msg_.timezonedetails_); break; } // .HSS.Times.WTimeZone.TZTimeZone tztimezone = 4; case kTztimezone: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *msg_.tztimezone_); + *_impl_.msg_.tztimezone_); break; } case MSG_NOT_SET: { break; } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -void WTimeZone::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:HSS.Times.WTimeZone) - GOOGLE_DCHECK_NE(&from, this); - const WTimeZone* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:HSS.Times.WTimeZone) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:HSS.Times.WTimeZone) - MergeFrom(*source); - } -} +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WTimeZone::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + WTimeZone::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WTimeZone::GetClassData() const { return &_class_data_; } -void WTimeZone::MergeFrom(const WTimeZone& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + +void WTimeZone::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:HSS.Times.WTimeZone) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from.version() != 0) { - _internal_set_version(from._internal_version()); + if (from._internal_version() != 0) { + _this->_internal_set_version(from._internal_version()); } switch (from.msg_case()) { case kTimezoneIndex: { - _internal_set_timezoneindex(from._internal_timezoneindex()); + _this->_internal_set_timezoneindex(from._internal_timezoneindex()); break; } case kTimezoneDetails: { - _internal_mutable_timezonedetails()->::HSS::Times::WTimeZone_WTZDetails::MergeFrom(from._internal_timezonedetails()); + _this->_internal_mutable_timezonedetails()->::HSS::Times::WTimeZone_WTZDetails::MergeFrom( + from._internal_timezonedetails()); break; } case kTztimezone: { - _internal_mutable_tztimezone()->::HSS::Times::WTimeZone_TZTimeZone::MergeFrom(from._internal_tztimezone()); + _this->_internal_mutable_tztimezone()->::HSS::Times::WTimeZone_TZTimeZone::MergeFrom( + from._internal_tztimezone()); break; } case MSG_NOT_SET: { break; } } -} - -void WTimeZone::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:HSS.Times.WTimeZone) - if (&from == this) return; - Clear(); - MergeFrom(from); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void WTimeZone::CopyFrom(const WTimeZone& from) { @@ -1764,34 +1678,40 @@ bool WTimeZone::IsInitialized() const { void WTimeZone::InternalSwap(WTimeZone* other) { using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(version_, other->version_); - swap(msg_, other->msg_); - swap(_oneof_case_[0], other->_oneof_case_[0]); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.version_, other->_impl_.version_); + swap(_impl_.msg_, other->_impl_.msg_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } ::PROTOBUF_NAMESPACE_ID::Metadata WTimeZone::GetMetadata() const { - return GetMetadataStatic(); + return ::_pbi::AssignDescriptors( + &descriptor_table_wtime_2eproto_getter, &descriptor_table_wtime_2eproto_once, + file_level_metadata_wtime_2eproto[4]); } - // @@protoc_insertion_point(namespace_scope) } // namespace Times } // namespace HSS PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::HSS::Times::WTime* Arena::CreateMaybeMessage< ::HSS::Times::WTime >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::HSS::Times::WTime* +Arena::CreateMaybeMessage< ::HSS::Times::WTime >(Arena* arena) { return Arena::CreateMessageInternal< ::HSS::Times::WTime >(arena); } -template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeSpan* Arena::CreateMaybeMessage< ::HSS::Times::WTimeSpan >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeSpan* +Arena::CreateMaybeMessage< ::HSS::Times::WTimeSpan >(Arena* arena) { return Arena::CreateMessageInternal< ::HSS::Times::WTimeSpan >(arena); } -template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone_WTZDetails* Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone_WTZDetails >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone_WTZDetails* +Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone_WTZDetails >(Arena* arena) { return Arena::CreateMessageInternal< ::HSS::Times::WTimeZone_WTZDetails >(arena); } -template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone_TZTimeZone* Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone_TZTimeZone >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone_TZTimeZone* +Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone_TZTimeZone >(Arena* arena) { return Arena::CreateMessageInternal< ::HSS::Times::WTimeZone_TZTimeZone >(arena); } -template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone* Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone >(Arena* arena) { +template<> PROTOBUF_NOINLINE ::HSS::Times::WTimeZone* +Arena::CreateMaybeMessage< ::HSS::Times::WTimeZone >(Arena* arena) { return Arena::CreateMessageInternal< ::HSS::Times::WTimeZone >(arena); } PROTOBUF_NAMESPACE_CLOSE From f6c0fd143461282d9cb89bb30e8773c72a3e3c9c Mon Sep 17 00:00:00 2001 From: Robert Bryce Date: Mon, 29 Jul 2024 11:34:36 -0500 Subject: [PATCH 3/4] missed update to a generated file --- cxx/include/wtime.pb.h | 1270 +++++++++++++++++++++------------------- 1 file changed, 666 insertions(+), 604 deletions(-) diff --git a/cxx/include/wtime.pb.h b/cxx/include/wtime.pb.h index fb346ca..d519dbe 100644 --- a/cxx/include/wtime.pb.h +++ b/cxx/include/wtime.pb.h @@ -10,12 +10,12 @@ #include #include -#if PROTOBUF_VERSION < 3013000 +#if PROTOBUF_VERSION < 3021000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3013000 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021001 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -46,33 +44,25 @@ PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TIMES_API TableStruct_wtime_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; + static const uint32_t offsets[]; }; -extern TIMES_API const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_wtime_2eproto; +TIMES_API extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_wtime_2eproto; namespace HSS { namespace Times { class WTime; -class WTimeDefaultTypeInternal; +struct WTimeDefaultTypeInternal; TIMES_API extern WTimeDefaultTypeInternal _WTime_default_instance_; class WTimeSpan; -class WTimeSpanDefaultTypeInternal; +struct WTimeSpanDefaultTypeInternal; TIMES_API extern WTimeSpanDefaultTypeInternal _WTimeSpan_default_instance_; class WTimeZone; -class WTimeZoneDefaultTypeInternal; +struct WTimeZoneDefaultTypeInternal; TIMES_API extern WTimeZoneDefaultTypeInternal _WTimeZone_default_instance_; class WTimeZone_TZTimeZone; -class WTimeZone_TZTimeZoneDefaultTypeInternal; +struct WTimeZone_TZTimeZoneDefaultTypeInternal; TIMES_API extern WTimeZone_TZTimeZoneDefaultTypeInternal _WTimeZone_TZTimeZone_default_instance_; class WTimeZone_WTZDetails; -class WTimeZone_WTZDetailsDefaultTypeInternal; +struct WTimeZone_WTZDetailsDefaultTypeInternal; TIMES_API extern WTimeZone_WTZDetailsDefaultTypeInternal _WTimeZone_WTZDetails_default_instance_; } // namespace Times } // namespace HSS @@ -88,11 +78,12 @@ namespace Times { // =================================================================== -class TIMES_API WTime PROTOBUF_FINAL : +class TIMES_API WTime final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:HSS.Times.WTime) */ { public: inline WTime() : WTime(nullptr) {} - virtual ~WTime(); + ~WTime() override; + explicit PROTOBUF_CONSTEXPR WTime(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); WTime(const WTime& from); WTime(WTime&& from) noexcept @@ -105,8 +96,13 @@ class TIMES_API WTime PROTOBUF_FINAL : return *this; } inline WTime& operator=(WTime&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); } else { CopyFrom(from); } @@ -117,14 +113,14 @@ class TIMES_API WTime PROTOBUF_FINAL : return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; + return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; + return default_instance().GetMetadata().reflection; + } + static const WTime& default_instance() { + return *internal_default_instance(); } - static const WTime& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const WTime* internal_default_instance() { return reinterpret_cast( &_WTime_default_instance_); @@ -137,7 +133,12 @@ class TIMES_API WTime PROTOBUF_FINAL : } inline void Swap(WTime* other) { if (other == this) return; - if (GetArena() == other->GetArena()) { + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); @@ -145,56 +146,53 @@ class TIMES_API WTime PROTOBUF_FINAL : } void UnsafeArenaSwap(WTime* other) { if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline WTime* New() const final { - return CreateMaybeMessage(nullptr); - } - - WTime* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + WTime* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const WTime& from); - void MergeFrom(const WTime& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WTime& from) { + WTime::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - inline void SharedCtor(); - inline void SharedDtor(); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(WTime* other); + + private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "HSS.Times.WTime"; } protected: - explicit WTime(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit WTime(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_wtime_2eproto); - return ::descriptor_table_wtime_2eproto.file_level_metadata[kIndexInFileMessages]; - } + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -209,16 +207,14 @@ class TIMES_API WTime PROTOBUF_FINAL : // string time = 1; void clear_time(); const std::string& time() const; - void set_time(const std::string& value); - void set_time(std::string&& value); - void set_time(const char* value); - void set_time(const char* value, size_t size); + template + void set_time(ArgT0&& arg0, ArgT... args); std::string* mutable_time(); - std::string* release_time(); + PROTOBUF_NODISCARD std::string* release_time(); void set_allocated_time(std::string* time); private: const std::string& _internal_time() const; - void _internal_set_time(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_time(const std::string& value); std::string* _internal_mutable_time(); public: @@ -228,17 +224,17 @@ class TIMES_API WTime PROTOBUF_FINAL : bool _internal_has_daylight() const; public: void clear_daylight(); - const PROTOBUF_NAMESPACE_ID::StringValue& daylight() const; - PROTOBUF_NAMESPACE_ID::StringValue* release_daylight(); - PROTOBUF_NAMESPACE_ID::StringValue* mutable_daylight(); - void set_allocated_daylight(PROTOBUF_NAMESPACE_ID::StringValue* daylight); + const ::PROTOBUF_NAMESPACE_ID::StringValue& daylight() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::StringValue* release_daylight(); + ::PROTOBUF_NAMESPACE_ID::StringValue* mutable_daylight(); + void set_allocated_daylight(::PROTOBUF_NAMESPACE_ID::StringValue* daylight); private: - const PROTOBUF_NAMESPACE_ID::StringValue& _internal_daylight() const; - PROTOBUF_NAMESPACE_ID::StringValue* _internal_mutable_daylight(); + const ::PROTOBUF_NAMESPACE_ID::StringValue& _internal_daylight() const; + ::PROTOBUF_NAMESPACE_ID::StringValue* _internal_mutable_daylight(); public: void unsafe_arena_set_allocated_daylight( - PROTOBUF_NAMESPACE_ID::StringValue* daylight); - PROTOBUF_NAMESPACE_ID::StringValue* unsafe_arena_release_daylight(); + ::PROTOBUF_NAMESPACE_ID::StringValue* daylight); + ::PROTOBUF_NAMESPACE_ID::StringValue* unsafe_arena_release_daylight(); // .google.protobuf.StringValue timezone = 3; bool has_timezone() const; @@ -246,17 +242,17 @@ class TIMES_API WTime PROTOBUF_FINAL : bool _internal_has_timezone() const; public: void clear_timezone(); - const PROTOBUF_NAMESPACE_ID::StringValue& timezone() const; - PROTOBUF_NAMESPACE_ID::StringValue* release_timezone(); - PROTOBUF_NAMESPACE_ID::StringValue* mutable_timezone(); - void set_allocated_timezone(PROTOBUF_NAMESPACE_ID::StringValue* timezone); + const ::PROTOBUF_NAMESPACE_ID::StringValue& timezone() const; + PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::StringValue* release_timezone(); + ::PROTOBUF_NAMESPACE_ID::StringValue* mutable_timezone(); + void set_allocated_timezone(::PROTOBUF_NAMESPACE_ID::StringValue* timezone); private: - const PROTOBUF_NAMESPACE_ID::StringValue& _internal_timezone() const; - PROTOBUF_NAMESPACE_ID::StringValue* _internal_mutable_timezone(); + const ::PROTOBUF_NAMESPACE_ID::StringValue& _internal_timezone() const; + ::PROTOBUF_NAMESPACE_ID::StringValue* _internal_mutable_timezone(); public: void unsafe_arena_set_allocated_timezone( - PROTOBUF_NAMESPACE_ID::StringValue* timezone); - PROTOBUF_NAMESPACE_ID::StringValue* unsafe_arena_release_timezone(); + ::PROTOBUF_NAMESPACE_ID::StringValue* timezone); + ::PROTOBUF_NAMESPACE_ID::StringValue* unsafe_arena_release_timezone(); // .google.protobuf.Int32Value timezone_id = 4 [deprecated = true]; PROTOBUF_DEPRECATED bool has_timezone_id() const; @@ -264,17 +260,17 @@ class TIMES_API WTime PROTOBUF_FINAL : bool _internal_has_timezone_id() const; public: PROTOBUF_DEPRECATED void clear_timezone_id(); - PROTOBUF_DEPRECATED const PROTOBUF_NAMESPACE_ID::Int32Value& timezone_id() const; - PROTOBUF_DEPRECATED PROTOBUF_NAMESPACE_ID::Int32Value* release_timezone_id(); - PROTOBUF_DEPRECATED PROTOBUF_NAMESPACE_ID::Int32Value* mutable_timezone_id(); - PROTOBUF_DEPRECATED void set_allocated_timezone_id(PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id); + PROTOBUF_DEPRECATED const ::PROTOBUF_NAMESPACE_ID::Int32Value& timezone_id() const; + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED ::PROTOBUF_NAMESPACE_ID::Int32Value* release_timezone_id(); + PROTOBUF_DEPRECATED ::PROTOBUF_NAMESPACE_ID::Int32Value* mutable_timezone_id(); + PROTOBUF_DEPRECATED void set_allocated_timezone_id(::PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id); private: - const PROTOBUF_NAMESPACE_ID::Int32Value& _internal_timezone_id() const; - PROTOBUF_NAMESPACE_ID::Int32Value* _internal_mutable_timezone_id(); + const ::PROTOBUF_NAMESPACE_ID::Int32Value& _internal_timezone_id() const; + ::PROTOBUF_NAMESPACE_ID::Int32Value* _internal_mutable_timezone_id(); public: PROTOBUF_DEPRECATED void unsafe_arena_set_allocated_timezone_id( - PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id); - PROTOBUF_DEPRECATED PROTOBUF_NAMESPACE_ID::Int32Value* unsafe_arena_release_timezone_id(); + ::PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id); + PROTOBUF_DEPRECATED ::PROTOBUF_NAMESPACE_ID::Int32Value* unsafe_arena_release_timezone_id(); // @@protoc_insertion_point(class_scope:HSS.Times.WTime) private: @@ -283,20 +279,24 @@ class TIMES_API WTime PROTOBUF_FINAL : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_; - PROTOBUF_NAMESPACE_ID::StringValue* daylight_; - PROTOBUF_NAMESPACE_ID::StringValue* timezone_; - PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_; + ::PROTOBUF_NAMESPACE_ID::StringValue* daylight_; + ::PROTOBUF_NAMESPACE_ID::StringValue* timezone_; + ::PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_wtime_2eproto; }; // ------------------------------------------------------------------- -class TIMES_API WTimeSpan PROTOBUF_FINAL : +class TIMES_API WTimeSpan final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:HSS.Times.WTimeSpan) */ { public: inline WTimeSpan() : WTimeSpan(nullptr) {} - virtual ~WTimeSpan(); + ~WTimeSpan() override; + explicit PROTOBUF_CONSTEXPR WTimeSpan(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); WTimeSpan(const WTimeSpan& from); WTimeSpan(WTimeSpan&& from) noexcept @@ -309,8 +309,13 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : return *this; } inline WTimeSpan& operator=(WTimeSpan&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); } else { CopyFrom(from); } @@ -321,14 +326,14 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; + return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; + return default_instance().GetMetadata().reflection; + } + static const WTimeSpan& default_instance() { + return *internal_default_instance(); } - static const WTimeSpan& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const WTimeSpan* internal_default_instance() { return reinterpret_cast( &_WTimeSpan_default_instance_); @@ -341,7 +346,12 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : } inline void Swap(WTimeSpan* other) { if (other == this) return; - if (GetArena() == other->GetArena()) { + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); @@ -349,56 +359,53 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : } void UnsafeArenaSwap(WTimeSpan* other) { if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline WTimeSpan* New() const final { - return CreateMaybeMessage(nullptr); - } - - WTimeSpan* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + WTimeSpan* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const WTimeSpan& from); - void MergeFrom(const WTimeSpan& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WTimeSpan& from) { + WTimeSpan::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - inline void SharedCtor(); - inline void SharedDtor(); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(WTimeSpan* other); + + private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "HSS.Times.WTimeSpan"; } protected: - explicit WTimeSpan(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit WTimeSpan(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_wtime_2eproto); - return ::descriptor_table_wtime_2eproto.file_level_metadata[kIndexInFileMessages]; - } + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -410,16 +417,14 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : // string time = 1; void clear_time(); const std::string& time() const; - void set_time(const std::string& value); - void set_time(std::string&& value); - void set_time(const char* value); - void set_time(const char* value, size_t size); + template + void set_time(ArgT0&& arg0, ArgT... args); std::string* mutable_time(); - std::string* release_time(); + PROTOBUF_NODISCARD std::string* release_time(); void set_allocated_time(std::string* time); private: const std::string& _internal_time() const; - void _internal_set_time(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_time(const std::string& value); std::string* _internal_mutable_time(); public: @@ -430,17 +435,21 @@ class TIMES_API WTimeSpan PROTOBUF_FINAL : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_wtime_2eproto; }; // ------------------------------------------------------------------- -class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : +class TIMES_API WTimeZone_WTZDetails final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:HSS.Times.WTimeZone.WTZDetails) */ { public: inline WTimeZone_WTZDetails() : WTimeZone_WTZDetails(nullptr) {} - virtual ~WTimeZone_WTZDetails(); + ~WTimeZone_WTZDetails() override; + explicit PROTOBUF_CONSTEXPR WTimeZone_WTZDetails(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); WTimeZone_WTZDetails(const WTimeZone_WTZDetails& from); WTimeZone_WTZDetails(WTimeZone_WTZDetails&& from) noexcept @@ -453,8 +462,13 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : return *this; } inline WTimeZone_WTZDetails& operator=(WTimeZone_WTZDetails&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); } else { CopyFrom(from); } @@ -465,14 +479,14 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; + return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; + return default_instance().GetMetadata().reflection; + } + static const WTimeZone_WTZDetails& default_instance() { + return *internal_default_instance(); } - static const WTimeZone_WTZDetails& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const WTimeZone_WTZDetails* internal_default_instance() { return reinterpret_cast( &_WTimeZone_WTZDetails_default_instance_); @@ -485,7 +499,12 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : } inline void Swap(WTimeZone_WTZDetails* other) { if (other == this) return; - if (GetArena() == other->GetArena()) { + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); @@ -493,56 +512,53 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : } void UnsafeArenaSwap(WTimeZone_WTZDetails* other) { if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline WTimeZone_WTZDetails* New() const final { - return CreateMaybeMessage(nullptr); - } - - WTimeZone_WTZDetails* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + WTimeZone_WTZDetails* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const WTimeZone_WTZDetails& from); - void MergeFrom(const WTimeZone_WTZDetails& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WTimeZone_WTZDetails& from) { + WTimeZone_WTZDetails::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - inline void SharedCtor(); - inline void SharedDtor(); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(WTimeZone_WTZDetails* other); + + private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "HSS.Times.WTimeZone.WTZDetails"; } protected: - explicit WTimeZone_WTZDetails(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit WTimeZone_WTZDetails(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_wtime_2eproto); - return ::descriptor_table_wtime_2eproto.file_level_metadata[kIndexInFileMessages]; - } + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -561,7 +577,7 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : public: void clear_amttimezone(); const ::HSS::Times::WTimeSpan& amttimezone() const; - ::HSS::Times::WTimeSpan* release_amttimezone(); + PROTOBUF_NODISCARD ::HSS::Times::WTimeSpan* release_amttimezone(); ::HSS::Times::WTimeSpan* mutable_amttimezone(); void set_allocated_amttimezone(::HSS::Times::WTimeSpan* amttimezone); private: @@ -579,7 +595,7 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : public: void clear_startdst(); const ::HSS::Times::WTimeSpan& startdst() const; - ::HSS::Times::WTimeSpan* release_startdst(); + PROTOBUF_NODISCARD ::HSS::Times::WTimeSpan* release_startdst(); ::HSS::Times::WTimeSpan* mutable_startdst(); void set_allocated_startdst(::HSS::Times::WTimeSpan* startdst); private: @@ -597,7 +613,7 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : public: void clear_enddst(); const ::HSS::Times::WTimeSpan& enddst() const; - ::HSS::Times::WTimeSpan* release_enddst(); + PROTOBUF_NODISCARD ::HSS::Times::WTimeSpan* release_enddst(); ::HSS::Times::WTimeSpan* mutable_enddst(); void set_allocated_enddst(::HSS::Times::WTimeSpan* enddst); private: @@ -615,7 +631,7 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : public: void clear_amtdst(); const ::HSS::Times::WTimeSpan& amtdst() const; - ::HSS::Times::WTimeSpan* release_amtdst(); + PROTOBUF_NODISCARD ::HSS::Times::WTimeSpan* release_amtdst(); ::HSS::Times::WTimeSpan* mutable_amtdst(); void set_allocated_amtdst(::HSS::Times::WTimeSpan* amtdst); private: @@ -633,20 +649,24 @@ class TIMES_API WTimeZone_WTZDetails PROTOBUF_FINAL : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::HSS::Times::WTimeSpan* amttimezone_; - ::HSS::Times::WTimeSpan* startdst_; - ::HSS::Times::WTimeSpan* enddst_; - ::HSS::Times::WTimeSpan* amtdst_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + struct Impl_ { + ::HSS::Times::WTimeSpan* amttimezone_; + ::HSS::Times::WTimeSpan* startdst_; + ::HSS::Times::WTimeSpan* enddst_; + ::HSS::Times::WTimeSpan* amtdst_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_wtime_2eproto; }; // ------------------------------------------------------------------- -class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : +class TIMES_API WTimeZone_TZTimeZone final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:HSS.Times.WTimeZone.TZTimeZone) */ { public: inline WTimeZone_TZTimeZone() : WTimeZone_TZTimeZone(nullptr) {} - virtual ~WTimeZone_TZTimeZone(); + ~WTimeZone_TZTimeZone() override; + explicit PROTOBUF_CONSTEXPR WTimeZone_TZTimeZone(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); WTimeZone_TZTimeZone(const WTimeZone_TZTimeZone& from); WTimeZone_TZTimeZone(WTimeZone_TZTimeZone&& from) noexcept @@ -659,8 +679,13 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : return *this; } inline WTimeZone_TZTimeZone& operator=(WTimeZone_TZTimeZone&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); } else { CopyFrom(from); } @@ -671,14 +696,14 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; + return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; + return default_instance().GetMetadata().reflection; + } + static const WTimeZone_TZTimeZone& default_instance() { + return *internal_default_instance(); } - static const WTimeZone_TZTimeZone& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const WTimeZone_TZTimeZone* internal_default_instance() { return reinterpret_cast( &_WTimeZone_TZTimeZone_default_instance_); @@ -691,7 +716,12 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : } inline void Swap(WTimeZone_TZTimeZone* other) { if (other == this) return; - if (GetArena() == other->GetArena()) { + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); @@ -699,56 +729,53 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : } void UnsafeArenaSwap(WTimeZone_TZTimeZone* other) { if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline WTimeZone_TZTimeZone* New() const final { - return CreateMaybeMessage(nullptr); - } - - WTimeZone_TZTimeZone* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + WTimeZone_TZTimeZone* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const WTimeZone_TZTimeZone& from); - void MergeFrom(const WTimeZone_TZTimeZone& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WTimeZone_TZTimeZone& from) { + WTimeZone_TZTimeZone::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - inline void SharedCtor(); - inline void SharedDtor(); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(WTimeZone_TZTimeZone* other); + + private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "HSS.Times.WTimeZone.TZTimeZone"; } protected: - explicit WTimeZone_TZTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit WTimeZone_TZTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_wtime_2eproto); - return ::descriptor_table_wtime_2eproto.file_level_metadata[kIndexInFileMessages]; - } + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -761,20 +788,18 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : // string name = 1; void clear_name(); const std::string& name() const; - void set_name(const std::string& value); - void set_name(std::string&& value); - void set_name(const char* value); - void set_name(const char* value, size_t size); + template + void set_name(ArgT0&& arg0, ArgT... args); std::string* mutable_name(); - std::string* release_name(); + PROTOBUF_NODISCARD std::string* release_name(); void set_allocated_name(std::string* name); private: const std::string& _internal_name() const; - void _internal_set_name(const std::string& value); + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); std::string* _internal_mutable_name(); public: - // bool daylight = 2; + // optional bool daylight = 2; bool has_daylight() const; private: bool _internal_has_daylight() const; @@ -794,19 +819,23 @@ class TIMES_API WTimeZone_TZTimeZone PROTOBUF_FINAL : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - bool daylight_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + bool daylight_; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_wtime_2eproto; }; // ------------------------------------------------------------------- -class TIMES_API WTimeZone PROTOBUF_FINAL : +class TIMES_API WTimeZone final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:HSS.Times.WTimeZone) */ { public: inline WTimeZone() : WTimeZone(nullptr) {} - virtual ~WTimeZone(); + ~WTimeZone() override; + explicit PROTOBUF_CONSTEXPR WTimeZone(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); WTimeZone(const WTimeZone& from); WTimeZone(WTimeZone&& from) noexcept @@ -819,8 +848,13 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : return *this; } inline WTimeZone& operator=(WTimeZone&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); } else { CopyFrom(from); } @@ -831,13 +865,14 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; + return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; + return default_instance().GetMetadata().reflection; + } + static const WTimeZone& default_instance() { + return *internal_default_instance(); } - static const WTimeZone& default_instance(); - enum MsgCase { kTimezoneIndex = 2, kTimezoneDetails = 3, @@ -845,7 +880,6 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : MSG_NOT_SET = 0, }; - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const WTimeZone* internal_default_instance() { return reinterpret_cast( &_WTimeZone_default_instance_); @@ -858,7 +892,12 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : } inline void Swap(WTimeZone* other) { if (other == this) return; - if (GetArena() == other->GetArena()) { + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); @@ -866,56 +905,53 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : } void UnsafeArenaSwap(WTimeZone* other) { if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- - inline WTimeZone* New() const final { - return CreateMaybeMessage(nullptr); - } - - WTimeZone* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + WTimeZone* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const WTimeZone& from); - void MergeFrom(const WTimeZone& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const WTimeZone& from) { + WTimeZone::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } private: - inline void SharedCtor(); - inline void SharedDtor(); + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(WTimeZone* other); + + private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "HSS.Times.WTimeZone"; } protected: - explicit WTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit WTimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_wtime_2eproto); - return ::descriptor_table_wtime_2eproto.file_level_metadata[kIndexInFileMessages]; - } + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -932,23 +968,24 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : }; // int32 version = 1; void clear_version(); - ::PROTOBUF_NAMESPACE_ID::int32 version() const; - void set_version(::PROTOBUF_NAMESPACE_ID::int32 value); + int32_t version() const; + void set_version(int32_t value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_version() const; - void _internal_set_version(::PROTOBUF_NAMESPACE_ID::int32 value); + int32_t _internal_version() const; + void _internal_set_version(int32_t value); public: - // int32 timezoneIndex = 2; + // int32 timezoneIndex = 2 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_timezoneindex() const; private: bool _internal_has_timezoneindex() const; public: - void clear_timezoneindex(); - ::PROTOBUF_NAMESPACE_ID::int32 timezoneindex() const; - void set_timezoneindex(::PROTOBUF_NAMESPACE_ID::int32 value); + PROTOBUF_DEPRECATED void clear_timezoneindex(); + PROTOBUF_DEPRECATED int32_t timezoneindex() const; + PROTOBUF_DEPRECATED void set_timezoneindex(int32_t value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_timezoneindex() const; - void _internal_set_timezoneindex(::PROTOBUF_NAMESPACE_ID::int32 value); + int32_t _internal_timezoneindex() const; + void _internal_set_timezoneindex(int32_t value); public: // .HSS.Times.WTimeZone.WTZDetails timezoneDetails = 3 [deprecated = true]; @@ -958,7 +995,7 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : public: PROTOBUF_DEPRECATED void clear_timezonedetails(); PROTOBUF_DEPRECATED const ::HSS::Times::WTimeZone_WTZDetails& timezonedetails() const; - PROTOBUF_DEPRECATED ::HSS::Times::WTimeZone_WTZDetails* release_timezonedetails(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED ::HSS::Times::WTimeZone_WTZDetails* release_timezonedetails(); PROTOBUF_DEPRECATED ::HSS::Times::WTimeZone_WTZDetails* mutable_timezonedetails(); PROTOBUF_DEPRECATED void set_allocated_timezonedetails(::HSS::Times::WTimeZone_WTZDetails* timezonedetails); private: @@ -976,7 +1013,7 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : public: void clear_tztimezone(); const ::HSS::Times::WTimeZone_TZTimeZone& tztimezone() const; - ::HSS::Times::WTimeZone_TZTimeZone* release_tztimezone(); + PROTOBUF_NODISCARD ::HSS::Times::WTimeZone_TZTimeZone* release_tztimezone(); ::HSS::Times::WTimeZone_TZTimeZone* mutable_tztimezone(); void set_allocated_tztimezone(::HSS::Times::WTimeZone_TZTimeZone* tztimezone); private: @@ -1002,16 +1039,20 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 version_; - union MsgUnion { - MsgUnion() {} - ::PROTOBUF_NAMESPACE_ID::int32 timezoneindex_; - ::HSS::Times::WTimeZone_WTZDetails* timezonedetails_; - ::HSS::Times::WTimeZone_TZTimeZone* tztimezone_; - } msg_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + struct Impl_ { + int32_t version_; + union MsgUnion { + constexpr MsgUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t timezoneindex_; + ::HSS::Times::WTimeZone_WTZDetails* timezonedetails_; + ::HSS::Times::WTimeZone_TZTimeZone* tztimezone_; + } msg_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + }; + union { Impl_ _impl_; }; friend struct ::TableStruct_wtime_2eproto; }; // =================================================================== @@ -1027,54 +1068,38 @@ class TIMES_API WTimeZone PROTOBUF_FINAL : // string time = 1; inline void WTime::clear_time() { - time_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _impl_.time_.ClearToEmpty(); } inline const std::string& WTime::time() const { // @@protoc_insertion_point(field_get:HSS.Times.WTime.time) return _internal_time(); } -inline void WTime::set_time(const std::string& value) { - _internal_set_time(value); +template +inline PROTOBUF_ALWAYS_INLINE +void WTime::set_time(ArgT0&& arg0, ArgT... args) { + + _impl_.time_.Set(static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:HSS.Times.WTime.time) } inline std::string* WTime::mutable_time() { + std::string* _s = _internal_mutable_time(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTime.time) - return _internal_mutable_time(); + return _s; } inline const std::string& WTime::_internal_time() const { - return time_.Get(); + return _impl_.time_.Get(); } inline void WTime::_internal_set_time(const std::string& value) { - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void WTime::set_time(std::string&& value) { - - time_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:HSS.Times.WTime.time) -} -inline void WTime::set_time(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:HSS.Times.WTime.time) -} -inline void WTime::set_time(const char* value, - size_t size) { - - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:HSS.Times.WTime.time) + _impl_.time_.Set(value, GetArenaForAllocation()); } inline std::string* WTime::_internal_mutable_time() { - return time_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.time_.Mutable(GetArenaForAllocation()); } inline std::string* WTime::release_time() { // @@protoc_insertion_point(field_release:HSS.Times.WTime.time) - return time_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.time_.Release(); } inline void WTime::set_allocated_time(std::string* time) { if (time != nullptr) { @@ -1082,33 +1107,37 @@ inline void WTime::set_allocated_time(std::string* time) { } else { } - time_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), time, - GetArena()); + _impl_.time_.SetAllocated(time, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.time_.IsDefault()) { + _impl_.time_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTime.time) } // .google.protobuf.StringValue daylight = 2; inline bool WTime::_internal_has_daylight() const { - return this != internal_default_instance() && daylight_ != nullptr; + return this != internal_default_instance() && _impl_.daylight_ != nullptr; } inline bool WTime::has_daylight() const { return _internal_has_daylight(); } -inline const PROTOBUF_NAMESPACE_ID::StringValue& WTime::_internal_daylight() const { - const PROTOBUF_NAMESPACE_ID::StringValue* p = daylight_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_); +inline const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::_internal_daylight() const { + const ::PROTOBUF_NAMESPACE_ID::StringValue* p = _impl_.daylight_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_); } -inline const PROTOBUF_NAMESPACE_ID::StringValue& WTime::daylight() const { +inline const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::daylight() const { // @@protoc_insertion_point(field_get:HSS.Times.WTime.daylight) return _internal_daylight(); } inline void WTime::unsafe_arena_set_allocated_daylight( - PROTOBUF_NAMESPACE_ID::StringValue* daylight) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(daylight_); + ::PROTOBUF_NAMESPACE_ID::StringValue* daylight) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.daylight_); } - daylight_ = daylight; + _impl_.daylight_ = daylight; if (daylight) { } else { @@ -1116,42 +1145,50 @@ inline void WTime::unsafe_arena_set_allocated_daylight( } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:HSS.Times.WTime.daylight) } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::release_daylight() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::release_daylight() { - PROTOBUF_NAMESPACE_ID::StringValue* temp = daylight_; - daylight_ = nullptr; - if (GetArena() != nullptr) { + ::PROTOBUF_NAMESPACE_ID::StringValue* temp = _impl_.daylight_; + _impl_.daylight_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::unsafe_arena_release_daylight() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::unsafe_arena_release_daylight() { // @@protoc_insertion_point(field_release:HSS.Times.WTime.daylight) - PROTOBUF_NAMESPACE_ID::StringValue* temp = daylight_; - daylight_ = nullptr; + ::PROTOBUF_NAMESPACE_ID::StringValue* temp = _impl_.daylight_; + _impl_.daylight_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::_internal_mutable_daylight() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::_internal_mutable_daylight() { - if (daylight_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - daylight_ = p; + if (_impl_.daylight_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::StringValue>(GetArenaForAllocation()); + _impl_.daylight_ = p; } - return daylight_; + return _impl_.daylight_; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::mutable_daylight() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::mutable_daylight() { + ::PROTOBUF_NAMESPACE_ID::StringValue* _msg = _internal_mutable_daylight(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTime.daylight) - return _internal_mutable_daylight(); + return _msg; } -inline void WTime::set_allocated_daylight(PROTOBUF_NAMESPACE_ID::StringValue* daylight) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); +inline void WTime::set_allocated_daylight(::PROTOBUF_NAMESPACE_ID::StringValue* daylight) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(daylight_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.daylight_); } if (daylight) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(daylight)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(daylight)); if (message_arena != submessage_arena) { daylight = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, daylight, submessage_arena); @@ -1160,32 +1197,32 @@ inline void WTime::set_allocated_daylight(PROTOBUF_NAMESPACE_ID::StringValue* da } else { } - daylight_ = daylight; + _impl_.daylight_ = daylight; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTime.daylight) } // .google.protobuf.StringValue timezone = 3; inline bool WTime::_internal_has_timezone() const { - return this != internal_default_instance() && timezone_ != nullptr; + return this != internal_default_instance() && _impl_.timezone_ != nullptr; } inline bool WTime::has_timezone() const { return _internal_has_timezone(); } -inline const PROTOBUF_NAMESPACE_ID::StringValue& WTime::_internal_timezone() const { - const PROTOBUF_NAMESPACE_ID::StringValue* p = timezone_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_); +inline const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::_internal_timezone() const { + const ::PROTOBUF_NAMESPACE_ID::StringValue* p = _impl_.timezone_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_StringValue_default_instance_); } -inline const PROTOBUF_NAMESPACE_ID::StringValue& WTime::timezone() const { +inline const ::PROTOBUF_NAMESPACE_ID::StringValue& WTime::timezone() const { // @@protoc_insertion_point(field_get:HSS.Times.WTime.timezone) return _internal_timezone(); } inline void WTime::unsafe_arena_set_allocated_timezone( - PROTOBUF_NAMESPACE_ID::StringValue* timezone) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_); + ::PROTOBUF_NAMESPACE_ID::StringValue* timezone) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timezone_); } - timezone_ = timezone; + _impl_.timezone_ = timezone; if (timezone) { } else { @@ -1193,42 +1230,50 @@ inline void WTime::unsafe_arena_set_allocated_timezone( } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:HSS.Times.WTime.timezone) } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::release_timezone() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::release_timezone() { - PROTOBUF_NAMESPACE_ID::StringValue* temp = timezone_; - timezone_ = nullptr; - if (GetArena() != nullptr) { + ::PROTOBUF_NAMESPACE_ID::StringValue* temp = _impl_.timezone_; + _impl_.timezone_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::unsafe_arena_release_timezone() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::unsafe_arena_release_timezone() { // @@protoc_insertion_point(field_release:HSS.Times.WTime.timezone) - PROTOBUF_NAMESPACE_ID::StringValue* temp = timezone_; - timezone_ = nullptr; + ::PROTOBUF_NAMESPACE_ID::StringValue* temp = _impl_.timezone_; + _impl_.timezone_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::_internal_mutable_timezone() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::_internal_mutable_timezone() { - if (timezone_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - timezone_ = p; + if (_impl_.timezone_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::StringValue>(GetArenaForAllocation()); + _impl_.timezone_ = p; } - return timezone_; + return _impl_.timezone_; } -inline PROTOBUF_NAMESPACE_ID::StringValue* WTime::mutable_timezone() { +inline ::PROTOBUF_NAMESPACE_ID::StringValue* WTime::mutable_timezone() { + ::PROTOBUF_NAMESPACE_ID::StringValue* _msg = _internal_mutable_timezone(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTime.timezone) - return _internal_mutable_timezone(); + return _msg; } -inline void WTime::set_allocated_timezone(PROTOBUF_NAMESPACE_ID::StringValue* timezone) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); +inline void WTime::set_allocated_timezone(::PROTOBUF_NAMESPACE_ID::StringValue* timezone) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timezone_); } if (timezone) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone)); if (message_arena != submessage_arena) { timezone = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, timezone, submessage_arena); @@ -1237,32 +1282,32 @@ inline void WTime::set_allocated_timezone(PROTOBUF_NAMESPACE_ID::StringValue* ti } else { } - timezone_ = timezone; + _impl_.timezone_ = timezone; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTime.timezone) } // .google.protobuf.Int32Value timezone_id = 4 [deprecated = true]; inline bool WTime::_internal_has_timezone_id() const { - return this != internal_default_instance() && timezone_id_ != nullptr; + return this != internal_default_instance() && _impl_.timezone_id_ != nullptr; } inline bool WTime::has_timezone_id() const { return _internal_has_timezone_id(); } -inline const PROTOBUF_NAMESPACE_ID::Int32Value& WTime::_internal_timezone_id() const { - const PROTOBUF_NAMESPACE_ID::Int32Value* p = timezone_id_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Int32Value_default_instance_); +inline const ::PROTOBUF_NAMESPACE_ID::Int32Value& WTime::_internal_timezone_id() const { + const ::PROTOBUF_NAMESPACE_ID::Int32Value* p = _impl_.timezone_id_; + return p != nullptr ? *p : reinterpret_cast( + ::PROTOBUF_NAMESPACE_ID::_Int32Value_default_instance_); } -inline const PROTOBUF_NAMESPACE_ID::Int32Value& WTime::timezone_id() const { +inline const ::PROTOBUF_NAMESPACE_ID::Int32Value& WTime::timezone_id() const { // @@protoc_insertion_point(field_get:HSS.Times.WTime.timezone_id) return _internal_timezone_id(); } inline void WTime::unsafe_arena_set_allocated_timezone_id( - PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_id_); + ::PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timezone_id_); } - timezone_id_ = timezone_id; + _impl_.timezone_id_ = timezone_id; if (timezone_id) { } else { @@ -1270,42 +1315,50 @@ inline void WTime::unsafe_arena_set_allocated_timezone_id( } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:HSS.Times.WTime.timezone_id) } -inline PROTOBUF_NAMESPACE_ID::Int32Value* WTime::release_timezone_id() { +inline ::PROTOBUF_NAMESPACE_ID::Int32Value* WTime::release_timezone_id() { - PROTOBUF_NAMESPACE_ID::Int32Value* temp = timezone_id_; - timezone_id_ = nullptr; - if (GetArena() != nullptr) { + ::PROTOBUF_NAMESPACE_ID::Int32Value* temp = _impl_.timezone_id_; + _impl_.timezone_id_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline PROTOBUF_NAMESPACE_ID::Int32Value* WTime::unsafe_arena_release_timezone_id() { +inline ::PROTOBUF_NAMESPACE_ID::Int32Value* WTime::unsafe_arena_release_timezone_id() { // @@protoc_insertion_point(field_release:HSS.Times.WTime.timezone_id) - PROTOBUF_NAMESPACE_ID::Int32Value* temp = timezone_id_; - timezone_id_ = nullptr; + ::PROTOBUF_NAMESPACE_ID::Int32Value* temp = _impl_.timezone_id_; + _impl_.timezone_id_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::Int32Value* WTime::_internal_mutable_timezone_id() { +inline ::PROTOBUF_NAMESPACE_ID::Int32Value* WTime::_internal_mutable_timezone_id() { - if (timezone_id_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - timezone_id_ = p; + if (_impl_.timezone_id_ == nullptr) { + auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Int32Value>(GetArenaForAllocation()); + _impl_.timezone_id_ = p; } - return timezone_id_; + return _impl_.timezone_id_; } -inline PROTOBUF_NAMESPACE_ID::Int32Value* WTime::mutable_timezone_id() { +inline ::PROTOBUF_NAMESPACE_ID::Int32Value* WTime::mutable_timezone_id() { + ::PROTOBUF_NAMESPACE_ID::Int32Value* _msg = _internal_mutable_timezone_id(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTime.timezone_id) - return _internal_mutable_timezone_id(); + return _msg; } -inline void WTime::set_allocated_timezone_id(PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); +inline void WTime::set_allocated_timezone_id(::PROTOBUF_NAMESPACE_ID::Int32Value* timezone_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_id_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.timezone_id_); } if (timezone_id) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_id)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timezone_id)); if (message_arena != submessage_arena) { timezone_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, timezone_id, submessage_arena); @@ -1314,7 +1367,7 @@ inline void WTime::set_allocated_timezone_id(PROTOBUF_NAMESPACE_ID::Int32Value* } else { } - timezone_id_ = timezone_id; + _impl_.timezone_id_ = timezone_id; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTime.timezone_id) } @@ -1324,54 +1377,38 @@ inline void WTime::set_allocated_timezone_id(PROTOBUF_NAMESPACE_ID::Int32Value* // string time = 1; inline void WTimeSpan::clear_time() { - time_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _impl_.time_.ClearToEmpty(); } inline const std::string& WTimeSpan::time() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeSpan.time) return _internal_time(); } -inline void WTimeSpan::set_time(const std::string& value) { - _internal_set_time(value); +template +inline PROTOBUF_ALWAYS_INLINE +void WTimeSpan::set_time(ArgT0&& arg0, ArgT... args) { + + _impl_.time_.Set(static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:HSS.Times.WTimeSpan.time) } inline std::string* WTimeSpan::mutable_time() { + std::string* _s = _internal_mutable_time(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeSpan.time) - return _internal_mutable_time(); + return _s; } inline const std::string& WTimeSpan::_internal_time() const { - return time_.Get(); + return _impl_.time_.Get(); } inline void WTimeSpan::_internal_set_time(const std::string& value) { - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void WTimeSpan::set_time(std::string&& value) { - - time_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:HSS.Times.WTimeSpan.time) -} -inline void WTimeSpan::set_time(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:HSS.Times.WTimeSpan.time) -} -inline void WTimeSpan::set_time(const char* value, - size_t size) { - - time_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:HSS.Times.WTimeSpan.time) + _impl_.time_.Set(value, GetArenaForAllocation()); } inline std::string* WTimeSpan::_internal_mutable_time() { - return time_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.time_.Mutable(GetArenaForAllocation()); } inline std::string* WTimeSpan::release_time() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeSpan.time) - return time_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.time_.Release(); } inline void WTimeSpan::set_allocated_time(std::string* time) { if (time != nullptr) { @@ -1379,8 +1416,12 @@ inline void WTimeSpan::set_allocated_time(std::string* time) { } else { } - time_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), time, - GetArena()); + _impl_.time_.SetAllocated(time, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.time_.IsDefault()) { + _impl_.time_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeSpan.time) } @@ -1390,21 +1431,21 @@ inline void WTimeSpan::set_allocated_time(std::string* time) { // .HSS.Times.WTimeSpan amtTimeZone = 1; inline bool WTimeZone_WTZDetails::_internal_has_amttimezone() const { - return this != internal_default_instance() && amttimezone_ != nullptr; + return this != internal_default_instance() && _impl_.amttimezone_ != nullptr; } inline bool WTimeZone_WTZDetails::has_amttimezone() const { return _internal_has_amttimezone(); } inline void WTimeZone_WTZDetails::clear_amttimezone() { - if (GetArena() == nullptr && amttimezone_ != nullptr) { - delete amttimezone_; + if (GetArenaForAllocation() == nullptr && _impl_.amttimezone_ != nullptr) { + delete _impl_.amttimezone_; } - amttimezone_ = nullptr; + _impl_.amttimezone_ = nullptr; } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_internal_amttimezone() const { - const ::HSS::Times::WTimeSpan* p = amttimezone_; - return p != nullptr ? *p : *reinterpret_cast( - &::HSS::Times::_WTimeSpan_default_instance_); + const ::HSS::Times::WTimeSpan* p = _impl_.amttimezone_; + return p != nullptr ? *p : reinterpret_cast( + ::HSS::Times::_WTimeSpan_default_instance_); } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::amttimezone() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.WTZDetails.amtTimeZone) @@ -1412,10 +1453,10 @@ inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::amttimezone() const } inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_amttimezone( ::HSS::Times::WTimeSpan* amttimezone) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(amttimezone_); + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.amttimezone_); } - amttimezone_ = amttimezone; + _impl_.amttimezone_ = amttimezone; if (amttimezone) { } else { @@ -1425,40 +1466,47 @@ inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_amttimezone( } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::release_amttimezone() { - ::HSS::Times::WTimeSpan* temp = amttimezone_; - amttimezone_ = nullptr; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeSpan* temp = _impl_.amttimezone_; + _impl_.amttimezone_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::unsafe_arena_release_amttimezone() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.WTZDetails.amtTimeZone) - ::HSS::Times::WTimeSpan* temp = amttimezone_; - amttimezone_ = nullptr; + ::HSS::Times::WTimeSpan* temp = _impl_.amttimezone_; + _impl_.amttimezone_ = nullptr; return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::_internal_mutable_amttimezone() { - if (amttimezone_ == nullptr) { - auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArena()); - amttimezone_ = p; + if (_impl_.amttimezone_ == nullptr) { + auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArenaForAllocation()); + _impl_.amttimezone_ = p; } - return amttimezone_; + return _impl_.amttimezone_; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::mutable_amttimezone() { + ::HSS::Times::WTimeSpan* _msg = _internal_mutable_amttimezone(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.WTZDetails.amtTimeZone) - return _internal_mutable_amttimezone(); + return _msg; } inline void WTimeZone_WTZDetails::set_allocated_amttimezone(::HSS::Times::WTimeSpan* amttimezone) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete amttimezone_; + delete _impl_.amttimezone_; } if (amttimezone) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(amttimezone); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(amttimezone); if (message_arena != submessage_arena) { amttimezone = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, amttimezone, submessage_arena); @@ -1467,27 +1515,27 @@ inline void WTimeZone_WTZDetails::set_allocated_amttimezone(::HSS::Times::WTimeS } else { } - amttimezone_ = amttimezone; + _impl_.amttimezone_ = amttimezone; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.WTZDetails.amtTimeZone) } // .HSS.Times.WTimeSpan startDST = 2; inline bool WTimeZone_WTZDetails::_internal_has_startdst() const { - return this != internal_default_instance() && startdst_ != nullptr; + return this != internal_default_instance() && _impl_.startdst_ != nullptr; } inline bool WTimeZone_WTZDetails::has_startdst() const { return _internal_has_startdst(); } inline void WTimeZone_WTZDetails::clear_startdst() { - if (GetArena() == nullptr && startdst_ != nullptr) { - delete startdst_; + if (GetArenaForAllocation() == nullptr && _impl_.startdst_ != nullptr) { + delete _impl_.startdst_; } - startdst_ = nullptr; + _impl_.startdst_ = nullptr; } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_internal_startdst() const { - const ::HSS::Times::WTimeSpan* p = startdst_; - return p != nullptr ? *p : *reinterpret_cast( - &::HSS::Times::_WTimeSpan_default_instance_); + const ::HSS::Times::WTimeSpan* p = _impl_.startdst_; + return p != nullptr ? *p : reinterpret_cast( + ::HSS::Times::_WTimeSpan_default_instance_); } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::startdst() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.WTZDetails.startDST) @@ -1495,10 +1543,10 @@ inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::startdst() const { } inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_startdst( ::HSS::Times::WTimeSpan* startdst) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(startdst_); + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.startdst_); } - startdst_ = startdst; + _impl_.startdst_ = startdst; if (startdst) { } else { @@ -1508,40 +1556,47 @@ inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_startdst( } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::release_startdst() { - ::HSS::Times::WTimeSpan* temp = startdst_; - startdst_ = nullptr; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeSpan* temp = _impl_.startdst_; + _impl_.startdst_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::unsafe_arena_release_startdst() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.WTZDetails.startDST) - ::HSS::Times::WTimeSpan* temp = startdst_; - startdst_ = nullptr; + ::HSS::Times::WTimeSpan* temp = _impl_.startdst_; + _impl_.startdst_ = nullptr; return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::_internal_mutable_startdst() { - if (startdst_ == nullptr) { - auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArena()); - startdst_ = p; + if (_impl_.startdst_ == nullptr) { + auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArenaForAllocation()); + _impl_.startdst_ = p; } - return startdst_; + return _impl_.startdst_; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::mutable_startdst() { + ::HSS::Times::WTimeSpan* _msg = _internal_mutable_startdst(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.WTZDetails.startDST) - return _internal_mutable_startdst(); + return _msg; } inline void WTimeZone_WTZDetails::set_allocated_startdst(::HSS::Times::WTimeSpan* startdst) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete startdst_; + delete _impl_.startdst_; } if (startdst) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(startdst); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(startdst); if (message_arena != submessage_arena) { startdst = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, startdst, submessage_arena); @@ -1550,27 +1605,27 @@ inline void WTimeZone_WTZDetails::set_allocated_startdst(::HSS::Times::WTimeSpan } else { } - startdst_ = startdst; + _impl_.startdst_ = startdst; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.WTZDetails.startDST) } // .HSS.Times.WTimeSpan endDST = 3; inline bool WTimeZone_WTZDetails::_internal_has_enddst() const { - return this != internal_default_instance() && enddst_ != nullptr; + return this != internal_default_instance() && _impl_.enddst_ != nullptr; } inline bool WTimeZone_WTZDetails::has_enddst() const { return _internal_has_enddst(); } inline void WTimeZone_WTZDetails::clear_enddst() { - if (GetArena() == nullptr && enddst_ != nullptr) { - delete enddst_; + if (GetArenaForAllocation() == nullptr && _impl_.enddst_ != nullptr) { + delete _impl_.enddst_; } - enddst_ = nullptr; + _impl_.enddst_ = nullptr; } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_internal_enddst() const { - const ::HSS::Times::WTimeSpan* p = enddst_; - return p != nullptr ? *p : *reinterpret_cast( - &::HSS::Times::_WTimeSpan_default_instance_); + const ::HSS::Times::WTimeSpan* p = _impl_.enddst_; + return p != nullptr ? *p : reinterpret_cast( + ::HSS::Times::_WTimeSpan_default_instance_); } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::enddst() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.WTZDetails.endDST) @@ -1578,10 +1633,10 @@ inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::enddst() const { } inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_enddst( ::HSS::Times::WTimeSpan* enddst) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(enddst_); + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.enddst_); } - enddst_ = enddst; + _impl_.enddst_ = enddst; if (enddst) { } else { @@ -1591,40 +1646,47 @@ inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_enddst( } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::release_enddst() { - ::HSS::Times::WTimeSpan* temp = enddst_; - enddst_ = nullptr; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeSpan* temp = _impl_.enddst_; + _impl_.enddst_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::unsafe_arena_release_enddst() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.WTZDetails.endDST) - ::HSS::Times::WTimeSpan* temp = enddst_; - enddst_ = nullptr; + ::HSS::Times::WTimeSpan* temp = _impl_.enddst_; + _impl_.enddst_ = nullptr; return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::_internal_mutable_enddst() { - if (enddst_ == nullptr) { - auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArena()); - enddst_ = p; + if (_impl_.enddst_ == nullptr) { + auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArenaForAllocation()); + _impl_.enddst_ = p; } - return enddst_; + return _impl_.enddst_; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::mutable_enddst() { + ::HSS::Times::WTimeSpan* _msg = _internal_mutable_enddst(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.WTZDetails.endDST) - return _internal_mutable_enddst(); + return _msg; } inline void WTimeZone_WTZDetails::set_allocated_enddst(::HSS::Times::WTimeSpan* enddst) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete enddst_; + delete _impl_.enddst_; } if (enddst) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(enddst); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(enddst); if (message_arena != submessage_arena) { enddst = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, enddst, submessage_arena); @@ -1633,27 +1695,27 @@ inline void WTimeZone_WTZDetails::set_allocated_enddst(::HSS::Times::WTimeSpan* } else { } - enddst_ = enddst; + _impl_.enddst_ = enddst; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.WTZDetails.endDST) } // .HSS.Times.WTimeSpan amtDST = 4; inline bool WTimeZone_WTZDetails::_internal_has_amtdst() const { - return this != internal_default_instance() && amtdst_ != nullptr; + return this != internal_default_instance() && _impl_.amtdst_ != nullptr; } inline bool WTimeZone_WTZDetails::has_amtdst() const { return _internal_has_amtdst(); } inline void WTimeZone_WTZDetails::clear_amtdst() { - if (GetArena() == nullptr && amtdst_ != nullptr) { - delete amtdst_; + if (GetArenaForAllocation() == nullptr && _impl_.amtdst_ != nullptr) { + delete _impl_.amtdst_; } - amtdst_ = nullptr; + _impl_.amtdst_ = nullptr; } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::_internal_amtdst() const { - const ::HSS::Times::WTimeSpan* p = amtdst_; - return p != nullptr ? *p : *reinterpret_cast( - &::HSS::Times::_WTimeSpan_default_instance_); + const ::HSS::Times::WTimeSpan* p = _impl_.amtdst_; + return p != nullptr ? *p : reinterpret_cast( + ::HSS::Times::_WTimeSpan_default_instance_); } inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::amtdst() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.WTZDetails.amtDST) @@ -1661,10 +1723,10 @@ inline const ::HSS::Times::WTimeSpan& WTimeZone_WTZDetails::amtdst() const { } inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_amtdst( ::HSS::Times::WTimeSpan* amtdst) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(amtdst_); + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.amtdst_); } - amtdst_ = amtdst; + _impl_.amtdst_ = amtdst; if (amtdst) { } else { @@ -1674,40 +1736,47 @@ inline void WTimeZone_WTZDetails::unsafe_arena_set_allocated_amtdst( } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::release_amtdst() { - ::HSS::Times::WTimeSpan* temp = amtdst_; - amtdst_ = nullptr; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeSpan* temp = _impl_.amtdst_; + _impl_.amtdst_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::unsafe_arena_release_amtdst() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.WTZDetails.amtDST) - ::HSS::Times::WTimeSpan* temp = amtdst_; - amtdst_ = nullptr; + ::HSS::Times::WTimeSpan* temp = _impl_.amtdst_; + _impl_.amtdst_ = nullptr; return temp; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::_internal_mutable_amtdst() { - if (amtdst_ == nullptr) { - auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArena()); - amtdst_ = p; + if (_impl_.amtdst_ == nullptr) { + auto* p = CreateMaybeMessage<::HSS::Times::WTimeSpan>(GetArenaForAllocation()); + _impl_.amtdst_ = p; } - return amtdst_; + return _impl_.amtdst_; } inline ::HSS::Times::WTimeSpan* WTimeZone_WTZDetails::mutable_amtdst() { + ::HSS::Times::WTimeSpan* _msg = _internal_mutable_amtdst(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.WTZDetails.amtDST) - return _internal_mutable_amtdst(); + return _msg; } inline void WTimeZone_WTZDetails::set_allocated_amtdst(::HSS::Times::WTimeSpan* amtdst) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete amtdst_; + delete _impl_.amtdst_; } if (amtdst) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(amtdst); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(amtdst); if (message_arena != submessage_arena) { amtdst = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, amtdst, submessage_arena); @@ -1716,7 +1785,7 @@ inline void WTimeZone_WTZDetails::set_allocated_amtdst(::HSS::Times::WTimeSpan* } else { } - amtdst_ = amtdst; + _impl_.amtdst_ = amtdst; // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.WTZDetails.amtDST) } @@ -1726,54 +1795,38 @@ inline void WTimeZone_WTZDetails::set_allocated_amtdst(::HSS::Times::WTimeSpan* // string name = 1; inline void WTimeZone_TZTimeZone::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _impl_.name_.ClearToEmpty(); } inline const std::string& WTimeZone_TZTimeZone::name() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.TZTimeZone.name) return _internal_name(); } -inline void WTimeZone_TZTimeZone::set_name(const std::string& value) { - _internal_set_name(value); +template +inline PROTOBUF_ALWAYS_INLINE +void WTimeZone_TZTimeZone::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:HSS.Times.WTimeZone.TZTimeZone.name) } inline std::string* WTimeZone_TZTimeZone::mutable_name() { + std::string* _s = _internal_mutable_name(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.TZTimeZone.name) - return _internal_mutable_name(); + return _s; } inline const std::string& WTimeZone_TZTimeZone::_internal_name() const { - return name_.Get(); + return _impl_.name_.Get(); } inline void WTimeZone_TZTimeZone::_internal_set_name(const std::string& value) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void WTimeZone_TZTimeZone::set_name(std::string&& value) { - - name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:HSS.Times.WTimeZone.TZTimeZone.name) -} -inline void WTimeZone_TZTimeZone::set_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:HSS.Times.WTimeZone.TZTimeZone.name) -} -inline void WTimeZone_TZTimeZone::set_name(const char* value, - size_t size) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:HSS.Times.WTimeZone.TZTimeZone.name) + _impl_.name_.Set(value, GetArenaForAllocation()); } inline std::string* WTimeZone_TZTimeZone::_internal_mutable_name() { - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.name_.Mutable(GetArenaForAllocation()); } inline std::string* WTimeZone_TZTimeZone::release_name() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.TZTimeZone.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return _impl_.name_.Release(); } inline void WTimeZone_TZTimeZone::set_allocated_name(std::string* name) { if (name != nullptr) { @@ -1781,33 +1834,37 @@ inline void WTimeZone_TZTimeZone::set_allocated_name(std::string* name) { } else { } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArena()); + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:HSS.Times.WTimeZone.TZTimeZone.name) } -// bool daylight = 2; +// optional bool daylight = 2; inline bool WTimeZone_TZTimeZone::_internal_has_daylight() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; return value; } inline bool WTimeZone_TZTimeZone::has_daylight() const { return _internal_has_daylight(); } inline void WTimeZone_TZTimeZone::clear_daylight() { - daylight_ = false; - _has_bits_[0] &= ~0x00000001u; + _impl_.daylight_ = false; + _impl_._has_bits_[0] &= ~0x00000001u; } inline bool WTimeZone_TZTimeZone::_internal_daylight() const { - return daylight_; + return _impl_.daylight_; } inline bool WTimeZone_TZTimeZone::daylight() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.TZTimeZone.daylight) return _internal_daylight(); } inline void WTimeZone_TZTimeZone::_internal_set_daylight(bool value) { - _has_bits_[0] |= 0x00000001u; - daylight_ = value; + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.daylight_ = value; } inline void WTimeZone_TZTimeZone::set_daylight(bool value) { _internal_set_daylight(value); @@ -1820,55 +1877,58 @@ inline void WTimeZone_TZTimeZone::set_daylight(bool value) { // int32 version = 1; inline void WTimeZone::clear_version() { - version_ = 0; + _impl_.version_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 WTimeZone::_internal_version() const { - return version_; +inline int32_t WTimeZone::_internal_version() const { + return _impl_.version_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 WTimeZone::version() const { +inline int32_t WTimeZone::version() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.version) return _internal_version(); } -inline void WTimeZone::_internal_set_version(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void WTimeZone::_internal_set_version(int32_t value) { - version_ = value; + _impl_.version_ = value; } -inline void WTimeZone::set_version(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void WTimeZone::set_version(int32_t value) { _internal_set_version(value); // @@protoc_insertion_point(field_set:HSS.Times.WTimeZone.version) } -// int32 timezoneIndex = 2; +// int32 timezoneIndex = 2 [deprecated = true]; inline bool WTimeZone::_internal_has_timezoneindex() const { return msg_case() == kTimezoneIndex; } +inline bool WTimeZone::has_timezoneindex() const { + return _internal_has_timezoneindex(); +} inline void WTimeZone::set_has_timezoneindex() { - _oneof_case_[0] = kTimezoneIndex; + _impl_._oneof_case_[0] = kTimezoneIndex; } inline void WTimeZone::clear_timezoneindex() { if (_internal_has_timezoneindex()) { - msg_.timezoneindex_ = 0; + _impl_.msg_.timezoneindex_ = 0; clear_has_msg(); } } -inline ::PROTOBUF_NAMESPACE_ID::int32 WTimeZone::_internal_timezoneindex() const { +inline int32_t WTimeZone::_internal_timezoneindex() const { if (_internal_has_timezoneindex()) { - return msg_.timezoneindex_; + return _impl_.msg_.timezoneindex_; } return 0; } -inline void WTimeZone::_internal_set_timezoneindex(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void WTimeZone::_internal_set_timezoneindex(int32_t value) { if (!_internal_has_timezoneindex()) { clear_msg(); set_has_timezoneindex(); } - msg_.timezoneindex_ = value; + _impl_.msg_.timezoneindex_ = value; } -inline ::PROTOBUF_NAMESPACE_ID::int32 WTimeZone::timezoneindex() const { +inline int32_t WTimeZone::timezoneindex() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.timezoneIndex) return _internal_timezoneindex(); } -inline void WTimeZone::set_timezoneindex(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void WTimeZone::set_timezoneindex(int32_t value) { _internal_set_timezoneindex(value); // @@protoc_insertion_point(field_set:HSS.Times.WTimeZone.timezoneIndex) } @@ -1881,12 +1941,12 @@ inline bool WTimeZone::has_timezonedetails() const { return _internal_has_timezonedetails(); } inline void WTimeZone::set_has_timezonedetails() { - _oneof_case_[0] = kTimezoneDetails; + _impl_._oneof_case_[0] = kTimezoneDetails; } inline void WTimeZone::clear_timezonedetails() { if (_internal_has_timezonedetails()) { - if (GetArena() == nullptr) { - delete msg_.timezonedetails_; + if (GetArenaForAllocation() == nullptr) { + delete _impl_.msg_.timezonedetails_; } clear_has_msg(); } @@ -1895,11 +1955,11 @@ inline ::HSS::Times::WTimeZone_WTZDetails* WTimeZone::release_timezonedetails() // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.timezoneDetails) if (_internal_has_timezonedetails()) { clear_has_msg(); - ::HSS::Times::WTimeZone_WTZDetails* temp = msg_.timezonedetails_; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeZone_WTZDetails* temp = _impl_.msg_.timezonedetails_; + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - msg_.timezonedetails_ = nullptr; + _impl_.msg_.timezonedetails_ = nullptr; return temp; } else { return nullptr; @@ -1907,8 +1967,8 @@ inline ::HSS::Times::WTimeZone_WTZDetails* WTimeZone::release_timezonedetails() } inline const ::HSS::Times::WTimeZone_WTZDetails& WTimeZone::_internal_timezonedetails() const { return _internal_has_timezonedetails() - ? *msg_.timezonedetails_ - : *reinterpret_cast< ::HSS::Times::WTimeZone_WTZDetails*>(&::HSS::Times::_WTimeZone_WTZDetails_default_instance_); + ? *_impl_.msg_.timezonedetails_ + : reinterpret_cast< ::HSS::Times::WTimeZone_WTZDetails&>(::HSS::Times::_WTimeZone_WTZDetails_default_instance_); } inline const ::HSS::Times::WTimeZone_WTZDetails& WTimeZone::timezonedetails() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.timezoneDetails) @@ -1918,8 +1978,8 @@ inline ::HSS::Times::WTimeZone_WTZDetails* WTimeZone::unsafe_arena_release_timez // @@protoc_insertion_point(field_unsafe_arena_release:HSS.Times.WTimeZone.timezoneDetails) if (_internal_has_timezonedetails()) { clear_has_msg(); - ::HSS::Times::WTimeZone_WTZDetails* temp = msg_.timezonedetails_; - msg_.timezonedetails_ = nullptr; + ::HSS::Times::WTimeZone_WTZDetails* temp = _impl_.msg_.timezonedetails_; + _impl_.msg_.timezonedetails_ = nullptr; return temp; } else { return nullptr; @@ -1929,7 +1989,7 @@ inline void WTimeZone::unsafe_arena_set_allocated_timezonedetails(::HSS::Times:: clear_msg(); if (timezonedetails) { set_has_timezonedetails(); - msg_.timezonedetails_ = timezonedetails; + _impl_.msg_.timezonedetails_ = timezonedetails; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:HSS.Times.WTimeZone.timezoneDetails) } @@ -1937,13 +1997,14 @@ inline ::HSS::Times::WTimeZone_WTZDetails* WTimeZone::_internal_mutable_timezone if (!_internal_has_timezonedetails()) { clear_msg(); set_has_timezonedetails(); - msg_.timezonedetails_ = CreateMaybeMessage< ::HSS::Times::WTimeZone_WTZDetails >(GetArena()); + _impl_.msg_.timezonedetails_ = CreateMaybeMessage< ::HSS::Times::WTimeZone_WTZDetails >(GetArenaForAllocation()); } - return msg_.timezonedetails_; + return _impl_.msg_.timezonedetails_; } inline ::HSS::Times::WTimeZone_WTZDetails* WTimeZone::mutable_timezonedetails() { + ::HSS::Times::WTimeZone_WTZDetails* _msg = _internal_mutable_timezonedetails(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.timezoneDetails) - return _internal_mutable_timezonedetails(); + return _msg; } // .HSS.Times.WTimeZone.TZTimeZone tztimezone = 4; @@ -1954,12 +2015,12 @@ inline bool WTimeZone::has_tztimezone() const { return _internal_has_tztimezone(); } inline void WTimeZone::set_has_tztimezone() { - _oneof_case_[0] = kTztimezone; + _impl_._oneof_case_[0] = kTztimezone; } inline void WTimeZone::clear_tztimezone() { if (_internal_has_tztimezone()) { - if (GetArena() == nullptr) { - delete msg_.tztimezone_; + if (GetArenaForAllocation() == nullptr) { + delete _impl_.msg_.tztimezone_; } clear_has_msg(); } @@ -1968,11 +2029,11 @@ inline ::HSS::Times::WTimeZone_TZTimeZone* WTimeZone::release_tztimezone() { // @@protoc_insertion_point(field_release:HSS.Times.WTimeZone.tztimezone) if (_internal_has_tztimezone()) { clear_has_msg(); - ::HSS::Times::WTimeZone_TZTimeZone* temp = msg_.tztimezone_; - if (GetArena() != nullptr) { + ::HSS::Times::WTimeZone_TZTimeZone* temp = _impl_.msg_.tztimezone_; + if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } - msg_.tztimezone_ = nullptr; + _impl_.msg_.tztimezone_ = nullptr; return temp; } else { return nullptr; @@ -1980,8 +2041,8 @@ inline ::HSS::Times::WTimeZone_TZTimeZone* WTimeZone::release_tztimezone() { } inline const ::HSS::Times::WTimeZone_TZTimeZone& WTimeZone::_internal_tztimezone() const { return _internal_has_tztimezone() - ? *msg_.tztimezone_ - : *reinterpret_cast< ::HSS::Times::WTimeZone_TZTimeZone*>(&::HSS::Times::_WTimeZone_TZTimeZone_default_instance_); + ? *_impl_.msg_.tztimezone_ + : reinterpret_cast< ::HSS::Times::WTimeZone_TZTimeZone&>(::HSS::Times::_WTimeZone_TZTimeZone_default_instance_); } inline const ::HSS::Times::WTimeZone_TZTimeZone& WTimeZone::tztimezone() const { // @@protoc_insertion_point(field_get:HSS.Times.WTimeZone.tztimezone) @@ -1991,8 +2052,8 @@ inline ::HSS::Times::WTimeZone_TZTimeZone* WTimeZone::unsafe_arena_release_tztim // @@protoc_insertion_point(field_unsafe_arena_release:HSS.Times.WTimeZone.tztimezone) if (_internal_has_tztimezone()) { clear_has_msg(); - ::HSS::Times::WTimeZone_TZTimeZone* temp = msg_.tztimezone_; - msg_.tztimezone_ = nullptr; + ::HSS::Times::WTimeZone_TZTimeZone* temp = _impl_.msg_.tztimezone_; + _impl_.msg_.tztimezone_ = nullptr; return temp; } else { return nullptr; @@ -2002,7 +2063,7 @@ inline void WTimeZone::unsafe_arena_set_allocated_tztimezone(::HSS::Times::WTime clear_msg(); if (tztimezone) { set_has_tztimezone(); - msg_.tztimezone_ = tztimezone; + _impl_.msg_.tztimezone_ = tztimezone; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:HSS.Times.WTimeZone.tztimezone) } @@ -2010,23 +2071,24 @@ inline ::HSS::Times::WTimeZone_TZTimeZone* WTimeZone::_internal_mutable_tztimezo if (!_internal_has_tztimezone()) { clear_msg(); set_has_tztimezone(); - msg_.tztimezone_ = CreateMaybeMessage< ::HSS::Times::WTimeZone_TZTimeZone >(GetArena()); + _impl_.msg_.tztimezone_ = CreateMaybeMessage< ::HSS::Times::WTimeZone_TZTimeZone >(GetArenaForAllocation()); } - return msg_.tztimezone_; + return _impl_.msg_.tztimezone_; } inline ::HSS::Times::WTimeZone_TZTimeZone* WTimeZone::mutable_tztimezone() { + ::HSS::Times::WTimeZone_TZTimeZone* _msg = _internal_mutable_tztimezone(); // @@protoc_insertion_point(field_mutable:HSS.Times.WTimeZone.tztimezone) - return _internal_mutable_tztimezone(); + return _msg; } inline bool WTimeZone::has_msg() const { return msg_case() != MSG_NOT_SET; } inline void WTimeZone::clear_has_msg() { - _oneof_case_[0] = MSG_NOT_SET; + _impl_._oneof_case_[0] = MSG_NOT_SET; } inline WTimeZone::MsgCase WTimeZone::msg_case() const { - return WTimeZone::MsgCase(_oneof_case_[0]); + return WTimeZone::MsgCase(_impl_._oneof_case_[0]); } #ifdef __GNUC__ #pragma GCC diagnostic pop From 718dc867e6cf28d38d2ba63e60ff29fe28385353 Mon Sep 17 00:00:00 2001 From: Robert Bryce Date: Mon, 29 Jul 2024 11:36:03 -0500 Subject: [PATCH 4/4] Genuine bug fixes from private builds, updates from Pi to _Pi_, to avoid build conflicts. --- cxx/src/TimezoneMapper.cpp | 1 + cxx/src/worldlocation.cpp | 56 ++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/cxx/src/TimezoneMapper.cpp b/cxx/src/TimezoneMapper.cpp index 9a973e3..b57ba0c 100644 --- a/cxx/src/TimezoneMapper.cpp +++ b/cxx/src/TimezoneMapper.cpp @@ -259,5 +259,6 @@ const ::TimeZoneInfo* TimezoneMapper::getTz(const double lat, const double lng, } weak_assert(tzi != nullptr); + *valid = (tzi != nullptr); return tzi; } diff --git a/cxx/src/worldlocation.cpp b/cxx/src/worldlocation.cpp index 9c704b0..36a60df 100644 --- a/cxx/src/worldlocation.cpp +++ b/cxx/src/worldlocation.cpp @@ -21,6 +21,7 @@ #include "worldlocation.h" #include "SunriseSunsetCalc.h" #include "str_printf.h" +#include "Borders.h" #include #include @@ -32,11 +33,12 @@ using namespace HSS_Time; using namespace HSS_Time_Private; -#define Pi 3.14159265358979323846264 -#define TwoPi 6.28318530717958647692529 +#define _Pi_ 3.14159265358979323846264 +#define _TwoPi_ 6.28318530717958647692529 + static double DEGREE_TO_RADIAN(const double X) { - return (X / 180.0) * 3.14159265358979323846264; + return (X / 180.0) * _Pi_; } @@ -153,7 +155,7 @@ bool WorldLocation::InsideCanada(const double latitude, const double longitude) if (longitude < DEGREE_TO_RADIAN(-141.0)) return false; if (longitude > DEGREE_TO_RADIAN(-52.0)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.Canada()) @@ -200,11 +202,11 @@ bool WorldLocation::InsideAlaska(const double latitude, const double longitude) double __longitude = longitude; if (__longitude > 0.0) - __longitude -= TwoPi; + __longitude -= _TwoPi_; if (__longitude < DEGREE_TO_RADIAN(-187.53833299999999)) return false; if (__longitude > DEGREE_TO_RADIAN(-129.97416699999999)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.AK()) @@ -227,7 +229,7 @@ bool WorldLocation::InsideWashington(const double latitude, const double longitu if (longitude < DEGREE_TO_RADIAN(-124.73317400000001)) return false; if (longitude > DEGREE_TO_RADIAN(-116.91598900000000)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.WA()) @@ -250,7 +252,7 @@ bool WorldLocation::InsideOregon(const double latitude, const double longitude) if (longitude < DEGREE_TO_RADIAN(-124.55244100000000)) return false; if (longitude > DEGREE_TO_RADIAN(-116.46350400000000)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.OR()) @@ -273,7 +275,7 @@ bool WorldLocation::InsideIdaho(const double latitude, const double longitude) c if (longitude < DEGREE_TO_RADIAN(-117.24302700000000)) return false; if (longitude > DEGREE_TO_RADIAN(-111.04356400000000)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.ID()) @@ -296,7 +298,7 @@ bool WorldLocation::InsideMontana(const double latitude, const double longitude) if (longitude < DEGREE_TO_RADIAN(-116.04989399999999)) return false; if (longitude > DEGREE_TO_RADIAN(-104.03913799999999)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.MT()) @@ -319,7 +321,7 @@ bool WorldLocation::InsideNorthDakota(const double latitude, const double longit if (longitude < DEGREE_TO_RADIAN(-104.04890000000000)) return false; if (longitude > DEGREE_TO_RADIAN(-96.554507000000001)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.ND()) @@ -342,7 +344,7 @@ bool WorldLocation::InsideMinnesota(const double latitude, const double longitud if (longitude < DEGREE_TO_RADIAN(-97.239209000000002)) return false; if (longitude > DEGREE_TO_RADIAN(-89.489226000000002)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.MN()) @@ -365,7 +367,7 @@ bool WorldLocation::InsideYukon(const double latitude, const double longitude) c if (_longitude < DEGREE_TO_RADIAN(-141.01807315799999)) return false; if (_longitude > DEGREE_TO_RADIAN(-123.78932483600001)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.YT()) @@ -388,7 +390,7 @@ bool WorldLocation::InsideAlberta(const double latitude, const double longitude) if (longitude < DEGREE_TO_RADIAN(-120.0)) return false; if (longitude > DEGREE_TO_RADIAN(-110.0)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.AB()) @@ -411,7 +413,7 @@ bool WorldLocation::InsideSaskatchewan(const double latitude, const double longi if (longitude < DEGREE_TO_RADIAN(-110.0)) return false; if (longitude > DEGREE_TO_RADIAN(-101.36230470900000)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.SK()) @@ -434,7 +436,7 @@ bool WorldLocation::InsideManitoba(const double latitude, const double longitude if (longitude < DEGREE_TO_RADIAN(-102.0)) return false; if (longitude > DEGREE_TO_RADIAN(-88.986493339999896)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.MB()) @@ -457,7 +459,7 @@ bool WorldLocation::InsideNewBrunswick(const double latitude, const double longi if (longitude < DEGREE_TO_RADIAN(-69.053278519999907)) return false; if (longitude > DEGREE_TO_RADIAN(-63.772017501999898)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.NB()) @@ -480,7 +482,7 @@ bool WorldLocation::InsidePEI(const double latitude, const double longitude) con if (longitude < DEGREE_TO_RADIAN(-64.413458053999904)) return false; if (longitude > DEGREE_TO_RADIAN(-61.970709676999903)) return false; -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.PEI()) @@ -494,7 +496,7 @@ bool WorldLocation::InsidePEI(const double latitude, const double longitude) con bool WorldLocation::InsideNewZealand(const double latitude, const double longitude) const { -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.NewZealand()) @@ -529,7 +531,7 @@ bool WorldLocation::InsideTasmania(const double latitude, const double longitude } } -#if defined(__GEOGRAPHY_BORDERS_H) +#if defined(__HSS_GEOGRAPHY_BORDERS_H) XY_Point pt(RADIAN_TO_DEGREE(longitude), RADIAN_TO_DEGREE(latitude)); Borders borders; if (borders.Tasmania()) @@ -542,7 +544,7 @@ bool WorldLocation::InsideTasmania(const double latitude, const double longitude bool WorldLocation::InsideTasmania() const { - return InsideNewZealand(_latitude, _longitude); + return InsideTasmania(_latitude, _longitude); } @@ -637,20 +639,20 @@ const ::TimeZoneInfo *WorldLocation::GuessTimeZone(INTNM::int16_t set) const { } double longitude = _longitude; - while (longitude < -Pi) - longitude += TwoPi; - while (longitude > Pi) - longitude -= TwoPi; + while (longitude < -_Pi_) + longitude += _TwoPi_; + while (longitude > _Pi_) + longitude -= _TwoPi_; const ::TimeZoneInfo *tz; - double variation = TwoPi; + double variation = _TwoPi_; if (set == 1) tz = m_dst_timezones; else if (set == -1) tz = m_mil_timezones; else if (set == 0) tz = m_std_timezones; else return NULL; while (tz->m_name) { - double ideal_longitude = ((double)tz->m_timezone.GetTotalSeconds()) / (double)(12.0 * 60.0 * 60.0) * Pi; + double ideal_longitude = ((double)tz->m_timezone.GetTotalSeconds()) / (double)(12.0 * 60.0 * 60.0) * _Pi_; double offset_longitude = fabs(longitude - ideal_longitude); if (variation > offset_longitude) { variation = offset_longitude;