Function yaml_emitter_set_output

Synopsis

#include <include/yaml.h>

void yaml_emitter_set_output(yaml_emitter_t *emitter, yaml_write_handler_t *handler, void *data)

Description

Set a generic output handler.

Parameters:

[ in,out ] emitter - An emitter object.

[ in ] handler - A write handler.

[ in ] data - Any application data for passing to the write handler.

Set a generic output handler.

Mentioned in

Source

Lines 494-504 in src/api.c. Line 1843 in include/yaml.h.

YAML_DECLARE(void)
yaml_emitter_set_output(yaml_emitter_t *emitter,
        yaml_write_handler_t *handler, void *data)
{
    assert(emitter);    /* Non-NULL emitter object expected. */
    assert(!emitter->write_handler);    /* You can set the output only once. */
    assert(handler);    /* Non-NULL handler object expected. */

    emitter->write_handler = handler;
    emitter->write_handler_data = data;
}





Add Discussion as Guest

Log in to DocsForge