Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
fmt::BasicMemoryWriter< Char, Allocator > Class Template Reference

#include <format.h>

Inheritance diagram for fmt::BasicMemoryWriter< Char, Allocator >:
fmt::BasicWriter< Char >

Additional Inherited Members

- Public Member Functions inherited from fmt::BasicWriter< Char >
virtual ~BasicWriter ()
 
const Char * c_str () const
 
const Char * data () const FMT_NOEXCEPT
 
BasicWriteroperator<< (ULongLong value)
 
BasicWriteroperator<< (long double value)
 
BasicWriteroperator<< (char value)
 
BasicWriteroperator<< (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 inherited from fmt::BasicWriter< Char >
 BasicWriter (Buffer< Char > &b)
 

Detailed Description

template<typename Char, typename Allocator = std::allocator<Char>>
class fmt::BasicMemoryWriter< Char, Allocator >

This class template provides operations for formatting and writing data into a character stream. The output is stored in a memory buffer that grows dynamically. You can use one of the following typedefs for common character types and the standard allocator: +------------—+--------------------------------------------------—+ | Type | Definition | +===============+=====================================================+ | MemoryWriter | BasicMemoryWriter<char, std::allocator<char>> | +------------—+--------------------------------------------------—+ | WMemoryWriter | BasicMemoryWriter<wchar_t, std::allocator<wchar_t>> | +------------—+--------------------------------------------------—+ Example**:: MemoryWriter out; out << "The answer is " << 42 << "\n"; out.write("({:+f}, {:+f})", -3.14, 3.14); This will write the following output to the out object: .. code-block:: none The answer is 42 (-3.140000, +3.140000) The output can be converted to an std::string with out.str() or accessed as a C string with out.c_str().