1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_VISIT_INFO_HPP
10 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_VISIT_INFO_HPP
13 namespace boost { namespace geometry
16 #ifndef DOXYGEN_NO_DETAIL
17 namespace detail { namespace overlay
23 static const int NONE = 0;
24 static const int STARTED = 1;
25 static const int VISITED = 2;
26 static const int FINISHED = 3;
27 static const int REJECTED = 4;
38 inline void set_visited() { m_visit_code = VISITED; }
39 inline void set_started() { m_visit_code = STARTED; }
40 inline void set_finished() { m_visit_code = FINISHED; }
41 inline void set_rejected()
43 m_visit_code = REJECTED;
47 inline bool none() const { return m_visit_code == NONE; }
48 inline bool visited() const { return m_visit_code == VISITED; }
49 inline bool started() const { return m_visit_code == STARTED; }
50 inline bool finished() const { return m_visit_code == FINISHED; }
51 inline bool rejected() const { return m_rejected; }
61 #ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
62 friend std::ostream& operator<<(std::ostream &os, visit_info const& v)
64 if (v.m_visit_code != 0)
66 os << " VIS: " << int(v.m_visit_code);
75 }} // namespace detail::overlay
76 #endif //DOXYGEN_NO_DETAIL
79 }} // namespace boost::geometry
82 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_VISIT_INFO_HPP