From 7949efd6d48eebc2e6f06c68fab91bc801abac29 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Fri, 22 Apr 2011 22:27:34 +0000 Subject: [PATCH] Doc update; Added boost_polygon.hpp header including the other adaption headers [SVN r71423] --- include/boost/geometry/core/closure.hpp | 24 ++++++++++++------- include/boost/geometry/core/interior_type.hpp | 17 +++++++------ include/boost/geometry/core/point_order.hpp | 19 ++++++++------- include/boost/geometry/core/ring_type.hpp | 11 +++++---- include/boost/geometry/core/tag.hpp | 2 ++ .../geometries/adapted/boost_polygon.hpp | 18 ++++++++++++++ 6 files changed, 64 insertions(+), 27 deletions(-) create mode 100644 include/boost/geometry/geometries/adapted/boost_polygon.hpp diff --git a/include/boost/geometry/core/closure.hpp b/include/boost/geometry/core/closure.hpp index bb806b3aa..c1d3a902c 100644 --- a/include/boost/geometry/core/closure.hpp +++ b/include/boost/geometry/core/closure.hpp @@ -32,11 +32,11 @@ namespace boost { namespace geometry \brief Enumerates options for defining if polygons are open or closed \ingroup enum \details The enumeration closure_selector describes options for if a polygon is - open or closed. In a closed polygon the very first point (per ring) should be - equal to the very last point. - The specific closing property of a polygon type is defined by the closure metafunction. - The closure metafunction defines a value, which is one of the values enumerated - in the closure_selector + open or closed. In a closed polygon the very first point (per ring) should + be equal to the very last point. + The specific closing property of a polygon type is defined by the closure + metafunction. The closure metafunction defines a value, which is one of the + values enumerated in the closure_selector \qbk{ [heading See also] @@ -45,8 +45,13 @@ namespace boost { namespace geometry */ enum closure_selector { + /// Rings are open: first point and last point are different, algorithms + /// close them explicitly on the fly open = 0, + /// Rings are closed: first point and last point must be the same closed = 1, + /// (Not yet implemented): algorithms first figure out if ring must be + /// closed on the fly closure_undertermined = -1 }; @@ -123,13 +128,15 @@ template struct closure : public core_detail::closure::closed {}; template -struct closure : public core_detail::closure::closed {}; +struct closure + : public core_detail::closure::closed {}; template struct closure { - static const closure_selector value = geometry::traits::closure::value; + static const closure_selector value + = geometry::traits::closure::value; }; // Specialization for polygon: the closure is the closure of its rings @@ -149,7 +156,8 @@ struct closure /*! -\brief \brief_meta{value, closure (clockwise\, counterclockwise), \meta_geometry_type} +\brief \brief_meta{value, closure (clockwise\, counterclockwise), + \meta_geometry_type} \tparam Geometry \tparam_geometry \ingroup core diff --git a/include/boost/geometry/core/interior_type.hpp b/include/boost/geometry/core/interior_type.hpp index 64a064ab2..805ca4b7b 100644 --- a/include/boost/geometry/core/interior_type.hpp +++ b/include/boost/geometry/core/interior_type.hpp @@ -123,13 +123,16 @@ struct interior_type /*! - \brief Meta-function defining container type - of inner rings of (multi)polygon geometriy - \details the interior rings should be organized as a container - (std::vector, std::deque, boost::array) with - boost range support. This meta function defines the type - of that container. - \ingroup core +\brief \brief_meta{type, interior_type (container type + of inner rings), \meta_geometry_type} +\details Interior rings should be organized as a container + (std::vector, std::deque, boost::array) with + Boost.Range support. This metafunction defines the type + of the container. +\tparam Geometry A type fullfilling the Polygon or MultiPolygon concept. +\ingroup core + +\qbk{[include reference/core/interior_type.qbk]} */ template struct interior_type diff --git a/include/boost/geometry/core/point_order.hpp b/include/boost/geometry/core/point_order.hpp index 675fee802..fa956e259 100644 --- a/include/boost/geometry/core/point_order.hpp +++ b/include/boost/geometry/core/point_order.hpp @@ -29,11 +29,11 @@ namespace boost { namespace geometry /*! \brief Enumerates options for the order of points within polygons \ingroup enum -\details The enumeration order_selector describes options for the order of points - within a polygon. Polygons can be ordered either clockwise or counterclockwise. - The specific order of a polygon type is defined by the point_order metafunction. - The point_order metafunction defines a value, which is one of the values enumerated - in the order_selector +\details The enumeration order_selector describes options for the order of + points within a polygon. Polygons can be ordered either clockwise or + counterclockwise. The specific order of a polygon type is defined by the + point_order metafunction. The point_order metafunction defines a value, + which is one of the values enumerated in the order_selector \qbk{ [heading See also] @@ -46,7 +46,8 @@ enum order_selector clockwise = 1, /// Points are ordered counter clockwise counterclockwise = 2, - /// Points might be stored in any order, the algorithm will find out (not yet supported) + /// Points might be stored in any order, algorithms will determine it on the + /// fly (not yet supported) order_undetermined = 0 }; @@ -119,7 +120,8 @@ struct point_order template struct point_order { - static const order_selector value = geometry::traits::point_order::value; + static const order_selector value + = geometry::traits::point_order::value; }; // Specialization for polygon: the order is the order of its rings @@ -138,7 +140,8 @@ struct point_order /*! -\brief \brief_meta{value, point order (clockwise\, counterclockwise), \meta_geometry_type} +\brief \brief_meta{value, point order (clockwise\, counterclockwise), + \meta_geometry_type} \tparam Geometry \tparam_geometry \ingroup core diff --git a/include/boost/geometry/core/ring_type.hpp b/include/boost/geometry/core/ring_type.hpp index cf79fc65e..a53b95c96 100644 --- a/include/boost/geometry/core/ring_type.hpp +++ b/include/boost/geometry/core/ring_type.hpp @@ -132,12 +132,15 @@ struct ring_type /*! -\brief Meta-function which defines ring type of (multi)polygon geometry -\details a polygon contains one exterior ring +\brief \brief_meta{type, ring_type, \meta_geometry_type} +\details A polygon contains one exterior ring and zero or more interior rings (holes). - This meta function retrieves the type of the rings -\note Exterior ring and interior rings must have the same ring-type. + This metafunction retrieves the type of the rings. + Exterior ring and each of the interior rings all have the same ring_type. +\tparam Geometry A type fullfilling the Ring, Polygon or MultiPolygon concept. \ingroup core + +\qbk{[include reference/core/ring_type.qbk]} */ template struct ring_type diff --git a/include/boost/geometry/core/tag.hpp b/include/boost/geometry/core/tag.hpp index f8f622e74..b5e44958e 100644 --- a/include/boost/geometry/core/tag.hpp +++ b/include/boost/geometry/core/tag.hpp @@ -49,6 +49,8 @@ struct tag /*! \brief \brief_meta{type, tag, \meta_geometry_type} +\details With Boost.Geometry, tags are the driving force of the tag dispatching + mechanism. The tag metafunction is therefore used in every free function. \tparam Geometry \tparam_geometry \ingroup core diff --git a/include/boost/geometry/geometries/adapted/boost_polygon.hpp b/include/boost/geometry/geometries/adapted/boost_polygon.hpp new file mode 100644 index 000000000..9fe982b04 --- /dev/null +++ b/include/boost/geometry/geometries/adapted/boost_polygon.hpp @@ -0,0 +1,18 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2010-2011 Barend Gehrels, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_POLYGON_HPP +#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_POLYGON_HPP + +#include +#include +#include +#include + +#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_POLYGON_HPP +