1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2014, Oracle and/or its affiliates.
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
13 #ifdef GEOMETRY_TEST_DEBUG
16 #include <boost/geometry/core/tag.hpp>
17 #include <boost/geometry/core/tags.hpp>
21 namespace boost { namespace geometry
24 namespace detail { namespace is_valid
27 template <typename Geometry, typename Tag = typename tag<Geometry>::type>
28 struct debug_validity_phase
30 static inline void apply(int)
35 #ifdef BOOST_GEOMETRY_TEST_DEBUG
36 template <typename Polygon>
37 struct debug_validity_phase<Polygon, polygon_tag>
39 static inline void apply(int phase)
44 std::cout << "checking exterior ring..." << std::endl;
47 std::cout << "checking interior rings..." << std::endl;
50 std::cout << "computing and analyzing turns..." << std::endl;
53 std::cout << "checking if interior rings are inside "
54 << "the exterior ring..." << std::endl;
57 std::cout << "checking connectivity of interior..." << std::endl;
64 }} // namespace detail::is_valid
66 }} // namespace boost::geometry
68 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP