Chris@16: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@16: Chris@16: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@16: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@16: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@16: Chris@16: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@16: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_GEOMETRY_VIEWS_REVERSIBLE_VIEW_HPP Chris@16: #define BOOST_GEOMETRY_VIEWS_REVERSIBLE_VIEW_HPP Chris@16: Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { namespace geometry Chris@16: { Chris@16: Chris@16: /*! Chris@16: \brief Flag for iterating a reversible_view in forward or reverse direction Chris@16: \ingroup views Chris@16: */ Chris@16: enum iterate_direction { iterate_forward, iterate_reverse }; Chris@16: Chris@16: /*! Chris@16: \brief View on a range, reversing direction if necessary Chris@16: \tparam Range original range Chris@16: \tparam Direction direction of iteration Chris@16: \ingroup views Chris@16: */ Chris@16: template Chris@16: struct reversible_view {}; Chris@16: Chris@16: Chris@16: Chris@16: #ifndef DOXYGEN_NO_SPECIALIZATIONS Chris@16: Chris@16: template Chris@16: struct reversible_view Chris@16: { Chris@16: typedef identity_view type; Chris@16: }; Chris@16: Chris@16: Chris@16: template Chris@16: struct reversible_view Chris@16: { Chris@16: #if BOOST_VERSION > 104500 Chris@16: typedef boost::reversed_range type; Chris@16: #else Chris@16: // For older versions of Boost Chris@16: typedef boost::range_detail::reverse_range type; Chris@16: #endif Chris@16: }; Chris@16: Chris@16: #endif // DOXYGEN_NO_SPECIALIZATIONS Chris@16: Chris@16: Chris@16: }} // namespace boost::geometry Chris@16: Chris@16: Chris@16: #endif // BOOST_GEOMETRY_VIEWS_REVERSIBLE_VIEW_HPP