|
Boost-Commit : |
From: ockham_at_[hidden]
Date: 2008-06-08 11:26:10
Author: bernhard.reiter
Date: 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
New Revision: 46239
URL: http://svn.boost.org/trac/boost/changeset/46239
Log:
Rename bidirectional.hpp files to _order.hpp, which is more to the point.
Added:
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp
- copied, changed from r46238, /sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp
- copied, changed from r46238, /sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp
Removed:
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp
Text files modified:
sandbox/SOC/2006/tree/trunk/boost/tree/ascending_cursor.hpp | 6 +++---
sandbox/SOC/2006/tree/trunk/boost/tree/cursor_helpers.hpp | 2 --
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp | 19 +++++++++----------
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp | 2 +-
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp | 2 +-
sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp | 2 +-
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp | 38 +++++++++-----------------------------
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp | 8 +-------
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp | 4 +---
sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp | 5 ++---
10 files changed, 28 insertions(+), 60 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/ascending_cursor.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/ascending_cursor.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/ascending_cursor.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -43,15 +43,15 @@
// Cursor-specific
typedef ascending_cursor<Cursor> cursor;
- typedef ascending_cursor<Cursor const> const_cursor; // FIXME
+ typedef ascending_cursor<typename Cursor::const_cursor> const_cursor;
// Container-specific:
typedef cursor iterator;
typedef const_cursor const_iterator;
- template <class OtherValue>
+ template <class OtherCursor>
struct rebind {
- typedef ascending_cursor<OtherValue> other;
+ typedef ascending_cursor<OtherCursor> other;
};
ascending_cursor()
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/cursor_helpers.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/cursor_helpers.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/cursor_helpers.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -10,8 +10,6 @@
*/
// TODO: Use TR1 type_traits (integral_constant)
-// can we abstract the cursor stuff any further,
-// eventually producing cursor_adaptor?
#ifndef BOOST_TREE_CURSOR_HELPERS_HPP
#define BOOST_TREE_CURSOR_HELPERS_HPP
Copied: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp (from r46238, /sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp)
==============================================================================
--- /sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -4,22 +4,21 @@
// (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.
-
-// NO guards, as this is context-included!
-
-/** @file bidirectional.hpp
+/** @file _order.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).
*/
+// NO guards, as this is context-included!
+
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+// TODO: concept checks.
+
/**
* @brief First element of a subtree in traversal
* (equivalent to postorder::begin())
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/bidirectional.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
+++ (empty file)
@@ -1,63 +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.
-
-// NO guards, as this is context-included!
-
-/** @file bidirectional.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).
- */
-
-/**
- * @brief First element of a subtree in traversal
- * (equivalent to postorder::begin())
- * @param c A cursor
- * @return Iterator to the first element of @a c
- */
-template <class Cursor>
-iterator<Cursor>
-begin(Cursor c)
-{
- return iterator<Cursor>(first(c));
-}
-
-/**
- * @brief One position past the last element of a subtree
- * in traversal (Alias of cend())
- * @param c A cursor
- * @return Iterator one position past the last element of @a c
- */
-template <class Cursor>
-iterator<Cursor>
-end(Cursor c)
-{
- return iterator<Cursor>(last(c));
-}
-
-/// Reverse iterators
-
-template <class Cursor>
-std::reverse_iterator< iterator<Cursor> >
-rbegin(Cursor c)
-{
- return std::reverse_iterator< iterator<Cursor> >(end(c));
-}
-
-template <class Cursor>
-std::reverse_iterator< iterator<Cursor> >
-rend(Cursor c)
-{
- return std::reverse_iterator< iterator<Cursor> >(begin(c));
-}
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/inorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -22,7 +22,7 @@
namespace inorder {
-#include <boost/tree/detail/algorithm/iterator/bidirectional.hpp>
+#include <boost/tree/detail/algorithm/iterator/_order.hpp>
} // namespace inorder
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/postorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -22,7 +22,7 @@
namespace postorder {
-#include <boost/tree/detail/algorithm/iterator/bidirectional.hpp>
+#include <boost/tree/detail/algorithm/iterator/_order.hpp>
} // namespace postorder
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/preorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -22,7 +22,7 @@
namespace preorder {
-#include <boost/tree/detail/algorithm/iterator/bidirectional.hpp>
+#include <boost/tree/detail/algorithm/iterator/_order.hpp>
} // namespace preorder
Copied: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp (from r46238, /sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp)
==============================================================================
--- /sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/_order.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -4,41 +4,23 @@
// (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.
+/** @file _order.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_BIDIRECTIONAL_HPP
-//#define BOOST_TREE_DETAIL_ITERATOR_BIDIRECTIONAL_HPP
-
-
-//#include <boost/tree/detail/cursor/inorder.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 {
-//
-//namespace inorder {
-
-/** @file bidirectional.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).
- */
+//#include <boost/tree/cursor.hpp>
/**
- * @brief Specialisation for ascending cursors.
+ * @brief Traversal order iterator adaptor
+ *
+ * Only works with ascending cursors.
*/
template <class Cursor>
class iterator
@@ -84,5 +66,3 @@
back(this->base_reference());
}
};
-
-//#endif // BOOST_TREE_DETAIL_ITERATOR_BIDIRECTIONAL_HPP
Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/bidirectional.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
+++ (empty file)
@@ -1,88 +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.
-
-// NO guards, as this is context-included!
-
-//#ifndef BOOST_TREE_DETAIL_ITERATOR_BIDIRECTIONAL_HPP
-//#define BOOST_TREE_DETAIL_ITERATOR_BIDIRECTIONAL_HPP
-
-
-//#include <boost/tree/detail/cursor/inorder.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 {
-//
-//namespace inorder {
-
-/** @file bidirectional.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).
- */
-
-/**
- * @brief Specialisation for ascending cursors.
- */
-template <class Cursor>
-class iterator
- : public boost::iterator_adaptor<iterator<Cursor>
- , Cursor
- , boost::use_default
- , bidirectional_traversal_tag
- > {
- private:
- struct enabler {};
-
- public:
- iterator()
- : iterator::iterator_adaptor_() {}
-
- explicit iterator(Cursor p)
- : iterator::iterator_adaptor_(p) {}
-
- template <class OtherCursor>
- iterator(
- iterator<OtherCursor> const& other
- , typename boost::enable_if<
- boost::is_convertible<OtherCursor, Cursor>
- , enabler
- >::type = enabler()
- )
- : iterator::iterator_adaptor_(other.base()) {}
-
- operator Cursor()
- {
- return this->base();
- }
- private:
- friend class boost::iterator_core_access;
-
- void increment()
- {
- forward(this->base_reference());
- }
-
- void decrement()
- {
- back(this->base_reference());
- }
-};
-
-//#endif // BOOST_TREE_DETAIL_ITERATOR_BIDIRECTIONAL_HPP
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/inorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -14,22 +14,16 @@
#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>
-#include <stack>
-
-
-using std::stack;
-
namespace boost {
namespace tree {
namespace inorder {
-#include <boost/tree/detail/iterator/bidirectional.hpp>
+#include <boost/tree/detail/iterator/_order.hpp>
} // namespace inorder
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/postorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -14,18 +14,16 @@
#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/bidirectional.hpp>
+#include <boost/tree/detail/iterator/_order.hpp>
} // namespace postorder
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/iterator/preorder.hpp 2008-06-08 11:26:09 EDT (Sun, 08 Jun 2008)
@@ -6,6 +6,7 @@
/**
* @file preorder_iterator.hpp
+ *
* Preorder iterator wrapper around cursor.
*/
@@ -14,18 +15,16 @@
#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/bidirectional.hpp>
+#include <boost/tree/detail/iterator/_order.hpp>
} // namespace preorder
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