summaryrefslogtreecommitdiffstats
path: root/yaml-cpp/src/contrib/graphbuilder.cpp
blob: ab5159cca1d7f159e27867a740bd29f7eea3627f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
    }
  }
}