ROSE 0.11.145.147
Classes | Functions
Sawyer::Yaml Namespace Reference

Description

YAML parser and unparser.

Classes

class  ConstIterator
 Iterator over constant YAML nodes. More...
 
class  Exception
 Base class for YAML exceptions. More...
 
class  InternalException
 Internal exception. More...
 
class  Iterator
 Iterator over YAML nodes. More...
 
class  Node
 YAML node. More...
 
class  OperationException
 Operation exception. More...
 
class  ParsingException
 Parsing exception. More...
 
struct  SerializeConfig
 Serialization configuration structure, describing output behavior. More...
 

Functions

void Parse (Node &root, const boost::filesystem::path &)
 
void Parse (Node &root, std::istream &)
 
void Parse (Node &root, const std::string &data)
 
void Parse (Node &root, const char *data, const size_t size)
 
Yaml::Node parse (const boost::filesystem::path &)
 Parse YAML from file.
 
Yaml::Node parse (std::istream &)
 Parse YAML from stream.
 
void Serialize (const Node &root, std::ostream &stream, const SerializeConfig &config=SerializeConfig())
 
Yaml::Node parse (const std::string &)
 Parse YAML from string.
 
Yaml::Node parse (const char *)
 Parse YAML from string.
 
void serialize (const Node &root, const char *filename, const SerializeConfig &config=SerializeConfig())
 Serialize YAML.
 
void serialize (const Node &root, std::ostream &stream, const SerializeConfig &config=SerializeConfig())
 Serialize YAML.
 
void serialize (const Node &root, std::string &string, const SerializeConfig &config=SerializeConfig())
 Serialize YAML.
 

Function Documentation

◆ serialize() [1/3]

void Sawyer::Yaml::serialize ( const Node root,
const char *  filename,
const SerializeConfig config = SerializeConfig() 
)

Serialize YAML.

root Root node to serialize. filename Path of output file. stream Output stream. string String of output data. config Serialization configurations.

Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.

◆ serialize() [2/3]

void Sawyer::Yaml::serialize ( const Node root,
std::ostream &  stream,
const SerializeConfig config = SerializeConfig() 
)

Serialize YAML.

root Root node to serialize. filename Path of output file. stream Output stream. string String of output data. config Serialization configurations.

Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.

◆ serialize() [3/3]

void Sawyer::Yaml::serialize ( const Node root,
std::string &  string,
const SerializeConfig config = SerializeConfig() 
)

Serialize YAML.

root Root node to serialize. filename Path of output file. stream Output stream. string String of output data. config Serialization configurations.

Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.