Flow123d
last_with_con_2.0.0-4-g42e6930
|
#include <format.h>
Public Member Functions | |
virtual | ~BasicWriter () |
std::size_t | size () const |
const Char * | data () const FMT_NOEXCEPT |
const Char * | c_str () const |
std::basic_string< Char > | str () const |
void | write (BasicCStringRef< Char > format, ArgList args) |
BasicWriter & | operator<< (int value) |
BasicWriter & | operator<< (unsigned value) |
BasicWriter & | operator<< (long value) |
BasicWriter & | operator<< (unsigned long value) |
BasicWriter & | operator<< (LongLong value) |
BasicWriter & | operator<< (ULongLong value) |
BasicWriter & | operator<< (double value) |
BasicWriter & | operator<< (long double value) |
BasicWriter & | operator<< (char value) |
BasicWriter & | operator<< (typename internal::WCharHelper< wchar_t, Char >::Supported value) |
BasicWriter & | operator<< (fmt::BasicStringRef< Char > value) |
BasicWriter & | operator<< (typename internal::WCharHelper< StringRef, Char >::Supported value) |
template<typename T , typename Spec , typename FillChar > | |
BasicWriter & | operator<< (IntFormatSpec< T, Spec, FillChar > spec) |
template<typename StrChar > | |
BasicWriter & | operator<< (const StrFormatSpec< StrChar > &spec) |
void | clear () FMT_NOEXCEPT |
Buffer< Char > & | buffer () FMT_NOEXCEPT |
Protected Member Functions | |
BasicWriter (Buffer< Char > &b) | |
Private Types | |
typedef internal::CharTraits< Char >::CharPtr | CharPtr |
Private Member Functions | |
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) |
Static Private Member Functions | |
static Char * | get (Char *p) |
static CharPtr | fill_padding (CharPtr buffer, unsigned total_size, std::size_t content_size, wchar_t fill) |
Private Attributes | |
Buffer< Char > & | buffer_ |
Friends | |
template<typename Impl , typename Char_ > | |
class | internal::ArgFormatterBase |
template<typename Impl , typename Char_ > | |
class | internal::BasicPrintfArgFormatter |
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> | +------—+-------------------—+
|
private |
|
inlineexplicitprotected |
Constructs a BasicWriter
object.
|
inlinevirtual |
Destroys a BasicWriter
object.
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticprivate |
|
private |
|
inlinestaticprivate |
|
inlineprivate |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
private |
|
inline |
|
inline |
|
inline |
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
.
Definition at line 2480 of file format.h.
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
inlineprivate |
|
friend |
|
friend |
|
private |