1 #ifndef C4_YML_EMIT_OSTREAM_HPP_
2 #define C4_YML_EMIT_OSTREAM_HPP_
6 #ifndef C4_YML_NODE_HPP_
9 #ifndef C4_YML_EMITTER_HPP_
12 #ifndef C4_YML_EMITTER_DEF_HPP_
15 #ifndef C4_YML_WRITER_OSTREAM_HPP_
29 template<
class OStream>
77 template<
class OStream>
88 template<
class OStream>
98 template<
class OStream>
112 template<
class OStream>
A YAML/JSON emitter, templated on a writer class such as WriterBuf, WriterFile, or WriterOStream...
bool empty() const
Query for zero size.
id_type id() const noexcept
id_type root_id_maybe() const
Get the id of the root node, or NONE if the tree is empty.
as_yaml(Tree const &t, id_type id, EmitOptions const &opts={}) noexcept
id_type root_id() const
Get the id of the root node. The tree must not be empty. The tree can be empty only when constructed ...
RYML_ID_TYPE id_type
The type of a node id in the YAML tree; to override the default type, define the macro RYML_ID_TYPE t...
void emit_as(EmitType_e type, Tree const *tree, id_type id=NONE)
emit!
as_json(ConstNodeRef const &n, EmitOptions const &opts={}) noexcept
as_yaml(Tree const &t, EmitOptions const &opts={}) noexcept
Holds a pointer to an existing tree, and a node id.
Tree const * tree() const noexcept
A lightweight object containing options to be used when emitting.
as_yaml(ConstNodeRef const &n, EmitOptions const &opts={}) noexcept
OStream & operator<<(OStream &stream, Tree const &tree)
emit YAML to an STL-like ostream
tag type to mark a tree or node to be emitted as yaml when using operator<< .
as_json(Tree const &t, id_type id, EmitOptions const &opts={}) noexcept
as_json(Tree const &t, EmitOptions const &opts={}) noexcept
tag type to mark a tree or node to be emitted as yaml when using operator<<, with options...