Chris@16: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@16: Chris@16: // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. Chris@16: // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. Chris@16: // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. Chris@16: Chris@16: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@16: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP Chris@16: #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP Chris@16: Chris@16: Chris@16: #include Chris@16: Chris@16: Chris@16: namespace boost { namespace geometry { namespace concept Chris@16: { Chris@16: Chris@16: Chris@16: /*! Chris@16: \brief Checks strategy for area Chris@16: \ingroup area Chris@16: */ Chris@16: template Chris@16: class AreaStrategy Chris@16: { Chris@16: #ifndef DOXYGEN_NO_CONCEPT_MEMBERS Chris@16: Chris@16: // 1) must define state_type, Chris@16: typedef typename Strategy::state_type state_type; Chris@16: Chris@16: // 2) must define return_type, Chris@16: typedef typename Strategy::return_type return_type; Chris@16: Chris@16: // 3) must define point_type, of polygon (segments) Chris@16: typedef typename Strategy::segment_point_type spoint_type; Chris@16: Chris@16: struct check_methods Chris@16: { Chris@16: static void apply() Chris@16: { Chris@16: Strategy const* str = 0; Chris@16: state_type *st = 0; Chris@16: Chris@16: // 4) must implement a method apply with the following signature Chris@16: spoint_type const* sp = 0; Chris@16: str->apply(*sp, *sp, *st); Chris@16: Chris@16: // 5) must implement a static method result with the following signature Chris@16: return_type r = str->result(*st); Chris@16: Chris@16: boost::ignore_unused_variable_warning(r); Chris@16: boost::ignore_unused_variable_warning(str); Chris@16: } Chris@16: }; Chris@16: Chris@16: public : Chris@16: BOOST_CONCEPT_USAGE(AreaStrategy) Chris@16: { Chris@16: check_methods::apply(); Chris@16: } Chris@16: Chris@16: #endif Chris@16: }; Chris@16: Chris@16: Chris@16: }}} // namespace boost::geometry::concept Chris@16: Chris@16: Chris@16: #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP