|
bitz-server
2.0.3
|
#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) | |
Friends | |
| template<typename Impl , typename Char_ , typename Spec_ > | |
| class | internal::ArgFormatterBase |
| template<typename Impl , typename Char_ , typename Spec_ > | |
| class | 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> | +------—+-------------------—+
|
inlineexplicitprotected |
Constructs a BasicWriter object.
|
inlinevirtual |
Destroys a BasicWriter object.
|
inline |
Returns a pointer to the output buffer content with terminating null character appended.
|
inline |
Returns a pointer to the output buffer content. No terminating null character is appended.
|
inline |
Formats value and writes it to the stream.
|
inline |
Formats value using the general format for floating-point numbers ('g') and writes it to the stream.
|
inline |
Writes a character to the stream.
|
inline |
Writes value to the stream.
|
inline |
Returns the total number of characters written.
|
inline |
Returns the content of the output buffer as an std::string.
|
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.
1.8.13