|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82849 - in sandbox-branches/geometry/index: boost/geometry/index boost/geometry/index/detail/rtree/node boost/geometry/index/detail/rtree/visitors test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-02-13 09:33:14
Author: awulkiew
Date: 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
New Revision: 82849
URL: http://svn.boost.org/trac/boost/changeset/82849
Log:
raw pointers replaced by allocator pointer
Text files modified:
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/dynamic_visitor.hpp | 12 ++--
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_auto_ptr.hpp | 11 ++-
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp | 119 ++++++++++++++++++++++++---------------
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_static.hpp | 22 ++++---
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/destroy.hpp | 12 ++-
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/insert.hpp | 20 ++++--
sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/nearest_query.hpp | 6 +-
sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp | 26 +++++---
sandbox-branches/geometry/index/test/rtree/rtree_interprocess.cpp | 6 +-
9 files changed, 137 insertions(+), 97 deletions(-)
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/dynamic_visitor.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/dynamic_visitor.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/dynamic_visitor.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -72,12 +72,12 @@
return static_cast<Derived&>(n);
}
-template <typename Derived, typename Parameters, typename Value, typename Box, typename Allocators, typename Tag>
-inline Derived * get(dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
-{
- BOOST_GEOMETRY_INDEX_ASSERT(dynamic_cast<Derived*>(n), "can't cast to a Derived type");
- return static_cast<Derived*>(n);
-}
+//template <typename Derived, typename Parameters, typename Value, typename Box, typename Allocators, typename Tag>
+//inline Derived * get(dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+//{
+// BOOST_GEOMETRY_INDEX_ASSERT(dynamic_cast<Derived*>(n), "can't cast to a Derived type");
+// return static_cast<Derived*>(n);
+//}
// apply visitor
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_auto_ptr.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_auto_ptr.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_auto_ptr.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -24,9 +24,10 @@
: boost::noncopyable
{
typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename Allocators::node_pointer pointer;
public:
- node_auto_ptr(node * ptr, Allocators & allocators)
+ node_auto_ptr(pointer ptr, Allocators & allocators)
: m_ptr(ptr)
, m_allocators(allocators)
{}
@@ -36,7 +37,7 @@
reset();
}
- void reset(node * ptr = 0)
+ void reset(pointer ptr = 0)
{
if ( m_ptr )
{
@@ -51,7 +52,7 @@
m_ptr = 0;
}
- node * get() const
+ pointer get() const
{
return m_ptr;
}
@@ -61,13 +62,13 @@
return *m_ptr;
}
- node * operator->() const
+ pointer operator->() const
{
return m_ptr;
}
private:
- node * m_ptr;
+ pointer m_ptr;
Allocators & m_allocators;
};
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_dynamic.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -24,7 +24,7 @@
: public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
typedef boost::container::vector<
- std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> *>,
+ std::pair<Box, typename Allocators::node_pointer>,
typename Allocators::internal_node_elements_allocator_type
> elements_type;
@@ -85,39 +85,61 @@
typedef dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, IsVisitableConst> type;
};
-// element's indexable type
+template <typename Element, typename Value, typename Translator>
+struct translator_wrapper_helper
+{
+ typedef typename Element::first_type element_indexable_type;
+ typedef typename Element::first_type const& element_indexable_result;
+};
template <typename Value, typename Translator>
-struct element_indexable_type
+struct translator_wrapper_helper<Value, Value, Translator>
{
- typedef typename translator::indexable_type<Translator>::type type;
+ typedef typename translator::indexable_type<Translator>::type element_indexable_type;
+ typedef typename Translator::result_type element_indexable_result;
};
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
-struct element_indexable_type<
- std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, Tag> *>,
- Translator
->
+template <typename Value, typename Translator, typename Tag>
+struct translator_wrapper
+ : public Translator
{
- typedef Box type;
+ translator_wrapper(Translator const& t = Translator()) : Translator(t) {}
+
+ template <typename Element>
+ struct element_indexable_type
+ {
+ typedef typename translator_wrapper_helper<Element, Value, Translator>::element_indexable_type type;
+ };
+
+ template <typename Element>
+ struct element_indexable_result
+ {
+ typedef typename translator_wrapper_helper<Element, Value, Translator>::element_indexable_result type;
+ };
+
+ typename element_indexable_result<Value>::type
+ element_indexable(Value const& v) const { return Translator::operator()(v); }
+
+ template <typename Element>
+ typename element_indexable_result<Element>::type
+ element_indexable(Element const& el) const { return el.first; }
};
-// element's indexable getter
+// element's indexable type
-template <typename Value, typename Translator>
-inline typename Translator::result_type
-element_indexable(Value const& el, Translator const& tr)
+template <typename Element, typename Translator>
+struct element_indexable_type
{
- return tr(el);
-}
+ typedef typename Translator::template element_indexable_type<Element>::type type;
+};
+
+// element's indexable getter
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
-inline Box const&
-element_indexable(
- std::pair< Box, dynamic_node<Value, Parameters, Box, Allocators, Tag> *> const& el,
- Translator const&)
+template <typename Element, typename Translator>
+typename Translator::template element_indexable_result<Element>::type
+element_indexable(Element const& el, Translator const& tr)
{
- return el.first;
+ return tr.element_indexable(el);
}
// nodes elements
@@ -162,6 +184,10 @@
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
+ >::other::pointer node_pointer;
+
+ typedef typename allocator_type::template rebind<
typename internal_node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
>::other internal_node_allocator_type;
@@ -170,7 +196,7 @@
>::other leaf_allocator_type;
typedef typename allocator_type::template rebind<
- std::pair<Box, typename node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type *>
+ std::pair<Box, node_pointer>
>::other internal_node_elements_allocator_type;
typedef typename allocator_type::template rebind<
@@ -227,22 +253,25 @@
// create_node_impl
-template <typename BaseNode, typename Node>
+template <typename BaseNodePtr>
struct create_dynamic_node
{
template <typename AllocNode, typename AllocElems>
- static inline BaseNode * apply(AllocNode & alloc_node, AllocElems & alloc_elems)
+ static inline BaseNodePtr apply(AllocNode & alloc_node, AllocElems & alloc_elems)
{
- Node * p = alloc_node.allocate(1);
+ typedef typename AllocNode::pointer P;
+ typedef typename AllocNode::value_type V;
+
+ P p = alloc_node.allocate(1);
if ( 0 == p )
- throw std::bad_alloc();
+ throw std::bad_alloc(); // TODO throw different exception
try
{
// NOTE/TODO
// Here the whole node may be copied
- alloc_node.construct(p, Node(alloc_elems));
+ alloc_node.construct(p, V(alloc_elems));
}
catch(...)
{
@@ -256,13 +285,15 @@
// destroy_node_impl
-template <typename Node>
struct destroy_dynamic_node
{
- template <typename AllocNode, typename BaseNode>
- static inline void apply(AllocNode & alloc_node, BaseNode * n)
+ template <typename AllocNode, typename BaseNodePtr>
+ static inline void apply(AllocNode & alloc_node, BaseNodePtr n)
{
- Node * p = rtree::get<Node>(n);
+ typedef typename AllocNode::value_type V;
+ typedef typename AllocNode::pointer P;
+
+ P p(&static_cast<V&>(rtree::get<V>(*n)));
alloc_node.destroy(p);
alloc_node.deallocate(p, 1);
}
@@ -276,12 +307,11 @@
dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
>
{
- static inline dynamic_node<Value, Parameters, Box, Allocators, Tag> *
+ static inline typename Allocators::node_pointer
apply(Allocators & allocators)
{
return create_dynamic_node<
- dynamic_node<Value, Parameters, Box, Allocators, Tag>,
- dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
+ typename Allocators::node_pointer
>::apply(allocators.internal_node_allocator, allocators.internal_node_elements_allocator);
}
};
@@ -292,13 +322,12 @@
dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
>
{
- static inline dynamic_node<Value, Parameters, Box, Allocators, Tag> *
+ static inline typename Allocators::node_pointer
apply(Allocators & allocators)
{
return create_dynamic_node<
- dynamic_node<Value, Parameters, Box, Allocators, Tag>,
- dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
- >::template apply(allocators.leaf_allocator, allocators.leaf_elements_allocator);
+ typename Allocators::node_pointer
+ >::apply(allocators.leaf_allocator, allocators.leaf_elements_allocator);
}
};
@@ -310,11 +339,9 @@
dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
>
{
- static inline void apply(Allocators & allocators, dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+ static inline void apply(Allocators & allocators, typename Allocators::node_pointer n)
{
- destroy_dynamic_node<
- dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
- >::apply(allocators.internal_node_allocator, n);
+ destroy_dynamic_node::apply(allocators.internal_node_allocator, n);
}
};
@@ -324,11 +351,9 @@
dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
>
{
- static inline void apply(Allocators & allocators, dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+ static inline void apply(Allocators & allocators, typename Allocators::node_pointer n)
{
- destroy_dynamic_node<
- dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
- >::apply(allocators.leaf_allocator, n);
+ destroy_dynamic_node::apply(allocators.leaf_allocator, n);
}
};
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_static.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_static.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/node/node_d_mem_static.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -25,7 +25,7 @@
typedef detail::varray<
std::pair<
Box,
- dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> *
+ typename Allocators::node_pointer
>,
Parameters::max_elements + 1,
typename Allocators::internal_node_elements_allocator_type
@@ -105,6 +105,10 @@
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
+ >::other::pointer node_pointer;
+
+ typedef typename allocator_type::template rebind<
typename internal_node<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
>::other internal_node_allocator_type;
@@ -113,7 +117,7 @@
>::other leaf_allocator_type;
typedef typename allocator_type::template rebind<
- std::pair<Box, typename node<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type *>
+ std::pair<Box, node_pointer>
>::other internal_node_elements_allocator_type;
typedef typename allocator_type::template rebind<
@@ -164,13 +168,12 @@
dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>
{
- static inline dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> *
+ static inline typename Allocators::node_pointer
apply(Allocators & allocators)
{
return create_dynamic_node<
- dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>,
- dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
- >::template apply(allocators.internal_node_allocator, allocators.internal_node_allocator);
+ typename Allocators::node_pointer
+ >::apply(allocators.internal_node_allocator, allocators.internal_node_allocator);
}
};
@@ -180,13 +183,12 @@
dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>
{
- static inline typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type *
+ static inline typename Allocators::node_pointer
apply(Allocators & allocators)
{
return create_dynamic_node<
- dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>,
- dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
- >::template apply(allocators.leaf_allocator, allocators.leaf_allocator);
+ typename Allocators::node_pointer
+ >::apply(allocators.leaf_allocator, allocators.leaf_allocator);
}
};
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/destroy.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/destroy.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/destroy.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -27,16 +27,18 @@
typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
- inline destroy(node * root_node, Allocators & allocators)
+ typedef typename Allocators::node_pointer node_pointer;
+
+ inline destroy(node_pointer root_node, Allocators & allocators)
: m_current_node(root_node)
, m_allocators(allocators)
{}
inline void operator()(internal_node & n)
{
- BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<internal_node>(m_current_node), "invalid pointers");
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == &rtree::get<internal_node>(*m_current_node), "invalid pointers");
- node * node_to_destroy = m_current_node;
+ node_pointer node_to_destroy = m_current_node;
typedef typename rtree::elements_type<internal_node>::type elements_type;
elements_type & elements = rtree::elements(n);
@@ -54,13 +56,13 @@
inline void operator()(leaf & BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(l))
{
- BOOST_GEOMETRY_INDEX_ASSERT(&l == rtree::get<leaf>(m_current_node), "invalid pointers");
+ BOOST_GEOMETRY_INDEX_ASSERT(&l == &rtree::get<leaf>(*m_current_node), "invalid pointers");
rtree::destroy_node<Allocators, leaf>::apply(m_allocators, m_current_node);
}
private:
- node * m_current_node;
+ node_pointer m_current_node;
Allocators & m_allocators;
};
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/insert.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/insert.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/insert.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -120,7 +120,10 @@
typedef rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
public:
- typedef index::detail::varray<std::pair<Box, node*>, 1> nodes_container_type;
+ typedef index::detail::varray<
+ typename rtree::elements_type<internal_node>::type::value_type,
+ 1
+ > nodes_container_type;
template <typename Node>
static inline void apply(nodes_container_type & additional_nodes,
@@ -230,8 +233,9 @@
typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
typedef rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+ typedef typename Allocators::node_pointer node_pointer;
- inline insert(node* & root,
+ inline insert(node_pointer & root,
size_t & leafs_level,
Element const& element,
parameters_type const& parameters,
@@ -278,7 +282,7 @@
inline void post_traverse(Node &n)
{
BOOST_GEOMETRY_INDEX_ASSERT(m_traverse_data.current_is_root() ||
- &n == rtree::get<Node>(m_traverse_data.current_element().second),
+ &n == &rtree::get<Node>(*m_traverse_data.current_element().second),
"if node isn't the root current_child_index should be valid");
// handle overflow
@@ -342,7 +346,7 @@
// node is the root - add level
else
{
- BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<Node>(m_root_node), "node should be the root");
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == &rtree::get<Node>(*m_root_node), "node should be the root");
// create new root and add nodes
node_auto_ptr new_root(rtree::create_node<Allocators, internal_node>::apply(m_allocators), m_allocators); // MAY THROW, STRONG (N:alloc)
@@ -373,7 +377,7 @@
const size_t m_relative_level;
const size_t m_level;
- node* & m_root_node;
+ node_pointer & m_root_node;
size_t & m_leafs_level;
// traversing input parameters
@@ -403,8 +407,9 @@
typedef typename base::leaf leaf;
typedef typename Options::parameters_type parameters_type;
+ typedef typename base::node_pointer node_pointer;
- inline insert(node* & root,
+ inline insert(node_pointer & root,
size_t & leafs_level,
Element & element,
parameters_type const& parameters,
@@ -465,8 +470,9 @@
typedef typename base::leaf leaf;
typedef typename Options::parameters_type parameters_type;
+ typedef typename base::node_pointer node_pointer;
- inline insert(node* & root,
+ inline insert(node_pointer & root,
size_t & leafs_level,
Value const& value,
parameters_type const& parameters,
Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/nearest_query.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/nearest_query.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/rtree/visitors/nearest_query.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -201,7 +201,7 @@
// array of active nodes
typename index::detail::rtree::container_from_elements_type<
elements_type,
- std::pair<node_distances_type, const node *>
+ std::pair<node_distances_type, typename Allocators::node_pointer>
>::type active_branch_list;
active_branch_list.reserve(m_parameters.get_max_elements());
@@ -311,8 +311,8 @@
}
static inline bool abl_less(
- std::pair<node_distances_type, const node *> const& p1,
- std::pair<node_distances_type, const node *> const& p2)
+ std::pair<node_distances_type, typename Allocators::node_pointer> const& p1,
+ std::pair<node_distances_type, typename Allocators::node_pointer> const& p2)
{
return index::detail::cdist_value<node_distances_type>
::template get<index::detail::to_nearest_tag>(p1.first)
Modified: sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -130,7 +130,11 @@
typedef typename detail::rtree::internal_node<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type internal_node;
typedef typename detail::rtree::leaf<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type leaf;
+ typedef detail::rtree::translator_wrapper<Value, Translator, node_tag> translator_wrapper;
+ typedef typename allocators_type::node_pointer node_pointer;
+
public:
+
/*!
\brief The constructor.
@@ -782,7 +786,7 @@
if ( !m_root )
return 0;
- detail::rtree::visitors::count<ValueOrIndexable, value_type, options_type, translator_type, box_type, allocators_type>
+ detail::rtree::visitors::count<ValueOrIndexable, value_type, options_type, translator_wrapper, box_type, allocators_type>
count_v(vori, m_translator);
detail::rtree::apply_visitor(count_v, *m_root);
@@ -900,7 +904,7 @@
detail::rtree::visitors::insert<
value_type,
- value_type, options_type, translator_type, box_type, allocators_type,
+ value_type, options_type, translator_wrapper, box_type, allocators_type,
typename options_type::insert_tag
> insert_v(m_root, m_leafs_level, value, m_parameters, m_translator, m_allocators);
@@ -929,7 +933,7 @@
BOOST_GEOMETRY_INDEX_ASSERT(m_root, "The root must exist");
detail::rtree::visitors::remove<
- value_type, options_type, translator_type, box_type, allocators_type
+ value_type, options_type, translator_wrapper, box_type, allocators_type
> remove_v(m_root, m_leafs_level, m_box, value, m_parameters, m_translator, m_allocators);
detail::rtree::apply_visitor(remove_v, *m_root);
@@ -975,7 +979,7 @@
{
if ( t.m_root )
{
- detail::rtree::visitors::destroy<value_type, options_type, translator_type, box_type, allocators_type> del_v(t.m_root, t.m_allocators);
+ detail::rtree::visitors::destroy<value_type, options_type, translator_wrapper, box_type, allocators_type> del_v(t.m_root, t.m_allocators);
detail::rtree::apply_visitor(del_v, *t.m_root);
t.m_root = 0;
@@ -996,7 +1000,7 @@
*/
inline void raw_copy(rtree const& src, rtree & dst, bool copy_all_internals) const
{
- detail::rtree::visitors::copy<value_type, options_type, translator_type, box_type, allocators_type> copy_v(dst.m_allocators);
+ detail::rtree::visitors::copy<value_type, options_type, translator_wrapper, box_type, allocators_type> copy_v(dst.m_allocators);
if ( src.m_root )
detail::rtree::apply_visitor(copy_v, *src.m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
@@ -1011,7 +1015,7 @@
if ( dst.m_root )
{
- detail::rtree::visitors::destroy<value_type, options_type, translator_type, box_type, allocators_type> del_v(dst.m_root, dst.m_allocators);
+ detail::rtree::visitors::destroy<value_type, options_type, translator_wrapper, box_type, allocators_type> del_v(dst.m_root, dst.m_allocators);
detail::rtree::apply_visitor(del_v, *dst.m_root);
dst.m_root = 0;
}
@@ -1030,7 +1034,7 @@
template <typename Predicates, typename OutIter>
size_type query_dispatch(Predicates const& predicates, OutIter out_it, boost::mpl::bool_<false> const& /*is_nearest*/) const
{
- detail::rtree::visitors::spatial_query<value_type, options_type, translator_type, box_type, allocators_type, Predicates, OutIter>
+ detail::rtree::visitors::spatial_query<value_type, options_type, translator_wrapper, box_type, allocators_type, Predicates, OutIter>
find_v(m_translator, predicates, out_it);
detail::rtree::apply_visitor(find_v, *m_root);
@@ -1068,7 +1072,7 @@
typedef detail::rtree::visitors::nearest_query_result_k<
value_type,
- translator_type,
+ translator_wrapper,
point_type,
OutIter
> result_type;
@@ -1078,7 +1082,7 @@
detail::rtree::visitors::nearest_query<
value_type,
options_type,
- translator_type,
+ translator_wrapper,
box_type,
allocators_type,
DistancesPredicates,
@@ -1091,13 +1095,13 @@
return result.finish();
}
- translator_type m_translator;
+ translator_wrapper m_translator;
Parameters m_parameters;
allocators_type m_allocators;
size_type m_values_count;
size_type m_leafs_level;
- node * m_root;
+ node_pointer m_root;
box_type m_box;
};
Modified: sandbox-branches/geometry/index/test/rtree/rtree_interprocess.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree_interprocess.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree_interprocess.cpp 2013-02-13 09:33:11 EST (Wed, 13 Feb 2013)
@@ -62,9 +62,9 @@
typedef bg::model::box<P2d> B2d;
typedef std::pair<B2d, int> PB2d;
- test_rtree_interprocess<P2d>(bgi::linear<32, 8>());
- /*test_rtree_interprocess<P2d>(bgi::runtime::linear(32, 8));
- test_rtree_interprocess<B2d>(bgi::quadratic<32, 8>());
+ //test_rtree_interprocess<P2d>(bgi::linear<32, 8>());
+ test_rtree_interprocess<P2d>(bgi::runtime::linear(32, 8));
+ /*test_rtree_interprocess<B2d>(bgi::quadratic<32, 8>());
test_rtree_interprocess<B2d>(bgi::runtime::quadratic(32, 8));
test_rtree_interprocess<PB2d>(bgi::rstar<32, 8>());
test_rtree_interprocess<PB2d>(bgi::runtime::rstar(32, 8));
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