Reflects renaming things

[SVN r70854]
This commit is contained in:
Barend Gehrels 2011-04-02 13:31:05 +00:00
parent fbaa12058e
commit 2c0378bccb
19 changed files with 31 additions and 31 deletions

View File

@ -153,10 +153,10 @@ namespace units
template <typename Geometry1, typename Geometry2> template <typename Geometry1, typename Geometry2>
inline typename quantity<Geometry1, typename distance_result<Geometry1, Geometry2>::type>::type inline typename quantity<Geometry1, typename default_distance_result<Geometry1, Geometry2>::type>::type
distance(Geometry1 const& g1, Geometry2 const& g2) distance(Geometry1 const& g1, Geometry2 const& g2)
{ {
typedef typename quantity<Geometry1, typename distance_result<Geometry1, Geometry2>::type>::type q; typedef typename quantity<Geometry1, typename default_distance_result<Geometry1, Geometry2>::type>::type q;
return q::from_value(geometry::distance(g1, g2)); return q::from_value(geometry::distance(g1, g2));
} }

View File

@ -27,7 +27,7 @@
template <typename P> template <typename P>
void test_distance_result() void test_distance_result()
{ {
typedef typename bg::distance_result<P, P>::type distance_type; typedef typename bg::default_distance_result<P, P>::type distance_type;
P p1 = bg::make<P>(0, 0); P p1 = bg::make<P>(0, 0);
P p2 = bg::make<P>(3, 0); P p2 = bg::make<P>(3, 0);

View File

@ -61,7 +61,7 @@ template <typename Box>
struct box_visitor struct box_visitor
{ {
int count; int count;
typename bg::area_result<Box>::type area; typename bg::default_area_result<Box>::type area;
box_visitor() box_visitor()
: count(0) : count(0)

View File

@ -28,7 +28,7 @@ template <typename P>
void test_distance_point() void test_distance_point()
{ {
namespace services = bg::strategy::distance::services; namespace services = bg::strategy::distance::services;
typedef typename bg::distance_result<P>::type return_type; typedef typename bg::default_distance_result<P>::type return_type;
// Basic, trivial test // Basic, trivial test
@ -79,7 +79,7 @@ void test_distance_point()
template <typename P> template <typename P>
void test_distance_segment() void test_distance_segment()
{ {
typedef typename bg::distance_result<P>::type return_type; typedef typename bg::default_distance_result<P>::type return_type;
typedef typename bg::coordinate_type<P>::type coordinate_type; typedef typename bg::coordinate_type<P>::type coordinate_type;
P s1; bg::set<0>(s1, 1); bg::set<1>(s1, 1); P s1; bg::set<0>(s1, 1); bg::set<1>(s1, 1);
@ -134,7 +134,7 @@ void test_distance_segment()
template <typename P> template <typename P>
void test_distance_array_as_linestring() void test_distance_array_as_linestring()
{ {
typedef typename bg::distance_result<P>::type return_type; typedef typename bg::default_distance_result<P>::type return_type;
// Normal array does not have // Normal array does not have
boost::array<P, 2> points; boost::array<P, 2> points;

View File

@ -217,7 +217,7 @@ void test_boxes(std::string const& wkt1, std::string const& wkt2, double expecte
Box box_out; Box box_out;
bool detected = bg::intersection(box1, box2, box_out); bool detected = bg::intersection(box1, box2, box_out);
typename bg::area_result<Box>::type area = bg::area(box_out); typename bg::default_area_result<Box>::type area = bg::area(box_out);
BOOST_CHECK_EQUAL(detected, expected_result); BOOST_CHECK_EQUAL(detected, expected_result);
if (detected && expected_result) if (detected && expected_result)

View File

@ -46,7 +46,7 @@ inline void test_assemble(std::string const& id, Geometry const& p, Geometry con
if (operation == 'i') if (operation == 'i')
{ {
typedef typename bg::area_result<Geometry>::type type; typedef typename bg::default_area_result<Geometry>::type type;
type area_p = bg::area(p); type area_p = bg::area(p);
type area_q = bg::area(q); type area_q = bg::area(q);

View File

@ -168,7 +168,7 @@ struct test_traverse
); );
// Check total area of resulting rings // Check total area of resulting rings
typename bg::area_result<G1>::type total_area = 0; typename bg::default_area_result<G1>::type total_area = 0;
BOOST_FOREACH(ring_type const& ring, v) BOOST_FOREACH(ring_type const& ring, v)
{ {
total_area += bg::area(ring); total_area += bg::area(ring);

View File

@ -19,15 +19,15 @@
template <typename Geometry> template <typename Geometry>
void test_area(Geometry const& geometry, void test_area(Geometry const& geometry,
typename bg::area_result<Geometry>::type expected_area) typename bg::default_area_result<Geometry>::type expected_area)
{ {
typename bg::area_result<Geometry>::type area = bg::area(geometry); typename bg::default_area_result<Geometry>::type area = bg::area(geometry);
#ifdef GEOMETRY_TEST_DEBUG #ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out; std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name() out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< " " << " "
<< typeid(typename bg::area_result<Geometry>::type).name() << typeid(typename bg::default_area_result<Geometry>::type).name()
<< " " << " "
<< "area : " << bg::area(geometry) << "area : " << bg::area(geometry)
<< std::endl; << std::endl;
@ -56,7 +56,7 @@ void test_area(Geometry const& geometry,
template <typename Geometry> template <typename Geometry>
void test_geometry(std::string const& wkt, void test_geometry(std::string const& wkt,
typename bg::area_result<Geometry>::type expected_area) typename bg::default_area_result<Geometry>::type expected_area)
{ {
Geometry geometry; Geometry geometry;
bg::read_wkt(wkt, geometry); bg::read_wkt(wkt, geometry);

View File

@ -41,7 +41,7 @@ void test_convex_hull(Geometry const& geometry, Hull const& hull,
BOOST_CHECK(bg::num_points(geometry) == size_original); BOOST_CHECK(bg::num_points(geometry) == size_original);
typename bg::area_result<Geometry>::type ah = bg::area(hull); typename bg::default_area_result<Geometry>::type ah = bg::area(hull);
if (reverse) if (reverse)
{ {
ah = -ah; ah = -ah;

View File

@ -64,7 +64,7 @@ void test_difference(std::string const& caseid, G1 const& g1, G2 const& g2,
bg::difference(g1, g2, clip); bg::difference(g1, g2, clip);
} }
typename bg::area_result<G1>::type area = 0; typename bg::default_area_result<G1>::type area = 0;
std::size_t n = 0; std::size_t n = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin(); for (typename std::vector<OutputType>::iterator it = clip.begin();
it != clip.end(); it != clip.end();

View File

@ -111,13 +111,13 @@ void test_distance(Geometry1 const& geometry1,
Geometry2 const& geometry2, Geometry2 const& geometry2,
long double expected_distance) long double expected_distance)
{ {
typename bg::distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2); typename bg::default_distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
#ifdef GEOMETRY_TEST_DEBUG #ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out; std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry1>::type).name() out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
<< std::endl << std::endl
<< typeid(typename bg::distance_result<Geometry1>::type).name() << typeid(typename bg::default_distance_result<Geometry1>::type).name()
<< std::endl << std::endl
<< "distance : " << bg::distance(geometry1, geometry2) << "distance : " << bg::distance(geometry1, geometry2)
<< std::endl; << std::endl;

View File

@ -36,7 +36,7 @@
template <typename OutputType, typename CalculationType, typename G1, typename G2> template <typename OutputType, typename CalculationType, typename G1, typename G2>
typename bg::area_result<G1>::type test_intersection(std::string const& caseid, typename bg::default_area_result<G1>::type test_intersection(std::string const& caseid,
G1 const& g1, G2 const& g2, G1 const& g1, G2 const& g2,
std::size_t expected_count = 0, std::size_t expected_point_count = 0, std::size_t expected_count = 0, std::size_t expected_point_count = 0,
double expected_length_or_area = 0, double expected_length_or_area = 0,
@ -69,7 +69,7 @@ typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
bg::detail::intersection::intersection_insert<OutputType>(g1, g2, std::back_inserter(clip), strategy()); bg::detail::intersection::intersection_insert<OutputType>(g1, g2, std::back_inserter(clip), strategy());
typename bg::area_result<G1>::type length_or_area = 0; typename bg::default_area_result<G1>::type length_or_area = 0;
std::size_t n = 0; std::size_t n = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin(); for (typename std::vector<OutputType>::iterator it = clip.begin();
it != clip.end(); it != clip.end();
@ -174,7 +174,7 @@ typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
} }
template <typename OutputType, typename G1, typename G2> template <typename OutputType, typename G1, typename G2>
typename bg::area_result<G1>::type test_one(std::string const& caseid, typename bg::default_area_result<G1>::type test_one(std::string const& caseid,
std::string const& wkt1, std::string const& wkt2, std::string const& wkt1, std::string const& wkt2,
std::size_t expected_count = 0, std::size_t expected_point_count = 0, std::size_t expected_count = 0, std::size_t expected_point_count = 0,
double expected_length_or_area = 0, double expected_length_or_area = 0,

View File

@ -18,13 +18,13 @@
template <typename Geometry> template <typename Geometry>
void test_length(Geometry const& geometry, long double expected_length) void test_length(Geometry const& geometry, long double expected_length)
{ {
typename bg::length_result<Geometry>::type length = bg::length(geometry); typename bg::default_length_result<Geometry>::type length = bg::length(geometry);
#ifdef GEOMETRY_TEST_DEBUG #ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out; std::ostringstream out;
out << typeid(typename bg::coordinate_type<Geometry>::type).name() out << typeid(typename bg::coordinate_type<Geometry>::type).name()
<< std::endl << std::endl
<< typeid(typename bg::length_result<Geometry>::type).name() << typeid(typename bg::default_length_result<Geometry>::type).name()
<< std::endl << std::endl
<< "length : " << bg::length(geometry) << "length : " << bg::length(geometry)
<< std::endl; << std::endl;

View File

@ -21,7 +21,7 @@
template <typename Geometry> template <typename Geometry>
void test_perimeter(Geometry const& geometry, long double expected_perimeter) void test_perimeter(Geometry const& geometry, long double expected_perimeter)
{ {
typename bg::distance_result<Geometry>::type perimeter = bg::perimeter(geometry); typename bg::default_distance_result<Geometry>::type perimeter = bg::perimeter(geometry);
#ifdef GEOMETRY_TEST_DEBUG #ifdef GEOMETRY_TEST_DEBUG
std::ostringstream out; std::ostringstream out;

View File

@ -45,7 +45,7 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
std::vector<OutputType> clip; std::vector<OutputType> clip;
bg::union_(g1, g2, clip); bg::union_(g1, g2, clip);
typename bg::area_result<G1>::type area = 0; typename bg::default_area_result<G1>::type area = 0;
std::size_t n = 0; std::size_t n = 0;
std::size_t holes = 0; std::size_t holes = 0;
for (typename std::vector<OutputType>::iterator it = clip.begin(); for (typename std::vector<OutputType>::iterator it = clip.begin();
@ -68,7 +68,7 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
array_with_one_empty_geometry.push_back(OutputType()); array_with_one_empty_geometry.push_back(OutputType());
boost::copy(array_with_one_empty_geometry, bg::detail::union_::union_insert<OutputType>(g1, g2, std::back_inserter(inserted))); boost::copy(array_with_one_empty_geometry, bg::detail::union_::union_insert<OutputType>(g1, g2, std::back_inserter(inserted)));
typename bg::area_result<G1>::type area_inserted = 0; typename bg::default_area_result<G1>::type area_inserted = 0;
for (typename std::vector<OutputType>::iterator it = inserted.begin(); for (typename std::vector<OutputType>::iterator it = inserted.begin();
it != inserted.end(); ++it) it != inserted.end(); ++it)
{ {

View File

@ -51,7 +51,7 @@ void test_connect(std::string const& caseid, Geometry const& geometry,
bg::connect(geometry, connected_vector); bg::connect(geometry, connected_vector);
} }
typename bg::length_result<Geometry>::type length = 0; typename bg::default_length_result<Geometry>::type length = 0;
std::size_t count = boost::size(connected_vector); std::size_t count = boost::size(connected_vector);
std::size_t point_count = 0; std::size_t point_count = 0;

View File

@ -83,7 +83,7 @@ void test_dissolve(std::string const& caseid, Geometry const& geometry,
std::vector<GeometryOut> dissolved_vector; std::vector<GeometryOut> dissolved_vector;
bg::dissolve_inserter<GeometryOut>(geometry, std::back_inserter(dissolved_vector)); bg::dissolve_inserter<GeometryOut>(geometry, std::back_inserter(dissolved_vector));
typename bg::area_result<Geometry>::type length_or_area = 0; typename bg::default_area_result<Geometry>::type length_or_area = 0;
//std::size_t holes = 0; //std::size_t holes = 0;
std::size_t count = 0; std::size_t count = 0;

View File

@ -47,7 +47,7 @@ void test_offset(std::string const& caseid, Geometry const& geometry,
GeometryOut moved_by_offset; GeometryOut moved_by_offset;
bg::offset(geometry, moved_by_offset, join_strategy(2), distance); bg::offset(geometry, moved_by_offset, join_strategy(2), distance);
typename bg::length_result<Geometry>::type length typename bg::default_length_result<Geometry>::type length
= bg::length(moved_by_offset); = bg::length(moved_by_offset);
/* /*

View File

@ -35,7 +35,7 @@ void test_distance(std::string const& wkt1, std::string const& wkt2, double expe
Geometry2 g2; Geometry2 g2;
bg::read_wkt(wkt1, g1); bg::read_wkt(wkt1, g1);
bg::read_wkt(wkt2, g2); bg::read_wkt(wkt2, g2);
typename bg::distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2); typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2);
BOOST_CHECK_CLOSE(d, expected, 0.0001); BOOST_CHECK_CLOSE(d, expected, 0.0001);
} }
@ -48,7 +48,7 @@ void test_distance(Strategy const& strategy, std::string const& wkt1,
Geometry2 g2; Geometry2 g2;
bg::read_wkt(wkt1, g1); bg::read_wkt(wkt1, g1);
bg::read_wkt(wkt2, g2); bg::read_wkt(wkt2, g2);
typename bg::distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2, strategy); typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2, strategy);
BOOST_CHECK_CLOSE(d, expected, 0.0001); BOOST_CHECK_CLOSE(d, expected, 0.0001);
} }