rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Emit from ConstNodeRef

Functions

template<class CharOwningContainer >
substr c4::yml::emitrs_yaml (ConstNodeRef const &n, EmitOptions const &opts, CharOwningContainer *cont, bool append=false)
 (1) emit+resize: YAML to the given std::string/std::vector<char>-like container, resizing it as needed to fit the emitted YAML. More...
 
template<class CharOwningContainer >
substr c4::yml::emitrs_yaml (ConstNodeRef const &n, CharOwningContainer *cont, bool append=false)
 (2) like (1), but use default emit options More...
 
template<class CharOwningContainer >
substr c4::yml::emitrs_json (ConstNodeRef const &n, EmitOptions const &opts, CharOwningContainer *cont, bool append=false)
 (1) emit+resize: JSON to the given std::string/std::vector<char>-like container, resizing it as needed to fit the emitted JSON. More...
 
template<class CharOwningContainer >
substr c4::yml::emitrs_json (ConstNodeRef const &n, CharOwningContainer *cont, bool append=false)
 (2) like (1), but use default emit options More...
 
template<class CharOwningContainer >
CharOwningContainer c4::yml::emitrs_yaml (ConstNodeRef const &n, EmitOptions const &opts={})
 (3) emit+resize: YAML to a newly-created std::string/std::vector<char>-like container. More...
 
template<class CharOwningContainer >
CharOwningContainer c4::yml::emitrs_json (ConstNodeRef const &n, EmitOptions const &opts={})
 (3) emit+resize: JSON to a newly-created std::string/std::vector<char>-like container. More...
 

Detailed Description

Function Documentation

template<class CharOwningContainer >
substr c4::yml::emitrs_yaml ( ConstNodeRef const &  n,
EmitOptions const &  opts,
CharOwningContainer *  cont,
bool  append = false 
)

(1) emit+resize: YAML to the given std::string/std::vector<char>-like container, resizing it as needed to fit the emitted YAML.

Returns
a substr trimmed to the new emitted contents

Definition at line 176 of file emit_container.hpp.

177 {
178  if(!n.readable())
179  return {};
180  return emitrs_yaml(*n.tree(), n.id(), opts, cont, append);
181 }
CharOwningContainer emitrs_yaml(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: YAML to a newly-created std::string/std::vector-like container.
template<class CharOwningContainer >
substr c4::yml::emitrs_yaml ( ConstNodeRef const &  n,
CharOwningContainer *  cont,
bool  append = false 
)

(2) like (1), but use default emit options

Definition at line 184 of file emit_container.hpp.

185 {
186  if(!n.readable())
187  return {};
188  return emitrs_yaml(*n.tree(), n.id(), EmitOptions{}, cont, append);
189 }
CharOwningContainer emitrs_yaml(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: YAML to a newly-created std::string/std::vector-like container.
template<class CharOwningContainer >
substr c4::yml::emitrs_json ( ConstNodeRef const &  n,
EmitOptions const &  opts,
CharOwningContainer *  cont,
bool  append = false 
)

(1) emit+resize: JSON to the given std::string/std::vector<char>-like container, resizing it as needed to fit the emitted JSON.

Returns
a substr trimmed to the new emitted contents

Definition at line 196 of file emit_container.hpp.

197 {
198  if(!n.readable())
199  return {};
200  return emitrs_json(*n.tree(), n.id(), opts, cont, append);
201 }
CharOwningContainer emitrs_json(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: JSON to a newly-created std::string/std::vector-like container.
template<class CharOwningContainer >
substr c4::yml::emitrs_json ( ConstNodeRef const &  n,
CharOwningContainer *  cont,
bool  append = false 
)

(2) like (1), but use default emit options

Definition at line 204 of file emit_container.hpp.

205 {
206  if(!n.readable())
207  return {};
208  return emitrs_json(*n.tree(), n.id(), EmitOptions{}, cont, append);
209 }
CharOwningContainer emitrs_json(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: JSON to a newly-created std::string/std::vector-like container.
template<class CharOwningContainer >
CharOwningContainer c4::yml::emitrs_yaml ( ConstNodeRef const &  n,
EmitOptions const &  opts = {} 
)

(3) emit+resize: YAML to a newly-created std::string/std::vector<char>-like container.

Definition at line 214 of file emit_container.hpp.

214  {})
215 {
216  CharOwningContainer c;
217  if(n.readable())
218  emitrs_yaml(*n.tree(), n.id(), opts, &c);
219  return c;
220 }
CharOwningContainer emitrs_yaml(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: YAML to a newly-created std::string/std::vector-like container.
template<class CharOwningContainer >
CharOwningContainer c4::yml::emitrs_json ( ConstNodeRef const &  n,
EmitOptions const &  opts = {} 
)

(3) emit+resize: JSON to a newly-created std::string/std::vector<char>-like container.

Definition at line 223 of file emit_container.hpp.

223  {})
224 {
225  CharOwningContainer c;
226  if(n.readable())
227  emitrs_json(*n.tree(), n.id(), opts, &c);
228  return c;
229 }
CharOwningContainer emitrs_json(ConstNodeRef const &n, EmitOptions const &opts={})
(3) emit+resize: JSON to a newly-created std::string/std::vector-like container.