BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt::StreamedFormatter< t_STREAMABLE > Struct Template Reference

#include <bslfmt_streamedformatter.h>

Detailed Description

template<class t_STREAMABLE>
struct bslfmt::StreamedFormatter< t_STREAMABLE >

This class provides the implementations of parse and format for formatters that format a type using its streaming operator.

See bslfmt_streamedformatter

Public Member Functions

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

Member Function Documentation

◆ format()

template<class t_STREAMABLE >
template<class t_FORMAT_CONTEXT >
t_FORMAT_CONTEXT::iterator bslfmt::StreamedFormatter< t_STREAMABLE >::format ( const t_STREAMABLE &  value,
t_FORMAT_CONTEXT &  formatContext 
) const

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_STREAMABLE >
template<class t_PARSE_CONTEXT >
BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator bslfmt::StreamedFormatter< t_STREAMABLE >::parse ( t_PARSE_CONTEXT &  parseContext)

Parse and validate the specification string stored in the iterator accessed via the begin() method of the parseContext passed via the specified parseContext parameter. Where nested parameters are encountered in the specification string then the next_arg_id and check_arg_id are called on fc as specified in the C++ Standard. 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: