ROSE  0.11.83.1
Classes | Functions
Rose::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::iostream &)
 
void Parse (Node &root, const std::string &data)
 
void Parse (Node &root, const char *data, const size_t size)
 
void parse (Node &root, const boost::filesystem::path &)
 Parse YAML from file into node. More...
 
void parse (Node &root, std::iostream &)
 Parse YAML from stream into node. More...
 
void parse (Node &root, const std::string &data)
 Parse YAML from data into node.
 
void parse (Node &root, const char *data)
 Parse YAML from data into node.
 
void Serialize (const Node &root, const char *filename, const SerializeConfig &config={2, 64, false, false})
 Serialize YAML. More...
 
void Serialize (const Node &root, std::iostream &stream, const SerializeConfig &config={2, 64, false, false})
 Serialize YAML. More...
 
void Serialize (const Node &root, std::string &string, const SerializeConfig &config={2, 64, false, false})
 Serialize YAML. More...
 

Function Documentation

void Rose::Yaml::parse ( Node root,
const boost::filesystem::path &   
)

Parse YAML from file into node.

void Rose::Yaml::parse ( Node root,
std::iostream &   
)

Parse YAML from stream into node.

void Rose::Yaml::Serialize ( const Node root,
const char *  filename,
const SerializeConfig config = {2, 64, false, false} 
)

Serialize YAML.

Parameters
rootRoot node to serialize.
filenamePath of output file.
streamOutput stream.
stringString of output data.
configSerialization configurations.
Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.
void Rose::Yaml::Serialize ( const Node root,
std::iostream &  stream,
const SerializeConfig config = {2, 64, false, false} 
)

Serialize YAML.

Parameters
rootRoot node to serialize.
filenamePath of output file.
streamOutput stream.
stringString of output data.
configSerialization configurations.
Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.
void Rose::Yaml::Serialize ( const Node root,
std::string &  string,
const SerializeConfig config = {2, 64, false, false} 
)

Serialize YAML.

Parameters
rootRoot node to serialize.
filenamePath of output file.
streamOutput stream.
stringString of output data.
configSerialization configurations.
Exceptions
InternalExceptionAn internal error occurred.
OperationExceptionIf filename or buffer pointer is invalid. If config is invalid.