|
BDE 4.39.x Production Release
|
#include <bslfmt_mockparsecontext.h>
This class template provides an access to the format specification current parsing state.
Public Types | |
| enum | IndexingMode { e_UNKNOWN , e_MANUAL , e_AUTOMATIC } |
| 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 | MockParseContext (bsl::basic_string_view< t_CHAR > fmt, size_t numArgs=0) 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 |
| BSLS_KEYWORD_CONSTEXPR_CPP20 IndexingMode | indexingMode () const BSLS_KEYWORD_NOEXCEPT |
| typedef t_CHAR bslfmt::MockParseContext< t_CHAR >::char_type |
| typedef bsl::basic_string_view<t_CHAR>::const_iterator bslfmt::MockParseContext< t_CHAR >::const_iterator |
| typedef const_iterator bslfmt::MockParseContext< t_CHAR >::iterator |
| enum bslfmt::MockParseContext::IndexingMode |
|
explicit |
Create an object having the specified fmt as a format specification and the specified numArgs.
| BSLS_KEYWORD_CONSTEXPR_CPP20 void bslfmt::MockParseContext< t_CHAR >::advance_to | ( | const_iterator | it | ) |
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.
| BSLS_KEYWORD_CONSTEXPR_CPP20 MockParseContext< t_CHAR >::const_iterator bslfmt::MockParseContext< t_CHAR >::begin | ( | ) | const |
Return an iterator to the beginning of the format specification.
| BSLS_KEYWORD_CONSTEXPR_CPP20 void bslfmt::MockParseContext< t_CHAR >::check_arg_id | ( | size_t | id | ) |
Check whether the specified id is in range of number of arguments and enter manual indexing mode. Throw bslfmt::format_error if this object has already entered automatic indexing mode.
| BSLS_KEYWORD_CONSTEXPR_CPP20 MockParseContext< t_CHAR >::const_iterator bslfmt::MockParseContext< t_CHAR >::end | ( | ) | const |
Return an iterator to the end of the format specification.
| BSLS_KEYWORD_CONSTEXPR_CPP20 MockParseContext< t_CHAR >::IndexingMode bslfmt::MockParseContext< t_CHAR >::indexingMode | ( | ) | const |
Return the current indexing mode.
| BSLS_KEYWORD_CONSTEXPR_CPP20 size_t bslfmt::MockParseContext< t_CHAR >::next_arg_id | ( | ) |
Enter automatic indexing mode and return the next argument index. Throw bslfmt::format_error if this object has already entered manual indexing mode.