1 // Boost.Geometry (aka GGL, Generic Geometry Library)
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.
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
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)
14 #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP
15 #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP
18 #include <boost/concept_check.hpp>
21 namespace boost { namespace geometry { namespace concepts
26 \brief Checks strategy for area
29 template <typename Strategy>
32 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS
34 // 1) must define state_type,
35 typedef typename Strategy::state_type state_type;
37 // 2) must define return_type,
38 typedef typename Strategy::return_type return_type;
40 // 3) must define point_type, of polygon (segments)
41 typedef typename Strategy::segment_point_type spoint_type;
47 Strategy const* str = 0;
50 // 4) must implement a method apply with the following signature
51 spoint_type const* sp = 0;
52 str->apply(*sp, *sp, *st);
54 // 5) must implement a static method result with the following signature
55 return_type r = str->result(*st);
57 boost::ignore_unused_variable_warning(r);
58 boost::ignore_unused_variable_warning(str);
63 BOOST_CONCEPT_USAGE(AreaStrategy)
65 check_methods::apply();
72 }}} // namespace boost::geometry::concepts
75 #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP