8#ifndef INCLUDED_BALTZO_LOCALTIMEDESCRIPTOR
9#define INCLUDED_BALTZO_LOCALTIMEDESCRIPTOR
153#include <balscm_version.h>
168#include <bsl_algorithm.h>
169#include <bsl_iosfwd.h>
170#include <bsl_string.h>
172#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
192 int d_utcOffsetInSeconds;
194 bool d_dstInEffectFlag;
347 bsl::ostream&
print(bsl::ostream& stream,
349 int spacesPerLevel = 4)
const;
399 return value >= -86399 && value <= 86399;
405: d_utcOffsetInSeconds(0)
406, d_dstInEffectFlag(false)
413: d_utcOffsetInSeconds(0)
414, d_dstInEffectFlag(false)
415, d_description(
bslma::AllocatorUtil::adapt(allocator))
421 int utcOffsetInSeconds,
422 bool dstInEffectFlag,
425: d_utcOffsetInSeconds(utcOffsetInSeconds)
426, d_dstInEffectFlag(dstInEffectFlag)
427, d_description(description.begin(),
429 bslma::AllocatorUtil::adapt(allocator))
437: d_utcOffsetInSeconds(original.d_utcOffsetInSeconds)
438, d_dstInEffectFlag(original.d_dstInEffectFlag)
439, d_description(original.d_description,
bslma::AllocatorUtil::adapt(allocator))
459: d_utcOffsetInSeconds(
bslmf::MovableRefUtil::move(
460 bslmf::MovableRefUtil::access(original).d_utcOffsetInSeconds))
461, d_dstInEffectFlag(
bslmf::MovableRefUtil::move(
462 bslmf::MovableRefUtil::access(original).d_dstInEffectFlag))
464 bslmf::MovableRefUtil::move(
465 bslmf::MovableRefUtil::access(original).d_description),
466 bslma::AllocatorUtil::adapt(allocator))
482 d_description = rhs.d_description;
484 d_utcOffsetInSeconds = rhs.d_utcOffsetInSeconds;
485 d_dstInEffectFlag = rhs.d_dstInEffectFlag;
517 d_dstInEffectFlag = value;
525 d_utcOffsetInSeconds = value;
544 return d_description;
550 return d_dstInEffectFlag;
556 return d_utcOffsetInSeconds;
570 return bslma::AATypeUtil::getAllocatorFromSubobject<allocator_type>(
579 const LocalTimeDescriptor& rhs)
581 return lhs.utcOffsetInSeconds() == rhs.utcOffsetInSeconds()
582 && lhs.dstInEffectFlag() == rhs.dstInEffectFlag()
583 && lhs.description() == rhs.description();
588 const LocalTimeDescriptor& rhs)
590 return lhs.utcOffsetInSeconds() != rhs.utcOffsetInSeconds()
591 || lhs.dstInEffectFlag() != rhs.dstInEffectFlag()
592 || lhs.description() != rhs.description();
597void baltzo::swap(LocalTimeDescriptor& a, LocalTimeDescriptor& b)
Definition baltzo_localtimedescriptor.h:189
const bsl::string & description() const
Definition baltzo_localtimedescriptor.h:542
bsl::allocator allocator_type
Definition baltzo_localtimedescriptor.h:205
static bool isValidUtcOffsetInSeconds(int value)
Definition baltzo_localtimedescriptor.h:397
friend void swap(LocalTimeDescriptor &, LocalTimeDescriptor &)
BSLMF_NESTED_TRAIT_DECLARATION(LocalTimeDescriptor, bslmf::IsBitwiseMoveable)
LocalTimeDescriptor & operator=(const LocalTimeDescriptor &rhs)
Definition baltzo_localtimedescriptor.h:479
void setDescription(const bsl::string_view &value)
Definition baltzo_localtimedescriptor.h:509
void setDstInEffectFlag(bool value)
Definition baltzo_localtimedescriptor.h:515
void setUtcOffsetInSeconds(int value)
Definition baltzo_localtimedescriptor.h:521
bslma::Allocator * allocator() const
Definition baltzo_localtimedescriptor.h:562
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
~LocalTimeDescriptor()
Destroy this object.
Definition baltzo_localtimedescriptor.h:472
LocalTimeDescriptor()
Definition baltzo_localtimedescriptor.h:404
bool dstInEffectFlag() const
Definition baltzo_localtimedescriptor.h:548
allocator_type get_allocator() const
Definition baltzo_localtimedescriptor.h:568
int utcOffsetInSeconds() const
Definition baltzo_localtimedescriptor.h:554
Definition bslma_bslallocator.h:580
BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1126
Definition bslstl_stringview.h:441
BSLS_KEYWORD_CONSTEXPR const_iterator end() const BSLS_KEYWORD_NOEXCEPT
Return the past-the-end iterator for this view.
Definition bslstl_stringview.h:1620
BSLS_KEYWORD_CONSTEXPR const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1602
Definition bslstl_string.h:1281
basic_string & assign(const basic_string &replacement)
Definition bslstl_string.h:5716
static void swap(T *a, T *b)
Definition bslalg_swaputil.h:194
Definition bslma_allocator.h:457
Definition bslmf_movableref.h:751
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:632
Definition baltzo_datafileloader.h:263
bool operator==(const LocalDatetime &lhs, const LocalDatetime &rhs)
void swap(LocalDatetime &a, LocalDatetime &b)
bool operator!=(const LocalDatetime &lhs, const LocalDatetime &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, DstPolicy::Enum value)
Definition balxml_encoderoptions.h:68
Definition bdlbb_blob.h:576
Definition bslmf_isbitwisemoveable.h:718
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1060
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1032