mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
17 lines
398 B
C++
17 lines
398 B
C++
#include "yaml-cpp/parser.h"
|
|
#include "yaml-cpp/contrib/graphbuilder.h"
|
|
#include "graphbuilderadapter.h"
|
|
|
|
namespace YAML
|
|
{
|
|
void *BuildGraphOfNextDocument(Parser& parser, GraphBuilderInterface& graphBuilder)
|
|
{
|
|
GraphBuilderAdapter eventHandler(graphBuilder);
|
|
if (parser.HandleNextDocument(eventHandler)) {
|
|
return eventHandler.RootNode();
|
|
} else {
|
|
return NULL;
|
|
}
|
|
}
|
|
}
|