]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/detail/is_valid/debug_validity_phase.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / detail / is_valid / debug_validity_phase.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2014, Oracle and/or its affiliates.
4
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
6
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
12
13 #ifdef GEOMETRY_TEST_DEBUG
14 #include <iostream>
15
16 #include <boost/geometry/core/tag.hpp>
17 #include <boost/geometry/core/tags.hpp>
18 #endif
19
20
21 namespace boost { namespace geometry
22 {
23
24 namespace detail { namespace is_valid
25 {
26
27 template <typename Geometry, typename Tag = typename tag<Geometry>::type>
28 struct debug_validity_phase
29 {
30 static inline void apply(int)
31 {
32 }
33 };
34
35 #ifdef BOOST_GEOMETRY_TEST_DEBUG
36 template <typename Polygon>
37 struct debug_validity_phase<Polygon, polygon_tag>
38 {
39 static inline void apply(int phase)
40 {
41 switch (phase)
42 {
43 case 1:
44 std::cout << "checking exterior ring..." << std::endl;
45 break;
46 case 2:
47 std::cout << "checking interior rings..." << std::endl;
48 break;
49 case 3:
50 std::cout << "computing and analyzing turns..." << std::endl;
51 break;
52 case 4:
53 std::cout << "checking if interior rings are inside "
54 << "the exterior ring..." << std::endl;
55 break;
56 case 5:
57 std::cout << "checking connectivity of interior..." << std::endl;
58 break;
59 }
60 }
61 };
62 #endif
63
64 }} // namespace detail::is_valid
65
66 }} // namespace boost::geometry
67
68 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP