GRASP rci-qed
|
#include <cpptoml.h>
Public Member Functions | |
toml_writer (std::ostream &s, const std::string &indent_space="\) | |
template<class T > | |
void | visit (const value< T > &v, bool=false) |
void | visit (const table &t, bool in_array=false) |
void | visit (const array &a, bool=false) |
void | visit (const table_array &t, bool=false) |
Static Public Member Functions | |
static std::string | escape_string (const std::string &str) |
Protected Member Functions | |
void | write (const value< std::string > &v) |
void | write (const value< double > &v) |
template<class T > | |
std::enable_if< is_one_of< T, int64_t, local_date, local_time, local_datetime, offset_datetime >::value >::type | write (const value< T > &v) |
void | write (const value< bool > &v) |
void | write_table_header (bool in_array=false) |
void | write_table_item_header (const base &b) |
Private Member Functions | |
void | indent () |
template<class T > | |
void | write (const T &v) |
void | endline () |
Private Attributes | |
std::ostream & | stream_ |
const std::string | indent_ |
std::vector< std::string > | path_ |
bool | has_naked_endline_ |
Writer that can be passed to accept() functions of cpptoml objects and will output valid TOML to a stream.
|
inline |
Construct a toml_writer that will write to the given stream
|
inlineprivate |
Write an endline out to the stream
|
inlinestatic |
Escape a string for output.
|
inlineprivate |
Indent the proper number of tabs given the size of the path.
|
inline |
Output a base value of the TOML tree.
|
inline |
Output a table element of the TOML tree
|
inline |
Output an array element of the TOML tree
|
inline |
|
inlineprotected |
Write out a string.
|
inlineprotected |
Write out a double.
|
inlineprotected |
Write out an integer, local_date, local_time, local_datetime, or offset_datetime.
|
inlineprotected |
Write out a boolean.
|
inlineprivate |
Write a value out to the stream.
|
inlineprotected |
Write out the header of a table.
|
inlineprotected |
Write out the identifier for an item in a table.
|
private |
|
private |
|
private |
|
private |