|
| FMT_DISALLOW_COPY_AND_ASSIGN (BasicWriter) |
|
CharPtr | grow_buffer (std::size_t n) |
|
template<typename UInt > |
Char * | write_unsigned_decimal (UInt value, unsigned prefix_size=0) |
|
template<typename Int > |
void | write_decimal (Int value) |
|
CharPtr | prepare_int_buffer (unsigned num_digits, const EmptySpec &, const char *prefix, unsigned prefix_size) |
|
template<typename Spec > |
CharPtr | prepare_int_buffer (unsigned num_digits, const Spec &spec, const char *prefix, unsigned prefix_size) |
|
template<typename T , typename Spec > |
void | write_int (T value, Spec spec) |
|
template<typename T > |
void | write_double (T value, const FormatSpec &spec) |
|
template<typename StrChar > |
CharPtr | write_str (const StrChar *s, std::size_t size, const AlignSpec &spec) |
|
template<typename StrChar > |
void | write_str (const internal::Arg::StringValue< StrChar > &str, const FormatSpec &spec) |
|
void | operator<< (typename internal::WCharHelper< wchar_t, Char >::Unsupported) |
|
void | operator<< (typename internal::WCharHelper< const wchar_t *, Char >::Unsupported) |
|
void | append_float_length (Char *&format_ptr, long double) |
|
template<typename T > |
void | append_float_length (Char *&, T) |
|
template<typename Char>
class fmt::BasicWriter< Char >
\rst This template provides operations for formatting and writing data into a character stream. The output is stored in a buffer provided by a subclass such as :class:fmt::BasicMemoryWriter
.
You can use one of the following typedefs for common character types:
+------—+-------------------—+ | Type | Definition | +=========+======================+ | Writer | BasicWriter<char> | +------—+-------------------—+ | WWriter | BasicWriter<wchar_t> | +------—+-------------------—+
\endrst
Definition at line 2307 of file format.h.
\rst Writes formatted data.
args* is an argument list representing arbitrary arguments.
Example**::
MemoryWriter out; out.write("Current point:\n"); out.write("({:+f}, {:+f})", -3.14, 3.14);
This will write the following output to the out
object:
.. code-block:: none
Current point: (-3.140000, +3.140000)
The output can be accessed using :func:data()
, :func:c_str
or :func:str
methods.
See also :ref:syntax
. \endrst
Definition at line 2480 of file format.h.