|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53030 - in branches/sredl_2009_05_proptree_update: boost/property_tree libs/property_tree
From: sebastian.redl_at_[hidden]
Date: 2009-05-15 12:57:43
Author: cornedbee
Date: 2009-05-15 12:57:41 EDT (Fri, 15 May 2009)
New Revision: 53030
URL: http://svn.boost.org/trac/boost/changeset/53030
Log:
Add allocator parameter, update some parts of the interface to the new parameter order, reflow ptree.hpp to 80 cols with 4-char indent.
Added:
branches/sredl_2009_05_proptree_update/libs/property_tree/breaking_changes.txt (contents, props changed)
Text files modified:
branches/sredl_2009_05_proptree_update/boost/property_tree/ptree.hpp | 839 +++++++++++++++++++++++----------------
branches/sredl_2009_05_proptree_update/boost/property_tree/ptree_fwd.hpp | 20
2 files changed, 495 insertions(+), 364 deletions(-)
Modified: branches/sredl_2009_05_proptree_update/boost/property_tree/ptree.hpp
==============================================================================
--- branches/sredl_2009_05_proptree_update/boost/property_tree/ptree.hpp (original)
+++ branches/sredl_2009_05_proptree_update/boost/property_tree/ptree.hpp 2009-05-15 12:57:41 EDT (Fri, 15 May 2009)
@@ -13,8 +13,9 @@
#ifndef BOOST_PROPERTY_TREE_PTREE_HPP_INCLUDED
#define BOOST_PROPERTY_TREE_PTREE_HPP_INCLUDED
-#include <boost/property_tree/ptree_fwd.hpp> // Must be the first include, because of config.hpp
-
+// Must be the first include, because of config.hpp
+#include <boost/property_tree/ptree_fwd.hpp>
+#include <boost/property_tree/detail/ptree_utils.hpp>
#include <boost/assert.hpp>
#include <boost/optional.hpp>
#include <boost/static_assert.hpp>
@@ -56,10 +57,12 @@
* @tparam Key Key type
* @tparam Data Data type
* @tparam KeyCompare Key comparison predicate
+ * @tparam Allocator Allocator used throughout the class. Should be an
+ * allocator for Data; will be rebound anyway
* @tparam Path Path type
* @tparam Translate Utility that converts between key and std::string
*/
- template<class Key, class Data, class KeyCompare,
+ template<class Key, class Data, class KeyCompare, class Allocator
class Path, class Translate>
class basic_ptree
{
@@ -71,28 +74,32 @@
* Simpler way to refer to this basic_ptree<C,K,P,D,X> type.
* Note that this is private, and made public only for doxygen.
*/
- typedef basic_ptree<Key, Data, KeyCompare, Path, Translate>
+ typedef basic_ptree<Key, Data, KeyCompare, Allocator, Path, Translate>
self_type;
public:
// Basic types
- typedef KeyCompare key_compare;
typedef Key key_type;
- typedef Path path_type;
typedef Data data_type;
+ typedef KeyCompare key_compare;
+ typedef Allocator allocator_type;
+ typedef Path path_type;
typedef Translate translator_type;
/**
* Property tree stores a sequence of values of this type.
*
- * The first element is the key and the second is the child property tree
- * stored at this key.
+ * The first element is the key and the second is the child property
+ * tree stored at this key.
*/
typedef std::pair<key_type, self_type> value_type;
+ typedef typename allocator_type::template rebind<value_type>::type
+ value_allocator_type;
+
private:
// Internal types
- typedef std::list<value_type> container_type;
+ typedef std::list<value_type, value_allocator_type> container_type;
public:
// Container-related types
@@ -100,20 +107,22 @@
typedef typename container_type::iterator iterator;
typedef typename container_type::const_iterator const_iterator;
typedef typename container_type::reverse_iterator reverse_iterator;
- typedef typename container_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename container_type::const_reverse_iterator
+ const_reverse_iterator;
public:
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
// Construction & destruction
/** Creates an empty property tree. */
- basic_ptree();
+ expicit basic_ptree(allocator_type alloc = allocator_type());
/**
* Creates a property_tree with the given data.
* @param data Data to be assigned to the tree's data field.
*/
- explicit basic_ptree(const data_type &data);
+ explicit basic_ptree(const data_type &data,
+ allocator_type alloc = allocator_type());
/**
* Copy constructor from another property_tree.
@@ -121,57 +130,66 @@
*/
basic_ptree(const self_type &rhs);
- /** Destroys the property tree including recusively destoying all children. */
+ /** Destroy the property tree, including all children.
+ */
~basic_ptree();
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
// Iterator access
/**
* Access to the start of the direct children sequence.
- * @return iterator pointing to the first element of the direct children sequence.
+ * @return iterator pointing to the first element of the direct
+ * children sequence.
*/
iterator begin();
/**
* Const access to the start of the direct children sequence.
- * @return const_iterator pointing to the first element of the direct children sequence.
+ * @return const_iterator pointing to the first element of the direct
+ * children sequence.
*/
const_iterator begin() const;
/**
* Access to the end of the direct children sequence.
- * @return iterator pointing just past the end of the direct children sequence.
+ * @return iterator pointing just past the end of the direct
+ * children sequence.
*/
iterator end();
/**
* Const access to the end of the direct children sequence.
- * @return const_iterator pointing just past the end of the direct children sequence.
+ * @return const_iterator pointing just past the end of the direct
+ * children sequence.
*/
const_iterator end() const;
/**
* Access to the start of the reversed direct children sequence.
- * @return reverse_iterator pointing to first element of the reversed direct children sequence.
+ * @return reverse_iterator pointing to first element of the reversed
+ * direct children sequence.
*/
reverse_iterator rbegin();
/**
* Const access to the start of the reversed direct children sequence.
- * @return const_reverse_iterator pointing to first element of the reversed direct children sequence.
+ * @return const_reverse_iterator pointing to first element of the
+ * reversed direct children sequence.
*/
const_reverse_iterator rbegin() const;
/**
* Access to the end of the reverse direct children sequence.
- * @return reverse_iterator pointing just past the end of the reversed direct children sequence.
+ * @return reverse_iterator pointing just past the end of the reversed
+ * direct children sequence.
*/
reverse_iterator rend();
/**
* Const access to the end of the reverse direct children sequence.
- * @return const_reverse_iterator pointing just past the end of the reversed direct children sequence.
+ * @return const_reverse_iterator pointing just past the end of the
+ * reversed direct children sequence.
*/
const_reverse_iterator rend() const;
@@ -179,10 +197,10 @@
// Data access
/**
- * The size fo the direct children sequnce.
+ * The size of the direct children sequnce.
* @return Number of direct children of the property tree.
*/
- size_type size() const;
+ size_type size() const;
size_type max_size() const;
@@ -195,8 +213,9 @@
bool empty() const;
/**
- * Retruns a reference to the data of a property tree.
- * @return Reference to the stored data which can be used to modify the data.
+ * Returns a reference to the data of a property tree.
+ * @return Reference to the stored data which can be used to
+ * modify the data.
*/
data_type &data();
@@ -207,30 +226,38 @@
const data_type &data() const;
/**
- * Returns a reference to the first element in the direct children sequence.
+ * Returns a reference to the first element in the direct
+ * children sequence.
* @pre !(this->empty())
- * @return Reference to the first element in the direct children sequence.
+ * @return Reference to the first element in the direct
+ * children sequence.
*/
value_type &front();
/**
- * Returns a const reference to the first element in the direct children sequence.
+ * Returns a const reference to the first element in the direct
+ * children sequence.
* @pre !(this->empty())
- * @return Const reference to the first element in the direct children sequence.
+ * @return Const reference to the first element in the direct
+ * children sequence.
*/
const value_type &front() const;
/**
- * Returns a reference to the last element in the direct children sequence.
+ * Returns a reference to the last element in the direct
+ * children sequence.
* @pre !(this->empty())
- * @return Reference to the last element in the direct children sequence.
+ * @return Reference to the last element in the direct
+ * children sequence.
*/
value_type &back();
/**
- * Returns a const reference to the last element in the direct children sequence.
+ * Returns a const reference to the last element in the direct
+ * children sequence.
* @pre !(this->empty())
- * @return Const reference to the last element in the direct children sequence.
+ * @return Const reference to the last element in the direct
+ * children sequence.
*/
const value_type &back() const;
@@ -238,15 +265,16 @@
// Operators
/**
- * Replaces current contents of this property tree with another's contents.
+ * Replaces current contents of this property tree with another's
+ * contents.
* @param rhs The property tree to assign to this property tree.
*/
self_type &operator =(const self_type &rhs);
/**
* Check for equality of property trees.
- * @retval true If both property trees contain the same data values and equivalent
- * children sequences, recusively.
+ * @retval true If both property trees contain the same data values
+ * and equivalent children sequences, recursively.
* @retval false Otherwise.
*/
bool operator ==(const self_type &rhs) const;
@@ -257,7 +285,7 @@
*/
bool operator !=(const self_type &rhs) const;
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
// Container operations
/**
@@ -311,11 +339,11 @@
/**
* Inserts a new direct child into the property tree.
*
- * @param where Iterator pointing at the position where new element will be
- * inserted. Passing begin() will insert at the front of the
- * list. Passing end() will insert at the back. Any other
- * valid iterator will insert in the appropriate place in the
- * middle.
+ * @param where Iterator pointing at the position where new element will
+ * be inserted. Passing begin() will insert at the front of
+ * the list. Passing end() will insert at the back. Any
+ * other valid iterator will insert in the appropriate
+ * place in the middle.
* @param value value to be inserted.
* @return iterator pointing to newly inserted element of the sequence.
*/
@@ -324,27 +352,29 @@
/**
* Inserts a range of direct children into the property tree.
*
- * Time complexity is <tt>O(m log n)</tt>, where @c m is number of inserted
- * children, @c n is number of existing children.
+ * Time complexity is <tt>O(m log n)</tt>, where @c m is number of
+ * inserted children, @c n is number of existing children.
*
- * @param where Iterator pointing at the position where new elements will be
- * inserted. Passing begin() will insert at the front of the
- * list. Passing end() will insert at the back. Any other
- * valid iterator will insert in the appropriate place in the
- * middle.
+ * @param where Iterator pointing at the position where new elements
+ * will be inserted. Passing begin() will insert at the
+ * front of the list. Passing end() will insert at the
+ * back. Any other valid iterator will insert in the
+ * appropriate place in the middle.
* @param first Iterator designating the first element of range to be
* inserted.
- * @param last Iterator referring to just past the end of the range to be
- * inserted.
+ * @param last Iterator referring to just past the end of the range to
+ * be inserted.
*/
template<class It> void insert(iterator where, It first, It last);
/**
* Erases a direct child from the property tree.
*
- * @param where Iterator pointing at the child to be erased from the property tree.
- * @return Iterator pointing to the element after the erased element of the sequence,
- * or end() if the element erased was the last in the sequence.
+ * @param where Iterator pointing at the child to be erased from the
+ * property tree.
+ * @return Iterator pointing to the element after the erased element of
+ * the sequence, or end() if the element erased was the last in
+ * the sequence.
*/
iterator erase(iterator where);
@@ -361,8 +391,8 @@
*
* @param first Iterator designating the first element of range to be
* erased.
- * @param last Iterator referring to just past the end of the range to be
- * erased.
+ * @param last Iterator referring to just past the end of the range to
+ * be erased.
*/
template<class It> iterator erase(It first, It last);
@@ -413,306 +443,382 @@
/**
* Sorts direct children of the property tree in ascending order.
- * @param tr The binary predicate used to sort child values of type @c #value_type.
- * @post For each adjacent child of the sequence, @c v1 followed by @c v2,
- * @c tr(v1,v2) evaluates to true.
+ * @param tr The binary predicate used to sort child values of type
+ * @c #value_type.
+ * @post For each adjacent child of the sequence, @c v1 followed by
+ * @c v2, @c tr(v1,v2) evaluates to true.
*/
template<class SortTr> void sort(SortTr tr);
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
// ptree operations
/**
* Get a reference to the child property tree at the given path.
*
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
* @throw ptree_bad_path if child property tree cannot be located.
- * @return A reference to the child property tree at the given path relative to this
- * property tree.
+ * @return A reference to the child property tree at the given path
+ * relative to this property tree.
*/
self_type &get_child(const path_type &path);
/**
* Get a const reference to the child property tree at the given path.
*
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
* @throw ptree_bad_path if child property tree cannot be located.
- * @return A const reference to the child property tree at the given path relative to this
- * property tree.
+ * @return A const reference to the child property tree at the given
+ * path relative to this property tree.
*/
const self_type &get_child(const path_type &path) const;
/**
- * Get a reference to the child property tree at the given path or a default if none found.
+ * Get a reference to the child property tree at the given path or a
+ * default if none found.
*
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator. If child isn't found then the @c default_value will be returned.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param default_value The value to be returned if no child is found at @c path.
- * @return A reference to the child property tree at the given path relative to this
- * property tree or the @c default_value if that child isn't found
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator. If child isn't
+ * found then the @p default_value will be returned.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param default_value The value to be returned if no child is found
+ * at @c path.
+ * @return A reference to the child property tree at the given path
+ * relative to this property tree or the @c default_value if
+ * that child isn't found
*/
self_type &get_child(const path_type &path, self_type &default_value);
/**
- * Get a const reference to the child property tree at the given path or a default if none found.
+ * Get a const reference to the child property tree at the given path
+ * or a default if none found.
*
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator. If child isn't found then the @c default_value will be returned.
- * @note One use of default value is to return a reference to empty property tree if the
- * required one is not found. In many cases, the subsequent code using the return
- * value can be then made simpler. @see boost::property_tree::empty_ptree.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param default_value The value to be returned if no child is found at @c path.
- * @return A const reference to the child property tree at the given path relative to this
- * property tree or the @c default_value if that child isn't found
- */
- const self_type &get_child(const path_type &path, const self_type &default_value) const;
-
- /**
- * Get a reference to the child property tree at the given path if it exists.
- *
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @return If the child is found, the function returns boost::optional initialized with
- * a reference to it. Otherwise it returns uninitialized boost::optional.
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator. If child isn't
+ * found then the @c default_value will be returned.
+ * @note One use of default value is to return a reference to empty
+ * property tree if the required one is not found. In many cases,
+ * the subsequent code using the return value can be then made
+ * simpler. @see boost::property_tree::empty_ptree.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param default_value The value to be returned if no child is found
+ * at @c path.
+ * @return A const reference to the child property tree at the given
+ * path relative to this property tree or the @c default_value
+ * if that child isn't found.
+ */
+ const self_type &get_child(const path_type &path,
+ const self_type &default_value) const;
+
+ /**
+ * Get a reference to the child property tree at the given path if
+ * it exists.
+ *
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @return If the child is found, the function returns a boost::optional
+ * initialized with a reference to it. Otherwise it returns
+ * a null boost::optional.
*/
optional<self_type &> get_child_optional(const path_type &path);
/**
- * Get a const reference to the child property tree at the given path if it exists.
+ * Get a const reference to the child property tree at the given path
+ * if it exists.
*
- * Traverses the tree using the given path and retrieves a child property tree
- * stored there. This function will retrieve indirect children if the path contains
- * at least one separator.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @return If the child is found, the function returns boost::optional initialized with
- * a const reference to it. Otherwise it returns uninitialized boost::optional.
- */
- optional<const self_type &> get_child_optional(const path_type &path) const;
-
- /**
- * Traverses the tree using given path, and inserts a new property tree or replaces
- * existing one. If any of the intermediate keys specified by path does not exist,
- * it is inserted, with empty data and no children, at the back of existing sequence.
- *
- * For example, if @c path is "key1.key2.key3", the function will find a child designated
- * by "key1.key2" path. This child will be checked for presence of "key3" subkey. If it
- * exists, it will be replaced with the one specified by value parameter. If it does not
- * exist, "key3" will be added at the back of existing sequence (if any). If either
- * "key1" or "key1.key2" do not exist, the function will insert them as well.
- *
- * This function is a complement to @c #get_child. If @c put_child(path,value) was called,
- * @c get_child(path) will return a reference to element inserted/replaced by put_child.
- *
- * @param path Location to place value. A sequence of keys with zero or more separator
- * characters.
- * @param value Property tree to be inserted as a child of this property tree.
- * @param do_not_replace If set to true, causes function to always insert a new key,
- * even if there already exists key with the same name.
+ * Traverses the tree using the given path and retrieves a child
+ * property tree stored there. This function will retrieve indirect
+ * children if the path contains at least one separator.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @return If the child is found, the function returns a boost::optional
+ * initialized with a reference to it. Otherwise it returns
+ * a null boost::optional.
+ */
+ optional<const self_type &>
+ get_child_optional(const path_type &path) const;
+
+ /**
+ * Traverses the tree using given path, and inserts a new property tree
+ * or replaces existing one. If any of the intermediate keys specified
+ * by path does not exist, it is inserted, with empty data and no
+ * children, at the back of existing sequence.
+ *
+ * For example, if @c path is "key1.key2.key3", the function will find
+ * a child designated by "key1.key2" path. This child will be checked
+ * for presence of "key3" subkey. If it exists, it will be replaced with
+ * the one specified by value parameter. If it does not exist, "key3"
+ * will be added at the back of existing sequence (if any). If either
+ * "key1" or "key1.key2" do not exist, the function will insert them as
+ * well.
+ *
+ * This function is a complement to @c #get_child.
+ * If @c put_child(path,value) was called, @c get_child(path) will
+ * return a reference to element inserted/replaced by put_child.
+ *
+ * @param path Location to place value. A sequence of keys with zero
+ * or more separator characters.
+ * @param value Property tree to be inserted as a child of this
+ * property tree.
+ * @param do_not_replace If set to true, causes function to always
+ * insert a new key, even if there already exists
+ * key with the same name.
* @return Reference to the inserted property tree.
*/
- self_type &put_child(const path_type &path, const self_type &value, bool do_not_replace = false);
+ self_type &put_child(const path_type &path, const self_type &value,
+ bool do_not_replace = false);
/**
- * Extracts value stored in property tree data and translates it to Type using
- * the given translator.
- * @throw ptree_bad_data If data cannot be translated to an instance of @c Type
- * using the given translator_type.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * Extracts value stored in property tree data and translates it to
+ * Type using the given translator.
+ * @throw ptree_bad_data If data cannot be translated to an instance of
+ * @c Type using the given translator_type.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
* @return The extracted value as an instance of @c Type.
*/
- template<class Type> Type get_value(const translator_type &x = translator_type()) const;
+ template<class Type> Type get_value(
+ const translator_type &x = translator_type()) const;
/**
- * Extracts value stored in property tree data and translates it to Type using the
- * given translator. If extraction does not succeed then return the given default value.
- * @param default_value The value to be returned if the the given translator cannot
- * extract the data as an instance of @c Type.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
- * @return The extracted value as an instance of @c Type if extraction succeeds.
+ * Extracts value stored in property tree data and translates it to
+ * Type using the given translator. If extraction does not succeed
+ * then return the given default value.
+ * @param default_value The value to be returned if the the given
+ * translator cannot extract the data as an
+ * instance of @c Type.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * @return The extracted value as an instance of @c Type if extraction
+ * succeeds. Otherwise it returns the @c default_value.
+ */
+ template<class Type> Type get_value(const Type &default_value,
+ const translator_type &x = translator_type()) const;
+
+ /**
+ * Extracts value stored in property tree data and translates it to
+ * @c std::basic_string<CharType> using the given translator. If
+ * extraction does not succeed then return the given default string.
+ * @param default_value The string to be returned if the the given
+ * translator cannot extract the data as an
+ * instance of @c Type.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c std::basic_string<CharType> using
+ * <tt>bool translator_type::get_value(self_type const&,
+ * std::basic_string<CharType>&)</tt>.
+ * @return The extracted value as an instance of
+ * @c std::basic_string<CharType> if extraction succeeds.
* Otherwise it returns the @c default_value.
*/
- template<class Type> Type get_value(const Type &default_value, const translator_type &x = translator_type()) const;
-
- /**
- * Extracts value stored in property tree data and translates it to @c std::basic_string<CharType>
- * using the given translator. If extraction does not succeed then return the given default string.
- * @param default_value The string to be returned if the the given translator cannot
- * extract the data as an instance of @c Type.
- * @param x Translator to use to extract and convert the contained #data_type to @c std::basic_string<CharType>
- * using <tt>bool translator_type::get_value(self_type const&, std::basic_string<CharType>&)</tt>.
- * @return The extracted value as an instance of @c std::basic_string<CharType> if extraction succeeds.
- * Otherwise it returns the @c default_value.
- */
- template<class CharType> std::basic_string<CharType> get_value(const CharType *default_value, const translator_type &x = translator_type()) const;
-
- /**
- * Extracts value stored in property tree data and translates it to Type using the
- * given translator.
- * @param default_value The value to be returned if the the given translator cannot
- * extract the data as an instance of @c Type.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
- * @return The extracted value as an instance of @c Type if extraction succeeds.
- * Otherwise it returns an uninitialized @c boost::optional<Type>.
+ template<class CharType> std::basic_string<CharType> get_value(
+ const CharType *default_value,
+ const translator_type &x = translator_type()) const;
+
+ /**
+ * Extracts value stored in property tree data and translates it to
+ * Type using the given translator.
+ * @param default_value The value to be returned if the the given
+ * translator cannot extract the data as an
+ * instance of @c Type.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * @return The extracted value as an instance of @c Type if extraction
+ * succeeds. Otherwise it returns an empty
+ * @c boost::optional\<Type\>.
*/
- template<class Type> optional<Type> get_value_optional(const translator_type &x = translator_type()) const;
+ template<class Type> optional<Type> get_value_optional(
+ const translator_type &x = translator_type()) const;
/**
* Get the property tree value at the given path.
*
- * Traverses the tree using the given path and retrieves the value stored there.
- * This function will retrieve values of indirect children if the path contains at least
- * one separator. The value will be converted to an instance of @c Type using the
- * given translator.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
- * @throw ptree_bad_path if child property tree cannot be located using the given path.
- * @return The child property tree's value at the given path relative to this
- * property tree.
- */
- template<class Type> Type get(const path_type &path, const translator_type &x = translator_type()) const;
-
- /**
- * Get the property tree value at the given path or a default if none found.
- *
- * Traverses the tree using the given path and retrieves the value stored there
- * This function will retrieve values of indirect children if the path contains at least
- * one separator. The value will be converted to an instance of @c Type using the
- * given translator. If child isn't found then the @c default_value will be returned.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param default_value The value to be returned if no child is found at @c path
- * or translation fails.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
- * @return The child property tree's value at the given path relative to this
- * property tree or the @c default_value if that child is not found.
- */
- template<class Type> Type get(const path_type &path, const Type &default_value, const translator_type &x = translator_type()) const;
-
- /**
- * Get the property tree value as @c std::basic_string<CharType> at the given path
- * or a default if none found.
- *
- * Traverses the tree using the given path and retrieves the value stored there
- * This function will retrieve values of indirect children if the path contains at least
- * one separator. The value will be converted to an instance of
- * @c std::basic_string<CharType> using the given translator. If child isn't
- * found then the @c default_value will be returned.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param default_value The string to be returned if no child is found at @c path
- * or translation fails.
- * @param x Translator to use to extract and convert the contained #data_type to @c std::basic_string<CharType>
- * using <tt>bool translator_type::get_value(self_type const&, std::basic_string<CharType>&)</tt>.
- * @return The child property tree's value as @c std::basic_string<CharType> at
- * the given path relative to this property tree or the @c default_value
- * if that child is not found or translation fails.
- */
- template<class CharType> std::basic_string<CharType> get(const path_type &path, const CharType *default_value, const translator_type &x = translator_type()) const;
+ * Traverses the tree using the given path and retrieves the value
+ * stored there. This function will retrieve values of indirect children
+ * if the path contains at least one separator. The value will be
+ * converted to an instance of @c Type using the given translator.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * @throw ptree_bad_path if child property tree cannot be located using
+ * the given path.
+ * @return The child property tree's value at the given path relative
+ * to this property tree.
+ */
+ template<class Type> Type get(const path_type &path,
+ const translator_type &x = translator_type()) const;
+
+ /**
+ * Get the property tree value at the given path or a default if none
+ * found.
+ *
+ * Traverses the tree using the given path and retrieves the value
+ * stored there This function will retrieve values of indirect children
+ * if the path contains at least one separator. The value will be
+ * converted to an instance of @c Type using the given translator. If
+ * child isn't found then the @c default_value will be returned.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param default_value The value to be returned if no child is found
+ * at @c path or translation fails.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * @return The child property tree's value at the given path relative to
+ * this property tree or the @c default_value if that child is
+ * not found.
+ */
+ template<class Type> Type get(const path_type &path,
+ const Type &default_value,
+ const translator_type &x =
+ translator_type()) const;
+
+ /**
+ * Get the property tree value as @c std::basic_string<CharType> at the
+ * given path or a default if none found.
+ *
+ * Traverses the tree using the given path and retrieves the value
+ * stored there This function will retrieve values of indirect children
+ * if the path contains at least one separator. The value will be
+ * converted to an instance of @c std::basic_string<CharType> using the
+ * given translator. If child isn't found then the @c default_value
+ * will be returned.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param default_value The string to be returned if no child is found
+ * at @c path or translation fails.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c std::basic_string<CharType> using
+ * <tt>bool translator_type::get_value(self_type const&,
+ * std::basic_string<CharType>&)</tt>.
+ * @return The child property tree's value as
+ * @c std::basic_string<CharType> at the given path relative to
+ * this property tree or the @c default_value if that child is
+ * not found or translation fails.
+ */
+ template<class CharType> std::basic_string<CharType> get(
+ const path_type &path,
+ const CharType *default_value,
+ const translator_type &x = translator_type()) const;
/**
- * Get the property tree value at the given path or an uninitialized
+ * Get the property tree value at the given path or an uninitialized
* @c boost::optional<Type> if none found.
*
- * Traverses the tree using the given path and retrieves the value stored there
- * This function will retrieve values of indirect children if the path contains at least
- * one separator. The value will be converted to an instance of @c Type using the
- * given translator. If child isn't found then an unitialized @c boost::optional<Type>
+ * Traverses the tree using the given path and retrieves the value
+ * stored there. This function will retrieve values of indirect children
+ * if the path contains at least one separator. The value will be
+ * converted to an instance of @c Type using the given translator. If
+ * child isn't found then an unitialized @c boost::optional<Type>
* will be returned.
- * @param path A sequence of keys with zero or more separator characters.
- * Can indicate indirect children if path contains at least one separator
- * character.
- * @param x Translator to use to extract and convert the contained #data_type to @c Type
- * using <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
- * @return The child property tree's value at the given path relative to this
- * property tree or an unitialized @c boost::optional<Type> if that child is not
- * found or translation fails.
+ * @param path A sequence of keys with zero or more separator
+ * characters. Can indicate indirect children if path
+ * contains at least one separator character.
+ * @param x Translator to use to extract and convert the contained
+ * #data_type to @c Type using
+ * <tt>bool translator_type::get_value(self_type const&, Type&)</tt>.
+ * @return The child property tree's value at the given path relative to
+ * this property tree or an unitialized @c boost::optional<Type>
+ * if that child is not found or translation fails.
*/
- template<class Type> optional<Type> get_optional(const path_type &path, const translator_type &x = translator_type()) const;
+ template<class Type> optional<Type> get_optional(const path_type &path,
+ const translator_type &x = translator_type()) const;
/**
* Store the given value as the data of this property tree.
*
- * Translates @c value from @c Type to @c #data_type using the given translator, and stores the
- * result as the data value of this property tree.
- * @throw ptree_bad_data If the given value cannot be translated to @c #data_type.
- * @param value The parameter to store as the data of this property tree.
- * @param x Translator to use to convert @c value to an instance of @c #data_type
- * using <tt>bool translator_type::put_value(self_type&,Type const&)</tt>.
- */
- template<class Type> void put_value(const Type &value, const translator_type &x = translator_type());
-
- /**
- * Traverses the tree using given path, and inserts a new value or replaces existing one.
- * If any of the intermediate keys specified by path does not exist, it is inserted,
- * with empty data and no children, at the back of existing sequence.
- *
- * For example, if @c path is "key1.key2.key3", the function will find a child designated
- * by "key1.key2" path. This child will be checked for presence of "key3" subkey. If it
- * exists, it will be replaced with the one specified by value parameter. If it does not
- * exist, "key3" will be added at the back of existing sequence (if any). If either
- * "key1" or "key1.key2" do not exist, the function will insert them as well.
- *
- * This function is a complement to @c #get. If @c put(path,value) was called,
- * @c get(path) will return the value inserted by @c #put.
- *
- * @param path Location to place value. A sequence of keys with zero or more separator
- * characters.
- * @param value value to be inserted as the data of a child of this property tree.
- * @param do_not_replace If set to true, causes function to always insert a new key,
- * even if there already exists key with the same name.
- * @param x Translator to use to convert @c value to an instance of @c #data_type
- * using <tt>bool translator_type::put_value(self_type&,Type const&)</tt>.
- * @return Reference to the property tree where the value was inserted. It is either a
- * newly inserted property tree or an existing one if it was there prior to
- * this call.
- */
- template<class Type> self_type &put(const path_type &path, const Type &value, bool do_not_replace = false, const translator_type &x = translator_type());
+ * Translates @c value from @c Type to @c #data_type using the given
+ * translator, and stores the result as the data value of this property
+ * tree.
+ * @throw ptree_bad_data If the given value cannot be translated to
+ * @c #data_type.
+ * @param value The parameter to store as the data of this property
+ * tree.
+ * @param x Translator to use to convert @c value to an instance of
+ * @c #data_type using
+ * <tt>bool translator_type::put_value(self_type&, Type const&)</tt>.
+ */
+ template<class Type> void put_value(const Type &value,
+ const translator_type &x = translator_type());
+
+ /**
+ * Traverses the tree using given path, and inserts a new value or
+ * replaces existing one. If any of the intermediate keys specified by
+ * path does not exist, it is inserted, with empty data and no children,
+ * at the back of existing sequence.
+ *
+ * For example, if @c path is "key1.key2.key3", the function will find
+ * a child designated by "key1.key2" path. This child will be checked
+ * for presence of "key3" subkey. If it exists, it will be replaced with
+ * the one specified by value parameter. If it does not exist, "key3"
+ * will be added at the back of existing sequence (if any). If either
+ * "key1" or "key1.key2" do not exist, the function will insert them as
+ * well.
+ *
+ * This function is a complement to @c #get. If @c put(path,value) was
+ * called, @c get(path) will return the value inserted by @c #put.
+ *
+ * @param path Location to place value. A sequence of keys with zero
+ * or more separator characters.
+ * @param value value to be inserted as the data of a child of this
+ * property tree.
+ * @param do_not_replace If set to true, causes function to always
+ * insert a new key, even if there already exists
+ * key with the same name.
+ * @param x Translator to use to convert @c value to an instance of
+ * @c #data_type using
+ * <tt>bool translator_type::put_value(self_type&,Type const&)</tt>.
+ * @return Reference to the property tree where the value was inserted.
+ * It is either a newly inserted property tree or an existing
+ * one if it was there prior to this call.
+ */
+ template<class Type> self_type &put(const path_type &path,
+ const Type &value,
+ bool do_not_replace = false,
+ const translator_type &x =
+ translator_type());
private:
-
data_type m_data;
container_type m_container;
- ////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////
// Debugging
#ifdef BOOST_PROPERTY_TREE_DEBUG
private:
- static boost::detail::lightweight_mutex debug_mutex; // Mutex for syncing instances counter
- static size_type debug_instances_count; // Total number of instances of this ptree class
+ // Mutex for syncing instances counter
+ static boost::detail::lightweight_mutex debug_mutex;
+ // Total number of instances of this ptree class
+ static size_type debug_instances_count;
public:
static size_type debug_get_instances_count();
#endif
@@ -722,7 +828,9 @@
///////////////////////////////////////////////////////////////////////////
// basic_path class template
- /** Class template used to represent a path containing a sequence of Key instances. */
+ /** Class template used to represent a path containing a sequence of Key
+ * instances.
+ */
template<class Key>
class basic_path
{
@@ -744,16 +852,19 @@
basic_path();
/**
- * Constructs an path using the given path using the given separator to split it.
+ * Constructs an path using the given path using the given separator to
+ * split it.
* @param path The path to which to initialize the constructed instance.
* @param separator The separator to use to split the @c path parameter.
*/
basic_path(const Key &path, char_type separator = char_type('.'));
/**
- * Constructs an path using the given path using the given separator to split it.
- * @param path The path to which to initialize the constructed instance. This
- * path instance must be terminated with char_type('\\0');
+ * Constructs an path using the given path using the given separator to
+ * split it.
+ * @param path The path to which to initialize the constructed instance.
+ * This path instance must be terminated with
+ * char_type('\\0');
* @param separator The separator to use to split the @c path parameter.
*/
basic_path(const char_type *path, char_type separator = char_type('.'));
@@ -778,41 +889,53 @@
// Operations
/**
- * Extract the child subtree of the given property tree at the location indicated
- * by this path instance.
- * @param root The property tree from which to extract the child subtree.
- * @return Pointer to the child subtree of the input property tree indicated by the
- * location given by this path instance. If no child exists at the indicated
- * location then NULL is returned.
+ * Extract the child subtree of the given property tree at the location
+ * indicated by this path instance.
+ * @param root The property tree from which to extract the child
+ * subtree.
+ * @return Pointer to the child subtree of the input property tree
+ * indicated by the location given by this path instance. If no
+ * child exists at the indicated location then NULL is returned.
+ */
+ template<class D, class C, class A, class X>
+ basic_ptree<D, Key, C, A, basic_path<Key>, X> *get_child(
+ basic_ptree<D, Key, C, A, basic_path<Key>, X> &root) const;
+
+ /**
+ * Extract the child subtree of the given property tree at the location
+ * indicated by this path instance.
+ * @param root The property tree from which to extract the child
+ * subtree.
+ * @return Pointer to the constant child subtree of the input property
+ * tree indicated by the location given by this path instance.
+ * If no child exists at the indicated location then NULL is
+ * returned.
*/
template<class C, class D, class X>
- basic_ptree<C, Key, basic_path<Key>, D, X> *get_child(basic_ptree<C, Key, basic_path<Key>, D, X> &root) const;
+ const basic_ptree<D, Key, C, A, basic_path<Key>, X> *get_child(
+ const basic_ptree<D, Key, C, A, basic_path<Key>, X> &root) const;
/**
- * Extract the child subtree of the given property tree at the location indicated
- * by this path instance.
- * @param root The property tree from which to extract the child subtree.
- * @return Pointer to the constant child subtree of the input property tree indicated by the
- * location given by this path instance. If no child exists at the indicated
- * location then NULL is returned.
- */
- template<class C, class D, class X>
- const basic_ptree<C, Key, basic_path<Key>, D, X> *get_child(const basic_ptree<C, Key, basic_path<Key>, D, X> &root) const;
-
- /**
- * Insert or replace in the given property tree at the location indicated by this path
- * instance the second given property tree as a child.
- * @param root The property tree in which to insert or replace the child.
- * @param child The property tree to insert within the tree given by that @c root parameter.
- * @param do_not_replace If set to true, causes function to always insert a new key,
- * even if there already exists key with the same name. Otherwise
- * @return Pointer to the child property tree inserted at the given location
- * location given by this path instance. If this path is empty then return NULL.
- */
- template<class C, class D, class X>
- basic_ptree<C, Key, basic_path<Key>, D, X> *put_child(basic_ptree<C, Key, basic_path<Key>, D, X> &root,
- const basic_ptree<C, Key, basic_path<Key>, D, X> &child,
- bool do_not_replace) const;
+ * Insert or replace in the given property tree at the location
+ * indicated by this path instance the second given property tree as a
+ * child.
+ * @param root The property tree in which to insert or replace the
+ * child.
+ * @param child The property tree to insert within the tree given by
+ * that @c root parameter.
+ * @param do_not_replace If set to true, causes function to always
+ * insert a new key, even if there already exists
+ * key with the same name. Otherwise an existing
+ * key is replaced.
+ * @return Pointer to the child property tree inserted at the location
+ * given by this path instance. If this path is empty then
+ * return NULL.
+ */
+ template<class D, class C, class A, class X>
+ basic_ptree<D, Key, C, A, basic_path<Key>, X> *put_child(
+ basic_ptree<D, Key, C, A, basic_path<Key>, X> &root,
+ const basic_ptree<D, Key, C, A, basic_path<Key>, X> &child,
+ bool do_not_replace) const;
private:
@@ -821,7 +944,8 @@
///////////////////////////////////////////////////////////////////////
// Internal
- template<class RanIt> void parse(RanIt begin, RanIt end, char_type separator);
+ template<class RanIt> void parse(RanIt begin, RanIt end,
+ char_type separator);
};
@@ -830,14 +954,13 @@
class translator
{
-
public:
/** Default construct a translator instance. */
translator();
/**
- * Construct a translator instance setting the internal locale state using
- * the given input locale.
+ * Construct a translator instance setting the internal locale state
+ * using the given input locale.
* @param loc The locale to use in this instance.
*/
translator(const std::locale &loc);
@@ -846,21 +969,24 @@
* Extract data value from the given property tree and convert it to an
* instance of type @c T.
* @param pt Property tree from which to retrieve the data value.
- * @param[out] value The variable in which to store the retrieved data value.
- * @return @c true If the data value was sucessfully converted and retrieved.
- * Otherwise return @c false.
+ * @param[out] value The variable in which to store the retrieved data
+ * value.
+ * @return @c true if the data value was sucessfully converted and
+ * retrieved. Otherwise return @c false.
*/
- template<class Ptree, class T> bool get_value(const Ptree &pt, T &value) const;
+ template<class Ptree, class T> bool get_value(const Ptree &pt, T &value)
+ const;
/**
- * Insert the given value as the data member in the given property tree after
- * converting it to instance of type @c Ptree::data_type.
+ * Insert the given value as the data member in the given property tree
+ * after converting it to instance of type @c Ptree::data_type.
* @param pt Property tree in which to insert the given value as data.
* @param value The value to store as data in the given property tree.
- * @return @c true If the data value was sucessfully converted and retrieved.
- * Otherwise return @c false.
+ * @return @c true If the data value was sucessfully converted and
+ * retrieved. Otherwise return @c false.
*/
- template<class Ptree, class T> bool put_value(Ptree &pt, const T &value) const;
+ template<class Ptree, class T> bool put_value(Ptree &pt, const T &value)
+ const;
private:
@@ -871,8 +997,9 @@
///////////////////////////////////////////////////////////////////////////
// exceptions
- /// Base class for all property tree errors. Derives from @c std::runtime_error.
- /// Call member function @c what to get human readable message associated with the error.
+ /// Base class for all property tree errors. Derives from
+ /// @c std::runtime_error. Call member function @c what to get human
+ /// readable message associated with the error.
class ptree_error: public std::runtime_error
{
public:
@@ -884,35 +1011,39 @@
};
- /// Error indicating that translation from given value to the property tree data_type
- /// (or vice versa) failed. Derives from ptree_error.
+ /// Error indicating that translation from given value to the property tree
+ /// data_type (or vice versa) failed. Derives from ptree_error.
class ptree_bad_data: public ptree_error
{
public:
- /// Instantiate a ptree_bad_data instance with the given message and data.
+ /// Instantiate a ptree_bad_data instance with the given message and
+ /// data.
/// @param what The message to associate with this error.
- /// @param data The value associated with this error that was the source of the
- /// translation failure.
- template<class T> ptree_bad_data(const std::string &what, const T &data);
+ /// @param data The value associated with this error that was the source
+ /// of the translation failure.
+ template<class T> ptree_bad_data(const std::string &what,
+ const T &data);
~ptree_bad_data() throw();
- /// Retrieve the data associated with this error. This is the source value that
- /// failed to be translated.
+ /// Retrieve the data associated with this error. This is the source
+ /// value that failed to be translated.
template<class T> T data();
private:
boost::any m_data;
};
- /// Error indicating that specified path does not exist. Derives from ptree_error.
+ /// Error indicating that specified path does not exist. Derives from
+ /// ptree_error.
class ptree_bad_path: public ptree_error
{
public:
/// Instantiate a ptree_bad_path with the given message and path data.
/// @param what The message to associate with this error.
/// @param path The path that could not be found in the property_tree.
- template<class T> ptree_bad_path(const std::string &what, const T &path);
+ template<class T> ptree_bad_path(const std::string &what,
+ const T &path);
~ptree_bad_path() throw();
Modified: branches/sredl_2009_05_proptree_update/boost/property_tree/ptree_fwd.hpp
==============================================================================
--- branches/sredl_2009_05_proptree_update/boost/property_tree/ptree_fwd.hpp (original)
+++ branches/sredl_2009_05_proptree_update/boost/property_tree/ptree_fwd.hpp 2009-05-15 12:57:41 EDT (Fri, 15 May 2009)
@@ -11,11 +11,14 @@
#define BOOST_PROPERTY_TREE_PTREE_FWD_HPP_INCLUDED
#include <boost/config.hpp>
-#include <boost/property_tree/detail/ptree_utils.hpp>
#include <functional> // for std::less
+#include <memory> // for std::allocator
namespace boost { namespace property_tree
{
+ namespace detail {
+ template <typename T> struct less_nocase;
+ }
///////////////////////////////////////////////////////////////////////////
// Classes
@@ -25,6 +28,7 @@
//template<class C, class K, class P, class D, class X> class basic_ptree;
template <class Key, class Data,
class KeyCompare = std::less<Key>,
+ class Allocator = std::allocator<Data>,
class Path = basic_path<Key>,
class Translate = translator>
basic_ptree;
@@ -46,14 +50,12 @@
* A property tree that uses a path type based upon std::string.
* Comparisons of keys are performed in a case-sensitive manner.
*/
- //typedef basic_ptree<std::less<std::string>, std::string, path, std::string, translator> ptree;
typedef basic_ptree<std::string, std::string> ptree;
/**
* A property tree that uses a path type based upon std::string.
* Comparisons of keys are performed in a case-insensitive manner.
*/
- //typedef basic_ptree<detail::less_nocase<std::string>, std::string, path, std::string, translator> iptree;
typedef basic_ptree<std::string, std::string,
detail::less_nocase<std::string> >
iptree;
@@ -64,7 +66,6 @@
* Comparisons of keys are performed in a case-sensitive manner.
* @note The type only exists if the platform supports @c wchar_t.
*/
- //typedef basic_ptree<std::less<std::wstring>, std::wstring, wpath, std::wstring, translator> wptree;
typedef basic_ptree<std::wstring, std::wstring> wptree;
/**
@@ -72,7 +73,6 @@
* Comparisons of keys are performed in a case-insensitive manner.
* @note The type only exists if the platform supports @c wchar_t.
*/
- //typedef basic_ptree<detail::less_nocase<std::wstring>, std::wstring, wpath, std::wstring, translator> wiptree;
typedef basic_ptree<std::wstring, std::wstring,
detail::less_nocase<std::wstring> >
wiptree;
@@ -86,13 +86,13 @@
* @param pt1 Reference to first property tree involved in swap.
* @param pt2 Reference to second property tree involved in swap.
*/
- template<class K, class D, class C, class P, class X>
- void swap(basic_ptree<K, D, C, P, X> &pt1,
- basic_ptree<K, D, C, P, X> &pt2);
+ template<class K, class D, class C, class A, class P, class X>
+ void swap(basic_ptree<K, D, C, A, P, X> &pt1,
+ basic_ptree<K, D, C, A, P, X> &pt2);
/**
- * Reference to empty property tree. Can be used as a default value of get_child.
- * See empty_ptree_trick.cpp for example of usage.
+ * Reference to empty property tree. Can be used as a default value of
+ * get_child. See empty_ptree_trick.cpp for example of usage.
*/
template<class Ptree> const Ptree &empty_ptree();
Added: branches/sredl_2009_05_proptree_update/libs/property_tree/breaking_changes.txt
==============================================================================
--- (empty file)
+++ branches/sredl_2009_05_proptree_update/libs/property_tree/breaking_changes.txt 2009-05-15 12:57:41 EDT (Fri, 15 May 2009)
@@ -0,0 +1,5 @@
+List all breaking changes done to the interface during the update here.
+
+- Template parameters.
+Template parameters have been reordered, and an allocator parameter has been
+added.
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk