• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // This file was modified by Oracle on 2019.
8 // Modifications copyright (c) 2019 Oracle and/or its affiliates.
9 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10 //
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14 
15 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP
16 #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP
17 
18 namespace boost { namespace geometry { namespace index {
19 
20 namespace detail { namespace rtree { namespace visitors {
21 
22 template <typename MembersHolder>
23 struct is_leaf
24     : public MembersHolder::visitor_const
25 {
26     typedef typename MembersHolder::internal_node internal_node;
27     typedef typename MembersHolder::leaf leaf;
28 
is_leafboost::geometry::index::detail::rtree::visitors::is_leaf29     is_leaf()
30         : result(false)
31     {}
32 
operator ()boost::geometry::index::detail::rtree::visitors::is_leaf33     inline void operator()(internal_node const&)
34     {
35         // result = false;
36     }
37 
operator ()boost::geometry::index::detail::rtree::visitors::is_leaf38     inline void operator()(leaf const&)
39     {
40         result = true;
41     }
42 
43     bool result;
44 };
45 
46 }}} // namespace detail::rtree::visitors
47 
48 }}} // namespace boost::geometry::index
49 
50 #endif // BOOST_GEOMETRY_INDEX_DETAIL_RTREE_VISITORS_IS_LEAF_HPP
51