annotate DEPENDENCIES/generic/include/boost/geometry/io/io.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Boost.Geometry (aka GGL, Generic Geometry Library)
Chris@16 2
Chris@16 3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
Chris@16 4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
Chris@16 5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
Chris@16 6
Chris@16 7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
Chris@16 8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
Chris@16 9
Chris@16 10 // Use, modification and distribution is subject to the Boost Software License,
Chris@16 11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 12 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 13
Chris@16 14 #ifndef BOOST_GEOMETRY_IO_HPP
Chris@16 15 #define BOOST_GEOMETRY_IO_HPP
Chris@16 16
Chris@16 17 #include <boost/geometry/io/wkt/read.hpp>
Chris@16 18 #include <boost/geometry/io/wkt/write.hpp>
Chris@16 19
Chris@16 20 namespace boost { namespace geometry
Chris@16 21 {
Chris@16 22
Chris@16 23 struct format_wkt {};
Chris@16 24 struct format_wkb {}; // TODO
Chris@16 25 struct format_dsv {}; // TODO
Chris@16 26
Chris@16 27 #ifndef DOXYGEN_NO_DISPATCH
Chris@16 28 namespace dispatch
Chris@16 29 {
Chris@16 30 template <typename Tag, typename Geometry>
Chris@16 31 struct read
Chris@16 32 {
Chris@16 33 };
Chris@16 34
Chris@16 35 template <typename Geometry>
Chris@16 36 struct read<format_wkt, Geometry>
Chris@16 37 {
Chris@16 38 static inline void apply(Geometry& geometry, std::string const& wkt)
Chris@16 39 {
Chris@16 40 read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
Chris@16 41 }
Chris@16 42 };
Chris@16 43
Chris@16 44 } // namespace dispatch
Chris@16 45 #endif // DOXYGEN_NO_DISPATCH
Chris@16 46
Chris@16 47 template <typename Format, typename Geometry>
Chris@16 48 inline void read(Geometry& geometry, std::string const& wkt)
Chris@16 49 {
Chris@16 50 geometry::concept::check<Geometry>();
Chris@16 51 dispatch::read<Format, Geometry>::apply(geometry, wkt);
Chris@16 52 }
Chris@16 53
Chris@16 54 // TODO: wriite
Chris@16 55
Chris@16 56 }} // namespace boost::geometry
Chris@16 57
Chris@16 58 #endif // BOOST_GEOMETRY_IO_HPP