mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Removed adapted/fusion_<cs>.hpp files and added a macro to use instead.
[SVN r71475]
This commit is contained in:
parent
9f301828e8
commit
5c8365befb
@ -15,12 +15,13 @@
|
||||
|
||||
#include <boost/geometry/algorithms/distance.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/adapted/fusion.hpp>
|
||||
#include <boost/geometry/geometries/adapted/fusion_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/boost_fusion.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/strategies.hpp>
|
||||
#include <boost/geometry/util/write_dsv.hpp>
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(cs::cartesian);
|
||||
|
||||
|
||||
// Sample point, having x/y
|
||||
struct my_2d
|
||||
|
@ -130,10 +130,6 @@ struct access
|
||||
}
|
||||
};
|
||||
|
||||
// The library user has
|
||||
// 1) either to specify the coordinate system using a traits class
|
||||
// 2) or include <boost/geometry/geometries/adapted/fusion_@.hpp>
|
||||
// where @=cartesian,geographic,...
|
||||
|
||||
template <typename Sequence>
|
||||
struct tag
|
||||
@ -148,6 +144,7 @@ struct tag
|
||||
typedef point_tag type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace traits
|
||||
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
@ -155,5 +152,21 @@ struct tag
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_HPP
|
||||
|
||||
// Convenience registration macro to bind a Fusion sequence to a CS
|
||||
#define BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(CoordinateSystem) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template <typename Sequence> \
|
||||
struct coordinate_system \
|
||||
< \
|
||||
Sequence, \
|
||||
typename boost::enable_if \
|
||||
< \
|
||||
fusion_adapt_detail::is_fusion_sequence<Sequence> \
|
||||
>::type \
|
||||
> \
|
||||
{ typedef cs::cartesian type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_HPP
|
@ -1,44 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2011 Akira Takahashi
|
||||
// Copyright (c) 2011 Barend Gehrels, 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_GEOMETRIES_ADAPTED_FUSION_CARTESIAN_HPP
|
||||
#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_CARTESIAN_HPP
|
||||
|
||||
#ifdef BOOST_GEOMETRY_ADAPTED_FUSION_COORDINATE_SYSTEM_DEFINED
|
||||
#error Include only one headerfile to register coordinate coordinate_system for adapted fusion
|
||||
#endif
|
||||
|
||||
#define BOOST_GEOMETRY_ADAPTED_FUSION_COORDINATE_SYSTEM_DEFINED
|
||||
|
||||
|
||||
#include <boost/geometry/geometries/adapted/fusion.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct coordinate_system<
|
||||
Sequence,
|
||||
typename boost::enable_if<
|
||||
fusion_adapt_detail::is_fusion_sequence<Sequence> >::type>
|
||||
{ typedef cs::cartesian type; };
|
||||
|
||||
} // namespace traits
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_CARTESIAN_HPP
|
@ -1,44 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2011 Akira Takahashi
|
||||
// Copyright (c) 2011 Barend Gehrels, 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_GEOMETRIES_ADAPTED_FUSION_GEOGRAPHIC_HPP
|
||||
#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_GEOGRAPHIC_HPP
|
||||
|
||||
#ifdef BOOST_GEOMETRY_ADAPTED_FUSION_COORDINATE_SYSTEM_DEFINED
|
||||
#error Include only one headerfile to register coordinate coordinate_system for adapted fusion
|
||||
#endif
|
||||
|
||||
#define BOOST_GEOMETRY_ADAPTED_FUSION_COORDINATE_SYSTEM_DEFINED
|
||||
|
||||
|
||||
#include <boost/geometry/geometries/adapted/fusion.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct coordinate_system<
|
||||
Sequence,
|
||||
typename boost::enable_if<
|
||||
fusion_adapt_detail::is_fusion_sequence<Sequence> >::type>
|
||||
{ typedef cs::geographic<degree> type; };
|
||||
|
||||
} // namespace traits
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_FUSION_GEOGRAPHIC_HPP
|
@ -13,12 +13,12 @@
|
||||
#include <boost/fusion/include/adapt_struct_named.hpp>
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/adapted/fusion.hpp>
|
||||
#include <boost/geometry/geometries/adapted/fusion_cartesian.hpp>
|
||||
#include<boost/geometry/geometries/adapted/c_array_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/boost_fusion.hpp>
|
||||
#include <boost/geometry/geometries/adapted/c_array_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
|
||||
#include <iostream>
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(cs::cartesian);
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user