Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
basic_format_context< OutputIt, Char > Class Template Reference

#include <core.h>

Inheritance diagram for basic_format_context< OutputIt, Char >:
internal::context_base< OutputIt, basic_format_context< OutputIt, Char >, Char >

Classes

struct  formatter_type
 

Public Types

typedef Char char_type
 
typedef OutputIt iterator
 
- Public Types inherited from internal::context_base< OutputIt, basic_format_context< OutputIt, Char >, Char >
typedef OutputIt iterator
 

Public Member Functions

 basic_format_context (OutputIt out, basic_string_view< char_type > format_str, basic_format_args< basic_format_context > ctx_args, internal::locale_ref loc=internal::locale_ref())
 
format_arg next_arg ()
 
format_arg get_arg (unsigned arg_id)
 
format_arg get_arg (basic_string_view< char_type > name)
 
- Public Member Functions inherited from internal::context_base< OutputIt, basic_format_context< OutputIt, Char >, Char >
basic_parse_context< char_type > & parse_context ()
 
basic_format_args< basic_format_context< OutputIt, Char > > args () const
 
basic_format_arg< basic_format_context< OutputIt, Char > > 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 ()
 

Private Types

typedef internal::context_base< OutputIt, basic_format_context, Char > base
 
typedef base::format_arg format_arg
 

Private Member Functions

 basic_format_context (const basic_format_context &)=delete
 
void operator= (const basic_format_context &)=delete
 

Private Attributes

internal::arg_map< basic_format_contextmap_
 

Additional Inherited Members

- Protected Types inherited from internal::context_base< OutputIt, basic_format_context< OutputIt, Char >, Char >
typedef Char char_type
 
typedef basic_format_arg< basic_format_context< OutputIt, Char > > format_arg
 
- Protected Member Functions inherited from internal::context_base< OutputIt, basic_format_context< OutputIt, Char >, Char >
 context_base (OutputIt out, basic_string_view< char_type > format_str, basic_format_args< basic_format_context< OutputIt, Char > > ctx_args, locale_ref loc=locale_ref())
 
format_arg do_get_arg (unsigned arg_id)
 
format_arg get_arg (unsigned arg_id)
 

Detailed Description

template<typename OutputIt, typename Char>
class basic_format_context< OutputIt, Char >

Definition at line 1081 of file core.h.

Member Typedef Documentation

template<typename OutputIt, typename Char >
typedef internal::context_base<OutputIt, basic_format_context, Char> basic_format_context< OutputIt, Char >::base
private

Definition at line 1098 of file core.h.

template<typename OutputIt, typename Char >
typedef Char basic_format_context< OutputIt, Char >::char_type

The character type for the output.

Definition at line 1086 of file core.h.

template<typename OutputIt, typename Char >
typedef base::format_arg basic_format_context< OutputIt, Char >::format_arg
private

Definition at line 1099 of file core.h.

template<typename OutputIt, 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 Char >
basic_format_context< OutputIt, Char >::basic_format_context ( const basic_format_context< OutputIt, Char > &  )
privatedelete
template<typename OutputIt, typename Char >
basic_format_context< OutputIt, Char >::basic_format_context ( OutputIt  out,
basic_string_view< char_type format_str,
basic_format_args< basic_format_context< OutputIt, Char > >  ctx_args,
internal::locale_ref  loc = internal::locale_ref() 
)
inline

Constructs a basic_format_context object. References to the arguments are stored in the object so make sure they have appropriate lifetimes.

Definition at line 1109 of file core.h.

1112  : base(out, format_str, ctx_args, loc) {}
internal::context_base< OutputIt, basic_format_context, Char > base
Definition: core.h:1098

Member Function Documentation

template<typename OutputIt, typename Char >
format_arg basic_format_context< OutputIt, Char >::get_arg ( unsigned  arg_id)
inline

Definition at line 1117 of file core.h.

1117 { return this->do_get_arg(arg_id); }
template<typename Range , typename Char >
basic_format_context< Range, Char >::format_arg basic_format_context< Range, Char >::get_arg ( basic_string_view< char_type name)

Definition at line 3058 of file format.h.

3059  {
3060  map_.init(this->args());
3061  format_arg arg = map_.find(name);
3062  if (arg.type() == internal::none_type)
3063  this->on_error("argument not found");
3064  return arg;
3065 }
basic_format_args< basic_format_context< OutputIt, Char > > args() const
Definition: core.h:1024
base::format_arg format_arg
Definition: core.h:1099
basic_format_arg< basic_format_context< OutputIt, Char > > arg(unsigned id) const
Definition: core.h:1025
void init(const basic_format_args< Context > &args)
Definition: format.h:1273
internal::arg_map< basic_format_context > map_
Definition: core.h:1093
basic_format_arg< Context > find(basic_string_view< char_type > name) const
Definition: core.h:961
template<typename OutputIt, typename Char >
format_arg basic_format_context< OutputIt, Char >::next_arg ( )
inline

Definition at line 1114 of file core.h.

1114  {
1115  return this->do_get_arg(this->parse_context().next_arg_id());
1116  }
template<typename OutputIt, typename Char >
void basic_format_context< OutputIt, Char >::operator= ( const basic_format_context< OutputIt, Char > &  )
privatedelete

Member Data Documentation

template<typename OutputIt, typename Char >
internal::arg_map<basic_format_context> basic_format_context< OutputIt, Char >::map_
private

Definition at line 1093 of file core.h.


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