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;
40 inline void set_visited() { m_visit_code = VISITED; }
41 inline void set_started() { m_visit_code = STARTED; }
42 inline void set_finished() { m_visit_code = FINISHED; }
43 inline void set_rejected()
45 m_visit_code = REJECTED;
49 inline bool none() const { return m_visit_code == NONE; }
50 inline bool visited() const { return m_visit_code == VISITED; }
51 inline bool started() const { return m_visit_code == STARTED; }
52 inline bool finished() const { return m_visit_code == FINISHED; }
53 inline bool rejected() const { return m_rejected; }
54 inline bool finalized() const { return m_final; }
58 if (! m_rejected && ! m_final)
69 inline void finalize()
71 if (visited() || started() || finished() )
77 #ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
78 friend std::ostream& operator<<(std::ostream &os, visit_info const& v)
80 if (v.m_visit_code != 0)
82 os << " VIS: " << int(v.m_visit_code);
91 }} // namespace detail::overlay
92 #endif //DOXYGEN_NO_DETAIL
95 }} // namespace boost::geometry
98 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_VISIT_INFO_HPP