~ubuntu-branches/debian/sid/boost1.49/sid

« back to all changes in this revision

Viewing changes to boost/geometry/multi/algorithms/detail/for_each_range.hpp

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2012-02-26 00:31:44 UTC
  • Revision ID: package-import@ubuntu.com-20120226003144-eaytp12cbf6ubpms
Tags: upstream-1.49.0
ImportĀ upstreamĀ versionĀ 1.49.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Boost.Geometry (aka GGL, Generic Geometry Library)
 
2
 
 
3
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
 
4
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
 
5
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
 
6
 
 
7
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
 
8
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
 
9
 
 
10
// Use, modification and distribution is subject to the Boost Software License,
 
11
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 
12
// http://www.boost.org/LICENSE_1_0.txt)
 
13
 
 
14
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
 
15
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
 
16
 
 
17
 
 
18
#include <boost/range.hpp>
 
19
#include <boost/typeof/typeof.hpp>
 
20
 
 
21
#include <boost/geometry/algorithms/detail/for_each_range.hpp>
 
22
 
 
23
#include <boost/geometry/multi/core/tags.hpp>
 
24
 
 
25
 
 
26
namespace boost { namespace geometry
 
27
{
 
28
 
 
29
 
 
30
#ifndef DOXYGEN_NO_DETAIL
 
31
namespace detail { namespace for_each
 
32
{
 
33
 
 
34
 
 
35
template <typename Multi, typename Actor, bool IsConst>
 
36
struct fe_range_multi
 
37
{
 
38
    static inline void apply(
 
39
                    typename add_const_if_c<IsConst, Multi>::type& multi,
 
40
                    Actor& actor)
 
41
    {
 
42
        for(BOOST_AUTO_TPL(it, boost::begin(multi)); it != boost::end(multi); ++it)
 
43
        {
 
44
            geometry::detail::for_each_range(*it, actor);
 
45
        }
 
46
    }
 
47
};
 
48
 
 
49
 
 
50
 
 
51
}} // namespace detail::for_each
 
52
#endif // DOXYGEN_NO_DETAIL
 
53
 
 
54
 
 
55
#ifndef DOXYGEN_NO_DISPATCH
 
56
namespace dispatch
 
57
{
 
58
 
 
59
 
 
60
template <typename MultiPoint, typename Actor, bool IsConst>
 
61
struct for_each_range<multi_point_tag, MultiPoint, Actor, IsConst>
 
62
    : detail::for_each::fe_range_range<MultiPoint, Actor, IsConst>
 
63
{};
 
64
 
 
65
template <typename Geometry, typename Actor, bool IsConst>
 
66
struct for_each_range<multi_linestring_tag, Geometry, Actor, IsConst>
 
67
    :
 
68
    detail::for_each::fe_range_multi<Geometry, Actor, IsConst>
 
69
{};
 
70
 
 
71
template <typename Geometry, typename Actor, bool IsConst>
 
72
struct for_each_range<multi_polygon_tag, Geometry, Actor, IsConst>
 
73
    :
 
74
    detail::for_each::fe_range_multi<Geometry, Actor, IsConst>
 
75
{};
 
76
 
 
77
 
 
78
} // namespace dispatch
 
79
#endif // DOXYGEN_NO_DISPATCH
 
80
 
 
81
 
 
82
 
 
83
}} // namespace boost::geometry
 
84
 
 
85
 
 
86
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP