Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69915 - in trunk/boost/geometry: domains/gis/io/wkt extensions/gis/io/wkt
From: barend.gehrels_at_[hidden]
Date: 2011-03-13 06:09:59


Author: barendgehrels
Date: 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
New Revision: 69915
URL: http://svn.boost.org/trac/boost/changeset/69915

Log:
Moved wkt, phase 4, cleanup

Added:
   trunk/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp (contents, props changed)
   trunk/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp (contents, props changed)
Text files modified:
   trunk/boost/geometry/domains/gis/io/wkt/read_wkt.hpp | 33 +--------------------------------
   trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp | 10 ----------
   trunk/boost/geometry/extensions/gis/io/wkt/wkt.hpp | 2 +-
   3 files changed, 2 insertions(+), 43 deletions(-)

Modified: trunk/boost/geometry/domains/gis/io/wkt/read_wkt.hpp
==============================================================================
--- trunk/boost/geometry/domains/gis/io/wkt/read_wkt.hpp (original)
+++ trunk/boost/geometry/domains/gis/io/wkt/read_wkt.hpp 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
@@ -680,38 +680,7 @@
     dispatch::read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
 }
 
-/*!
-\brief Parses OGC Well-Known Text (\ref WKT) and outputs using an output iterator
-\ingroup wkt
-\param wkt string containing \ref WKT
-\param out output iterator
-\note Because the output iterator doesn't always have the type value_type, it should be
-specified in the function call.
-\par Example:
-Small example showing how to use read_wkt with an output iterator
-\dontinclude doxygen_1.cpp
-\skip example_from_wkt_output_iterator
-\line {
-\until }
-*/
-template <typename Geometry, typename OutputIterator>
-inline void read_wkt(std::string const& wkt, OutputIterator out)
-{
- geometry::concept::check<Geometry>();
-
- typedef typename point_type<Geometry>::type point_type;
-
- std::string const& tag =
- geometry_id<Geometry>::value == 2 ? "linestring" : "polygon";
-
- detail::wkt::tokenizer tokens(wkt, boost::char_separator<char>(" ", ",()"));
- detail::wkt::tokenizer::iterator it;
- if (detail::wkt::initialize<point_type>(tokens, tag, wkt, it))
- {
- detail::wkt::container_inserter<point_type>::apply(it, tokens.end(), wkt, out);
- }
-}
-
 }} // namespace boost::geometry
 
+
 #endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_WKT_READ_WKT_HPP

Modified: trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp
==============================================================================
--- trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp (original)
+++ trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
@@ -383,16 +383,6 @@
     return wkt_manipulator<Geometry>(geometry);
 }
 
-
-// Backward compatibility
-template <typename Geometry>
-inline wkt_manipulator<Geometry> make_wkt(Geometry const& geometry)
-{
- concept::check<Geometry const>();
-
- return wkt_manipulator<Geometry>(geometry);
-}
-
 }} // namespace boost::geometry
 
 #endif // BOOST_GEOMETRY_DOMAINS_GIS_IO_WKT_WRITE_WKT_HPP

Added: trunk/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/geometry/extensions/gis/io/wkt/read_wkt.hpp 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,62 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, 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_EXTENSIONS_GIS_IO_WKT_READ_WKT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_READ_WKT_HPP
+
+
+#if defined(BOOST_MSVC_FULL_VER)
+#pragma message ("WARNING: wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file")
+#else
+#warning "wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file"
+#endif
+
+
+#include <boost/geometry/domains/gis/io/wkt/read_wkt.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+
+/*!
+\brief Parses OGC Well-Known Text (\ref WKT) and outputs using an output iterator
+\ingroup wkt
+\param wkt string containing \ref WKT
+\param out output iterator
+\note This function is deprecated!
+\note Because the output iterator doesn't always have the type value_type, it should be
+specified in the function call.
+\par Example:
+Small example showing how to use read_wkt with an output iterator
+\dontinclude doxygen_1.cpp
+\skip example_from_wkt_output_iterator
+\line {
+\until }
+*/
+template <typename Geometry, typename OutputIterator>
+inline void read_wkt(std::string const& wkt, OutputIterator out)
+{
+ geometry::concept::check<Geometry>();
+
+ typedef typename point_type<Geometry>::type point_type;
+
+ std::string const& tag =
+ geometry_id<Geometry>::value == 2 ? "linestring" : "polygon";
+
+ detail::wkt::tokenizer tokens(wkt, boost::char_separator<char>(" ", ",()"));
+ detail::wkt::tokenizer::iterator it;
+ if (detail::wkt::initialize<point_type>(tokens, tag, wkt, it))
+ {
+ detail::wkt::container_inserter<point_type>::apply(it, tokens.end(), wkt, out);
+ }
+}
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_READ_WKT_HPP

Modified: trunk/boost/geometry/extensions/gis/io/wkt/wkt.hpp
==============================================================================
--- trunk/boost/geometry/extensions/gis/io/wkt/wkt.hpp (original)
+++ trunk/boost/geometry/extensions/gis/io/wkt/wkt.hpp 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
@@ -10,7 +10,7 @@
 
 
 #if defined(BOOST_MSVC_FULL_VER)
-#pragma message ("wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file")
+#pragma message ("WARNING: wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file")
 #else
 #warning "wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file"
 #endif

Added: trunk/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp 2011-03-13 06:09:54 EDT (Sun, 13 Mar 2011)
@@ -0,0 +1,38 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, 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_EXTENSIONS_GIS_IO_WKT_WRITE_WKT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WRITE_WKT_HPP
+
+
+#if defined(BOOST_MSVC_FULL_VER)
+#pragma message ("WARNING: wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file")
+#else
+#warning "wkt is moved to boost/geometry/domains/gis/io/wkt, please update include file"
+#endif
+
+
+#include <boost/geometry/domains/gis/io/wkt/write_wkt.hpp>
+
+
+
+namespace boost { namespace geometry
+{
+
+// Backward compatibility - NOTE THIS IS DEPRECATED
+template <typename Geometry>
+inline wkt_manipulator<Geometry> make_wkt(Geometry const& geometry)
+{
+ concept::check<Geometry const>();
+
+ return wkt_manipulator<Geometry>(geometry);
+}
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_IO_WKT_WRITE_WKT_HPP


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