rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Emit from ConstNodeRef

Functions

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

Detailed Description

Function Documentation

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

(1) emit YAML to the given file.

A null file defaults to stdout. Return the number of bytes written.

Definition at line 82 of file emit_file.cpp.

83 {
84  EmitterFile em(opts, f);
85  em.emit_as(EMIT_YAML, r.tree(), r.id());
86 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_yaml ( ConstNodeRef const &  r,
FILE *  f 
)

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

Definition at line 88 of file emit_file.cpp.

89 {
90  EmitterFile em(EmitOptions{}, f);
91  em.emit_as(EMIT_YAML, r.tree(), r.id());
92 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( ConstNodeRef const &  r,
EmitOptions const &  opts,
FILE *  f = nullptr 
)

(1) emit JSON to the given file.

A null file defaults to stdout. Return the number of bytes written.

Definition at line 94 of file emit_file.cpp.

95 {
96  EmitterFile em(opts, f);
97  em.emit_as(EMIT_JSON, r.tree(), r.id());
98 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27
void c4::yml::emit_json ( ConstNodeRef const &  r,
FILE *  f 
)

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

Definition at line 100 of file emit_file.cpp.

101 {
102  EmitterFile em(EmitOptions{}, f);
103  em.emit_as(EMIT_JSON, r.tree(), r.id());
104 }
Emitter< WriterFile > EmitterFile
Definition: emit_file.hpp:27