Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74416 - in sandbox: tree_node tree_node/boost tree_node/boost/detail tree_node/boost/detail/metafunction tree_node/boost/tree_node tree_node/libs tree_node/libs/tree_node tree_node/libs/tree_node/doc tree_node/libs/tree_node/doc/html tree_node/libs/tree_node/doc/html/images tree_node/libs/tree_node/doc/html/tree_node tree_node/libs/tree_node/doc/html/tree_node/concepts tree_node/libs/tree_node/doc/html/tree_node/reference tree_node/libs/tree_node/example utility-container_gen utility-container_gen/boost utility-container_gen/boost/detail utility-container_gen/boost/detail/function utility-container_gen/boost/detail/metafunction utility-container_gen/boost/graph utility-container_gen/boost/graph/detail utility-container_gen/boost/utility utility-container_gen/libs utility-container_gen/libs/graph utility-container_gen/libs/graph/example utility-container_gen/libs/utility utility-container_gen/libs/utility/container_gen utility-container_gen/libs/utility/container_gen/doc utility-container_gen/libs/utility/container_gen/doc/html utility-container_gen/libs/utility/container_gen/doc/html/container_gen utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference utility-container_gen/libs/utility/container_gen/doc/html/images
From: sponage_at_[hidden]
Date: 2011-09-16 04:21:48


Author: expaler
Date: 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
New Revision: 74416
URL: http://svn.boost.org/trac/boost/changeset/74416

Log:
Added Boost.Utility.ContainerGen and Boost.TreeNode candidate libraries.
Added:
   sandbox/tree_node/
   sandbox/tree_node/LICENSE_1_0.txt (contents, props changed)
   sandbox/tree_node/boost/
   sandbox/tree_node/boost.png (contents, props changed)
   sandbox/tree_node/boost/detail/
   sandbox/tree_node/boost/detail/metafunction/
   sandbox/tree_node/boost/detail/metafunction/element_type.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/
   sandbox/tree_node/boost/tree_node.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/breadth_first_iterator.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/depth_first_iterator.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/post_order_iterator.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/pre_order_iterator.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/raw_associative_node.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/raw_node.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/simple_associative_node.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/simple_node.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/traversal_state.hpp (contents, props changed)
   sandbox/tree_node/boost/tree_node/typeof.hpp (contents, props changed)
   sandbox/tree_node/libs/
   sandbox/tree_node/libs/tree_node/
   sandbox/tree_node/libs/tree_node/doc/
   sandbox/tree_node/libs/tree_node/doc/Jamroot (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_raci_tree_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/concepts.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/
   sandbox/tree_node/libs/tree_node/doc/html/boostbook.css (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/
   sandbox/tree_node/libs/tree_node/doc/html/images/alert.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/blank.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/caution.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/draft.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/home.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/important.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/next.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/next_disabled.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/note.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/prev.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/prev_disabled.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/smiley.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/tip.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/up.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/up_disabled.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/images/warning.png (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/index.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/raci_tree_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_desc_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/breadth_first_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/depth_first_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/post_order_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/pre_order_iterator.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_associative_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_associative_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_node.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/traversal_state.html (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_breadth_first_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_depth_first_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_post_order_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_pre_order_iterator.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_raw_associative_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_raw_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_simple_associative_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_simple_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/ref_traversal_state.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/reference.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/doc/tree_node.qbk (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/
   sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.cpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.hpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/raw_associative_node.cpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/raw_node.cpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/show_functions.cpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/show_functions.hpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/showcase_descendant_iterators.hpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/showcase_iterators.hpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/simple_associative_node.cpp (contents, props changed)
   sandbox/tree_node/libs/tree_node/example/simple_node.cpp (contents, props changed)
   sandbox/utility-container_gen/
   sandbox/utility-container_gen/LICENSE_1_0.txt (contents, props changed)
   sandbox/utility-container_gen/boost/
   sandbox/utility-container_gen/boost.png (contents, props changed)
   sandbox/utility-container_gen/boost/detail/
   sandbox/utility-container_gen/boost/detail/function/
   sandbox/utility-container_gen/boost/detail/function/range_equal.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/function/range_less.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/
   sandbox/utility-container_gen/boost/detail/metafunction/has_const_iterator.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_const_pointer.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_const_reference.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_difference_type.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_pointer.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_reference.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_size_type.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/has_value_type.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/is_container.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/detail/metafunction/is_input_iterator.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/graph/
   sandbox/utility-container_gen/boost/graph/adjacency_list.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/graph/detail/
   sandbox/utility-container_gen/boost/graph/detail/adjacency_list.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/
   sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/container_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/libs/
   sandbox/utility-container_gen/libs/graph/
   sandbox/utility-container_gen/libs/graph/example/
   sandbox/utility-container_gen/libs/graph/example/container_gen.cpp (contents, props changed)
   sandbox/utility-container_gen/libs/utility/
   sandbox/utility-container_gen/libs/utility/container_gen/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/Jamroot (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/boostbook.css (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/alert.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/blank.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/caution.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/draft.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/home.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/important.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/next.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/next_disabled.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/note.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/prev.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/prev_disabled.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/smiley.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/tip.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/up.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/up_disabled.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/warning.png (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk (contents, props changed)

Added: sandbox/tree_node/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/tree_node/LICENSE_1_0.txt 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/tree_node/boost.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/boost/detail/metafunction/element_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/detail/metafunction/element_type.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,23 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_ELEMENT_TYPE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_ELEMENT_TYPE_HPP_INCLUDED
+
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace detail {
+
+ template <typename T>
+ struct element_type
+ {
+ typedef typename T::element_type type;
+
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,element_type,(T))
+ };
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_ELEMENT_TYPE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,20 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_HPP_INCLUDED
+
+#include <boost/tree_node/traversal_state.hpp>
+#include <boost/tree_node/breadth_first_iterator.hpp>
+#include <boost/tree_node/pre_order_iterator.hpp>
+#include <boost/tree_node/post_order_iterator.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+#include <boost/tree_node/raw_node.hpp>
+#include <boost/tree_node/simple_node.hpp>
+#include <boost/tree_node/raw_associative_node.hpp>
+#include <boost/tree_node/simple_associative_node.hpp>
+
+#endif // BOOST_TREE_NODE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/breadth_first_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/breadth_first_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,596 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_BREADTH_FIRST_ITERATOR_HPP_INCLUDED
+#define BOOST_TREE_BREADTH_FIRST_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <deque>
+#include <boost/config.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#endif
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/detail/metafunction/element_type.hpp>
+#include <boost/tree_node/traversal_state.hpp>
+
+//[reference__breadth_first_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename MimicsChildIterator>
+ class breadth_first_iterator
+ {
+ //<-
+ typedef typename ::boost::mpl::eval_if<
+ ::std::tr1::is_pointer<NodePointer>
+ , ::std::tr1::remove_pointer<NodePointer>
+ , ::boost::detail::element_type<NodePointer>
+ >::type
+ element_type;
+ typedef typename ::std::tr1::remove_const<element_type>::type
+ node_type;
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_const<element_type>
+ , typename node_type::const_child_iterator
+ , typename node_type::child_iterator
+ >::type
+ child_iterator;
+ typedef typename ::std::iterator_traits<child_iterator>::value_type
+ child_value;
+ typedef typename ::boost::fusion::traits::is_sequence<
+ child_value
+ >::type
+ is_associative;
+ typedef typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , NodePointer
+ >::type
+ queue_element;
+ //->
+
+ public:
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_value
+ , NodePointer
+ >::type
+ //->
+ value_type;
+ typedef value_type const&
+ reference;
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , value_type const*
+ >::type
+ //->
+ pointer;
+ typedef ::std::ptrdiff_t
+ distance_type;
+ typedef ::std::forward_iterator_tag
+ iterator_category;
+
+ //<-
+ private:
+#ifndef BOOST_NO_SFINAE
+ struct enabler
+ {
+ };
+#endif
+
+ ::std::deque<queue_element> _queue;
+ queue_element _current;
+ traversal_state _state;
+
+ public:
+ //->
+ breadth_first_iterator();
+
+ explicit breadth_first_iterator(NodePointer const& node);
+
+ template <typename NP, typename MCI>
+ breadth_first_iterator(
+ breadth_first_iterator<NP,MCI> const& other
+//<-
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP,NodePointer>
+ , ::boost::mpl::equal_to<MCI,MimicsChildIterator>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type = enabler()
+#endif
+//->
+ );
+
+ reference operator*() const;
+
+ pointer operator->() const;
+
+ breadth_first_iterator& operator++();
+
+ breadth_first_iterator operator++(int);
+
+ operator traversal_state() const;
+
+ //<-
+ private:
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::true_);
+
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::false_);
+
+ reference _deref(::boost::mpl::true_) const;
+
+ reference _deref(::boost::mpl::false_) const;
+
+ pointer _indirect(::boost::mpl::true_) const;
+
+ pointer _indirect(::boost::mpl::false_) const;
+
+ NodePointer _current_node(::boost::mpl::true_) const;
+
+ NodePointer const& _current_node(::boost::mpl::false_) const;
+
+ void _initialize(NodePointer const&, ::boost::mpl::true_);
+
+ void _initialize(NodePointer const&, ::boost::mpl::false_);
+
+ void _push_child(child_iterator const&, ::boost::mpl::true_);
+
+ void _push_child(child_iterator const&, ::boost::mpl::false_);
+
+ void _push_children(NodePointer const&, ::boost::mpl::true_);
+
+ void _push_children(NodePointer const&, ::boost::mpl::false_);
+
+ void _pop();
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ friend bool
+#else
+ friend typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ breadth_first_iterator<NP1,MCI1> const& lhs
+ , breadth_first_iterator<NP2,MCI2> const& rhs
+ );
+ //->
+ };
+
+ //<-
+ template <typename NP, typename MCI>
+ breadth_first_iterator<NP,MCI>::breadth_first_iterator()
+ : _queue(), _current(), _state(no_traversal)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ breadth_first_iterator<NP,MCI>::breadth_first_iterator(NP const& node)
+ : _queue()
+ , _current()
+ , _state(node ? breadth_first_traversal : no_traversal)
+ {
+ _initialize(node, MCI());
+ }
+
+ template <typename NP1, typename MCI1>
+ template <typename NP2, typename MCI2>
+ breadth_first_iterator<NP1,MCI1>::breadth_first_iterator(
+ breadth_first_iterator<NP2,MCI2> const& other
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP2,NP1>
+ , ::boost::mpl::equal_to<MCI2,MCI1>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type
+ ) : _queue(other._queue.begin(), other._queue.end())
+ , _current(other._current)
+ , _state(other._state)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ breadth_first_iterator<NP,MCI>::_initialize(
+ NP const& node
+ , ::boost::mpl::true_
+ )
+ {
+ if (node)
+ {
+ _push_children(node, MCI());
+ _pop();
+ }
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ breadth_first_iterator<NP,MCI>::_initialize(
+ NP const& node
+ , ::boost::mpl::false_
+ )
+ {
+ _current = node;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::reference
+ breadth_first_iterator<NP,MCI>::_deref(::boost::mpl::true_) const
+ {
+ return *_current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::reference
+ breadth_first_iterator<NP,MCI>::_deref(::boost::mpl::false_) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::reference
+ breadth_first_iterator<NP,MCI>::operator*() const
+ {
+ return _deref(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::pointer
+ breadth_first_iterator<NP,MCI>::_indirect(::boost::mpl::true_) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::pointer
+ breadth_first_iterator<NP,MCI>::_indirect(::boost::mpl::false_) const
+ {
+ return &_current;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ breadth_first_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ return itr->second;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ breadth_first_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ return *itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ breadth_first_iterator<NP,MCI>::_current_node(
+ ::boost::mpl::true_
+ ) const
+ {
+ return _deref(_current, is_associative());
+ }
+
+ template <typename NP, typename MCI>
+ inline NP const&
+ breadth_first_iterator<NP,MCI>::_current_node(
+ ::boost::mpl::false_
+ ) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename breadth_first_iterator<NP,MCI>::pointer
+ breadth_first_iterator<NP,MCI>::operator->() const
+ {
+ return _indirect(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ breadth_first_iterator<NP,MCI>::_push_child(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ _queue.push_back(itr->second);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ breadth_first_iterator<NP,MCI>::_push_child(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ _queue.push_back(*itr);
+ }
+
+ template <typename NP, typename MCI>
+ void
+ breadth_first_iterator<NP,MCI>::_push_children(
+ NP const& node
+ , ::boost::mpl::true_
+ )
+ {
+ child_iterator itr_end = node->get_child_end();
+
+ for (
+ child_iterator itr = node->get_child_begin();
+ itr != itr_end;
+ ++itr
+ )
+ {
+ _queue.push_back(itr);
+ }
+ }
+
+ template <typename NP, typename MCI>
+ void
+ breadth_first_iterator<NP,MCI>::_push_children(
+ NP const& node
+ , ::boost::mpl::false_
+ )
+ {
+ child_iterator itr_end = node->get_child_end();
+
+ for (
+ child_iterator itr = node->get_child_begin();
+ itr != itr_end;
+ ++itr
+ )
+ {
+ _push_child(itr, is_associative());
+ }
+ }
+
+ template <typename NP, typename MCI>
+ inline void breadth_first_iterator<NP,MCI>::_pop()
+ {
+ if (_queue.empty())
+ {
+ _state = no_traversal;
+ }
+ else
+ {
+ _current = _queue.front();
+ _queue.pop_front();
+ }
+ }
+
+ template <typename NP, typename MCI>
+ inline breadth_first_iterator<NP,MCI>&
+ breadth_first_iterator<NP,MCI>::operator++()
+ {
+ MCI mci;
+ _push_children(_current_node(mci), mci);
+ _pop();
+ return *this;
+ }
+
+ template <typename NP, typename MCI>
+ inline breadth_first_iterator<NP,MCI>
+ breadth_first_iterator<NP,MCI>::operator++(int)
+ {
+ breadth_first_iterator<NP,MCI> itr(*this);
+ ++(*this);
+ return itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline breadth_first_iterator<NP,MCI>::operator traversal_state() const
+ {
+ return _state;
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__breadth_first_iterator__operator_equals
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator==(
+ breadth_first_iterator<NP1,MCI1> const& lhs
+ , breadth_first_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ breadth_first_iterator<NP1,MCI1> const& lhs
+ , breadth_first_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ if (lhs._state == rhs._state)
+ {
+ return lhs._state ? (lhs._current == rhs._current) : !rhs._state;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__breadth_first_iterator__operator_not_equal
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator!=(
+ breadth_first_iterator<NP1,MCI1> const& lhs
+ , breadth_first_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator!=(
+ breadth_first_iterator<NP1,MCI1> const& lhs
+ , breadth_first_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ return !(lhs == rhs);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_breadth_first_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ breadth_first_iterator<NodePointer,::boost::mpl::false_>
+ make_breadth_first_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline breadth_first_iterator<NodePointer,::boost::mpl::false_>
+ make_breadth_first_iterator(NodePointer const& node)
+ {
+ return breadth_first_iterator<NodePointer,::boost::mpl::false_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_breadth_first_descendant_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ breadth_first_iterator<NodePointer,::boost::mpl::true_>
+ make_breadth_first_descendant_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline breadth_first_iterator<NodePointer,::boost::mpl::true_>
+ make_breadth_first_descendant_iterator(NodePointer const& node)
+ {
+ return breadth_first_iterator<NodePointer,::boost::mpl::true_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__breadth_first_iterate
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ breadth_first_iterate(NodePointer const& node, UnaryFunction function);
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void breadth_first_iterate(NodePointer const& node, UnaryFunction function)
+ {
+ for (
+ breadth_first_iterator<NodePointer,::boost::mpl::false_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__breadth_first_iterate_descendants
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ breadth_first_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ );
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ breadth_first_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ )
+ {
+ for (
+ breadth_first_iterator<NodePointer,::boost::mpl::true_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_BREADTH_FIRST_ITERATOR_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/depth_first_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/depth_first_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,545 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_DEPTH_FIRST_ITERATOR_HPP_INCLUDED
+#define BOOST_TREE_NODE_DEPTH_FIRST_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <deque>
+#include <boost/config.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#endif
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/detail/metafunction/element_type.hpp>
+#include <boost/tree_node/traversal_state.hpp>
+
+//[reference__depth_first_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename MimicsChildIterator>
+ class depth_first_iterator
+ {
+ //<-
+ typedef typename ::boost::mpl::eval_if<
+ ::std::tr1::is_pointer<NodePointer>
+ , ::std::tr1::remove_pointer<NodePointer>
+ , ::boost::detail::element_type<NodePointer>
+ >::type
+ element_type;
+ typedef typename ::std::tr1::remove_const<element_type>::type
+ node_type;
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_const<element_type>
+ , typename node_type::const_child_iterator
+ , typename node_type::child_iterator
+ >::type
+ child_iterator;
+ typedef typename ::std::iterator_traits<child_iterator>::value_type
+ child_value;
+ typedef typename ::boost::fusion::traits::is_sequence<
+ child_value
+ >::type
+ is_associative;
+ //->
+
+ public:
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_value
+ , NodePointer
+ >::type
+ //->
+ value_type;
+ typedef value_type const&
+ reference;
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , value_type const*
+ >::type
+ //->
+ pointer;
+ typedef ::std::ptrdiff_t
+ distance_type;
+ typedef ::std::forward_iterator_tag
+ iterator_category;
+
+ //<-
+ private:
+#ifndef BOOST_NO_SFINAE
+ struct enabler
+ {
+ };
+#endif
+
+ ::std::deque<NodePointer> _node_stack;
+ ::std::deque<child_iterator> _itr_stack;
+ NodePointer _current_node;
+ child_iterator _current_itr;
+ traversal_state _state;
+
+ public:
+ //->
+ depth_first_iterator();
+
+ explicit depth_first_iterator(NodePointer const& node);
+
+ template <typename NP, typename MCI>
+ depth_first_iterator(
+ depth_first_iterator<NP,MCI> const& other
+//<-
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP,NodePointer>
+ , ::boost::mpl::equal_to<MCI,MimicsChildIterator>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type = enabler()
+#endif
+//->
+ );
+
+ reference operator*() const;
+
+ pointer operator->() const;
+
+ depth_first_iterator& operator++();
+
+ depth_first_iterator operator++(int);
+
+ operator traversal_state() const;
+
+ //<-
+ private:
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::true_);
+
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::false_);
+
+ reference _deref(::boost::mpl::true_) const;
+
+ reference _deref(::boost::mpl::false_) const;
+
+ pointer _indirect(::boost::mpl::true_) const;
+
+ pointer _indirect(::boost::mpl::false_) const;
+
+ void _initialize(::boost::mpl::true_);
+
+ void _initialize(::boost::mpl::false_);
+
+ void _set_state(::boost::mpl::true_);
+
+ void _set_state(::boost::mpl::false_);
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ friend bool
+#else
+ friend typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ depth_first_iterator<NP1,MCI1> const& lhs
+ , depth_first_iterator<NP2,MCI2> const& rhs
+ );
+ //->
+ };
+
+ //<-
+ template <typename NP, typename MCI>
+ depth_first_iterator<NP,MCI>::depth_first_iterator()
+ : _node_stack()
+ , _itr_stack()
+ , _current_node()
+ , _current_itr()
+ , _state(no_traversal)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ depth_first_iterator<NP,MCI>::depth_first_iterator(NP const& node)
+ : _node_stack()
+ , _itr_stack()
+ , _current_node(node)
+ , _current_itr()
+ , _state(node ? pre_order_traversal : no_traversal)
+ {
+ if (node)
+ {
+ _itr_stack.push_back(node->get_child_begin());
+ _initialize(MCI());
+ }
+ }
+
+ template <typename NP1, typename MCI1>
+ template <typename NP2, typename MCI2>
+ depth_first_iterator<NP1,MCI1>::depth_first_iterator(
+ depth_first_iterator<NP2,MCI2> const& other
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP2,NP1>
+ , ::boost::mpl::equal_to<MCI2,MCI1>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type
+#endif
+ ) : _node_stack(other._node_stack.begin(), other._node_stack.end())
+ , _itr_stack(other._itr_stack.begin(), other._itr_stack.end())
+ , _current_node(other._current_node)
+ , _current_itr(other._current_itr)
+ , _state(other._state)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ depth_first_iterator<NP,MCI>::_initialize(::boost::mpl::true_)
+ {
+ ++(*this);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ depth_first_iterator<NP,MCI>::_initialize(::boost::mpl::false_)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::reference
+ depth_first_iterator<NP,MCI>::_deref(::boost::mpl::true_) const
+ {
+ return *_current_itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::reference
+ depth_first_iterator<NP,MCI>::_deref(::boost::mpl::false_) const
+ {
+ return _current_node;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::reference
+ depth_first_iterator<NP,MCI>::operator*() const
+ {
+ return _deref(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::pointer
+ depth_first_iterator<NP,MCI>::_indirect(::boost::mpl::true_) const
+ {
+ return _current_itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::pointer
+ depth_first_iterator<NP,MCI>::_indirect(::boost::mpl::false_) const
+ {
+ return &_current_node;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename depth_first_iterator<NP,MCI>::pointer
+ depth_first_iterator<NP,MCI>::operator->() const
+ {
+ return _indirect(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ depth_first_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ return itr->second;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ depth_first_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ return *itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline void depth_first_iterator<NP,MCI>::_set_state(::boost::mpl::true_)
+ {
+ _state = _node_stack.empty() ? no_traversal : post_order_traversal;
+ }
+
+ template <typename NP, typename MCI>
+ inline void depth_first_iterator<NP,MCI>::_set_state(::boost::mpl::false_)
+ {
+ _state = post_order_traversal;
+ }
+
+ template <typename NP, typename MCI>
+ depth_first_iterator<NP,MCI>&
+ depth_first_iterator<NP,MCI>::operator++()
+ {
+ if (_state == post_order_traversal)
+ {
+ _itr_stack.pop_back();
+
+ if (_node_stack.empty())
+ {
+ _state = no_traversal;
+
+ while (!_itr_stack.empty())
+ {
+ _itr_stack.pop_back();
+ }
+ }
+ else
+ {
+ _current_node = _node_stack.back();
+ _node_stack.pop_back();
+
+ if (++_current_itr == _current_node->get_child_end())
+ {
+ _set_state(MCI());
+
+ if (_state)
+ {
+ child_iterator itr = _itr_stack.back();
+
+ _itr_stack.pop_back();
+
+ if (!_itr_stack.empty())
+ {
+ _current_itr = _itr_stack.back();
+ }
+
+ _itr_stack.push_back(itr);
+ }
+ else
+ {
+ while (!_itr_stack.empty())
+ {
+ _itr_stack.pop_back();
+ }
+ }
+ }
+ else
+ {
+ _itr_stack.pop_back();
+ _node_stack.push_back(_current_node);
+ _itr_stack.push_back(_current_itr);
+ _current_node = _deref(_current_itr, is_associative());
+ _state = pre_order_traversal;
+ _itr_stack.push_back(_current_node->get_child_begin());
+ }
+ }
+ }
+ else
+ {
+ child_iterator& itr = _itr_stack.back();
+
+ if (itr == _current_node->get_child_end())
+ {
+ _set_state(MCI());
+ }
+ else
+ {
+ _node_stack.push_back(_current_node);
+ _current_itr = itr;
+ _current_node = _deref(itr, is_associative());
+ _state = pre_order_traversal;
+ _itr_stack.push_back(_current_node->get_child_begin());
+ }
+ }
+
+ return *this;
+ }
+
+ template <typename NP, typename MCI>
+ inline depth_first_iterator<NP,MCI>
+ depth_first_iterator<NP,MCI>::operator++(int)
+ {
+ depth_first_iterator<NP,MCI> itr(*this);
+ ++(*this);
+ return itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline depth_first_iterator<NP,MCI>::operator traversal_state() const
+ {
+ return _state;
+ }
+ //->
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator==(
+ depth_first_iterator<NP1,MCI1> const& lhs
+ , depth_first_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ depth_first_iterator<NP1,MCI1> const& lhs
+ , depth_first_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ if (lhs._state == rhs._state)
+ {
+ return lhs._state ? (*lhs == *rhs) : !rhs._state;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //->
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator!=(
+ depth_first_iterator<NP1,MCI1> const& lhs
+ , depth_first_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator!=(
+ depth_first_iterator<NP1,MCI1> const& lhs
+ , depth_first_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ return !(lhs == rhs);
+ }
+ //->
+
+ template <typename NodePointer>
+ depth_first_iterator<NodePointer,::boost::mpl::false_>
+ make_depth_first_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline depth_first_iterator<NodePointer,::boost::mpl::false_>
+ make_depth_first_iterator(NodePointer const& node)
+ {
+ return depth_first_iterator<NodePointer,::boost::mpl::false_>(node);
+ }
+ //->
+
+ template <typename NodePointer>
+ depth_first_iterator<NodePointer,::boost::mpl::true_>
+ make_depth_first_descendant_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline depth_first_iterator<NodePointer,::boost::mpl::true_>
+ make_depth_first_descendant_iterator(NodePointer const& node)
+ {
+ return depth_first_iterator<NodePointer,::boost::mpl::true_>(node);
+ }
+ //->
+
+ template <typename NodePointer, typename BinaryFunction>
+ void depth_first_iterate(NodePointer const& node, BinaryFunction function);
+
+ //<-
+ template <typename NodePointer, typename BinaryFunction>
+ void depth_first_iterate(NodePointer const& node, BinaryFunction function)
+ {
+ for (
+ depth_first_iterator<NodePointer,::boost::mpl::false_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr, traversal_state(itr));
+ }
+ }
+ //->
+
+ template <typename NodePointer, typename BinaryFunction>
+ void
+ depth_first_iterate_descendants(
+ NodePointer const& node
+ , BinaryFunction function
+ );
+
+ //<-
+ template <typename NodePointer, typename BinaryFunction>
+ void
+ depth_first_iterate_descendants(
+ NodePointer const& node
+ , BinaryFunction function
+ )
+ {
+ for (
+ depth_first_iterator<NodePointer,::boost::mpl::true_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr, traversal_state(itr));
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_DEPTH_FIRST_ITERATOR_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/post_order_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/post_order_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,616 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_POST_ORDER_ITERATOR_HPP_INCLUDED
+#define BOOST_TREE_NODE_POST_ORDER_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <deque>
+#include <boost/config.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#endif
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/detail/metafunction/element_type.hpp>
+#include <boost/tree_node/traversal_state.hpp>
+
+//[reference__post_order_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename MimicsChildIterator>
+ class post_order_iterator
+ {
+ //<-
+ typedef typename ::boost::mpl::eval_if<
+ ::std::tr1::is_pointer<NodePointer>
+ , ::std::tr1::remove_pointer<NodePointer>
+ , ::boost::detail::element_type<NodePointer>
+ >::type
+ element_type;
+ typedef typename ::std::tr1::remove_const<element_type>::type
+ node_type;
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_const<element_type>
+ , typename node_type::const_child_iterator
+ , typename node_type::child_iterator
+ >::type
+ child_iterator;
+ typedef typename ::std::iterator_traits<child_iterator>::value_type
+ child_value;
+ typedef typename ::boost::fusion::traits::is_sequence<
+ child_value
+ >::type
+ is_associative;
+ typedef typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , NodePointer
+ >::type
+ stack_element;
+ //->
+
+ public:
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_value
+ , NodePointer
+ >::type
+ //->
+ value_type;
+ typedef value_type const&
+ reference;
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , value_type const*
+ >::type
+ //->
+ pointer;
+ typedef ::std::ptrdiff_t
+ distance_type;
+ typedef ::std::forward_iterator_tag
+ iterator_category;
+
+ //<-
+ private:
+ struct enabler
+ {
+ };
+
+ std::deque<stack_element> _stack;
+ stack_element _current;
+ traversal_state _state;
+
+ public:
+ //->
+ post_order_iterator();
+
+ explicit post_order_iterator(NodePointer const& node);
+
+ template <typename NP, typename MCI>
+ post_order_iterator(
+ post_order_iterator<NP,MCI> const& other
+//<-
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP,NodePointer>
+ , ::boost::mpl::equal_to<MCI,MimicsChildIterator>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type = enabler()
+#endif
+//->
+ );
+
+ reference operator*() const;
+
+ pointer operator->() const;
+
+ post_order_iterator& operator++();
+
+ post_order_iterator operator++(int);
+
+ operator traversal_state() const;
+
+ //<-
+ private:
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::true_);
+
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::false_);
+
+ reference _deref(::boost::mpl::true_) const;
+
+ reference _deref(::boost::mpl::false_) const;
+
+ pointer _indirect(::boost::mpl::true_) const;
+
+ pointer _indirect(::boost::mpl::false_) const;
+
+ NodePointer _current_node(::boost::mpl::true_) const;
+
+ NodePointer const& _current_node(::boost::mpl::false_) const;
+
+ void _push_child(child_iterator const&, ::boost::mpl::true_);
+
+ void _push_child(child_iterator const&, ::boost::mpl::false_);
+
+ void _push_child_itr(child_iterator const&, ::boost::mpl::true_);
+
+ void _push_child_itr(child_iterator const&, ::boost::mpl::false_);
+
+ void _start(NodePointer const&);
+
+ void _initialize(NodePointer const&, ::boost::mpl::true_);
+
+ void _initialize(NodePointer const&, ::boost::mpl::false_);
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ friend bool
+#else
+ friend typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ post_order_iterator<NP1,MCI1> const& lhs
+ , post_order_iterator<NP2,MCI2> const& rhs
+ );
+ //->
+ };
+
+ //<-
+ template <typename NP, typename MCI>
+ post_order_iterator<NP,MCI>::post_order_iterator()
+ : _stack(), _current(), _state(no_traversal)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ post_order_iterator<NP,MCI>::post_order_iterator(NP const& node)
+ : _stack()
+ , _current()
+ , _state(node ? post_order_traversal : no_traversal)
+ {
+ if (node)
+ {
+ _initialize(node, MCI());
+ }
+ }
+
+ template <typename NP1, typename MCI1>
+ template <typename NP2, typename MCI2>
+ post_order_iterator<NP1,MCI1>::post_order_iterator(
+ post_order_iterator<NP2,MCI2> const& other
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP2,NP1>
+ , ::boost::mpl::equal_to<MCI2,MCI1>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type
+#endif
+ ) : _stack(other._stack.begin(), other._stack.end())
+ , _current(other._current)
+ , _state(other._state)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::reference
+ post_order_iterator<NP,MCI>::_deref(::boost::mpl::true_) const
+ {
+ return *_current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::reference
+ post_order_iterator<NP,MCI>::_deref(::boost::mpl::false_) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::reference
+ post_order_iterator<NP,MCI>::operator*() const
+ {
+ return _deref(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::pointer
+ post_order_iterator<NP,MCI>::_indirect(::boost::mpl::true_) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::pointer
+ post_order_iterator<NP,MCI>::_indirect(::boost::mpl::false_) const
+ {
+ return &_current;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename post_order_iterator<NP,MCI>::pointer
+ post_order_iterator<NP,MCI>::operator->() const
+ {
+ return _indirect(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ post_order_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ return itr->second;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ post_order_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ return *itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ post_order_iterator<NP,MCI>::_current_node(::boost::mpl::true_) const
+ {
+ return _deref(_current, is_associative());
+ }
+
+ template <typename NP, typename MCI>
+ inline NP const&
+ post_order_iterator<NP,MCI>::_current_node(::boost::mpl::false_) const
+ {
+ return _current;
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_push_child(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ _stack.push_back(itr->second);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_push_child(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ _stack.push_back(*itr);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_push_child_itr(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ _stack.push_back(itr);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_push_child_itr(
+ child_iterator const& itr
+ , boost::mpl::false_
+ )
+ {
+ _push_child(itr, is_associative());
+ }
+
+ template <typename NP, typename MCI>
+ void post_order_iterator<NP,MCI>::_start(NP const& n)
+ {
+ child_iterator itr = n->get_child_begin();
+ child_iterator itr_end = n->get_child_end();
+
+ if (itr != itr_end)
+ {
+ NP node(n);
+ ::std::deque<child_iterator> pre_order_stack;
+
+ for (;;)
+ {
+ while (itr != itr_end)
+ {
+ pre_order_stack.push_back(itr);
+ ++itr;
+ }
+
+ _push_child_itr(pre_order_stack.back(), MCI());
+ node = _deref(pre_order_stack.back(), is_associative());
+ pre_order_stack.pop_back();
+
+ if (pre_order_stack.empty())
+ {
+ _current = _stack.back();
+ node = _current_node(MCI());
+ itr = node->get_child_begin();
+ itr_end = node->get_child_end();
+
+ if (itr == itr_end)
+ {
+ _stack.pop_back();
+ break;
+ }
+ }
+ else
+ {
+ itr = node->get_child_begin();
+ itr_end = node->get_child_end();
+ }
+ }
+ }
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_initialize(
+ NP const& node
+ , ::boost::mpl::true_
+ )
+ {
+ _start(node);
+
+ if (_stack.empty())
+ {
+ _state = no_traversal;
+ }
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ post_order_iterator<NP,MCI>::_initialize(
+ NP const& node
+ , ::boost::mpl::false_
+ )
+ {
+ _stack.push_back(_current = node);
+ _start(node);
+ }
+
+ template <typename NP, typename MCI>
+ inline post_order_iterator<NP,MCI>&
+ post_order_iterator<NP,MCI>::operator++()
+ {
+ if (_stack.empty())
+ {
+ _state = no_traversal;
+ }
+ else
+ {
+ _current = _stack.back();
+ _stack.pop_back();
+ }
+
+ return *this;
+ }
+
+ template <typename NP, typename MCI>
+ inline post_order_iterator<NP,MCI>
+ post_order_iterator<NP,MCI>::operator++(int)
+ {
+ post_order_iterator<NP,MCI> itr(*this);
+ ++(*this);
+ return itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline post_order_iterator<NP,MCI>::operator traversal_state() const
+ {
+ return _state;
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__post_order_iterator__operator_equals
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator==(
+ post_order_iterator<NP1,MCI1> const& lhs
+ , post_order_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ post_order_iterator<NP1,MCI1> const& lhs
+ , post_order_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ if (lhs._state == rhs._state)
+ {
+ return lhs._state ? (lhs._current == rhs._current) : !rhs._state;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__post_order_iterator__operator_not_equal
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator!=(
+ post_order_iterator<NP1,MCI1> const& lhs
+ , post_order_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator!=(
+ post_order_iterator<NP1,MCI1> const& lhs
+ , post_order_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ return !(lhs == rhs);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_post_order_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ post_order_iterator<NodePointer,::boost::mpl::false_>
+ make_post_order_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline post_order_iterator<NodePointer,::boost::mpl::false_>
+ make_post_order_iterator(NodePointer const& node)
+ {
+ return post_order_iterator<NodePointer,::boost::mpl::false_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_post_order_descendant_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ post_order_iterator<NodePointer,::boost::mpl::true_>
+ make_post_order_descendant_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline post_order_iterator<NodePointer,::boost::mpl::true_>
+ make_post_order_descendant_iterator(NodePointer const& node)
+ {
+ return post_order_iterator<NodePointer,::boost::mpl::true_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__post_order_iterate
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void post_order_iterate(NodePointer const& node, UnaryFunction function);
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void post_order_iterate(NodePointer const& node, UnaryFunction function)
+ {
+ for (
+ post_order_iterator<NodePointer,::boost::mpl::false_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__post_order_iterate_descendants
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ post_order_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ );
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ post_order_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ )
+ {
+ for (
+ post_order_iterator<NodePointer,::boost::mpl::true_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_POST_ORDER_ITERATOR_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/pre_order_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/pre_order_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,547 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_PRE_ORDER_ITERATOR_HPP_INCLUDED
+#define BOOST_TREE_NODE_PRE_ORDER_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <deque>
+#include <boost/config.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#endif
+#include <boost/utility/enable_if.hpp>
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/detail/metafunction/element_type.hpp>
+#include <boost/tree_node/traversal_state.hpp>
+
+//[reference__pre_order_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename MimicsChildIterator>
+ class pre_order_iterator
+ {
+ //<-
+ typedef typename ::boost::mpl::eval_if<
+ ::std::tr1::is_pointer<NodePointer>
+ , ::std::tr1::remove_pointer<NodePointer>
+ , ::boost::detail::element_type<NodePointer>
+ >::type
+ element_type;
+ typedef typename ::std::tr1::remove_const<element_type>::type
+ node_type;
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_const<element_type>
+ , typename node_type::const_child_iterator
+ , typename node_type::child_iterator
+ >::type
+ child_iterator;
+ typedef typename ::std::iterator_traits<child_iterator>::value_type
+ child_value;
+ typedef typename ::boost::fusion::traits::is_sequence<
+ child_value
+ >::type
+ is_associative;
+ //->
+
+ public:
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_value
+ , NodePointer
+ >::type
+ //->
+ value_type;
+ typedef value_type const&
+ reference;
+ typedef // implementation_defined
+ //<-
+ typename ::boost::mpl::if_<
+ MimicsChildIterator
+ , child_iterator
+ , value_type const*
+ >::type
+ //->
+ pointer;
+ typedef ::std::ptrdiff_t
+ distance_type;
+ typedef ::std::forward_iterator_tag
+ iterator_category;
+
+ //<-
+ private:
+#ifndef BOOST_NO_SFINAE
+ struct enabler
+ {
+ };
+#endif
+
+ ::std::deque<NodePointer> _node_stack;
+ ::std::deque<child_iterator> _itr_stack;
+ NodePointer _current_node;
+ child_iterator _current_itr;
+ traversal_state _state;
+
+ public:
+ //->
+ pre_order_iterator();
+
+ explicit pre_order_iterator(NodePointer const& node);
+
+ template <typename NP, typename MCI>
+ pre_order_iterator(
+ pre_order_iterator<NP,MCI> const& other
+//<-
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP,NodePointer>
+ , ::boost::mpl::equal_to<MCI,MimicsChildIterator>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type = enabler()
+#endif
+//->
+ );
+
+ reference operator*() const;
+
+ pointer operator->() const;
+
+ pre_order_iterator& operator++();
+
+ pre_order_iterator operator++(int);
+
+ operator traversal_state() const;
+
+ //<-
+ private:
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::true_);
+
+ static NodePointer
+ _deref(child_iterator const&, ::boost::mpl::false_);
+
+ reference _deref(::boost::mpl::true_) const;
+
+ reference _deref(::boost::mpl::false_) const;
+
+ pointer _indirect(::boost::mpl::true_) const;
+
+ pointer _indirect(::boost::mpl::false_) const;
+
+ void _initialize(::boost::mpl::true_);
+
+ void _initialize(::boost::mpl::false_);
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ friend bool
+#else
+ friend typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ pre_order_iterator<NP1,MCI1> const& lhs
+ , pre_order_iterator<NP2,MCI2> const& rhs
+ );
+ //->
+ };
+
+ //<-
+ template <typename NP, typename MCI>
+ pre_order_iterator<NP,MCI>::pre_order_iterator()
+ : _node_stack()
+ , _itr_stack()
+ , _current_node()
+ , _current_itr()
+ , _state(no_traversal)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ pre_order_iterator<NP,MCI>::pre_order_iterator(NP const& node)
+ : _node_stack()
+ , _itr_stack()
+ , _current_node(node)
+ , _current_itr()
+ , _state(node ? pre_order_traversal : no_traversal)
+ {
+ if (node)
+ {
+ _itr_stack.push_back(node->get_child_begin());
+ _initialize(MCI());
+ }
+ }
+
+ template <typename NP1, typename MCI1>
+ template <typename NP2, typename MCI2>
+ pre_order_iterator<NP1,MCI1>::pre_order_iterator(
+ pre_order_iterator<NP2,MCI2> const& other
+#ifndef BOOST_NO_SFINAE
+ , typename ::boost::enable_if<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_convertible<NP2,NP1>
+ , ::boost::mpl::equal_to<MCI2,MCI1>
+ , ::boost::mpl::false_
+ >::type
+ , enabler
+ >::type
+#endif
+ ) : _node_stack(other._node_stack.begin(), other._node_stack.end())
+ , _itr_stack(other._itr_stack.begin(), other._itr_stack.end())
+ , _current_node(other._current_node)
+ , _current_itr(other._current_itr)
+ , _state(other._state)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ pre_order_iterator<NP,MCI>::_initialize(::boost::mpl::true_)
+ {
+ ++(*this);
+ }
+
+ template <typename NP, typename MCI>
+ inline void
+ pre_order_iterator<NP,MCI>::_initialize(::boost::mpl::false_)
+ {
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::reference
+ pre_order_iterator<NP,MCI>::_deref(::boost::mpl::true_) const
+ {
+ return *_current_itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::reference
+ pre_order_iterator<NP,MCI>::_deref(::boost::mpl::false_) const
+ {
+ return _current_node;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::reference
+ pre_order_iterator<NP,MCI>::operator*() const
+ {
+ return _deref(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::pointer
+ pre_order_iterator<NP,MCI>::_indirect(::boost::mpl::true_) const
+ {
+ return _current_itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::pointer
+ pre_order_iterator<NP,MCI>::_indirect(::boost::mpl::false_) const
+ {
+ return &_current_node;
+ }
+
+ template <typename NP, typename MCI>
+ inline typename pre_order_iterator<NP,MCI>::pointer
+ pre_order_iterator<NP,MCI>::operator->() const
+ {
+ return _indirect(MCI());
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ pre_order_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::true_
+ )
+ {
+ return itr->second;
+ }
+
+ template <typename NP, typename MCI>
+ inline NP
+ pre_order_iterator<NP,MCI>::_deref(
+ child_iterator const& itr
+ , ::boost::mpl::false_
+ )
+ {
+ return *itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline pre_order_iterator<NP,MCI>& pre_order_iterator<NP,MCI>::operator++()
+ {
+ if (_itr_stack.back() == _current_node->get_child_end())
+ {
+ bool is_post_order = true;
+
+ while (is_post_order)
+ {
+ _itr_stack.pop_back();
+
+ if (_node_stack.empty())
+ {
+ _state = no_traversal;
+
+ while (!_itr_stack.empty())
+ {
+ _itr_stack.pop_back();
+ }
+
+ is_post_order = false;
+ }
+ else
+ {
+ _current_node = _node_stack.back();
+ _node_stack.pop_back();
+
+ if (++_current_itr == _current_node->get_child_end())
+ {
+ child_iterator itr = _itr_stack.back();
+
+ _itr_stack.pop_back();
+
+ if (!_itr_stack.empty())
+ {
+ _current_itr = _itr_stack.back();
+ }
+
+ _itr_stack.push_back(itr);
+ }
+ else
+ {
+ _itr_stack.pop_back();
+ _node_stack.push_back(_current_node);
+ _itr_stack.push_back(_current_itr);
+ _current_node = _deref(_current_itr, is_associative());
+ _itr_stack.push_back(
+ _current_node->get_child_begin()
+ );
+ is_post_order = false;
+ }
+ }
+ }
+ }
+ else
+ {
+ _node_stack.push_back(_current_node);
+ _current_node = _deref(
+ _current_itr = _itr_stack.back()
+ , is_associative()
+ );
+ _itr_stack.push_back(_current_node->get_child_begin());
+ }
+
+ return *this;
+ }
+
+ template <typename NP, typename MCI>
+ inline pre_order_iterator<NP,MCI>
+ pre_order_iterator<NP,MCI>::operator++(int)
+ {
+ pre_order_iterator<NP,MCI> itr(*this);
+ ++(*this);
+ return itr;
+ }
+
+ template <typename NP, typename MCI>
+ inline pre_order_iterator<NP,MCI>::operator traversal_state() const
+ {
+ return _state;
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__pre_order_iterator__operator_equals
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator==(
+ pre_order_iterator<NP1,MCI1> const& lhs
+ , pre_order_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator==(
+ pre_order_iterator<NP1,MCI1> const& lhs
+ , pre_order_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ if (lhs._state == rhs._state)
+ {
+ return lhs._state ? (*lhs == *rhs) : !rhs._state;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__pre_order_iterator__operator_not_equal
+namespace boost { namespace tree_node {
+
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+//<-
+#ifdef BOOST_NO_SFINAE
+ bool
+#else
+//->
+ typename ::boost::enable_if< ::boost::mpl::equal_to<MCI1,MCI2>,bool>::type
+//<-
+#endif
+//->
+ operator!=(
+ pre_order_iterator<NP1,MCI1> const& lhs
+ , pre_order_iterator<NP2,MCI2> const& rhs
+ );
+
+ //<-
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+#ifdef BOOST_NO_SFINAE
+ inline bool
+#else
+ inline typename ::boost::enable_if<
+ ::boost::mpl::equal_to<MCI1,MCI2>
+ , bool
+ >::type
+#endif
+ operator!=(
+ pre_order_iterator<NP1,MCI1> const& lhs
+ , pre_order_iterator<NP2,MCI2> const& rhs
+ )
+ {
+ return !(lhs == rhs);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_pre_order_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ pre_order_iterator<NodePointer,::boost::mpl::false_>
+ make_pre_order_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline pre_order_iterator<NodePointer,::boost::mpl::false_>
+ make_pre_order_iterator(NodePointer const& node)
+ {
+ return pre_order_iterator<NodePointer,::boost::mpl::false_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__make_pre_order_descendant_iterator
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer>
+ pre_order_iterator<NodePointer,::boost::mpl::true_>
+ make_pre_order_descendant_iterator(NodePointer const& node);
+
+ //<-
+ template <typename NodePointer>
+ inline pre_order_iterator<NodePointer,::boost::mpl::true_>
+ make_pre_order_descendant_iterator(NodePointer const& node)
+ {
+ return pre_order_iterator<NodePointer,::boost::mpl::true_>(node);
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__pre_order_iterate
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void pre_order_iterate(NodePointer const& node, UnaryFunction function);
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void pre_order_iterate(NodePointer const& node, UnaryFunction function)
+ {
+ for (
+ pre_order_iterator<NodePointer,::boost::mpl::false_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+//[reference__pre_order_iterate_descendants
+namespace boost { namespace tree_node {
+
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ pre_order_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ );
+
+ //<-
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ pre_order_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ )
+ {
+ for (
+ pre_order_iterator<NodePointer,::boost::mpl::true_> itr(node);
+ itr;
+ ++itr
+ )
+ {
+ function(*itr);
+ }
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_PRE_ORDER_ITERATOR_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/raw_associative_node.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/raw_associative_node.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,360 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_RAW_ASSOCIATIVE_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_RAW_ASSOCIATIVE_NODE_HPP_INCLUDED
+
+#include <utility>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/tr1/tuple.hpp>
+#include <boost/utility/associative_container_gen.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+
+//[reference__raw_associative_node
+namespace boost { namespace tree_node {
+
+ template <
+ typename Key
+ , typename Data
+ , typename AssociativeContainerSelector = mapS
+ >
+ class raw_associative_node
+ {
+ public:
+ typedef Key
+ key_type;
+ typedef Data
+ data_type;
+ typedef raw_associative_node*
+ pointer;
+ typedef raw_associative_node const*
+ const_pointer;
+
+ //<-
+ private:
+ typedef typename ::boost::mpl::apply_wrap2<
+ associative_container_gen<
+ AssociativeContainerSelector
+ >
+ , Key
+ , pointer
+ >::type
+ children;
+
+ public:
+ //->
+ typedef // implementation_defined
+ //<-
+ typename children::iterator
+ //->
+ child_iterator;
+ typedef // implementation_defined
+ //<-
+ typename children::const_iterator
+ //->
+ const_child_iterator;
+
+ //<-
+ private:
+ children _children;
+ pointer _parent;
+ data_type _data;
+
+ public:
+ //->
+ raw_associative_node();
+
+ explicit raw_associative_node(data_type const& data);
+
+ raw_associative_node(raw_associative_node const& copy);
+
+ raw_associative_node&
+ operator=(raw_associative_node const& copy);
+
+ ~raw_associative_node();
+
+ data_type const& get_data() const;
+
+ data_type& get_data();
+
+ const_pointer get_parent() const;
+
+ pointer get_parent();
+
+ pointer add_child(key_type const& key, data_type const& data);
+
+ pointer add_child(key_type const& key);
+
+ pointer add_child_copy(key_type const& key, const_pointer const& copy);
+
+ const_child_iterator get_child_begin() const;
+
+ child_iterator get_child_begin();
+
+ const_child_iterator get_child_end() const;
+
+ child_iterator get_child_end();
+
+ const_child_iterator find_child(key_type const& key) const;
+
+ child_iterator find_child(key_type const& key);
+
+ ::std::pair<const_child_iterator,const_child_iterator>
+ find_children(key_type const& key) const;
+
+ ::std::pair<child_iterator,child_iterator>
+ find_children(key_type const& key);
+
+ ::std::size_t remove_children(key_type const& key);
+
+ void remove_all_children();
+ };
+
+ //<-
+ template <typename K, typename D, typename A>
+ raw_associative_node<K,D,A>::raw_associative_node()
+ : _children(), _parent(), _data()
+ {
+ }
+
+ template <typename K, typename D, typename A>
+ raw_associative_node<K,D,A>::raw_associative_node(data_type const& data)
+ : _children(), _parent(), _data(data)
+ {
+ }
+
+ template <typename K, typename D, typename A>
+ raw_associative_node<K,D,A>::raw_associative_node(
+ raw_associative_node const& copy
+ ) : _children(), _parent(), _data(copy._data)
+ {
+ pointer p = this;
+
+ for (
+ depth_first_iterator<const_pointer,::boost::mpl::true_> copy_itr(
+ &copy
+ );
+ copy_itr;
+ ++copy_itr
+ )
+ {
+ switch (traversal_state(copy_itr))
+ {
+ case pre_order_traversal:
+ {
+ p = p->add_child(
+ copy_itr->first
+ , copy_itr->second->get_data()
+ );
+ break;
+ }
+
+ case post_order_traversal:
+ {
+ p = p->_parent;
+ break;
+ }
+ }
+ }
+ }
+
+ template <typename K, typename D, typename A>
+ raw_associative_node<K,D,A>&
+ raw_associative_node<K,D,A>::operator=(
+ raw_associative_node const& copy
+ )
+ {
+ if (this != &copy)
+ {
+ raw_associative_node temp_copy(copy);
+
+ remove_all_children();
+ _children = temp_copy._children;
+ _data = temp_copy._data;
+ temp_copy._children.clear();
+
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ itr->second->_parent = this;
+ }
+ }
+
+ return *this;
+ }
+
+ template <typename K, typename D, typename A>
+ raw_associative_node<K,D,A>::~raw_associative_node()
+ {
+ remove_all_children();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::data_type const&
+ raw_associative_node<K,D,A>::get_data() const
+ {
+ return _data;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::data_type&
+ raw_associative_node<K,D,A>::get_data()
+ {
+ return _data;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::const_pointer
+ raw_associative_node<K,D,A>::get_parent() const
+ {
+ return _parent;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::pointer
+ raw_associative_node<K,D,A>::get_parent()
+ {
+ return _parent;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::pointer
+ raw_associative_node<K,D,A>::add_child(
+ key_type const& key
+ , data_type const& data
+ )
+ {
+ pointer child(new raw_associative_node(data));
+
+ child->_parent = this;
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::pointer
+ raw_associative_node<K,D,A>::add_child(key_type const& key)
+ {
+ pointer child(new raw_associative_node());
+
+ child->_parent = this;
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::pointer
+ raw_associative_node<K,D,A>::add_child_copy(
+ key_type const& key
+ , const_pointer const& copy
+ )
+ {
+ pointer child(new raw_associative_node(*copy));
+
+ child->_parent = this;
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::const_child_iterator
+ raw_associative_node<K,D,A>::get_child_begin() const
+ {
+ return _children.begin();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::child_iterator
+ raw_associative_node<K,D,A>::get_child_begin()
+ {
+ return _children.begin();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::const_child_iterator
+ raw_associative_node<K,D,A>::get_child_end() const
+ {
+ return _children.end();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::child_iterator
+ raw_associative_node<K,D,A>::get_child_end()
+ {
+ return _children.end();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::const_child_iterator
+ raw_associative_node<K,D,A>::find_child(key_type const& key) const
+ {
+ return _children.find(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename raw_associative_node<K,D,A>::child_iterator
+ raw_associative_node<K,D,A>::find_child(key_type const& key)
+ {
+ return _children.find(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline ::std::pair<
+ typename raw_associative_node<K,D,A>::const_child_iterator
+ , typename raw_associative_node<K,D,A>::const_child_iterator
+ >
+ raw_associative_node<K,D,A>::find_children(key_type const& key) const
+ {
+ return _children.equal_range(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline ::std::pair<
+ typename raw_associative_node<K,D,A>::child_iterator
+ , typename raw_associative_node<K,D,A>::child_iterator
+ >
+ raw_associative_node<K,D,A>::find_children(key_type const& key)
+ {
+ return _children.equal_range(key);
+ }
+
+ template <typename K, typename D, typename A>
+ ::std::size_t
+ raw_associative_node<K,D,A>::remove_children(key_type const& key)
+ {
+ child_iterator itr, itr_end;
+
+ for (
+ ::std::tr1::tie(itr, itr_end) = _children.equal_range(key);
+ itr != itr_end;
+ ++itr
+ )
+ {
+ delete itr->second;
+ }
+
+ return _children.erase(key);
+ }
+
+ template <typename K, typename D, typename A>
+ void raw_associative_node<K,D,A>::remove_all_children()
+ {
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ delete itr->second;
+ }
+
+ _children.clear();
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_RAW_ASSOCIATIVE_NODE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/raw_node.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/raw_node.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,277 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_RAW_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_RAW_NODE_HPP_INCLUDED
+
+#include <deque>
+#include <boost/mpl/bool.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+
+//[reference__raw_node
+namespace boost { namespace tree_node {
+
+ template <typename T>
+ class raw_node
+ {
+ public:
+ typedef T
+ data_type;
+ typedef raw_node*
+ pointer;
+ typedef raw_node const*
+ const_pointer;
+
+ //<-
+ private:
+ typedef ::std::deque<pointer>
+ children;
+
+ public:
+ //->
+ typedef // implementation_defined
+ //<-
+ typename children::iterator
+ //->
+ child_iterator;
+ typedef // implementation_defined
+ //<-
+ typename children::const_iterator
+ //->
+ const_child_iterator;
+
+ //<-
+ private:
+ children _children;
+ pointer _parent;
+ data_type _data;
+
+ raw_node(data_type const& data, pointer const& parent);
+
+ explicit raw_node(pointer const& parent);
+
+ public:
+ //->
+ raw_node();
+
+ explicit raw_node(data_type const& data);
+
+ raw_node(raw_node const& copy);
+
+ raw_node& operator=(raw_node const& copy);
+
+ ~raw_node();
+
+ data_type const& get_data() const;
+
+ data_type& get_data();
+
+ const_pointer get_parent() const;
+
+ pointer get_parent();
+
+ pointer add_child(data_type const& data);
+
+ pointer add_child();
+
+ pointer add_child_copy(const_pointer const& copy);
+
+ const_child_iterator get_child_begin() const;
+
+ child_iterator get_child_begin();
+
+ const_child_iterator get_child_end() const;
+
+ child_iterator get_child_end();
+
+ void remove_all_children();
+ };
+
+ //<-
+ template <typename T>
+ raw_node<T>::raw_node(data_type const& data, pointer const& parent)
+ : _children(), _parent(parent), _data(data)
+ {
+ if (parent)
+ {
+ parent->_children.push_back(this);
+ }
+ }
+
+ template <typename T>
+ raw_node<T>::raw_node(pointer const& parent)
+ : _children(), _parent(parent), _data()
+ {
+ if (parent)
+ {
+ parent->_children.push_back(this);
+ }
+ }
+
+ template <typename T>
+ raw_node<T>::raw_node() : _children(), _parent(), _data()
+ {
+ }
+
+ template <typename T>
+ raw_node<T>::raw_node(data_type const& data)
+ : _children(), _parent(), _data(data)
+ {
+ }
+
+ template <typename T>
+ raw_node<T>::raw_node(raw_node const& copy)
+ : _children(), _parent(), _data(copy._data)
+ {
+ pointer p = this;
+
+ for (
+ depth_first_iterator<const_pointer,::boost::mpl::true_> copy_itr(
+ &copy
+ );
+ copy_itr;
+ ++copy_itr
+ )
+ {
+ switch (traversal_state(copy_itr))
+ {
+ case pre_order_traversal:
+ {
+ p = p->add_child((*copy_itr)->get_data());
+ break;
+ }
+
+ case post_order_traversal:
+ {
+ p = p->_parent;
+ break;
+ }
+ }
+ }
+ }
+
+ template <typename T>
+ raw_node<T>& raw_node<T>::operator=(raw_node const& copy)
+ {
+ if (this != &copy)
+ {
+ raw_node temp_copy(copy);
+
+ remove_all_children();
+ _children = temp_copy._children;
+ _data = temp_copy._data;
+ temp_copy._children.clear();
+
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ (*itr)->_parent = this;
+ }
+ }
+
+ return *this;
+ }
+
+ template <typename T>
+ raw_node<T>::~raw_node()
+ {
+ remove_all_children();
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::data_type const& raw_node<T>::get_data() const
+ {
+ return _data;
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::data_type& raw_node<T>::get_data()
+ {
+ return _data;
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::const_pointer raw_node<T>::get_parent() const
+ {
+ return _parent;
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::pointer raw_node<T>::get_parent()
+ {
+ return _parent;
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::pointer
+ raw_node<T>::add_child(data_type const& data)
+ {
+ return new raw_node(data, this);
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::pointer raw_node<T>::add_child()
+ {
+ return new raw_node(this);
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::pointer
+ raw_node<T>::add_child_copy(const_pointer const& copy)
+ {
+ pointer child = new raw_node(*copy);
+
+ child->_parent = this;
+ _children.push_back(child);
+ return child;
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::const_child_iterator
+ raw_node<T>::get_child_begin() const
+ {
+ return _children.begin();
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::child_iterator
+ raw_node<T>::get_child_begin()
+ {
+ return _children.begin();
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::const_child_iterator
+ raw_node<T>::get_child_end() const
+ {
+ return _children.end();
+ }
+
+ template <typename T>
+ inline typename raw_node<T>::child_iterator
+ raw_node<T>::get_child_end()
+ {
+ return _children.end();
+ }
+
+ template <typename T>
+ void raw_node<T>::remove_all_children()
+ {
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ delete *itr;
+ }
+
+ _children.clear();
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_RAW_NODE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/simple_associative_node.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/simple_associative_node.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,362 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_SIMPLE_ASSOCIATIVE_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_SIMPLE_ASSOCIATIVE_NODE_HPP_INCLUDED
+
+#include <utility>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/tr1/memory.hpp>
+#include <boost/tr1/tuple.hpp>
+#include <boost/utility/associative_container_gen.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+
+//[reference__simple_associative_node
+namespace boost { namespace tree_node {
+
+ template <
+ typename Key
+ , typename Data
+ , typename AssociativeContainerSelector = mapS
+ >
+ class simple_associative_node
+ : public ::std::tr1::enable_shared_from_this<
+ simple_associative_node<Key,Data,AssociativeContainerSelector>
+ >
+ , private noncopyable
+ {
+ public:
+ typedef Key
+ key_type;
+ typedef Data
+ data_type;
+ typedef ::std::tr1::shared_ptr<simple_associative_node>
+ pointer;
+ typedef ::std::tr1::shared_ptr<simple_associative_node const>
+ const_pointer;
+
+ //<-
+ private:
+ typedef typename ::boost::mpl::apply_wrap2<
+ associative_container_gen<
+ AssociativeContainerSelector
+ >
+ , key_type
+ , pointer
+ >::type
+ children;
+
+ public:
+ //->
+ typedef // implementation_defined
+ //<-
+ typename children::iterator
+ //->
+ child_iterator;
+ typedef // implementation_defined
+ //<-
+ typename children::const_iterator
+ //->
+ const_child_iterator;
+
+ //<-
+ private:
+ children _children;
+ ::std::tr1::weak_ptr<simple_associative_node> _parent;
+ data_type _data;
+
+ simple_associative_node();
+
+ explicit simple_associative_node(data_type const& data);
+
+ public:
+ //->
+ ~simple_associative_node();
+
+ data_type const& get_data() const;
+
+ data_type& get_data();
+
+ const_pointer get_parent() const;
+
+ pointer get_parent();
+
+ pointer add_child(key_type const& key, data_type const& data);
+
+ pointer add_child(key_type const& key);
+
+ pointer add_child_copy(key_type const& key, const_pointer const& copy);
+
+ const_child_iterator get_child_begin() const;
+
+ child_iterator get_child_begin();
+
+ const_child_iterator get_child_end() const;
+
+ child_iterator get_child_end();
+
+ const_child_iterator find_child(key_type const& key) const;
+
+ child_iterator find_child(key_type const& key);
+
+ ::std::pair<const_child_iterator,const_child_iterator>
+ find_children(key_type const& key) const;
+
+ ::std::pair<child_iterator,child_iterator>
+ find_children(key_type const& key);
+
+ ::std::size_t remove_children(Key const& key);
+
+ void remove_all_children();
+
+ static pointer create(data_type const& data);
+
+ static pointer create();
+
+ static pointer create_copy(const_pointer const& p);
+ };
+
+ //<-
+ template <typename K, typename D, typename A>
+ simple_associative_node<K,D,A>::simple_associative_node()
+ : _children(), _parent(), _data()
+ {
+ }
+
+ template <typename K, typename D, typename A>
+ simple_associative_node<K,D,A>::simple_associative_node(data_type const& d)
+ : _children(), _parent(), _data(d)
+ {
+ }
+
+ template <typename K, typename D, typename A>
+ simple_associative_node<K,D,A>::~simple_associative_node()
+ {
+ remove_all_children();
+ _parent.reset();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::data_type const&
+ simple_associative_node<K,D,A>::get_data() const
+ {
+ return _data;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::data_type&
+ simple_associative_node<K,D,A>::get_data()
+ {
+ return _data;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::const_pointer
+ simple_associative_node<K,D,A>::get_parent() const
+ {
+ return const_pointer(_parent.lock());
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::get_parent()
+ {
+ return pointer(_parent.lock());
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::add_child(
+ key_type const& key
+ , data_type const& data
+ )
+ {
+ pointer child(new simple_associative_node(data));
+
+ child->_parent = this->shared_from_this();
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::add_child(key_type const& key)
+ {
+ pointer child(new simple_associative_node());
+
+ child->_parent = this->shared_from_this();
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::add_child_copy(
+ key_type const& key
+ , const_pointer const& copy
+ )
+ {
+ pointer child(create_copy(copy));
+
+ child->_parent = this->shared_from_this();
+ _children.insert(typename children::value_type(key, child));
+ return child;
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::const_child_iterator
+ simple_associative_node<K,D,A>::get_child_begin() const
+ {
+ return _children.begin();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::child_iterator
+ simple_associative_node<K,D,A>::get_child_begin()
+ {
+ return _children.begin();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::const_child_iterator
+ simple_associative_node<K,D,A>::get_child_end() const
+ {
+ return _children.end();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::child_iterator
+ simple_associative_node<K,D,A>::get_child_end()
+ {
+ return _children.end();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::const_child_iterator
+ simple_associative_node<K,D,A>::find_child(key_type const& key) const
+ {
+ return _children.find(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::child_iterator
+ simple_associative_node<K,D,A>::find_child(key_type const& key)
+ {
+ return _children.find(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline ::std::pair<
+ typename simple_associative_node<K,D,A>::const_child_iterator
+ , typename simple_associative_node<K,D,A>::const_child_iterator
+ >
+ simple_associative_node<K,D,A>::find_children(
+ key_type const& key
+ ) const
+ {
+ return _children.equal_range(key);
+ }
+
+ template <typename K, typename D, typename A>
+ inline ::std::pair<
+ typename simple_associative_node<K,D,A>::child_iterator
+ , typename simple_associative_node<K,D,A>::child_iterator
+ >
+ simple_associative_node<K,D,A>::find_children(key_type const& key)
+ {
+ return _children.equal_range(key);
+ }
+
+ template <typename K, typename D, typename A>
+ ::std::size_t
+ simple_associative_node<K,D,A>::remove_children(key_type const& key)
+ {
+ child_iterator itr, itr_end;
+
+ for (
+ ::std::tr1::tie(itr, itr_end) = _children.equal_range(key);
+ itr != itr_end;
+ ++itr
+ )
+ {
+ itr->second->remove_all_children();
+ itr->second->_parent.reset();
+ }
+
+ return _children.erase(key);
+ }
+
+ template <typename K, typename D, typename A>
+ void simple_associative_node<K,D,A>::remove_all_children()
+ {
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ itr->second->remove_all_children();
+ itr->second->_parent.reset();
+ }
+
+ _children.clear();
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::create(data_type const& data)
+ {
+ return pointer(new simple_associative_node(data));
+ }
+
+ template <typename K, typename D, typename A>
+ inline typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::create()
+ {
+ return pointer(new simple_associative_node());
+ }
+
+ template <typename K, typename D, typename A>
+ typename simple_associative_node<K,D,A>::pointer
+ simple_associative_node<K,D,A>::create_copy(const_pointer const& copy)
+ {
+ pointer result(new simple_associative_node(copy->get_data()));
+ pointer p(result);
+
+ for (
+ depth_first_iterator<const_pointer,::boost::mpl::true_> copy_itr(
+ copy
+ );
+ copy_itr;
+ ++copy_itr
+ )
+ {
+ switch (traversal_state(copy_itr))
+ {
+ case pre_order_traversal:
+ {
+ p = p->add_child(
+ copy_itr->first
+ , copy_itr->second->get_data()
+ );
+ break;
+ }
+
+ case post_order_traversal:
+ {
+ p = p->get_parent();
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_SIMPLE_ASSOCIATIVE_NODE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/simple_node.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/simple_node.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,264 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_SIMPLE_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_SIMPLE_NODE_HPP_INCLUDED
+
+#include <deque>
+#include <boost/mpl/bool.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/tr1/memory.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+
+//[reference__simple_node
+namespace boost { namespace tree_node {
+
+ template <typename T>
+ class simple_node
+ : public ::std::tr1::enable_shared_from_this<simple_node<T> >
+ , private noncopyable
+ {
+ public:
+ typedef T
+ data_type;
+ typedef ::std::tr1::shared_ptr<simple_node>
+ pointer;
+ typedef ::std::tr1::shared_ptr<simple_node const>
+ const_pointer;
+
+ //<-
+ private:
+ typedef ::std::deque<pointer>
+ children;
+
+ public:
+ //->
+ typedef // implementation_defined
+ //<-
+ typename children::iterator
+ //->
+ child_iterator;
+ typedef // implementation_defined
+ //<-
+ typename children::const_iterator
+ //->
+ const_child_iterator;
+
+ //<-
+ private:
+ children _children;
+ ::std::tr1::weak_ptr<simple_node> _parent;
+ data_type _data;
+
+ simple_node();
+
+ explicit simple_node(data_type const& data);
+
+ public:
+ //->
+ ~simple_node();
+
+ data_type const& get_data() const;
+
+ data_type& get_data();
+
+ const_pointer get_parent() const;
+
+ pointer get_parent();
+
+ pointer add_child(data_type const& data);
+
+ pointer add_child();
+
+ pointer add_child_copy(const_pointer const& copy);
+
+ const_child_iterator get_child_begin() const;
+
+ child_iterator get_child_begin();
+
+ const_child_iterator get_child_end() const;
+
+ child_iterator get_child_end();
+
+ void remove_all_children();
+
+ static pointer create(data_type const& data);
+
+ static pointer create();
+
+ static pointer create_copy(const_pointer const& p);
+ };
+
+ //<-
+ template <typename T>
+ simple_node<T>::simple_node() : _children(), _parent(), _data()
+ {
+ }
+
+ template <typename T>
+ simple_node<T>::simple_node(data_type const& data)
+ : _children(), _parent(), _data(data)
+ {
+ }
+
+ template <typename T>
+ simple_node<T>::~simple_node()
+ {
+ remove_all_children();
+ _parent.reset();
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::data_type const&
+ simple_node<T>::get_data() const
+ {
+ return _data;
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::data_type& simple_node<T>::get_data()
+ {
+ return _data;
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::const_pointer
+ simple_node<T>::get_parent() const
+ {
+ return const_pointer(_parent.lock());
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer simple_node<T>::get_parent()
+ {
+ return pointer(_parent.lock());
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer
+ simple_node<T>::add_child(data_type const& data)
+ {
+ pointer child(new simple_node(data));
+
+ child->_parent = this->shared_from_this();
+ _children.push_back(child);
+ return child;
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer simple_node<T>::add_child()
+ {
+ pointer child(new simple_node<T>());
+
+ child->_parent = this->shared_from_this();
+ _children.push_back(child);
+ return child;
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer
+ simple_node<T>::add_child_copy(const_pointer const& copy)
+ {
+ pointer child(create_copy(copy));
+
+ child->_parent = this->shared_from_this();
+ _children.push_back(child);
+ return child;
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::const_child_iterator
+ simple_node<T>::get_child_begin() const
+ {
+ return _children.begin();
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::child_iterator
+ simple_node<T>::get_child_begin()
+ {
+ return _children.begin();
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::const_child_iterator
+ simple_node<T>::get_child_end() const
+ {
+ return _children.end();
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::child_iterator
+ simple_node<T>::get_child_end()
+ {
+ return _children.end();
+ }
+
+ template <typename T>
+ void simple_node<T>::remove_all_children()
+ {
+ child_iterator itr_end = get_child_end();
+
+ for (child_iterator itr = get_child_begin(); itr != itr_end; ++itr)
+ {
+ (*itr)->remove_all_children();
+ (*itr)->_parent.reset();
+ }
+
+ _children.clear();
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer
+ simple_node<T>::create(data_type const& data)
+ {
+ return pointer(new simple_node(data));
+ }
+
+ template <typename T>
+ inline typename simple_node<T>::pointer simple_node<T>::create()
+ {
+ return pointer(new simple_node());
+ }
+
+ template <typename T>
+ typename simple_node<T>::pointer
+ simple_node<T>::create_copy(const_pointer const& copy)
+ {
+ pointer result(new simple_node(copy->get_data()));
+ pointer p(result);
+
+ for (
+ depth_first_iterator<const_pointer,::boost::mpl::true_> copy_itr(
+ copy
+ );
+ copy_itr;
+ ++copy_itr
+ )
+ {
+ switch (traversal_state(copy_itr))
+ {
+ case pre_order_traversal:
+ {
+ p = p->add_child((*copy_itr)->get_data());
+ break;
+ }
+
+ case post_order_traversal:
+ {
+ p = p->get_parent();
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+ //->
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_SIMPLE_NODE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/traversal_state.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/traversal_state.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,23 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_TRAVERSAL_STATE_HPP_INCLUDED
+#define BOOST_TREE_NODE_TRAVERSAL_STATE_HPP_INCLUDED
+
+//[reference__traversal_state
+namespace boost { namespace tree_node {
+
+ enum traversal_state
+ {
+ no_traversal
+ , pre_order_traversal
+ , post_order_traversal
+ , breadth_first_traversal
+ };
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_TRAVERSAL_STATE_HPP_INCLUDED
+

Added: sandbox/tree_node/boost/tree_node/typeof.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/boost/tree_node/typeof.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,24 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TREE_NODE_TYPEOF_HPP_INCLUDED
+#define BOOST_TREE_NODE_TYPEOF_HPP_INCLUDED
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/tree_node.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TYPE(boost::tree_node::traversal_state)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::breadth_first_iterator, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::pre_order_iterator, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::post_order_iterator, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::depth_first_iterator, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::raw_node, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::simple_node, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::raw_assocoative_node, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::tree_node::simple_assocoative_node, 3)
+
+#endif // BOOST_TREE_NODE_TYPEOF_HPP_INCLUDED
+

Added: sandbox/tree_node/libs/tree_node/doc/Jamroot
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/Jamroot 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,29 @@
+project html ;
+import boostbook : boostbook ;
+using quickbook ;
+
+xml tree_node
+ :
+ tree_node.qbk
+ ;
+boostbook standalone
+ :
+ tree_node
+ :
+ <xsl:param>admon.graphics.path=images/
+ <xsl:param>navig.graphics.path=images/
+ <xsl:param>boost.root=http://www.boost.org
+ <xsl:param>boost.libraries=http://www.boost.org/libs/libraries.htm
+ <xsl:param>boost.image.src=../../../../boost.png
+ <xsl:param>boost.image.alt="C++ Boost"
+ <xsl:param>boost.image.w=277
+ <xsl:param>boost.image.h=86
+ <xsl:param>html.stylesheet=boostbook.css
+ <xsl:param>nav.layout=none
+ <xsl:param>chunk.section.depth=2
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>generate.section.toc.level=0
+ <xsl:param>toc.section.depth=0
+ <xsl:param>toc.max.depth=0
+ ;
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,174 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:associative_tree_node Associative Tree Node]
+
+[section Description]
+Models of this concept provide key-based access to their child nodes.
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Associative Tree Node] concept.]]
+ [[`node`][An object of type `Node::pointer`.]]
+ [[`const_node`][An object of type `Node::const_pointer`.]]
+ [[`Key`][The key type of `Node`.]]
+ [[`key`][An object of type `Key const&`.]]
+ [[`Data`][The data type of `Node`.]]
+ [[`data`][An object of type `Data const&`.]]
+]
+
+[section:types Associated Types]
+One new type is introduced.
+
+[table
+ [[Name][Expression][Description][Requirements]]
+ [
+ [Key type]
+ [`Node::key_type`]
+ [The type of a key that a tree node will associate with a child node.]
+ []
+ ]
+]
+
+In addition, the requirements for the child iterator types are strengthened:
+
+ * The value type of `Node::child_iterator` must be
+ [^_std_pair_<Node::key_type const&,Node::pointer>].
+ * The value type of `Node::const_child_iterator` must be
+ [^_std_pair_<Node::key_type const&,Node::const_pointer>].
+
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Return Type]
+ [Semantics]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Child creation with data]
+ [`node->add_child(key, data);`]
+ []
+ [`Node::pointer`]
+ [
+ Creates and returns a tree node to be associated with the specified
+ key in the range of children of the invoking node. The node
+ returned will store the specified data.
+ ]
+ [Amortized constant]
+ ]
+ [
+ [Child creation]
+ [`node->add_child(key)`]
+ [
+ The data type of `Node` must model the __Default_Constructible__
+ concept.
+ ]
+ [`Node::pointer`]
+ [
+ Creates and returns a tree node to be associated with the specified
+ key in the range of children of the invoking node.
+ ]
+ [Amortized constant]
+ ]
+ [
+ [Child copy creation]
+ [`node->add_child(key, const_node)`]
+ []
+ [`Node::pointer`]
+ [
+ Creates and returns a deep copy of `const_node` to be associated
+ with the specified key in the range of children of the invoking
+ node.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+ [
+ [Child search]
+ [`const_node->find_child(key)`]
+ []
+ [`Node::const_child_iterator`]
+ [
+ Returns an iterator pointing to a child node associated with the
+ specified key, or `const_node->get_child_end()` if no such child
+ exists.
+ ]
+ [Logarithmic]
+ ]
+ [
+ [Child search]
+ [`node->find_child(key)`]
+ []
+ [`Node::child_iterator`]
+ [
+ Returns an iterator pointing to a child node associated with the
+ specified key, or `node->get_child_end()` if no such child exists.
+ ]
+ [Logarithmic]
+ ]
+ [
+ [Child search range]
+ [`const_node->find_children(key)`]
+ []
+ [[^_std_pair_<Node::const_child_iterator,Node::const_child_iterator>]]
+ [
+ Returns a pair `p` such that `[p.first, p.second)` is a range
+ of all child nodes associated with the specified key. If no such
+ children exist, then the range will be empty.
+ ]
+ [Logarithmic]
+ ]
+ [
+ [Child search range]
+ [`node->find_children(key)`]
+ []
+ [[^_std_pair_<Node::child_iterator,Node::child_iterator>]]
+ [
+ Returns a pair `p` such that `[p.first, p.second)` is a range
+ of all child nodes associated with the specified key. If no such
+ children exist, then the range will be empty.
+ ]
+ [Logarithmic]
+ ]
+ [
+ [Remove children]
+ [`const_node->remove_children(key)`]
+ []
+ [`std::size_t`]
+ [
+ Removes all child nodes associated with the specified key from the
+ tree node. Returns the number of children removed.
+ ]
+ [
+ Linear with respect to the number of children and their descendants
+ in the range to be removed, plus logarithmic
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+
+ * __raw_associative_node__
+ * __simple_associative_node__
+
+[endsect]
+
+[endsect] [/ Associative Tree Node]
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,105 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:tree_node_desc_iterator Tree Node Descendant Iterator]
+
+[section Description]
+This concept may seem redundant at first, especially when iterating through
+__Random_Access_Child_Iterator_Tree_Node__ objects; however, for
+__Associative_Tree_Node__ objects, models of this concept provide the sole
+means of accessing the key associated with each node being traversed. (Root
+nodes are not associated with keys at the tree node level, so models of this
+concept do not traverse them.)
+[endsect]
+
+[section Refinement of]
+__Tree_Node_Iterator__
+[endsect]
+
+[variablelist Notation
+ [
+ [`Iterator`]
+ [A type that models the [*Tree Node Descendant Iterator] concept.]
+ ]
+ [
+ [`itr`]
+ [An object of type `Iterator`.]
+ ]
+ [
+ [`Node`]
+ [A type that models the __Tree_Node__ concept.]
+ ]
+ [
+ [`node`]
+ [An object of type `Node::pointer`.]
+ ]
+ [
+ [`const_node`]
+ [An object of type `Node::const_pointer`.]
+ ]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node_Iterator__ concept;
+however, the requirements for the value type are strengthened: its value type,
+in turn, must model the __Forward_Iterator__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+None beyond those defined in the __Tree_Node_Iterator__ concept; however, the
+type requirements for the constructors are strengthened, and their semantics
+are clarified.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Semantics]
+ ]
+ [
+ [Constructor from mutable node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [
+ Constructs an iterator that will iterate through the descendants of
+ the specified node.
+ ]
+ ]
+ [
+ [Constructor from immutable node]
+ [``
+ Iterator(const_node)
+ Iterator itr(const_node)
+ ``]
+ [
+ The value type of `Iterator` must be the value type of
+ `Node::const_child_iterator`.
+ ]
+ [
+ Constructs an iterator that will iterate through the descendants of
+ the specified node.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+
+ * The return type of __make_breadth_first_descendant_iterator__.
+ * The return type of __make_pre_order_descendant_iterator__.
+ * The return type of __make_post_order_descendant_iterator__.
+ * The return type of __make_depth_first_descendant_iterator__.
+
+[endsect]
+
+[endsect] [/ Tree Node Descendant Iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,83 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:full_tree_node_iterator Full Tree Node Iterator]
+
+[section Description]
+This concept specifies the requirement that models traverse the root node as
+well as its descendants.
+[endsect]
+
+[section Refinement of]
+__Tree_Node_Iterator__
+[endsect]
+
+[variablelist Notation
+ [[`Iterator`][A type that models the [*Full Tree Node Iterator] concept.]]
+ [[`itr`][An object of type `Iterator`.]]
+ [[`Node`][A type that models the __Tree_Node__ concept.]]
+ [[`node`][An object of type `Node::pointer`.]]
+ [[`const_node`][An object of type `Node::const_pointer`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node_Iterator__ concept;
+however, the requirements for the value type are strengthened: its unqualified
+value type, in turn, must model the __Tree_Node__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+None beyond those defined in the __Tree_Node_Iterator__ concept; however, the
+type requirements for the constructors are strengthened, and their semantics
+are clarified.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Semantics]
+ ]
+ [
+ [Constructor from mutable node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [
+ Constructs an iterator that will iterate through the specified node
+ and its descendants.
+ ]
+ ]
+ [
+ [Constructor from immutable node]
+ [``
+ Iterator(const_node)
+ Iterator itr(const_node)
+ ``]
+ [The value type of `Iterator::value_type` must be `const`-qualified.]
+ [
+ Constructs an iterator that will iterate through the specified node
+ and its descendants.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+
+ * The return type of __make_breadth_first_iterator__.
+ * The return type of __make_pre_order_iterator__.
+ * The return type of __make_post_order_iterator__.
+ * The return type of __make_depth_first_iterator__.
+
+[endsect]
+
+[endsect] [/ Tree Node Iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,106 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:tree_node_iterator Tree Node Iterator]
+
+[section Description]
+Tree-traversing iterators at the __Tree_Node__ level must be created
+differently from iterators at the __Container__ level. Furthermore, tree node
+iterators typically store more stateful information than their __Container__
+counterparts; requiring two of them to check for dereferenceability may prove
+somewhat memory-inefficient. This concept provides an alternate means of
+checking for dereferenceability that requires the use of only the active
+iterator.
+[endsect]
+
+[section Refinement of]
+__Forward_Iterator__
+[endsect]
+
+[variablelist Notation
+ [[`Iterator`][A type that models the [*Tree Node Iterator] concept.]]
+ [[`itr`][An object of type `Iterator`.]]
+ [[`Node`][A type that models the __Tree_Node__ concept.]]
+ [[`node`][An object of type `Node::pointer`.]]
+ [[`const_node`][An object of type `Node::const_pointer`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Forward_Iterator__ concept;
+however, the requirements for the value type are strengthened: it must model
+the __Trivial_Iterator__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Forward_Iterator__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Default constructor]
+ [``
+ Iterator()
+ Iterator itr
+ ``]
+ []
+ [Constructs a non-dereferenceable (past-the-end) iterator.]
+ [Constant]
+ ]
+ [
+ [Constructor from mutable node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [Refinement-specific.]
+ [Amortized constant]
+ ]
+ [
+ [Constructor from immutable node]
+ [``
+ Iterator(const_node)
+ Iterator itr(const_node)
+ ``]
+ []
+ [Refinement-specific.]
+ [Amortized constant]
+ ]
+ [
+ [Dereferenceability]
+ [`itr`]
+ [A type that can be used in a boolean context.]
+ [
+ Returns a value convertible to `true` if `itr` is dereferenceable,
+ a value convertible to `false` if it is past-the-end.
+ ]
+ [Constant]
+ ]
+]
+
+The __Forward_Iterator__ requirement that the increment operators must exhibit
+constant time complexity has been relaxed; they now need only exhibit linear
+time complexity with respect to the number of descendants in the worst case.
+[endsect]
+
+[section Models]
+
+ * All models of the __Full_Tree_Node_Iterator__ concept.
+ * All models of the __Tree_Node_Descendant_Iterator__ concept.
+
+[endsect]
+
+[endsect] [/ Tree Node Iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_raci_tree_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_raci_tree_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,118 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:raci_tree_node Random Access Child Iterator Tree Node]
+
+[section Description]
+Models of this concept provide constant-time random access to their child
+nodes.
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [
+ [`Node`]
+ [
+ A type that models the [*Random Access Child Iterator Tree Node]
+ concept.
+ ]
+ ]
+ [
+ [`node`]
+ [An object of type `Node::pointer`.]
+ ]
+ [
+ [`const_node`]
+ [An object of type `Node::const_pointer`.]
+ ]
+ [
+ [`Data`]
+ [The data type of `Node`.]
+ ]
+ [
+ [`data`]
+ [An object of type `Data const&`.]
+ ]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node__ concept; however,
+the requirements for the child iterator types are strengthened:
+
+ * Both types must model the __Random_Access_Iterator__ concept.
+ * The value type of `Node::child_iterator` must be `Node::pointer`.
+ * The value type of `Node::const_child_iterator` must be
+ `Node::const_pointer`.
+
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Return Type]
+ [Semantics]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Child creation with data]
+ [`node->add_child(data)`]
+ []
+ [`Node::pointer`]
+ [
+ Creates and returns a tree node to be stored in the range of
+ children of the invoking node. The node returned will store
+ the specified data.
+ ]
+ [Amortized constant]
+ ]
+ [
+ [Child creation]
+ [`node->add_child()`]
+ [
+ The data type of `Node` must model the __Default_Constructible__
+ concept.
+ ]
+ [`Node::pointer`]
+ [
+ Creates and returns a tree node to be stored in the range of
+ children of the invoking node.
+ ]
+ [Amortized constant]
+ ]
+ [
+ [Child copy creation]
+ [`node->add_child(const_node)`]
+ []
+ [`Node::pointer`]
+ [
+ Creates and returns a deep copy of `const_node` to be stored in the
+ range of children of the invoking node.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+]
+[endsect]
+
+[section Models]
+
+ * __raw_node__
+ * __simple_node__
+
+[endsect]
+
+[endsect] [/ Random-Access Child Iterator Tree Node]
+

Added: sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,176 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:tree_node Tree Node]
+
+[section Description]
+All tree node implementations that this library provides model this concept.
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Tree Node] concept.]]
+ [[`node`][An object of type `Node::pointer`.]]
+ [[`const_node`][An object of type `Node::const_pointer`.]]
+]
+
+[section:types Associated Types]
+[table
+ [[Name][Expression][Description][Requirements]]
+ [
+ [Data type]
+ [`Node::data_type`]
+ [The type of the object stored in a tree node.]
+ [
+ It must model the __Copy_Constructible__ concept, but need not
+ model the __Assignable__ concept.
+ ]
+ ]
+ [
+ [Pointer type]
+ [`Node::pointer`]
+ [The type of a pointer to a `Node` object.]
+ [
+ It must model the __Trivial_Iterator__ concept, it must point to
+ a mutable object, and it must be implicitly convertible to
+ `Node::const_pointer`.
+ ]
+ ]
+ [
+ [Pointer-to-const type]
+ [`Node::const_pointer`]
+ [The type of a pointer to a `Node const` object.]
+ [
+ It must model the __Trivial_Iterator__ concept, and it must /not/
+ point to a mutable object.
+ ]
+ ]
+ [
+ [Child iterator type]
+ [`Node::child_iterator`]
+ [
+ The type of iterator used to iterate through the children of a
+ `Node` object.
+ ]
+ [
+ It must model the __Input_Iterator__ concept, and it must be
+ convertible to `Node::const_child_iterator`.
+ ]
+ ]
+ [
+ [Immutable child iterator type]
+ [`Node::const_child_iterator`]
+ [
+ The type of iterator used to iterate through the children of a
+ `Node const` object.
+ ]
+ [
+ It must model the __Input_Iterator__ concept, and it must be
+ convertible to `Node::const_child_iterator`.
+ ]
+ ]
+]
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+[table
+ [[Name][Expression][Return Type][Semantics][__Runtime_Complexity__]]
+ [
+ [Data access]
+ [`const_node->get_data()`]
+ [`Data const&`]
+ [Returns the object stored in the tree node.]
+ [Constant]
+ ]
+ [
+ [Data access]
+ [`node->get_data()`]
+ [`Data&`]
+ [Returns the object stored in the tree node.]
+ [Constant]
+ ]
+ [
+ [Parent access]
+ [`const_node->get_parent()`]
+ [`Node::const_pointer`]
+ [
+ Returns the parent of the tree node, or a null pointer if the node
+ is the root.
+ ]
+ [Constant]
+ ]
+ [
+ [Parent access]
+ [`node->get_parent()`]
+ [`Node::pointer`]
+ [
+ Returns the parent of the tree node, or a null pointer if the node
+ is the root.
+ ]
+ [Constant]
+ ]
+ [
+ [Children range begin access]
+ [`const_node->get_child_begin()`]
+ [`Node::const_child_iterator`]
+ [
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ [Constant]
+ ]
+ [
+ [Children range begin access]
+ [`node->get_child_begin()`]
+ [`Node::child_iterator`]
+ [
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ [Constant]
+ ]
+ [
+ [Children range past-the-end access]
+ [`const_node->get_child_end();`]
+ [`Node::const_child_iterator`]
+ [
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ ]
+ [Constant]
+ ]
+ [
+ [Children range past-the-end access]
+ [`node->get_child_end();`]
+ [`Node::child_iterator`]
+ [
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ ]
+ [Constant]
+ ]
+ [
+ [Remove all children]
+ [`node->remove_all_children()`]
+ [`void`]
+ [Removes all children from the tree node.]
+ [Linear with respect to the number of children]
+ ]
+]
+[endsect]
+
+[section Models]
+
+ * All models of the __Random_Access_Child_Iterator_Tree_Node__ concept.
+ * All models of the __Associative_Tree_Node__ concept.
+
+[endsect]
+
+[endsect] [/ Tree Node]
+

Added: sandbox/tree_node/libs/tree_node/doc/concepts.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/concepts.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,28 @@
+[/=============================================================================
+ Copyright (C) 2007-2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section Concepts]
+
+[include concept_tree_node.qbk]
+[include concept_raci_tree_node.qbk]
+[include concept_assoc_tree_node.qbk]
+[include concept_iterator.qbk]
+[include concept_full_iterator.qbk]
+[include concept_descendant_iterator.qbk]
+
+[heading Core Concepts]
+
+ * __Tree_Node__
+ * __Random_Access_Child_Iterator_Tree_Node__
+ * __Associative_Tree_Node__
+ * __Tree_Node_Iterator__
+ * __Full_Tree_Node_Iterator__
+ * __Tree_Node_Descendant_Iterator__
+
+[endsect] [/ Concepts]
+

Added: sandbox/tree_node/libs/tree_node/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/boostbook.css 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,588 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 9pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 90%;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 9pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ /* Program listings in tables don't get borders */
+ td .programlisting,
+ td .screen
+ {
+ margin: 0pc 0pc 0pc 0pc;
+ padding: 0pc 0pc 0pc 0pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Copyright footer
+=============================================================================*/
+ .copyright-footer
+ {
+ text-align: right;
+ font-size: 70%;
+ }
+
+ .copyright-footer p
+ {
+ text-align: right;
+ font-size: 80%;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 80%;
+ line-height: 1.15;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ font-size: 9pt;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 80%;
+ }
+
+ table.simplelist
+ {
+ width: auto !important;
+ margin: 0em !important;
+ padding: 0em !important;
+ border: none !important;
+ }
+ table.simplelist td
+ {
+ margin: 0em !important;
+ padding: 0em !important;
+ text-align: left !important;
+ font-size: 9pt !important;
+ border: none !important;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 9pt; /* A little bit smaller than the main text */
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt,
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+ div.variablelist dl dt
+ {
+ margin-bottom: 0.2em;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 0em 0em 0.5em 2em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p,
+ div.variablelist dl dd p
+ {
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ body {
+ background-color: #FFFFFF;
+ }
+
+ /* Links */
+ a
+ {
+ color: #005a9c;
+ }
+
+ a:visited
+ {
+ color: #9c5a9c;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #FFFFFF; }
+ .dk_grey_bkd { background-color: #999999; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #F0F0F0;
+ border: 1px solid #DCDCDC;
+ }
+
+ .copyright-footer
+ {
+ color: #8F8F8F;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid gray;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid gray;
+ border-collapse: collapse;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid gray;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid gray;
+ }
+
+ table.simplelist tr td
+ {
+ border: none !important;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }
+
+/*=============================================================================
+ Images
+=============================================================================*/
+
+ span.inlinemediaobject img
+ {
+ vertical-align: middle;
+ }
+
+/*==============================================================================
+ Super and Subscript: style so that line spacing isn't effected, see
+ http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
+==============================================================================*/
+
+sup,
+sub {
+ height: 0;
+ line-height: 1;
+ vertical-align: baseline;
+ _vertical-align: bottom;
+ position: relative;
+
+}
+
+sup {
+ bottom: 1ex;
+}
+
+sub {
+ top: .5ex;
+}
+

Added: sandbox/tree_node/libs/tree_node/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/next_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/prev_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/smiley.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/up_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/tree_node/libs/tree_node/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/index.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,58 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;tree_node 0.1</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="next" href="tree_node/concepts.html" title="Concepts">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="tree_node/concepts.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="tree_node"></a>Chapter&#160;1.&#160;tree_node 0.1</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Cromwell D.</span> <span class="surname">Enage</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 2011 Cromwell D. Enage</p></div>
+<div><div class="legalnotice">
+<a name="idp13403232"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Concepts</span></dt>
+<dt><span class="section">Reference</span></dt>
+</dl>
+</div>
+<a name="tree_node.rationale"></a><h3>
+<a name="idp13405408"></a>
+ <a class="link" href="index.html#tree_node.rationale">Rationale</a>
+ </h3>
+<p>
+ Over the course of reimplementing a decision tree learning algorithm to use modern
+ C++ techniques, the need for a generic tree library became evident. The in-house
+ data structures in use at the time were undergoing modification as well. It was
+ found that the core operations occurred at the node level rather than at the
+ tree level, which stored only high-level algorithms. Efforts went underway to
+ retrofit these algorithms to use iterators and to further factor out generic
+ data structures from the decision tree components and other application-specific
+ utilities. This library represents the Boostified culmination of these efforts.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: September 16, 2011 at 08:02:00 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="tree_node/concepts.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Concepts</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="next" href="concepts/tree_node.html" title="Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/tree_node.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="tree_node.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a>
+</h2></div></div></div>
+<a name="tree_node.concepts.core_concepts"></a><h4>
+<a name="idp14141952"></a>
+ <a class="link" href="concepts.html#tree_node.concepts.core_concepts">Core Concepts</a>
+ </h4>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a>
+ <span class="special">*</span> <a class="link" href="concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ <span class="special">*</span> <a class="link" href="concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+<span class="special">*</span> <a class="link" href="concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ <span class="special">*</span> <a class="link" href="concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>
+ <span class="special">*</span> <a class="link" href="concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>
+</pre>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/tree_node.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,472 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Associative Tree Node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="raci_tree_node.html" title="Random Access Child Iterator Tree Node">
+<link rel="next" href="tree_node_iterator.html" title="Tree Node Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raci_tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.associative_tree_node"></a><a class="link" href="associative_tree_node.html" title="Associative Tree Node">Associative
+ Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.description"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept provide key-based access to their child nodes.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.refinement_of"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Associative Tree Node</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Key</span></code></span></dt>
+<dd><p>
+ The key type of <code class="computeroutput"><span class="identifier">Node</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">key</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Key</span> <span class="keyword">const</span><span class="special">&amp;</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Data</span></code></span></dt>
+<dd><p>
+ The data type of <code class="computeroutput"><span class="identifier">Node</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">data</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Data</span> <span class="keyword">const</span><span class="special">&amp;</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.types"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ One new type is introduced.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ Key type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">key_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a key that a tree node will associate with a child
+ node.
+ </p>
+ </td>
+<td>
+ </td>
+</tr></tbody>
+</table></div>
+<p>
+ In addition, the requirements for the child iterator types are strengthened:
+ </p>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">The</span> <span class="identifier">value</span> <span class="identifier">type</span> <span class="identifier">of</span> <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span><span class="error">`</span> <span class="identifier">must</span> <span class="identifier">be</span>
+ <span class="special">[^</span>std::pair<span class="special">&lt;</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;,</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span><span class="special">&gt;].</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="identifier">value</span> <span class="identifier">type</span> <span class="identifier">of</span> <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span><span class="error">`</span> <span class="identifier">must</span> <span class="identifier">be</span>
+ <span class="special">[^</span>std::pair<span class="special">&lt;</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;,</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span><span class="special">&gt;].</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.expressions"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept, the following expressions
+ must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key</span><span class="special">,</span>
+ <span class="identifier">data</span><span class="special">);</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be associated with the specified
+ key in the range of children of the invoking node. The node returned
+ will store the specified data.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The data type of <code class="computeroutput"><span class="identifier">Node</span></code>
+ must model the Default Constructible concept.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be associated with the specified
+ key in the range of children of the invoking node.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key</span><span class="special">,</span>
+ <span class="identifier">const_node</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a deep copy of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ to be associated with the specified key in the range of children
+ of the invoking node.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the specified key, or <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">get_child_end</span><span class="special">()</span></code> if no such child exists.
+ </p>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the specified key, or <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">get_child_end</span><span class="special">()</span></code> if no such child exists.
+ </p>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::const_child_iterator,Node::const_child_iterator&gt;</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a pair <code class="computeroutput"><span class="identifier">p</span></code>
+ such that <code class="computeroutput"><span class="special">[</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span><span class="special">)</span></code> is a range of all child nodes
+ associated with the specified key. If no such children exist,
+ then the range will be empty.
+ </p>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::child_iterator,Node::child_iterator&gt;</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a pair <code class="computeroutput"><span class="identifier">p</span></code>
+ such that <code class="computeroutput"><span class="special">[</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">first</span><span class="special">,</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span><span class="special">)</span></code> is a range of all child nodes
+ associated with the specified key. If no such children exist,
+ then the range will be empty.
+ </p>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">remove_children</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Removes all child nodes associated with the specified key from
+ the tree node. Returns the number of children removed.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children and their descendants
+ in the range to be removed, plus logarithmic
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.models"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../reference/raw_associative_node.html" title="raw_associative_node"><code class="computeroutput"><span class="identifier">raw_associative_node</span></code></a>
+<span class="special">*</span> <a class="link" href="../reference/simple_associative_node.html" title="simple_associative_node"><code class="computeroutput"><span class="identifier">simple_associative_node</span></code></a>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raci_tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,200 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Full Tree Node Iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="tree_node_iterator.html" title="Tree Node Iterator">
+<link rel="next" href="tree_node_desc_iterator.html" title="Tree Node Descendant Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_desc_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator"></a><a class="link" href="full_tree_node_iterator.html" title="Full Tree Node Iterator">Full Tree
+ Node Iterator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.description"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This concept specifies the requirement that models traverse the root node
+ as well as its descendants.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.refinement_of"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree
+ Node Iterator</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iterator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Full Tree Node Iterator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">itr</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.types"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ requirements for the value type are strengthened: its unqualified value
+ type, in turn, must model the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.expressions"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ None beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ type requirements for the constructors are strengthened, and their semantics
+ are clarified.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Constructor from mutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs an iterator that will iterate through the specified
+ node and its descendants.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from immutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ The value type of <code class="computeroutput"><span class="identifier">Iterator</span><span class="special">::</span><span class="identifier">value_type</span></code>
+ must be <code class="computeroutput"><span class="keyword">const</span></code>-qualified.
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs an iterator that will iterate through the specified
+ node and its descendants.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.models"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/breadth_first_iterator.html" title="breadth_first_iterator"><code class="computeroutput"><span class="identifier">make_breadth_first_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/pre_order_iterator.html" title="pre_order_iterator"><code class="computeroutput"><span class="identifier">make_pre_order_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/post_order_iterator.html" title="post_order_iterator"><code class="computeroutput"><span class="identifier">make_post_order_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/depth_first_iterator.html" title="depth_first_iterator"><code class="computeroutput"><span class="identifier">make_depth_first_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_desc_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/raci_tree_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/raci_tree_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,255 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Random Access Child Iterator Tree Node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="tree_node.html" title="Tree Node">
+<link rel="next" href="associative_tree_node.html" title="Associative Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_tree_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.raci_tree_node"></a><a class="link" href="raci_tree_node.html" title="Random Access Child Iterator Tree Node">Random Access Child
+ Iterator Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.raci_tree_node.description"></a><a class="link" href="raci_tree_node.html#tree_node.concepts.raci_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept provide constant-time random access to their child
+ nodes.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.raci_tree_node.refinement_of"></a><a class="link" href="raci_tree_node.html#tree_node.concepts.raci_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Random Access Child Iterator
+ Tree Node</strong></span> concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Data</span></code></span></dt>
+<dd><p>
+ The data type of <code class="computeroutput"><span class="identifier">Node</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">data</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Data</span> <span class="keyword">const</span><span class="special">&amp;</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.raci_tree_node.types"></a><a class="link" href="raci_tree_node.html#tree_node.concepts.raci_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept; however, the requirements
+ for the child iterator types are strengthened:
+ </p>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">Both</span> <span class="identifier">types</span> <span class="identifier">must</span> <span class="identifier">model</span> <span class="identifier">the</span> Random Access Iterator <span class="identifier">concept</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="identifier">value</span> <span class="identifier">type</span> <span class="identifier">of</span> <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span><span class="error">`</span> <span class="identifier">must</span> <span class="identifier">be</span> <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span><span class="error">`</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="identifier">value</span> <span class="identifier">type</span> <span class="identifier">of</span> <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span><span class="error">`</span> <span class="identifier">must</span> <span class="identifier">be</span>
+ <span class="error">`</span><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span><span class="error">`</span><span class="special">.</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.raci_tree_node.expressions"></a><a class="link" href="raci_tree_node.html#tree_node.concepts.raci_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept, the following expressions
+ must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">(</span><span class="identifier">data</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored in the range of
+ children of the invoking node. The node returned will store the
+ specified data.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The data type of <code class="computeroutput"><span class="identifier">Node</span></code>
+ must model the Default Constructible concept.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored in the range of
+ children of the invoking node.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">add_child</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates and returns a deep copy of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ to be stored in the range of children of the invoking node.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.raci_tree_node.models"></a><a class="link" href="raci_tree_node.html#tree_node.concepts.raci_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../reference/raw_node.html" title="raw_node"><code class="computeroutput"><span class="identifier">raw_node</span></code></a>
+<span class="special">*</span> <a class="link" href="../reference/simple_node.html" title="simple_node"><code class="computeroutput"><span class="identifier">simple_node</span></code></a>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_tree_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,523 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tree Node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="../concepts.html" title="Concepts">
+<link rel="next" href="raci_tree_node.html" title="Random Access Child Iterator Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="raci_tree_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.tree_node"></a><a class="link" href="tree_node.html" title="Tree Node">Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node.description"></a><a class="link" href="tree_node.html#tree_node.concepts.tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ All tree node implementations that this library provides model this concept.
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Tree Node</strong></span> concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node.types"></a><a class="link" href="tree_node.html#tree_node.concepts.tree_node.types" title="Associated Types">Associated Types</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of the object stored in a tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Copy Constructible concept, but
+ need not model the Assignable concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a <code class="computeroutput"><span class="identifier">Node</span></code>
+ object.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, it must
+ point to a mutable object, and it must be implicitly convertible
+ to <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer-to-const type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a <code class="computeroutput"><span class="identifier">Node</span>
+ <span class="keyword">const</span></code> object.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, and
+ it must <span class="emphasis"><em>not</em></span> point to a mutable object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of iterator used to iterate through the children of
+ a <code class="computeroutput"><span class="identifier">Node</span></code> object.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Input Iterator concept, and it
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of iterator used to iterate through the children of
+ a <code class="computeroutput"><span class="identifier">Node</span> <span class="keyword">const</span></code>
+ object.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Input Iterator concept, and it
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node.expressions"></a><a class="link" href="tree_node.html#tree_node.concepts.tree_node.expressions" title="Valid Expressions and Semantics">Valid Expressions
+ and Semantics</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">get_data</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Data</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the object stored in the tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">get_data</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Data</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the object stored in the tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">get_parent</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the parent of the tree node, or a null pointer if the
+ node is the root.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">get_parent</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the parent of the tree node, or a null pointer if the
+ node is the root.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">get_child_begin</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the iterator
+ points past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">get_child_begin</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the iterator
+ points past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_node</span><span class="special">-&gt;</span><span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove all children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">node</span><span class="special">-&gt;</span><span class="identifier">remove_all_children</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Removes all children from the tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node.models"></a><a class="link" href="tree_node.html#tree_node.concepts.tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">All</span> <span class="identifier">models</span> <span class="identifier">of</span> <span class="identifier">the</span> <a class="link" href="raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a> <span class="identifier">concept</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">All</span> <span class="identifier">models</span> <span class="identifier">of</span> <span class="identifier">the</span> <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> <span class="identifier">concept</span><span class="special">.</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="raci_tree_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_desc_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_desc_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,206 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tree Node Descendant Iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="full_tree_node_iterator.html" title="Full Tree Node Iterator">
+<link rel="next" href="../reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="full_tree_node_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator"></a><a class="link" href="tree_node_desc_iterator.html" title="Tree Node Descendant Iterator">Tree Node
+ Descendant Iterator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator.description"></a><a class="link" href="tree_node_desc_iterator.html#tree_node.concepts.tree_node_desc_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This concept may seem redundant at first, especially when iterating through
+ <a class="link" href="raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a> objects; however, for
+ <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative
+ Tree Node</strong></span></a> objects, models of this concept provide the
+ sole means of accessing the key associated with each node being traversed.
+ (Root nodes are not associated with keys at the tree node level, so models
+ of this concept do not traverse them.)
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator.refinement_of"></a><a class="link" href="tree_node_desc_iterator.html#tree_node.concepts.tree_node_desc_iterator.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree
+ Node Iterator</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iterator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Tree Node Descendant Iterator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">itr</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator.types"></a><a class="link" href="tree_node_desc_iterator.html#tree_node.concepts.tree_node_desc_iterator.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ requirements for the value type are strengthened: its value type, in turn,
+ must model the Forward Iterator concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator.expressions"></a><a class="link" href="tree_node_desc_iterator.html#tree_node.concepts.tree_node_desc_iterator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ None beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ type requirements for the constructors are strengthened, and their semantics
+ are clarified.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Constructor from mutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs an iterator that will iterate through the descendants
+ of the specified node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from immutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ The value type of <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ must be the value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_child_iterator</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs an iterator that will iterate through the descendants
+ of the specified node.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_desc_iterator.models"></a><a class="link" href="tree_node_desc_iterator.html#tree_node.concepts.tree_node_desc_iterator.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/breadth_first_iterator.html" title="breadth_first_iterator"><code class="computeroutput"><span class="identifier">make_breadth_first_descendant_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/pre_order_iterator.html" title="pre_order_iterator"><code class="computeroutput"><span class="identifier">make_pre_order_descendant_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/post_order_iterator.html" title="post_order_iterator"><code class="computeroutput"><span class="identifier">make_post_order_descendant_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">The</span> <span class="keyword">return</span> <span class="identifier">type</span> <span class="identifier">of</span> <a class="link" href="../reference/depth_first_iterator.html" title="depth_first_iterator"><code class="computeroutput"><span class="identifier">make_depth_first_descendant_iterator</span><span class="special">()</span></code></a><span class="special">.</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="full_tree_node_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,274 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tree Node Iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="associative_tree_node.html" title="Associative Tree Node">
+<link rel="next" href="full_tree_node_iterator.html" title="Full Tree Node Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="full_tree_node_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.tree_node_iterator"></a><a class="link" href="tree_node_iterator.html" title="Tree Node Iterator">Tree Node Iterator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_iterator.description"></a><a class="link" href="tree_node_iterator.html#tree_node.concepts.tree_node_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Tree-traversing iterators at the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> level must be created differently
+ from iterators at the Container level. Furthermore, tree node
+ iterators typically store more stateful information than their Container counterparts; requiring two of
+ them to check for dereferenceability may prove somewhat memory-inefficient.
+ This concept provides an alternate means of checking for dereferenceability
+ that requires the use of only the active iterator.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_iterator.refinement_of"></a><a class="link" href="tree_node_iterator.html#tree_node.concepts.tree_node_iterator.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ Forward Iterator
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iterator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Tree Node Iterator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">itr</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_iterator.types"></a><a class="link" href="tree_node_iterator.html#tree_node.concepts.tree_node_iterator.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the Forward Iterator concept; however, the requirements
+ for the value type are strengthened: it must model the Trivial Iterator concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_iterator.expressions"></a><a class="link" href="tree_node_iterator.html#tree_node.concepts.tree_node_iterator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the Forward Iterator concept, the following
+ expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">()</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs a non-dereferenceable (past-the-end) iterator.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from mutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Refinement-specific.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from immutable node
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Refinement-specific.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Dereferenceability
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">itr</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type that can be used in a boolean context.
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a value convertible to <code class="computeroutput"><span class="keyword">true</span></code>
+ if <code class="computeroutput"><span class="identifier">itr</span></code> is dereferenceable,
+ a value convertible to <code class="computeroutput"><span class="keyword">false</span></code>
+ if it is past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ The Forward Iterator requirement that the increment
+ operators must exhibit constant time complexity has been relaxed; they
+ now need only exhibit linear time complexity with respect to the number
+ of descendants in the worst case.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.tree_node_iterator.models"></a><a class="link" href="tree_node_iterator.html#tree_node.concepts.tree_node_iterator.models" title="Models">Models</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <span class="identifier">All</span> <span class="identifier">models</span> <span class="identifier">of</span> <span class="identifier">the</span> <a class="link" href="full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a> <span class="identifier">concept</span><span class="special">.</span>
+<span class="special">*</span> <span class="identifier">All</span> <span class="identifier">models</span> <span class="identifier">of</span> <span class="identifier">the</span> <a class="link" href="tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a> <span class="identifier">concept</span><span class="special">.</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_tree_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="full_tree_node_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="prev" href="concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator">
+<link rel="next" href="reference/raw_node.html" title="raw_node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="concepts/tree_node_desc_iterator.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/raw_node.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="tree_node.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="reference/raw_node.html" title="raw_node"><code class="computeroutput"><span class="identifier">raw_node</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/simple_node.html" title="simple_node"><code class="computeroutput"><span class="identifier">simple_node</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/raw_associative_node.html" title="raw_associative_node"><code class="computeroutput"><span class="identifier">raw_associative_node</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/simple_associative_node.html" title="simple_associative_node"><code class="computeroutput"><span class="identifier">simple_associative_node</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/breadth_first_iterator.html" title="breadth_first_iterator"><code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/pre_order_iterator.html" title="pre_order_iterator"><code class="computeroutput"><span class="identifier">pre_order_iterator</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/post_order_iterator.html" title="post_order_iterator"><code class="computeroutput"><span class="identifier">post_order_iterator</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/depth_first_iterator.html" title="depth_first_iterator"><code class="computeroutput"><span class="identifier">depth_first_iterator</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/traversal_state.html" title="traversal_state"><code class="computeroutput"><span class="identifier">traversal_state</span></code></a>
+</pre>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="concepts/tree_node_desc_iterator.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/raw_node.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/breadth_first_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/breadth_first_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,747 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>breadth_first_iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="simple_associative_node.html" title="simple_associative_node">
+<link rel="next" href="pre_order_iterator.html" title="pre_order_iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="simple_associative_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="pre_order_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.breadth_first_iterator"></a><a class="link" href="breadth_first_iterator.html" title="breadth_first_iterator"><code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.synopsis"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MimicsChildIterator</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">breadth_first_iterator</span>
+ <span class="special">{</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="identifier">reference</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span>
+ <span class="identifier">distance_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span>
+ <span class="identifier">iterator_category</span><span class="special">;</span>
+
+ <span class="identifier">breadth_first_iterator</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">breadth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">(</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span>
+ <span class="special">);</span>
+
+ <span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">breadth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
+
+ <span class="identifier">breadth_first_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">traversal_state</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.description"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This iterator traverses the specified root node and all its descendants
+ in breadth-first fashion, e.g. given the following tree representation:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"> <span class="identifier">A</span>
+ <span class="special">|</span>
+ <span class="identifier">C</span><span class="special">---+---</span><span class="identifier">B</span>
+ <span class="special">|</span> <span class="special">|</span>
+<span class="special">+-+-+</span> <span class="special">+-+-+</span>
+<span class="special">|</span> <span class="special">|</span> <span class="special">|</span> <span class="special">|</span>
+<span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>, then it will traverse
+ the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">A</span> <span class="identifier">C</span> <span class="identifier">B</span> <span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>, then it will
+ traverse the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">C</span> <span class="identifier">B</span> <span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.definition"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/breadth_first_iterator.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.tpl_param"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">NodePointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, and
+ its value type must model the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">MimicsChildIterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines whether this <code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code>
+ will iterate only through the descendants of a node or will also
+ include the node in its traversal.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Boolean Integral Constant concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.model_of"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">false</span><span class="error">`</span>
+<span class="special">*</span> <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">true</span><span class="error">`</span>
+<span class="special">*</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.public_bases"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.members"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Where defined
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Value type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">value_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Reference type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Distance type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator category
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_category</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Default Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from im/mutable node
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Conversion constructor
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+<span class="identifier">breadth_first_iterator</span><span class="special">(</span><span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span><span class="special">(</span><span class="identifier">breadth_first_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">breadth_first_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assignable
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Dereference operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Indirection operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pre-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Post-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">breadth_first_iterator</span>
+ <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Traversal state conversion operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span> <a class="link" href="traversal_state.html" title="traversal_state">traversal_state</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.breadth_first_iterator.non_members"></a><a class="link" href="breadth_first_iterator.html#tree_node.reference.breadth_first_iterator.non_members" title="Non-members">Non-members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">&gt;</span>
+ <span class="identifier">make_breadth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code>
+ that will iterate through the specified node and its descendants.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span><span class="special">&gt;</span>
+ <span class="identifier">make_breadth_first_descendant_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">breadth_first_iterator</span></code>
+ that will iterate through the descendants of the specified node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span>
+ <span class="identifier">breadth_first_iterate</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the specified node and its descendants in breadth-first
+ fashion, passing each node pointer dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span>
+ <span class="identifier">breadth_first_iterate_descendants</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the descendants of the specified node in breadth-first
+ fashion, passing each element dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Equality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">==(</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Inequality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">!=(</span>
+ <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">breadth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="simple_associative_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="pre_order_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/depth_first_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/depth_first_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,804 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>depth_first_iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="post_order_iterator.html" title="post_order_iterator">
+<link rel="next" href="traversal_state.html" title="traversal_state">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="post_order_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="traversal_state.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.depth_first_iterator"></a><a class="link" href="depth_first_iterator.html" title="depth_first_iterator"><code class="computeroutput"><span class="identifier">depth_first_iterator</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.synopsis"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MimicsChildIterator</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">depth_first_iterator</span>
+ <span class="special">{</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="identifier">reference</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span>
+ <span class="identifier">distance_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span>
+ <span class="identifier">iterator_category</span><span class="special">;</span>
+
+ <span class="identifier">depth_first_iterator</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">depth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">(</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span>
+ <span class="special">);</span>
+
+ <span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">depth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
+
+ <span class="identifier">depth_first_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">traversal_state</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">};</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">==(</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">!=(</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">&gt;</span>
+ <span class="identifier">make_depth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span><span class="special">&gt;</span>
+ <span class="identifier">make_depth_first_descendant_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">BinaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">depth_first_iterate</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">,</span> <span class="identifier">BinaryFunction</span> <span class="identifier">function</span><span class="special">);</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">BinaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span>
+ <span class="identifier">depth_first_iterate_descendants</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">BinaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.description"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This iterator traverses the specified root node and all its descendants
+ in depth-first fashion, e.g. given the following tree representation:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"> <span class="identifier">A</span>
+ <span class="special">|</span>
+ <span class="identifier">C</span><span class="special">---+---</span><span class="identifier">B</span>
+ <span class="special">|</span> <span class="special">|</span>
+<span class="special">+-+-+</span> <span class="special">+-+-+</span>
+<span class="special">|</span> <span class="special">|</span> <span class="special">|</span> <span class="special">|</span>
+<span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>, then it will traverse
+ the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">A</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">C</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">D</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">D</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">E</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">E</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">C</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">B</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">F</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">F</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">G</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">G</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">B</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">A</span> <span class="identifier">post_order_traversal</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>, then it will
+ traverse the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">C</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">D</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">D</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">E</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">E</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">C</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">B</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">F</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">F</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">G</span> <span class="identifier">pre_order_traversal</span>
+<span class="identifier">G</span> <span class="identifier">post_order_traversal</span>
+<span class="identifier">B</span> <span class="identifier">post_order_traversal</span>
+</pre>
+<p>
+ </p>
+<p>
+ The traversal state conversion operator of this iterator will yield each
+ value in the column on the right at the appropriate iteration.
+ </p>
+<p>
+ This iterator is ideal for algorithms that need to perform both preprocessing
+ and postprocessing of a tree node, e.g. the copy constructors of the <a class="link" href="raw_node.html" title="raw_node"><code class="computeroutput"><span class="identifier">raw_node</span></code></a>
+ and <a class="link" href="raw_associative_node.html" title="raw_associative_node"><code class="computeroutput"><span class="identifier">raw_associative_node</span></code></a> implementations.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.definition"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/depth_first_iterator.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.tpl_param"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">NodePointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, and
+ its value type must model the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">MimicsChildIterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines whether this <code class="computeroutput"><span class="identifier">depth_first_iterator</span></code>
+ will iterate only through the descendants of a node or will also
+ include the node in its traversal.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Boolean Integral Constant concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.model_of"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">false</span><span class="error">`</span>
+<span class="special">*</span> <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">true</span><span class="error">`</span>
+<span class="special">*</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.public_bases"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.members"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Value type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">value_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Reference type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Distance type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator category
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_category</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Default Constructible concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from im/mutable node
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Conversion constructor
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+<span class="identifier">depth_first_iterator</span><span class="special">(</span><span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs a <code class="computeroutput"><span class="identifier">depth_first_iterator</span></code>
+ object that will point to the same element that the specified
+ iterator points to.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span><span class="special">(</span><span class="identifier">depth_first_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Copy Constructible concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">depth_first_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Assignable concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Dereference operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Indirection operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pre-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Post-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">depth_first_iterator</span>
+ <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined in the Forward Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Traversal state conversion operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span> <a class="link" href="traversal_state.html" title="traversal_state">traversal_state</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns <code class="computeroutput"><span class="identifier">pre_order_traversal</span></code>
+ if this iterator has not yet examined the children of the current
+ node, <code class="computeroutput"><span class="identifier">post_order_traversal</span></code>
+ if this iterator has examined all of the children of the current
+ node, or <code class="computeroutput"><span class="identifier">no_traversal</span></code>
+ if this iterator is not dereferenceable.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.depth_first_iterator.non_members"></a><a class="link" href="depth_first_iterator.html#tree_node.reference.depth_first_iterator.non_members" title="Non-members">Non-members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+<span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,</span>boost::mpl::false_<span class="special">&gt;</span>
+ <span class="identifier">make_depth_first_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">depth_first_iterator</span></code>
+ that will iterate through the specified node and its descendants.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+<span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,</span>boost::mpl::true_<span class="special">&gt;</span>
+ <span class="identifier">make_depth_first_descendant_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">depth_first_iterator</span></code>
+ that will iterate through the descendants of the specified node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+<span class="keyword">void</span>
+ <span class="identifier">depth_first_iterate</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the specified node and its descendants in depth-first
+ fashion, passing each node pointer dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+<span class="keyword">void</span>
+ <span class="identifier">depth_first_iterate_descendants</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the descendants of the specified node in depth-first
+ fashion, passing each element dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Equality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> enable_if<span class="special">&lt;</span>boost::mpl::equal_to<span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">==(</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">,</span> <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Inequality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> enable_if<span class="special">&lt;</span>boost::mpl::equal_to<span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">!=(</span>
+ <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">,</span> <span class="identifier">depth_first_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="post_order_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="traversal_state.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/post_order_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/post_order_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,746 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>post_order_iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="pre_order_iterator.html" title="pre_order_iterator">
+<link rel="next" href="depth_first_iterator.html" title="depth_first_iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="pre_order_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="depth_first_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.post_order_iterator"></a><a class="link" href="post_order_iterator.html" title="post_order_iterator"><code class="computeroutput"><span class="identifier">post_order_iterator</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.synopsis"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MimicsChildIterator</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">post_order_iterator</span>
+ <span class="special">{</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="identifier">reference</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span>
+ <span class="identifier">distance_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span>
+ <span class="identifier">iterator_category</span><span class="special">;</span>
+
+ <span class="identifier">post_order_iterator</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">post_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+ <span class="identifier">post_order_iterator</span><span class="special">(</span>
+ <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span>
+ <span class="special">);</span>
+
+ <span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">post_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
+
+ <span class="identifier">post_order_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">traversal_state</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.description"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This iterator traverses the specified root node and all its descendants
+ in post-order fashion, e.g. given the following tree representation:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"> <span class="identifier">A</span>
+ <span class="special">|</span>
+ <span class="identifier">C</span><span class="special">---+---</span><span class="identifier">B</span>
+ <span class="special">|</span> <span class="special">|</span>
+<span class="special">+-+-+</span> <span class="special">+-+-+</span>
+<span class="special">|</span> <span class="special">|</span> <span class="special">|</span> <span class="special">|</span>
+<span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>, then it will traverse
+ the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">C</span> <span class="identifier">F</span> <span class="identifier">G</span> <span class="identifier">B</span> <span class="identifier">A</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>, then it will
+ traverse the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">C</span> <span class="identifier">F</span> <span class="identifier">G</span> <span class="identifier">B</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.definition"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/post_order_iterator.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.tpl_param"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">NodePointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, and
+ its value type must model the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">MimicsChildIterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines whether this <code class="computeroutput"><span class="identifier">post_order_iterator</span></code>
+ will iterate only through the descendants of a node or will also
+ include the node in its traversal.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Boolean Integral Constant concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.model_of"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">false</span><span class="error">`</span>
+<span class="special">*</span> <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">true</span><span class="error">`</span>
+<span class="special">*</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.public_bases"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.members"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Where defined
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Value type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">value_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Reference type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Distance type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator category
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_category</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Default Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from im/mutable node
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Conversion constructor
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+<span class="identifier">post_order_iterator</span><span class="special">(</span><span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span><span class="special">(</span><span class="identifier">post_order_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">post_order_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assignable
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Dereference operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Indirection operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pre-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Post-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">post_order_iterator</span>
+ <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Traversal state conversion operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span> <a class="link" href="traversal_state.html" title="traversal_state">traversal_state</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.post_order_iterator.non_members"></a><a class="link" href="post_order_iterator.html#tree_node.reference.post_order_iterator.non_members" title="Non-members">Non-members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">&gt;</span>
+ <span class="identifier">make_post_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">post_order_iterator</span></code>
+ that will iterate through the specified node and its descendants.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span><span class="special">&gt;</span>
+ <span class="identifier">make_post_order_descendant_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">post_order_iterator</span></code>
+ that will iterate through the descendants of the specified node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">post_order_iterate</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the specified node and its descendants in post-order
+ fashion, passing each node pointer dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span>
+ <span class="identifier">post_order_iterate_descendants</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the descendants of the specified node in post-order
+ fashion, passing each element dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Equality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">==(</span>
+ <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Inequality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">!=(</span>
+ <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">post_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="pre_order_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="depth_first_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/pre_order_iterator.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/pre_order_iterator.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,746 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>pre_order_iterator</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="breadth_first_iterator.html" title="breadth_first_iterator">
+<link rel="next" href="post_order_iterator.html" title="post_order_iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="breadth_first_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="post_order_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.pre_order_iterator"></a><a class="link" href="pre_order_iterator.html" title="pre_order_iterator"><code class="computeroutput"><span class="identifier">pre_order_iterator</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.synopsis"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MimicsChildIterator</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">pre_order_iterator</span>
+ <span class="special">{</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span>
+ <span class="identifier">reference</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span>
+ <span class="identifier">distance_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span>
+ <span class="identifier">iterator_category</span><span class="special">;</span>
+
+ <span class="identifier">pre_order_iterator</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">pre_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">(</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span>
+ <span class="special">);</span>
+
+ <span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pre_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span>
+
+ <span class="identifier">pre_order_iterator</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">traversal_state</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.description"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This iterator traverses the specified root node and all its descendants
+ in pre-order fashion, e.g. given the following tree representation:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"> <span class="identifier">A</span>
+ <span class="special">|</span>
+ <span class="identifier">C</span><span class="special">---+---</span><span class="identifier">B</span>
+ <span class="special">|</span> <span class="special">|</span>
+<span class="special">+-+-+</span> <span class="special">+-+-+</span>
+<span class="special">|</span> <span class="special">|</span> <span class="special">|</span> <span class="special">|</span>
+<span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>, then it will traverse
+ the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">A</span> <span class="identifier">C</span> <span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">B</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+<p>
+ If this iterator is a <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>, then it will
+ traverse the tree nodes in the following order:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">C</span> <span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">B</span> <span class="identifier">F</span> <span class="identifier">G</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.definition"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/pre_order_iterator.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.tpl_param"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">NodePointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a pointer to a tree node.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Trivial Iterator concept, and
+ its value type must model the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">MimicsChildIterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines whether this <code class="computeroutput"><span class="identifier">pre_order_iterator</span></code>
+ will iterate only through the descendants of a node or will also
+ include the node in its traversal.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model the Boolean Integral Constant concept.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.model_of"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">false</span><span class="error">`</span>
+<span class="special">*</span> <a class="link" href="../concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a> <span class="keyword">if</span> <span class="error">`</span><span class="identifier">MimicsChildIterator</span><span class="special">::</span><span class="identifier">value</span><span class="error">`</span> <span class="identifier">is</span> <span class="error">`</span><span class="keyword">true</span><span class="error">`</span>
+<span class="special">*</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.public_bases"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.members"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Where defined
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Value type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">value_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Reference type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Distance type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator category
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_category</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Default Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor from im/mutable node
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Conversion constructor
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI</span><span class="special">&gt;</span>
+<span class="identifier">pre_order_iterator</span><span class="special">(</span><span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP</span><span class="special">,</span><span class="identifier">MCI</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span><span class="special">(</span><span class="identifier">pre_order_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">pre_order_iterator</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assignable
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Dereference operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Indirection operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pre-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">++();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Post-increment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pre_order_iterator</span>
+ <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Forward Iterator
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Traversal state conversion operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span> <a class="link" href="traversal_state.html" title="traversal_state">traversal_state</a><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.pre_order_iterator.non_members"></a><a class="link" href="pre_order_iterator.html#tree_node.reference.pre_order_iterator.non_members" title="Non-members">Non-members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">&gt;</span>
+ <span class="identifier">make_pre_order_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">pre_order_iterator</span></code>
+ that will iterate through the specified node and its descendants.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iterator creation
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">&gt;</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NodePointer</span><span class="special">,::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span><span class="special">&gt;</span>
+ <span class="identifier">make_pre_order_descendant_iterator</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Constructs and returns a <code class="computeroutput"><span class="identifier">pre_order_iterator</span></code>
+ that will iterate through the descendants of the specified node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">pre_order_iterate</span><span class="special">(</span><span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span><span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span><span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the specified node and its descendants in pre-order
+ fashion, passing each node pointer dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Descendant iteration
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NodePointer</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UnaryFunction</span><span class="special">&gt;</span>
+ <span class="keyword">void</span>
+ <span class="identifier">pre_order_iterate_descendants</span><span class="special">(</span>
+ <span class="identifier">NodePointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">node</span>
+ <span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">function</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Iterates through the descendants of the specified node in pre-order
+ fashion, passing each element dereferenced to the specified
+ Unary Function object.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Equality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">==(</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Inequality
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">NP1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">NP2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">MCI2</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">MCI1</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;,</span><span class="keyword">bool</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="keyword">operator</span><span class="special">!=(</span>
+ <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP1</span><span class="special">,</span><span class="identifier">MCI1</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">lhs</span>
+ <span class="special">,</span> <span class="identifier">pre_order_iterator</span><span class="special">&lt;</span><span class="identifier">NP2</span><span class="special">,</span><span class="identifier">MCI2</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rhs</span>
+ <span class="special">);</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the Input Iterator concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="breadth_first_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="post_order_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_associative_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_associative_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,810 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>raw_associative_node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="simple_node.html" title="simple_node">
+<link rel="next" href="simple_associative_node.html" title="simple_associative_node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="simple_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_associative_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.raw_associative_node"></a><a class="link" href="raw_associative_node.html" title="raw_associative_node"><code class="computeroutput"><span class="identifier">raw_associative_node</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.synopsis"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Key</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Data</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">AssociativeContainerSelector</span> <span class="special">=</span> <span class="identifier">mapS</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">raw_associative_node</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Key</span>
+ <span class="identifier">key_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Data</span>
+ <span class="identifier">data_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">raw_associative_node</span><span class="special">*</span>
+ <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">raw_associative_node</span> <span class="keyword">const</span><span class="special">*</span>
+ <span class="identifier">const_pointer</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">child_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">const_child_iterator</span><span class="special">;</span>
+
+ <span class="identifier">raw_associative_node</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">raw_associative_node</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">raw_associative_node</span><span class="special">(</span><span class="identifier">raw_associative_node</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">raw_associative_node</span><span class="special">&amp;</span>
+ <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">raw_associative_node</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">raw_associative_node</span><span class="special">();</span>
+
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">data_type</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">();</span>
+
+ <span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">,</span> <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child_copy</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">,</span> <span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">const_child_iterator</span><span class="special">,</span><span class="identifier">const_child_iterator</span><span class="special">&gt;</span>
+ <span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">child_iterator</span><span class="special">,</span><span class="identifier">child_iterator</span><span class="special">&gt;</span>
+ <span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">remove_children</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span>
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.description"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This class template is suitable for classes or algorithms that need to
+ map keys to child nodes in a tree node data structure that does not need
+ to be exposed to external code. Objects of this type can be stored by value,
+ and their children can be accessed by their associated keys for fast lookup.
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This component depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac.
+ </p></td></tr>
+</table></div>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This component depends on Boost.Utility.ContainerGen, which is not
+ yet a part of Boost. For now, you must perform a Subversion checkout
+ from the SVN Trac.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.definition"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/raw_associative_node.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.tpl_param"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Key</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a key object to be associated with a child of a
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Data</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of the object to be stored in a <code class="computeroutput"><span class="identifier">raw_associative_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">AssociativeContainerSelector</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines the internal map types whose mapped
+ types are the same as the pointer type.
+ </p>
+ </td>
+<td>
+ <p>
+ It must be a type for which associative_container_gen
+ returns a valid container.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">mapS</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.model_of"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+<span class="special">*</span> Default Constructible <span class="keyword">if</span> <span class="error">`</span><span class="identifier">Data</span><span class="error">`</span> <span class="identifier">is</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable <span class="keyword">if</span> <span class="error">`</span><span class="identifier">Data</span><span class="error">`</span> <span class="identifier">is</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.public_bases"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.members"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Where defined
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Key type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">key_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer-to-const type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Default Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">explicit</span> <span class="identifier">raw_associative_node</span><span class="special">(</span><span class="identifier">data_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span><span class="special">(</span><span class="identifier">raw_associative_node</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">raw_associative_node</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assignable
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span><span class="special">&amp;</span>
+ <span class="identifier">get_data</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;,</span>
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;,</span>
+ <span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_begin</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_end</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::const_child_iterator,Node::const_child_iterator&gt;
+ find_children(key_type const&amp;) const;</code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::child_iterator,Node::child_iterator&gt;
+ find_children(key_type const&amp;);</code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">remove_children</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove all children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_associative_node.example"></a><a class="link" href="raw_associative_node.html#tree_node.reference.raw_associative_node.example" title="Example">Example</a>
+</h4></div></div></div>
+<p>
+ &lt;example/raw_associative_node.cpp&gt;
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="simple_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_associative_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,618 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>raw_node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="simple_node.html" title="simple_node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.raw_node"></a><a class="link" href="raw_node.html" title="raw_node"><code class="computeroutput"><span class="identifier">raw_node</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.synopsis"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">raw_node</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span>
+ <span class="identifier">data_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">raw_node</span><span class="special">*</span>
+ <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">raw_node</span> <span class="keyword">const</span><span class="special">*</span>
+ <span class="identifier">const_pointer</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">child_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">const_child_iterator</span><span class="special">;</span>
+
+ <span class="identifier">raw_node</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">raw_node</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">raw_node</span><span class="special">(</span><span class="identifier">raw_node</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">raw_node</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">raw_node</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">raw_node</span><span class="special">();</span>
+
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">data_type</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">();</span>
+
+ <span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span>
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.description"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This class template is suitable for classes or algorithms that require
+ a tree node data structure but do not need to expose it to external code.
+ Objects of this type can be stored by value, and their children can be
+ accessed by offsetting the start of the range with a numerical index for
+ fast lookup.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.definition"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.definition" title="Where defined">Where defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/raw_node.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.tpl_param"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.tpl_param" title="Template Parameters">Template Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of the object to be stored in a <code class="computeroutput"><span class="identifier">raw_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.model_of"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.model_of" title="Model of">Model of</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+<span class="special">*</span> Default Constructible <span class="keyword">if</span> <span class="error">`</span><span class="identifier">T</span><span class="error">`</span> <span class="identifier">is</span> Default Constructible
+<span class="special">*</span> Copy Constructible
+<span class="special">*</span> Assignable <span class="keyword">if</span> <span class="error">`</span><span class="identifier">T</span><span class="error">`</span> <span class="identifier">is</span> Assignable
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.public_bases"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.public_bases" title="Public Base Classes">Public Base
+ Classes</a>
+</h4></div></div></div>
+<p>
+ None.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.members"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Where defined
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer-to-const type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Default constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_node</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Default Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Constructor with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">explicit</span> <span class="identifier">raw_node</span><span class="special">(</span><span class="identifier">data_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_node</span><span class="special">(</span><span class="identifier">raw_node</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy Constructible
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw_node</span><span class="special">&amp;</span>
+ <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">raw_node</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assignable
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span><span class="special">&amp;</span>
+ <span class="identifier">get_data</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">data_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">const_pointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_begin</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_end</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove all children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.raw_node.example"></a><a class="link" href="raw_node.html#tree_node.reference.raw_node.example" title="Example">Example</a>
+</h4></div></div></div>
+<p>
+ &lt;example/raw_node.cpp&gt;
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_associative_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_associative_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,785 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>simple_associative_node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="raw_associative_node.html" title="raw_associative_node">
+<link rel="next" href="breadth_first_iterator.html" title="breadth_first_iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raw_associative_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="breadth_first_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.simple_associative_node"></a><a class="link" href="simple_associative_node.html" title="simple_associative_node"><code class="computeroutput"><span class="identifier">simple_associative_node</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.synopsis"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Key</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Data</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">AssociativeContainerSelector</span> <span class="special">=</span> <span class="identifier">mapS</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">simple_associative_node</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">enable_shared_from_this</span><span class="special">&lt;</span>
+ <span class="identifier">simple_associative_node</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span><span class="identifier">Data</span><span class="special">,</span><span class="identifier">AssociativeContainerSelector</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">private</span> <span class="identifier">noncopyable</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Key</span>
+ <span class="identifier">key_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Data</span>
+ <span class="identifier">data_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">simple_associative_node</span><span class="special">&gt;</span>
+ <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">simple_associative_node</span> <span class="keyword">const</span><span class="special">&gt;</span>
+ <span class="identifier">const_pointer</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">child_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">const_child_iterator</span><span class="special">;</span>
+
+ <span class="special">~</span><span class="identifier">simple_associative_node</span><span class="special">();</span>
+
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">data_type</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">();</span>
+
+ <span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">,</span> <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child_copy</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">,</span> <span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">const_child_iterator</span><span class="special">,</span><span class="identifier">const_child_iterator</span><span class="special">&gt;</span>
+ <span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">child_iterator</span><span class="special">,</span><span class="identifier">child_iterator</span><span class="special">&gt;</span>
+ <span class="identifier">find_children</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">remove_children</span><span class="special">(</span><span class="identifier">Key</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">key</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create</span><span class="special">();</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.description"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This class template is suitable for classes or algorithms that need to
+ map keys to child nodes in a tree node data structure that must be exposed
+ to external code. Objects of this type must be stored by <code class="computeroutput"><span class="identifier">simple_associative_node</span><span class="special">::</span><span class="identifier">pointer</span></code> and can only be instantiated
+ through the <code class="computeroutput"><span class="keyword">static</span></code> creation
+ methods that this class template provides. Their children can be accessed
+ by their associated keys for fast lookup.
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This component depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac.
+ </p></td></tr>
+</table></div>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This component depends on Boost.Utility.ContainerGen, which is not
+ yet a part of Boost. For now, you must perform a Subversion checkout
+ from the SVN Trac.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.definition"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/simple_associative_node.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.tpl_param"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Key</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a key object to be associated with a child of a
+ <code class="computeroutput"><span class="identifier">raw_associative_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Data</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of the object to be stored in a <code class="computeroutput"><span class="identifier">simple_associative_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">AssociativeContainerSelector</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type that determines the internal map types whose mapped
+ types are the same as the pointer type.
+ </p>
+ </td>
+<td>
+ <p>
+ It must be a type for which associative_container_gen
+ returns a valid container.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">mapS</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.model_of"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.model_of" title="Model of">Model
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative
+ Tree Node</strong></span></a>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.public_bases"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ std::tr1::enable_shared_from_this
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.members"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer-to-const type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a <code class="computeroutput"><span class="identifier">simple_associative_node</span></code>
+ object with the specified data and returns a pointer to it.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a <code class="computeroutput"><span class="identifier">simple_associative_node</span></code>
+ object and returns a pointer to it.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a deep copy of the specified node. Returns a pointer
+ to the new node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span><span class="special">&amp;</span>
+ <span class="identifier">get_data</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;,</span>
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;,</span>
+ <span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_begin</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_end</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">find_child</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::const_child_iterator,Node::const_child_iterator&gt;
+ find_children(key_type const&amp;) const;</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">std::pair&lt;Node::child_iterator,Node::child_iterator&gt;
+ find_children(key_type const&amp;);</code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">remove_children</span><span class="special">(</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove all children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_associative_node.example"></a><a class="link" href="simple_associative_node.html#tree_node.reference.simple_associative_node.example" title="Example">Example</a>
+</h4></div></div></div>
+<p>
+ &lt;example/simple_associative_node.cpp&gt;
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raw_associative_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="breadth_first_iterator.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_node.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_node.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,595 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>simple_node</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="raw_node.html" title="raw_node">
+<link rel="next" href="raw_associative_node.html" title="raw_associative_node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raw_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="raw_associative_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.simple_node"></a><a class="link" href="simple_node.html" title="simple_node"><code class="computeroutput"><span class="identifier">simple_node</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.synopsis"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">simple_node</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">enable_shared_from_this</span><span class="special">&lt;</span><span class="identifier">simple_node</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">private</span> <span class="identifier">noncopyable</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span>
+ <span class="identifier">data_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">simple_node</span><span class="special">&gt;</span>
+ <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">simple_node</span> <span class="keyword">const</span><span class="special">&gt;</span>
+ <span class="identifier">const_pointer</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">child_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="comment">// implementation_defined
+</span> <span class="identifier">const_child_iterator</span><span class="special">;</span>
+
+ <span class="special">~</span><span class="identifier">simple_node</span><span class="special">();</span>
+
+ <span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">data_type</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">();</span>
+
+ <span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">();</span>
+
+ <span class="identifier">pointer</span> <span class="identifier">add_child_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">copy</span><span class="special">);</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span>
+
+ <span class="identifier">const_child_iterator</span> <span class="identifier">get_child_end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">data</span><span class="special">);</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create</span><span class="special">();</span>
+
+ <span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">create_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+ <span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.description"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This class template is suitable for classes or algorithms that require
+ a tree node data structure that must be exposed to external code. Objects
+ of this type must be stored by <code class="computeroutput"><span class="identifier">simple_node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ and can only be instantiated through the <code class="computeroutput"><span class="keyword">static</span></code>
+ creation methods that this class template provides. Their children can
+ be accessed by offsetting the start of the range with a numerical index
+ for fast lookup.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.definition"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.definition" title="Where defined">Where defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/simple_node.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.tpl_param"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.tpl_param" title="Template Parameters">Template
+ Parameters</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of the object to be stored in a <code class="computeroutput"><span class="identifier">simple_node</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.model_of"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.model_of" title="Model of">Model of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random
+ Access Child Iterator Tree Node</strong></span></a>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.public_bases"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.public_bases" title="Public Base Classes">Public
+ Base Classes</a>
+</h4></div></div></div>
+<p>
+ std::tr1::enable_shared_from_this
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.members"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.members" title="Members">Members</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Data type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Pointer-to-const type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable child iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create</span><span class="special">(</span><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a <code class="computeroutput"><span class="identifier">simple_node</span></code>
+ object with the specified data and returns a pointer to it.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a <code class="computeroutput"><span class="identifier">simple_node</span></code>
+ object and returns a pointer to it.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Node copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">static</span> <span class="identifier">pointer</span>
+ <span class="identifier">create_copy</span><span class="special">(</span><span class="identifier">const_pointer</span> <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a deep copy of the specified node. Returns a pointer
+ to the new node.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">get_data</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Data access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">data_type</span><span class="special">&amp;</span>
+ <span class="identifier">get_data</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_pointer</span> <span class="identifier">get_parent</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">get_parent</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation with data
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">data_type</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pointer</span> <span class="identifier">add_child</span><span class="special">(</span><span class="identifier">const_pointer</span>
+ <span class="keyword">const</span><span class="special">&amp;);</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/raci_tree_node.html" title="Random Access Child Iterator Tree Node"><span class="bold"><strong>Random Access Child Iterator Tree Node</strong></span></a>
+ concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_begin</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range begin access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_begin</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_child_iterator</span>
+ <span class="identifier">get_child_end</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Children range past-the-end access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">child_iterator</span> <span class="identifier">get_child_end</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove all children
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">remove_all_children</span><span class="special">();</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Defined by the <a class="link" href="../concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.simple_node.example"></a><a class="link" href="simple_node.html#tree_node.reference.simple_node.example" title="Example">Example</a>
+</h4></div></div></div>
+<p>
+ &lt;example/simple_node.cpp&gt;
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="raw_node.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="raw_associative_node.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/traversal_state.html
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/traversal_state.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,85 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>traversal_state</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;tree_node 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="depth_first_iterator.html" title="depth_first_iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="depth_first_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.reference.traversal_state"></a><a class="link" href="traversal_state.html" title="traversal_state"><code class="computeroutput"><span class="identifier">traversal_state</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.traversal_state.synopsis"></a><a class="link" href="traversal_state.html#tree_node.reference.traversal_state.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tree_node</span> <span class="special">{</span>
+
+ <span class="keyword">enum</span> <span class="identifier">traversal_state</span>
+ <span class="special">{</span>
+ <span class="identifier">no_traversal</span>
+ <span class="special">,</span> <span class="identifier">pre_order_traversal</span>
+ <span class="special">,</span> <span class="identifier">post_order_traversal</span>
+ <span class="special">,</span> <span class="identifier">breadth_first_traversal</span>
+ <span class="special">};</span>
+<span class="special">}}</span> <span class="comment">// namespace boost::tree_node
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.traversal_state.description"></a><a class="link" href="traversal_state.html#tree_node.reference.traversal_state.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This enumeration type is the return type of the dereferenceability expression
+ defined by each iterator type that this library provides. The <code class="computeroutput"><span class="identifier">no_traversal</span></code> value corresponds to <code class="computeroutput"><span class="keyword">false</span></code> in a boolean context, enabling the
+ iterator types to fulfill their runtime requirements for dereferenceability.
+ The <code class="computeroutput"><span class="identifier">pre_order_traversal</span></code>
+ and <code class="computeroutput"><span class="identifier">post_order_traversal</span></code>
+ values are significant because the <a class="link" href="depth_first_iterator.html" title="depth_first_iterator"><code class="computeroutput"><span class="identifier">depth_first_iterator</span></code></a> traverses
+ each node twice, so algorithms must be able to distinguish which state
+ the iterator is in when it traverses a tree node. The <code class="computeroutput"><span class="identifier">breadth_first_traversal</span></code>
+ value is defined for completeness.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.reference.traversal_state.definition"></a><a class="link" href="traversal_state.html#tree_node.reference.traversal_state.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/tree_node/traversal_state.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011 Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="depth_first_iterator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/tree_node/libs/tree_node/doc/ref_breadth_first_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_breadth_first_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,224 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:breadth_first_iterator `breadth_first_iterator`]
+
+[section Synopsis]
+[reference__breadth_first_iterator]
+[endsect]
+
+[section Description]
+This iterator traverses the specified root node and all its descendants in
+breadth-first fashion, e.g. given the following tree representation:
+
+``
+ A
+ |
+ C---+---B
+ | |
++-+-+ +-+-+
+| | | |
+D E F G
+``
+
+If this iterator is a __Full_Tree_Node_Iterator__, then it will traverse the
+tree nodes in the following order:
+
+``
+A C B D E F G
+``
+
+If this iterator is a __Tree_Node_Descendant_Iterator__, then it will traverse
+the tree nodes in the following order:
+
+``
+C B D E F G
+``
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_breadth_first_iterator_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`NodePointer`]
+ [The type of a pointer to a tree node.]
+ [
+ It must model the __Trivial_Iterator__ concept, and its value type
+ must model the __Tree_Node__ concept.
+ ]
+ []
+ ]
+ [
+ [`MimicsChildIterator`]
+ [
+ The type that determines whether this `breadth_first_iterator` will
+ iterate only through the descendants of a node or will also include
+ the node in its traversal.
+ ]
+ [It must model the __Boolean_Integral_Constant__ concept.]
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Full_Tree_Node_Iterator__ if `MimicsChildIterator::value` is `false`
+ * __Tree_Node_Descendant_Iterator__ if `MimicsChildIterator::value` is `true`
+ * __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Where defined]]
+ [
+ [Value type]
+ [`value_type`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Reference type]
+ [`reference`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Distance type]
+ [`distance`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Iterator category]
+ [`iterator_category`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Default constructor]
+ [`breadth_first_iterator();`]
+ [__Default_Constructible__]
+ ]
+ [
+ [Constructor from im/mutable node]
+ [`breadth_first_iterator(NodePointer const&);`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Conversion constructor]
+ [``
+ template <typename NP, typename MCI>
+ breadth_first_iterator(breadth_first_iterator<NP,MCI> const&);
+ ``]
+ [`breadth_first_iterator`]
+ ]
+ [
+ [Copy constructor]
+ [`breadth_first_iterator(breadth_first_iterator const&);`]
+ [__Copy_Constructible__]
+ ]
+ [
+ [Assignment operator]
+ [`breadth_first_iterator& operator=(breadth_first_iterator const&);`]
+ [__Assignable__]
+ ]
+ [
+ [Dereference operator]
+ [`reference operator*() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Indirection operator]
+ [`pointer operator->() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pre-increment operator]
+ [`breadth_first_iterator& operator++();`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Post-increment operator]
+ [`breadth_first_iterator operator++(int);`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Traversal state conversion operator]
+ [`operator _traversal_state_() const;`]
+ [__Tree_Node_Iterator__]
+ ]
+]
+[endsect] [/ Members]
+
+[section:non_members Non-members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Iterator creation]
+ [[reference__make_breadth_first_iterator]]
+ [
+ Constructs and returns a `breadth_first_iterator` that will iterate
+ through the specified node and its descendants.
+ ]
+ ]
+ [
+ [Descendant iterator creation]
+ [[reference__make_breadth_first_descendant_iterator]]
+ [
+ Constructs and returns a `breadth_first_iterator` that will iterate
+ through the descendants of the specified node.
+ ]
+ ]
+ [
+ [Iteration]
+ [[reference__breadth_first_iterate]]
+ [
+ Iterates through the specified node and its descendants in
+ breadth-first fashion, passing each node pointer dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Descendant iteration]
+ [[reference__breadth_first_iterate_descendants]]
+ [
+ Iterates through the descendants of the specified node in
+ breadth-first fashion, passing each element dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Equality]
+ [[reference__breadth_first_iterator__operator_equals]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+ [
+ [Inequality]
+ [[reference__breadth_first_iterator__operator_not_equal]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+]
+[endsect] [/ Non-members]
+
+[endsect] [/ breadth_first_iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_depth_first_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_depth_first_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,299 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:depth_first_iterator `depth_first_iterator`]
+
+[section Synopsis]
+[reference__depth_first_iterator]
+[endsect]
+
+[section Description]
+This iterator traverses the specified root node and all its descendants in
+depth-first fashion, e.g. given the following tree representation:
+
+``
+ A
+ |
+ C---+---B
+ | |
++-+-+ +-+-+
+| | | |
+D E F G
+``
+
+If this iterator is a __Full_Tree_Node_Iterator__, then it will traverse the
+tree nodes in the following order:
+
+``
+A pre_order_traversal
+C pre_order_traversal
+D pre_order_traversal
+D post_order_traversal
+E pre_order_traversal
+E post_order_traversal
+C post_order_traversal
+B pre_order_traversal
+F pre_order_traversal
+F post_order_traversal
+G pre_order_traversal
+G post_order_traversal
+B post_order_traversal
+A post_order_traversal
+``
+
+If this iterator is a __Tree_Node_Descendant_Iterator__, then it will traverse
+the tree nodes in the following order:
+
+``
+C pre_order_traversal
+D pre_order_traversal
+D post_order_traversal
+E pre_order_traversal
+E post_order_traversal
+C post_order_traversal
+B pre_order_traversal
+F pre_order_traversal
+F post_order_traversal
+G pre_order_traversal
+G post_order_traversal
+B post_order_traversal
+``
+
+The traversal state conversion operator of this iterator will yield each value
+in the column on the right at the appropriate iteration.
+
+This iterator is ideal for algorithms that need to perform both preprocessing
+and postprocessing of a tree node, e.g. the copy constructors of the
+__raw_node__ and __raw_associative_node__ implementations.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_depth_first_iterator_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`NodePointer`]
+ [The type of a pointer to a tree node.]
+ [
+ It must model the __Trivial_Iterator__ concept, and its value type
+ must model the __Tree_Node__ concept.
+ ]
+ []
+ ]
+ [
+ [`MimicsChildIterator`]
+ [
+ The type that determines whether this `depth_first_iterator` will
+ iterate only through the descendants of a node or will also include
+ the node in its traversal.
+ ]
+ [It must model the __Boolean_Integral_Constant__ concept.]
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Full_Tree_Node_Iterator__ if `MimicsChildIterator::value` is `false`
+ * __Tree_Node_Descendant_Iterator__ if `MimicsChildIterator::value` is `true`
+ * __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Value type]
+ [`value_type`]
+ [Defined in the __Tree_Node_Iterator__ concept.]
+ ]
+ [
+ [Reference type]
+ [`reference`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Distance type]
+ [`distance`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Iterator category]
+ [`iterator_category`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Default constructor]
+ [`depth_first_iterator();`]
+ [Defined in the __Default_Constructible__ concept.]
+ ]
+ [
+ [Constructor from im/mutable node]
+ [`depth_first_iterator(NodePointer const&);`]
+ [Defined in the __Tree_Node_Iterator__ concept.]
+ ]
+ [
+ [Conversion constructor]
+ [``
+ template <typename NP, typename MCI>
+ depth_first_iterator(depth_first_iterator<NP,MCI> const&);
+ ``]
+ [
+ Constructs a `depth_first_iterator` object that will point to the
+ same element that the specified iterator points to.
+ ]
+ ]
+ [
+ [Copy constructor]
+ [`depth_first_iterator(depth_first_iterator const&);`]
+ [Defined in the __Copy_Constructible__ concept.]
+ ]
+ [
+ [Assignment operator]
+ [`depth_first_iterator& operator=(depth_first_iterator const&);`]
+ [Defined in the __Assignable__ concept.]
+ ]
+ [
+ [Dereference operator]
+ [`reference operator*() const;`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Indirection operator]
+ [`pointer operator->() const;`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Pre-increment operator]
+ [`depth_first_iterator& operator++();`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Post-increment operator]
+ [`depth_first_iterator operator++(int);`]
+ [Defined in the __Forward_Iterator__ concept.]
+ ]
+ [
+ [Traversal state conversion operator]
+ [`operator _traversal_state_() const;`]
+ [
+ Returns `pre_order_traversal` if this iterator has not yet examined
+ the children of the current node, `post_order_traversal` if this
+ iterator has examined all of the children of the current node, or
+ `no_traversal` if this iterator is not dereferenceable.
+ ]
+ ]
+]
+[endsect] [/ Members]
+
+[section:non_members Non-members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Iterator creation]
+ [``
+ template <typename NodePointer>
+ depth_first_iterator<NodePointer,_mpl_false_>
+ make_depth_first_iterator(NodePointer const& node);
+ ``]
+ [
+ Constructs and returns a `depth_first_iterator` that will iterate
+ through the specified node and its descendants.
+ ]
+ ]
+ [
+ [Descendant iterator creation]
+ [``
+ template <typename NodePointer>
+ depth_first_iterator<NodePointer,_mpl_true_>
+ make_depth_first_descendant_iterator(NodePointer const& node);
+ ``]
+ [
+ Constructs and returns a `depth_first_iterator` that will iterate
+ through the descendants of the specified node.
+ ]
+ ]
+ [
+ [Iteration]
+ [``
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ depth_first_iterate(
+ NodePointer const& node
+ , UnaryFunction function
+ );
+ ``]
+ [
+ Iterates through the specified node and its descendants in
+ depth-first fashion, passing each node pointer dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Descendant iteration]
+ [``
+ template <typename NodePointer, typename UnaryFunction>
+ void
+ depth_first_iterate_descendants(
+ NodePointer const& node
+ , UnaryFunction function
+ );
+ ``]
+ [
+ Iterates through the descendants of the specified node in
+ depth-first fashion, passing each element dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Equality]
+ [``
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+ typename _enable_if_<_mpl_equal_to_<MCI1,MCI2>,bool>::type
+ operator==(
+ depth_first_iterator<NP1,MCI1> const&
+ , depth_first_iterator<NP2,MCI2> const&
+ );
+ ``]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+ [
+ [Inequality]
+ [``
+ template <typename NP1, typename NP2, typename MCI1, typename MCI2>
+ typename _enable_if_<_mpl_equal_to_<MCI1,MCI2>,bool>::type
+ operator!=(
+ depth_first_iterator<NP1,MCI1> const&
+ , depth_first_iterator<NP2,MCI2> const&
+ );
+ ``]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+]
+[endsect] [/ Non-members]
+
+[endsect] [/ depth_first_iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_post_order_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_post_order_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,224 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:post_order_iterator `post_order_iterator`]
+
+[section Synopsis]
+[reference__post_order_iterator]
+[endsect]
+
+[section Description]
+This iterator traverses the specified root node and all its descendants in
+post-order fashion, e.g. given the following tree representation:
+
+``
+ A
+ |
+ C---+---B
+ | |
++-+-+ +-+-+
+| | | |
+D E F G
+``
+
+If this iterator is a __Full_Tree_Node_Iterator__, then it will traverse the
+tree nodes in the following order:
+
+``
+D E C F G B A
+``
+
+If this iterator is a __Tree_Node_Descendant_Iterator__, then it will traverse
+the tree nodes in the following order:
+
+``
+D E C F G B
+``
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_post_order_iterator_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`NodePointer`]
+ [The type of a pointer to a tree node.]
+ [
+ It must model the __Trivial_Iterator__ concept, and its value type
+ must model the __Tree_Node__ concept.
+ ]
+ []
+ ]
+ [
+ [`MimicsChildIterator`]
+ [
+ The type that determines whether this `post_order_iterator` will
+ iterate only through the descendants of a node or will also include
+ the node in its traversal.
+ ]
+ [It must model the __Boolean_Integral_Constant__ concept.]
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Full_Tree_Node_Iterator__ if `MimicsChildIterator::value` is `false`
+ * __Tree_Node_Descendant_Iterator__ if `MimicsChildIterator::value` is `true`
+ * __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Where defined]]
+ [
+ [Value type]
+ [`value_type`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Reference type]
+ [`reference`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Distance type]
+ [`distance`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Iterator category]
+ [`iterator_category`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Default constructor]
+ [`post_order_iterator();`]
+ [__Default_Constructible__]
+ ]
+ [
+ [Constructor from im/mutable node]
+ [`post_order_iterator(NodePointer const&);`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Conversion constructor]
+ [``
+ template <typename NP, typename MCI>
+ post_order_iterator(post_order_iterator<NP,MCI> const&);
+ ``]
+ [`post_order_iterator`]
+ ]
+ [
+ [Copy constructor]
+ [`post_order_iterator(post_order_iterator const&);`]
+ [__Copy_Constructible__]
+ ]
+ [
+ [Assignment operator]
+ [`post_order_iterator& operator=(post_order_iterator const&);`]
+ [__Assignable__]
+ ]
+ [
+ [Dereference operator]
+ [`reference operator*() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Indirection operator]
+ [`pointer operator->() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pre-increment operator]
+ [`post_order_iterator& operator++();`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Post-increment operator]
+ [`post_order_iterator operator++(int);`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Traversal state conversion operator]
+ [`operator _traversal_state_() const;`]
+ [__Tree_Node_Iterator__]
+ ]
+]
+[endsect] [/ Members]
+
+[section:non_members Non-members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Iterator creation]
+ [[reference__make_post_order_iterator]]
+ [
+ Constructs and returns a `post_order_iterator` that will iterate
+ through the specified node and its descendants.
+ ]
+ ]
+ [
+ [Descendant iterator creation]
+ [[reference__make_post_order_descendant_iterator]]
+ [
+ Constructs and returns a `post_order_iterator` that will iterate
+ through the descendants of the specified node.
+ ]
+ ]
+ [
+ [Iteration]
+ [[reference__post_order_iterate]]
+ [
+ Iterates through the specified node and its descendants in
+ post-order fashion, passing each node pointer dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Descendant iteration]
+ [[reference__post_order_iterate_descendants]]
+ [
+ Iterates through the descendants of the specified node in
+ post-order fashion, passing each element dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Equality]
+ [[reference__post_order_iterator__operator_equals]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+ [
+ [Inequality]
+ [[reference__post_order_iterator__operator_not_equal]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+]
+[endsect] [/ Non-members]
+
+[endsect] [/ post_order_iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_pre_order_iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_pre_order_iterator.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,224 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:pre_order_iterator `pre_order_iterator`]
+
+[section Synopsis]
+[reference__pre_order_iterator]
+[endsect]
+
+[section Description]
+This iterator traverses the specified root node and all its descendants in
+pre-order fashion, e.g. given the following tree representation:
+
+``
+ A
+ |
+ C---+---B
+ | |
++-+-+ +-+-+
+| | | |
+D E F G
+``
+
+If this iterator is a __Full_Tree_Node_Iterator__, then it will traverse the
+tree nodes in the following order:
+
+``
+A C D E B F G
+``
+
+If this iterator is a __Tree_Node_Descendant_Iterator__, then it will traverse
+the tree nodes in the following order:
+
+``
+C D E B F G
+``
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_pre_order_iterator_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`NodePointer`]
+ [The type of a pointer to a tree node.]
+ [
+ It must model the __Trivial_Iterator__ concept, and its value type
+ must model the __Tree_Node__ concept.
+ ]
+ []
+ ]
+ [
+ [`MimicsChildIterator`]
+ [
+ The type that determines whether this `pre_order_iterator` will
+ iterate only through the descendants of a node or will also include
+ the node in its traversal.
+ ]
+ [It must model the __Boolean_Integral_Constant__ concept.]
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Full_Tree_Node_Iterator__ if `MimicsChildIterator::value` is `false`
+ * __Tree_Node_Descendant_Iterator__ if `MimicsChildIterator::value` is `true`
+ * __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Where defined]]
+ [
+ [Value type]
+ [`value_type`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Reference type]
+ [`reference`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Distance type]
+ [`distance`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Iterator category]
+ [`iterator_category`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Default constructor]
+ [`pre_order_iterator();`]
+ [__Default_Constructible__]
+ ]
+ [
+ [Constructor from im/mutable node]
+ [`pre_order_iterator(NodePointer const&);`]
+ [__Tree_Node_Iterator__]
+ ]
+ [
+ [Conversion constructor]
+ [``
+ template <typename NP, typename MCI>
+ pre_order_iterator(pre_order_iterator<NP,MCI> const&);
+ ``]
+ [`pre_order_iterator`]
+ ]
+ [
+ [Copy constructor]
+ [`pre_order_iterator(pre_order_iterator const&);`]
+ [__Copy_Constructible__]
+ ]
+ [
+ [Assignment operator]
+ [`pre_order_iterator& operator=(pre_order_iterator const&);`]
+ [__Assignable__]
+ ]
+ [
+ [Dereference operator]
+ [`reference operator*() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Indirection operator]
+ [`pointer operator->() const;`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Pre-increment operator]
+ [`pre_order_iterator& operator++();`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Post-increment operator]
+ [`pre_order_iterator operator++(int);`]
+ [__Forward_Iterator__]
+ ]
+ [
+ [Traversal state conversion operator]
+ [`operator _traversal_state_() const;`]
+ [__Tree_Node_Iterator__]
+ ]
+]
+[endsect] [/ Members]
+
+[section:non_members Non-members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Iterator creation]
+ [[reference__make_pre_order_iterator]]
+ [
+ Constructs and returns a `pre_order_iterator` that will iterate
+ through the specified node and its descendants.
+ ]
+ ]
+ [
+ [Descendant iterator creation]
+ [[reference__make_pre_order_descendant_iterator]]
+ [
+ Constructs and returns a `pre_order_iterator` that will iterate
+ through the descendants of the specified node.
+ ]
+ ]
+ [
+ [Iteration]
+ [[reference__pre_order_iterate]]
+ [
+ Iterates through the specified node and its descendants in
+ pre-order fashion, passing each node pointer dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Descendant iteration]
+ [[reference__pre_order_iterate_descendants]]
+ [
+ Iterates through the descendants of the specified node in
+ pre-order fashion, passing each element dereferenced to
+ the specified __Unary_Function__ object.
+ ]
+ ]
+ [
+ [Equality]
+ [[reference__pre_order_iterator__operator_equals]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+ [
+ [Inequality]
+ [[reference__pre_order_iterator__operator_not_equal]]
+ [Defined by the __Input_Iterator__ concept.]
+ ]
+]
+[endsect] [/ Non-members]
+
+[endsect] [/ pre_order_iterator]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_raw_associative_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_raw_associative_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,239 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:raw_associative_node `raw_associative_node`]
+
+[section Synopsis]
+[reference__raw_associative_node]
+[endsect]
+
+[section Description]
+This class template is suitable for classes or algorithms that need to map keys
+to child nodes in a tree node data structure that does not need to be exposed
+to external code. Objects of this type can be stored by value, and their
+children can be accessed by their associated keys for fast lookup.
+
+[important
+ This component depends on __Boost_Type_Traits_Operators__, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__.
+]
+
+[important
+ This component depends on __Boost_Utility_ContainerGen__, which is not yet
+ a part of Boost. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_raw_associative_node_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`Key`]
+ [
+ The type of a key object to be associated with a child of a
+ `raw_associative_node`.
+ ]
+ []
+ []
+ ]
+ [
+ [`Data`]
+ [The type of the object to be stored in a `raw_associative_node`.]
+ []
+ []
+ ]
+ [
+ [`AssociativeContainerSelector`]
+ [
+ The type that determines the internal map types whose mapped types
+ are the same as the pointer type.
+ ]
+ [
+ It must be a type for which __associative_container_gen__ returns
+ a valid container.
+ ]
+ [`mapS`]
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Associative_Tree_Node__
+ * __Default_Constructible__ if `Data` is __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__ if `Data` is __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Where defined]]
+ [
+ [Key type]
+ [`key_type`]
+ [__Tree_Node__]
+ ]
+ [
+ [Data type]
+ [`data_type`]
+ [__Tree_Node__]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [__Tree_Node__]
+ ]
+ [
+ [Pointer-to-const type]
+ [`const_pointer`]
+ [__Tree_Node__]
+ ]
+ [
+ [Child iterator type]
+ [`child_iterator`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Immutable child iterator type]
+ [`const_child_iterator`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Default constructor]
+ [`raw_associative_node();`]
+ [__Default_Constructible__]
+ ]
+ [
+ [Constructor with data]
+ [`explicit raw_associative_node(data_type const&);`]
+ [`raw_associative_node`]
+ ]
+ [
+ [Copy constructor]
+ [`raw_associative_node(raw_associative_node const&);`]
+ [__Copy_Constructible__]
+ ]
+ [
+ [Assignment operator]
+ [`raw_associative_node& operator=(raw_associative_node const&);`]
+ [__Assignable__]
+ ]
+ [
+ [Data access]
+ [`data_type const& get_data() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Data access]
+ [`data_type& get_data();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Parent access]
+ [`const_pointer get_parent() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Parent access]
+ [`pointer get_parent();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Child creation with data]
+ [`pointer add_child(key_type const&, data_type const&);`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Child creation]
+ [`pointer add_child(key_type const&);`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Child copy creation]
+ [`pointer add_child(key_type const&, const_pointer const&);`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Children range begin access]
+ [`const_child_iterator get_child_begin() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range begin access]
+ [`child_iterator get_child_begin();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range past-the-end access]
+ [`const_child_iterator get_child_end() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range past-the-end access]
+ [`child_iterator get_child_end();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Child search]
+ [`const_child_iterator find_child(key_type const&) const;`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Child search]
+ [`child_iterator find_child(key_type const&);`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Child search range]
+ [
+ [^_std_pair_<Node::const_child_iterator,Node::const_child_iterator>
+ find_children(key_type const&) const;]
+ ]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Child search range]
+ [
+ [^_std_pair_<Node::child_iterator,Node::child_iterator>
+ find_children(key_type const&);]
+ ]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Remove children]
+ [`std::size_t remove_children(key_type const&);`]
+ [__Associative_Tree_Node__]
+ ]
+ [
+ [Remove all children]
+ [`void remove_all_children();`]
+ [__Tree_Node__]
+ ]
+]
+[endsect] [/ Members]
+
+[section Example]
+<__example_raw_associative_node_cpp__>
+[endsect]
+
+[endsect] [/ raw_associative_node]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_raw_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_raw_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,169 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:raw_node `raw_node`]
+
+[section Synopsis]
+[reference__raw_node]
+[endsect]
+
+[section Description]
+This class template is suitable for classes or algorithms that require a tree
+node data structure but do not need to expose it to external code. Objects
+of this type can be stored by value, and their children can be accessed by
+offsetting the start of the range with a numerical index for fast lookup.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_raw_node_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`T`]
+ [The type of the object to be stored in a `raw_node`.]
+ []
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+
+ * __Random_Access_Child_Iterator_Tree_Node__
+ * __Default_Constructible__ if `T` is __Default_Constructible__
+ * __Copy_Constructible__
+ * __Assignable__ if `T` is __Assignable__
+
+[endsect]
+
+[section:public_bases Public Base Classes]
+None.
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Where defined]]
+ [
+ [Data type]
+ [`data_type`]
+ [__Tree_Node__]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [__Tree_Node__]
+ ]
+ [
+ [Pointer-to-const type]
+ [`const_pointer`]
+ [__Tree_Node__]
+ ]
+ [
+ [Child iterator type]
+ [`child_iterator`]
+ [__Random_Access_Child_Iterator_Tree_Node__]
+ ]
+ [
+ [Immutable child iterator type]
+ [`const_child_iterator`]
+ [__Random_Access_Child_Iterator_Tree_Node__]
+ ]
+ [
+ [Default constructor]
+ [`raw_node();`]
+ [__Default_Constructible__]
+ ]
+ [
+ [Constructor with data]
+ [`explicit raw_node(data_type const&);`]
+ [`raw_node`]
+ ]
+ [
+ [Copy constructor]
+ [`raw_node(raw_node const&);`]
+ [__Copy_Constructible__]
+ ]
+ [
+ [Assignment operator]
+ [`raw_node& operator=(raw_node const&);`]
+ [__Assignable__]
+ ]
+ [
+ [Data access]
+ [`data_type const& get_data() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Data access]
+ [`data_type& get_data();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Parent access]
+ [`const_pointer get_parent() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Parent access]
+ [`pointer get_parent();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Child creation with data]
+ [`pointer add_child(data_type const&);`]
+ [__Random_Access_Child_Iterator_Tree_Node__]
+ ]
+ [
+ [Child creation]
+ [`pointer add_child();`]
+ [__Random_Access_Child_Iterator_Tree_Node__]
+ ]
+ [
+ [Child copy creation]
+ [`pointer add_child(const_pointer const&);`]
+ [__Random_Access_Child_Iterator_Tree_Node__]
+ ]
+ [
+ [Children range begin access]
+ [`const_child_iterator get_child_begin() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range begin access]
+ [`child_iterator get_child_begin();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range past-the-end access]
+ [`const_child_iterator get_child_end() const;`]
+ [__Tree_Node__]
+ ]
+ [
+ [Children range past-the-end access]
+ [`child_iterator get_child_end();`]
+ [__Tree_Node__]
+ ]
+ [
+ [Remove all children]
+ [`void remove_all_children();`]
+ [__Tree_Node__]
+ ]
+]
+[endsect] [/ Members]
+
+[section Example]
+<__example_raw_node_cpp__>
+[endsect]
+
+[endsect] [/ raw_node]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_simple_associative_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_simple_associative_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,240 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:simple_associative_node `simple_associative_node`]
+
+[section Synopsis]
+[reference__simple_associative_node]
+[endsect]
+
+[section Description]
+This class template is suitable for classes or algorithms that need to map keys
+to child nodes in a tree node data structure that must be exposed to external
+code. Objects of this type must be stored by
+`simple_associative_node::pointer` and can only be instantiated through
+the `static` creation methods that this class template provides. Their
+children can be accessed by their associated keys for fast lookup.
+
+[important
+ This component depends on __Boost_Type_Traits_Operators__, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__.
+]
+
+[important
+ This component depends on __Boost_Utility_ContainerGen__, which is not yet
+ a part of Boost. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_simple_associative_node_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`Key`]
+ [
+ The type of a key object to be associated with a child of a
+ `raw_associative_node`.
+ ]
+ []
+ []
+ ]
+ [
+ [`Data`]
+ [The type of the object to be stored in a `simple_associative_node`.]
+ []
+ []
+ ]
+ [
+ [`AssociativeContainerSelector`]
+ [
+ The type that determines the internal map types whose mapped types
+ are the same as the pointer type.
+ ]
+ [
+ It must be a type for which __associative_container_gen__ returns
+ a valid container.
+ ]
+ [`mapS`]
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+__Associative_Tree_Node__
+[endsect]
+
+[section:public_bases Public Base Classes]
+__tr1_enable_shared_from_this__
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Data type]
+ [`data_type`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Data type]
+ [`data_type`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Pointer-to-const type]
+ [`const_pointer`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Child iterator type]
+ [`child_iterator`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Immutable child iterator type]
+ [`const_child_iterator`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Node creation with data]
+ [`static pointer create(data_type const&);`]
+ [
+ Creates a `simple_associative_node` object with the specified data
+ and returns a pointer to it.
+ ]
+ ]
+ [
+ [Node creation]
+ [`static pointer create();`]
+ [
+ Creates a `simple_associative_node` object and returns a pointer to
+ it.
+ ]
+ ]
+ [
+ [Node copy creation]
+ [`static pointer create_copy(const_pointer const&);`]
+ [
+ Creates a deep copy of the specified node. Returns a pointer to
+ the new node.
+ ]
+ ]
+ [
+ [Data access]
+ [`data_type const& get_data() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Data access]
+ [`data_type& get_data();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Parent access]
+ [`const_pointer get_parent() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Parent access]
+ [`pointer get_parent();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Child creation with data]
+ [`pointer add_child(key_type const&, data_type const&);`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Child creation]
+ [`pointer add_child(key_type const&);`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Child copy creation]
+ [`pointer add_child(key_type const&, const_pointer const&);`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Children range begin access]
+ [`const_child_iterator get_child_begin() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range begin access]
+ [`child_iterator get_child_begin();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range past-the-end access]
+ [`const_child_iterator get_child_end() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range past-the-end access]
+ [`child_iterator get_child_end();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Child search]
+ [`const_child_iterator find_child(key_type const&) const;`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Child search]
+ [`child_iterator find_child(key_type const&);`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Child search range]
+ [
+ [^_std_pair_<Node::const_child_iterator,Node::const_child_iterator>
+ find_children(key_type const&) const;]
+ ]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Child search range]
+ [
+ [^_std_pair_<Node::child_iterator,Node::child_iterator>
+ find_children(key_type const&);]
+ ]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Remove children]
+ [`std::size_t remove_children(key_type const&);`]
+ [Defined by the __Associative_Tree_Node__ concept.]
+ ]
+ [
+ [Remove all children]
+ [`void remove_all_children();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+]
+[endsect] [/ Members]
+
+[section Example]
+<__example_simple_associative_node_cpp__>
+[endsect]
+
+[endsect] [/ simple_associative_node]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_simple_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_simple_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,167 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:simple_node `simple_node`]
+
+[section Synopsis]
+[reference__simple_node]
+[endsect]
+
+[section Description]
+This class template is suitable for classes or algorithms that require a tree
+node data structure that must be exposed to external code. Objects of this
+type must be stored by `simple_node::pointer` and can only be instantiated
+through the `static` creation methods that this class template provides. Their
+children can be accessed by offsetting the start of the range with a numerical
+index for fast lookup.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_simple_node_hpp__>
+``
+[endsect]
+
+[section:tpl_param Template Parameters]
+[table
+ [[Parameter][Description][Requirements][Default]]
+ [
+ [`T`]
+ [The type of the object to be stored in a `simple_node`.]
+ []
+ []
+ ]
+]
+[endsect]
+
+[section:model_of Model of]
+__Random_Access_Child_Iterator_Tree_Node__
+[endsect]
+
+[section:public_bases Public Base Classes]
+__tr1_enable_shared_from_this__
+[endsect]
+
+[section Members]
+[table
+ [[Name][Expression][Description]]
+ [
+ [Data type]
+ [`data_type`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Pointer type]
+ [`pointer`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Pointer-to-const type]
+ [`const_pointer`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Child iterator type]
+ [`child_iterator`]
+ [Defined by the __Random_Access_Child_Iterator_Tree_Node__ concept.]
+ ]
+ [
+ [Immutable child iterator type]
+ [`const_child_iterator`]
+ [Defined by the __Random_Access_Child_Iterator_Tree_Node__ concept.]
+ ]
+ [
+ [Node creation with data]
+ [`static pointer create(data_type const&);`]
+ [
+ Creates a `simple_node` object with the specified data and returns
+ a pointer to it.
+ ]
+ ]
+ [
+ [Node creation]
+ [`static pointer create();`]
+ [Creates a `simple_node` object and returns a pointer to it.]
+ ]
+ [
+ [Node copy creation]
+ [`static pointer create_copy(const_pointer const&);`]
+ [
+ Creates a deep copy of the specified node. Returns a pointer to
+ the new node.
+ ]
+ ]
+ [
+ [Data access]
+ [`data_type const& get_data() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Data access]
+ [`data_type& get_data();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Parent access]
+ [`const_pointer get_parent() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Parent access]
+ [`pointer get_parent();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Child creation with data]
+ [`pointer add_child(data_type const&);`]
+ [Defined by the __Random_Access_Child_Iterator_Tree_Node__ concept.]
+ ]
+ [
+ [Child creation]
+ [`pointer add_child();`]
+ [Defined by the __Random_Access_Child_Iterator_Tree_Node__ concept.]
+ ]
+ [
+ [Child copy creation]
+ [`pointer add_child(const_pointer const&);`]
+ [Defined by the __Random_Access_Child_Iterator_Tree_Node__ concept.]
+ ]
+ [
+ [Children range begin access]
+ [`const_child_iterator get_child_begin() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range begin access]
+ [`child_iterator get_child_begin();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range past-the-end access]
+ [`const_child_iterator get_child_end() const;`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Children range past-the-end access]
+ [`child_iterator get_child_end();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+ [
+ [Remove all children]
+ [`void remove_all_children();`]
+ [Defined by the __Tree_Node__ concept.]
+ ]
+]
+[endsect] [/ Members]
+
+[section Example]
+<__example_simple_node_cpp__>
+[endsect]
+
+[endsect] [/ simple_node]
+

Added: sandbox/tree_node/libs/tree_node/doc/ref_traversal_state.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/ref_traversal_state.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,33 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:traversal_state `traversal_state`]
+
+[section Synopsis]
+[reference__traversal_state]
+[endsect]
+
+[section Description]
+This enumeration type is the return type of the dereferenceability expression
+defined by each iterator type that this library provides. The `no_traversal`
+value corresponds to `false` in a boolean context, enabling the iterator types
+to fulfill their runtime requirements for dereferenceability. The
+`pre_order_traversal` and `post_order_traversal` values are significant because
+the __depth_first_iterator__ traverses each node twice, so algorithms must be
+able to distinguish which state the iterator is in when it traverses a tree
+node. The `breadth_first_traversal` value is defined for completeness.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_tree_node_traversal_state_hpp__>
+``
+[endsect]
+
+[endsect] [/ traversal_state]
+

Added: sandbox/tree_node/libs/tree_node/doc/reference.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/reference.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,32 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section Reference]
+
+[include ref_raw_node.qbk]
+[include ref_simple_node.qbk]
+[include ref_raw_associative_node.qbk]
+[include ref_simple_associative_node.qbk]
+[include ref_breadth_first_iterator.qbk]
+[include ref_pre_order_iterator.qbk]
+[include ref_post_order_iterator.qbk]
+[include ref_depth_first_iterator.qbk]
+[include ref_traversal_state.qbk]
+
+ * __raw_node__
+ * __simple_node__
+ * __raw_associative_node__
+ * __simple_associative_node__
+ * __breadth_first_iterator__
+ * __pre_order_iterator__
+ * __post_order_iterator__
+ * __depth_first_iterator__
+ * __traversal_state__
+
+[endsect] [/ Reference]
+

Added: sandbox/tree_node/libs/tree_node/doc/tree_node.qbk
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/doc/tree_node.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,147 @@
+[library tree_node
+ [quickbook 1.5]
+ [version 0.1]
+ [authors [Enage, Cromwell D.]]
+ [copyright 2011 Cromwell D. Enage]
+ [purpose Low-level tree node framework]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[/ General links.]
+[def __Runtime_Complexity__ [@http://en.wikipedia.org/wiki/Amortized_analysis Runtime Complexity]]
+
+[/ General concept links.]
+[def __Default_Constructible__ [@http://www.sgi.com/tech/stl/DefaultConstructible.html [*Default Constructible]]]
+[def __Trivial_Iterator__ [@http://www.sgi.com/tech/stl/trivial.html [*Trivial Iterator]]]
+[def __Input_Iterator__ [@http://www.sgi.com/tech/stl/InputIterator.html [*Input Iterator]]]
+[def __Forward_Iterator__ [@http://www.sgi.com/tech/stl/ForwardIterator.html [*Forward Iterator]]]
+[def __Random_Access_Iterator__ [@http://www.sgi.com/tech/stl/RandomAccessIterator.html [*Random Access Iterator]]]
+[def __Container__ [@http://www.sgi.com/tech/stl/Container.html [*Container]]]
+[def __Unary_Function__ [@http://www.sgi.com/tech/stl/UnaryFunction.html [*Unary Function]]]
+
+[/ STL reference links.]
+[def __std_pair__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]]
+[def _std_pair_ [@http://www.sgi.com/tech/stl/pair.html std::pair]]
+
+[/ Boost library and installation links.]
+[def __Build__ [@boost:more/getting_started.html Build]]
+[def __build__ [@boost:more/getting_started.html build]]
+[def __Boost_Test__ [@boost:libs/test/doc/index.html [*Boost.Test]]]
+[def __SVN_Trac__ [@http://svn.boost.org/ SVN Trac]]
+[def __Boost_Type_Traits_Operators__ [@http://svn.boost.org/svn/boost/sandbox/type_traits/libs/type_traits/doc/html/index.html [*Boost.TypeTraitsOperators]]]
+[def __Boost_Utility_ContainerGen__ [@http://svn.boost.org/svn/boost/sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html [*Boost.Utility.ContainerGen]]]
+
+[/ Boost concept links.]
+[def __Copy_Constructible__ [@boost:libs/utility/CopyConstructible.html [*Copy Constructible]]]
+[def __Assignable__ [@boost:libs/utility/Assignable.html [*Assignable]]]
+[def __Boolean_Integral_Constant__ [@boost:libs/mpl/doc/refmanual/integral-constant.html [*Boolean Integral Constant]]]
+
+[/ Boost reference links in text.]
+
+[/ Boost reference links in code.]
+[def __tr1_enable_shared_from_this__ [@boost:libs/smart_ptr/enable_shared_from_this.html `std::tr1::enable_shared_from_this`]]
+[def __mpl_true__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`]]
+[def _mpl_true_ [@boost:libs/mpl/doc/refmanual/bool.html boost::mpl::true_]]
+[def __mpl_false__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`]]
+[def _mpl_false_ [@boost:libs/mpl/doc/refmanual/bool.html boost::mpl::false_]]
+[def _mpl_equal_to_ [@boost:libs/mpl/doc/refmanual/equal_to.html boost::mpl::equal_to]]
+[def _enable_if_ [@boost:libs/utility/enable_if.html `enable_if`]]
+[def __associative_container_gen__ [@http://svn.boost.org/svn/boost/sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html `associative_container_gen`]]
+
+[/ Boost.TreeNode tutorial source file links.]
+[def __example_raw_node_cpp__ [@../../example/raw_node.cpp example/raw_node.cpp]]
+[def __example_simple_node_cpp__ [@../../example/simple_node.cpp example/simple_node.cpp]]
+[def __example_raw_associative_node_cpp__ [@../../example/raw_associative_node.cpp example/raw_associative_node.cpp]]
+[def __example_simple_associative_node_cpp__ [@../../example/simple_associative_node.cpp example/simple_associative_node.cpp]]
+
+[/ Boost.TreeNode reference header file links.]
+[def __boost_tree_node_raw_node_hpp__ [@../../../../boost/tree_node/raw_node.hpp boost/tree_node/raw_node.hpp]]
+[def __boost_tree_node_simple_node_hpp__ [@../../../../boost/tree_node/simple_node.hpp boost/tree_node/simple_node.hpp]]
+[def __boost_tree_node_raw_associative_node_hpp__ [@../../../../boost/tree_node/raw_associative_node.hpp boost/tree_node/raw_associative_node.hpp]]
+[def __boost_tree_node_simple_associative_node_hpp__ [@../../../../boost/tree_node/simple_associative_node.hpp boost/tree_node/simple_associative_node.hpp]]
+[def __boost_tree_node_breadth_first_iterator_hpp__ [@../../../../boost/tree_node/breadth_first_iterator.hpp boost/tree_node/breadth_first_iterator.hpp]]
+[def __boost_tree_node_pre_order_iterator_hpp__ [@../../../../boost/tree_node/pre_order_iterator.hpp boost/tree_node/pre_order_iterator.hpp]]
+[def __boost_tree_node_post_order_iterator_hpp__ [@../../../../boost/tree_node/post_order_iterator.hpp boost/tree_node/post_order_iterator.hpp]]
+[def __boost_tree_node_depth_first_iterator_hpp__ [@../../../../boost/tree_node/depth_first_iterator.hpp boost/tree_node/depth_first_iterator.hpp]]
+[def __boost_tree_node_traversal_state_hpp__ [@../../../../boost/tree_node/traversal_state.hpp boost/tree_node/traversal_state.hpp]]
+[def __example_raw_node_cpp__ [@../../example/raw_node.cpp example/raw_node.cpp]]
+[def __example_simple_node_cpp__ [@../../example/simple_node.cpp example/simple_node.cpp]]
+[def __example_raw_associative_node_cpp__ [@../../example/raw_associative_node.cpp example/raw_associative_node.cpp]]
+[def __example_simple_associative_node_cpp__ [@../../example/simple_associative_node.cpp example/simple_associative_node.cpp]]
+
+[/ Boost.TreeNode concept links.]
+[def __Tree_Node__ [link tree_node.concepts.tree_node [*Tree Node]]]
+[def __Random_Access_Child_Iterator_Tree_Node__ [link tree_node.concepts.raci_tree_node [*Random Access Child Iterator Tree Node]]]
+[def __Associative_Tree_Node__ [link tree_node.concepts.associative_tree_node [*Associative Tree Node]]]
+[def __Tree_Node_Iterator__ [link tree_node.concepts.tree_node_iterator [*Tree Node Iterator]]]
+[def __Full_Tree_Node_Iterator__ [link tree_node.concepts.full_tree_node_iterator [*Full Tree Node Iterator]]]
+[def __Tree_Node_Descendant_Iterator__ [link tree_node.concepts.tree_node_desc_iterator [*Tree Node Descendant Iterator]]]
+
+[/ Boost.TreeNode reference links.]
+[def __raw_node__ [link tree_node.reference.raw_node `raw_node`]]
+[def _raw_node_ [link tree_node.reference.raw_node raw_node]]
+[def __simple_node__ [link tree_node.reference.simple_node `simple_node`]]
+[def _simple_node_ [link tree_node.reference.simple_node simple_node]]
+[def __raw_associative_node__ [link tree_node.reference.raw_associative_node `raw_associative_node`]]
+[def _raw_associative_node_ [link tree_node.reference.raw_associative_node raw_associative_node]]
+[def __simple_associative_node__ [link tree_node.reference.simple_associative_node `simple_associative_node`]]
+[def _simple_associative_node_ [link tree_node.reference.simple_associative_node simple_associative_node]]
+[def __breadth_first_iterator__ [link tree_node.reference.breadth_first_iterator `breadth_first_iterator`]]
+[def __make_breadth_first_iterator__ [link tree_node.reference.breadth_first_iterator `make_breadth_first_iterator()`]]
+[def __make_breadth_first_descendant_iterator__ [link tree_node.reference.breadth_first_iterator `make_breadth_first_descendant_iterator()`]]
+[def _breadth_first_iterator_ [link tree_node.reference.breadth_first_iterator breadth_first_iterator]]
+[def __pre_order_iterator__ [link tree_node.reference.pre_order_iterator `pre_order_iterator`]]
+[def __make_pre_order_iterator__ [link tree_node.reference.pre_order_iterator `make_pre_order_iterator()`]]
+[def __make_pre_order_descendant_iterator__ [link tree_node.reference.pre_order_iterator `make_pre_order_descendant_iterator()`]]
+[def _pre_order_iterator_ [link tree_node.reference.pre_order_iterator pre_order_iterator]]
+[def __post_order_iterator__ [link tree_node.reference.post_order_iterator `post_order_iterator`]]
+[def __make_post_order_iterator__ [link tree_node.reference.post_order_iterator `make_post_order_iterator()`]]
+[def __make_post_order_descendant_iterator__ [link tree_node.reference.post_order_iterator `make_post_order_descendant_iterator()`]]
+[def _post_order_iterator_ [link tree_node.reference.post_order_iterator post_order_iterator]]
+[def __depth_first_iterator__ [link tree_node.reference.depth_first_iterator `depth_first_iterator`]]
+[def __make_depth_first_iterator__ [link tree_node.reference.depth_first_iterator `make_depth_first_iterator()`]]
+[def __make_depth_first_descendant_iterator__ [link tree_node.reference.depth_first_iterator `make_depth_first_descendant_iterator()`]]
+[def _depth_first_iterator_ [link tree_node.reference.depth_first_iterator depth_first_iterator]]
+[def __traversal_state__ [link tree_node.reference.traversal_state `traversal_state`]]
+[def _traversal_state_ [link tree_node.reference.traversal_state traversal_state]]
+
+[/ Autogenerate concept and reference documentation directly from code.]
+[/ Bypass Doxygen.]
+[import ../../../boost/tree_node/raw_node.hpp]
+[import ../../../boost/tree_node/simple_node.hpp]
+[import ../../../boost/tree_node/raw_associative_node.hpp]
+[import ../../../boost/tree_node/simple_associative_node.hpp]
+[import ../../../boost/tree_node/breadth_first_iterator.hpp]
+[import ../../../boost/tree_node/pre_order_iterator.hpp]
+[import ../../../boost/tree_node/post_order_iterator.hpp]
+[import ../../../boost/tree_node/depth_first_iterator.hpp]
+[import ../../../boost/tree_node/traversal_state.hpp]
+[import ../example/default_unconstructible_type.hpp] [/ example__default_unconstructible_type]
+[import ../example/default_unconstructible_type.cpp] [/ example__default_unconstructible_type__definitions]
+[import ../example/raw_node.cpp]
+[import ../example/simple_node.cpp]
+[import ../example/raw_associative_node.cpp]
+[import ../example/simple_associative_node.cpp]
+
+[/ index.html Start]
+
+[heading Rationale]
+Over the course of reimplementing a decision tree learning algorithm to use
+modern C++ techniques, the need for a generic tree library became evident. The
+in-house data structures in use at the time were undergoing modification as
+well. It was found that the core operations occurred at the node level rather
+than at the tree level, which stored only high-level algorithms. Efforts went
+underway to retrofit these algorithms to use iterators and to further factor
+out generic data structures from the decision tree components and other
+application-specific utilities. This library represents the Boostified
+culmination of these efforts.
+
+[/ index.html End]
+
+[include concepts.qbk]
+[include reference.qbk]
+

Added: sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,20 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "default_unconstructible_type.hpp"
+
+//[example__default_unconstructible_type__definitions
+default_unconstructible_example_type::default_unconstructible_example_type()
+{
+}
+
+default_unconstructible_example_type create_instance(std::size_t n)
+{
+ default_unconstructible_example_type instance;
+ instance.number = n;
+ return instance;
+}
+//]
+

Added: sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/default_unconstructible_type.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,27 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef LIBS_TREE_NODE_EXAMPLE_DEFAULT_UNCONSTRUCTIBLE_TYPE_HPP_INCLUDED
+#define LIBS_TREE_NODE_EXAMPLE_DEFAULT_UNCONSTRUCTIBLE_TYPE_HPP_INCLUDED
+
+#include <vector>
+
+//[example__default_unconstructible_type
+class default_unconstructible_example_type
+{
+ default_unconstructible_example_type();
+
+ friend default_unconstructible_example_type
+ create_instance(std::size_t n);
+
+ public:
+ std::size_t number;
+};
+//]
+
+default_unconstructible_example_type create_instance(std::size_t n);
+
+#endif // LIBS_TREE_NODE_EXAMPLE_DEFAULT_UNCONSTRUCTIBLE_TYPE_HPP_INCLUDED
+

Added: sandbox/tree_node/libs/tree_node/example/raw_associative_node.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/raw_associative_node.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,234 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <boost/assert.hpp>
+#include <boost/tr1/tuple.hpp>
+#include <boost/tree_node/typeof.hpp>
+#include "default_unconstructible_type.hpp"
+#include "show_functions.hpp"
+#include "showcase_descendant_iterators.hpp"
+
+typedef boost::tree_node::raw_associative_node<
+ char const*
+ , default_unconstructible_example_type
+ , boost::multimapS
+ >
+ DNode;
+typedef boost::tree_node::raw_associative_node<
+ char const*
+ , char*
+ , boost::hash_multimapS
+ >
+ ANode;
+
+int main()
+{
+ char const* names[] = {"able", "baker", "charlie", "dog", "easy", "fox"};
+ DNode d_root(create_instance(5));
+ ANode a_root;
+
+ BOOST_ASSERT(
+ !d_root.get_parent()
+ && "Parent member uninitialized."
+ );
+ BOOST_ASSERT(
+ !a_root.get_data()
+ && "Data member not default-constructed."
+ );
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_breadth_first_iterator(&d_root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ std::size_t const count = (*itr)->get_data().number;
+
+ if (1 < count)
+ {
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ for (std::size_t j = 0; j + i < count; ++j)
+ {
+ DNode::pointer child(
+ (*itr)->add_child(names[j], create_instance(i))
+ );
+ DNode::const_pointer const_child(child);
+
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (child->get_parent() == const_child->get_parent())
+ && "Why are these pointers different?"
+ );
+ }
+ }
+ }
+ }
+
+ {
+ boost::tree_node::depth_first_iterate(&d_root, show_number_tree());
+ std::cout << std::endl;
+ }
+
+ std::cout << "After d_root tree construction," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(&d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+
+ {
+ DNode::pointer d_child = d_root.find_child(
+ names[2]
+ )->second->add_child_copy(names[5], &d_root);
+
+ std::cout << "After add_child_copy call," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(&d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+
+ d_root = *d_child;
+ std::cout << "After assignment to descendant," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(&d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+ }
+
+ *(d_root.find_child(names[4])->second) = d_root;
+ std::cout << "After assignment to ancestor," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(&d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+
+ {
+ char* root_data = new char[2];
+
+ root_data[0] = '5';
+ root_data[1] = '\0';
+ a_root.get_data() = root_data;
+ }
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_breadth_first_iterator(&a_root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ char digit = (*itr)->get_data()[0];
+
+ if ('1' < digit)
+ {
+ char numchar = digit;
+
+ while (numchar != '0')
+ {
+ --numchar;
+
+ for (char j = 0; numchar + j < digit; ++j)
+ {
+ ANode::pointer child((*itr)->add_child(names[j]));
+ char*& data = child->get_data();
+
+ BOOST_ASSERT(
+ !data
+ && "Data member not default-constructed."
+ );
+ data = new char[2];
+ data[0] = numchar;
+ data[1] = '\0';
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ }
+ }
+ }
+ }
+
+ std::cout << "After a_root tree construction," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(&a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+
+ {
+ ANode::pointer a_child(
+ a_root.find_child(names[2])->second->add_child(names[5])
+ );
+
+ a_child->get_data() = new char[2];
+ a_child->get_data()[0] = '7';
+ a_child->get_data()[1] = '\0';
+ std::cout << "After a_child construction," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(&a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+ }
+
+ {
+ ANode::pointer to_be_pruned = a_root.get_child_begin()->second;
+ ANode::child_iterator c_itr, c_end;
+
+ for (
+ std::tr1::tie(c_itr, c_end) = to_be_pruned->find_children(
+ names[1]
+ );
+ c_itr != c_end;
+ ++c_itr
+ )
+ {
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_pre_order_iterator(c_itr->second)
+ );
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+ }
+
+ to_be_pruned->remove_children(names[1]);
+ std::cout << "After remove_children call," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(&a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+ }
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_post_order_iterator(&a_root));
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ return 0;
+}
+

Added: sandbox/tree_node/libs/tree_node/example/raw_node.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/raw_node.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,206 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <boost/assert.hpp>
+#include <boost/tree_node/typeof.hpp>
+#include "default_unconstructible_type.hpp"
+#include "show_functions.hpp"
+#include "showcase_iterators.hpp"
+
+typedef boost::tree_node::raw_node<default_unconstructible_example_type> DNode;
+typedef boost::tree_node::raw_node<char*> ANode;
+
+int main()
+{
+ DNode d_root(create_instance(5));
+ ANode a_root;
+
+ BOOST_ASSERT(
+ !d_root.get_parent()
+ && "Parent member uninitialized."
+ );
+ BOOST_ASSERT(
+ !a_root.get_data()
+ && "Data member not default-constructed."
+ );
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_breadth_first_iterator(&d_root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ std::size_t const count = (*itr)->get_data().number;
+
+ if (1 < count)
+ {
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ DNode::pointer child((*itr)->add_child(create_instance(i)));
+ DNode::const_pointer const_child(child);
+
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (child == *((*itr)->get_child_begin() + i))
+ && "Ctor not linking parent to child."
+ );
+ BOOST_ASSERT(
+ (child->get_parent() == const_child->get_parent())
+ && "Why are these pointers different?"
+ );
+ }
+ }
+ }
+
+ std::cout << "After d_root tree construction," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(&d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+
+ {
+ DNode::pointer d_child = (
+ *(d_root.get_child_begin() + 2)
+ )->add_child_copy(&d_root);
+
+ std::cout << "After add_child_copy call," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(&d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+
+ d_root = *d_child;
+ std::cout << "After assignment to descendant," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(&d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+ }
+
+ *(*(d_root.get_child_begin() + 4)) = d_root;
+ std::cout << "After assignment to ancestor," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(&d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+
+ char* root_data = new char[2];
+
+ root_data[0] = '5';
+ root_data[1] = '\0';
+ a_root.get_data() = root_data;
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_breadth_first_iterator(&a_root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ char digit = (*itr)->get_data()[0];
+
+ if ('1' < digit)
+ {
+ char numchar = digit;
+
+ while (numchar != '0')
+ {
+ ANode::pointer child((*itr)->add_child());
+ char*& data = child->get_data();
+
+ BOOST_ASSERT(
+ !data
+ && "Data member not default-constructed."
+ );
+ data = new char[2];
+ data[0] = --numchar;
+ data[1] = '\0';
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (
+ child
+ == *((*itr)->get_child_begin() + (digit - (numchar + 1)))
+ )
+ && "Ctor not linking parent to child."
+ );
+ }
+ }
+ }
+
+ std::cout << "After a_root tree construction," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(&a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+
+ {
+ ANode::pointer a_child(
+ (*(a_root.get_child_begin() + 2))->add_child()
+ );
+
+ a_child->get_data() = new char[2];
+ a_child->get_data()[0] = '7';
+ a_child->get_data()[1] = '\0';
+ std::cout << "After a_child construction," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(&a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+ }
+
+ {
+ ANode::pointer leaf = *a_root.get_child_begin();
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_pre_order_descendant_iterator(leaf)
+ );
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ leaf->remove_all_children();
+ std::cout << "After remove_all_children call," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(&a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+ }
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_post_order_iterator(&a_root));
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ return 0;
+}
+

Added: sandbox/tree_node/libs/tree_node/example/show_functions.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/show_functions.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,60 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include "show_functions.hpp"
+
+//[example__show_tabs
+void
+ show_tabs(
+ boost::tree_node::traversal_state state
+ , unsigned int& depth_limit
+ )
+{
+ switch (state)
+ {
+ case boost::tree_node::pre_order_traversal:
+ {
+ ++depth_limit;
+
+ for (unsigned int depth = 0; depth < depth_limit; ++depth)
+ {
+ std::cout << " ";
+ }
+
+ std::cout << "Pre-order: ";
+ break;
+ }
+
+ case boost::tree_node::post_order_traversal:
+ {
+ for (unsigned int depth = 0; depth < depth_limit; ++depth)
+ {
+ std::cout << " ";
+ }
+
+ std::cout << "Post-order: ";
+ --depth_limit;
+ break;
+ }
+ }
+}
+//]
+
+show_number_tree::show_number_tree() : depth_limit(1)
+{
+}
+
+show_key_and_number_tree::show_key_and_number_tree() : depth_limit(1)
+{
+}
+
+show_data_tree::show_data_tree() : depth_limit(1)
+{
+}
+
+show_key_and_data_tree::show_key_and_data_tree() : depth_limit(1)
+{
+}
+

Added: sandbox/tree_node/libs/tree_node/example/show_functions.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/show_functions.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,137 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef LIBS_TREE_NODE_EXAMPLE_SHOW_FUNCTIONS_HPP_INCLUDED
+#define LIBS_TREE_NODE_EXAMPLE_SHOW_FUNCTIONS_HPP_INCLUDED
+
+#include <iostream>
+#include <boost/tree_node/traversal_state.hpp>
+
+void
+ show_tabs(
+ boost::tree_node::traversal_state state
+ , unsigned int& depth_limit
+ );
+
+//[example__show_number
+template <typename NodePointer>
+void show_number(NodePointer const& node)
+{
+ std::cout << ' ' << node->get_data().number;
+}
+//]
+
+//[example__show_number_tree
+class show_number_tree
+{
+ unsigned int depth_limit;
+
+ public:
+ show_number_tree();
+
+ template <typename NodePointer>
+ void
+ operator()(
+ NodePointer const& node
+ , boost::tree_node::traversal_state state
+ )
+ {
+ show_tabs(state, depth_limit);
+ std::cout << node->get_data().number << std::endl;
+ }
+};
+//]
+
+//[example__show_key_and_number
+template <typename Key, typename NodePointer>
+void show_key_and_number(Key const& key, NodePointer const& node)
+{
+ std::cout << " [" << key << ", " << node->get_data().number << ']';
+}
+//]
+
+//[example__show_key_and_number_tree
+class show_key_and_number_tree
+{
+ unsigned int depth_limit;
+
+ public:
+ show_key_and_number_tree();
+
+ template <typename Iterator>
+ void
+ operator()(
+ Iterator const& itr
+ , boost::tree_node::traversal_state state
+ )
+ {
+ show_tabs(state, depth_limit);
+ show_key_and_number(itr->first, itr->second);
+ std::cout << std::endl;
+ }
+};
+//]
+
+//[example__show_data
+template <typename NodePointer>
+void show_data(NodePointer const& node)
+{
+ std::cout << ' ' << node->get_data();
+}
+//]
+
+//[example__show_data_tree
+class show_data_tree
+{
+ unsigned int depth_limit;
+
+ public:
+ show_data_tree();
+
+ template <typename NodePointer>
+ void
+ operator()(
+ NodePointer const& node
+ , boost::tree_node::traversal_state state
+ )
+ {
+ show_tabs(state, depth_limit);
+ std::cout << node->get_data() << std::endl;
+ }
+};
+//]
+
+//[example__show_key_and_data
+template <typename Key, typename NodePointer>
+void show_key_and_data(Key const& key, NodePointer const& node)
+{
+ std::cout << " [" << key << ", " << node->get_data() << ']';
+}
+//]
+
+//[example__show_key_and_data_tree
+class show_key_and_data_tree
+{
+ unsigned int depth_limit;
+
+ public:
+ show_key_and_data_tree();
+
+ template <typename Iterator>
+ void
+ operator()(
+ Iterator const& itr
+ , boost::tree_node::traversal_state state
+ )
+ {
+ show_tabs(state, depth_limit);
+ show_key_and_data(itr->first, itr->second);
+ std::cout << std::endl;
+ }
+};
+//]
+
+#endif // LIBS_TREE_NODE_EXAMPLE_SHOW_FUNCTIONS_HPP_INCLUDED
+

Added: sandbox/tree_node/libs/tree_node/example/showcase_descendant_iterators.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/showcase_descendant_iterators.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,82 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef LIBS_TREE_NODE_EXAMPLE_SHOWCASE_DESCENDANT_ITERATORS_HPP_INCLUDED
+#define LIBS_TREE_NODE_EXAMPLE_SHOWCASE_DESCENDANT_ITERATORS_HPP_INCLUDED
+
+#include <iostream>
+#include <boost/tree_node/typeof.hpp>
+
+//[example__showcase_descendant_iterators
+template <typename NodePointer, typename Function1, typename Function2>
+void
+ showcase_descendant_iterators(
+ NodePointer const& root
+ , Function1 show1
+ , Function2 show2
+ )
+{
+ std::cout << " Breadth-first traversal:";
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_breadth_first_descendant_iterator(root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ show1(itr->first, itr->second);
+ }
+
+ std::cout << std::endl << " Pre-order traversal:";
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_pre_order_descendant_iterator(root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ show1(itr->first, itr->second);
+ }
+
+ std::cout << std::endl << " Post-order traversal:";
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_post_order_descendant_iterator(root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ show1(itr->first, itr->second);
+ }
+
+ std::cout << std::endl << " Depth-first traversal:" << std::endl;
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_depth_first_descendant_iterator(root)
+ );
+ itr;
+ ++itr
+ )
+ {
+ show2(itr, boost::tree_node::traversal_state(itr));
+ }
+
+ std::cout << std::endl;
+}
+//]
+
+#endif // LIBS_TREE_NODE_EXAMPLE_SHOWCASE_DESCENDANT_ITERATORS_HPP_INCLUDED
+

Added: sandbox/tree_node/libs/tree_node/example/showcase_iterators.hpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/showcase_iterators.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,45 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef LIBS_TREE_NODE_EXAMPLE_SHOWCASE_ITERATORS_HPP_INCLUDED
+#define LIBS_TREE_NODE_EXAMPLE_SHOWCASE_ITERATORS_HPP_INCLUDED
+
+#include <iostream>
+#include <boost/tree_node/breadth_first_iterator.hpp>
+#include <boost/tree_node/pre_order_iterator.hpp>
+#include <boost/tree_node/post_order_iterator.hpp>
+#include <boost/tree_node/depth_first_iterator.hpp>
+
+//[example__showcase_iterators
+template <typename NodePointer, typename Function1, typename Function2>
+void
+ showcase_iterators(
+ NodePointer const& root
+ , Function1 show1
+ , Function2 show2
+ )
+{
+ std::cout << " Breadth-first: ";
+ boost::tree_node::breadth_first_iterate(root, show1);
+ std::cout << std::endl << " sans root: ";
+ boost::tree_node::breadth_first_iterate_descendants(root, show1);
+ std::cout << std::endl << " Pre-order: ";
+ boost::tree_node::pre_order_iterate(root, show1);
+ std::cout << std::endl << " sans root: ";
+ boost::tree_node::pre_order_iterate_descendants(root, show1);
+ std::cout << std::endl << " Post-order: ";
+ boost::tree_node::post_order_iterate(root, show1);
+ std::cout << std::endl << " sans root: ";
+ boost::tree_node::post_order_iterate_descendants(root, show1);
+ std::cout << std::endl << " Depth-first:" << std::endl;
+ boost::tree_node::depth_first_iterate(root, show2);
+ std::cout << std::endl << " sans root:" << std::endl;
+ boost::tree_node::depth_first_iterate_descendants(root, show2);
+ std::cout << std::endl;
+}
+//]
+
+#endif // LIBS_TREE_NODE_EXAMPLE_SHOWCASE_ITERATORS_HPP_INCLUDED
+

Added: sandbox/tree_node/libs/tree_node/example/simple_associative_node.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/simple_associative_node.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,211 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <boost/assert.hpp>
+#include <boost/tr1/tuple.hpp>
+#include <boost/tree_node/typeof.hpp>
+#include "default_unconstructible_type.hpp"
+#include "show_functions.hpp"
+#include "showcase_descendant_iterators.hpp"
+
+typedef boost::tree_node::simple_associative_node<
+ char const*
+ , default_unconstructible_example_type
+ , boost::multimapS
+ >
+ DNode;
+typedef boost::tree_node::simple_associative_node<
+ char const*
+ , char*
+ , boost::hash_multimapS
+ >
+ ANode;
+
+int main()
+{
+ char const* names[] = {"able", "baker", "charlie", "dog", "easy", "fox"};
+ DNode::pointer d_root(DNode::create(create_instance(5)));
+ ANode::pointer a_root(ANode::create());
+
+ BOOST_ASSERT(
+ !d_root->get_parent()
+ && "Parent member uninitialized."
+ );
+ BOOST_ASSERT(
+ !a_root->get_data()
+ && "Data member not default-constructed."
+ );
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_breadth_first_iterator(d_root));
+ itr;
+ ++itr
+ )
+ {
+ std::size_t const count = (*itr)->get_data().number;
+
+ if (1 < count)
+ {
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ for (std::size_t j = 0; j + i < count; ++j)
+ {
+ DNode::pointer child(
+ (*itr)->add_child(names[j], create_instance(i))
+ );
+ DNode::const_pointer const_child(child);
+
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (child->get_parent() == const_child->get_parent())
+ && "Why are these pointers different?"
+ );
+ }
+ }
+ }
+ }
+
+ {
+ boost::tree_node::depth_first_iterate(d_root, show_number_tree());
+ std::cout << std::endl;
+ }
+
+ std::cout << "After d_root tree construction," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+
+ {
+ d_root->find_child(
+ names[2]
+ )->second->add_child_copy(names[5], d_root);
+ std::cout << "After add_child_copy call," << std::endl;
+ showcase_descendant_iterators(
+ DNode::const_pointer(d_root)
+ , show_key_and_number<char const*,DNode::const_pointer>
+ , show_key_and_number_tree()
+ );
+ }
+
+ {
+ char* root_data = new char[2];
+
+ root_data[0] = '5';
+ root_data[1] = '\0';
+ a_root->get_data() = root_data;
+ }
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_breadth_first_iterator(a_root));
+ itr;
+ ++itr
+ )
+ {
+ char digit = (*itr)->get_data()[0];
+
+ if ('1' < digit)
+ {
+ char numchar = digit;
+
+ while (numchar != '0')
+ {
+ --numchar;
+
+ for (char j = 0; numchar + j < digit; ++j)
+ {
+ ANode::pointer child((*itr)->add_child(names[j]));
+ char*& data = child->get_data();
+
+ BOOST_ASSERT(
+ !data
+ && "Data member not default-constructed."
+ );
+ data = new char[2];
+ data[0] = numchar;
+ data[1] = '\0';
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ }
+ }
+ }
+ }
+
+ std::cout << "After a_root tree construction," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+
+ {
+ ANode::pointer a_child(
+ a_root->find_child(names[2])->second->add_child(names[5])
+ );
+
+ a_child->get_data() = new char[2];
+ a_child->get_data()[0] = '7';
+ a_child->get_data()[1] = '\0';
+ std::cout << "After a_child construction," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+ }
+
+ {
+ ANode::pointer to_be_pruned = a_root->get_child_begin()->second;
+ ANode::child_iterator c_itr, c_end;
+
+ for (
+ std::tr1::tie(c_itr, c_end) = to_be_pruned->find_children(
+ names[1]
+ );
+ c_itr != c_end;
+ ++c_itr
+ )
+ {
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_pre_order_iterator(c_itr->second)
+ );
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+ }
+
+ to_be_pruned->remove_children(names[1]);
+ std::cout << "After remove_children call," << std::endl;
+ showcase_descendant_iterators(
+ ANode::const_pointer(a_root)
+ , show_key_and_data<char const*,ANode::const_pointer>
+ , show_key_and_data_tree()
+ );
+ }
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_post_order_iterator(a_root));
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ return 0;
+}
+

Added: sandbox/tree_node/libs/tree_node/example/simple_node.cpp
==============================================================================
--- (empty file)
+++ sandbox/tree_node/libs/tree_node/example/simple_node.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,191 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <boost/assert.hpp>
+#include <boost/tree_node/typeof.hpp>
+#include "default_unconstructible_type.hpp"
+#include "show_functions.hpp"
+#include "showcase_iterators.hpp"
+
+typedef boost::tree_node::simple_node<default_unconstructible_example_type>
+ DNode;
+typedef boost::tree_node::simple_node<char*>
+ ANode;
+
+int main()
+{
+ DNode::pointer d_root(DNode::create(create_instance(5)));
+ ANode::pointer a_root(ANode::create());
+
+ BOOST_ASSERT(
+ !d_root->get_parent()
+ && "Parent member uninitialized."
+ );
+ BOOST_ASSERT(
+ !a_root->get_data()
+ && "Data member not default-constructed."
+ );
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_breadth_first_iterator(d_root));
+ itr;
+ ++itr
+ )
+ {
+ std::size_t const count = (*itr)->get_data().number;
+
+ if (1 < count)
+ {
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ DNode::pointer child((*itr)->add_child(create_instance(i)));
+ DNode::const_pointer const_child(child);
+
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (child == *((*itr)->get_child_begin() + i))
+ && "Ctor not linking parent to child."
+ );
+ BOOST_ASSERT(
+ (child->get_parent() == const_child->get_parent())
+ && "Why are these pointers different?"
+ );
+ }
+ }
+ }
+
+ std::cout << "After d_root tree construction," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+
+ {
+ (*(d_root->get_child_begin() + 2))->add_child_copy(d_root);
+ std::cout << "After add_child_copy call," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+ }
+
+ (*(d_root->get_child_begin() + 4))->remove_all_children();
+ std::cout << "After remove_all_children call," << std::endl;
+ showcase_iterators(
+ DNode::const_pointer(d_root)
+ , show_number<DNode::const_pointer>
+ , show_number_tree()
+ );
+
+ char* root_data = new char[2];
+
+ root_data[0] = '5';
+ root_data[1] = '\0';
+ a_root->get_data() = root_data;
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_breadth_first_iterator(a_root));
+ itr;
+ ++itr
+ )
+ {
+ char digit = (*itr)->get_data()[0];
+
+ if ('1' < digit)
+ {
+ char numchar = digit;
+
+ while (numchar != '0')
+ {
+ ANode::pointer child((*itr)->add_child());
+ char*& data = child->get_data();
+
+ BOOST_ASSERT(
+ !data
+ && "Data member not default-constructed."
+ );
+ data = new char[2];
+ data[0] = --numchar;
+ data[1] = '\0';
+ BOOST_ASSERT(
+ (child->get_parent() == *itr)
+ && "Ctor not linking child to parent."
+ );
+ BOOST_ASSERT(
+ (
+ child
+ == *((*itr)->get_child_begin() + (digit - (numchar + 1)))
+ )
+ && "Ctor not linking parent to child."
+ );
+ }
+ }
+ }
+
+ std::cout << "After a_root tree construction," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+
+ {
+ ANode::pointer a_child(
+ (*(a_root->get_child_begin() + 2))->add_child()
+ );
+
+ a_child->get_data() = new char[2];
+ a_child->get_data()[0] = '7';
+ a_child->get_data()[1] = '\0';
+ std::cout << "After a_child construction," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+ }
+
+ {
+ ANode::pointer leaf = *a_root->get_child_begin();
+
+ for (
+ BOOST_AUTO(
+ itr
+ , boost::tree_node::make_pre_order_descendant_iterator(leaf)
+ );
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ leaf->remove_all_children();
+ std::cout << "After remove_all_children call," << std::endl;
+ showcase_iterators(
+ ANode::const_pointer(a_root)
+ , show_data<ANode::const_pointer>
+ , show_data_tree()
+ );
+ }
+
+ for (
+ BOOST_AUTO(itr, boost::tree_node::make_post_order_iterator(a_root));
+ itr;
+ ++itr
+ )
+ {
+ delete[] (*itr)->get_data();
+ }
+
+ return 0;
+}
+

Added: sandbox/utility-container_gen/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/LICENSE_1_0.txt 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/utility-container_gen/boost.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/boost/detail/function/range_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/function/range_equal.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,24 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_FUNCTION_RANGE_EQUAL_HPP_INCLUDED
+#define BOOST_DETAIL_FUNCTION_RANGE_EQUAL_HPP_INCLUDED
+
+#include <boost/range/algorithm/equal.hpp>
+
+namespace boost { namespace detail {
+
+ struct range_equal
+ {
+ template <typename R1, typename R2>
+ inline bool operator()(R1 const& r1, R2 const& r2) const
+ {
+ return ::boost::range::equal(r1, r2);
+ }
+ };
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_FUNCTION_RANGE_EQUAL_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/function/range_less.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/function/range_less.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,24 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_FUNCTION_RANGE_LESS_HPP_INCLUDED
+#define BOOST_DETAIL_FUNCTION_RANGE_LESS_HPP_INCLUDED
+
+#include <boost/range/algorithm/lexicographical_compare.hpp>
+
+namespace boost { namespace detail {
+
+ struct range_less
+ {
+ template <typename R1, typename R2>
+ inline bool operator()(R1 const& r1, R2 const& r2) const
+ {
+ return ::boost::range::lexicographical_compare(r1, r2);
+ }
+ };
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_FUNCTION_RANGE_LESS_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_const_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_const_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_CONST_ITERATOR_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_CONST_ITERATOR_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_const_iterator metafunction will determine whether or not the
+ // specified type has a nested 'const_iterator' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_CONST_ITERATOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_const_pointer.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_const_pointer.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_CONST_POINTER_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_CONST_POINTER_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_const_pointer metafunction will determine whether or not the
+ // specified type has a nested 'const_pointer' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(const_pointer)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_CONST_POINTER_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_const_reference.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_const_reference.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_CONST_REFERENCE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_CONST_REFERENCE_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_const_reference metafunction will determine whether or not the
+ // specified type has a nested 'const_reference' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(const_reference)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_CONST_REFERENCE_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_difference_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_difference_type.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_DIFFERENCE_TYPE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_DIFFERENCE_TYPE_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_difference_type metafunction will determine whether or not the
+ // specified type has a nested 'difference_type' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_DIFFERENCE_TYPE_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_pointer.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_pointer.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_POINTER_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_POINTER_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_pointer metafunction will determine whether or not the
+ // specified type has a nested 'pointer' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_POINTER_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_reference.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_reference.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_REFERENCE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_REFERENCE_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_reference metafunction will determine whether or not the
+ // specified type has a nested 'reference' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_REFERENCE_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_size_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_size_type.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_SIZE_TYPE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_SIZE_TYPE_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_size_type metafunction will determine whether or not the
+ // specified type has a nested 'size_type' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(size_type)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_SIZE_TYPE_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/has_value_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/has_value_type.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,19 @@
+// Copyright (C) 2007-2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_HAS_VALUE_TYPE_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_HAS_VALUE_TYPE_HPP_INCLUDED
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace detail {
+
+ // The has_value_type metafunction will determine whether or not the
+ // specified type has a nested 'value_type' type definition.
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_HAS_VALUE_TYPE_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/is_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/is_container.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,53 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_IS_CONTAINER_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_IS_CONTAINER_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/detail/metafunction/has_value_type.hpp>
+#include <boost/detail/metafunction/has_difference_type.hpp>
+#include <boost/detail/metafunction/has_size_type.hpp>
+#include <boost/detail/metafunction/has_const_iterator.hpp>
+#include <boost/detail/metafunction/has_const_pointer.hpp>
+#include <boost/detail/metafunction/has_const_reference.hpp>
+#include <boost/detail/metafunction/is_input_iterator.hpp>
+
+namespace boost { namespace detail {
+
+ template <typename T>
+ struct is_container_impl
+ : is_input_iterator<typename T::const_iterator>
+ {
+ };
+
+ template <typename T>
+ struct is_container
+ : ::boost::mpl::if_<
+ ::boost::mpl::and_<
+ ::boost::mpl::and_<
+ typename has_value_type<T>::type
+ , typename has_difference_type<T>::type
+ , typename has_size_type<T>::type
+ >
+ , ::boost::mpl::and_<
+ typename has_const_iterator<T>::type
+ , typename has_const_pointer<T>::type
+ , typename has_const_reference<T>::type
+ >
+ >
+ , is_container_impl<T>
+ , ::boost::mpl::false_
+ >::type
+ {
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_container,(T))
+ };
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_IS_CONTAINER_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/detail/metafunction/is_input_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/detail/metafunction/is_input_iterator.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,55 @@
+// Copyright (C) 2011 Cromwell D. Enage
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_METAFUNCTION_IS_INPUT_ITERATOR_HPP_INCLUDED
+#define BOOST_DETAIL_METAFUNCTION_IS_INPUT_ITERATOR_HPP_INCLUDED
+
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/can_call_equal.hpp>
+#include <boost/type_traits/can_call_dereference.hpp>
+#include <boost/type_traits/can_call_pre_increment.hpp>
+#include <boost/type_traits/can_call_post_increment.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/detail/metafunction/has_value_type.hpp>
+#include <boost/detail/metafunction/has_difference_type.hpp>
+#include <boost/detail/metafunction/has_pointer.hpp>
+#include <boost/detail/metafunction/has_reference.hpp>
+
+namespace boost { namespace detail {
+
+ template <typename T>
+ struct is_input_iterator_impl
+ : ::boost::is_signed<typename T::difference_type>
+ {
+ };
+
+ template <typename T>
+ struct is_input_iterator
+ : ::boost::mpl::if_<
+ ::boost::mpl::and_<
+ typename has_value_type<T>::type
+ , typename has_difference_type<T>::type
+ , typename has_pointer<T>::type
+ , typename has_reference<T>::type
+ >
+ , ::boost::mpl::and_<
+ ::boost::can_call_equal<T>
+ , ::boost::can_call_dereference<T>
+ , ::boost::can_call_pre_increment<T>
+ , ::boost::can_call_post_increment<T>
+ , is_input_iterator_impl<T>
+ >
+ , ::boost::mpl::false_
+ >::type
+ {
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_input_iterator,(T))
+ };
+}} // namespace boost::detail
+
+#endif // BOOST_DETAIL_METAFUNCTION_IS_INPUT_ITERATOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/graph/adjacency_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/graph/adjacency_list.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,376 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_ADJACENCY_LIST_HPP
+#define BOOST_GRAPH_ADJACENCY_LIST_HPP
+
+#include <boost/config.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/graph_mutability_traits.hpp>
+#include <boost/graph/graph_selectors.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/graph/detail/edge.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/named_graph.hpp>
+#include <boost/utility/is_random_access_selector.hpp>
+#include <boost/utility/is_unique_assoc_selector.hpp>
+#include <boost/utility/container_gen.hpp>
+
+namespace boost {
+
+ template <typename StorageSelector>
+ struct parallel_edge_traits
+ {
+ typedef typename mpl::if_<is_unique_associative_selector<StorageSelector>,
+ disallow_parallel_edge_tag,allow_parallel_edge_tag
+ >::type type;
+ };
+
+ //===========================================================================
+ // The adjacency_list_traits class, which provides a way to access
+ // some of the associated types of an adjacency_list type without
+ // having to first create the adjacency_list type. This is useful
+ // when trying to create interior vertex or edge properties who's
+ // value type is a vertex or edge descriptor.
+
+ template <class OutEdgeListS = vecS,
+ class VertexListS = vecS,
+ class DirectedS = directedS,
+ class EdgeListS = listS>
+ struct adjacency_list_traits
+ {
+ typedef typename is_random_access_selector<VertexListS>::type
+ is_rand_access;
+ typedef typename DirectedS::is_bidir_t is_bidir;
+ typedef typename DirectedS::is_directed_t is_directed;
+
+ typedef typename mpl::if_<is_bidir,
+ bidirectional_tag,
+ typename mpl::if_<is_directed,
+ directed_tag, undirected_tag
+ >::type
+ >::type directed_category;
+
+ typedef typename parallel_edge_traits<OutEdgeListS>::type
+ edge_parallel_category;
+
+ typedef std::size_t vertices_size_type;
+ typedef void* vertex_ptr;
+ typedef typename mpl::if_<is_rand_access,
+ vertices_size_type, vertex_ptr>::type vertex_descriptor;
+ typedef detail::edge_desc_impl<directed_category, vertex_descriptor>
+ edge_descriptor;
+
+ private:
+ // Logic to figure out the edges_size_type
+ struct dummy {};
+ typedef typename container_gen<EdgeListS, dummy>::type EdgeContainer;
+ typedef typename DirectedS::is_bidir_t BidirectionalT;
+ typedef typename DirectedS::is_directed_t DirectedT;
+ typedef typename mpl::and_<DirectedT,
+ typename mpl::not_<BidirectionalT>::type >::type on_edge_storage;
+ public:
+ typedef typename mpl::if_<on_edge_storage,
+ std::size_t, typename EdgeContainer::size_type
+ >::type edges_size_type;
+
+ };
+
+} // namespace boost
+
+#include <boost/graph/detail/adjacency_list.hpp>
+
+namespace boost {
+
+ //===========================================================================
+ // The adjacency_list class.
+ //
+
+ template <class OutEdgeListS = vecS, // a Sequence or an AssociativeContainer
+ class VertexListS = vecS, // a Sequence or a RandomAccessContainer
+ class DirectedS = directedS,
+ class VertexProperty = no_property,
+ class EdgeProperty = no_property,
+ class GraphProperty = no_property,
+ class EdgeListS = listS>
+ class adjacency_list
+ : public detail::adj_list_gen<
+ adjacency_list<OutEdgeListS,VertexListS,DirectedS,
+ VertexProperty,EdgeProperty,GraphProperty,EdgeListS>,
+ VertexListS, OutEdgeListS, DirectedS,
+#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
+ typename detail::retag_property_list<vertex_bundle_t,
+ VertexProperty>::type,
+ typename detail::retag_property_list<edge_bundle_t, EdgeProperty>::type,
+#else
+ VertexProperty, EdgeProperty,
+#endif
+ GraphProperty, EdgeListS>::type,
+ // Support for named vertices
+ public graph::maybe_named_graph<
+ adjacency_list<OutEdgeListS,VertexListS,DirectedS,
+ VertexProperty,EdgeProperty,GraphProperty,EdgeListS>,
+ typename adjacency_list_traits<OutEdgeListS, VertexListS, DirectedS,
+ EdgeListS>::vertex_descriptor,
+ VertexProperty>
+ {
+ public:
+#if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
+ typedef typename graph_detail::graph_prop<GraphProperty>::property graph_property_type;
+ typedef typename graph_detail::graph_prop<GraphProperty>::bundle graph_bundled;
+
+ typedef typename graph_detail::vertex_prop<VertexProperty>::property vertex_property_type;
+ typedef typename graph_detail::vertex_prop<VertexProperty>::bundle vertex_bundled;
+
+ typedef typename graph_detail::edge_prop<EdgeProperty>::property edge_property_type;
+ typedef typename graph_detail::edge_prop<EdgeProperty>::bundle edge_bundled;
+#else
+ typedef GraphProperty graph_property_type;
+ typedef no_graph_bundle graph_bundled;
+
+ typedef VertexProperty vertex_property_type;
+ typedef no_vertex_bundle vertex_bundled;
+
+ typedef EdgeProperty edge_property_type;
+ typedef no_edge_bundle edge_bundled;
+#endif
+
+ private:
+ typedef adjacency_list self;
+ typedef typename detail::adj_list_gen<
+ self, VertexListS, OutEdgeListS, DirectedS,
+ vertex_property_type, edge_property_type, GraphProperty, EdgeListS
+ >::type Base;
+
+ public:
+ typedef typename Base::stored_vertex stored_vertex;
+ typedef typename Base::vertices_size_type vertices_size_type;
+ typedef typename Base::edges_size_type edges_size_type;
+ typedef typename Base::degree_size_type degree_size_type;
+ typedef typename Base::vertex_descriptor vertex_descriptor;
+ typedef typename Base::edge_descriptor edge_descriptor;
+ typedef OutEdgeListS out_edge_list_selector;
+ typedef VertexListS vertex_list_selector;
+ typedef DirectedS directed_selector;
+ typedef EdgeListS edge_list_selector;
+
+
+ adjacency_list(const GraphProperty& p = GraphProperty())
+ : m_property(new graph_property_type(p))
+ { }
+
+ adjacency_list(const adjacency_list& x)
+ : Base(x), m_property(new graph_property_type(*x.m_property))
+ { }
+
+ adjacency_list& operator=(const adjacency_list& x) {
+ // TBD: probably should give the strong guarantee
+ if (&x != this) {
+ Base::operator=(x);
+
+ // Copy/swap the ptr since we can't just assign it...
+ property_ptr p(new graph_property_type(*x.m_property));
+ m_property.swap(p);
+ }
+ return *this;
+ }
+
+ // Required by Mutable Graph
+ adjacency_list(vertices_size_type num_vertices,
+ const GraphProperty& p = GraphProperty())
+ : Base(num_vertices), m_property(new graph_property_type(p))
+ { }
+
+#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300
+ // Required by Iterator Constructible Graph
+ template <class EdgeIterator>
+ adjacency_list(EdgeIterator first, EdgeIterator last,
+ vertices_size_type n,
+ edges_size_type = 0,
+ const GraphProperty& p = GraphProperty())
+ : Base(n, first, last), m_property(new graph_property_type(p))
+ { }
+
+ template <class EdgeIterator, class EdgePropertyIterator>
+ adjacency_list(EdgeIterator first, EdgeIterator last,
+ EdgePropertyIterator ep_iter,
+ vertices_size_type n,
+ edges_size_type = 0,
+ const GraphProperty& p = GraphProperty())
+ : Base(n, first, last, ep_iter), m_property(new graph_property_type(p))
+ { }
+#endif
+
+ void swap(adjacency_list& x) {
+ // Is there a more efficient way to do this?
+ adjacency_list tmp(x);
+ x = *this;
+ *this = tmp;
+ }
+
+ void clear()
+ {
+ this->clearing_graph();
+ Base::clear();
+ }
+
+#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
+ // Directly access a vertex or edge bundle
+ vertex_bundled& operator[](vertex_descriptor v)
+ { return get(vertex_bundle, *this)[v]; }
+
+ const vertex_bundled& operator[](vertex_descriptor v) const
+ { return get(vertex_bundle, *this)[v]; }
+
+ edge_bundled& operator[](edge_descriptor e)
+ { return get(edge_bundle, *this)[e]; }
+
+ const edge_bundled& operator[](edge_descriptor e) const
+ { return get(edge_bundle, *this)[e]; }
+
+ graph_bundled& operator[](graph_bundle_t)
+ { return get_property(*this); }
+
+ graph_bundled const& operator[](graph_bundle_t) const
+ { return get_property(*this); }
+#endif
+
+ // protected: (would be protected if friends were more portable)
+ typedef scoped_ptr<graph_property_type> property_ptr;
+ property_ptr m_property;
+ };
+
+#define ADJLIST_PARAMS \
+ typename OEL, typename VL, typename D, typename VP, typename EP, \
+ typename GP, typename EL
+#define ADJLIST adjacency_list<OEL,VL,D,VP,EP,GP,EL>
+
+ template<ADJLIST_PARAMS, typename Tag, typename Value>
+ inline void set_property(ADJLIST& g, Tag, Value const& value) {
+ get_property_value(*g.m_property, Tag()) = value;
+ }
+
+ template<ADJLIST_PARAMS, typename Tag>
+ inline typename graph_property<ADJLIST, Tag>::type&
+ get_property(ADJLIST& g, Tag) {
+ return get_property_value(*g.m_property, Tag());
+ }
+
+ template<ADJLIST_PARAMS, typename Tag>
+ inline typename graph_property<ADJLIST, Tag>::type const&
+ get_property(ADJLIST const& g, Tag) {
+ return get_property_value(*g.m_property, Tag());
+ }
+
+ // dwa 09/25/00 - needed to be more explicit so reverse_graph would work.
+ template <class Directed, class Vertex,
+ class OutEdgeListS,
+ class VertexListS,
+ class DirectedS,
+ class VertexProperty,
+ class EdgeProperty,
+ class GraphProperty, class EdgeListS>
+ inline Vertex
+ source(const detail::edge_base<Directed,Vertex>& e,
+ const adjacency_list<OutEdgeListS, VertexListS, DirectedS,
+ VertexProperty, EdgeProperty, GraphProperty, EdgeListS>&)
+ {
+ return e.m_source;
+ }
+
+ template <class Directed, class Vertex, class OutEdgeListS,
+ class VertexListS, class DirectedS, class VertexProperty,
+ class EdgeProperty, class GraphProperty, class EdgeListS>
+ inline Vertex
+ target(const detail::edge_base<Directed,Vertex>& e,
+ const adjacency_list<OutEdgeListS, VertexListS, DirectedS,
+ VertexProperty, EdgeProperty, GraphProperty, EdgeListS>&)
+ {
+ return e.m_target;
+ }
+
+ // Support for bundled properties
+#ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
+ template<typename OutEdgeListS, typename VertexListS, typename DirectedS, typename VertexProperty,
+ typename EdgeProperty, typename GraphProperty, typename EdgeListS, typename T, typename Bundle>
+ inline
+ typename property_map<adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS>, T Bundle::*>::type
+ get(T Bundle::* p, adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS>& g)
+ {
+ typedef typename property_map<adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty,
+ EdgeProperty, GraphProperty, EdgeListS>, T Bundle::*>::type
+ result_type;
+ return result_type(&g, p);
+ }
+
+ template<typename OutEdgeListS, typename VertexListS, typename DirectedS, typename VertexProperty,
+ typename EdgeProperty, typename GraphProperty, typename EdgeListS, typename T, typename Bundle>
+ inline
+ typename property_map<adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS>, T Bundle::*>::const_type
+ get(T Bundle::* p, adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS> const & g)
+ {
+ typedef typename property_map<adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty,
+ EdgeProperty, GraphProperty, EdgeListS>, T Bundle::*>::const_type
+ result_type;
+ return result_type(&g, p);
+ }
+
+ template<typename OutEdgeListS, typename VertexListS, typename DirectedS, typename VertexProperty,
+ typename EdgeProperty, typename GraphProperty, typename EdgeListS, typename T, typename Bundle,
+ typename Key>
+ inline T
+ get(T Bundle::* p, adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS> const & g, const Key& key)
+ {
+ return get(get(p, g), key);
+ }
+
+ template<typename OutEdgeListS, typename VertexListS, typename DirectedS, typename VertexProperty,
+ typename EdgeProperty, typename GraphProperty, typename EdgeListS, typename T, typename Bundle,
+ typename Key>
+ inline void
+ put(T Bundle::* p, adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty,
+ GraphProperty, EdgeListS>& g, const Key& key, const T& value)
+ {
+ put(get(p, g), key, value);
+ }
+
+#endif
+
+// Mutability Traits
+template <ADJLIST_PARAMS>
+struct graph_mutability_traits<ADJLIST> {
+ typedef mutable_property_graph_tag category;
+};
+
+// Can't remove vertices from adjacency lists with VL==vecS
+template <typename OEL, typename D, typename VP, typename EP, typename GP, typename EL>
+struct graph_mutability_traits< adjacency_list<OEL,vecS,D,VP,EP,GP,EL> > {
+ typedef add_only_property_graph_tag category;
+};
+#undef ADJLIST_PARAMS
+#undef ADJLIST
+
+
+} // namespace boost
+
+
+#endif // BOOST_GRAPH_ADJACENCY_LIST_HPP

Added: sandbox/utility-container_gen/boost/graph/detail/adjacency_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/graph/detail/adjacency_list.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,2838 @@
+// -*- c++ -*-
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP
+#define BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP
+
+#include <map> // for vertex_map in copy_impl
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/operators.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/range/irange.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <memory>
+#include <algorithm>
+#include <boost/limits.hpp>
+
+#include <boost/iterator/iterator_adaptor.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/pending/container_traits.hpp>
+#include <boost/graph/detail/adj_list_edge_iterator.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/pending/property.hpp>
+#include <boost/graph/adjacency_iterator.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
+
+// Symbol truncation problems with MSVC, trying to shorten names.
+#define stored_edge se_
+#define stored_edge_property sep_
+#define stored_edge_iter sei_
+
+/*
+ Outline for this file:
+
+ out_edge_iterator and in_edge_iterator implementation
+ edge_iterator for undirected graph
+ stored edge types (these object live in the out-edge/in-edge lists)
+ directed edges helper class
+ directed graph helper class
+ undirected graph helper class
+ bidirectional graph helper class
+ bidirectional graph helper class (without edge properties)
+ bidirectional graph helper class (with edge properties)
+ adjacency_list helper class
+ adj_list_impl class
+ vec_adj_list_impl class
+ adj_list_gen class
+ vertex property map
+ edge property map
+
+
+ Note: it would be nice to merge some of the undirected and
+ bidirectional code... it is awful similar.
+ */
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+// Stay out of the way of the concept checking class
+# define Graph Graph_
+#endif
+
+namespace boost {
+
+ namespace detail {
+
+ template <typename DirectedS>
+ struct directed_category_traits {
+ typedef directed_tag directed_category;
+ };
+
+ template <>
+ struct directed_category_traits<directedS> {
+ typedef directed_tag directed_category;
+ };
+ template <>
+ struct directed_category_traits<undirectedS> {
+ typedef undirected_tag directed_category;
+ };
+ template <>
+ struct directed_category_traits<bidirectionalS> {
+ typedef bidirectional_tag directed_category;
+ };
+
+ template <class Vertex>
+ struct target_is {
+ target_is(const Vertex& v) : m_target(v) { }
+ template <class StoredEdge>
+ bool operator()(const StoredEdge& e) const {
+ return e.get_target() == m_target;
+ }
+ Vertex m_target;
+ };
+
+ // O(E/V)
+ template <class EdgeList, class vertex_descriptor>
+ void erase_from_incidence_list(EdgeList& el, vertex_descriptor v,
+ allow_parallel_edge_tag)
+ {
+ boost::graph_detail::erase_if(el, detail::target_is<vertex_descriptor>(v));
+ }
+ // O(log(E/V))
+ template <class EdgeList, class vertex_descriptor>
+ void erase_from_incidence_list(EdgeList& el, vertex_descriptor v,
+ disallow_parallel_edge_tag)
+ {
+ typedef typename EdgeList::value_type StoredEdge;
+ el.erase(StoredEdge(v));
+ }
+
+ //=========================================================================
+ // Out-Edge and In-Edge Iterator Implementation
+
+ template <class BaseIter, class VertexDescriptor, class EdgeDescriptor, class Difference>
+ struct out_edge_iter
+ : iterator_adaptor<
+ out_edge_iter<BaseIter, VertexDescriptor, EdgeDescriptor, Difference>
+ , BaseIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ >
+ {
+ typedef iterator_adaptor<
+ out_edge_iter<BaseIter, VertexDescriptor, EdgeDescriptor, Difference>
+ , BaseIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ > super_t;
+
+ inline out_edge_iter() { }
+ inline out_edge_iter(const BaseIter& i, const VertexDescriptor& src)
+ : super_t(i), m_src(src) { }
+
+ inline EdgeDescriptor
+ dereference() const
+ {
+ return EdgeDescriptor(m_src, (*this->base()).get_target(),
+ &(*this->base()).get_property());
+ }
+ VertexDescriptor m_src;
+ };
+
+ template <class BaseIter, class VertexDescriptor, class EdgeDescriptor, class Difference>
+ struct in_edge_iter
+ : iterator_adaptor<
+ in_edge_iter<BaseIter, VertexDescriptor, EdgeDescriptor, Difference>
+ , BaseIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ >
+ {
+ typedef iterator_adaptor<
+ in_edge_iter<BaseIter, VertexDescriptor, EdgeDescriptor, Difference>
+ , BaseIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ > super_t;
+
+ inline in_edge_iter() { }
+ inline in_edge_iter(const BaseIter& i, const VertexDescriptor& src)
+ : super_t(i), m_src(src) { }
+
+ inline EdgeDescriptor
+ dereference() const
+ {
+ return EdgeDescriptor((*this->base()).get_target(), m_src,
+ &this->base()->get_property());
+ }
+ VertexDescriptor m_src;
+ };
+
+ //=========================================================================
+ // Undirected Edge Iterator Implementation
+
+ template <class EdgeIter, class EdgeDescriptor, class Difference>
+ struct undirected_edge_iter
+ : iterator_adaptor<
+ undirected_edge_iter<EdgeIter, EdgeDescriptor, Difference>
+ , EdgeIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ >
+ {
+ typedef iterator_adaptor<
+ undirected_edge_iter<EdgeIter, EdgeDescriptor, Difference>
+ , EdgeIter
+ , EdgeDescriptor
+ , use_default
+ , EdgeDescriptor
+ , Difference
+ > super_t;
+
+ undirected_edge_iter() {}
+
+ explicit undirected_edge_iter(EdgeIter i)
+ : super_t(i) {}
+
+ inline EdgeDescriptor
+ dereference() const {
+ return EdgeDescriptor(
+ (*this->base()).m_source
+ , (*this->base()).m_target
+ , &this->base()->get_property());
+ }
+ };
+
+ //=========================================================================
+ // Edge Storage Types (stored in the out-edge/in-edge lists)
+
+ template <class Vertex>
+ class stored_edge
+ : public boost::equality_comparable1< stored_edge<Vertex>,
+ boost::less_than_comparable1< stored_edge<Vertex> > >
+ {
+ public:
+ typedef no_property property_type;
+ inline stored_edge() { }
+ inline stored_edge(Vertex target, const no_property& = no_property())
+ : m_target(target) { }
+ // Need to write this explicitly so stored_edge_property can
+ // invoke Base::operator= (at least, for SGI MIPSPro compiler)
+ inline stored_edge& operator=(const stored_edge& x) {
+ m_target = x.m_target;
+ return *this;
+ }
+ inline Vertex& get_target() const { return m_target; }
+ inline const no_property& get_property() const { return s_prop; }
+ inline bool operator==(const stored_edge& x) const
+ { return m_target == x.get_target(); }
+ inline bool operator<(const stored_edge& x) const
+ { return m_target < x.get_target(); }
+ //protected: need to add hash<> as a friend
+ static no_property s_prop;
+ // Sometimes target not used as key in the set, and in that case
+ // it is ok to change the target.
+ mutable Vertex m_target;
+ };
+ template <class Vertex>
+ no_property stored_edge<Vertex>::s_prop;
+
+ template <class Vertex, class Property>
+ class stored_edge_property : public stored_edge<Vertex> {
+ typedef stored_edge_property self;
+ typedef stored_edge<Vertex> Base;
+ public:
+ typedef Property property_type;
+ inline stored_edge_property() { }
+ inline stored_edge_property(Vertex target,
+ const Property& p = Property())
+ : stored_edge<Vertex>(target), m_property(new Property(p)) { }
+ stored_edge_property(const self& x)
+ : Base(x), m_property(const_cast<self&>(x).m_property) { }
+ self& operator=(const self& x) {
+ Base::operator=(x);
+ m_property = const_cast<self&>(x).m_property;
+ return *this;
+ }
+ inline Property& get_property() { return *m_property; }
+ inline const Property& get_property() const { return *m_property; }
+ protected:
+ // Holding the property by-value causes edge-descriptor
+ // invalidation for add_edge() with EdgeList=vecS. Instead we
+ // hold a pointer to the property. std::auto_ptr is not
+ // a perfect fit for the job, but it is darn close.
+ std::auto_ptr<Property> m_property;
+ };
+
+
+ template <class Vertex, class Iter, class Property>
+ class stored_edge_iter
+ : public stored_edge<Vertex>
+ {
+ public:
+ typedef Property property_type;
+ inline stored_edge_iter() { }
+ inline stored_edge_iter(Vertex v)
+ : stored_edge<Vertex>(v) { }
+ inline stored_edge_iter(Vertex v, Iter i, void* = 0)
+ : stored_edge<Vertex>(v), m_iter(i) { }
+ inline Property& get_property() { return m_iter->get_property(); }
+ inline const Property& get_property() const {
+ return m_iter->get_property();
+ }
+ inline Iter get_iter() const { return m_iter; }
+ protected:
+ Iter m_iter;
+ };
+
+ // For when the EdgeList is a std::vector.
+ // Want to make the iterator stable, so use an offset
+ // instead of an iterator into a std::vector
+ template <class Vertex, class EdgeVec, class Property>
+ class stored_ra_edge_iter
+ : public stored_edge<Vertex>
+ {
+ typedef typename EdgeVec::iterator Iter;
+ public:
+ typedef Property property_type;
+ inline stored_ra_edge_iter() { }
+ inline stored_ra_edge_iter(Vertex v, Iter i = Iter(),
+ EdgeVec* edge_vec = 0)
+ : stored_edge<Vertex>(v), m_i(i - edge_vec->begin()), m_vec(edge_vec){ }
+ inline Property& get_property() { return (*m_vec)[m_i].get_property(); }
+ inline const Property& get_property() const {
+ return (*m_vec)[m_i].get_property();
+ }
+ inline Iter get_iter() const { return m_vec->begin() + m_i; }
+ protected:
+ std::size_t m_i;
+ EdgeVec* m_vec;
+ };
+
+ } // namespace detail
+
+ template <class Tag, class Vertex, class Property>
+ const typename property_value<Property,Tag>::type&
+ get(Tag property_tag,
+ const detail::stored_edge_property<Vertex, Property>& e)
+ {
+ return get_property_value(e.get_property(), property_tag);
+ }
+
+ template <class Tag, class Vertex, class Iter, class Property>
+ const typename property_value<Property,Tag>::type&
+ get(Tag property_tag,
+ const detail::stored_edge_iter<Vertex, Iter, Property>& e)
+ {
+ return get_property_value(e.get_property(), property_tag);
+ }
+
+ template <class Tag, class Vertex, class EdgeVec, class Property>
+ const typename property_value<Property,Tag>::type&
+ get(Tag property_tag,
+ const detail::stored_ra_edge_iter<Vertex, EdgeVec, Property>& e)
+ {
+ return get_property_value(e.get_property(), property_tag);
+ }
+
+ //=========================================================================
+ // Directed Edges Helper Class
+
+ namespace detail {
+
+ // O(E/V)
+ template <class edge_descriptor, class EdgeList, class StoredProperty>
+ inline void
+ remove_directed_edge_dispatch(edge_descriptor, EdgeList& el,
+ StoredProperty& p)
+ {
+ for (typename EdgeList::iterator i = el.begin();
+ i != el.end(); ++i)
+ if (&(*i).get_property() == &p) {
+ el.erase(i);
+ return;
+ }
+ }
+
+ template <class incidence_iterator, class EdgeList, class Predicate>
+ inline void
+ remove_directed_edge_if_dispatch(incidence_iterator first,
+ incidence_iterator last,
+ EdgeList& el, Predicate pred,
+ boost::allow_parallel_edge_tag)
+ {
+ // remove_if
+ while (first != last && !pred(*first))
+ ++first;
+ incidence_iterator i = first;
+ if (first != last)
+ for (++i; i != last; ++i)
+ if (!pred(*i)) {
+ *first.base() = *i.base();
+ ++first;
+ }
+ el.erase(first.base(), el.end());
+ }
+ template <class incidence_iterator, class EdgeList, class Predicate>
+ inline void
+ remove_directed_edge_if_dispatch(incidence_iterator first,
+ incidence_iterator last,
+ EdgeList& el,
+ Predicate pred,
+ boost::disallow_parallel_edge_tag)
+ {
+ for (incidence_iterator next = first;
+ first != last; first = next) {
+ ++next;
+ if (pred(*first))
+ el.erase( first.base() );
+ }
+ }
+
+ template <class PropT, class Graph, class incidence_iterator,
+ class EdgeList, class Predicate>
+ inline void
+ undirected_remove_out_edge_if_dispatch(Graph& g,
+ incidence_iterator first,
+ incidence_iterator last,
+ EdgeList& el, Predicate pred,
+ boost::allow_parallel_edge_tag)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ // remove_if
+ while (first != last && !pred(*first))
+ ++first;
+ incidence_iterator i = first;
+ bool self_loop_removed = false;
+ if (first != last)
+ for (; i != last; ++i) {
+ if (self_loop_removed) {
+ /* With self loops, the descriptor will show up
+ * twice. The first time it will be removed, and now it
+ * will be skipped.
+ */
+ self_loop_removed = false;
+ }
+ else if (!pred(*i)) {
+ *first.base() = *i.base();
+ ++first;
+ } else {
+ if (source(*i, g) == target(*i, g)) self_loop_removed = true;
+ else {
+ // Remove the edge from the target
+ detail::remove_directed_edge_dispatch
+ (*i,
+ g.out_edge_list(target(*i, g)),
+ *(PropT*)(*i).get_property());
+ }
+
+ // Erase the edge property
+ g.m_edges.erase( (*i.base()).get_iter() );
+ }
+ }
+ el.erase(first.base(), el.end());
+ }
+ template <class PropT, class Graph, class incidence_iterator,
+ class EdgeList, class Predicate>
+ inline void
+ undirected_remove_out_edge_if_dispatch(Graph& g,
+ incidence_iterator first,
+ incidence_iterator last,
+ EdgeList& el,
+ Predicate pred,
+ boost::disallow_parallel_edge_tag)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ for (incidence_iterator next = first;
+ first != last; first = next) {
+ ++next;
+ if (pred(*first)) {
+ if (source(*first, g) != target(*first, g)) {
+ // Remove the edge from the target
+ detail::remove_directed_edge_dispatch
+ (*first,
+ g.out_edge_list(target(*first, g)),
+ *(PropT*)(*first).get_property());
+ }
+
+ // Erase the edge property
+ g.m_edges.erase( (*first.base()).get_iter() );
+
+ // Erase the edge in the source
+ el.erase( first.base() );
+ }
+ }
+ }
+
+ // O(E/V)
+ template <class edge_descriptor, class EdgeList, class StoredProperty>
+ inline void
+ remove_directed_edge_dispatch(edge_descriptor e, EdgeList& el,
+ no_property&)
+ {
+ for (typename EdgeList::iterator i = el.begin();
+ i != el.end(); ++i)
+ if ((*i).get_target() == e.m_target) {
+ el.erase(i);
+ return;
+ }
+ }
+
+ } // namespace detail
+
+ template <class Config>
+ struct directed_edges_helper {
+
+ // Placement of these overloaded remove_edge() functions
+ // inside the class avoids a VC++ bug.
+
+ // O(E/V)
+ inline void
+ remove_edge(typename Config::edge_descriptor e)
+ {
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(*this);
+ typename Config::OutEdgeList& el = g.out_edge_list(source(e, g));
+ typedef typename Config::OutEdgeList::value_type::property_type PType;
+ detail::remove_directed_edge_dispatch(e, el,
+ *(PType*)e.get_property());
+ }
+
+ // O(1)
+ inline void
+ remove_edge(typename Config::out_edge_iterator iter)
+ {
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(*this);
+ typename Config::edge_descriptor e = *iter;
+ typename Config::OutEdgeList& el = g.out_edge_list(source(e, g));
+ el.erase(iter.base());
+ }
+
+ };
+
+ // O(1)
+ template <class Config>
+ inline std::pair<typename Config::edge_iterator,
+ typename Config::edge_iterator>
+ edges(const directed_edges_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_iterator edge_iterator;
+ const graph_type& cg = static_cast<const graph_type&>(g_);
+ graph_type& g = const_cast<graph_type&>(cg);
+ return std::make_pair( edge_iterator(g.vertex_set().begin(),
+ g.vertex_set().begin(),
+ g.vertex_set().end(), g),
+ edge_iterator(g.vertex_set().begin(),
+ g.vertex_set().end(),
+ g.vertex_set().end(), g) );
+ }
+
+ //=========================================================================
+ // Directed Graph Helper Class
+
+ struct adj_list_dir_traversal_tag :
+ public virtual vertex_list_graph_tag,
+ public virtual incidence_graph_tag,
+ public virtual adjacency_graph_tag,
+ public virtual edge_list_graph_tag { };
+
+ template <class Config>
+ struct directed_graph_helper
+ : public directed_edges_helper<Config> {
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef adj_list_dir_traversal_tag traversal_category;
+ };
+
+ // O(E/V)
+ template <class Config>
+ inline void
+ remove_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ detail::erase_from_incidence_list(g.out_edge_list(u), v, Cat());
+ }
+
+ template <class Config, class Predicate>
+ inline void
+ remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred,
+ directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::out_edge_iterator first, last;
+ boost::tie(first, last) = out_edges(u, g);
+ typedef typename Config::edge_parallel_category edge_parallel_category;
+ detail::remove_directed_edge_if_dispatch
+ (first, last, g.out_edge_list(u), pred, edge_parallel_category());
+ }
+
+ template <class Config, class Predicate>
+ inline void
+ remove_edge_if(Predicate pred, directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+
+ typename Config::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ remove_out_edge_if(*vi, pred, g);
+ }
+
+ template <class EdgeOrIter, class Config>
+ inline void
+ remove_edge(EdgeOrIter e_or_iter, directed_graph_helper<Config>& g_)
+ {
+ g_.remove_edge(e_or_iter);
+ }
+
+ // O(V + E) for allow_parallel_edges
+ // O(V * log(E/V)) for disallow_parallel_edges
+ template <class Config>
+ inline void
+ clear_vertex(typename Config::vertex_descriptor u,
+ directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::vertex_iterator vi, viend;
+ for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi)
+ detail::erase_from_incidence_list(g.out_edge_list(*vi), u, Cat());
+ g.out_edge_list(u).clear();
+ // clear() should be a req of Sequence and AssociativeContainer,
+ // or maybe just Container
+ }
+
+ template <class Config>
+ inline void
+ clear_out_edges(typename Config::vertex_descriptor u,
+ directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ g.out_edge_list(u).clear();
+ // clear() should be a req of Sequence and AssociativeContainer,
+ // or maybe just Container
+ }
+
+ // O(V), could do better...
+ template <class Config>
+ inline typename Config::edges_size_type
+ num_edges(const directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ const graph_type& g = static_cast<const graph_type&>(g_);
+ typename Config::edges_size_type num_e = 0;
+ typename Config::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ num_e += out_degree(*vi, g);
+ return num_e;
+ }
+ // O(1) for allow_parallel_edge_tag
+ // O(log(E/V)) for disallow_parallel_edge_tag
+ template <class Config>
+ inline std::pair<typename directed_graph_helper<Config>::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const typename Config::edge_property_type& p,
+ directed_graph_helper<Config>& g_)
+ {
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::StoredEdge StoredEdge;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::OutEdgeList::iterator i;
+ bool inserted;
+ boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u),
+ StoredEdge(v, p));
+ return std::make_pair(edge_descriptor(u, v, &(*i).get_property()),
+ inserted);
+ }
+ // Did not use default argument here because that
+ // causes Visual C++ to get confused.
+ template <class Config>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ directed_graph_helper<Config>& g_)
+ {
+ typename Config::edge_property_type p;
+ return add_edge(u, v, p, g_);
+ }
+ //=========================================================================
+ // Undirected Graph Helper Class
+
+ template <class Config>
+ struct undirected_graph_helper;
+
+ struct undir_adj_list_traversal_tag :
+ public virtual vertex_list_graph_tag,
+ public virtual incidence_graph_tag,
+ public virtual adjacency_graph_tag,
+ public virtual edge_list_graph_tag,
+ public virtual bidirectional_graph_tag { };
+
+ namespace detail {
+
+ // using class with specialization for dispatch is a VC++ workaround.
+ template <class StoredProperty>
+ struct remove_undirected_edge_dispatch {
+
+ // O(E/V)
+ template <class edge_descriptor, class Config>
+ static void
+ apply(edge_descriptor e,
+ undirected_graph_helper<Config>& g_,
+ StoredProperty& p)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+
+ typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g));
+ typename Config::OutEdgeList::iterator out_i = out_el.begin();
+ for (; out_i != out_el.end(); ++out_i)
+ if (&(*out_i).get_property() == &p) {
+ out_el.erase(out_i);
+ break;
+ }
+ typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g));
+ typename Config::OutEdgeList::iterator in_i = in_el.begin();
+ for (; in_i != in_el.end(); ++in_i)
+ if (&(*in_i).get_property() == &p) {
+ g.m_edges.erase((*in_i).get_iter());
+ in_el.erase(in_i);
+ return;
+ }
+ }
+ };
+
+ template <>
+ struct remove_undirected_edge_dispatch<no_property> {
+ // O(E/V)
+ template <class edge_descriptor, class Config>
+ static void
+ apply(edge_descriptor e,
+ undirected_graph_helper<Config>& g_,
+ no_property&)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ no_property* p = (no_property*)e.get_property();
+ typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g));
+ typename Config::OutEdgeList::iterator out_i = out_el.begin();
+ for (; out_i != out_el.end(); ++out_i)
+ if (&(*out_i).get_property() == p) {
+ out_el.erase(out_i);
+ break;
+ }
+ typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g));
+ typename Config::OutEdgeList::iterator in_i = in_el.begin();
+ for (; in_i != in_el.end(); ++in_i)
+ if (&(*in_i).get_property() == p) {
+ g.m_edges.erase((*in_i).get_iter());
+ in_el.erase(in_i);
+ return;
+ }
+ }
+ };
+
+ // O(E/V)
+ template <class Graph, class EdgeList, class Vertex>
+ inline void
+ remove_edge_and_property(Graph& g, EdgeList& el, Vertex v,
+ boost::allow_parallel_edge_tag cat)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename EdgeList::value_type StoredEdge;
+ typename EdgeList::iterator i = el.begin(), end = el.end();
+ for (; i != end; ++i) {
+ if ((*i).get_target() == v) {
+ // NOTE: Wihtout this skip, this loop will double-delete properties
+ // of loop edges. This solution is based on the observation that
+ // the incidence edges of a vertex with a loop are adjacent in the
+ // out edge list. This *may* actually hold for multisets also.
+ bool skip = (boost::next(i) != end && i->get_iter() == boost::next(i)->get_iter());
+ g.m_edges.erase((*i).get_iter());
+ if (skip) ++i;
+ }
+ }
+ detail::erase_from_incidence_list(el, v, cat);
+ }
+ // O(log(E/V))
+ template <class Graph, class EdgeList, class Vertex>
+ inline void
+ remove_edge_and_property(Graph& g, EdgeList& el, Vertex v,
+ boost::disallow_parallel_edge_tag)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename EdgeList::value_type StoredEdge;
+ typename EdgeList::iterator i = el.find(StoredEdge(v)), end = el.end();
+ if (i != end) {
+ g.m_edges.erase((*i).get_iter());
+ el.erase(i);
+ }
+ }
+
+ } // namespace detail
+
+ template <class Vertex, class EdgeProperty>
+ struct list_edge // short name due to VC++ truncation and linker problems
+ : public boost::detail::edge_base<boost::undirected_tag, Vertex>
+ {
+ typedef EdgeProperty property_type;
+ typedef boost::detail::edge_base<boost::undirected_tag, Vertex> Base;
+ list_edge(Vertex u, Vertex v, const EdgeProperty& p = EdgeProperty())
+ : Base(u, v), m_property(p) { }
+ EdgeProperty& get_property() { return m_property; }
+ const EdgeProperty& get_property() const { return m_property; }
+ // the following methods should never be used, but are needed
+ // to make SGI MIPSpro C++ happy
+ list_edge() { }
+ bool operator==(const list_edge&) const { return false; }
+ bool operator<(const list_edge&) const { return false; }
+ EdgeProperty m_property;
+ };
+
+ template <class Config>
+ struct undirected_graph_helper {
+
+ typedef undir_adj_list_traversal_tag traversal_category;
+
+ // Placement of these overloaded remove_edge() functions
+ // inside the class avoids a VC++ bug.
+
+ // O(E/V)
+ inline void
+ remove_edge(typename Config::edge_descriptor e)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::OutEdgeList::value_type::property_type PType;
+ detail::remove_undirected_edge_dispatch<PType>::apply
+ (e, *this, *(PType*)e.get_property());
+ }
+ // O(E/V)
+ inline void
+ remove_edge(typename Config::out_edge_iterator iter)
+ {
+ this->remove_edge(*iter);
+ }
+ };
+
+ // Had to make these non-members to avoid accidental instantiation
+ // on SGI MIPSpro C++
+ template <class C>
+ inline typename C::InEdgeList&
+ in_edge_list(undirected_graph_helper<C>&,
+ typename C::vertex_descriptor v)
+ {
+ typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
+ return sv->m_out_edges;
+ }
+ template <class C>
+ inline const typename C::InEdgeList&
+ in_edge_list(const undirected_graph_helper<C>&,
+ typename C::vertex_descriptor v) {
+ typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
+ return sv->m_out_edges;
+ }
+
+ // O(E/V)
+ template <class EdgeOrIter, class Config>
+ inline void
+ remove_edge(EdgeOrIter e, undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ g_.remove_edge(e);
+ }
+
+ // O(E/V) or O(log(E/V))
+ template <class Config>
+ void
+ remove_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typedef typename Config::edge_parallel_category Cat;
+ detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat());
+ detail::erase_from_incidence_list(g.out_edge_list(v), u, Cat());
+ }
+
+ template <class Config, class Predicate>
+ void
+ remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred,
+ undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::OutEdgeList::value_type::property_type PropT;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::out_edge_iterator first, last;
+ boost::tie(first, last) = out_edges(u, g);
+ typedef typename Config::edge_parallel_category Cat;
+ detail::undirected_remove_out_edge_if_dispatch<PropT>
+ (g, first, last, g.out_edge_list(u), pred, Cat());
+ }
+ template <class Config, class Predicate>
+ void
+ remove_in_edge_if(typename Config::vertex_descriptor u, Predicate pred,
+ undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ remove_out_edge_if(u, pred, g_);
+ }
+
+ // O(E/V * E) or O(log(E/V) * E)
+ template <class Predicate, class Config>
+ void
+ remove_edge_if(Predicate pred, undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::edge_iterator ei, ei_end, next;
+ boost::tie(ei, ei_end) = edges(g);
+ for (next = ei; ei != ei_end; ei = next) {
+ ++next;
+ if (pred(*ei))
+ remove_edge(*ei, g);
+ }
+ }
+
+ // O(1)
+ template <class Config>
+ inline std::pair<typename Config::edge_iterator,
+ typename Config::edge_iterator>
+ edges(const undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_iterator edge_iterator;
+ const graph_type& cg = static_cast<const graph_type&>(g_);
+ graph_type& g = const_cast<graph_type&>(cg);
+ return std::make_pair( edge_iterator(g.m_edges.begin()),
+ edge_iterator(g.m_edges.end()) );
+ }
+ // O(1)
+ template <class Config>
+ inline typename Config::edges_size_type
+ num_edges(const undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ const graph_type& g = static_cast<const graph_type&>(g_);
+ return g.m_edges.size();
+ }
+ // O(E/V * E/V)
+ template <class Config>
+ inline void
+ clear_vertex(typename Config::vertex_descriptor u,
+ undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::OutEdgeList& el = g.out_edge_list(u);
+ typename Config::OutEdgeList::iterator
+ ei = el.begin(), ei_end = el.end();
+ for (; ei != ei_end; /* Increment below */ ) {
+ bool is_self_loop = (*ei).get_target() == u;
+ // Don't erase from our own incidence list in the case of a self-loop
+ // since we're clearing it anyway.
+ if (!is_self_loop) {
+ detail::erase_from_incidence_list
+ (g.out_edge_list((*ei).get_target()), u, Cat());
+ typename Config::OutEdgeList::iterator ei_copy = ei;
+ ++ei;
+ if (!is_self_loop) g.m_edges.erase((*ei_copy).get_iter());
+ } else {
+ ++ei;
+ }
+ }
+ g.out_edge_list(u).clear();
+ }
+ // O(1) for allow_parallel_edge_tag
+ // O(log(E/V)) for disallow_parallel_edge_tag
+ template <class Config>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const typename Config::edge_property_type& p,
+ undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::StoredEdge StoredEdge;
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+
+ bool inserted;
+ typename Config::EdgeContainer::value_type e(u, v, p);
+ typename Config::EdgeContainer::iterator p_iter
+ = graph_detail::push(g.m_edges, e).first;
+
+ typename Config::OutEdgeList::iterator i;
+ boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u),
+ StoredEdge(v, p_iter, &g.m_edges));
+ if (inserted) {
+ boost::graph_detail::push(g.out_edge_list(v), StoredEdge(u, p_iter, &g.m_edges));
+ return std::make_pair(edge_descriptor(u, v, &p_iter->get_property()),
+ true);
+ } else {
+ g.m_edges.erase(p_iter);
+ return std::make_pair
+ (edge_descriptor(u, v, &i->get_iter()->get_property()), false);
+ }
+ }
+ template <class Config>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ undirected_graph_helper<Config>& g_)
+ {
+ typename Config::edge_property_type p;
+ return add_edge(u, v, p, g_);
+ }
+
+ // O(1)
+ template <class Config>
+ inline typename Config::degree_size_type
+ degree(typename Config::vertex_descriptor u,
+ const undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type Graph;
+ const Graph& g = static_cast<const Graph&>(g_);
+ return out_degree(u, g);
+ }
+
+ template <class Config>
+ inline std::pair<typename Config::in_edge_iterator,
+ typename Config::in_edge_iterator>
+ in_edges(typename Config::vertex_descriptor u,
+ const undirected_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type Graph;
+ const Graph& cg = static_cast<const Graph&>(g_);
+ Graph& g = const_cast<Graph&>(cg);
+ typedef typename Config::in_edge_iterator in_edge_iterator;
+ return
+ std::make_pair(in_edge_iterator(g.out_edge_list(u).begin(), u),
+ in_edge_iterator(g.out_edge_list(u).end(), u));
+ }
+
+ template <class Config>
+ inline typename Config::degree_size_type
+ in_degree(typename Config::vertex_descriptor u,
+ const undirected_graph_helper<Config>& g_)
+ { return degree(u, g_); }
+
+ //=========================================================================
+ // Bidirectional Graph Helper Class
+
+ struct bidir_adj_list_traversal_tag :
+ public virtual vertex_list_graph_tag,
+ public virtual incidence_graph_tag,
+ public virtual adjacency_graph_tag,
+ public virtual edge_list_graph_tag,
+ public virtual bidirectional_graph_tag { };
+
+ template <class Config>
+ struct bidirectional_graph_helper
+ : public directed_edges_helper<Config> {
+ typedef bidir_adj_list_traversal_tag traversal_category;
+ };
+
+ // Had to make these non-members to avoid accidental instantiation
+ // on SGI MIPSpro C++
+ template <class C>
+ inline typename C::InEdgeList&
+ in_edge_list(bidirectional_graph_helper<C>&,
+ typename C::vertex_descriptor v)
+ {
+ typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
+ return sv->m_in_edges;
+ }
+ template <class C>
+ inline const typename C::InEdgeList&
+ in_edge_list(const bidirectional_graph_helper<C>&,
+ typename C::vertex_descriptor v) {
+ typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
+ return sv->m_in_edges;
+ }
+
+ template <class Predicate, class Config>
+ inline void
+ remove_edge_if(Predicate pred, bidirectional_graph_helper<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::edge_iterator ei, ei_end, next;
+ boost::tie(ei, ei_end) = edges(g);
+ for (next = ei; ei != ei_end; ei = next) {
+ ++next;
+ if (pred(*ei))
+ remove_edge(*ei, g);
+ }
+ }
+
+ template <class Config>
+ inline std::pair<typename Config::in_edge_iterator,
+ typename Config::in_edge_iterator>
+ in_edges(typename Config::vertex_descriptor u,
+ const bidirectional_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ const graph_type& cg = static_cast<const graph_type&>(g_);
+ graph_type& g = const_cast<graph_type&>(cg);
+ typedef typename Config::in_edge_iterator in_edge_iterator;
+ return
+ std::make_pair(in_edge_iterator(in_edge_list(g, u).begin(), u),
+ in_edge_iterator(in_edge_list(g, u).end(), u));
+ }
+
+ // O(1)
+ template <class Config>
+ inline std::pair<typename Config::edge_iterator,
+ typename Config::edge_iterator>
+ edges(const bidirectional_graph_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_iterator edge_iterator;
+ const graph_type& cg = static_cast<const graph_type&>(g_);
+ graph_type& g = const_cast<graph_type&>(cg);
+ return std::make_pair( edge_iterator(g.m_edges.begin()),
+ edge_iterator(g.m_edges.end()) );
+ }
+
+ //=========================================================================
+ // Bidirectional Graph Helper Class (with edge properties)
+
+
+ template <class Config>
+ struct bidirectional_graph_helper_with_property
+ : public bidirectional_graph_helper<Config>
+ {
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+
+ std::pair<out_edge_iterator, out_edge_iterator>
+ get_parallel_edge_sublist(typename Config::edge_descriptor e,
+ const graph_type& g,
+ void*)
+ { return out_edges(source(e, g), g); }
+
+ std::pair<out_edge_iterator, out_edge_iterator>
+ get_parallel_edge_sublist(typename Config::edge_descriptor e,
+ const graph_type& g,
+ setS*)
+ { return edge_range(source(e, g), target(e, g), g); }
+
+ std::pair<out_edge_iterator, out_edge_iterator>
+ get_parallel_edge_sublist(typename Config::edge_descriptor e,
+ const graph_type& g,
+ multisetS*)
+ { return edge_range(source(e, g), target(e, g), g); }
+
+ std::pair<out_edge_iterator, out_edge_iterator>
+ get_parallel_edge_sublist(typename Config::edge_descriptor e,
+ const graph_type& g,
+ hash_setS*)
+ { return edge_range(source(e, g), target(e, g), g); }
+
+ // Placement of these overloaded remove_edge() functions
+ // inside the class avoids a VC++ bug.
+
+ // O(E/V) or O(log(E/V))
+ void
+ remove_edge(typename Config::edge_descriptor e)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ graph_type& g = static_cast<graph_type&>(*this);
+
+ typedef typename Config::edgelist_selector OutEdgeListS;
+
+ std::pair<out_edge_iterator, out_edge_iterator> rng =
+ get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0));
+ rng.first = std::find(rng.first, rng.second, e);
+ BOOST_ASSERT(rng.first != rng.second);
+ remove_edge(rng.first);
+ }
+
+ inline void
+ remove_edge(typename Config::out_edge_iterator iter)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(*this);
+ typename Config::edge_descriptor e = *iter;
+ typename Config::OutEdgeList& oel = g.out_edge_list(source(e, g));
+ typename Config::InEdgeList& iel = in_edge_list(g, target(e, g));
+ typedef typename Config::OutEdgeList::value_type::property_type PType;
+ PType& p = *(PType*)e.get_property();
+ detail::remove_directed_edge_dispatch(*iter, iel, p);
+ g.m_edges.erase(iter.base()->get_iter());
+ oel.erase(iter.base());
+ }
+ };
+
+ // O(E/V) for allow_parallel_edge_tag
+ // O(log(E/V)) for disallow_parallel_edge_tag
+ template <class Config>
+ inline void
+ remove_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typedef typename Config::edge_parallel_category Cat;
+ detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat());
+ detail::erase_from_incidence_list(in_edge_list(g, v), u, Cat());
+ }
+
+ // O(E/V) or O(log(E/V))
+ template <class EdgeOrIter, class Config>
+ inline void
+ remove_edge(EdgeOrIter e,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ g_.remove_edge(e);
+ }
+
+ template <class Config, class Predicate>
+ inline void
+ remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::OutEdgeList::value_type::property_type PropT;
+ graph_type& g = static_cast<graph_type&>(g_);
+
+ typedef typename Config::EdgeIter EdgeIter;
+ typedef std::vector<EdgeIter> Garbage;
+ Garbage garbage;
+
+ // First remove the edges from the targets' in-edge lists and
+ // from the graph's edge set list.
+ typename Config::out_edge_iterator out_i, out_end;
+ for (boost::tie(out_i, out_end) = out_edges(u, g); out_i != out_end; ++out_i)
+ if (pred(*out_i)) {
+ detail::remove_directed_edge_dispatch
+ (*out_i, in_edge_list(g, target(*out_i, g)),
+ *(PropT*)(*out_i).get_property());
+ // Put in garbage to delete later. Will need the properties
+ // for the remove_if of the out-edges.
+ garbage.push_back((*out_i.base()).get_iter());
+ }
+
+ // Now remove the edges from this out-edge list.
+ typename Config::out_edge_iterator first, last;
+ boost::tie(first, last) = out_edges(u, g);
+ typedef typename Config::edge_parallel_category Cat;
+ detail::remove_directed_edge_if_dispatch
+ (first, last, g.out_edge_list(u), pred, Cat());
+
+ // Now delete the edge properties from the g.m_edges list
+ for (typename Garbage::iterator i = garbage.begin();
+ i != garbage.end(); ++i)
+ g.m_edges.erase(*i);
+ }
+ template <class Config, class Predicate>
+ inline void
+ remove_in_edge_if(typename Config::vertex_descriptor v, Predicate pred,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::OutEdgeList::value_type::property_type PropT;
+ graph_type& g = static_cast<graph_type&>(g_);
+
+ typedef typename Config::EdgeIter EdgeIter;
+ typedef std::vector<EdgeIter> Garbage;
+ Garbage garbage;
+
+ // First remove the edges from the sources' out-edge lists and
+ // from the graph's edge set list.
+ typename Config::in_edge_iterator in_i, in_end;
+ for (boost::tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i)
+ if (pred(*in_i)) {
+ typename Config::vertex_descriptor u = source(*in_i, g);
+ detail::remove_directed_edge_dispatch
+ (*in_i, g.out_edge_list(u), *(PropT*)(*in_i).get_property());
+ // Put in garbage to delete later. Will need the properties
+ // for the remove_if of the out-edges.
+ garbage.push_back((*in_i.base()).get_iter());
+ }
+ // Now remove the edges from this in-edge list.
+ typename Config::in_edge_iterator first, last;
+ boost::tie(first, last) = in_edges(v, g);
+ typedef typename Config::edge_parallel_category Cat;
+ detail::remove_directed_edge_if_dispatch
+ (first, last, in_edge_list(g, v), pred, Cat());
+
+ // Now delete the edge properties from the g.m_edges list
+ for (typename Garbage::iterator i = garbage.begin();
+ i != garbage.end(); ++i)
+ g.m_edges.erase(*i);
+ }
+
+ // O(1)
+ template <class Config>
+ inline typename Config::edges_size_type
+ num_edges(const bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ const graph_type& g = static_cast<const graph_type&>(g_);
+ return g.m_edges.size();
+ }
+ // O(E/V * E/V) for allow_parallel_edge_tag
+ // O(E/V * log(E/V)) for disallow_parallel_edge_tag
+ template <class Config>
+ inline void
+ clear_vertex(typename Config::vertex_descriptor u,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::OutEdgeList& el = g.out_edge_list(u);
+ typename Config::OutEdgeList::iterator
+ ei = el.begin(), ei_end = el.end();
+ for (; ei != ei_end; ++ei) {
+ detail::erase_from_incidence_list
+ (in_edge_list(g, (*ei).get_target()), u, Cat());
+ g.m_edges.erase((*ei).get_iter());
+ }
+ typename Config::InEdgeList& in_el = in_edge_list(g, u);
+ typename Config::InEdgeList::iterator
+ in_ei = in_el.begin(), in_ei_end = in_el.end();
+ for (; in_ei != in_ei_end; ++in_ei) {
+ detail::erase_from_incidence_list
+ (g.out_edge_list((*in_ei).get_target()), u, Cat());
+ g.m_edges.erase((*in_ei).get_iter());
+ }
+ g.out_edge_list(u).clear();
+ in_edge_list(g, u).clear();
+ }
+
+ template <class Config>
+ inline void
+ clear_out_edges(typename Config::vertex_descriptor u,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::OutEdgeList& el = g.out_edge_list(u);
+ typename Config::OutEdgeList::iterator
+ ei = el.begin(), ei_end = el.end();
+ for (; ei != ei_end; ++ei) {
+ detail::erase_from_incidence_list
+ (in_edge_list(g, (*ei).get_target()), u, Cat());
+ g.m_edges.erase((*ei).get_iter());
+ }
+ g.out_edge_list(u).clear();
+ }
+
+ template <class Config>
+ inline void
+ clear_in_edges(typename Config::vertex_descriptor u,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Config::graph_type graph_type;
+ typedef typename Config::edge_parallel_category Cat;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typename Config::InEdgeList& in_el = in_edge_list(g, u);
+ typename Config::InEdgeList::iterator
+ in_ei = in_el.begin(), in_ei_end = in_el.end();
+ for (; in_ei != in_ei_end; ++in_ei) {
+ detail::erase_from_incidence_list
+ (g.out_edge_list((*in_ei).get_target()), u, Cat());
+ g.m_edges.erase((*in_ei).get_iter());
+ }
+ in_edge_list(g, u).clear();
+ }
+
+ // O(1) for allow_parallel_edge_tag
+ // O(log(E/V)) for disallow_parallel_edge_tag
+ template <class Config>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const typename Config::edge_property_type& p,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ graph_type& g = static_cast<graph_type&>(g_);
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::StoredEdge StoredEdge;
+ bool inserted;
+ typename Config::EdgeContainer::value_type e(u, v, p);
+ typename Config::EdgeContainer::iterator p_iter
+ = graph_detail::push(g.m_edges, e).first;
+ typename Config::OutEdgeList::iterator i;
+ boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u),
+ StoredEdge(v, p_iter, &g.m_edges));
+ if (inserted) {
+ boost::graph_detail::push(in_edge_list(g, v), StoredEdge(u, p_iter, &g.m_edges));
+ return std::make_pair(edge_descriptor(u, v, &p_iter->m_property),
+ true);
+ } else {
+ g.m_edges.erase(p_iter);
+ return std::make_pair(edge_descriptor(u, v,
+ &i->get_iter()->get_property()),
+ false);
+ }
+ }
+
+ template <class Config>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typename Config::edge_property_type p;
+ return add_edge(u, v, p, g_);
+ }
+ // O(1)
+ template <class Config>
+ inline typename Config::degree_size_type
+ degree(typename Config::vertex_descriptor u,
+ const bidirectional_graph_helper_with_property<Config>& g_)
+ {
+ typedef typename Config::graph_type graph_type;
+ const graph_type& g = static_cast<const graph_type&>(g_);
+ return in_degree(u, g) + out_degree(u, g);
+ }
+
+ //=========================================================================
+ // Adjacency List Helper Class
+
+ template <class Config, class Base>
+ struct adj_list_helper : public Base
+ {
+ typedef typename Config::graph_type AdjList;
+ typedef typename Config::vertex_descriptor vertex_descriptor;
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+ typedef typename Config::in_edge_iterator in_edge_iterator;
+ typedef typename Config::adjacency_iterator adjacency_iterator;
+ typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator;
+ typedef typename Config::vertex_iterator vertex_iterator;
+ typedef typename Config::edge_iterator edge_iterator;
+ typedef typename Config::directed_category directed_category;
+ typedef typename Config::edge_parallel_category edge_parallel_category;
+ typedef typename Config::vertices_size_type vertices_size_type;
+ typedef typename Config::edges_size_type edges_size_type;
+ typedef typename Config::degree_size_type degree_size_type;
+ typedef typename Config::StoredEdge StoredEdge;
+ typedef typename Config::edge_property_type edge_property_type;
+
+ typedef typename Config::global_edgelist_selector
+ global_edgelist_selector;
+ };
+
+ template <class Config, class Base>
+ inline std::pair<typename Config::adjacency_iterator,
+ typename Config::adjacency_iterator>
+ adjacent_vertices(typename Config::vertex_descriptor u,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ const AdjList& cg = static_cast<const AdjList&>(g_);
+ AdjList& g = const_cast<AdjList&>(cg);
+ typedef typename Config::adjacency_iterator adjacency_iterator;
+ typename Config::out_edge_iterator first, last;
+ boost::tie(first, last) = out_edges(u, g);
+ return std::make_pair(adjacency_iterator(first, &g),
+ adjacency_iterator(last, &g));
+ }
+ template <class Config, class Base>
+ inline std::pair<typename Config::inv_adjacency_iterator,
+ typename Config::inv_adjacency_iterator>
+ inv_adjacent_vertices(typename Config::vertex_descriptor u,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ const AdjList& cg = static_cast<const AdjList&>(g_);
+ AdjList& g = const_cast<AdjList&>(cg);
+ typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator;
+ typename Config::in_edge_iterator first, last;
+ boost::tie(first, last) = in_edges(u, g);
+ return std::make_pair(inv_adjacency_iterator(first, &g),
+ inv_adjacency_iterator(last, &g));
+ }
+ template <class Config, class Base>
+ inline std::pair<typename Config::out_edge_iterator,
+ typename Config::out_edge_iterator>
+ out_edges(typename Config::vertex_descriptor u,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+ const AdjList& cg = static_cast<const AdjList&>(g_);
+ AdjList& g = const_cast<AdjList&>(cg);
+ return
+ std::make_pair(out_edge_iterator(g.out_edge_list(u).begin(), u),
+ out_edge_iterator(g.out_edge_list(u).end(), u));
+ }
+ template <class Config, class Base>
+ inline std::pair<typename Config::vertex_iterator,
+ typename Config::vertex_iterator>
+ vertices(const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ const AdjList& cg = static_cast<const AdjList&>(g_);
+ AdjList& g = const_cast<AdjList&>(cg);
+ return std::make_pair( g.vertex_set().begin(), g.vertex_set().end() );
+ }
+ template <class Config, class Base>
+ inline typename Config::vertices_size_type
+ num_vertices(const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ const AdjList& g = static_cast<const AdjList&>(g_);
+ return g.vertex_set().size();
+ }
+ template <class Config, class Base>
+ inline typename Config::degree_size_type
+ out_degree(typename Config::vertex_descriptor u,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type AdjList;
+ const AdjList& g = static_cast<const AdjList&>(g_);
+ return g.out_edge_list(u).size();
+ }
+ template <class Config, class Base>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type Graph;
+ typedef typename Config::StoredEdge StoredEdge;
+ const Graph& cg = static_cast<const Graph&>(g_);
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+ const typename Config::OutEdgeList& el = cg.out_edge_list(u);
+ typename Config::OutEdgeList::const_iterator it = graph_detail::
+ find(el, StoredEdge(v));
+ return std::make_pair(
+ typename Config::edge_descriptor
+ (u, v, (it == el.end() ? 0 : &(*it).get_property())),
+ (it != el.end()));
+ }
+
+ template <class Config, class Base>
+ inline std::pair<typename Config::out_edge_iterator,
+ typename Config::out_edge_iterator>
+ edge_range(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const adj_list_helper<Config, Base>& g_)
+ {
+ typedef typename Config::graph_type Graph;
+ typedef typename Config::StoredEdge StoredEdge;
+ const Graph& cg = static_cast<const Graph&>(g_);
+ Graph& g = const_cast<Graph&>(cg);
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+ typename Config::OutEdgeList& el = g.out_edge_list(u);
+ typename Config::OutEdgeList::iterator first, last;
+ typename Config::EdgeContainer fake_edge_container;
+ boost::tie(first, last) = graph_detail::
+ equal_range(el, StoredEdge(v, fake_edge_container.end(),
+ &fake_edge_container));
+ return std::make_pair(out_edge_iterator(first, u),
+ out_edge_iterator(last, u));
+ }
+
+ template <class Config>
+ inline typename Config::degree_size_type
+ in_degree(typename Config::vertex_descriptor u,
+ const directed_edges_helper<Config>& g_)
+ {
+ typedef typename Config::graph_type Graph;
+ const Graph& cg = static_cast<const Graph&>(g_);
+ Graph& g = const_cast<Graph&>(cg);
+ return in_edge_list(g, u).size();
+ }
+
+ namespace detail {
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type,
+ Property>::type
+ get_dispatch(adj_list_helper<Config,Base>&, Property,
+ boost::edge_property_tag) {
+ typedef typename Config::graph_type Graph;
+ typedef typename boost::property_map<Graph, Property>::type PA;
+ return PA();
+ }
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type,
+ Property>::const_type
+ get_dispatch(const adj_list_helper<Config,Base>&, Property,
+ boost::edge_property_tag) {
+ typedef typename Config::graph_type Graph;
+ typedef typename boost::property_map<Graph, Property>::const_type PA;
+ return PA();
+ }
+
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type,
+ Property>::type
+ get_dispatch(adj_list_helper<Config,Base>& g, Property,
+ boost::vertex_property_tag) {
+ typedef typename Config::graph_type Graph;
+ typedef typename boost::property_map<Graph, Property>::type PA;
+ return PA(&static_cast<Graph&>(g));
+ }
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type,
+ Property>::const_type
+ get_dispatch(const adj_list_helper<Config, Base>& g, Property,
+ boost::vertex_property_tag) {
+ typedef typename Config::graph_type Graph;
+ typedef typename boost::property_map<Graph, Property>::const_type PA;
+ const Graph& cg = static_cast<const Graph&>(g);
+ return PA(&cg);
+ }
+
+ } // namespace detail
+
+ // Implementation of the PropertyGraph interface
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type, Property>::type
+ get(Property p, adj_list_helper<Config, Base>& g) {
+ typedef typename property_kind<Property>::type Kind;
+ return detail::get_dispatch(g, p, Kind());
+ }
+ template <class Config, class Base, class Property>
+ inline
+ typename boost::property_map<typename Config::graph_type,
+ Property>::const_type
+ get(Property p, const adj_list_helper<Config, Base>& g) {
+ typedef typename property_kind<Property>::type Kind;
+ return detail::get_dispatch(g, p, Kind());
+ }
+
+ template <class Config, class Base, class Property, class Key>
+ inline
+ typename boost::property_traits<
+ typename boost::property_map<typename Config::graph_type,
+ Property>::type
+ >::reference
+ get(Property p, adj_list_helper<Config, Base>& g, const Key& key) {
+ return get(get(p, g), key);
+ }
+
+ template <class Config, class Base, class Property, class Key>
+ inline
+ typename boost::property_traits<
+ typename boost::property_map<typename Config::graph_type,
+ Property>::const_type
+ >::reference
+ get(Property p, const adj_list_helper<Config, Base>& g, const Key& key) {
+ return get(get(p, g), key);
+ }
+
+ template <class Config, class Base, class Property, class Key,class Value>
+ inline void
+ put(Property p, adj_list_helper<Config, Base>& g,
+ const Key& key, const Value& value)
+ {
+ typedef typename Config::graph_type Graph;
+ typedef typename boost::property_map<Graph, Property>::type Map;
+ Map pmap = get(p, static_cast<Graph&>(g));
+ put(pmap, key, value);
+ }
+
+
+ //=========================================================================
+ // Generalize Adjacency List Implementation
+
+ struct adj_list_tag { };
+
+ template <class Derived, class Config, class Base>
+ class adj_list_impl
+ : public adj_list_helper<Config, Base>
+ {
+ typedef typename Config::OutEdgeList OutEdgeList;
+ typedef typename Config::InEdgeList InEdgeList;
+ typedef typename Config::StoredVertexList StoredVertexList;
+ public:
+ typedef typename Config::stored_vertex stored_vertex;
+ typedef typename Config::EdgeContainer EdgeContainer;
+ typedef typename Config::vertex_descriptor vertex_descriptor;
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::vertex_iterator vertex_iterator;
+ typedef typename Config::edge_iterator edge_iterator;
+ typedef typename Config::edge_parallel_category edge_parallel_category;
+ typedef typename Config::vertices_size_type vertices_size_type;
+ typedef typename Config::edges_size_type edges_size_type;
+ typedef typename Config::degree_size_type degree_size_type;
+ typedef typename Config::edge_property_type edge_property_type;
+ typedef adj_list_tag graph_tag;
+
+ static vertex_descriptor null_vertex()
+ {
+ return 0;
+ }
+
+ inline adj_list_impl() { }
+
+ inline adj_list_impl(const adj_list_impl& x) {
+ copy_impl(x);
+ }
+ inline adj_list_impl& operator=(const adj_list_impl& x) {
+ this->clear();
+ copy_impl(x);
+ return *this;
+ }
+ inline void clear() {
+ for (typename StoredVertexList::iterator i = m_vertices.begin();
+ i != m_vertices.end(); ++i)
+ delete (stored_vertex*)*i;
+ m_vertices.clear();
+ m_edges.clear();
+ }
+ inline adj_list_impl(vertices_size_type num_vertices) {
+ for (vertices_size_type i = 0; i < num_vertices; ++i)
+ add_vertex(static_cast<Derived&>(*this));
+ }
+ template <class EdgeIterator>
+ inline adj_list_impl(vertices_size_type num_vertices,
+ EdgeIterator first, EdgeIterator last)
+ {
+ vertex_descriptor* v = new vertex_descriptor[num_vertices];
+ for (vertices_size_type i = 0; i < num_vertices; ++i)
+ v[i] = add_vertex(static_cast<Derived&>(*this));
+
+ while (first != last) {
+ add_edge(v[(*first).first], v[(*first).second], *this);
+ ++first;
+ }
+ delete [] v;
+ }
+ template <class EdgeIterator, class EdgePropertyIterator>
+ inline adj_list_impl(vertices_size_type num_vertices,
+ EdgeIterator first, EdgeIterator last,
+ EdgePropertyIterator ep_iter)
+ {
+ vertex_descriptor* v = new vertex_descriptor[num_vertices];
+ for (vertices_size_type i = 0; i < num_vertices; ++i)
+ v[i] = add_vertex(static_cast<Derived&>(*this));
+
+ while (first != last) {
+ add_edge(v[(*first).first], v[(*first).second], *ep_iter, *this);
+ ++first;
+ ++ep_iter;
+ }
+ delete [] v;
+ }
+ ~adj_list_impl() {
+ for (typename StoredVertexList::iterator i = m_vertices.begin();
+ i != m_vertices.end(); ++i)
+ delete (stored_vertex*)*i;
+ }
+ // protected:
+ inline OutEdgeList& out_edge_list(vertex_descriptor v) {
+ stored_vertex* sv = (stored_vertex*)v;
+ return sv->m_out_edges;
+ }
+ inline const OutEdgeList& out_edge_list(vertex_descriptor v) const {
+ stored_vertex* sv = (stored_vertex*)v;
+ return sv->m_out_edges;
+ }
+ inline StoredVertexList& vertex_set() { return m_vertices; }
+ inline const StoredVertexList& vertex_set() const { return m_vertices; }
+
+ inline void copy_impl(const adj_list_impl& x_)
+ {
+ const Derived& x = static_cast<const Derived&>(x_);
+
+ // Would be better to have a constant time way to get from
+ // vertices in x to the corresponding vertices in *this.
+ std::map<stored_vertex*,stored_vertex*> vertex_map;
+
+ // Copy the stored vertex objects by adding each vertex
+ // and copying its property object.
+ vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(x); vi != vi_end; ++vi) {
+ stored_vertex* v = (stored_vertex*)add_vertex(*this);
+ v->m_property = ((stored_vertex*)*vi)->m_property;
+ vertex_map[(stored_vertex*)*vi] = v;
+ }
+ // Copy the edges by adding each edge and copying its
+ // property object.
+ edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) {
+ edge_descriptor e;
+ bool inserted;
+ vertex_descriptor s = source(*ei,x), t = target(*ei,x);
+ boost::tie(e, inserted) = add_edge(vertex_map[(stored_vertex*)s],
+ vertex_map[(stored_vertex*)t], *this);
+ *((edge_property_type*)e.m_eproperty)
+ = *((edge_property_type*)(*ei).m_eproperty);
+ }
+ }
+
+
+ typename Config::EdgeContainer m_edges;
+ StoredVertexList m_vertices;
+ };
+
+ // O(1)
+ template <class Derived, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ add_vertex(adj_list_impl<Derived, Config, Base>& g_)
+ {
+ Derived& g = static_cast<Derived&>(g_);
+ typedef typename Config::stored_vertex stored_vertex;
+ stored_vertex* v = new stored_vertex;
+ typename Config::StoredVertexList::iterator pos;
+ bool inserted;
+ boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v);
+ v->m_position = pos;
+ g.added_vertex(v);
+ return v;
+ }
+ // O(1)
+ template <class Derived, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ add_vertex(const typename Config::vertex_property_type& p,
+ adj_list_impl<Derived, Config, Base>& g_)
+ {
+ typedef typename Config::vertex_descriptor vertex_descriptor;
+ Derived& g = static_cast<Derived&>(g_);
+ if (optional<vertex_descriptor> v
+ = g.vertex_by_property(get_property_value(p, vertex_bundle)))
+ return *v;
+
+ typedef typename Config::stored_vertex stored_vertex;
+ stored_vertex* v = new stored_vertex(p);
+ typename Config::StoredVertexList::iterator pos;
+ bool inserted;
+ boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v);
+ v->m_position = pos;
+ g.added_vertex(v);
+ return v;
+ }
+ // O(1)
+ template <class Derived, class Config, class Base>
+ inline void remove_vertex(typename Config::vertex_descriptor u,
+ adj_list_impl<Derived, Config, Base>& g_)
+ {
+ typedef typename Config::stored_vertex stored_vertex;
+ Derived& g = static_cast<Derived&>(g_);
+ g.removing_vertex(u);
+ stored_vertex* su = (stored_vertex*)u;
+ g.m_vertices.erase(su->m_position);
+ delete su;
+ }
+ // O(V)
+ template <class Derived, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ vertex(typename Config::vertices_size_type n,
+ const adj_list_impl<Derived, Config, Base>& g_)
+ {
+ const Derived& g = static_cast<const Derived&>(g_);
+ typename Config::vertex_iterator i = vertices(g).first;
+ while (n--) ++i; // std::advance(i, n); (not VC++ portable)
+ return *i;
+ }
+
+ //=========================================================================
+ // Vector-Backbone Adjacency List Implementation
+
+ namespace detail {
+
+ template <class Graph, class vertex_descriptor>
+ inline void
+ remove_vertex_dispatch(Graph& g, vertex_descriptor u,
+ boost::directed_tag)
+ {
+ typedef typename Graph::edge_parallel_category edge_parallel_category;
+ g.m_vertices.erase(g.m_vertices.begin() + u);
+ vertex_descriptor V = num_vertices(g);
+ if (u != V) {
+ for (vertex_descriptor v = 0; v < V; ++v)
+ reindex_edge_list(g.out_edge_list(v), u, edge_parallel_category());
+ }
+ }
+
+ template <class Graph, class vertex_descriptor>
+ inline void
+ remove_vertex_dispatch(Graph& g, vertex_descriptor u,
+ boost::undirected_tag)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Graph::edge_parallel_category edge_parallel_category;
+ g.m_vertices.erase(g.m_vertices.begin() + u);
+ vertex_descriptor V = num_vertices(g);
+ for (vertex_descriptor v = 0; v < V; ++v)
+ reindex_edge_list(g.out_edge_list(v), u,
+ edge_parallel_category());
+ typedef typename Graph::EdgeContainer Container;
+ typedef typename Container::iterator Iter;
+ Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end();
+ for (; ei != ei_end; ++ei) {
+ if (ei->m_source > u)
+ --ei->m_source;
+ if (ei->m_target > u)
+ --ei->m_target;
+ }
+ }
+ template <class Graph, class vertex_descriptor>
+ inline void
+ remove_vertex_dispatch(Graph& g, vertex_descriptor u,
+ boost::bidirectional_tag)
+ {
+ typedef typename Graph::global_edgelist_selector EdgeListS;
+ BOOST_STATIC_ASSERT((!is_same<EdgeListS, vecS>::value));
+
+ typedef typename Graph::edge_parallel_category edge_parallel_category;
+ g.m_vertices.erase(g.m_vertices.begin() + u);
+ vertex_descriptor V = num_vertices(g);
+ vertex_descriptor v;
+ if (u != V) {
+ for (v = 0; v < V; ++v)
+ reindex_edge_list(g.out_edge_list(v), u,
+ edge_parallel_category());
+ for (v = 0; v < V; ++v)
+ reindex_edge_list(in_edge_list(g, v), u,
+ edge_parallel_category());
+
+ typedef typename Graph::EdgeContainer Container;
+ typedef typename Container::iterator Iter;
+ Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end();
+ for (; ei != ei_end; ++ei) {
+ if (ei->m_source > u)
+ --ei->m_source;
+ if (ei->m_target > u)
+ --ei->m_target;
+ }
+ }
+ }
+
+ template <class EdgeList, class vertex_descriptor>
+ inline void
+ reindex_edge_list(EdgeList& el, vertex_descriptor u,
+ boost::allow_parallel_edge_tag)
+ {
+ typename EdgeList::iterator ei = el.begin(), e_end = el.end();
+ for (; ei != e_end; ++ei)
+ if ((*ei).get_target() > u)
+ --(*ei).get_target();
+ }
+ template <class EdgeList, class vertex_descriptor>
+ inline void
+ reindex_edge_list(EdgeList& el, vertex_descriptor u,
+ boost::disallow_parallel_edge_tag)
+ {
+ typename EdgeList::iterator ei = el.begin(), e_end = el.end();
+ while (ei != e_end) {
+ typename EdgeList::value_type ce = *ei;
+ ++ei;
+ if (ce.get_target() > u) {
+ el.erase(ce);
+ --ce.get_target();
+ el.insert(ce);
+ }
+ }
+ }
+ } // namespace detail
+
+ struct vec_adj_list_tag { };
+
+ template <class Graph, class Config, class Base>
+ class vec_adj_list_impl
+ : public adj_list_helper<Config, Base>
+ {
+ typedef typename Config::OutEdgeList OutEdgeList;
+ typedef typename Config::InEdgeList InEdgeList;
+ typedef typename Config::StoredVertexList StoredVertexList;
+ public:
+ typedef typename Config::vertex_descriptor vertex_descriptor;
+ typedef typename Config::edge_descriptor edge_descriptor;
+ typedef typename Config::out_edge_iterator out_edge_iterator;
+ typedef typename Config::edge_iterator edge_iterator;
+ typedef typename Config::directed_category directed_category;
+ typedef typename Config::vertices_size_type vertices_size_type;
+ typedef typename Config::edges_size_type edges_size_type;
+ typedef typename Config::degree_size_type degree_size_type;
+ typedef typename Config::StoredEdge StoredEdge;
+ typedef typename Config::stored_vertex stored_vertex;
+ typedef typename Config::EdgeContainer EdgeContainer;
+ typedef typename Config::edge_property_type edge_property_type;
+ typedef vec_adj_list_tag graph_tag;
+
+ static vertex_descriptor null_vertex()
+ {
+ return (std::numeric_limits<vertex_descriptor>::max)();
+ }
+
+ inline vec_adj_list_impl() { }
+
+ inline vec_adj_list_impl(const vec_adj_list_impl& x) {
+ copy_impl(x);
+ }
+ inline vec_adj_list_impl& operator=(const vec_adj_list_impl& x) {
+ this->clear();
+ copy_impl(x);
+ return *this;
+ }
+ inline void clear() {
+ m_vertices.clear();
+ m_edges.clear();
+ }
+
+ inline vec_adj_list_impl(vertices_size_type _num_vertices)
+ : m_vertices(_num_vertices) { }
+
+ template <class EdgeIterator>
+ inline vec_adj_list_impl(vertices_size_type num_vertices,
+ EdgeIterator first, EdgeIterator last)
+ : m_vertices(num_vertices)
+ {
+ while (first != last) {
+ add_edge((*first).first, (*first).second,
+ static_cast<Graph&>(*this));
+ ++first;
+ }
+ }
+ template <class EdgeIterator, class EdgePropertyIterator>
+ inline vec_adj_list_impl(vertices_size_type num_vertices,
+ EdgeIterator first, EdgeIterator last,
+ EdgePropertyIterator ep_iter)
+ : m_vertices(num_vertices)
+ {
+ while (first != last) {
+ add_edge((*first).first, (*first).second, *ep_iter,
+ static_cast<Graph&>(*this));
+ ++first;
+ ++ep_iter;
+ }
+ }
+
+ // protected:
+ inline boost::integer_range<vertex_descriptor> vertex_set() const {
+ return boost::integer_range<vertex_descriptor>(0, m_vertices.size());
+ }
+ inline OutEdgeList& out_edge_list(vertex_descriptor v) {
+ return m_vertices[v].m_out_edges;
+ }
+ inline const OutEdgeList& out_edge_list(vertex_descriptor v) const {
+ return m_vertices[v].m_out_edges;
+ }
+ inline void copy_impl(const vec_adj_list_impl& x_)
+ {
+ const Graph& x = static_cast<const Graph&>(x_);
+ // Copy the stored vertex objects by adding each vertex
+ // and copying its property object.
+ for (vertices_size_type i = 0; i < num_vertices(x); ++i) {
+ vertex_descriptor v = add_vertex(*this);
+ m_vertices[v].m_property = x.m_vertices[i].m_property;
+ }
+ // Copy the edges by adding each edge and copying its
+ // property object.
+ edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) {
+ edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted) = add_edge(source(*ei,x), target(*ei,x) , *this);
+ *((edge_property_type*)e.m_eproperty)
+ = *((edge_property_type*)(*ei).m_eproperty);
+ }
+ }
+ typename Config::EdgeContainer m_edges;
+ StoredVertexList m_vertices;
+ };
+ // Had to make these non-members to avoid accidental instantiation
+ // on SGI MIPSpro C++
+ template <class G, class C, class B>
+ inline typename C::InEdgeList&
+ in_edge_list(vec_adj_list_impl<G,C,B>& g,
+ typename C::vertex_descriptor v) {
+ return g.m_vertices[v].m_in_edges;
+ }
+ template <class G, class C, class B>
+ inline const typename C::InEdgeList&
+ in_edge_list(const vec_adj_list_impl<G,C,B>& g,
+ typename C::vertex_descriptor v) {
+ return g.m_vertices[v].m_in_edges;
+ }
+
+ // O(1)
+ template <class Graph, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ add_vertex(vec_adj_list_impl<Graph, Config, Base>& g_) {
+ Graph& g = static_cast<Graph&>(g_);
+ g.m_vertices.resize(g.m_vertices.size() + 1);
+ g.added_vertex(g.m_vertices.size() - 1);
+ return g.m_vertices.size() - 1;
+ }
+
+ template <class Graph, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ add_vertex(const typename Config::vertex_property_type& p,
+ vec_adj_list_impl<Graph, Config, Base>& g_) {
+ typedef typename Config::vertex_descriptor vertex_descriptor;
+ Graph& g = static_cast<Graph&>(g_);
+ if (optional<vertex_descriptor> v
+ = g.vertex_by_property(get_property_value(p, vertex_bundle)))
+ return *v;
+ typedef typename Config::stored_vertex stored_vertex;
+ g.m_vertices.push_back(stored_vertex(p));
+ g.added_vertex(g.m_vertices.size() - 1);
+ return g.m_vertices.size() - 1;
+ }
+
+ // Here we override the directed_graph_helper add_edge() function
+ // so that the number of vertices is automatically changed if
+ // either u or v is greater than the number of vertices.
+ template <class Graph, class Config, class Base>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ const typename Config::edge_property_type& p,
+ vec_adj_list_impl<Graph, Config, Base>& g_)
+ {
+ BOOST_USING_STD_MAX();
+ typename Config::vertex_descriptor x = max BOOST_PREVENT_MACRO_SUBSTITUTION(u, v);
+ if (x >= num_vertices(g_))
+ g_.m_vertices.resize(x + 1);
+ adj_list_helper<Config, Base>& g = g_;
+ return add_edge(u, v, p, g);
+ }
+ template <class Graph, class Config, class Base>
+ inline std::pair<typename Config::edge_descriptor, bool>
+ add_edge(typename Config::vertex_descriptor u,
+ typename Config::vertex_descriptor v,
+ vec_adj_list_impl<Graph, Config, Base>& g_)
+ {
+ typename Config::edge_property_type p;
+ return add_edge(u, v, p, g_);
+ }
+
+
+ // O(V + E)
+ template <class Graph, class Config, class Base>
+ inline void remove_vertex(typename Config::vertex_descriptor v,
+ vec_adj_list_impl<Graph, Config, Base>& g_)
+ {
+ typedef typename Config::directed_category Cat;
+ Graph& g = static_cast<Graph&>(g_);
+ g.removing_vertex(v);
+ detail::remove_vertex_dispatch(g, v, Cat());
+ }
+ // O(1)
+ template <class Graph, class Config, class Base>
+ inline typename Config::vertex_descriptor
+ vertex(typename Config::vertices_size_type n,
+ const vec_adj_list_impl<Graph, Config, Base>&)
+ {
+ return n;
+ }
+
+
+ namespace detail {
+
+ //=========================================================================
+ // Adjacency List Generator
+
+ template <class Graph, class VertexListS, class OutEdgeListS,
+ class DirectedS, class VertexProperty, class EdgeProperty,
+ class GraphProperty, class EdgeListS>
+ struct adj_list_gen
+ {
+ typedef typename is_random_access_selector<VertexListS>::type
+ is_rand_access;
+ typedef typename has_property<EdgeProperty>::type has_edge_property;
+ typedef typename DirectedS::is_directed_t DirectedT;
+ typedef typename DirectedS::is_bidir_t BidirectionalT;
+
+ struct config
+ {
+ typedef OutEdgeListS edgelist_selector;
+ typedef EdgeListS global_edgelist_selector;
+
+ typedef Graph graph_type;
+ typedef EdgeProperty edge_property_type;
+ typedef VertexProperty vertex_property_type;
+ typedef GraphProperty graph_property_type;
+ typedef std::size_t vertices_size_type;
+
+ typedef adjacency_list_traits<OutEdgeListS, VertexListS, DirectedS>
+ Traits;
+
+ typedef typename Traits::directed_category directed_category;
+ typedef typename Traits::edge_parallel_category edge_parallel_category;
+ typedef typename Traits::vertex_descriptor vertex_descriptor;
+ typedef typename Traits::edge_descriptor edge_descriptor;
+
+ typedef void* vertex_ptr;
+
+ // need to reorganize this to avoid instantiating stuff
+ // that doesn't get used -JGS
+
+ // VertexList and vertex_iterator
+ typedef typename container_gen<VertexListS,
+ vertex_ptr>::type SeqVertexList;
+ typedef boost::integer_range<vertex_descriptor> RandVertexList;
+ typedef typename mpl::if_<is_rand_access,
+ RandVertexList, SeqVertexList>::type VertexList;
+
+ typedef typename VertexList::iterator vertex_iterator;
+
+ // EdgeContainer and StoredEdge
+
+ typedef typename container_gen<EdgeListS,
+ list_edge<vertex_descriptor, EdgeProperty> >::type EdgeContainer;
+
+ typedef typename mpl::and_<DirectedT,
+ typename mpl::not_<BidirectionalT>::type >::type on_edge_storage;
+
+ typedef typename mpl::if_<on_edge_storage,
+ std::size_t, typename EdgeContainer::size_type
+ >::type edges_size_type;
+
+ typedef typename EdgeContainer::iterator EdgeIter;
+
+ typedef typename is_random_access_selector<EdgeListS>::type is_edge_ra;
+
+ typedef typename mpl::if_<on_edge_storage,
+ stored_edge_property<vertex_descriptor, EdgeProperty>,
+ typename mpl::if_<is_edge_ra,
+ stored_ra_edge_iter<vertex_descriptor, EdgeContainer, EdgeProperty>,
+ stored_edge_iter<vertex_descriptor, EdgeIter, EdgeProperty>
+ >::type
+ >::type StoredEdge;
+
+ // Adjacency Types
+
+ typedef typename container_gen<OutEdgeListS, StoredEdge>::type
+ OutEdgeList;
+ typedef typename OutEdgeList::size_type degree_size_type;
+ typedef typename OutEdgeList::iterator OutEdgeIter;
+
+ typedef boost::detail::iterator_traits<OutEdgeIter> OutEdgeIterTraits;
+ typedef typename OutEdgeIterTraits::iterator_category OutEdgeIterCat;
+ typedef typename OutEdgeIterTraits::difference_type OutEdgeIterDiff;
+
+ typedef out_edge_iter<
+ OutEdgeIter, vertex_descriptor, edge_descriptor, OutEdgeIterDiff
+ > out_edge_iterator;
+
+ typedef typename adjacency_iterator_generator<graph_type,
+ vertex_descriptor, out_edge_iterator>::type adjacency_iterator;
+
+ typedef OutEdgeList InEdgeList;
+ typedef OutEdgeIter InEdgeIter;
+ typedef OutEdgeIterCat InEdgeIterCat;
+ typedef OutEdgeIterDiff InEdgeIterDiff;
+
+ typedef in_edge_iter<
+ InEdgeIter, vertex_descriptor, edge_descriptor, InEdgeIterDiff
+ > in_edge_iterator;
+
+ typedef typename inv_adjacency_iterator_generator<graph_type,
+ vertex_descriptor, in_edge_iterator>::type inv_adjacency_iterator;
+
+ // Edge Iterator
+
+ typedef boost::detail::iterator_traits<EdgeIter> EdgeIterTraits;
+ typedef typename EdgeIterTraits::iterator_category EdgeIterCat;
+ typedef typename EdgeIterTraits::difference_type EdgeIterDiff;
+
+ typedef undirected_edge_iter<
+ EdgeIter
+ , edge_descriptor
+ , EdgeIterDiff
+ > UndirectedEdgeIter; // also used for bidirectional
+
+ typedef adj_list_edge_iterator<vertex_iterator, out_edge_iterator,
+ graph_type> DirectedEdgeIter;
+
+ typedef typename mpl::if_<on_edge_storage,
+ DirectedEdgeIter, UndirectedEdgeIter>::type edge_iterator;
+
+ // stored_vertex and StoredVertexList
+ typedef typename container_gen<VertexListS, vertex_ptr>::type
+ SeqStoredVertexList;
+ struct seq_stored_vertex {
+ seq_stored_vertex() { }
+ seq_stored_vertex(const VertexProperty& p) : m_property(p) { }
+ OutEdgeList m_out_edges;
+ VertexProperty m_property;
+ typename SeqStoredVertexList::iterator m_position;
+ };
+ struct bidir_seq_stored_vertex {
+ bidir_seq_stored_vertex() { }
+ bidir_seq_stored_vertex(const VertexProperty& p) : m_property(p) { }
+ OutEdgeList m_out_edges;
+ InEdgeList m_in_edges;
+ VertexProperty m_property;
+ typename SeqStoredVertexList::iterator m_position;
+ };
+ struct rand_stored_vertex {
+ rand_stored_vertex() { }
+ rand_stored_vertex(const VertexProperty& p) : m_property(p) { }
+ OutEdgeList m_out_edges;
+ VertexProperty m_property;
+ };
+ struct bidir_rand_stored_vertex {
+ bidir_rand_stored_vertex() { }
+ bidir_rand_stored_vertex(const VertexProperty& p) : m_property(p) { }
+ OutEdgeList m_out_edges;
+ InEdgeList m_in_edges;
+ VertexProperty m_property;
+ };
+ typedef typename mpl::if_<is_rand_access,
+ typename mpl::if_<BidirectionalT,
+ bidir_rand_stored_vertex, rand_stored_vertex>::type,
+ typename mpl::if_<BidirectionalT,
+ bidir_seq_stored_vertex, seq_stored_vertex>::type
+ >::type StoredVertex;
+ struct stored_vertex : public StoredVertex {
+ stored_vertex() { }
+ stored_vertex(const VertexProperty& p) : StoredVertex(p) { }
+ };
+
+ typedef typename container_gen<VertexListS, stored_vertex>::type
+ RandStoredVertexList;
+ typedef typename mpl::if_< is_rand_access,
+ RandStoredVertexList, SeqStoredVertexList>::type StoredVertexList;
+ }; // end of config
+
+
+ typedef typename mpl::if_<BidirectionalT,
+ bidirectional_graph_helper_with_property<config>,
+ typename mpl::if_<DirectedT,
+ directed_graph_helper<config>,
+ undirected_graph_helper<config>
+ >::type
+ >::type DirectedHelper;
+
+ typedef typename mpl::if_<is_rand_access,
+ vec_adj_list_impl<Graph, config, DirectedHelper>,
+ adj_list_impl<Graph, config, DirectedHelper>
+ >::type type;
+
+ };
+
+ } // namespace detail
+
+ //=========================================================================
+ // Vertex Property Maps
+
+ template <class Graph, class ValueType, class Reference, class Tag>
+ struct adj_list_vertex_property_map
+ : public boost::put_get_helper<
+ Reference,
+ adj_list_vertex_property_map<Graph, ValueType, Reference, Tag>
+ >
+ {
+ typedef typename Graph::stored_vertex StoredVertex;
+ typedef ValueType value_type;
+ typedef Reference reference;
+ typedef typename Graph::vertex_descriptor key_type;
+ typedef boost::lvalue_property_map_tag category;
+ inline adj_list_vertex_property_map() { }
+ inline adj_list_vertex_property_map(const Graph*) { }
+ inline Reference operator[](key_type v) const {
+ StoredVertex* sv = (StoredVertex*)v;
+ return get_property_value(sv->m_property, Tag());
+ }
+ inline Reference operator()(key_type v) const {
+ return this->operator[](v);
+ }
+ };
+
+ template <class Graph, class Property, class PropRef>
+ struct adj_list_vertex_all_properties_map
+ : public boost::put_get_helper<PropRef,
+ adj_list_vertex_all_properties_map<Graph, Property, PropRef>
+ >
+ {
+ typedef typename Graph::stored_vertex StoredVertex;
+ typedef Property value_type;
+ typedef PropRef reference;
+ typedef typename Graph::vertex_descriptor key_type;
+ typedef boost::lvalue_property_map_tag category;
+ inline adj_list_vertex_all_properties_map() { }
+ inline adj_list_vertex_all_properties_map(const Graph*) { }
+ inline PropRef operator[](key_type v) const {
+ StoredVertex* sv = (StoredVertex*)v;
+ return sv->m_property;
+ }
+ inline PropRef operator()(key_type v) const {
+ return this->operator[](v);
+ }
+ };
+
+ template <class Graph, class GraphPtr, class ValueType, class Reference,
+ class Tag>
+ struct vec_adj_list_vertex_property_map
+ : public boost::put_get_helper<
+ Reference,
+ vec_adj_list_vertex_property_map<Graph,GraphPtr,ValueType,Reference,
+ Tag>
+ >
+ {
+ typedef ValueType value_type;
+ typedef Reference reference;
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor key_type;
+ typedef boost::lvalue_property_map_tag category;
+ vec_adj_list_vertex_property_map() { }
+ vec_adj_list_vertex_property_map(GraphPtr g) : m_g(g) { }
+ inline Reference operator[](key_type v) const {
+ return get_property_value(m_g->m_vertices[v].m_property, Tag());
+ }
+ inline Reference operator()(key_type v) const {
+ return this->operator[](v);
+ }
+ GraphPtr m_g;
+ };
+
+ template <class Graph, class GraphPtr, class Property, class PropertyRef>
+ struct vec_adj_list_vertex_all_properties_map
+ : public boost::put_get_helper<PropertyRef,
+ vec_adj_list_vertex_all_properties_map<Graph,GraphPtr,Property,
+ PropertyRef>
+ >
+ {
+ typedef Property value_type;
+ typedef PropertyRef reference;
+ typedef typename boost::graph_traits<Graph>::vertex_descriptor key_type;
+ typedef boost::lvalue_property_map_tag category;
+ vec_adj_list_vertex_all_properties_map() { }
+ vec_adj_list_vertex_all_properties_map(GraphPtr g) : m_g(g) { }
+ inline PropertyRef operator[](key_type v) const {
+ return m_g->m_vertices[v].m_property;
+ }
+ inline PropertyRef operator()(key_type v) const {
+ return this->operator[](v);
+ }
+ GraphPtr m_g;
+ };
+
+ struct adj_list_any_vertex_pa {
+ template <class Tag, class Graph, class Property>
+ struct bind_ {
+ typedef typename property_value<Property, Tag>::type value_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ typedef adj_list_vertex_property_map
+ <Graph, value_type, reference, Tag> type;
+ typedef adj_list_vertex_property_map
+ <Graph, value_type, const_reference, Tag> const_type;
+ };
+ };
+ struct adj_list_all_vertex_pa {
+ template <class Tag, class Graph, class Property>
+ struct bind_ {
+ typedef typename Graph::vertex_descriptor Vertex;
+ typedef adj_list_vertex_all_properties_map<Graph,Property,
+ Property&> type;
+ typedef adj_list_vertex_all_properties_map<Graph,Property,
+ const Property&> const_type;
+ };
+ };
+
+ template <class Property, class Vertex>
+ struct vec_adj_list_vertex_id_map
+ : public boost::put_get_helper<
+ Vertex, vec_adj_list_vertex_id_map<Property, Vertex>
+ >
+ {
+ typedef Vertex value_type;
+ typedef Vertex key_type;
+ typedef Vertex reference;
+ typedef boost::readable_property_map_tag category;
+ inline vec_adj_list_vertex_id_map() { }
+ template <class Graph>
+ inline vec_adj_list_vertex_id_map(const Graph&) { }
+ inline value_type operator[](key_type v) const { return v; }
+ inline value_type operator()(key_type v) const { return v; }
+ };
+
+ struct vec_adj_list_any_vertex_pa {
+ template <class Tag, class Graph, class Property>
+ struct bind_ {
+ typedef typename property_value<Property, Tag>::type value_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ typedef vec_adj_list_vertex_property_map
+ <Graph, Graph*, value_type, reference, Tag> type;
+ typedef vec_adj_list_vertex_property_map
+ <Graph, const Graph*, value_type, const_reference, Tag> const_type;
+ };
+ };
+ struct vec_adj_list_id_vertex_pa {
+ template <class Tag, class Graph, class Property>
+ struct bind_ {
+ typedef typename Graph::vertex_descriptor Vertex;
+ typedef vec_adj_list_vertex_id_map<Property, Vertex> type;
+ typedef vec_adj_list_vertex_id_map<Property, Vertex> const_type;
+ };
+ };
+ struct vec_adj_list_all_vertex_pa {
+ template <class Tag, class Graph, class Property>
+ struct bind_ {
+ typedef typename Graph::vertex_descriptor Vertex;
+ typedef vec_adj_list_vertex_all_properties_map
+ <Graph, Graph*, Property, Property&> type;
+ typedef vec_adj_list_vertex_all_properties_map
+ <Graph, const Graph*, Property, const Property&> const_type;
+ };
+ };
+ namespace detail {
+ template <class Tag>
+ struct adj_list_choose_vertex_pa_helper {
+ typedef adj_list_any_vertex_pa type;
+ };
+ template <>
+ struct adj_list_choose_vertex_pa_helper<vertex_all_t> {
+ typedef adj_list_all_vertex_pa type;
+ };
+ template <class Tag, class Graph, class Property>
+ struct adj_list_choose_vertex_pa {
+ typedef typename adj_list_choose_vertex_pa_helper<Tag>::type Helper;
+ typedef typename Helper::template bind_<Tag,Graph,Property> Bind;
+ typedef typename Bind::type type;
+ typedef typename Bind::const_type const_type;
+ };
+
+
+ template <class Tag>
+ struct vec_adj_list_choose_vertex_pa_helper {
+ typedef vec_adj_list_any_vertex_pa type;
+ };
+ template <>
+ struct vec_adj_list_choose_vertex_pa_helper<vertex_index_t> {
+ typedef vec_adj_list_id_vertex_pa type;
+ };
+ template <>
+ struct vec_adj_list_choose_vertex_pa_helper<vertex_all_t> {
+ typedef vec_adj_list_all_vertex_pa type;
+ };
+ template <class Tag, class Graph, class Property>
+ struct vec_adj_list_choose_vertex_pa {
+ typedef typename vec_adj_list_choose_vertex_pa_helper<Tag>::type Helper;
+ typedef typename Helper::template bind_<Tag,Graph,Property> Bind;
+ typedef typename Bind::type type;
+ typedef typename Bind::const_type const_type;
+ };
+ } // namespace detail
+
+ //=========================================================================
+ // Edge Property Map
+
+ template <class Directed, class Value, class Ref, class Vertex,
+ class Property, class Tag>
+ struct adj_list_edge_property_map
+ : public put_get_helper<
+ Ref,
+ adj_list_edge_property_map<Directed, Value, Ref, Vertex, Property,
+ Tag>
+ >
+ {
+ typedef Value value_type;
+ typedef Ref reference;
+ typedef detail::edge_desc_impl<Directed, Vertex> key_type;
+ typedef boost::lvalue_property_map_tag category;
+ inline Ref operator[](key_type e) const {
+ Property& p = *(Property*)e.get_property();
+ return get_property_value(p, Tag());
+ }
+ inline Ref operator()(key_type e) const {
+ return this->operator[](e);
+ }
+ };
+
+ template <class Directed, class Property, class PropRef, class PropPtr,
+ class Vertex>
+ struct adj_list_edge_all_properties_map
+ : public put_get_helper<PropRef,
+ adj_list_edge_all_properties_map<Directed, Property, PropRef,
+ PropPtr, Vertex>
+ >
+ {
+ typedef Property value_type;
+ typedef PropRef reference;
+ typedef detail::edge_desc_impl<Directed, Vertex> key_type;
+ typedef boost::lvalue_property_map_tag category;
+ inline PropRef operator[](key_type e) const {
+ return *(PropPtr)e.get_property();
+ }
+ inline PropRef operator()(key_type e) const {
+ return this->operator[](e);
+ }
+ };
+
+ // Edge Property Maps
+
+ namespace detail {
+ struct adj_list_any_edge_pmap {
+ template <class Graph, class Property, class Tag>
+ struct bind_ {
+ typedef typename property_value<Property,Tag>::type value_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ typedef adj_list_edge_property_map
+ <typename Graph::directed_category, value_type, reference,
+ typename Graph::vertex_descriptor,Property,Tag> type;
+ typedef adj_list_edge_property_map
+ <typename Graph::directed_category, value_type, const_reference,
+ typename Graph::vertex_descriptor,const Property, Tag> const_type;
+ };
+ };
+ struct adj_list_all_edge_pmap {
+ template <class Graph, class Property, class Tag>
+ struct bind_ {
+ typedef adj_list_edge_all_properties_map
+ <typename Graph::directed_category, Property, Property&, Property*,
+ typename Graph::vertex_descriptor> type;
+ typedef adj_list_edge_all_properties_map
+ <typename Graph::directed_category, Property, const Property&,
+ const Property*, typename Graph::vertex_descriptor> const_type;
+ };
+ };
+
+ template <class Tag>
+ struct adj_list_choose_edge_pmap_helper {
+ typedef adj_list_any_edge_pmap type;
+ };
+ template <>
+ struct adj_list_choose_edge_pmap_helper<edge_all_t> {
+ typedef adj_list_all_edge_pmap type;
+ };
+ template <class Tag, class Graph, class Property>
+ struct adj_list_choose_edge_pmap {
+ typedef typename adj_list_choose_edge_pmap_helper<Tag>::type Helper;
+ typedef typename Helper::template bind_<Graph,Property,Tag> Bind;
+ typedef typename Bind::type type;
+ typedef typename Bind::const_type const_type;
+ };
+ struct adj_list_edge_property_selector {
+ template <class Graph, class Property, class Tag>
+ struct bind_ {
+ typedef adj_list_choose_edge_pmap<Tag,Graph,Property> Choice;
+ typedef typename Choice::type type;
+ typedef typename Choice::const_type const_type;
+ };
+ };
+ } // namespace detail
+
+ template <>
+ struct edge_property_selector<adj_list_tag> {
+ typedef detail::adj_list_edge_property_selector type;
+ };
+ template <>
+ struct edge_property_selector<vec_adj_list_tag> {
+ typedef detail::adj_list_edge_property_selector type;
+ };
+
+ // Vertex Property Maps
+
+ struct adj_list_vertex_property_selector {
+ template <class Graph, class Property, class Tag>
+ struct bind_ {
+ typedef detail::adj_list_choose_vertex_pa<Tag,Graph,Property> Choice;
+ typedef typename Choice::type type;
+ typedef typename Choice::const_type const_type;
+ };
+ };
+ template <>
+ struct vertex_property_selector<adj_list_tag> {
+ typedef adj_list_vertex_property_selector type;
+ };
+
+ struct vec_adj_list_vertex_property_selector {
+ template <class Graph, class Property, class Tag>
+ struct bind_ {
+ typedef detail::vec_adj_list_choose_vertex_pa<Tag,Graph,Property> Choice;
+ typedef typename Choice::type type;
+ typedef typename Choice::const_type const_type;
+ };
+ };
+ template <>
+ struct vertex_property_selector<vec_adj_list_tag> {
+ typedef vec_adj_list_vertex_property_selector type;
+ };
+
+} // namespace boost
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace boost {
+
+ #if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 )
+ // STLport 5 already defines a hash<void*> specialization.
+ #else
+ template <>
+ struct hash< void* > // Need this when vertex_descriptor=void*
+ {
+ std::size_t
+ operator()(void* v) const { return (std::size_t)v; }
+ };
+ #endif
+
+ template <typename V>
+ struct hash< boost::detail::stored_edge<V> >
+ {
+ std::size_t
+ operator()(const boost::detail::stored_edge<V>& e) const
+ {
+ return hash<V>()(e.m_target);
+ }
+ };
+
+ template <typename V, typename P>
+ struct hash< boost::detail::stored_edge_property <V,P> >
+ {
+ std::size_t
+ operator()(const boost::detail::stored_edge_property<V,P>& e) const
+ {
+ return hash<V>()(e.m_target);
+ }
+ };
+
+ template <typename V, typename I, typename P>
+ struct hash< boost::detail::stored_edge_iter<V,I, P> >
+ {
+ std::size_t
+ operator()(const boost::detail::stored_edge_iter<V,I,P>& e) const
+ {
+ return hash<V>()(e.m_target);
+ }
+ };
+
+}
+#endif
+
+
+#undef stored_edge
+#undef stored_edge_property
+#undef stored_edge_iter
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+// Stay out of the way of the concept checking class
+#undef Graph
+#endif
+
+#endif // BOOST_GRAPH_DETAIL_DETAIL_ADJACENCY_LIST_CCT
+
+/*
+ Implementation Notes:
+
+ Many of the public interface functions in this file would have been
+ more conveniently implemented as inline friend functions.
+ However there are a few compiler bugs that make that approach
+ non-portable.
+
+ 1. g++ inline friend in namespace bug
+ 2. g++ using clause doesn't work with inline friends
+ 3. VC++ doesn't have Koenig lookup
+
+ For these reasons, the functions were all written as non-inline free
+ functions, and static cast was used to convert from the helper
+ class to the adjacency_list derived class.
+
+ Looking back, it might have been better to write out all functions
+ in terms of the adjacency_list, and then use a tag to dispatch
+ to the various helpers instead of using inheritance.
+
+ */

Added: sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,275 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+
+#include <set>
+#include <map>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/tr1/unordered_map.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/utility/container_selector.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+
+namespace boost {
+
+ //[reference__associative_container_gen
+ template <typename Selector>
+ struct associative_container_gen
+ {
+//<-
+#if 0
+//->
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ // typedef ... type;
+ };
+//<-
+#endif
+//->
+ };
+ //]
+
+ template <>
+ struct associative_container_gen<setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key,::boost::detail::range_less>
+ , ::std::map<Key,Mapped,::boost::detail::range_less>
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key,::boost::detail::range_less>
+ , ::std::map<Key,Mapped,::boost::detail::range_less>
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key,::boost::detail::range_less>
+ , ::std::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key,::boost::detail::range_less>
+ , ::std::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key>
+ , ::std::tr1::unordered_map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key>
+ , ::std::tr1::unordered_map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<Key>
+ , ::std::tr1::unordered_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<Key>
+ , ::std::tr1::unordered_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+} // namespace boost
+
+#endif // BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/container_gen.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,224 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011 Cromwell D. Enage
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole,
+// Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/utility/container_selector.hpp>
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/mpl/if.hpp>
+
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+
+//[reference__container_gen__list_specialization
+namespace boost {
+
+ //<-
+ template <typename Selector, typename ValueType>
+ struct container_gen
+ {
+ };
+ //->
+
+ template <typename ValueType>
+ struct container_gen<listS,ValueType>
+ {
+ typedef ::std::list<ValueType> type;
+ };
+
+ //<-
+#if !defined BOOST_NO_SLIST
+ template <typename ValueType>
+ struct container_gen<slistS,ValueType>
+ {
+ typedef ::BOOST_STD_EXTENSION_NAMESPACE::slist<ValueType> type;
+ };
+#endif
+
+ template <typename ValueType>
+ struct container_gen<vecS,ValueType>
+ {
+ typedef ::std::vector<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<dequeS,ValueType>
+ {
+ typedef ::std::deque<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ //->
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //===========================================================================
+ // The main container_gen traits class uses partial specialization,
+ // so we also include a workaround.
+ //===========================================================================
+
+//[reference__container_gen
+namespace boost {
+
+ template <typename Selector, typename ValueType>
+ struct container_gen
+ {
+ //<-
+ typedef typename container_selector<Selector>::type
+ Select;
+ typedef typename Select::BOOST_NESTED_TEMPLATE bind_<ValueType>::type
+ type;
+ //->
+ // typedef .... type;
+ };
+} // namespace boost
+//]
+
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/container_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/container_selector.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,279 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011 Cromwell D. Enage
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole,
+// Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+ //===========================================================================
+ // Selectors for the VertexList and EdgeList template parameters of
+ // adjacency_list, and the container_gen traits class which is used
+ // to map the selectors to the container type used to implement the
+ // graph.
+ //===========================================================================
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+//[reference__container_selectors
+namespace boost {
+
+#if !defined BOOST_NO_SLIST
+ struct slistS { };
+#endif
+
+ struct vecS { };
+ struct dequeS { };
+ struct listS { };
+ struct setS { };
+ struct mapS { };
+ struct multisetS { };
+ struct multimapS { };
+ struct hash_setS { };
+ struct hash_mapS { };
+ struct hash_multisetS { };
+ struct hash_multimapS { };
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/mpl/if.hpp>
+
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+
+namespace boost {
+
+#if !defined BOOST_NO_SLIST
+ struct slistS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::BOOST_STD_EXTENSION_NAMESPACE::slist<T> type;
+ };
+ };
+#endif
+
+ struct vecS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::vector<T> type;
+ };
+ };
+
+ struct dequeS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::deque<T> type;
+ };
+ };
+
+ struct listS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::list<T> type;
+ };
+ };
+
+ struct setS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::set<T,::boost::detail::range_less>
+ , ::std::set<T>
+ >::type
+ type;
+ };
+ };
+
+ struct mapS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::set<T,::boost::detail::range_less>
+ , ::std::set<T>
+ >::type
+ type;
+ };
+ };
+
+ struct multisetS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::multiset<T,::boost::detail::range_less>
+ , ::std::multiset<T>
+ >::type
+ type;
+ };
+ };
+
+ struct multimapS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::multiset<T,::boost::detail::range_less>
+ , ::std::multiset<T>
+ >::type
+ type;
+ };
+ };
+
+ struct hash_setS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ };
+
+ struct hash_mapS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ };
+
+ struct hash_multisetS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ };
+
+ struct hash_multimapS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <typename Selector>
+ struct container_selector
+ {
+ typedef vecS type;
+ };
+
+#define BOOST_CONTAINER_SELECTOR(NAME) \
+ template <> struct container_selector<NAME> { typedef NAME type; }
+
+ BOOST_CONTAINER_SELECTOR(vecS);
+ BOOST_CONTAINER_SELECTOR(dequeS);
+ BOOST_CONTAINER_SELECTOR(listS);
+ BOOST_CONTAINER_SELECTOR(setS);
+ BOOST_CONTAINER_SELECTOR(mapS);
+ BOOST_CONTAINER_SELECTOR(multisetS);
+ BOOST_CONTAINER_SELECTOR(multimapS);
+ BOOST_CONTAINER_SELECTOR(hash_setS);
+ BOOST_CONTAINER_SELECTOR(hash_mapS);
+#if !defined BOOST_NO_SLIST
+ BOOST_CONTAINER_SELECTOR(slistS);
+#endif
+
+#undef BOOST_CONTAINER_SELECTOR
+
+} // namespace boost
+
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,44 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_random_access_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_random_access_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_random_access_selector,(Selector))
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_random_access_selector<vecS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<dequeS> : ::boost::mpl::true_
+ {
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,56 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_unique_associative_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_unique_associative_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(
+ 1
+ , is_unique_associative_selector
+ , (Selector)
+ )
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_unique_associative_selector<setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<mapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<hash_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<hash_mapS> : ::boost::mpl::true_
+ {
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/libs/graph/example/container_gen.cpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/graph/example/container_gen.cpp 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,47 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <boost/utility/container_gen.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <list>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ALLOCATOR)
+
+//[example__container_gen__list_with_allocator_selector
+template <class Allocator>
+struct list_with_allocatorS { };
+
+namespace boost {
+ template <typename Alloc, typename ValueType>
+ struct container_gen<list_with_allocatorS<Alloc>,ValueType> {
+ typedef typename Alloc::template rebind<ValueType>::other Allocator;
+ typedef std::list<ValueType, Allocator> type;
+ };
+}
+
+// now you can define a graph using std::list and a specific allocator
+typedef boost::adjacency_list< list_with_allocatorS< std::allocator<int> >,
+ boost::vecS, boost::directedS> MyGraph;
+//]
+
+int main(int, char*[])
+{
+ MyGraph g(5);
+
+ return 0;
+}
+
+#else
+
+int main(int, char*[])
+{
+ return 0;
+}
+
+#endif

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/Jamroot
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/Jamroot 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,29 @@
+project html ;
+import boostbook : boostbook ;
+using quickbook ;
+
+xml container_gen
+ :
+ container_gen.qbk
+ ;
+boostbook standalone
+ :
+ container_gen
+ :
+ <xsl:param>admon.graphics.path=images/
+ <xsl:param>navig.graphics.path=images/
+ <xsl:param>boost.root=http://www.boost.org
+ <xsl:param>boost.libraries=http://www.boost.org/libs/libraries.htm
+ <xsl:param>boost.image.src=../../../../../boost.png
+ <xsl:param>boost.image.alt="C++ Boost"
+ <xsl:param>boost.image.w=277
+ <xsl:param>boost.image.h=86
+ <xsl:param>html.stylesheet=boostbook.css
+ <xsl:param>nav.layout=none
+ <xsl:param>chunk.section.depth=2
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>generate.section.toc.level=0
+ <xsl:param>toc.section.depth=0
+ <xsl:param>toc.max.depth=0
+ ;
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,74 @@
+[library container_gen
+ [quickbook 1.5]
+ [version 0.1]
+ [authors [Lumsdaine, Andrew][Lee, Lie-Quan][Claveirole, Thomas][Siek, Jeremy G.][Enage, Cromwell D.]]
+ [copyright 1997-2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole, Jeremy G. Siek, Cromwell D. Enage]
+ [purpose Collection of container-generating metafunctions]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[/ General concept links.]
+[def __Random_Access_Container__ [@http://www.sgi.com/tech/stl/RandomAccessContainer.html [*Random Access Container]]]
+[def __Associative_Container__ [@http://www.sgi.com/tech/stl/AssociativeContainer.html [*Associative Container]]]
+[def __Unique_Associative_Container__ [@http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html [*Unique Associative Container]]]
+
+[/ STL reference links.]
+[def __std_list__ [@http://www.sgi.com/tech/stl/List.html `std::list`]]
+[def _std_string_ [@http://www.sgi.com/tech/stl/basic_string.html std::string]]
+
+[/ Boost library links.]
+[def __Boost_Utility__ [@boost:libs/utility/index.html [*Boost.Utility]]]
+[def __BGL__ [@boost:libs/graph/doc/index.html BGL]]
+
+[/ Boost reference links.]
+[def _mpl_apply_wrap1_ [@boost:libs/mpl/doc/refmanual/apply-wrap.html boost::mpl::apply_wrap1]]
+[def _mpl_apply_wrap2_ [@boost:libs/mpl/doc/refmanual/apply-wrap.html boost::mpl::apply_wrap2]]
+[def __mpl_true__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`]]
+[def __mpl_false__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`]]
+[def __graph_adjacency_list__ [@boost:libs/graph/doc/adjacency_list.html `boost::adjacency_list`]]
+[def __graph_parallel_edge_traits__ [@boost:libs/graph/doc/using_adjacency_list.html#SECTION00834200000000000000 `boost::parallel_edge_traits`]]
+[def __raw_associative_node__ [@http://svn.boost.org/svn/boost/sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/raw_associative_node.html `raw_associative_node`]]
+[def __simple_associative_node__ [@http://svn.boost.org/svn/boost/sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/simple_associative_node.html `simple_associative_node`]]
+
+[/ Boost.Utility.ContainerGen reference header file links.]
+[def __boost_utility_container_selector_hpp__ [@../../../../../boost/utility/container_selector.hpp boost/utility/container_selector.hpp]]
+[def __boost_utility_is_random_access_selector_hpp__ [@../../../../../boost/utility/is_random_access_selector.hpp boost/utility/is_random_access_selector.hpp]]
+[def __boost_utility_is_unique_assoc_selector_hpp__ [@../../../../../boost/utility/is_unique_assoc_selector.hpp boost/utility/is_unique_assoc_selector.hpp]]
+[def __boost_utility_container_gen_hpp__ [@../../../../../boost/utility/container_gen.hpp boost/utility/container_gen.hpp]]
+[def __boost_utility_associative_container_gen_hpp__ [@../../../../../boost/utility/associative_container_gen.hpp boost/utility/associative_container_gen.hpp]]
+
+[/ Boost.Utility.ContainerGen reference links.]
+[def __container_gen__ [link container_gen.reference.container_gen `container_gen`]]
+[def _container_gen_ [link container_gen.reference.container_gen container_gen]]
+[def __associative_container_gen__ [link container_gen.reference.associative_container_gen `associative_container_gen`]]
+[def _associative_container_gen_ [link container_gen.reference.associative_container_gen associative_container_gen]]
+[def __is_random_access_selector__ [link container_gen.reference.is_random_access_selector `is_random_access_selector`]]
+[def _is_random_access_selector_ [link container_gen.reference.is_random_access_selector is_random_access_selector]]
+[def __is_unique_associative_selector__ [link container_gen.reference.is_unique_associative_selector `is_unique_associative_selector`]]
+[def _is_unique_associative_selector_ [link container_gen.reference.is_unique_associative_selector is_unique_associative_selector]]
+
+[/ Autogenerate reference documentation directly from code.]
+[/ Bypass Doxygen.]
+[import ../../../../boost/utility/container_selector.hpp]
+[import ../../../../boost/utility/is_random_access_selector.hpp]
+[import ../../../../boost/utility/is_unique_assoc_selector.hpp]
+[import ../../../../boost/utility/container_gen.hpp]
+[import ../../../../boost/utility/associative_container_gen.hpp]
+[import ../../../../libs/graph/example/container_gen.cpp]
+
+[/ index.html Start]
+
+[heading Rationale]
+Significant interest was expressed in moving the `container_gen` metafunction
+from its current place in the __BGL__ to a more general residence such as
+__Boost_Utility__. The relevant discussion is archived here:
+[@http://lists.boost.org/Archives/boost/2011/05/181573.php].
+
+[/ index.html End]
+
+[include reference.qbk]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/boostbook.css 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,588 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 9pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 90%;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 9pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ /* Program listings in tables don't get borders */
+ td .programlisting,
+ td .screen
+ {
+ margin: 0pc 0pc 0pc 0pc;
+ padding: 0pc 0pc 0pc 0pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Copyright footer
+=============================================================================*/
+ .copyright-footer
+ {
+ text-align: right;
+ font-size: 70%;
+ }
+
+ .copyright-footer p
+ {
+ text-align: right;
+ font-size: 80%;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 80%;
+ line-height: 1.15;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ font-size: 9pt;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 80%;
+ }
+
+ table.simplelist
+ {
+ width: auto !important;
+ margin: 0em !important;
+ padding: 0em !important;
+ border: none !important;
+ }
+ table.simplelist td
+ {
+ margin: 0em !important;
+ padding: 0em !important;
+ text-align: left !important;
+ font-size: 9pt !important;
+ border: none !important;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 9pt; /* A little bit smaller than the main text */
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt,
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+ div.variablelist dl dt
+ {
+ margin-bottom: 0.2em;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 0em 0em 0.5em 2em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p,
+ div.variablelist dl dd p
+ {
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ body {
+ background-color: #FFFFFF;
+ }
+
+ /* Links */
+ a
+ {
+ color: #005a9c;
+ }
+
+ a:visited
+ {
+ color: #9c5a9c;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #FFFFFF; }
+ .dk_grey_bkd { background-color: #999999; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #F0F0F0;
+ border: 1px solid #DCDCDC;
+ }
+
+ .copyright-footer
+ {
+ color: #8F8F8F;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid gray;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid gray;
+ border-collapse: collapse;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid gray;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid gray;
+ }
+
+ table.simplelist tr td
+ {
+ border: none !important;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }
+
+/*=============================================================================
+ Images
+=============================================================================*/
+
+ span.inlinemediaobject img
+ {
+ vertical-align: middle;
+ }
+
+/*==============================================================================
+ Super and Subscript: style so that line spacing isn't effected, see
+ http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
+==============================================================================*/
+
+sup,
+sub {
+ height: 0;
+ line-height: 1;
+ vertical-align: baseline;
+ _vertical-align: bottom;
+ position: relative;
+
+}
+
+sup {
+ bottom: 1ex;
+}
+
+sub {
+ top: .5ex;
+}
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="next" href="reference/container_gen.html" title="container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/container_gen.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="container_gen.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="reference/container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/associative_container_gen.html" title="associative_container_gen"><code class="computeroutput"><span class="identifier">associative_container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/is_random_access_selector.html" title="is_random_access_selector"><code class="computeroutput"><span class="identifier">is_random_access_selector</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/is_unique_associative_selector.html" title="is_unique_associative_selector"><code class="computeroutput"><span class="identifier">is_unique_associative_selector</span></code></a>
+</pre>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/container_gen.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,98 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>associative_container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="container_gen.html" title="container_gen">
+<link rel="next" href="is_random_access_selector.html" title="is_random_access_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_random_access_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.associative_container_gen"></a><a class="link" href="associative_container_gen.html" title="associative_container_gen"><code class="computeroutput"><span class="identifier">associative_container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.synopsis"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">associative_container_gen</span>
+<span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Mapped</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">apply</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef ... type;
+</span> <span class="special">};</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.description"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The raw_associative_node and simple_associative_node data
+ structures use this metafunction class to determine the storage type that
+ will associate key objects with child nodes. This library provides specializations
+ of this metafunction class for each selector it provides whose resulting
+ storage type models the Associative Container concept.
+ </p>
+<p>
+ It is possible to nest containers via <code class="computeroutput"><span class="identifier">associative_container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> boost::mpl::apply_wrap2<span class="special">&lt;</span>
+ <span class="identifier">associative_container_gen</span><span class="special">&lt;</span><span class="identifier">mapS</span><span class="special">&gt;</span>
+ <span class="special">,</span> boost::mpl::apply_wrap1<span class="special">&lt;</span><span class="identifier">associative_container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">&gt;,</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> std::string
+ <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">MapOfCharSets2Strings</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.definition"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/associative_container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_random_access_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,165 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="associative_container_gen.html" title="associative_container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.container_gen"></a><a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.synopsis"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef .... type;
+</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.description"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::adjacency_list class template
+ uses this metafunction to map the <code class="computeroutput"><span class="identifier">OutEdgeList</span></code>
+ and <code class="computeroutput"><span class="identifier">VertexList</span></code> selectors
+ to the actual container types used for the graph storage. This library
+ provides specializations of this metafunction for each selector it defines.
+ Here are the selector definitions:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+<span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span> <span class="identifier">BOOST_NO_SLIST</span>
+ <span class="keyword">struct</span> <span class="identifier">slistS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="keyword">struct</span> <span class="identifier">vecS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">dequeS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">listS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multimapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multimapS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ The specialization for the <code class="computeroutput"><span class="identifier">listS</span></code>
+ selector is shown here.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">listS</span><span class="special">,</span><span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ To use some other container of your choice, or to supply more template
+ arguments to a standard container than just <code class="computeroutput"><span class="identifier">ValueType</span></code>,
+ define a selector class and then specialize this metafunction for your
+ selector. In the code below we show how to create a selector that lets
+ you specify the allocator to be used with the std::list.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">list_with_allocatorS</span> <span class="special">{</span> <span class="special">};</span>
+
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">list_with_allocatorS</span><span class="special">&lt;</span><span class="identifier">Alloc</span><span class="special">&gt;,</span><span class="identifier">ValueType</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">rebind</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">&gt;::</span><span class="identifier">other</span> <span class="identifier">Allocator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}</span>
+
+<span class="comment">// now you can define a graph using std::list and a specific allocator
+</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adjacency_list</span><span class="special">&lt;</span> <span class="identifier">list_with_allocatorS</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">vecS</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">directedS</span><span class="special">&gt;</span> <span class="identifier">MyGraph</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ It is possible to nest containers via <code class="computeroutput"><span class="identifier">container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">SetOfSetsOfIntegers</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.definition"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,86 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>is_random_access_selector</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="associative_container_gen.html" title="associative_container_gen">
+<link rel="next" href="is_unique_associative_selector.html" title="is_unique_associative_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_unique_associative_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.is_random_access_selector"></a><a class="link" href="is_random_access_selector.html" title="is_random_access_selector"><code class="computeroutput"><span class="identifier">is_random_access_selector</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.synopsis"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_random_access_selector</span> <span class="special">:</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span>
+ <span class="special">{</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.description"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::adjacency_list class template
+ uses this metafunction to determine whether or not it will provide an internal
+ property map that associates its vertex descriptors with unique indices.
+ Returns boost::mpl::true_ if the storage type will
+ model the Random Access Container concept, boost::mpl::false_
+ otherwise.
+ </p>
+<p>
+ Specialize this metafunction to return boost::mpl::true_ for your custom selector
+ if and only if the storage type to be returned by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> models the Random Access Container concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.definition"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/is_random_access_selector.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_unique_associative_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,87 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>is_unique_associative_selector</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="is_random_access_selector.html" title="is_random_access_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="is_random_access_selector.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.is_unique_associative_selector"></a><a class="link" href="is_unique_associative_selector.html" title="is_unique_associative_selector"><code class="computeroutput"><span class="identifier">is_unique_associative_selector</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.synopsis"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_unique_associative_selector</span> <span class="special">:</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span>
+ <span class="special">{</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.description"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::parallel_edge_traits metafunction
+ uses this metafunction to specify whether or not the storage type returned
+ by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> will allow parallel
+ edges--that is, if the storage type will <span class="bold"><strong>not</strong></span>
+ model the Unique Associative Container concept. Returns
+ boost::mpl::true_
+ if the storage type <span class="bold"><strong>will</strong></span> model the Unique Associative Container concept, boost::mpl::false_
+ otherwise.
+ </p>
+<p>
+ Specialize this metafunction to return boost::mpl::true_ for your custom selector
+ if and only if the storage type to be returned by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> models the Unique Associative Container concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.definition"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/is_unique_assoc_selector.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="is_random_access_selector.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/next_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/prev_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/smiley.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/up_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;container_gen 0.1</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="next" href="container_gen/reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="container_gen/reference.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="container_gen"></a>Chapter&#160;1.&#160;container_gen 0.1</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Andrew</span> <span class="surname">Lumsdaine</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Lie-Quan</span> <span class="surname">Lee</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Thomas</span> <span class="surname">Claveirole</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Jeremy G.</span> <span class="surname">Siek</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Cromwell D.</span> <span class="surname">Enage</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage</p></div>
+<div><div class="legalnotice">
+<a name="idp13407328"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt><span class="section">Reference</span></dt></dl>
+</div>
+<a name="container_gen.rationale"></a><h3>
+<a name="idp13409504"></a>
+ <a class="link" href="index.html#container_gen.rationale">Rationale</a>
+ </h3>
+<p>
+ Significant interest was expressed in moving the <code class="computeroutput"><span class="identifier">container_gen</span></code>
+ metafunction from its current place in the BGL
+ to a more general residence such as Boost.Utility. The relevant discussion is archived
+ here: http://lists.boost.org/Archives/boost/2011/05/181573.php.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: September 16, 2011 at 07:25:59 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="container_gen/reference.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,41 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:associative_container_gen `associative_container_gen`]
+
+[section Synopsis]
+[reference__associative_container_gen]
+[endsect]
+
+[section Description]
+The __raw_associative_node__ and __simple_associative_node__ data structures
+use this metafunction class to determine the storage type that will associate
+key objects with child nodes. This library provides specializations of this
+metafunction class for each selector it provides whose resulting storage type
+models the __Associative_Container__ concept.
+
+It is possible to nest containers via `associative_container_gen`, e.g.:
+
+``
+typedef _mpl_apply_wrap2_<
+ associative_container_gen<mapS>
+ , _mpl_apply_wrap1_<associative_container_gen<setS>,char>::type
+ , _std_string_
+ >::type
+ MapOfCharSets2Strings;
+``
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_associative_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ associative_container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,51 @@
+[/=============================================================================
+ Copyright (C) 2000-2001 Jeremy G. Siek
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:container_gen `container_gen`]
+
+[section Synopsis]
+[reference__container_gen]
+[endsect]
+
+[section Description]
+The __graph_adjacency_list__ class template uses this metafunction to map the
+`OutEdgeList` and `VertexList` selectors to the actual container types used for
+the graph storage. This library provides specializations of this metafunction
+for each selector it defines. Here are the selector definitions:
+
+[reference__container_selectors]
+
+The specialization for the `listS` selector is shown here.
+
+[reference__container_gen__list_specialization]
+
+To use some other container of your choice, or to supply more template
+arguments to a standard container than just `ValueType`, define a selector
+class and then specialize this metafunction for your selector. In the code
+below we show how to create a selector that lets you specify the allocator
+to be used with the __std_list__.
+
+[example__container_gen__list_with_allocator_selector]
+
+It is possible to nest containers via `container_gen`, e.g.:
+
+``
+typedef container_gen<setS,container_gen<setS,int>::type>::type
+ SetOfSetsOfIntegers;
+``
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,34 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:is_random_access_selector `is_random_access_selector`]
+
+[section Synopsis]
+[reference__is_random_access_selector]
+[endsect]
+
+[section Description]
+The __graph_adjacency_list__ class template uses this metafunction to determine
+whether or not it will provide an internal property map that associates its
+vertex descriptors with unique indices. Returns __mpl_true__ if the storage
+type will model the __Random_Access_Container__ concept, __mpl_false__
+otherwise.
+
+Specialize this metafunction to return __mpl_true__ for your custom selector if
+and only if the storage type to be returned by __container_gen__ models the
+__Random_Access_Container__ concept.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_is_random_access_selector_hpp__>
+``
+[endsect]
+
+[endsect] [/ is_random_access_selector]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,35 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:is_unique_associative_selector `is_unique_associative_selector`]
+
+[section Synopsis]
+[reference__is_unique_associative_selector]
+[endsect]
+
+[section Description]
+The __graph_parallel_edge_traits__ metafunction uses this metafunction to
+specify whether or not the storage type returned by __container_gen__ will
+allow parallel edges--that is, if the storage type will *not* model the
+__Unique_Associative_Container__ concept. Returns __mpl_true__ if the storage
+type *will* model the __Unique_Associative_Container__ concept, __mpl_false__
+otherwise.
+
+Specialize this metafunction to return __mpl_true__ for your custom selector if
+and only if the storage type to be returned by __container_gen__ models the
+__Unique_Associative_Container__ concept.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_is_unique_assoc_selector_hpp__>
+``
+[endsect]
+
+[endsect] [/ is_unique_associative_selector]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk 2011-09-16 04:21:36 EDT (Fri, 16 Sep 2011)
@@ -0,0 +1,22 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section Reference]
+
+[include ref_container_gen.qbk]
+[include ref_assoc_container_gen.qbk]
+[include ref_is_rand_access_selector.qbk]
+[include ref_is_unique_assoc_sel.qbk]
+
+ * __container_gen__
+ * __associative_container_gen__
+ * __is_random_access_selector__
+ * __is_unique_associative_selector__
+
+[endsect] [/ Reference]
+


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