]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/concepts/area_concept.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / geometry / strategies / concepts / area_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 // Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
7
8 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
9 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
10
11 // Use, modification and distribution is subject to the Boost Software License,
12 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14
15 #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP
16 #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP
17
18
19 #include <boost/concept_check.hpp>
20
21
22 namespace boost { namespace geometry { namespace concepts
23 {
24
25
26 /*!
27 \brief Checks strategy for area
28 \ingroup area
29 */
30 template <typename Geometry, typename Strategy>
31 class AreaStrategy
32 {
33 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
34
35 // 1) must define state template,
36 typedef typename Strategy::template state<Geometry> state_type;
37
38 // 2) must define result_type template,
39 typedef typename Strategy::template result_type<Geometry>::type return_type;
40
41 struct check_methods
42 {
43 static void apply()
44 {
45 Strategy const* str = 0;
46 state_type *st = 0;
47
48 // 3) must implement a method apply with the following signature
49 typename geometry::point_type<Geometry>::type const* sp = 0;
50 str->apply(*sp, *sp, *st);
51
52 // 4) must implement a static method result with the following signature
53 return_type r = str->result(*st);
54
55 boost::ignore_unused_variable_warning(r);
56 boost::ignore_unused_variable_warning(str);
57 }
58 };
59
60 public :
61 BOOST_CONCEPT_USAGE(AreaStrategy)
62 {
63 check_methods::apply();
64 }
65
66 #endif
67 };
68
69
70 }}} // namespace boost::geometry::concepts
71
72
73 #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP