Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
basic_format_parse_context< Char, ErrorHandler > Class Template Reference
Inheritance diagram for basic_format_parse_context< Char, ErrorHandler >:
Collaboration diagram for basic_format_parse_context< Char, ErrorHandler >:

Public Types

using char_type = Char
 
using iterator = typename basic_string_view< Char >::iterator
 

Public Member Functions

FMT_CONSTEXPR basic_format_parse_context (basic_string_view< Char > format_str, ErrorHandler eh=ErrorHandler())
 
FMT_CONSTEXPR iterator begin () const FMT_NOEXCEPT
 
FMT_CONSTEXPR iterator end () const FMT_NOEXCEPT
 
FMT_CONSTEXPR void advance_to (iterator it)
 
FMT_CONSTEXPR int next_arg_id ()
 
FMT_CONSTEXPR void check_arg_id (int)
 
FMT_CONSTEXPR void check_arg_id (basic_string_view< Char >)
 
FMT_CONSTEXPR void on_error (std::string message)
 
FMT_CONSTEXPR ErrorHandler error_handler () const
 

Private Attributes

basic_string_view< Char > format_str_
 
int next_arg_id_
 

Additional Inherited Members

- Private Member Functions inherited from internal::error_handler
FMT_CONSTEXPR error_handler (const error_handler &)=default
 
FMT_NORETURN FMT_API void on_error (std::string message)
 

Detailed Description

template<typename Char, typename ErrorHandler = internal::error_handler>
class basic_format_parse_context< Char, ErrorHandler >

\rst Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing.

You can use one of the following type aliases for common character types:

+--------------------—+----------------------------------—+ | Type | Definition | +=======================+=====================================+ | format_parse_context | basic_format_parse_context<char> | +--------------------—+----------------------------------—+ | wformat_parse_context | basic_format_parse_context<wchar_t> | +--------------------—+----------------------------------—+ \endrst

Constructor & Destructor Documentation

◆ basic_format_parse_context()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR basic_format_parse_context< Char, ErrorHandler >::basic_format_parse_context ( basic_string_view< Char >  format_str,
ErrorHandler  eh = ErrorHandler() 
)
inlineexplicit
15314 : ErrorHandler(eh), format_str_(format_str), next_arg_id_(0) {}

Member Function Documentation

◆ begin()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR iterator basic_format_parse_context< Char, ErrorHandler >::begin ( ) const
inline

Returns an iterator to the beginning of the format string range being parsed.

15320 {
15321 return format_str_.begin();
15322 }
Here is the caller graph for this function:

◆ end()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR iterator basic_format_parse_context< Char, ErrorHandler >::end ( ) const
inline

Returns an iterator past the end of the format string range being parsed.

15327{ return format_str_.end(); }
Here is the caller graph for this function:

◆ advance_to()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR void basic_format_parse_context< Char, ErrorHandler >::advance_to ( iterator  it)
inline

Advances the begin iterator to it.

15330 {
15331 format_str_.remove_prefix(internal::to_unsigned(it - begin()));
15332 }
FMT_CONSTEXPR iterator begin() const FMT_NOEXCEPT
Definition duckdb.cpp:15320
Here is the call graph for this function:

◆ next_arg_id()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR int basic_format_parse_context< Char, ErrorHandler >::next_arg_id ( )
inline

Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing.

15338 {
15339 if (next_arg_id_ >= 0) return next_arg_id_++;
15340 on_error("cannot switch from manual to automatic argument indexing");
15341 return 0;
15342 }

◆ check_arg_id() [1/2]

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR void basic_format_parse_context< Char, ErrorHandler >::check_arg_id ( int  )
inline

Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.

15348 {
15349 if (next_arg_id_ > 0)
15350 on_error("cannot switch from automatic to manual argument indexing");
15351 else
15352 next_arg_id_ = -1;
15353 }

◆ check_arg_id() [2/2]

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR void basic_format_parse_context< Char, ErrorHandler >::check_arg_id ( basic_string_view< Char >  )
inline
15355{}

◆ on_error()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR void basic_format_parse_context< Char, ErrorHandler >::on_error ( std::string  message)
inline
15357 {
15358 ErrorHandler::on_error(message);
15359 }

◆ error_handler()

template<typename Char , typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR ErrorHandler basic_format_parse_context< Char, ErrorHandler >::error_handler ( ) const
inline
15361{ return *this; }

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