Chris@102: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@102: Chris@102: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@102: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@102: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@102: Chris@102: // This file was modified by Oracle on 2014. Chris@102: // Modifications copyright (c) 2014 Oracle and/or its affiliates. Chris@102: Chris@102: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@102: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@102: Chris@102: // Use, modification and distribution is subject to the Boost Software License, Chris@102: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: Chris@102: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle Chris@102: Chris@102: #ifndef BOOST_GEOMETRY_VIEWS_DETAIL_NORMALIZED_VIEW_HPP Chris@102: #define BOOST_GEOMETRY_VIEWS_DETAIL_NORMALIZED_VIEW_HPP Chris@102: Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { namespace geometry { Chris@102: Chris@102: Chris@102: #ifndef DOXYGEN_NO_DETAIL Chris@102: Chris@102: namespace detail { Chris@102: Chris@102: template Chris@102: struct normalized_view Chris@102: { Chris@102: static const bool is_const = boost::is_const::value; Chris@102: Chris@102: //typedef typename ring_type::type ring_type; Chris@102: Chris@102: typedef typename detail::range_type::type range_type; Chris@102: Chris@102: typedef typename Chris@102: boost::mpl::if_c Chris@102: < Chris@102: is_const, Chris@102: range_type const, Chris@102: range_type Chris@102: >::type range; Chris@102: Chris@102: typedef typename Chris@102: reversible_view Chris@102: < Chris@102: range, Chris@102: order_as_direction Chris@102: < Chris@102: geometry::point_order::value Chris@102: >::value Chris@102: >::type reversible_type; Chris@102: Chris@102: typedef typename Chris@102: boost::mpl::if_c Chris@102: < Chris@102: is_const, Chris@102: reversible_type const, Chris@102: reversible_type Chris@102: >::type reversible; Chris@102: Chris@102: typedef typename Chris@102: closeable_view Chris@102: < Chris@102: reversible, Chris@102: geometry::closure::value Chris@102: >::type closeable_type; Chris@102: Chris@102: typedef typename Chris@102: boost::mpl::if_c Chris@102: < Chris@102: is_const, Chris@102: closeable_type const, Chris@102: closeable_type Chris@102: >::type closeable; Chris@102: Chris@102: explicit inline normalized_view(range & r) Chris@102: : m_reversible(r) Chris@102: , m_closeable(m_reversible) Chris@102: {} Chris@102: Chris@102: typedef typename boost::range_iterator::type iterator; Chris@102: typedef typename boost::range_const_iterator::type const_iterator; Chris@102: Chris@102: inline const_iterator begin() const { return boost::begin(m_closeable); } Chris@102: inline const_iterator end() const { return boost::end(m_closeable); } Chris@102: Chris@102: inline iterator begin() { return boost::begin(m_closeable); } Chris@102: inline iterator end() { return boost::end(m_closeable); } Chris@102: Chris@102: private: Chris@102: reversible_type m_reversible; Chris@102: closeable_type m_closeable; Chris@102: }; Chris@102: Chris@102: } // namespace detail Chris@102: Chris@102: #endif // DOXYGEN_NO_DETAIL Chris@102: Chris@102: Chris@102: }} // namespace boost::geometry Chris@102: Chris@102: Chris@102: #endif // BOOST_GEOMETRY_VIEWS_DETAIL_NORMALIZED_VIEW_HPP