Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2014, 2018, 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_VALID_DEBUG_VALIDITY_PHASE_HPP
0012 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
0013 
0014 #ifdef GEOMETRY_TEST_DEBUG
0015 #include <iostream>
0016 #endif
0017 
0018 #include <boost/geometry/core/tag.hpp>
0019 #include <boost/geometry/core/tags.hpp>
0020 
0021 namespace boost { namespace geometry
0022 {
0023 
0024 namespace detail { namespace is_valid
0025 {
0026 
0027 template <typename Geometry, typename Tag = typename tag<Geometry>::type>
0028 struct debug_validity_phase
0029 {
0030     static inline void apply(int)
0031     {
0032     }
0033 };
0034 
0035 #ifdef BOOST_GEOMETRY_TEST_DEBUG
0036 template <typename Polygon>
0037 struct debug_validity_phase<Polygon, polygon_tag>
0038 {
0039     static inline void apply(int phase)
0040     {
0041         switch (phase)
0042         {
0043         case 1:
0044             std::cout << "checking exterior ring..." << std::endl;
0045             break;
0046         case 2:
0047             std::cout << "checking interior rings..." << std::endl;
0048             break;
0049         case 3:
0050             std::cout << "computing and analyzing turns..." << std::endl;
0051             break;
0052         case 4:
0053             std::cout << "checking if interior rings are inside "
0054                       << "the exterior ring..." << std::endl;
0055             break;
0056         case 5:
0057             std::cout << "checking connectivity of interior..." << std::endl;
0058             break;
0059         }
0060     }
0061 };
0062 #endif
0063 
0064 }} // namespace detail::is_valid
0065 
0066 }} // namespace boost::geometry
0067 
0068 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP