8#ifndef INCLUDED_BDLT_ISO8601UTILCONFIGURATION
9#define INCLUDED_BDLT_ISO8601UTILCONFIGURATION
202#include <bdlscm_version.h>
208#include <bsl_iosfwd.h>
233 k_FRACTIONAL_SECOND_PRECISION_MASK = 0x07,
234 k_OMIT_COLON_IN_ZONE_DESIGNATOR_BIT = 0x08,
235 k_USE_COMMA_FOR_DECIMAL_SIGN_BIT = 0x10,
236 k_USE_Z_ABBREVIATION_FOR_UTC_BIT = 0x20
240 static bsls::AtomicOperations::AtomicTypes::Int
241 s_defaultConfiguration;
244 int d_configurationMask;
353 bsl::ostream&
print(bsl::ostream& stream,
355 int spacesPerLevel = 4)
const;
398: d_configurationMask(configurationMask)
401 & ~(k_FRACTIONAL_SECOND_PRECISION_MASK
402 | k_OMIT_COLON_IN_ZONE_DESIGNATOR_BIT
403 | k_USE_COMMA_FOR_DECIMAL_SIGN_BIT
404 | k_USE_Z_ABBREVIATION_FOR_UTC_BIT)));
416void Iso8601UtilConfiguration::setDefaultConfiguration(
420 configuration.d_configurationMask);
425Iso8601UtilConfiguration::Iso8601UtilConfiguration()
426: d_configurationMask(3)
433: d_configurationMask(original.d_configurationMask)
441 & ~(k_FRACTIONAL_SECOND_PRECISION_MASK
442 | k_OMIT_COLON_IN_ZONE_DESIGNATOR_BIT
443 | k_USE_COMMA_FOR_DECIMAL_SIGN_BIT
444 | k_USE_Z_ABBREVIATION_FOR_UTC_BIT)));
452 d_configurationMask = rhs.d_configurationMask;
461 return d_configurationMask & k_FRACTIONAL_SECOND_PRECISION_MASK;
467 return d_configurationMask & k_OMIT_COLON_IN_ZONE_DESIGNATOR_BIT;
473 return d_configurationMask & k_USE_COMMA_FOR_DECIMAL_SIGN_BIT;
479 return d_configurationMask & k_USE_Z_ABBREVIATION_FOR_UTC_BIT;
487 const Iso8601UtilConfiguration& rhs)
489 return lhs.d_configurationMask == rhs.d_configurationMask;
494 const Iso8601UtilConfiguration& rhs)
496 return lhs.d_configurationMask !=
rhs.d_configurationMask;
Definition bdlt_iso8601utilconfiguration.h:224
int fractionalSecondPrecision() const
Definition bdlt_iso8601utilconfiguration.h:459
friend bool operator!=(const Iso8601UtilConfiguration &, const Iso8601UtilConfiguration &)
bool omitColonInZoneDesignator() const
Definition bdlt_iso8601utilconfiguration.h:465
bool useCommaForDecimalSign() const
Definition bdlt_iso8601utilconfiguration.h:471
Iso8601UtilConfiguration()
Definition bdlt_iso8601utilconfiguration.h:425
void setFractionalSecondPrecision(int value)
bool useZAbbreviationForUtc() const
Definition bdlt_iso8601utilconfiguration.h:477
void setUseZAbbreviationForUtc(bool value)
void setOmitColonInZoneDesignator(bool value)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static Iso8601UtilConfiguration defaultConfiguration()
Definition bdlt_iso8601utilconfiguration.h:409
static void setDefaultConfiguration(const Iso8601UtilConfiguration &configuration)
Definition bdlt_iso8601utilconfiguration.h:416
~Iso8601UtilConfiguration()
Destroy this object.
Definition bdlt_iso8601utilconfiguration.h:438
void setUseCommaForDecimalSign(bool value)
friend bool operator==(const Iso8601UtilConfiguration &, const Iso8601UtilConfiguration &)
Iso8601UtilConfiguration & operator=(const Iso8601UtilConfiguration &rhs)
Definition bdlt_iso8601utilconfiguration.h:449
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bbldc_basicisma30360.h:112
bool operator==(const Calendar &lhs, const Calendar &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Calendar &calendar)
bool operator!=(const Calendar &lhs, const Calendar &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
static void setIntRelaxed(AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations.h:1554
static int getIntRelaxed(AtomicTypes::Int const *atomicInt)
Definition bsls_atomicoperations.h:1536