Example #1
0
void InspectSeqNode::RenderToYaml(yaml::Emitter &emitter)
{
    emitter.StartSeq();
    for (InspectNodePtr field : fields) {
        if (field.get() == NULL) {
            emitter.Value("NULL");
        }
        else {
            field->RenderToYaml(emitter);
        }
    }
    emitter.EndSeq();
}
Example #2
0
/**
 * Render this node to a YAML emitter.
 * @param emitter The emitter.
 */
void InspectMapNode::RenderToYaml(yaml::Emitter &emitter)
{
    emitter.StartMap();
    for (fields_t::value_type &ent : fields) {
        emitter.MapKey(ent.first);
        if (ent.second.get() == NULL) {
            emitter.Value("NULL");
        }
        else {
            ent.second->RenderToYaml(emitter);
        }
    }
    emitter.EndMap();
}
Example #3
0
void InspectScalarNode::RenderToYaml(yaml::Emitter &emitter)
{
    emitter.Value(value);
}