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

Detailed Description

Function Documentation

◆ emit_yaml() [1/2]

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

◆ emit_yaml() [2/2]

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

◆ emit_json() [1/2]

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}

◆ emit_json() [2/2]

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}