|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49021 - in sandbox/SOC/2006/tree/trunk/boost/tree: . detail/algorithm detail/algorithm/iterator detail/iterator
From: ockham_at_[hidden]
Date: 2008-09-29 14:16:06
Author: bernhard.reiter
Date: 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
New Revision: 49021
URL: http://svn.boost.org/trac/boost/changeset/49021
Log:
Re-arrange *order algorithms from namespaces to a policy(=template)-based mechanism, part 3.
Removed:
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp
Text files modified:
sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp | 6 +++---
sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp | 2 +-
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp | 14 ++++++++++++--
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp | 24 +++++++++++++++++-------
4 files changed, 33 insertions(+), 13 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
@@ -20,9 +20,9 @@
#include <boost/tree/detail/algorithm/cursor/preorder.hpp>
#include <boost/tree/detail/algorithm/cursor/inorder.hpp>
-#include <boost/tree/detail/algorithm/iterator/inorder.hpp>
-#include <boost/tree/detail/algorithm/iterator/preorder.hpp>
-#include <boost/tree/detail/algorithm/iterator/postorder.hpp>
+#include <boost/tree/detail/algorithm/iterator.hpp>
+#include <boost/tree/detail/algorithm/iterator.hpp>
+#include <boost/tree/detail/algorithm/iterator.hpp>
#include <algorithm>
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/binary_tree.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
@@ -14,7 +14,7 @@
#include <boost/tree/cursor.hpp>
#include <boost/tree/detail/algorithm/cursor/general.hpp>
-#include <boost/tree/detail/algorithm/iterator/inorder.hpp>
+#include <boost/tree/detail/algorithm/iterator.hpp>
#include <boost/tree/detail/node/traits.hpp>
#include <boost/tree/detail/cursor/nary.hpp>
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
@@ -14,12 +14,19 @@
#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
+#include <boost/tree/detail/algorithm/cursor/preorder.hpp>
+#include <boost/tree/detail/algorithm/cursor/inorder.hpp>
+#include <boost/tree/detail/algorithm/cursor/postorder.hpp>
+
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/enable_if.hpp>
// TODO: concept checks.
+namespace boost {
+namespace tree {
+
/**
* @brief First element of a subtree in traversal
* (equivalent to postorder::begin())
@@ -27,7 +34,7 @@
* @return Iterator to the first element of @a c
*/
template <class Order, class Cursor>
-iterator<Order, Cursor>
+iterator<Order, Cursor>
begin(Cursor c)
{
to_first(c);
@@ -64,4 +71,7 @@
return std::reverse_iterator< iterator<Order, Cursor> >(begin(c));
}
-#endif BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
\ No newline at end of file
+} // namespace tree
+} // namespace boost
+
+#endif //BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
\ No newline at end of file
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,32 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file inorder.hpp
- * Non-modifying hierarchy inorder range algorithms
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_INORDER_HPP
-#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_INORDER_HPP
-
-#include <boost/tree/detail/iterator/inorder.hpp>
-#include <boost/tree/detail/algorithm/cursor/inorder.hpp>
-
-namespace boost {
-namespace tree {
-
-namespace inorder {
-
-#include <boost/tree/detail/algorithm/iterator/_order.hpp>
-
-} // namespace inorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_INORDER_HPP
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,32 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file postorder.hpp
- * Non-modifying hierarchy postorder range algorithms
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_POSTORDER_HPP
-#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_POSTORDER_HPP
-
-#include <boost/tree/detail/iterator/postorder.hpp>
-#include <boost/tree/detail/algorithm/cursor/postorder.hpp>
-
-namespace boost {
-namespace tree {
-
-namespace postorder {
-
-#include <boost/tree/detail/algorithm/iterator/_order.hpp>
-
-} // namespace postorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_POSTORDER_HPP
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,32 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file preorder.hpp
- * Non-modifying hierarchy preorder range algorithms
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_PREORDER_HPP
-#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_PREORDER_HPP
-
-#include <boost/tree/detail/iterator/preorder.hpp>
-#include <boost/tree/detail/algorithm/cursor/preorder.hpp>
-
-namespace boost {
-namespace tree {
-
-namespace preorder {
-
-#include <boost/tree/detail/algorithm/iterator/_order.hpp>
-
-} // namespace preorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_PREORDER_HPP
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
@@ -4,25 +4,30 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-/** @file _order.hpp
+/** @file iterator.hpp
*
* Some definitions that are identical for all *order cursors (as we are just
* calling the appropriate traversal function that are defined in the
* respective *order.hpp files).
*/
-// TODO: concept checks.
-
-// NO guards, as this is context-included!
+#ifndef BOOST_TREE_DETAIL_ITERATOR_ITERATOR_HPP
+#define BOOST_TREE_DETAIL_ITERATOR_ITERATOR_HPP
//#include <boost/tree/cursor.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost {
+namespace tree {
+
/**
- * @brief Traversal order iterator adaptor
+ * @brief Traversal order iterator adaptor
*
- * Only works with ascending cursors.
+ * Only works with ascending cursors.
*/
-
template <class Order, class Cursor>
class iterator
: public boost::iterator_adaptor<iterator<Order, Cursor>
@@ -69,3 +74,8 @@
//BOOST_ASSERT(!this->base_reference().parity() || this->base_reference().is_root());
}
};
+
+} // namespace tree
+} // namespace boost
+
+#endif //BOOST_TREE_DETAIL_ITERATOR_ITERATOR_HPP
\ No newline at end of file
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,34 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file inorder_iterator.hpp
- * Inorder iterator wrapper around cursor.
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ITERATOR_INORDER_HPP
-#define BOOST_TREE_DETAIL_ITERATOR_INORDER_HPP
-
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
-
-
-namespace boost {
-namespace tree {
-
-namespace inorder {
-
-#include <boost/tree/detail/iterator/_order.hpp>
-
-} // namespace inorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ITERATOR_INORDER_HPP
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,34 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file postorder_iterator.hpp
- * Postorder iterator wrapper around cursor.
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ITERATOR_POSTORDER_HPP
-#define BOOST_TREE_DETAIL_ITERATOR_POSTORDER_HPP
-
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
-
-
-namespace boost {
-namespace tree {
-
-namespace postorder {
-
-#include <boost/tree/detail/iterator/_order.hpp>
-
-} // namespace postorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ITERATOR_POSTORDER_HPP
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp 2008-09-29 14:16:05 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,35 +0,0 @@
-// Copyright (c) 2006-2008, Bernhard Reiter
-//
-// 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)
-
-/**
- * @file preorder_iterator.hpp
- *
- * Preorder iterator wrapper around cursor.
- */
-
-// TODO: concept checks.
-
-#ifndef BOOST_TREE_DETAIL_ITERATOR_PREORDER_HPP
-#define BOOST_TREE_DETAIL_ITERATOR_PREORDER_HPP
-
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
-
-
-namespace boost {
-namespace tree {
-
-namespace preorder {
-
-#include <boost/tree/detail/iterator/_order.hpp>
-
-} // namespace preorder
-
-} // namespace tree
-} // namespace boost
-
-#endif // BOOST_TREE_DETAIL_ITERATOR_PREORDER_HPP
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