|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
A lightweight object containing options to be used when emitting. More...
#include <emit_options.hpp>
Public Member Functions | |
| bool | operator== (const EmitOptions &that) const noexcept |
Nested nodes | |
Control emission of non-root (nested) nodes. | |
| EmitOptions & | emit_nonroot_key (bool enabled) noexcept |
| When emit starts on a node which is not the root node, emit the node key as well. | |
| bool | emit_nonroot_key () const noexcept |
| EmitOptions & | emit_nonroot_dash (bool enabled) noexcept |
| When emit starts on a node which is not the root node, emit a leading dash. | |
| bool | emit_nonroot_dash () const noexcept |
JSON behavior | |
Controls the behavior when emitting JSON. | |
| EmitOptions & | json_err_on_stream (bool enabled) noexcept |
| Whether to trigger an error (or emit as seq) when finding a stream in json mode. | |
| bool | json_err_on_stream () const noexcept |
| EmitOptions & | json_err_on_tag (bool enabled) noexcept |
| Whether to trigger an error (or ignore the tag) when finding a tag in json mode. | |
| bool | json_err_on_tag () const noexcept |
| EmitOptions & | json_err_on_anchor (bool enabled) noexcept |
| Whether to trigger an error (or ignore the anchor) when finding an anchor in json mode. | |
| bool | json_err_on_anchor () const noexcept |
YAML flow customization | |
Control formatting of YAML flow containers. | |
| static constexpr const id_type | max_cols_default = 80 |
| bool | indent_flow_ml () const noexcept |
| Indent the contents of FLOW_ML1 and FLOW_MLN containers. | |
| EmitOptions & | indent_flow_ml (bool enabled) noexcept |
| EmitOptions & | force_flow_spc (bool enabled) noexcept |
| Force everywhere a space after comma in flow mode, overriding the FLOW_SPC status of individual containers. | |
| bool | force_flow_spc () const noexcept |
| EmitOptions & | max_cols (id_type cols) noexcept |
| Set max columns for the emitted YAML in FLOW_MLN mode. | |
| id_type | max_cols () const noexcept |
maximum depth for the emitted tree | |
This prevents stack overflows by making the emitter fail when the tree exceeds the maximum depth. | |
| static constexpr const id_type | max_depth_default = 64 |
| id_type | max_depth () const noexcept |
| EmitOptions & | max_depth (id_type d) noexcept |
A lightweight object containing options to be used when emitting.
Definition at line 14 of file emit_options.hpp.
|
inlinenoexcept |
Indent the contents of FLOW_ML1 and FLOW_MLN containers.
Enabled by default.
Definition at line 54 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 55 of file emit_options.hpp.
|
inlinenoexcept |
Force everywhere a space after comma in flow mode, overriding the FLOW_SPC status of individual containers.
This only applies to FLOW_ML1 or FLOW_MLN containers. Disabled by default.
Definition at line 61 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 62 of file emit_options.hpp.
|
inlinenoexcept |
Set max columns for the emitted YAML in FLOW_MLN mode.
This will make the emitted YAML wrap around when the line reaches max cols, but only in containers with FLOW_MLN mode. Defaults to 80 columns.
Definition at line 68 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 69 of file emit_options.hpp.
|
inlinenoexcept |
When emit starts on a node which is not the root node, emit the node key as well.
This will make the resuling YAML a map with the node as its single element. Enabled by default.
Definition at line 85 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 86 of file emit_options.hpp.
|
inlinenoexcept |
When emit starts on a node which is not the root node, emit a leading dash.
This will make the resulting YAML a seq with the node as its single element. Disabled by default.
Definition at line 91 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 92 of file emit_options.hpp.
|
inlinenoexcept |
Whether to trigger an error (or emit as seq) when finding a stream in json mode.
Disabled by default.
Definition at line 105 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 106 of file emit_options.hpp.
|
inlinenoexcept |
Whether to trigger an error (or ignore the tag) when finding a tag in json mode.
Disabled by default.
Definition at line 110 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 111 of file emit_options.hpp.
|
inlinenoexcept |
Whether to trigger an error (or ignore the anchor) when finding an anchor in json mode.
Disabled by default.
Definition at line 115 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 116 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 128 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 129 of file emit_options.hpp.
|
inlinenoexcept |
Definition at line 135 of file emit_options.hpp.
|
staticconstexpr |
Definition at line 70 of file emit_options.hpp.
|
staticconstexpr |
Definition at line 130 of file emit_options.hpp.