rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Emit from nested node id

Functions

void c4::yml::emit_yaml (Tree const &t, id_type id, EmitOptions const &opts, FILE *f)
 (1) emit YAML to the given file, starting at the given node. More...
 
void c4::yml::emit_yaml (Tree const &t, id_type id, FILE *f)
 (2) like (1), but use default emit options More...
 
void c4::yml::emit_json (Tree const &t, id_type id, EmitOptions const &opts, FILE *f)
 (1) emit JSON to the given file, starting at the given node. More...
 
void c4::yml::emit_json (Tree const &t, id_type id, FILE *f)
 (2) like (1), but use default emit options More...
 

Detailed Description

Function Documentation

void c4::yml::emit_yaml ( Tree const &  t,
id_type  id,
EmitOptions const &  opts,
FILE *  f 
)

(1) emit YAML to the given file, starting at the given node.

A null file defaults to stdout.

Definition at line 55 of file emit_file.cpp.

56 {
57  EmitterFile em(opts, f);
58  em.emit_as(EMIT_YAML, &t, id);
59 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_yaml ( Tree const &  t,
id_type  id,
FILE *  f 
)

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

Definition at line 61 of file emit_file.cpp.

62 {
63  EmitterFile em(EmitOptions{}, f);
64  em.emit_as(EMIT_YAML, &t, id);
65 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( Tree const &  t,
id_type  id,
EmitOptions const &  opts,
FILE *  f 
)

(1) emit JSON to the given file, starting at the given node.

A null file defaults to stdout.

Definition at line 67 of file emit_file.cpp.

68 {
69  EmitterFile em(opts, f);
70  em.emit_as(EMIT_JSON, &t, id);
71 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( Tree const &  t,
id_type  id,
FILE *  f 
)

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

Definition at line 73 of file emit_file.cpp.

74 {
75  EmitterFile em(EmitOptions{}, f);
76  em.emit_as(EMIT_JSON, &t, id);
77 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27