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@101: // This file was modified by Oracle on 2014. Chris@101: // Modifications copyright (c) 2014 Oracle and/or its affiliates. Chris@101: Chris@101: // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle Chris@101: 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_CONVEX_HULL_CONCEPT_HPP Chris@16: #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP Chris@16: Chris@16: Chris@16: #include 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 convex_hull Chris@16: \ingroup convex_hull Chris@16: */ Chris@16: template Chris@16: class ConvexHullStrategy 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 point_type Chris@16: typedef typename Strategy::point_type point_type; Chris@16: Chris@16: // 3) must define geometry_type Chris@16: typedef typename Strategy::geometry_type geometry_type; Chris@16: Chris@16: struct check_methods Chris@16: { Chris@16: static void apply() Chris@16: { Chris@101: Strategy const* str = 0; Chris@16: Chris@101: state_type* st = 0; Chris@101: geometry_type* sp = 0; Chris@101: std::vector *v = 0; Chris@16: Chris@16: // 4) must implement a method apply, iterating over a range Chris@16: str->apply(*sp, *st); Chris@16: Chris@16: // 5) must implement a method result, with an output iterator Chris@101: str->result(*st, std::back_inserter(*v), true, true); Chris@16: } Chris@16: }; Chris@16: Chris@16: public : Chris@16: BOOST_CONCEPT_USAGE(ConvexHullStrategy) Chris@16: { Chris@16: check_methods::apply(); 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_CONVEX_HULL_CONCEPT_HPP