]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/strategies/concepts/convex_hull_concept.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / strategies / concepts / convex_hull_concept.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 // This file was modified by Oracle on 2014.
8 // Modifications copyright (c) 2014 Oracle and/or its affiliates.
9
10 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
11
12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
14
15 // Use, modification and distribution is subject to the Boost Software License,
16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
18
19 #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP
20 #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP
21
22
23 #include <vector>
24
25 #include <boost/concept_check.hpp>
26
27
28 namespace boost { namespace geometry { namespace concepts
29 {
30
31
32 /*!
33 \brief Checks strategy for convex_hull
34 \ingroup convex_hull
35 */
36 template <typename Strategy>
37 class ConvexHullStrategy
38 {
39 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
40
41 // 1) must define state_type
42 typedef typename Strategy::state_type state_type;
43
44 // 2) must define point_type
45 typedef typename Strategy::point_type point_type;
46
47 // 3) must define geometry_type
48 typedef typename Strategy::geometry_type geometry_type;
49
50 struct check_methods
51 {
52 static void apply()
53 {
54 Strategy const* str = 0;
55
56 state_type* st = 0;
57 geometry_type* sp = 0;
58 std::vector<point_type> *v = 0;
59
60 // 4) must implement a method apply, iterating over a range
61 str->apply(*sp, *st);
62
63 // 5) must implement a method result, with an output iterator
64 str->result(*st, std::back_inserter(*v), true, true);
65 }
66 };
67
68 public :
69 BOOST_CONCEPT_USAGE(ConvexHullStrategy)
70 {
71 check_methods::apply();
72 }
73 #endif
74 };
75
76
77 }}} // namespace boost::geometry::concepts
78
79
80 #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP