|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80751 - in sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree: . node
From: adam.wulkiewicz_at_[hidden]
Date: 2012-09-29 07:37:59
Author: awulkiew
Date: 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
New Revision: 80751
URL: http://svn.boost.org/trac/boost/changeset/80751
Log:
added node/concept.hpp and moved some of empty definitions there.
Added:
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/concept.hpp (contents, props changed)
Text files modified:
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node.hpp | 2 +
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default.hpp | 80 +++++++++++++--------------------------
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static.hpp | 70 ++++++++++++++++++++++++-----------
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static_variant.hpp | 56 ++++++++++++----------------
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_variant.hpp | 34 ++++++----------
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/options.hpp | 22 +++++-----
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp | 4 +
7 files changed, 128 insertions(+), 140 deletions(-)
Added: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/concept.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/concept.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -0,0 +1,85 @@
+// Boost.Geometry Index
+//
+// R-tree node concept
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (node));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct internal_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (internal_node));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct leaf
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (leaf));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, bool IsVisitableConst>
+struct visitor
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (visitor));
+};
+
+template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
+struct allocators
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (allocators));
+};
+
+template <typename Allocators, typename Node>
+struct create_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
+ (create_node));
+};
+
+template <typename Allocators, typename Node>
+struct destroy_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
+ (destroy_node));
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_HPP
#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_HPP
+#include <boost/geometry/extensions/index/rtree/node/concept.hpp>
+
#include <boost/geometry/extensions/index/rtree/node/node_default.hpp>
#include <boost/geometry/extensions/index/rtree/node/node_default_variant.hpp>
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -20,11 +20,11 @@
namespace detail { namespace rtree {
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_default_tag>
- : public dynamic_node<Value, Parameters, Box, Allocators, node_default_tag>
+struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
typedef std::vector<
- std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, node_default_tag> *>,
+ std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> *>,
typename Allocators::internal_node_elements_allocator_type
> elements_type;
@@ -32,15 +32,15 @@
: elements(al)
{}
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_tag, false> & v) { v(*this); }
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_tag, true> & v) const { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, true> & v) const { v(*this); }
elements_type elements;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct dynamic_leaf<Value, Parameters, Box, Allocators, node_default_tag>
- : public dynamic_node<Value, Parameters, Box, Allocators, node_default_tag>
+struct dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
typedef std::vector<
Value,
@@ -51,30 +51,30 @@
: elements(al)
{}
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_tag, false> & v) { v(*this); }
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_tag, true> & v) const { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, true> & v) const { v(*this); }
elements_type elements;
};
// nodes traits
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
-struct node
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
- typedef dynamic_node<Value, Parameters, Box, Allocators, Tag> type;
+ typedef dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
};
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
-struct internal_node
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
- typedef dynamic_internal_node<Value, Parameters, Box, Allocators, Tag> type;
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
};
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
-struct leaf
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
{
- typedef dynamic_leaf<Value, Parameters, Box, Allocators, Tag> type;
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
};
// nodes conversion
@@ -95,10 +95,10 @@
// visitor traits
-template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, bool IsVisitableConst>
-struct visitor
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, IsVisitableConst>
{
- typedef dynamic_visitor<Value, Parameters, Box, Allocators, Tag, IsVisitableConst> type;
+ typedef dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, IsVisitableConst> type;
};
template <typename Visitor, typename Visitable>
@@ -173,29 +173,29 @@
// allocators
-template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
-struct allocators_poly
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+struct allocators<Allocator, Value, Parameters, Box, node_d_mem_dynamic_tag>
{
typedef Allocator allocator_type;
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
- typename internal_node<Value, Parameters, Box, allocators_poly, Tag>::type
+ typename internal_node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
>::other internal_node_allocator_type;
typedef typename allocator_type::template rebind<
- typename leaf<Value, Parameters, Box, allocators_poly, Tag>::type
+ typename leaf<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
>::other leaf_allocator_type;
typedef typename allocator_type::template rebind<
- std::pair<Box, dynamic_node<Value, Parameters, Box, allocators_poly, Tag> *>
+ std::pair<Box, dynamic_node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag> *>
>::other internal_node_elements_allocator_type;
typedef typename allocator_type::template rebind<
Value
>::other leaf_elements_allocator_type;
- inline explicit allocators_poly(Allocator alloc)
+ inline explicit allocators(Allocator alloc)
: allocator(alloc)
, internal_node_allocator(allocator)
, leaf_allocator(allocator)
@@ -210,14 +210,6 @@
leaf_elements_allocator_type leaf_elements_allocator;
};
-// allocators
-
-template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
-struct allocators
-{
- typedef allocators_poly<Allocator, Value, Parameters, Box, Tag> type;
-};
-
// create_node_impl
template <typename Node>
@@ -261,15 +253,6 @@
// create_node
-template <typename Allocators, typename Node>
-struct create_node
-{
- BOOST_MPL_ASSERT_MSG(
- (false),
- NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
- (create_node));
-};
-
template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
struct create_node<
Allocators,
@@ -306,15 +289,6 @@
// destroy_node
-template <typename Allocators, typename Node>
-struct destroy_node
-{
- BOOST_MPL_ASSERT_MSG(
- (false),
- NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
- (destroy_node));
-};
-
template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
struct destroy_node<
Allocators,
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -19,13 +19,13 @@
namespace detail { namespace rtree {
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_default_static_tag>
- : public dynamic_node<Value, Parameters, Box, Allocators, node_default_static_tag>
+struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
{
typedef index::pushable_array<
std::pair<
Box,
- dynamic_node<Value, Parameters, Box, Allocators, node_default_static_tag> *
+ dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> *
>,
Parameters::max_elements + 1
> elements_type;
@@ -33,27 +33,53 @@
template <typename Dummy>
inline dynamic_internal_node(Dummy) {}
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_static_tag, false> & v) { v(*this); }
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_static_tag, true> & v) const { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, true> & v) const { v(*this); }
elements_type elements;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct dynamic_leaf<Value, Parameters, Box, Allocators, node_default_static_tag>
- : public dynamic_node<Value, Parameters, Box, Allocators, node_default_static_tag>
+struct dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
{
typedef index::pushable_array<Value, Parameters::max_elements + 1> elements_type;
template <typename Dummy>
inline dynamic_leaf(Dummy) {}
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_static_tag, false> & v) { v(*this); }
- void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_default_static_tag, true> & v) const { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, true> & v) const { v(*this); }
elements_type elements;
};
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, IsVisitableConst>
+{
+ typedef dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, IsVisitableConst> type;
+};
+
// elements derived type
template <typename OldValue, size_t N, typename NewValue>
struct container_from_elements_type<index::pushable_array<OldValue, N>, NewValue>
@@ -61,23 +87,23 @@
typedef index::pushable_array<NewValue, N> type;
};
-// allocators_poly
+// allocators
template <typename Allocator, typename Value, typename Parameters, typename Box>
-struct allocators_poly<Allocator, Value, Parameters, Box, node_default_static_tag>
+struct allocators<Allocator, Value, Parameters, Box, node_d_mem_static_tag>
{
typedef Allocator allocator_type;
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
- typename internal_node<Value, Parameters, Box, allocators_poly, node_default_static_tag>::type
+ typename internal_node<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
>::other internal_node_allocator_type;
typedef typename allocator_type::template rebind<
- typename leaf<Value, Parameters, Box, allocators_poly, node_default_static_tag>::type
+ typename leaf<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
>::other leaf_allocator_type;
- inline explicit allocators_poly(Allocator alloc)
+ inline explicit allocators(Allocator alloc)
: allocator(alloc)
, internal_node_allocator(allocator)
, leaf_allocator(allocator)
@@ -93,16 +119,16 @@
template <typename Allocators, typename Value, typename Parameters, typename Box>
struct create_node<
Allocators,
- dynamic_internal_node<Value, Parameters, Box, Allocators, node_default_static_tag>
+ dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>
{
- static inline typename node<Value, Parameters, Box, Allocators, node_default_static_tag>::type *
+ static inline typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type *
apply(Allocators & allocators)
{
return create_node_poly<
- dynamic_internal_node<Value, Parameters, Box, Allocators, node_default_static_tag>
+ dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>::template apply<
- typename node<Value, Parameters, Box, Allocators, node_default_static_tag>::type
+ typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type
>(allocators.internal_node_allocator, allocators.internal_node_allocator);
}
};
@@ -110,16 +136,16 @@
template <typename Allocators, typename Value, typename Parameters, typename Box>
struct create_node<
Allocators,
- dynamic_leaf<Value, Parameters, Box, Allocators, node_default_static_tag>
+ dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>
{
- static inline typename node<Value, Parameters, Box, Allocators, node_default_static_tag>::type *
+ static inline typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type *
apply(Allocators & allocators)
{
return create_node_poly<
- dynamic_leaf<Value, Parameters, Box, Allocators, node_default_static_tag>
+ dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
>::template apply<
- typename node<Value, Parameters, Box, Allocators, node_default_static_tag>::type
+ typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type
>(allocators.leaf_allocator, allocators.leaf_allocator);
}
};
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static_variant.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static_variant.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_static_variant.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -21,12 +21,12 @@
// nodes default types
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct internal_node_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+struct internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
{
typedef index::pushable_array<
std::pair<
Box,
- typename node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>::type *
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
>,
Parameters::max_elements + 1
> elements_type;
@@ -38,7 +38,7 @@
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct leaf_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+struct leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
{
typedef index::pushable_array<Value, Parameters::max_elements + 1> elements_type;
@@ -51,55 +51,55 @@
// nodes traits
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+struct node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
{
typedef boost::variant<
- leaf_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>,
- internal_node_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+ leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>,
+ internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
> type;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct internal_node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+struct internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
{
- typedef internal_node_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag> type;
+ typedef internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag> type;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct leaf<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+struct leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
{
- typedef leaf_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag> type;
+ typedef leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag> type;
};
// visitor traits
template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
-struct visitor<Value, Parameters, Box, Allocators, node_default_static_variant_tag, IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_s_mem_static_tag, IsVisitableConst>
{
typedef static_visitor<> type;
};
-// allocators_variant
+// allocators
template <typename Allocator, typename Value, typename Parameters, typename Box>
-struct allocators_variant<Allocator, Value, Parameters, Box, node_default_static_variant_tag>
+struct allocators<Allocator, Value, Parameters, Box, node_s_mem_static_tag>
{
typedef Allocator allocator_type;
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
- typename node<Value, Parameters, Box, allocators_variant, node_default_static_variant_tag>::type
+ typename node<Value, Parameters, Box, allocators, node_s_mem_static_tag>::type
>::other node_allocator_type;
typedef typename allocator_type::template rebind<
- std::pair<Box, typename node<Value, Parameters, Box, allocators_variant, node_default_static_variant_tag>::type *>
+ std::pair<Box, typename node<Value, Parameters, Box, allocators, node_s_mem_static_tag>::type *>
>::other internal_node_elements_allocator_type;
typedef typename allocator_type::template rebind<
Value
>::other leaf_elements_allocator_type;
- inline explicit allocators_variant(Allocator alloc)
+ inline explicit allocators(Allocator alloc)
: allocator(alloc)
, node_allocator(allocator)
{}
@@ -108,29 +108,21 @@
node_allocator_type node_allocator;
};
-// allocators
-
-template <typename Allocator, typename Value, typename Parameters, typename Box>
-struct allocators<Allocator, Value, Parameters, Box, node_default_static_variant_tag>
-{
- typedef allocators_variant<Allocator, Value, Parameters, Box, node_default_static_variant_tag> type;
-};
-
// create_node
template <typename Allocators, typename Value, typename Parameters, typename Box>
struct create_node<
Allocators,
- internal_node_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+ internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
>
{
- static inline typename node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>::type *
+ static inline typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
apply(Allocators & allocators)
{
return create_node_variant<
- internal_node_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+ internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
>::template apply<
- typename node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>::type
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type
>(allocators.node_allocator, allocators.node_allocator);
}
};
@@ -138,16 +130,16 @@
template <typename Allocators, typename Value, typename Parameters, typename Box>
struct create_node<
Allocators,
- leaf_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+ leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
>
{
- static inline typename node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>::type *
+ static inline typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
apply(Allocators & allocators)
{
return create_node_variant<
- leaf_variant<Value, Parameters, Box, Allocators, node_default_static_variant_tag>
+ leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
>::template apply<
- typename node<Value, Parameters, Box, Allocators, node_default_static_variant_tag>::type
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type
>(allocators.node_allocator, allocators.node_allocator);
}
};
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_variant.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_variant.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/node/node_default_variant.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -56,24 +56,24 @@
// nodes traits
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct node<Value, Parameters, Box, Allocators, node_default_variant_tag>
+struct node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
{
typedef boost::variant<
- leaf_variant<Value, Parameters, Box, Allocators, node_default_variant_tag>,
- internal_node_variant<Value, Parameters, Box, Allocators, node_default_variant_tag>
+ leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>,
+ internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
> type;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct internal_node<Value, Parameters, Box, Allocators, node_default_variant_tag>
+struct internal_node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
{
- typedef internal_node_variant<Value, Parameters, Box, Allocators, node_default_variant_tag> type;
+ typedef internal_node_variant<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag> type;
};
template <typename Value, typename Parameters, typename Box, typename Allocators>
-struct leaf<Value, Parameters, Box, Allocators, node_default_variant_tag>
+struct leaf<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
{
- typedef leaf_variant<Value, Parameters, Box, Allocators, node_default_variant_tag> type;
+ typedef leaf_variant<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag> type;
};
// nodes conversion
@@ -103,7 +103,7 @@
// visitor traits
template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
-struct visitor<Value, Parameters, Box, Allocators, node_default_variant_tag, IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag, IsVisitableConst>
{
typedef static_visitor<> type;
};
@@ -163,25 +163,25 @@
// allocators
-template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
-struct allocators_variant
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+struct allocators<Allocator, Value, Parameters, Box, node_s_mem_dynamic_tag>
{
typedef Allocator allocator_type;
typedef typename allocator_type::size_type size_type;
typedef typename allocator_type::template rebind<
- typename node<Value, Parameters, Box, allocators_variant, node_default_variant_tag>::type
+ typename node<Value, Parameters, Box, allocators, node_s_mem_dynamic_tag>::type
>::other node_allocator_type;
typedef typename allocator_type::template rebind<
- std::pair<Box, typename node<Value, Parameters, Box, allocators_variant, node_default_variant_tag>::type *>
+ std::pair<Box, typename node<Value, Parameters, Box, allocators, node_s_mem_dynamic_tag>::type *>
>::other internal_node_elements_allocator_type;
typedef typename allocator_type::template rebind<
Value
>::other leaf_elements_allocator_type;
- inline explicit allocators_variant(Allocator alloc)
+ inline explicit allocators(Allocator alloc)
: allocator(alloc)
, node_allocator(allocator)
, internal_node_elements_allocator(allocator)
@@ -194,14 +194,6 @@
leaf_elements_allocator_type leaf_elements_allocator;
};
-// allocators
-
-template <typename Allocator, typename Value, typename Parameters, typename Box>
-struct allocators<Allocator, Value, Parameters, Box, node_default_variant_tag>
-{
- typedef allocators_variant<Allocator, Value, Parameters, Box, node_default_variant_tag> type;
-};
-
// create_node_variant
template <typename Node>
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/options.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/options.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/options.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -33,10 +33,10 @@
struct rstar_tag {};
// NodeTag
-struct node_default_tag {};
-struct node_default_variant_tag {};
-struct node_default_static_tag {};
-struct node_default_static_variant_tag {};
+struct node_d_mem_dynamic_tag {};
+struct node_d_mem_static_tag {};
+struct node_s_mem_dynamic_tag {};
+struct node_s_mem_static_tag {};
// TODO: awulkiew - implement those:
//if ( m_min_elems_per_node < 1 )
@@ -216,7 +216,7 @@
choose_by_content_diff_tag,
split_default_tag,
linear_tag,
- node_default_static_tag
+ node_d_mem_static_tag
> type;
};
@@ -229,7 +229,7 @@
choose_by_content_diff_tag,
split_default_tag,
quadratic_tag,
- node_default_static_tag
+ node_d_mem_static_tag
> type;
};
@@ -242,7 +242,7 @@
choose_by_overlap_diff_tag,
split_default_tag,
rstar_tag,
- node_default_static_tag
+ node_d_mem_static_tag
> type;
};
@@ -255,7 +255,7 @@
// choose_by_content_diff_tag, // change it?
// split_kmeans_tag,
// int, // dummy tag - not used for now
-// node_default_static_tag
+// node_d_mem_static_tag
// > type;
//};
@@ -268,7 +268,7 @@
choose_by_content_diff_tag,
split_default_tag,
linear_tag,
- node_default_tag
+ node_d_mem_dynamic_tag
> type;
};
@@ -281,7 +281,7 @@
choose_by_content_diff_tag,
split_default_tag,
quadratic_tag,
- node_default_tag
+ node_d_mem_dynamic_tag
> type;
};
@@ -294,7 +294,7 @@
choose_by_overlap_diff_tag,
split_default_tag,
rstar_tag,
- node_default_tag
+ node_d_mem_dynamic_tag
> type;
};
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp 2012-09-29 07:37:57 EDT (Sat, 29 Sep 2012)
@@ -47,6 +47,8 @@
namespace boost { namespace geometry { namespace index {
+
+
/*!
The R-tree spatial index. This is self-balancing spatial index capable to store various types
of Values and balancing algorithms.
@@ -86,7 +88,7 @@
typedef typename options_type::node_tag node_tag;
typedef Allocator allocator_type;
- typedef typename detail::rtree::allocators<allocator_type, value_type, typename options_type::parameters_type, box_type, node_tag>::type allocators_type;
+ typedef detail::rtree::allocators<allocator_type, value_type, typename options_type::parameters_type, box_type, node_tag> allocators_type;
typedef typename allocators_type::size_type size_type;
typedef typename detail::rtree::node<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type node;
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