rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Emit full tree

Functions

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

Detailed Description

Function Documentation

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

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

A null file defaults to stdout.

Definition at line 27 of file emit_file.cpp.

28 {
29  EmitterFile em(opts, f);
30  em.emit_as(EMIT_YAML, &t);
31 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_yaml ( Tree const &  t,
FILE *  f 
)

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

Definition at line 33 of file emit_file.cpp.

34 {
35  EmitterFile em(EmitOptions{}, f);
36  em.emit_as(EMIT_YAML, &t);
37 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( Tree const &  t,
EmitOptions const &  opts,
FILE *  f = nullptr 
)

(1) emit JSON to the given file.

A null file defaults to stdout.

Definition at line 40 of file emit_file.cpp.

41 {
42  EmitterFile em(opts, f);
43  em.emit_as(EMIT_JSON, &t);
44 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( Tree const &  t,
FILE *  f 
)

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

Definition at line 46 of file emit_file.cpp.

47 {
48  EmitterFile em(EmitOptions{}, f);
49  em.emit_as(EMIT_JSON, &t);
50 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27