#include <format.h>
Classes | |
struct | int_writer |
struct | padded_int_writer |
struct | pointer_writer |
struct | str_writer |
Public Types | |
using | char_type = typename Range::value_type |
using | iterator = typename Range::iterator |
using | format_specs = basic_format_specs< char_type > |
Public Member Functions | |
basic_writer (Range out, locale_ref loc=locale_ref()) | |
iterator | out () const |
template<typename F > | |
void | write_padded (const format_specs &specs, F &&f) |
void | write (int value) |
void | write (long value) |
void | write (long long value) |
void | write (unsigned value) |
void | write (unsigned long value) |
void | write (unsigned long long value) |
template<typename T , typename Spec > | |
void | write_int (T value, const Spec &spec) |
template<typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) > | |
void | write (T value, format_specs specs={}) |
void | write (char value) |
template<typename Char , FMT_ENABLE_IF(std::is_same< Char, char_type >::value) > | |
void | write (Char value) |
void | write (string_view value) |
void | write (wstring_view value) |
template<typename Char > | |
void | write (const Char *s, std::size_t size, const format_specs &specs) |
template<typename Char > | |
void | write (basic_string_view< Char > s, const format_specs &specs={}) |
template<typename UIntPtr > | |
void | write_pointer (UIntPtr value, const format_specs *specs) |
Private Member Functions | |
auto | reserve (std::size_t n) -> decltype(internal::reserve(out_, n)) |
template<typename F > | |
void | write_int (int num_digits, string_view prefix, format_specs specs, F f) |
template<typename Int > | |
void | write_decimal (Int value) |
Private Attributes | |
iterator | out_ |
locale_ref | locale_ |
using format_specs = basic_format_specs<char_type> |
|
explicit |
iterator out | ( | ) | const |
Definition at line 1626 of file format.h.
Referenced by compiled_format< S, Args >::compiled_format(), and arg_formatter_base< Range >::out().
|
private |
Definition at line 1389 of file format.h.
References internal::reserve().
void write | ( | int | value | ) |
Definition at line 1654 of file format.h.
Referenced by compiled_format< S, Args >::compiled_format(), formatter< internal::bigint >::format(), internal::format_error_code(), format_system_error(), arg_formatter_base< Range, ErrorHandler >::char_spec_handler::on_int(), arg_formatter_base< Range >::operator()(), arg_formatter_base< Range >::write(), and arg_formatter_base< Range >::write_char().
void write | ( | unsigned long long | value | ) |
Definition at line 1660 of file format.h.
References internal::write().
void write | ( | T | value, |
format_specs | specs = {} |
||
) |
Definition at line 1673 of file format.h.
References basic_format_specs< Char >::align, float_specs::binary32, internal::const_check(), buffer< T >::data(), internal::exp, FMT_DEPRECATED_PERCENT, float_specs::format, internal::format_float(), internal::hex, internal::isfinite(), float_specs::locale, sign::minus, internal::none, align::numeric, internal::parse_float_type_spec(), float_specs::percent, basic_format_specs< Char >::precision, float_specs::precision, internal::promote_float(), buffer< T >::push_back(), internal::reserve(), align::right, basic_format_specs< Char >::sign, float_specs::sign, basic_data<>::signs, buffer< T >::size(), internal::snprintf_float(), basic_format_specs< Char >::type, float_specs::upper, float_specs::use_grisu, and basic_format_specs< Char >::width.
void write | ( | char | value | ) |
Definition at line 1726 of file format.h.
References internal::reserve().
void write | ( | Char | value | ) |
Definition at line 1732 of file format.h.
References internal::reserve().
void write | ( | string_view | value | ) |
Definition at line 1737 of file format.h.
References basic_string_view< Char >::begin(), basic_string_view< Char >::end(), internal::reserve(), and basic_string_view< Char >::size().
void write | ( | wstring_view | value | ) |
Definition at line 1741 of file format.h.
References basic_string_view< Char >::begin(), internal::copy(), basic_string_view< Char >::end(), internal::reserve(), and basic_string_view< Char >::size().
void write | ( | const Char * | s, |
std::size_t | size, | ||
const format_specs & | specs | ||
) |
void write | ( | basic_string_view< Char > | s, |
const format_specs & | specs = {} |
||
) |
Definition at line 1753 of file format.h.
References internal::code_point_index(), basic_string_view< Char >::data(), basic_format_specs< Char >::precision, basic_string_view< Char >::size(), internal::to_unsigned(), and internal::write().
|
private |
Definition at line 1435 of file format.h.
References internal::count_digits(), internal::is_negative(), and internal::reserve().
|
private |
Definition at line 1415 of file format.h.
References basic_format_specs< Char >::align, basic_format_specs< Char >::fill, internal::none, align::numeric, basic_format_specs< Char >::precision, align::right, basic_string_view< Char >::size(), internal::to_unsigned(), and basic_format_specs< Char >::width.
Referenced by basic_writer< Range >::int_writer< Int, Specs >::on_bin(), basic_writer< Range >::int_writer< Int, Specs >::on_dec(), basic_writer< Range >::int_writer< Int, Specs >::on_hex(), arg_formatter_base< Range, ErrorHandler >::char_spec_handler::on_int(), basic_writer< Range >::int_writer< Int, Specs >::on_num(), basic_writer< Range >::int_writer< Int, Specs >::on_oct(), and arg_formatter_base< Range >::operator()().
void write_int | ( | T | value, |
const Spec & | spec | ||
) |
Definition at line 1668 of file format.h.
References internal::handle_int_type_spec().
void write_padded | ( | const format_specs & | specs, |
F && | f | ||
) |
Definition at line 1631 of file format.h.
References basic_format_specs< Char >::align, align::center, basic_format_specs< Char >::fill, internal::reserve(), align::right, internal::to_unsigned(), and basic_format_specs< Char >::width.
Referenced by arg_formatter_base< Range >::write_char().
void write_pointer | ( | UIntPtr | value, |
const format_specs * | specs | ||
) |
Definition at line 1762 of file format.h.
References basic_format_specs< Char >::align, internal::count_digits< 4 >(), internal::none, internal::reserve(), align::right, and internal::to_unsigned().
Referenced by arg_formatter_base< Range >::write_pointer().
|
private |
Definition at line 1385 of file format.h.
Referenced by basic_writer< Range >::int_writer< Int, Specs >::on_num().