|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66568 - sandbox/geometry/libs/geometry/example
From: barend.gehrels_at_[hidden]
Date: 2010-11-14 09:30:17
Author: barendgehrels
Date: 2010-11-14 09:30:15 EST (Sun, 14 Nov 2010)
New Revision: 66568
URL: http://svn.boost.org/trac/boost/changeset/66568
Log:
Update reflection to new strategy approach
Text files modified:
sandbox/geometry/libs/geometry/example/c11_custom_cs_transform_example.cpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Modified: sandbox/geometry/libs/geometry/example/c11_custom_cs_transform_example.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/example/c11_custom_cs_transform_example.cpp (original)
+++ sandbox/geometry/libs/geometry/example/c11_custom_cs_transform_example.cpp 2010-11-14 09:30:15 EST (Sun, 14 Nov 2010)
@@ -43,17 +43,16 @@
// 4: register the default strategy to transform any cart point to any cart_shifted5 point
-// (note: this will be renamed to "default_strategy" in the near future)
-namespace boost { namespace geometry
+namespace boost { namespace geometry { namespace strategy { namespace transform { namespace services
{
template <typename P1, typename P2>
-struct strategy_transform<cartesian_tag, cartesian_tag, cart, cart_shifted5, 2, 2, P1, P2>
+struct default_strategy<cartesian_tag, cartesian_tag, cart, cart_shifted5, 2, 2, P1, P2>
{
typedef shift<P1, P2> type;
};
-}} // namespaces
+}}}}} // namespaces
// 5: implement a distance strategy between the two different ones
@@ -108,6 +107,8 @@
double d1 = boost::geometry::distance(p1_a, p1_b);
double d2 = boost::geometry::distance(p2_a, p2_b);
+ std::cout << d1 << " " << d2 << std::endl;
+
// Transform from a to b:
boost::geometry::point<double, 2, cart_shifted5> p1_shifted;
boost::geometry::transform(p1_a, p1_shifted);
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