Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51840 - in sandbox/SOC/2006/tree/trunk: boost/tree boost/tree/detail libs/tree/test
From: ockham_at_[hidden]
Date: 2009-03-18 11:16:29


Author: bernhard.reiter
Date: 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
New Revision: 51840
URL: http://svn.boost.org/trac/boost/changeset/51840

Log:
More cleanup.
Text files modified:
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/nary_node.hpp | 76 ----------------------------------------
   sandbox/SOC/2006/tree/trunk/boost/tree/forest.hpp | 11 +++--
   sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp | 2 -
   sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_test.cpp | 9 ----
   sandbox/SOC/2006/tree/trunk/libs/tree/test/insert_cursor_test.cpp | 9 ----
   sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp | 9 ----
   sandbox/SOC/2006/tree/trunk/libs/tree/test/lower_bound_test.cpp | 13 ------
   sandbox/SOC/2006/tree/trunk/libs/tree/test/upper_bound_test.cpp | 13 ------
   8 files changed, 8 insertions(+), 134 deletions(-)

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/nary_node.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/nary_node.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/nary_node.hpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -24,19 +24,8 @@
 namespace detail {
 
 using boost::array;
-
-//template <class T> struct binary_array : public array<T, 2> { };
-
-//struct node_base;
-/*
- * node_with_parent_base
- */
  
 class node_with_parent_base {
-// typedef node_with_parent_base self_type;
-// typedef self_type* base_pointer;
-// typedef self_type const* const_base_pointer;
-
 public:
     node_with_parent_base* m_parent; // TODO: protect?
     
@@ -63,53 +52,6 @@
     }
 };
 
-//template <template <typename> class Container>
-//class node_base;
-//
-//template <template <typename> class Container>
-//class node_base : public node_with_parent_base, public Container<node_base<Container>*> {
-// typedef node_base<Container> self_type;
-//
-//public:
-//
-// typedef Container<node_base<Container>*> base_type;
-// typedef typename base_type::size_type size_type;
-// typedef self_type* base_pointer;
-// typedef self_type const* const_base_pointer;
-//
-// node_base() : node_with_parent_base()
-// { }
-//
-// static base_pointer nil()
-// {
-// static self_type m_nil_obj;
-// static base_pointer m_nil = &m_nil_obj;
-// return m_nil;
-// }
-//
-// void init()
-// {
-// for (typename base_type::size_type i=0; i<base_type::size(); ++i)
-// operator[](i) = nil();
-// }
-//
-// // This injures Meyers' Item 36. OTOH, iterator adaptors do that, too, right?
-// bool const is_leaf() const
-// {
-// return ((this == nil()) || this->base_type::is_leaf());
-// }
-//
-// // O(n); n is number of parent's children
-// typename base_type::size_type const get_index() const
-// {
-// typename base_type::size_type i = 0;
-// while (static_cast<base_pointer>(this->m_parent)->base_type::operator[](i++) != this);
-// return --i;
-// //return (static_cast<base_pointer>(this->m_parent)->base_type::operator[](0) == this ? 0 : 1);
-// }
-//};
-
-class node_base;
 class node_with_children_base;
 
 class node_with_children_base {
@@ -144,35 +86,17 @@
     typedef node_base self_type;
     
 public:
- //typedef node_with_children_base::base_type base_type;
     typedef self_type* base_pointer;
     typedef self_type const* const_base_pointer;
         
     node_base() : node_with_parent_base(), node_with_children_base()
     {
-// m_children[0] = 0;
-// m_children[1] = 0;
     }
 
     node_base(node_with_parent_base* p)
     : node_with_parent_base(p), node_with_children_base()
     {
-// m_children[0] = 0;
-// m_children[1] = 0;
     }
-
-// static base_pointer nil()
-// {
-// static self_type m_nil_obj;
-// static base_pointer m_nil = &m_nil_obj;
-// return m_nil;
-// }
-
- // This injures Meyers' Item 36. OTOH, iterator adaptors do that, too, right?
-// bool const is_leaf() const
-// {
-// return (this == nil());
-// }
     
     // Binary specific
     

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/forest.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/forest.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/forest.hpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -9,8 +9,8 @@
  * Binary tree based forest implementation
  */
 
-#ifndef BOOST_TREE_forest_HPP
-#define BOOST_TREE_forest_HPP
+#ifndef BOOST_TREE_FOREST_HPP
+#define BOOST_TREE_FOREST_HPP
 
 #include <boost/tree/detail/forest_cursor.hpp>
 
@@ -33,12 +33,13 @@
  * TODO: complete this..
  *
 */
+
 template <class T, class Hierarchy = binary_tree<T> >
 class forest {
 
 BOOST_CONCEPT_ASSERT((DefaultConstructible<T>));
-BOOST_CONCEPT_ASSERT((DescendingCursor< typename binary_tree<T>::cursor >));
-BOOST_CONCEPT_ASSERT((DescendingCursor< typename binary_tree<T>::const_cursor >));
+BOOST_CONCEPT_ASSERT((DescendingCursor< typename Hierarchy::cursor >));
+BOOST_CONCEPT_ASSERT((DescendingCursor< typename Hierarchy::const_cursor >));
 //BOOST_CONCEPT_ASSERT((SameType<T, typename Hierarchy::value_type>));
 // Is there a SameType concept in BCCL?
 
@@ -228,4 +229,4 @@
 } // namespace tree
 } // namespace boost
 
-#endif // BOOST_TREE_forest_HPP
+#endif // BOOST_TREE_FOREST_HPP

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -6,8 +6,6 @@
 
 #include <boost/tree/binary_tree.hpp>
 
-#include <boost/tree/algorithm.hpp>
-
 #define BOOST_TEST_MODULE binary_tree test
 //#define BOOST_TEST_DYN_LINK
 #include <boost/test/included/unit_test.hpp>

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -5,21 +5,12 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/tree/forest.hpp>
-#include <boost/tree/algorithm.hpp>
-
-#include <boost/lambda/bind.hpp>
-
-#include <boost/mpl/list.hpp>
-#include <boost/mpl/pair.hpp>
-
-#include <list>
 
 #define BOOST_TEST_MODULE forest test
 //#define BOOST_TEST_DYN_LINK
 #include <boost/test/included/unit_test.hpp>
 #include <boost/test/test_case_template.hpp>
 
-#include "test_tree_traversal_data.hpp"
 #include "fake_binary_tree.hpp"
 
 using namespace boost::tree;

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/insert_cursor_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/insert_cursor_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/insert_cursor_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -4,23 +4,14 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/tree/binary_tree.hpp>
-//#include <boost/tree/iterator.hpp>
-//#include <boost/tree/algorithm.hpp>
-
 #include <boost/tree/insert_cursor.hpp>
 
 #define BOOST_TEST_MODULE cursor_algorithm test
 #include <boost/test/included/unit_test.hpp>
-#include <boost/test/test_case_template.hpp>
-
 
 #include "test_tree_traversal_data.hpp"
-
 #include "fake_binary_tree.hpp"
 
-// TODO: Actually use fake binary tree.
-
 using namespace boost::tree;
 
 template <class Cursor>

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -4,19 +4,10 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/tree/binary_tree.hpp>
 #include <boost/tree/iterator.hpp>
-#include <boost/tree/algorithm.hpp>
-//#include <boost/tree/ascending_cursor.hpp>
-//#include <boost/tree/root_tracking_cursor.hpp>
-
-#include <list>
-#include <iterator>
 
 #define BOOST_TEST_MODULE iterator_algorithm test
 #include <boost/test/included/unit_test.hpp>
-#include <boost/test/test_case_template.hpp>
-#include <boost/mpl/list.hpp>
 
 #include "fake_binary_tree.hpp"
 #include "test_tree_traversal_data.hpp"

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/lower_bound_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/lower_bound_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/lower_bound_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -4,24 +4,13 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-
-#include <boost/tree/binary_tree.hpp>
-
-#include <boost/tree/iterator.hpp>
 #include <boost/tree/algorithm.hpp>
 
-#define BOOST_TEST_MODULE binary_tree test
+#define BOOST_TEST_MODULE cursor_algorithm test
 //#define BOOST_TEST_DYN_LINK
 #include <boost/test/included/unit_test.hpp>
-#include <boost/test/parameterized_test.hpp>
-
-#include <list>
-#include <algorithm>
-#include <iterator>
-
 
 #include "fake_binary_tree.hpp"
-#include "test_tree_traversal_data.hpp"
 
 using namespace boost::tree;
 

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/upper_bound_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/upper_bound_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/upper_bound_test.cpp 2009-03-18 11:16:28 EDT (Wed, 18 Mar 2009)
@@ -4,24 +4,13 @@
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-
-#include <boost/tree/binary_tree.hpp>
-
-#include <boost/tree/iterator.hpp>
 #include <boost/tree/algorithm.hpp>
 
-#define BOOST_TEST_MODULE binary_tree test
+#define BOOST_TEST_MODULE cursor_algorithm test
 //#define BOOST_TEST_DYN_LINK
 #include <boost/test/included/unit_test.hpp>
-#include <boost/test/parameterized_test.hpp>
-
-#include <list>
-#include <algorithm>
-#include <iterator>
-
 
 #include "fake_binary_tree.hpp"
-#include "test_tree_traversal_data.hpp"
 
 using namespace boost::tree;
 


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