Function Load

Summary

#include <include/yaml-cpp/node/parse.h>

(1) Node Load(const std::string &input)

(2) Node Load(const char *input)

(3) Node Load(std::istream &input)

Function overload

Synopsis

#include <include/yaml-cpp/node/parse.h>

Node Load(const std::string &input)

Description

Loads the input string as a single YAML document.

Exceptions

{ -

Mentioned in

Source

Lines 12-15 in src/parse.cpp. Line 24 in include/yaml-cpp/node/parse.h.

Node Load(const std::string& input) {
  std::stringstream stream(input);
  return Load(stream);
}

Synopsis

#include <include/yaml-cpp/node/parse.h>

Node Load(const char *input)

Description

Loads the input string as a single YAML document.

Exceptions

{ -

Mentioned in

Source

Lines 17-20 in src/parse.cpp. Line 31 in include/yaml-cpp/node/parse.h.

Node Load(const char* input) {
  std::stringstream stream(input);
  return Load(stream);
}

Synopsis

#include <include/yaml-cpp/node/parse.h>

Node Load(std::istream &input)

Description

Loads the input stream as a single YAML document.

Exceptions

{ -

Mentioned in

Source

Lines 22-30 in src/parse.cpp. Line 38 in include/yaml-cpp/node/parse.h.

Node Load(std::istream& input) {
  Parser parser(input);
  NodeBuilder builder;
  if (!parser.HandleNextDocument(builder)) {
    return Node();
  }

  return builder.Root();
}





Add Discussion as Guest

Log in