mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Merged contrib folders from the graphbuilder-api branch, including the recursive search in CMakeLists.txt
This commit is contained in:
16
src/contrib/graphbuilder.cpp
Normal file
16
src/contrib/graphbuilder.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user