Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
Public Member Functions | Static Public Member Functions | List of all members
graphar::Yaml Class Reference

#include <yaml.h>

Public Member Functions

 Yaml (std::shared_ptr<::Yaml::Node > root_node)
 
const ::Yaml::Node operator[] (const std::string &key) const
 

Static Public Member Functions

static Result< std::shared_ptr< Yaml > > Load (const std::string &input)
 
static Result< std::shared_ptr< Yaml > > Load (std::iostream &input)
 
static Result< std::shared_ptr< Yaml > > LoadFile (const std::string &file_name)
 

Detailed Description

A wrapper of ::Yaml::Node to provide functions to parse yaml.

Definition at line 36 of file yaml.h.

Member Function Documentation

◆ Load() [1/2]

Result< std::shared_ptr< Yaml > > graphar::Yaml::Load ( const std::string &  input)
static

Loads the input string as Yaml instance.

Return Status::YamlError if input string can not be loaded(malformed).

Definition at line 34 of file yaml.cc.

◆ Load() [2/2]

Result< std::shared_ptr< Yaml > > graphar::Yaml::Load ( std::iostream &  input)
static

Loads the input stream as Yaml instance.

Return Status::YamlError if input string can not be loaded(malformed).

Definition at line 42 of file yaml.cc.

◆ LoadFile()

Result< std::shared_ptr< Yaml > > graphar::Yaml::LoadFile ( const std::string &  file_name)
static

Loads the input file as a single Yaml instance.

Return Status::YamlError if the file can not be loaded(malformed).

Definition at line 50 of file yaml.cc.


The documentation for this class was generated from the following files: