|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71330 - in trunk/libs/geometry/doc: . reference/core src/examples/core
From: barend.gehrels_at_[hidden]
Date: 2011-04-16 16:43:56
Author: barendgehrels
Date: 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
New Revision: 71330
URL: http://svn.boost.org/trac/boost/changeset/71330
Log:
Doc update (metafunctions tag, tag_cast, point_type)
Added:
trunk/libs/geometry/doc/reference/core/point_type.qbk (contents, props changed)
trunk/libs/geometry/doc/reference/core/tag.qbk (contents, props changed)
trunk/libs/geometry/doc/reference/core/tag_cast.qbk (contents, props changed)
trunk/libs/geometry/doc/src/examples/core/point_type.cpp (contents, props changed)
trunk/libs/geometry/doc/src/examples/core/tag.cpp (contents, props changed)
trunk/libs/geometry/doc/src/examples/core/tag_cast.cpp (contents, props changed)
Text files modified:
trunk/libs/geometry/doc/imports.qbk | 4 ++++
trunk/libs/geometry/doc/make_qbk.py | 4 ++--
trunk/libs/geometry/doc/quickref.xml | 7 ++-----
trunk/libs/geometry/doc/reference.qbk | 3 +--
trunk/libs/geometry/doc/src/examples/core/Jamfile.v2 | 4 ++++
trunk/libs/geometry/doc/src/examples/core/coordinate_system.cpp | 1 +
trunk/libs/geometry/doc/src/examples/core/coordinate_type.cpp | 1 +
7 files changed, 15 insertions(+), 9 deletions(-)
Modified: trunk/libs/geometry/doc/imports.qbk
==============================================================================
--- trunk/libs/geometry/doc/imports.qbk (original)
+++ trunk/libs/geometry/doc/imports.qbk 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -69,5 +69,9 @@
[import src/examples/core/set_box.cpp]
[import src/examples/core/degree_radian.cpp]
+[import src/examples/core/point_type.cpp]
+[import src/examples/core/tag.cpp]
+[import src/examples/core/tag_cast.cpp]
+
[import src/examples/geometries/point.cpp]
[import src/examples/geometries/register/point.cpp]
Modified: trunk/libs/geometry/doc/make_qbk.py
==============================================================================
--- trunk/libs/geometry/doc/make_qbk.py (original)
+++ trunk/libs/geometry/doc/make_qbk.py 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -81,10 +81,10 @@
coordinate_systems = ["cartesian", "geographic", "polar", "spherical"]
core = ["closure", "coordinate_system", "coordinate_type", "cs_tag"
- , "dimension", "exception", "geometry_id", "interior_type"
+ , "dimension", "exception", "interior_type"
, "degree", "radian"
, "is_radian", "point_order"
- , "point_type", "ring_type", "tag", "topological_dimension" ]
+ , "point_type", "ring_type", "tag", "tag_cast" ]
exceptions = ["exception", "centroid_exception"];
Modified: trunk/libs/geometry/doc/quickref.xml
==============================================================================
--- trunk/libs/geometry/doc/quickref.xml (original)
+++ trunk/libs/geometry/doc/quickref.xml 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -133,20 +133,17 @@
<bridgehead renderas="sect3">Metafunctions</bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="geometry.reference.core.cs_tag">cs_tag</link></member>
+ <member><link linkend="geometry.reference.core.closure">closure</link></member>
<member><link linkend="geometry.reference.core.coordinate_type">coordinate_type</link></member>
<member><link linkend="geometry.reference.core.coordinate_system">coordinate_system</link></member>
<member><link linkend="geometry.reference.core.dimension">dimension</link></member>
- <member><link linkend="geometry.reference.core.geometry_id">geometry_id</link></member>
<member><link linkend="geometry.reference.core.interior_type">interior_type</link></member>
<member><link linkend="geometry.reference.core.is_radian">is_radian</link></member>
<member><link linkend="geometry.reference.core.point_order">point_order</link></member>
<member><link linkend="geometry.reference.core.point_type">point_type</link></member>
<member><link linkend="geometry.reference.core.ring_type">ring_type</link></member>
- <!-- for internal use only (detail?)
- <member><link linkend="geometry.reference.core.reverse_dispatch">reverse_dispatch</link></member>
- -->
<member><link linkend="geometry.reference.core.tag">tag</link></member>
- <member><link linkend="geometry.reference.core.topological_dimension">topological_dimension</link></member>
+ <member><link linkend="geometry.reference.core.tag_cast">tag_cast</link></member>
</simplelist>
</entry>
<entry valign="top">
Modified: trunk/libs/geometry/doc/reference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference.qbk (original)
+++ trunk/libs/geometry/doc/reference.qbk 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -176,7 +176,6 @@
[include generated/degree.qbk]
[include generated/dimension.qbk]
[include generated/exception.qbk]
-[include generated/geometry_id.qbk]
[include generated/interior_type.qbk]
[include generated/is_radian.qbk]
[include generated/point_order.qbk]
@@ -184,7 +183,7 @@
[include generated/radian.qbk]
[include generated/ring_type.qbk]
[include generated/tag.qbk]
-[include generated/topological_dimension.qbk]
+[include generated/tag_cast.qbk]
[endsect] [/core metafunctions]
[section:enumerations Enumerations]
Added: trunk/libs/geometry/doc/reference/core/point_type.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/core/point_type.qbk 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,17 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-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)
+=============================================================================/]
+
+
+[heading Complexity]
+Compile time
+
+[heading Example]
+[point_type]
+[point_type_output]
Added: trunk/libs/geometry/doc/reference/core/tag.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/core/tag.qbk 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,20 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-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)
+=============================================================================/]
+
+[note With Boost.Geometry, tags are the driving force of the tag dispatching
+ mechanism. The tag metafunction is therefore used in every free function.
+]
+
+[heading Complexity]
+Compile time
+
+[heading Example]
+[tag]
+[tag_output]
Added: trunk/libs/geometry/doc/reference/core/tag_cast.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/core/tag_cast.qbk 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,26 @@
+[/============================================================================
+ Boost.Geometry (aka GGL, Generic Geometry Library)
+
+ Copyright (c) 2009-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)
+=============================================================================/]
+
+[note The specified tag list is handled in the specified order: as soon as a tag
+ inheriting the specified tag is found, it is defined as the metafunction
+ typedef [*type].
+]
+
+[note If none of the specified possible base tags is a base class of the
+ specified tag, the tag itself is defined as the [*type] result of the
+ metafunction.
+]
+[heading Complexity]
+Compile time
+
+[heading Example]
+[tag_cast]
+[tag_cast_output]
+
Modified: trunk/libs/geometry/doc/src/examples/core/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/doc/src/examples/core/Jamfile.v2 (original)
+++ trunk/libs/geometry/doc/src/examples/core/Jamfile.v2 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -24,3 +24,7 @@
exe coordinate_dimension : coordinate_dimension.cpp ;
exe point_order : point_order.cpp ;
exe closure : closure.cpp ;
+
+exe point_type : point_type.cpp ;
+exe tag : tag.cpp ;
+exe tag_cast : tag_cast.cpp ;
Modified: trunk/libs/geometry/doc/src/examples/core/coordinate_system.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/examples/core/coordinate_system.cpp (original)
+++ trunk/libs/geometry/doc/src/examples/core/coordinate_system.cpp 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -11,6 +11,7 @@
//` Examine the coordinate system of a point
#include <iostream>
+#include <typeinfo>
#include <boost/geometry/geometry.hpp>
int main()
Modified: trunk/libs/geometry/doc/src/examples/core/coordinate_type.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/examples/core/coordinate_type.cpp (original)
+++ trunk/libs/geometry/doc/src/examples/core/coordinate_type.cpp 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -11,6 +11,7 @@
//` Examine the coordinate type of a point
#include <iostream>
+#include <typeinfo>
#include <boost/geometry/geometry.hpp>
int main()
Added: trunk/libs/geometry/doc/src/examples/core/point_type.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/core/point_type.cpp 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,40 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 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)
+
+//[point_type
+//` Examine the point type of a multi_polygon
+
+#include <iostream>
+#include <typeinfo>
+#include <boost/geometry/geometry.hpp>
+
+int main()
+{
+ typedef boost::geometry::model::d2::point_xy<double> point_type;
+ typedef boost::geometry::model::polygon<point_type> polygon_type;
+ typedef boost::geometry::model::multi_polygon<polygon_type> mp_type;
+
+ typedef boost::geometry::point_type<mp_type>::type ptype;
+
+ std::cout << "point type: " << typeid(ptype).name() << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[point_type_output
+/*`
+Output (in MSVC):
+[pre
+point type: class boost::geometry::model::d2::point_xy<double,struct boost::geometry::cs::cartesian>
+]
+*/
+//]
Added: trunk/libs/geometry/doc/src/examples/core/tag.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/core/tag.cpp 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,48 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 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)
+
+//[tag
+//` Examine the tag of some geometry types
+
+#include <iostream>
+#include <typeinfo>
+#include <boost/geometry/geometry.hpp>
+
+int main()
+{
+ typedef boost::geometry::model::d2::point_xy<double> point_type;
+ typedef boost::geometry::model::polygon<point_type> polygon_type;
+ typedef boost::geometry::model::multi_polygon<polygon_type> mp_type;
+
+ typedef boost::geometry::tag<point_type>::type tag1;
+ typedef boost::geometry::tag<polygon_type>::type tag2;
+ typedef boost::geometry::tag<mp_type>::type tag3;
+
+ std::cout
+ << "tag 1: " << typeid(tag1).name() << std::endl
+ << "tag 2: " << typeid(tag2).name() << std::endl
+ << "tag 3: " << typeid(tag3).name() << std::endl
+ ;
+
+ return 0;
+}
+
+//]
+
+
+//[tag_output
+/*`
+Output (in MSVC):
+[pre
+tag 1: struct boost::geometry::point_tag
+tag 2: struct boost::geometry::polygon_tag
+tag 3: struct boost::geometry::multi_polygon_tag
+]
+*/
+//]
Added: trunk/libs/geometry/doc/src/examples/core/tag_cast.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/core/tag_cast.cpp 2011-04-16 16:43:54 EDT (Sat, 16 Apr 2011)
@@ -0,0 +1,43 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// QuickBook Example
+
+// Copyright (c) 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)
+
+//[tag_cast
+//` Check if the polygon_tag can be casted to the areal_tag
+
+#include <iostream>
+#include <typeinfo>
+#include <boost/geometry/geometry.hpp>
+
+namespace geo = boost::geometry;
+int main()
+{
+ typedef geo::model::d2::point_xy<double> point_type;
+ typedef geo::model::polygon<point_type> polygon_type;
+
+ typedef geo::tag<polygon_type>::type tag;
+ typedef geo::tag_cast<tag, geo::linear_tag, geo::areal_tag>::type base_tag;
+
+ std::cout << "tag: " << typeid(tag).name() << std::endl
+ << "base tag: " << typeid(base_tag).name() << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[tag_cast_output
+/*`
+Output (in MSVC):
+[pre
+tag: struct boost::geometry::polygon_tag
+base tag: struct boost::geometry::areal_tag
+]
+*/
+//]
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk