BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlt::TimeTzFormatter< t_CHAR > Class Template Reference

#include <bdlt_timetzformatter.h>

Detailed Description

template<class t_CHAR>
class bdlt::TimeTzFormatter< t_CHAR >

This class provides a specifier formatter for printing TimeTz objects.

See bdlt_timetzformatter

Public Member Functions

BSLS_KEYWORD_CONSTEXPR_CPP20 TimeTzFormatter ()
 
BSLS_KEYWORD_CONSTEXPR_CPP20 void parseDefault ()
 
BSLS_KEYWORD_CONSTEXPR_CPP20 void parseIso8601 ()
 
BSLS_KEYWORD_CONSTEXPR_CPP20 bool parseNextModifier (StringView *specInOut)
 
BSLS_KEYWORD_CONSTEXPR_CPP20 bool parseNextSpecifier (StringView *specInOut)
 
void postprocess (const bslfmt::FormatSpecificationParser< t_CHAR > &spec)
 
BSLS_KEYWORD_CONSTEXPR_CPP20 int extraSections () const
 
int totalWidth (const FormatCache &value) const
 
template<class t_ITERATOR >
bool formatNextSpecifier (StringView *specInOut, t_ITERATOR *outIt, const FormatCache &value) const
 
template<class t_ITERATOR >
t_ITERATOR formatDefault (t_ITERATOR out, const FormatCache &value) const
 
template<class t_ITERATOR >
t_ITERATOR formatIso8601 (t_ITERATOR out, const FormatCache &value) const
 

Constructor & Destructor Documentation

◆ TimeTzFormatter()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 bdlt::TimeTzFormatter< t_CHAR >::TimeTzFormatter ( )

Create an object in its default initial state.

Member Function Documentation

◆ extraSections()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 int bdlt::TimeTzFormatter< t_CHAR >::extraSections ( ) const

Return the bslfmt::FormatSpecificationParser::Sections flags that apply to this value type.

◆ formatDefault()

template<class t_CHAR >
template<class t_ITERATOR >
t_ITERATOR bdlt::TimeTzFormatter< t_CHAR >::formatDefault ( t_ITERATOR  out,
const FormatCache value 
) const
inline

Format the specified value to the specified out using the default format and return out.

◆ formatIso8601()

template<class t_CHAR >
template<class t_ITERATOR >
t_ITERATOR bdlt::TimeTzFormatter< t_CHAR >::formatIso8601 ( t_ITERATOR  out,
const FormatCache value 
) const
inline

Format the specified value to the specified out using the Iso8601 format and return out.

◆ formatNextSpecifier()

template<class t_CHAR >
template<class t_ITERATOR >
bool bdlt::TimeTzFormatter< t_CHAR >::formatNextSpecifier ( StringView specInOut,
t_ITERATOR *  outIt,
const FormatCache value 
) const
inline

If the first character of the specified *specInOut is recognized by this specifier formatter, use it to format the specified value to *outIt, remove the character from *specInOut, and return true, otherwise return false with no modification to *specInOut.

◆ parseDefault()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 void bdlt::TimeTzFormatter< t_CHAR >::parseDefault ( )

Parse a time that will be formatted in default mode.

◆ parseIso8601()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 void bdlt::TimeTzFormatter< t_CHAR >::parseIso8601 ( )

Parse a time that will be formatted in Iso8601 mode.

◆ parseNextModifier()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 bool bdlt::TimeTzFormatter< t_CHAR >::parseNextModifier ( StringView specInOut)

Examine the first character of the specified *specInOut and if it is recognized as a modifier by this object, update this object's state to reflect it and pop it off the front of *specInOut and return true, and if not, return false with no modification to *specInOut.

◆ parseNextSpecifier()

template<class t_CHAR >
BSLS_KEYWORD_CONSTEXPR_CPP20 bool bdlt::TimeTzFormatter< t_CHAR >::parseNextSpecifier ( StringView specInOut)

If the first character of the specified *specInOut is recognized by this specifier formatter, parse it, remove it from *specInOut, and return true, otherwise return false with no modification to *specInOut.

Precondition
The behavior is undefined if *specInOut is empty.

◆ postprocess()

template<class t_CHAR >
void bdlt::TimeTzFormatter< t_CHAR >::postprocess ( const bslfmt::FormatSpecificationParser< t_CHAR > &  spec)
inline

Read post-processed fields from the specified spec that are relevant to this specifier formatter.

◆ totalWidth()

template<class t_CHAR >
int bdlt::TimeTzFormatter< t_CHAR >::totalWidth ( const FormatCache value) const
inline

Return the anticipated width of output given all the parse* calls that have been happened thus far and the specified value.


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