yaml-cpp/src/contrib/graphbuilder.cpp

18 lines
443 B
C++
Raw Normal View History

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