]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/algorithms/detail/is_valid/debug_validity_phase.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / is_valid / debug_validity_phase.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
92f5a8d4 3// Copyright (c) 2014, 2018, Oracle and/or its affiliates.
7c673cae
FG
4
5// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
92f5a8d4 6// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7c673cae
FG
7
8// Licensed under the Boost Software License version 1.0.
9// http://www.boost.org/users/license.html
10
11#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
12#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_DEBUG_VALIDITY_PHASE_HPP
13
14#ifdef GEOMETRY_TEST_DEBUG
15#include <iostream>
92f5a8d4 16#endif
7c673cae
FG
17
18#include <boost/geometry/core/tag.hpp>
19#include <boost/geometry/core/tags.hpp>
7c673cae
FG
20
21namespace boost { namespace geometry
22{
23
24namespace detail { namespace is_valid
25{
26
27template <typename Geometry, typename Tag = typename tag<Geometry>::type>
28struct debug_validity_phase
29{
30 static inline void apply(int)
31 {
32 }
33};
34
35#ifdef BOOST_GEOMETRY_TEST_DEBUG
36template <typename Polygon>
37struct 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