Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:06

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2014-2017, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
0006 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0007 
0008 // Licensed under the Boost Software License version 1.0.
0009 // http://www.boost.org/users/license.html
0010 
0011 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP
0012 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP
0013 
0014 #include <boost/geometry/core/tags.hpp>
0015 
0016 #include <boost/geometry/algorithms/dispatch/is_simple.hpp>
0017 
0018 
0019 namespace boost { namespace geometry
0020 {
0021 
0022 
0023 #ifndef DOXYGEN_NO_DETAIL
0024 namespace detail { namespace is_simple
0025 {
0026 
0027 
0028 template <typename Geometry>
0029 struct always_simple
0030 {
0031     template <typename Strategy>
0032     static inline bool apply(Geometry const&, Strategy const&)
0033     {
0034         return true;
0035     }
0036 };
0037 
0038 
0039 }} // namespace detail::is_simple
0040 #endif // DOXYGEN_NO_DETAIL
0041 
0042 
0043 
0044 
0045 #ifndef DOXYGEN_NO_DISPATCH
0046 namespace dispatch
0047 {
0048 
0049 
0050 // A point is always simple
0051 template <typename Point>
0052 struct is_simple<Point, point_tag>
0053     : detail::is_simple::always_simple<Point>
0054 {};
0055 
0056 
0057 // A valid segment is always simple.
0058 // A segment is a curve.
0059 // A curve is simple if it does not pass through the same point twice,
0060 // with the possible exception of its two endpoints
0061 //
0062 // Reference: OGC 06-103r4 (6.1.6.1)
0063 template <typename Segment>
0064 struct is_simple<Segment, segment_tag>
0065     : detail::is_simple::always_simple<Segment>
0066 {};
0067 
0068 
0069 // A valid box is always simple
0070 // A box is a Polygon, and it satisfies the conditions for Polygon validity.
0071 //
0072 // Reference (for polygon validity): OGC 06-103r4 (6.1.11.1)
0073 template <typename Box>
0074 struct is_simple<Box, box_tag>
0075     : detail::is_simple::always_simple<Box>
0076 {};
0077 
0078 
0079 } // namespace dispatch
0080 #endif // DOXYGEN_NO_DISPATCH
0081 
0082 
0083 }} // namespace boost::geometry
0084 
0085 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP