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

#include <bslfmt_formatterstring.h>

Detailed Description

template<class t_CHAR, class t_CHAR_TRAITS = bsl::char_traits<t_CHAR>>
struct bslfmt::FormatterString_Imp< t_CHAR, t_CHAR_TRAITS >

This component-private class provides the implementations for parsing string formatting specifications and for formatting strings according to that specification.

See bslfmt_formatterstring

Public Member Functions

template<class t_PARSE_CONTEXT >
BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator parse (t_PARSE_CONTEXT &parseContext)
 

Protected Member Functions

template<class t_FORMAT_CONTEXT >
t_FORMAT_CONTEXT::iterator formatImpl (const bsl::basic_string_view< t_CHAR, t_CHAR_TRAITS > value, t_FORMAT_CONTEXT &formatContext) const
 

Member Function Documentation

◆ formatImpl()

template<class t_CHAR , class t_CHAR_TRAITS >
template<class t_FORMAT_CONTEXT >
t_FORMAT_CONTEXT::iterator bslfmt::FormatterString_Imp< t_CHAR, t_CHAR_TRAITS >::formatImpl ( const bsl::basic_string_view< t_CHAR, t_CHAR_TRAITS >  value,
t_FORMAT_CONTEXT &  formatContext 
) const
protected

Format the specified value according to the specification stored as a result of a previous call to the parse method, and write the result to the iterator accessed by calling the out() method on the specified formatContext parameter. Return an end iterator of the output range. Throw an exception of type bsl::format_error in the event of failure.

◆ parse()

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

Parse and validate the specification string stored in the specified parseContext. Return an end iterator of the parsed range. Throw an exception of type bsl::format_error in the event of failure.


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