|
BDE 4.39.x Production Release
|
#include <bslfmt_formatparsecontext.h>
A format context for use by formatter::parse() partial specialization. It provides access to iterators for the start and end of the remaining (unparsed) format string, as well as argument counters.
Public Types | |
| typedef bsl::basic_string_view< t_CHAR >::const_iterator | const_iterator |
| typedef const_iterator | iterator |
| typedef t_CHAR | char_type |
Public Member Functions | |
| BSLS_KEYWORD_CONSTEXPR_CPP20 | basic_format_parse_context (bsl::basic_string_view< t_CHAR > fmt) BSLS_KEYWORD_NOEXCEPT |
| BSLS_KEYWORD_CONSTEXPR_CPP20 | basic_format_parse_context (bsl::basic_string_view< t_CHAR > fmt, size_t numArgs) BSLS_KEYWORD_NOEXCEPT |
| BSLS_KEYWORD_CONSTEXPR_CPP20 void | advance_to (const_iterator it) |
| BSLS_KEYWORD_CONSTEXPR_CPP20 size_t | next_arg_id () |
| BSLS_KEYWORD_CONSTEXPR_CPP20 void | check_arg_id (size_t id) |
| BSLS_KEYWORD_CONSTEXPR_CPP20 const_iterator | begin () const BSLS_KEYWORD_NOEXCEPT |
| BSLS_KEYWORD_CONSTEXPR_CPP20 const_iterator | end () const BSLS_KEYWORD_NOEXCEPT |
| typedef t_CHAR bslfmt::basic_format_parse_context< t_CHAR >::char_type |
| typedef bsl::basic_string_view<t_CHAR>::const_iterator bslfmt::basic_format_parse_context< t_CHAR >::const_iterator |
| typedef const_iterator bslfmt::basic_format_parse_context< t_CHAR >::iterator |
|
inlineexplicit |
Create an instance of this type with the specified fmt parse string and number of arguments set to zero. The string is stored by reference, so fmt must outlive this object.
|
inlineexplicit |
Create an instance of this type with the specified fmt parse string and number of arguments set to the specified numArgs. The string is stored by reference, so fmt must outlive this object.
|
inline |
Update the held iterator to the unparsed portion of the format string to be the specified it. Subsequent calls to begin will return this value.
it is a valid iterator to the format string used in construction of this context.
|
inline |
Return an iterator to the start of the unparsed portion of the format string.
|
inline |
Check that the specified id is a valid argument index. If the indexing mode is unset, the indexing mode is set to e_MANUAL. If the indexing mode is e_AUTOMATIC, caused by a previous call to next_arg_id then an exception of type format_error is thrown. If id is not less than the number of arguments then an exception of type format_error is thrown.
|
inline |
Return an iterator to the start of the unparsed portion of the format string.
|
inline |
Return the index of the next-unused argument. If the indexing mode is unset, the indexing mode is set to e_AUTOMATIC. If the indexing mode is e_MANUAL, caused by a previous call to check_arg_id then an exception of type format_error is thrown. If there are no remaining unused arguments then an exception of type format_error is thrown.