BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt::FormatterFloating_Base< t_VALUE, t_CHAR > Struct Template Reference

#include <bslfmt_formatterfloating.h>

Detailed Description

template<class t_VALUE, class t_CHAR>
struct bslfmt::FormatterFloating_Base< t_VALUE, t_CHAR >

This class template provides the implementation for all possible floating point formatting styles and the parsing of the format specification. The specified t_VALUE template type argument determines the type of floating point value use, while the specified t_CHAR determines the output's character type.

Precondition
The behavior is undefined unless t_VALUE is one of float or double, and t_CHAR is on of char or wchar_t.

See bslfmt_formatterfloating

Public Member Functions

template<class t_FORMAT_CONTEXT >
t_FORMAT_CONTEXT::iterator format (t_VALUE value, t_FORMAT_CONTEXT &formatContext) const
 
template<class t_PARSE_CONTEXT >
BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator parse (t_PARSE_CONTEXT &parseContext)
 

Member Function Documentation

◆ format()

template<class t_VALUE , class t_CHAR >
template<class t_FORMAT_CONTEXT >
t_FORMAT_CONTEXT::iterator bslfmt::FormatterFloating_Base< t_VALUE, t_CHAR >::format ( t_VALUE  value,
t_FORMAT_CONTEXT &  formatContext 
) const

Create string representation of the specified value, customized in accordance with the requested format and the specified formatContext, and write the result to the output iterator that the formatContext points to.

Precondition
The behavior is undefined unless t_FORMAT_CONTEXT is either std::format_context if that is supported, or otherwise bslfmt::format_context.

◆ parse()

template<class t_VALUE , class t_CHAR >
template<class t_PARSE_CONTEXT >
BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator bslfmt::FormatterFloating_Base< t_VALUE, t_CHAR >::parse ( t_PARSE_CONTEXT &  parseContext)

Parse the specified parseContext, store the resulting parsed specification and return an iterator, pointing to the beginning of the format string.

Precondition
The behavior is undefined unless t_PARSE_CONTEXT is either std::parse_context if that is supported, or otherwise bslfmt::parse_context.

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