]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry Index |
2 | // | |
3 | // R-tree leaf node checking visitor implementation | |
4 | // | |
5 | // Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland. | |
6 | // | |
7 | // Use, modification and distribution is subject to the Boost Software License, | |
8 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
9 | // http://www.boost.org/LICENSE_1_0.txt) | |
10 | ||
11 | #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP | |
12 | #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP | |
13 | ||
14 | namespace boost { namespace geometry { namespace index { | |
15 | ||
16 | namespace detail { namespace rtree { namespace visitors { | |
17 | ||
18 | template <typename Value, typename Options, typename Box, typename Allocators> | |
19 | struct is_leaf : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type | |
20 | { | |
21 | typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node; | |
22 | typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf; | |
23 | ||
24 | is_leaf() | |
25 | : result(false) | |
26 | {} | |
27 | ||
28 | inline void operator()(internal_node const&) | |
29 | { | |
30 | // result = false; | |
31 | } | |
32 | ||
33 | inline void operator()(leaf const&) | |
34 | { | |
35 | result = true; | |
36 | } | |
37 | ||
38 | bool result; | |
39 | }; | |
40 | ||
41 | }}} // namespace detail::rtree::visitors | |
42 | ||
43 | }}} // namespace boost::geometry::index | |
44 | ||
45 | #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP |