Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49018 - in sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm: . iterator
From: ockham_at_[hidden]
Date: 2008-09-29 14:01:55


Author: bernhard.reiter
Date: 2008-09-29 14:01:55 EDT (Mon, 29 Sep 2008)
New Revision: 49018
URL: http://svn.boost.org/trac/boost/changeset/49018

Log:
Move a file.
Added:
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp (contents, props changed)
Removed:
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp

Added: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator.hpp 2008-09-29 14:01:55 EDT (Mon, 29 Sep 2008)
@@ -0,0 +1,67 @@
+// 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 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).
+ */
+
+#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
+#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
+
+#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())
+ * @param c A cursor
+ * @return Iterator to the first element of @a c
+ */
+template <class Order, class Cursor>
+iterator<Order, Cursor>
+begin(Cursor c)
+{
+ to_first(c);
+ return iterator<Order, Cursor>(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 Order, class Cursor>
+iterator<Order, Cursor>
+end(Cursor c)
+{
+ to_last(c);
+ return iterator<Order, Cursor>(c);
+}
+
+/// Reverse iterators
+
+template <class Order, class Cursor>
+std::reverse_iterator< iterator<Order, Cursor> >
+rbegin(Cursor c)
+{
+ return std::reverse_iterator< iterator<Order, Cursor> >(end(c));
+}
+
+template <class Order, class Cursor>
+std::reverse_iterator< iterator<Order, Cursor> >
+rend(Cursor c)
+{
+ return std::reverse_iterator< iterator<Order, Cursor> >(begin(c));
+}
+
+#endif BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
\ No newline at end of file

Deleted: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterator/_order.hpp 2008-09-29 14:01:55 EDT (Mon, 29 Sep 2008)
+++ (empty file)
@@ -1,67 +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 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).
- */
-
-#ifndef BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
-#define BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
-
-#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())
- * @param c A cursor
- * @return Iterator to the first element of @a c
- */
-template <class Order, class Cursor>
-iterator<Order, Cursor>
-begin(Cursor c)
-{
- to_first(c);
- return iterator<Order, Cursor>(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 Order, class Cursor>
-iterator<Order, Cursor>
-end(Cursor c)
-{
- to_last(c);
- return iterator<Order, Cursor>(c);
-}
-
-/// Reverse iterators
-
-template <class Order, class Cursor>
-std::reverse_iterator< iterator<Order, Cursor> >
-rbegin(Cursor c)
-{
- return std::reverse_iterator< iterator<Order, Cursor> >(end(c));
-}
-
-template <class Order, class Cursor>
-std::reverse_iterator< iterator<Order, Cursor> >
-rend(Cursor c)
-{
- return std::reverse_iterator< iterator<Order, Cursor> >(begin(c));
-}
-
-#endif BOOST_TREE_DETAIL_ALGORITHM_ITERATOR_HPP
\ No newline at end of file


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