Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:35

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
0006 
0007 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0008 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0009 
0010 // Use, modification and distribution is subject to the Boost Software License,
0011 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0012 // http://www.boost.org/LICENSE_1_0.txt)
0013 
0014 #ifndef BOOST_GEOMETRY_IO_HPP
0015 #define BOOST_GEOMETRY_IO_HPP
0016 
0017 #include <boost/geometry/io/wkt/read.hpp>
0018 #include <boost/geometry/io/wkt/write.hpp>
0019 
0020 namespace boost { namespace geometry
0021 {
0022 
0023 struct format_wkt {};
0024 struct format_wkb {}; // TODO
0025 struct format_dsv {}; // TODO
0026 
0027 #ifndef DOXYGEN_NO_DISPATCH
0028 namespace dispatch
0029 {
0030 template <typename Tag, typename Geometry>
0031 struct read
0032 {
0033 };
0034 
0035 template <typename Geometry>
0036 struct read<format_wkt, Geometry>
0037 {
0038     static inline void apply(Geometry& geometry, std::string const& wkt)
0039     {
0040         read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
0041     }
0042 };
0043 
0044 } // namespace dispatch
0045 #endif // DOXYGEN_NO_DISPATCH
0046 
0047 template <typename Format, typename Geometry>
0048 inline void read(Geometry& geometry, std::string const& wkt)
0049 {
0050     geometry::concepts::check<Geometry>();
0051     dispatch::read<Format, Geometry>::apply(geometry, wkt);
0052 }
0053 
0054 // TODO: wriite
0055 
0056 }} // namespace boost::geometry
0057 
0058 #endif // BOOST_GEOMETRY_IO_HPP