Moved wkt (used in nearly all tests) from extension to domains tree for release

[SVN r69905]
This commit is contained in:
Barend Gehrels
2011-03-12 23:49:21 +00:00
parent f8f6ef0c95
commit 0fc4cf96fb
8 changed files with 72 additions and 13 deletions

View File

@@ -0,0 +1,59 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2008-2009, Geodan, 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_DOMAINS_GIS_IO_HPP
#define BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp>
#include <boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp>
namespace boost { namespace geometry
{
struct format_wkt {};
struct format_wkb {};
struct format_dsv {};
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
{
template <typename Tag, typename Geometry>
struct read
{
};
template <typename Geometry>
struct read<format_wkt, Geometry>
{
static inline void apply(Geometry& geometry, std::string const& wkt)
{
read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
}
};
} // namespace dispatch
#endif // DOXYGEN_NO_DISPATCH
template <typename Format, typename Geometry>
inline void read(Geometry& geometry, std::string const& wkt)
{
geometry::concept::check<Geometry>();
dispatch::read<Format, Geometry>::apply(geometry, wkt);
}
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_HPP

View File

@@ -9,7 +9,7 @@
#define BOOST_GEOMETRY_MULTI_IO_WKT_DETAIL_WKT_HPP
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/multi/core/tags.hpp>

View File

@@ -37,7 +37,7 @@
#include <boost/geometry/util/coordinate_cast.hpp>
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/detail/wkt.hpp>
namespace boost { namespace geometry
{

View File

@@ -14,8 +14,8 @@
#include <boost/geometry/multi/core/tags.hpp>
#include <boost/geometry/multi/core/point_type.hpp>
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp>
#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp>
namespace boost { namespace geometry

View File

@@ -9,11 +9,11 @@
#define BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP
#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp>
#include <boost/geometry/extensions/gis/io/wkt/write_wkt_multi.hpp>
#include <boost/geometry/domains/gis/io/wkt/read_wkt_multi.hpp>
#include <boost/geometry/domains/gis/io/wkt/write_wkt_multi.hpp>
#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WKT_HPP

View File

@@ -26,7 +26,7 @@
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/detail/wkt.hpp>
namespace boost { namespace geometry
@@ -225,8 +225,8 @@ struct wkt_segment
assign_point_from_index<0>(segment, points[0]);
assign_point_from_index<1>(segment, points[1]);
// In Boost.Geometry a segment is represented
// in WKT-format like (for 2D): LINESTRING(x y,x y)
// In Boost.Geometry a segment is represented
// in WKT-format like (for 2D): LINESTRING(x y,x y)
os << "LINESTRING";
wkt_sequence<sequence>::apply(os, points);
}

View File

@@ -12,8 +12,8 @@
#include <boost/geometry/multi/core/tags.hpp>
#include <boost/geometry/extensions/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt_multi.hpp>
#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/detail/wkt_multi.hpp>
namespace boost { namespace geometry