Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
arg_formatter< Range > Class Template Reference

#include <format.h>

Inheritance diagram for arg_formatter< Range >:
internal::function< internal::arg_formatter_base< Range >::iterator > internal::arg_formatter_base< Range >

Public Types

typedef Range range
 
typedef base::iterator iterator
 
typedef base::format_specs format_specs
 
- Public Types inherited from internal::arg_formatter_base< Range >
typedef Range::value_type char_type
 
typedef basic_format_specs< char_typeformat_specs
 

Public Member Functions

 arg_formatter (context_type &ctx, format_specs *spec=FMT_NULL)
 
 arg_formatter (context_type &ctx, format_specs &spec)
 
iterator operator() (typename basic_format_arg< context_type >::handle handle)
 
- Public Member Functions inherited from internal::arg_formatter_base< Range >
 arg_formatter_base (Range r, format_specs *s, locale_ref loc)
 
iterator operator() (monostate)
 
template<typename T >
std::enable_if< std::is_integral< T >::value||std::is_same< T, char_type >::value, iterator >::type operator() (T value)
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value, iterator >::type operator() (T value)
 
iterator operator() (const char_type *value)
 
iterator operator() (basic_string_view< char_type > value)
 
iterator operator() (const void *value)
 

Private Types

typedef Range::value_type char_type
 
typedef internal::arg_formatter_base< Rangebase
 
typedef basic_format_context< typename base::iterator, char_typecontext_type
 

Private Attributes

context_typectx_
 

Additional Inherited Members

- Public Attributes inherited from internal::arg_formatter_base< Range >
decltype(internal::declval< Range >().begin()) typedef iterator
 
- Protected Member Functions inherited from internal::arg_formatter_base< Range >
writer_typewriter ()
 
format_specsspec ()
 
iterator out ()
 
void write (bool value)
 
void write (const char_type *value)
 

Detailed Description

template<typename Range>
class arg_formatter< Range >

The default argument formatter.

Definition at line 2155 of file format.h.

Member Typedef Documentation

template<typename Range >
typedef internal::arg_formatter_base<Range> arg_formatter< Range >::base
private

Definition at line 2161 of file format.h.

template<typename Range >
typedef Range::value_type arg_formatter< Range >::char_type
private

Definition at line 2160 of file format.h.

template<typename Range >
typedef basic_format_context<typename base::iterator, char_type> arg_formatter< Range >::context_type
private

Definition at line 2162 of file format.h.

template<typename Range >
typedef base::format_specs arg_formatter< Range >::format_specs

Definition at line 2169 of file format.h.

template<typename Range >
typedef base::iterator arg_formatter< Range >::iterator

Definition at line 2168 of file format.h.

template<typename Range >
typedef Range arg_formatter< Range >::range

Definition at line 2167 of file format.h.

Constructor & Destructor Documentation

template<typename Range >
arg_formatter< Range >::arg_formatter ( context_type ctx,
format_specs spec = FMT_NULL 
)
inlineexplicit

Constructs an argument formatter object. ctx* is a reference to the formatting context, spec* contains format specifier information for standard argument types.

Definition at line 2178 of file format.h.

2179  : base(Range(ctx.out()), spec, ctx.locale()), ctx_(ctx) {}
context_type & ctx_
Definition: format.h:2164
internal::arg_formatter_base< Range > base
Definition: format.h:2161
template<typename Range >
arg_formatter< Range >::arg_formatter ( context_type ctx,
format_specs spec 
)
inline

Definition at line 2182 of file format.h.

2183  : base(Range(ctx.out()), &spec), ctx_(ctx) {}
context_type & ctx_
Definition: format.h:2164
internal::arg_formatter_base< Range > base
Definition: format.h:2161

Member Function Documentation

template<typename Range >
iterator arg_formatter< Range >::operator() ( typename basic_format_arg< context_type >::handle  handle)
inline

Formats an argument of a user-defined type.

Definition at line 2188 of file format.h.

2188  {
2189  handle.format(ctx_);
2190  return this->out();
2191  }
context_type & ctx_
Definition: format.h:2164

Member Data Documentation

template<typename Range >
context_type& arg_formatter< Range >::ctx_
private

Definition at line 2164 of file format.h.


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