Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::property_tree::info_parser Namespace Reference

Functions

template<class Ptree , class Ch >
void read_info (std::basic_istream< Ch > &stream, Ptree &pt)
 Read INFO from a the given stream and translate it to a property tree. More...
 
template<class Ptree , class Ch >
void read_info (std::basic_istream< Ch > &stream, Ptree &pt, const Ptree &default_ptree)
 Read INFO from a the given stream and translate it to a property tree. More...
 
template<class Ptree >
void read_info (const std::string &filename, Ptree &pt, const std::locale &loc=std::locale())
 Read INFO from a the given file and translate it to a property tree. More...
 
template<class Ptree >
void read_info (const std::string &filename, Ptree &pt, const Ptree &default_ptree, const std::locale &loc=std::locale())
 Read INFO from a the given file and translate it to a property tree. More...
 
template<class Ptree , class Ch >
void write_info (std::basic_ostream< Ch > &stream, const Ptree &pt, const info_writer_settings< Ch > &settings=info_writer_settings< Ch >())
 Writes a tree to the stream in INFO format. More...
 
template<class Ptree >
void write_info (const std::string &filename, const Ptree &pt, const std::locale &loc=std::locale(), const info_writer_settings< typename Ptree::key_type::value_type > &settings=info_writer_make_settings< typename Ptree::key_type::value_type >())
 Writes a tree to the file in INFO format. More...
 

Function Documentation

template<class Ptree , class Ch >
void boost::property_tree::info_parser::read_info ( std::basic_istream< Ch > &  stream,
Ptree &  pt 
)

Read INFO from a the given stream and translate it to a property tree.

Note
Replaces the existing contents. Strong exception guarantee.
Exceptions
info_parser_errorIf the stream cannot be read, doesn't contain valid INFO, or a conversion fails.

References boost::local().

Referenced by read_info().

template<class Ptree , class Ch >
void boost::property_tree::info_parser::read_info ( std::basic_istream< Ch > &  stream,
Ptree &  pt,
const Ptree &  default_ptree 
)

Read INFO from a the given stream and translate it to a property tree.

Note
Replaces the existing contents. Strong exception guarantee.
Parameters
default_ptreeIf parsing fails, pt is set to a copy of this tree.

References read_info().

template<class Ptree >
void boost::property_tree::info_parser::read_info ( const std::string &  filename,
Ptree &  pt,
const std::locale &  loc = std::locale() 
)

Read INFO from a the given file and translate it to a property tree.

The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ifstream.

Note
Replaces the existing contents. Strong exception guarantee.
Exceptions
info_parser_errorIf the file cannot be read, doesn't contain valid INFO, or a conversion fails.

References BOOST_PROPERTY_TREE_THROW, boost::local(), and boost::expressions::stream.

template<class Ptree >
void boost::property_tree::info_parser::read_info ( const std::string &  filename,
Ptree &  pt,
const Ptree &  default_ptree,
const std::locale &  loc = std::locale() 
)

Read INFO from a the given file and translate it to a property tree.

The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ifstream.

Note
Replaces the existing contents. Strong exception guarantee.
Parameters
default_ptreeIf parsing fails, pt is set to a copy of this tree.

References read_info().

template<class Ptree , class Ch >
void boost::property_tree::info_parser::write_info ( std::basic_ostream< Ch > &  stream,
const Ptree &  pt,
const info_writer_settings< Ch > &  settings = info_writer_settings<Ch>() 
)

Writes a tree to the stream in INFO format.

Exceptions
info_parser_errorIf the stream cannot be written to, or a conversion fails.
Parameters
settingsThe settings to use when writing the INFO data.
template<class Ptree >
void boost::property_tree::info_parser::write_info ( const std::string &  filename,
const Ptree &  pt,
const std::locale &  loc = std::locale(),
const info_writer_settings< typename Ptree::key_type::value_type > &  settings = info_writer_make_settings< typename Ptree::key_type::value_type>() 
)

Writes a tree to the file in INFO format.

The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ofstream.

Exceptions
info_parser_errorIf the file cannot be written to, or a conversion fails.
Parameters
settingsThe settings to use when writing the INFO data.

References BOOST_PROPERTY_TREE_THROW, and boost::expressions::stream.