8#if TOML_ENABLE_FORMATTERS
43 using base = impl::formatter;
46 void print_yaml_string(
const value<std::string>&);
49 void print(
const toml::table&,
bool =
false);
52 void print(
const toml::array&,
bool =
false);
57 static constexpr impl::formatter_constants constants = {
59 format_flags::quote_dates_and_times | format_flags::indentation,
60 format_flags::allow_multi_line_strings,
71 static constexpr format_flags default_flags = constants.mandatory_flags
72 | format_flags::allow_literal_strings
73 | format_flags::allow_unicode_strings
74 | format_flags::allow_octal_integers
75 | format_flags::allow_hexadecimal_integers;
82 explicit yaml_formatter(
const toml::node& source,
format_flags flags = default_flags) noexcept
83 :
base{&source,
nullptr, constants, {
flags,
" "sv}} {}
85#if TOML_DOXYGEN || (TOML_ENABLE_PARSER && !TOML_EXCEPTIONS)
111 explicit yaml_formatter(
const toml::parse_result&
result,
enum TOML_CLOSED_FLAGS_ENUM format_flags
Format flags for modifying how TOML data is printed to streams.
std::basic_ostream< Char > & operator<<(std::basic_ostream< Char > &lhs, node_type rhs)
Pretty-prints the value of a node_type to a stream.
#define TOML_CALLCONV
Calling convention to apply to exported free/static functions. \detail Not defined by default (let th...
#define TOML_EXPORTED_CLASS
An 'export' annotation to add to classes. \detail Not defined by default.
#define TOML_EXPORTED_MEMBER_FUNCTION
An 'export' annotation to add to non-static class member functions. \detail Not defined by default.
#define TOML_NODISCARD_CTOR