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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template save

boost::property_tree::save

Synopsis

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


template<typename Archive, typename K, typename D, typename C> 
  void save(Archive & ar, const basic_ptree< K, D, C > & t, 
            const unsigned int file_version);

Description

Serialize the property tree to the given archive.

[Note] Note

In addition to serializing to regular archives, this supports serializing to archives requiring name-value pairs, e.g. XML archives. However, the output format in the XML archive is not guaranteed to be the same as that when using the Boost.PropertyTree library's boost::property_tree::xml_parser::write_xml.

Parameters:

ar

The archive to which to save the serialized property tree. This archive should conform to the concept laid out by the Boost.Serialization library.

file_version

file_version for the archive.

t

The property tree to serialize.

Postconditions:

ar will contain the serialized form of t.


PrevUpHomeNext