|
| 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 , typename Spec > |
void | write_double (T value, const Spec &spec) |
|
template<typename StrChar > |
CharPtr | write_str (const StrChar *s, std::size_t size, const AlignSpec &spec) |
|
template<typename StrChar , typename Spec > |
void | write_str (const internal::Arg::StringValue< StrChar > &str, const Spec &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 2607 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 2780 of file format.h.