|
||||
File indexing completed on 2025-01-18 09:36:44
0001 // Boost.Geometry (aka GGL, Generic Geometry Library) 0002 0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. 0004 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. 0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. 0006 0007 // This file was modified by Oracle on 2014. 0008 // Modifications copyright (c) 2014 Oracle and/or its affiliates. 0009 0010 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle 0011 0012 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library 0013 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. 0014 0015 // Use, modification and distribution is subject to the Boost Software License, 0016 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0017 // http://www.boost.org/LICENSE_1_0.txt) 0018 0019 #ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP 0020 #define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP 0021 0022 0023 #include <vector> 0024 0025 #include <boost/concept_check.hpp> 0026 0027 0028 namespace boost { namespace geometry { namespace concepts 0029 { 0030 0031 0032 /*! 0033 \brief Checks strategy for convex_hull 0034 \ingroup convex_hull 0035 */ 0036 template <typename Strategy> 0037 class ConvexHullStrategy 0038 { 0039 #ifndef DOXYGEN_NO_CONCEPT_MEMBERS 0040 0041 // 1) must define state_type 0042 typedef typename Strategy::state_type state_type; 0043 0044 // 2) must define point_type 0045 typedef typename Strategy::point_type point_type; 0046 0047 // 3) must define geometry_type 0048 typedef typename Strategy::geometry_type geometry_type; 0049 0050 struct check_methods 0051 { 0052 static void apply() 0053 { 0054 Strategy const* str = 0; 0055 0056 state_type* st = 0; 0057 geometry_type* sp = 0; 0058 std::vector<point_type> *v = 0; 0059 0060 // 4) must implement a method apply, iterating over a range 0061 str->apply(*sp, *st); 0062 0063 // 5) must implement a method result, with an output iterator 0064 str->result(*st, std::back_inserter(*v), true, true); 0065 } 0066 }; 0067 0068 public : 0069 BOOST_CONCEPT_USAGE(ConvexHullStrategy) 0070 { 0071 check_methods::apply(); 0072 } 0073 #endif 0074 }; 0075 0076 0077 }}} // namespace boost::geometry::concepts 0078 0079 0080 #endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |