Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | List of all members
internal::context_base< OutputIt, Context, Char > Class Template Reference

#include <core.h>

Public Types

typedef OutputIt iterator
 

Public Member Functions

basic_parse_context< char_type > & parse_context ()
 
basic_format_args< Context > args () const
 
basic_format_arg< Context > arg (unsigned id) const
 
internal::error_handler error_handler ()
 
void on_error (const char *message)
 
iterator out ()
 
iterator begin ()
 
void advance_to (iterator it)
 
locale_ref locale ()
 

Protected Types

typedef Char char_type
 
typedef basic_format_arg< Context > format_arg
 

Protected Member Functions

 context_base (OutputIt out, basic_string_view< char_type > format_str, basic_format_args< Context > ctx_args, locale_ref loc=locale_ref())
 
format_arg do_get_arg (unsigned arg_id)
 
format_arg get_arg (unsigned arg_id)
 

Private Attributes

basic_parse_context< Char > parse_context_
 
iterator out_
 
basic_format_args< Context > args_
 
locale_ref loc_
 

Detailed Description

template<typename OutputIt, typename Context, typename Char>
class internal::context_base< OutputIt, Context, Char >

Definition at line 988 of file core.h.

Member Typedef Documentation

template<typename OutputIt, typename Context, typename Char>
typedef Char internal::context_base< OutputIt, Context, Char >::char_type
protected

Definition at line 999 of file core.h.

template<typename OutputIt, typename Context, typename Char>
typedef basic_format_arg<Context> internal::context_base< OutputIt, Context, Char >::format_arg
protected

Definition at line 1000 of file core.h.

template<typename OutputIt, typename Context, typename Char>
typedef OutputIt internal::context_base< OutputIt, Context, Char >::iterator

Definition at line 990 of file core.h.

Constructor & Destructor Documentation

template<typename OutputIt, typename Context, typename Char>
internal::context_base< OutputIt, Context, Char >::context_base ( OutputIt  out,
basic_string_view< char_type format_str,
basic_format_args< Context >  ctx_args,
locale_ref  loc = locale_ref() 
)
inlineprotected

Definition at line 1002 of file core.h.

1005  : parse_context_(format_str), out_(out), args_(ctx_args), loc_(loc) {}
basic_format_args< Context > args_
Definition: core.h:995
basic_parse_context< Char > parse_context_
Definition: core.h:993
iterator out()
Definition: core.h:1034
locale_ref loc_
Definition: core.h:996

Member Function Documentation

template<typename OutputIt, typename Context, typename Char>
void internal::context_base< OutputIt, Context, Char >::advance_to ( iterator  it)
inline

Definition at line 1038 of file core.h.

1038 { out_ = it; }
template<typename OutputIt, typename Context, typename Char>
basic_format_arg<Context> internal::context_base< OutputIt, Context, Char >::arg ( unsigned  id) const
inline

Definition at line 1025 of file core.h.

1025 { return args_.get(id); }
basic_format_args< Context > args_
Definition: core.h:995
template<typename OutputIt, typename Context, typename Char>
basic_format_args<Context> internal::context_base< OutputIt, Context, Char >::args ( ) const
inline

Definition at line 1024 of file core.h.

1024 { return args_; } // DEPRECATED!
basic_format_args< Context > args_
Definition: core.h:995
template<typename OutputIt, typename Context, typename Char>
iterator internal::context_base< OutputIt, Context, Char >::begin ( )
inline

Definition at line 1035 of file core.h.

1035 { return out_; } // deprecated
template<typename OutputIt, typename Context, typename Char>
format_arg internal::context_base< OutputIt, Context, Char >::do_get_arg ( unsigned  arg_id)
inlineprotected

Definition at line 1008 of file core.h.

1008  {
1009  format_arg arg = args_.get(arg_id);
1010  if (!arg)
1011  parse_context_.on_error("argument index out of range");
1012  return arg;
1013  }
basic_format_args< Context > args_
Definition: core.h:995
basic_format_arg< Context > format_arg
Definition: core.h:1000
FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:918
basic_parse_context< Char > parse_context_
Definition: core.h:993
basic_format_arg< Context > arg(unsigned id) const
Definition: core.h:1025
template<typename OutputIt, typename Context, typename Char>
internal::error_handler internal::context_base< OutputIt, Context, Char >::error_handler ( )
inline

Definition at line 1027 of file core.h.

1027  {
1028  return parse_context_.error_handler();
1029  }
basic_parse_context< Char > parse_context_
Definition: core.h:993
FMT_CONSTEXPR ErrorHandler error_handler() const
Definition: core.h:922
template<typename OutputIt, typename Context, typename Char>
format_arg internal::context_base< OutputIt, Context, Char >::get_arg ( unsigned  arg_id)
inlineprotected

Definition at line 1017 of file core.h.

1017  {
1018  return this->parse_context().check_arg_id(arg_id) ?
1019  this->do_get_arg(arg_id) : format_arg();
1020  }
format_arg do_get_arg(unsigned arg_id)
Definition: core.h:1008
basic_format_arg< Context > format_arg
Definition: core.h:1000
basic_parse_context< char_type > & parse_context()
Definition: core.h:1023
template<typename OutputIt, typename Context, typename Char>
locale_ref internal::context_base< OutputIt, Context, Char >::locale ( )
inline

Definition at line 1040 of file core.h.

1040 { return loc_; }
locale_ref loc_
Definition: core.h:996
template<typename OutputIt, typename Context, typename Char>
void internal::context_base< OutputIt, Context, Char >::on_error ( const char *  message)
inline

Definition at line 1031 of file core.h.

FMT_CONSTEXPR void on_error(const char *message)
Definition: core.h:918
basic_parse_context< Char > parse_context_
Definition: core.h:993
template<typename OutputIt, typename Context, typename Char>
iterator internal::context_base< OutputIt, Context, Char >::out ( )
inline

Definition at line 1034 of file core.h.

1034 { return out_; }
template<typename OutputIt, typename Context, typename Char>
basic_parse_context<char_type>& internal::context_base< OutputIt, Context, Char >::parse_context ( )
inline

Definition at line 1023 of file core.h.

1023 { return parse_context_; }
basic_parse_context< Char > parse_context_
Definition: core.h:993

Member Data Documentation

template<typename OutputIt, typename Context, typename Char>
basic_format_args<Context> internal::context_base< OutputIt, Context, Char >::args_
private

Definition at line 995 of file core.h.

template<typename OutputIt, typename Context, typename Char>
locale_ref internal::context_base< OutputIt, Context, Char >::loc_
private

Definition at line 996 of file core.h.

template<typename OutputIt, typename Context, typename Char>
iterator internal::context_base< OutputIt, Context, Char >::out_
private

Definition at line 994 of file core.h.

template<typename OutputIt, typename Context, typename Char>
basic_parse_context<Char> internal::context_base< OutputIt, Context, Char >::parse_context_
private

Definition at line 993 of file core.h.


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