![]() |
Trading System API
3.0
Library for Simulating and Deploying Trading and Investment Strategies
|
#include <format.h>
Public Member Functions | |
virtual | ~BasicWriter () |
const Char * | c_str () const |
const Char * | data () const FMT_NOEXCEPT |
BasicWriter & | operator<< (ULongLong value) |
BasicWriter & | operator<< (long double value) |
BasicWriter & | operator<< (char value) |
BasicWriter & | operator<< (fmt::BasicStringRef< Char > value) |
std::size_t | size () const |
std::basic_string< Char > | str () const |
void | write (BasicCStringRef< Char > format, ArgList args) |
Protected Member Functions | |
BasicWriter (Buffer< Char > &b) | |
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
.