segment_intersect_concept.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
  5. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  6. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  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. #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SEGMENT_INTERSECT_CONCEPT_HPP
  11. #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SEGMENT_INTERSECT_CONCEPT_HPP
  12. //NOT FINISHED!
  13. #include <boost/concept_check.hpp>
  14. namespace boost { namespace geometry { namespace concepts
  15. {
  16. /*!
  17. \brief Checks strategy for segment intersection
  18. \ingroup segment_intersection
  19. */
  20. template <typename Strategy>
  21. class SegmentIntersectStrategy
  22. {
  23. #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
  24. // 1) must define return_type
  25. typedef typename Strategy::return_type return_type;
  26. // 2) must define point_type (of segment points)
  27. //typedef typename Strategy::point_type point_type;
  28. // 3) must define segment_type 1 and 2 (of segment points)
  29. typedef typename Strategy::segment_type1 segment_type1;
  30. typedef typename Strategy::segment_type2 segment_type2;
  31. struct check_methods
  32. {
  33. static void apply()
  34. {
  35. Strategy const* str;
  36. return_type* rt;
  37. //point_type const* p;
  38. segment_type1 const* s1;
  39. segment_type2 const* s2;
  40. // 4) must implement a method apply
  41. // having two segments
  42. *rt = str->apply(*s1, *s2);
  43. }
  44. };
  45. public :
  46. BOOST_CONCEPT_USAGE(SegmentIntersectStrategy)
  47. {
  48. check_methods::apply();
  49. }
  50. #endif
  51. };
  52. }}} // namespace boost::geometry::concepts
  53. #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SEGMENT_INTERSECT_CONCEPT_HPP