Public Types | Public Member Functions | Private Attributes | List of all members
basic_parse_context< Char, ErrorHandler > Class Template Reference

#include <core.h>

Inheritance diagram for basic_parse_context< Char, ErrorHandler >:
ErrorHandler

Public Types

typedef Char char_type
 
typedef basic_string_view< Char >::iterator iterator
 

Public Member Functions

FMT_CONSTEXPR basic_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 unsigned next_arg_id ()
 
FMT_CONSTEXPR bool check_arg_id (unsigned)
 
void check_arg_id (basic_string_view< Char >)
 
FMT_CONSTEXPR void on_error (const char *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 ErrorHandler
virtual ~ErrorHandler ()
 
bool warning (const QXmlParseException &)
 
bool error (const QXmlParseException &)
 
bool fatalError (const QXmlParseException &exception)
 
QString errorString ()
 
- Private Member Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 

Detailed Description

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

Definition at line 878 of file core.h.

Member Typedef Documentation

template<typename Char, typename ErrorHandler = internal::error_handler>
typedef Char basic_parse_context< Char, ErrorHandler >::char_type

Definition at line 884 of file core.h.

template<typename Char, typename ErrorHandler = internal::error_handler>
typedef basic_string_view<Char>::iterator basic_parse_context< Char, ErrorHandler >::iterator

Definition at line 885 of file core.h.

Constructor & Destructor Documentation

template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR basic_parse_context< Char, ErrorHandler >::basic_parse_context ( basic_string_view< Char >  format_str,
ErrorHandler  eh = ErrorHandler() 
)
inlineexplicit

Definition at line 887 of file core.h.

889  : ErrorHandler(eh), format_str_(format_str), next_arg_id_(0) {}
basic_string_view< Char > format_str_
Definition: core.h:880

Member Function Documentation

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

Definition at line 901 of file core.h.

901  {
902  format_str_.remove_prefix(internal::to_unsigned(it - begin()));
903  }
basic_string_view< Char > format_str_
Definition: core.h:880
FMT_CONSTEXPR std::make_unsigned< Int >::type to_unsigned(Int value)
Definition: core.h:208
FMT_CONSTEXPR iterator begin() const FMT_NOEXCEPT
Definition: core.h:893
template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR iterator basic_parse_context< Char, ErrorHandler >::begin ( ) const
inline

Definition at line 893 of file core.h.

893  {
894  return format_str_.begin();
895  }
basic_string_view< Char > format_str_
Definition: core.h:880
template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR bool basic_parse_context< Char, ErrorHandler >::check_arg_id ( unsigned  )
inline

Definition at line 908 of file core.h.

908  {
909  if (next_arg_id_ > 0) {
910  on_error("cannot switch from automatic to manual argument indexing");
911  return false;
912  }
913  next_arg_id_ = -1;
914  return true;
915  }
FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:918
template<typename Char, typename ErrorHandler = internal::error_handler>
void basic_parse_context< Char, ErrorHandler >::check_arg_id ( basic_string_view< Char >  )
inline

Definition at line 916 of file core.h.

916 {}
template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR iterator basic_parse_context< Char, ErrorHandler >::end ( void  ) const
inline

Definition at line 898 of file core.h.

898 { return format_str_.end(); }
basic_string_view< Char > format_str_
Definition: core.h:880
template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR ErrorHandler basic_parse_context< Char, ErrorHandler >::error_handler ( ) const
inline

Definition at line 922 of file core.h.

922 { return *this; }
template<typename Char , typename ErrorHandler >
FMT_CONSTEXPR unsigned basic_parse_context< Char, ErrorHandler >::next_arg_id ( )

Definition at line 1118 of file format.h.

1118  {
1119  if (next_arg_id_ >= 0)
1121  on_error("cannot switch from manual to automatic argument indexing");
1122  return 0;
1123 }
FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:918
FMT_CONSTEXPR std::make_unsigned< Int >::type to_unsigned(Int value)
Definition: core.h:208
template<typename Char, typename ErrorHandler = internal::error_handler>
FMT_CONSTEXPR void basic_parse_context< Char, ErrorHandler >::on_error ( const char *  message)
inline

Definition at line 918 of file core.h.

918  {
919  ErrorHandler::on_error(message);
920  }

Member Data Documentation

template<typename Char, typename ErrorHandler = internal::error_handler>
basic_string_view<Char> basic_parse_context< Char, ErrorHandler >::format_str_
private

Definition at line 880 of file core.h.

template<typename Char, typename ErrorHandler = internal::error_handler>
int basic_parse_context< Char, ErrorHandler >::next_arg_id_
private

Definition at line 881 of file core.h.


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