![]() |
Rosetta
2020.11
|
#include <format.h>
Public Types | |
typedef CharType | Char |
Public Member Functions | |
BasicFormatter (const ArgList &args, BasicWriter< Char > &w) | |
BasicWriter< Char > & | writer () |
void | format (BasicCStringRef< Char > format_str) |
const Char * | format (const Char *&format_str, const internal::Arg &arg) |
Private Member Functions | |
FMT_DISALLOW_COPY_AND_ASSIGN (BasicFormatter) | |
internal::Arg | get_arg (BasicStringRef< Char > arg_name, const char *&error) |
internal::Arg | parse_arg_index (const Char *&s) |
internal::Arg | parse_arg_name (const Char *&s) |
![]() | |
const ArgList & | args () const |
FormatterBase (const ArgList &args) | |
Arg | next_arg (const char *&error) |
Arg | get_arg (unsigned arg_index, const char *&error) |
bool | check_no_auto_index (const char *&error) |
template<typename Char > | |
void | write (BasicWriter< Char > &w, const Char *start, const Char *end) |
Private Attributes | |
BasicWriter< Char > & | writer_ |
internal::ArgMap< Char > | map_ |
This template formats data and writes the output to a writer.
typedef CharType fmt::BasicFormatter< CharType, ArgFormatter >::Char |
The character type for the output.
|
inline |
Constructs a BasicFormatter
object. References to the arguments and the writer are stored in the formatter object so make sure they have appropriate lifetimes.
|
private |
void fmt::BasicFormatter< Char, AF >::format | ( | BasicCStringRef< Char > | format_str | ) |
Formats stored arguments and writes the output to the writer.
References fmt::arg(), fmt::BasicCStringRef< Char >::c_str(), FMT_THROW, fmt::format(), fmt::internal::is_name_start(), basic::options::OptionKeys::in::file::s, and basic::options::OptionKeys::cutoutdomain::start.
Referenced by fmt::format_arg().
const Char * fmt::BasicFormatter< Char, ArgFormatter >::format | ( | const Char *& | format_str, |
const internal::Arg & | arg | ||
) |
References fmt::AlignSpec::align_, fmt::ALIGN_CENTER, fmt::ALIGN_DEFAULT, fmt::ALIGN_LEFT, fmt::ALIGN_NUMERIC, fmt::ALIGN_RIGHT, fmt::internal::check_sign(), fmt::internal::Value::custom, fmt::WidthSpec::fill_, fmt::FormatSpec::flags_, FMT_THROW, fmt::internal::Value::CustomValue::format, fmt::format(), fmt::HASH_FLAG, fmt::internal::Value::int_value, fmt::internal::is_name_start(), fmt::internal::Value::long_long_value, max(), fmt::MINUS_FLAG, basic::options::OptionKeys::score::fiber_diffraction::p, fmt::internal::parse_nonnegative_int(), fmt::PLUS_FLAG, fmt::FormatSpec::precision_, fmt::internal::require_numeric_argument(), basic::options::OptionKeys::in::file::s, fmt::SIGN_FLAG, fmt::internal::Arg::type, fmt::FormatSpec::type_, fmt::internal::Value::uint_value, fmt::internal::Value::ulong_long_value, value, fmt::internal::Value::CustomValue::value, fmt::ArgVisitor< Impl, Result >::visit(), and fmt::WidthSpec::width_.
|
inlineprivate |
References fmt::arg(), and auto-DRRAFTER_setup::args.
|
inlineprivate |
References fmt::arg(), FMT_NULL, FMT_THROW, and fmt::internal::parse_nonnegative_int().
|
inlineprivate |
|
inline |
Returns a reference to the writer associated with this formatter.
Referenced by fmt::format_arg().
|
private |
|
private |