File indexing completed on 2025-01-18 09:35:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_VISITOR_HPP
0012 #define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_VISITOR_HPP
0013
0014 #include <boost/variant/apply_visitor.hpp>
0015 #include <boost/variant/get.hpp>
0016 #include <boost/variant/variant.hpp>
0017
0018 namespace boost { namespace geometry { namespace index {
0019
0020 namespace detail { namespace rtree {
0021
0022
0023
0024 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0025 struct variant_internal_node;
0026
0027 template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0028 struct variant_leaf;
0029
0030
0031
0032 template <typename V, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0033 inline V & get(
0034 boost::variant<
0035 variant_leaf<Value, Parameters, Box, Allocators, Tag>,
0036 variant_internal_node<Value, Parameters, Box, Allocators, Tag>
0037 > & v)
0038 {
0039 return boost::get<V>(v);
0040 }
0041
0042
0043
0044 template <typename Visitor, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0045 inline void apply_visitor(Visitor & v,
0046 boost::variant<
0047 variant_leaf<Value, Parameters, Box, Allocators, Tag>,
0048 variant_internal_node<Value, Parameters, Box, Allocators, Tag>
0049 > & n)
0050 {
0051 boost::apply_visitor(v, n);
0052 }
0053
0054 template <typename Visitor, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
0055 inline void apply_visitor(Visitor & v,
0056 boost::variant<
0057 variant_leaf<Value, Parameters, Box, Allocators, Tag>,
0058 variant_internal_node<Value, Parameters, Box, Allocators, Tag>
0059 > const& n)
0060 {
0061 boost::apply_visitor(v, n);
0062 }
0063
0064 }}
0065
0066 }}}
0067
0068 #endif