File indexing completed on 2025-01-18 09:35:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_WEAK_VISITOR_HPP
0016 #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_WEAK_VISITOR_HPP
0017
0018 #include <boost/geometry/index/detail/assert.hpp>
0019
0020 namespace boost { namespace geometry { namespace index {
0021
0022 namespace detail { namespace rtree {
0023
0024
0025 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, bool IsVisitableConst>
0026 struct weak_visitor {};
0027
0028
0029
0030 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0031 struct weak_node {};
0032
0033
0034
0035 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0036 struct weak_internal_node;
0037
0038 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0039 struct weak_leaf;
0040
0041
0042
0043 template <typename Derived, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0044 inline Derived & get(weak_node<Value, Parameters, Box, Allocators, Tag> & n)
0045 {
0046 return static_cast<Derived&>(n);
0047 }
0048
0049
0050
0051 template <typename Visitor, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0052 inline void apply_visitor(Visitor & v,
0053 weak_node<Value, Parameters, Box, Allocators, Tag> & n,
0054 bool is_internal_node)
0055 {
0056 BOOST_GEOMETRY_INDEX_ASSERT(&n, "null ptr");
0057 if ( is_internal_node )
0058 {
0059 typedef weak_internal_node<Value, Parameters, Box, Allocators, Tag> internal_node;
0060 v(get<internal_node>(n));
0061 }
0062 else
0063 {
0064 typedef weak_leaf<Value, Parameters, Box, Allocators, Tag> leaf;
0065 v(get<leaf>(n));
0066 }
0067 }
0068
0069 }}
0070
0071 }}}
0072
0073 #endif