BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlt::Iso8601UtilConfiguration Class Reference

#include <bdlt_iso8601utilconfiguration.h>

Public Member Functions

 Iso8601UtilConfiguration ()
 
 Iso8601UtilConfiguration (const Iso8601UtilConfiguration &original)
 
 ~Iso8601UtilConfiguration ()
 Destroy this object.
 
Iso8601UtilConfigurationoperator= (const Iso8601UtilConfiguration &rhs)
 
void setFractionalSecondPrecision (int value)
 
void setOmitColonInZoneDesignator (bool value)
 
void setUseCommaForDecimalSign (bool value)
 
void setUseZAbbreviationForUtc (bool value)
 
int fractionalSecondPrecision () const
 
bool omitColonInZoneDesignator () const
 
bool useCommaForDecimalSign () const
 
bool useZAbbreviationForUtc () const
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Static Public Member Functions

static Iso8601UtilConfiguration defaultConfiguration ()
 
static void setDefaultConfiguration (const Iso8601UtilConfiguration &configuration)
 

Friends

bool operator== (const Iso8601UtilConfiguration &, const Iso8601UtilConfiguration &)
 
bool operator!= (const Iso8601UtilConfiguration &, const Iso8601UtilConfiguration &)
 

Detailed Description

This unconstrained (value-semantic) attribute class characterizes how to configure certain behavior in Iso8601Util functions. Currently, only the generate and generateRaw methods of that utility are affected by Iso8601UtilConfiguration settings. See the Attributes section under @DESCRIPTION in the component-level documentation for information on the class attributes.

See bdlt_iso8601utilconfiguration

Constructor & Destructor Documentation

◆ Iso8601UtilConfiguration() [1/2]

bdlt::Iso8601UtilConfiguration::Iso8601UtilConfiguration ( )
inline

Create an Iso8601UtilConfiguration object having the (default) attribute values:

int fractionalSecondPrecision() const
Definition bdlt_iso8601utilconfiguration.h:457
bool omitColonInZoneDesignator() const
Definition bdlt_iso8601utilconfiguration.h:463
bool useCommaForDecimalSign() const
Definition bdlt_iso8601utilconfiguration.h:469
bool useZAbbreviationForUtc() const
Definition bdlt_iso8601utilconfiguration.h:475

◆ Iso8601UtilConfiguration() [2/2]

bdlt::Iso8601UtilConfiguration::Iso8601UtilConfiguration ( const Iso8601UtilConfiguration original)
inline

Create an Iso8601UtilConfiguration object having the value of the specified original configuration.

◆ ~Iso8601UtilConfiguration()

bdlt::Iso8601UtilConfiguration::~Iso8601UtilConfiguration ( )
inline

Member Function Documentation

◆ defaultConfiguration()

Iso8601UtilConfiguration bdlt::Iso8601UtilConfiguration::defaultConfiguration ( )
inlinestatic

Return the value of the process-wide Iso8601UtilConfiguration that is currently in effect.

◆ fractionalSecondPrecision()

int bdlt::Iso8601UtilConfiguration::fractionalSecondPrecision ( ) const
inline

Return the value of the fractionalSecondPrecision attribute of this object.

◆ omitColonInZoneDesignator()

bool bdlt::Iso8601UtilConfiguration::omitColonInZoneDesignator ( ) const
inline

Return the value of the omitColonInZoneDesignator attribute of this object.

◆ operator=()

Iso8601UtilConfiguration & bdlt::Iso8601UtilConfiguration::operator= ( const Iso8601UtilConfiguration rhs)
inline

Assign to this object the value of the specified rhs configuration, and return a reference providing modifiable access to this object.

◆ print()

bsl::ostream & bdlt::Iso8601UtilConfiguration::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Write the value of this object to the specified output stream in a human-readable format, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that this human-readable format is not fully specified, and can change without notice.

◆ setDefaultConfiguration()

void bdlt::Iso8601UtilConfiguration::setDefaultConfiguration ( const Iso8601UtilConfiguration configuration)
inlinestatic

Set the value of the process-wide Iso8601UtilConfiguration to the specified configuration. Note that the expected usage is that the process-wide configuration will be established once, early in main, and not changed throughout the lifetime of a process.

◆ setFractionalSecondPrecision()

void bdlt::Iso8601UtilConfiguration::setFractionalSecondPrecision ( int  value)

Set the fractionalSecondPrecision attribute of this object to the specified value. The behavior is undefined unless 0 <= value and 6 >= value.

◆ setOmitColonInZoneDesignator()

void bdlt::Iso8601UtilConfiguration::setOmitColonInZoneDesignator ( bool  value)

Set the omitColonInZoneDesignator attribute of this object to the specified value.

◆ setUseCommaForDecimalSign()

void bdlt::Iso8601UtilConfiguration::setUseCommaForDecimalSign ( bool  value)

Set the useCommaForDecimalSign attribute of this object to the specified value.

◆ setUseZAbbreviationForUtc()

void bdlt::Iso8601UtilConfiguration::setUseZAbbreviationForUtc ( bool  value)

Set the useZAbbreviationForUtc attribute of this object to the specified value.

◆ useCommaForDecimalSign()

bool bdlt::Iso8601UtilConfiguration::useCommaForDecimalSign ( ) const
inline

Return the value of the useCommaForDecimalSign attribute of this object.

◆ useZAbbreviationForUtc()

bool bdlt::Iso8601UtilConfiguration::useZAbbreviationForUtc ( ) const
inline

Return the value of the useZAbbreviationForUtc attribute of this object.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const Iso8601UtilConfiguration ,
const Iso8601UtilConfiguration  
)
friend

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two Iso8601UtilConfiguration objects do not have the same value if any of their fractionalSecondPrecision, omitColonInZoneDesignator, useCommaForDecimalSign, or useZAbbreviationForUtc attributes (respectively) do not have the same value.

◆ operator==

bool operator== ( const Iso8601UtilConfiguration ,
const Iso8601UtilConfiguration  
)
friend

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two Iso8601UtilConfiguration objects have the same value if each of their fractionalSecondPrecision, omitColonInZoneDesignator, useCommaForDecimalSign, and useZAbbreviationForUtc attributes (respectively) have the same value.


The documentation for this class was generated from the following file: