Template Class Emitter

Inheritance Relationships

Base Type

  • public Writer

Class Documentation

template<class Writer>
class Emitter : public Writer

Public Functions

substr emit_as(EmitType_e type, Tree const &t, size_t id, bool error_on_excess)

emit!

When writing to a buffer, returns a substr of the emitted YAML. If the given buffer has insufficient space, the returned span will be null and its size will be the needed space. No writes are done after the end of the buffer.

When writing to a file, the returned substr will be null, but its length will be set to the number of bytes written.

substr emit_as(EmitType_e type, Tree const &t, bool error_on_excess = true)

emit starting at the root node

substr emit_as(EmitType_e type, ConstNodeRef const &n, bool error_on_excess = true)

emit the given node