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_
29template<
class OStream>
77template<
class OStream>
81 em.emit_as(EMIT_YAML, &tree);
88template<
class OStream>
92 em.emit_as(EMIT_YAML, node.
tree(), node.
id());
98template<
class OStream>
112template<
class OStream>
Holds a pointer to an existing tree, and a node id.
id_type id() const noexcept
Tree const * tree() const noexcept
A YAML/JSON emitter, templated on a writer class such as WriterBuf, WriterFile, or WriterOStream.
void emit_as(EmitType_e type, Tree const *tree, id_type id=NONE)
emit!
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 ...
bool empty() const
Query for zero size.
OStream & operator<<(OStream &stream, Tree const &tree)
emit YAML to an STL-like ostream
Emitter< WriterOStream< OStream > > EmitterOStream
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...
(Undefined by default) Use shorter error message from checks/asserts: do not show the check condition...
A lightweight object containing options to be used when emitting.
tag type to mark a tree or node to be emitted as yaml when using operator<<, with options.
as_json(Tree const &t, id_type id, EmitOptions const &opts={}) noexcept
as_json(ConstNodeRef const &n, 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<< .
as_yaml(ConstNodeRef const &n, EmitOptions const &opts={}) noexcept
as_yaml(Tree const &t, EmitOptions const &opts={}) noexcept
as_yaml(Tree const &t, id_type id, EmitOptions const &opts={}) noexcept