rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
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.
void c4::yml::emit_yaml (Tree const &t, id_type id, FILE *f)
 (2) like (1), but use default emit options
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.
void c4::yml::emit_json (Tree const &t, id_type id, FILE *f)
 (2) like (1), but use default emit options

Detailed Description

Function Documentation

◆ emit_yaml() [1/2]

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:25

◆ emit_yaml() [2/2]

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}
A lightweight object containing options to be used when emitting.

◆ emit_json() [1/2]

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}

◆ emit_json() [2/2]

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}