index.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Boost.Geometry Index
  2. //
  3. // R-tree strategies
  4. //
  5. // Copyright (c) 2019, Oracle and/or its affiliates.
  6. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  7. //
  8. // Use, modification and distribution is subject to the Boost Software License,
  9. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  10. // http://www.boost.org/LICENSE_1_0.txt)
  11. #ifndef BOOST_GEOMETRY_STRATEGIES_INDEX_HPP
  12. #define BOOST_GEOMETRY_STRATEGIES_INDEX_HPP
  13. #include <boost/geometry/core/cs.hpp>
  14. #include <boost/geometry/strategies/default_strategy.hpp>
  15. namespace boost { namespace geometry { namespace strategy { namespace index
  16. {
  17. namespace services
  18. {
  19. template
  20. <
  21. typename Geometry,
  22. typename CSTag = typename geometry::cs_tag<Geometry>::type
  23. >
  24. struct default_strategy
  25. {
  26. /*BOOST_MPL_ASSERT_MSG
  27. (
  28. false, NOT_IMPLEMENTED_FOR_THESE_TYPES
  29. , (types<Geometry>)
  30. );*/
  31. typedef geometry::default_strategy type;
  32. };
  33. // TEMP
  34. // Utility to get index strategy from other strategy
  35. // In the final version this utility will probably replaced with some other mechanism
  36. // The issue is cross-dependencies between strategies
  37. template <typename Strategy>
  38. struct from_strategy
  39. {
  40. /*BOOST_MPL_ASSERT_MSG
  41. (
  42. false, NOT_IMPLEMENTED_FOR_THESE_TYPES
  43. , (types<Strategy>)
  44. );*/
  45. typedef geometry::default_strategy type;
  46. static inline type get(Strategy const&)
  47. {
  48. return type();
  49. }
  50. };
  51. } // namespace services
  52. }}}} // namespace boost::geometry::strategy::index
  53. #endif // BOOST_GEOMETRY_STRATEGIES_INDEX_HPP