Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is an old version of boost. Click here for the latest version's documentation home page.
PrevUpHomeNext

Function template write_ini

boost::property_tree::ini_parser::write_ini

Synopsis

// In header: <boost/property_tree/ini_parser.hpp>


template<typename Ptree> 
  void write_ini(std::basic_ostream< typename Ptree::key_type::value_type > & stream, 
                 const Ptree & pt, int flags = 0);

Description

Translates the property tree to INI and writes it the given output stream.

Parameters:

flags

The flags to use when writing the INI file. No flags are currently supported.

pt

The property tree to tranlsate to INI and output.

stream

The stream to which to write the INI representation of the property tree.

Requires:

pt cannot have data in its root.

<simplesectsep></simplesectsep>

pt cannot have keys both data and children.

<simplesectsep></simplesectsep>

pt cannot be deeper than two levels.

<simplesectsep></simplesectsep>

There cannot be duplicate keys on any given level of pt.

Throws:

ini_parser_error

PrevUpHomeNext