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 Namespace Reference

Namespaces

 detail
 
 info_parser
 
 ini_parser
 
 json_parser
 
 xml_parser
 

Classes

singleton  basic_ptree
 Property tree main structure. More...
 
struct  customize_stream
 
struct  customize_stream< Ch, Traits, bool, void >
 
struct  customize_stream< Ch, Traits, Ch, void >
 
struct  customize_stream< Ch, Traits, F, typename boost::enable_if< detail::is_inexact< F > >::type >
 
struct  customize_stream< Ch, Traits, signed char, void >
 
struct  customize_stream< Ch, Traits, unsigned char, void >
 
struct  id_translator
 Simple implementation of the Translator concept. It does no translation. More...
 
struct  path_of
 If you want to use a custom key type, specialize this struct for it and give it a 'type' typedef that specifies your path type. More...
 
struct  path_of< std::basic_string< Ch, Traits, Alloc > >
 
class  ptree_bad_data
 Error indicating that translation from given value to the property tree data_type (or vice versa) failed. More...
 
class  ptree_bad_path
 Error indicating that specified path does not exist. More...
 
class  ptree_error
 Base class for all property tree errors. More...
 
class  stream_translator
 Implementation of Translator that uses the stream overloads. More...
 
class  string_path
 Default path class. More...
 
struct  translator_between
 Specialize this struct to specify a default translator between the data in a tree whose data_type is Internal, and the external data_type specified in a get_value, get, put_value or put operation. More...
 
struct  translator_between< std::basic_string< Ch, Traits, Alloc >, E >
 
struct  translator_between< std::basic_string< Ch, Traits, Alloc >, std::basic_string< Ch, Traits, Alloc > >
 
struct  translator_between< T, T >
 

Typedefs

typedef string_path
< std::string, id_translator
< std::string > > 
path
 Implements a path using a std::string as the key. More...
 
typedef basic_ptree
< std::string, std::string > 
ptree
 A property tree with std::string for key and data, and default comparison. More...
 
typedef basic_ptree
< std::string, std::string,
detail::less_nocase
< std::string > > 
iptree
 A property tree with std::string for key and data, and case-insensitive comparison. More...
 
typedef string_path
< std::wstring, id_translator
< std::wstring > > 
wpath
 Implements a path using a std::wstring as the key. More...
 
typedef basic_ptree
< std::wstring, std::wstring > 
wptree
 A property tree with std::wstring for key and data, and default comparison. More...
 
typedef basic_ptree
< std::wstring, std::wstring,
detail::less_nocase
< std::wstring > > 
wiptree
 A property tree with std::wstring for key and data, and case-insensitive comparison. More...
 

Functions

template<class K , class D , class C >
void swap (basic_ptree< K, D, C > &pt1, basic_ptree< K, D, C > &pt2)
 Swap two property tree instances. More...
 
template<class Archive , class K , class D , class C >
void save (Archive &ar, const basic_ptree< K, D, C > &t, const unsigned int file_version)
 Serialize the property tree to the given archive. More...
 
template<class Archive , class K , class D , class C >
void load (Archive &ar, basic_ptree< K, D, C > &t, const unsigned int file_version)
 De-serialize the property tree to the given archive. More...
 
template<class Archive , class K , class D , class C >
void serialize (Archive &ar, basic_ptree< K, D, C > &t, const unsigned int file_version)
 Load or store the property tree using the given archive. More...
 
template<typename String , typename Translator >
string_path< String, Translator > operator/ (string_path< String, Translator > p1, const string_path< String, Translator > &p2)
 
template<typename String , typename Translator >
string_path< String, Translator > operator/ (string_path< String, Translator > p1, const typename String::value_type *p2)
 
template<typename String , typename Translator >
string_path< String, Translator > operator/ (const typename String::value_type *p1, const string_path< String, Translator > &p2)
 

Typedef Documentation

typedef basic_ptree<std::string, std::string, detail::less_nocase<std::string> > boost::property_tree::iptree

A property tree with std::string for key and data, and case-insensitive comparison.

typedef string_path<std::string, id_translator<std::string> > boost::property_tree::path

Implements a path using a std::string as the key.

typedef basic_ptree<std::string, std::string> boost::property_tree::ptree

A property tree with std::string for key and data, and default comparison.

typedef basic_ptree<std::wstring, std::wstring, detail::less_nocase<std::wstring> > boost::property_tree::wiptree

A property tree with std::wstring for key and data, and case-insensitive comparison.

Note
The type only exists if the platform supports wchar_t.
typedef string_path<std::wstring, id_translator<std::wstring> > boost::property_tree::wpath

Implements a path using a std::wstring as the key.

typedef basic_ptree<std::wstring, std::wstring> boost::property_tree::wptree

A property tree with std::wstring for key and data, and default comparison.

Note
The type only exists if the platform supports wchar_t.

Function Documentation

template<class Archive , class K , class D , class C >
void boost::property_tree::load ( Archive &  ar,
basic_ptree< K, D, C > &  t,
const unsigned int  file_version 
)
inline

De-serialize the property tree to the given archive.

Note
In addition to de-serializing from regular archives, this supports loading from archives requiring name-value pairs, e.g. XML archives. The format should be that used by boost::property_tree::save.
Parameters
arThe archive from which to load the serialized property tree. This archive should conform to the concept laid out by the Boost.Serialization library.
tThe property tree to de-serialize.
file_versionfile_version for the archive.
Postcondition
t will contain the de-serialized data from ar.

References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::data(), boost::serialization::stl::load_collection(), boost::serialization::make_nvp(), and boost::flyweights::t.

template<typename String , typename Translator >
string_path<String, Translator> boost::property_tree::operator/ ( string_path< String, Translator >  p1,
const string_path< String, Translator > &  p2 
)
inline
template<typename String , typename Translator >
string_path<String, Translator> boost::property_tree::operator/ ( string_path< String, Translator >  p1,
const typename String::value_type *  p2 
)
inline
template<typename String , typename Translator >
string_path<String, Translator> boost::property_tree::operator/ ( const typename String::value_type *  p1,
const string_path< String, Translator > &  p2 
)
inline

References boost::flyweights::t.

template<class Archive , class K , class D , class C >
void boost::property_tree::save ( Archive &  ar,
const basic_ptree< K, D, C > &  t,
const unsigned int  file_version 
)
inline

Serialize the property tree to the given archive.

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
arThe archive to which to save the serialized property tree. This archive should conform to the concept laid out by the Boost.Serialization library.
tThe property tree to serialize.
file_versionfile_version for the archive.
Postcondition
ar will contain the serialized form of t.

References boost::property_tree::basic_ptree< Key, Data, KeyCompare >::data(), boost::serialization::make_nvp(), and boost::flyweights::t.

template<class Archive , class K , class D , class C >
void boost::property_tree::serialize ( Archive &  ar,
basic_ptree< K, D, C > &  t,
const unsigned int  file_version 
)
inline

Load or store the property tree using the given archive.

Parameters
arThe archive from which to load or save the serialized property tree. The type of this archive will determine whether saving or loading is performed.
tThe property tree to load or save.
file_versionfile_version for the archive.

References boost::serialization::split_free().

template<class K , class D , class C >
void boost::property_tree::swap ( basic_ptree< K, D, C > &  pt1,
basic_ptree< K, D, C > &  pt2 
)

Swap two property tree instances.