yaml-cpp/src/contrib/graphbuilder.cpp

16 lines
411 B
C++
Raw Normal View History

#include "yaml-cpp/parser.h"
#include "yaml-cpp/contrib/graphbuilder.h"
#include "graphbuilderadapter.h"
2014-03-22 21:49:16 +04:00
namespace YAML {
void* BuildGraphOfNextDocument(Parser& parser,
GraphBuilderInterface& graphBuilder) {
GraphBuilderAdapter eventHandler(graphBuilder);
if (parser.HandleNextDocument(eventHandler)) {
return eventHandler.RootNode();
} else {
return NULL;
}
2011-03-10 03:23:15 +03:00
}
2014-03-22 21:49:16 +04:00
}