3964db256ca16b58e914e3461c174b089d7e1f47
[platform/upstream/boost.git] / boost / geometry / multi / core / closure.hpp
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_CORE_CLOSURE_HPP
15 #define BOOST_GEOMETRY_MULTI_CORE_CLOSURE_HPP
16
17
18 #include <boost/mpl/assert.hpp>
19 #include <boost/range.hpp>
20 #include <boost/type_traits/remove_const.hpp>
21
22 #include <boost/geometry/core/closure.hpp>
23 #include <boost/geometry/multi/core/tags.hpp>
24
25 namespace boost { namespace geometry
26 {
27
28
29 #ifndef DOXYGEN_NO_DISPATCH
30 namespace core_dispatch
31 {
32
33 template <typename Multi>
34 struct closure<multi_point_tag, Multi> : public core_detail::closure::closed {};
35
36 template <typename Multi>
37 struct closure<multi_linestring_tag, Multi> : public core_detail::closure::closed {};
38
39 // Specialization for polygon: the closure is the closure of its rings
40 template <typename MultiPolygon>
41 struct closure<multi_polygon_tag, MultiPolygon>
42 {
43     static const closure_selector value = core_dispatch::closure
44         <
45             polygon_tag,
46             typename boost::range_value<MultiPolygon>::type
47         >::value ;
48 };
49
50
51 } // namespace core_dispatch
52 #endif // DOXYGEN_NO_DISPATCH
53
54
55 }} // namespace boost::geometry
56
57
58 #endif // BOOST_GEOMETRY_MULTI_CORE_CLOSURE_HPP