diff --git a/include/boost/geometry/algorithms/append.hpp b/include/boost/geometry/algorithms/append.hpp index 1dafac04b..e0c218ee7 100644 --- a/include/boost/geometry/algorithms/append.hpp +++ b/include/boost/geometry/algorithms/append.hpp @@ -8,6 +8,7 @@ // Modifications copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -20,6 +21,10 @@ #define BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP +#include +#include +#include + #include #include #include @@ -28,9 +33,6 @@ #include #include #include -#include -#include -#include namespace boost { namespace geometry @@ -202,6 +204,71 @@ struct append } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH +#ifndef DOXYGEN_NO_DETAIL +namespace detail { namespace append +{ + +template +struct append_to_multigeometry +{ + static inline void apply(MultiGeometry& multigeometry, + RangeOrPoint const& range_or_point, + int ring_index, int multi_index) + { + + dispatch::append + < + typename boost::range_value::type, + RangeOrPoint + >::apply(multigeometry[multi_index], range_or_point, ring_index); + } +}; + +}} // namespace detail::append +#endif // DOXYGEN_NO_DETAIL + +#ifndef DOXYGEN_NO_DISPATCH +namespace dispatch +{ + +namespace splitted_dispatch +{ + +template +struct append_point + : detail::append::append_point +{}; + +template +struct append_range + : detail::append::append_range +{}; + +template +struct append_point + : detail::append::append_to_multigeometry +{}; + +template +struct append_range + : detail::append::append_to_multigeometry +{}; + +template +struct append_point + : detail::append::append_to_multigeometry +{}; + +template +struct append_range + : detail::append::append_to_multigeometry +{}; + +} // namespace splitted_dispatch + +} // namespace dispatch +#endif // DOXYGEN_NO_DISPATCH + namespace resolve_variant { diff --git a/include/boost/geometry/multi/algorithms/append.hpp b/include/boost/geometry/multi/algorithms/append.hpp index 2a2596c54..d1589aca8 100644 --- a/include/boost/geometry/multi/algorithms/append.hpp +++ b/include/boost/geometry/multi/algorithms/append.hpp @@ -8,6 +8,7 @@ // Modifications copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -19,88 +20,8 @@ #ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP #define BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP + #include -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_DETAIL -namespace detail { namespace append -{ - - -template -struct append_to_multigeometry -{ - static inline void apply(MultiGeometry& multigeometry, - RangeOrPoint const& range_or_point, - int ring_index, int multi_index) - { - - dispatch::append - < - typename boost::range_value::type, - RangeOrPoint - >::apply(multigeometry[multi_index], range_or_point, ring_index); - } -}; - - -}} // namespace detail::append -#endif // DOXYGEN_NO_DETAIL - - - -#ifndef DOXYGEN_NO_DISPATCH -namespace dispatch -{ - -namespace splitted_dispatch -{ - -template -struct append_point - : detail::append::append_point -{}; - -template -struct append_range - : detail::append::append_range -{}; - -template -struct append_point - : detail::append::append_to_multigeometry -{}; - -template -struct append_range - : detail::append::append_to_multigeometry -{}; - -template -struct append_point - : detail::append::append_to_multigeometry -{}; - -template -struct append_range - : detail::append::append_to_multigeometry -{}; - -} - - -} // namespace dispatch -#endif // DOXYGEN_NO_DISPATCH - - -}} // namespace boost::geometry - #endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_APPEND_HPP diff --git a/include/boost/geometry/multi/multi.hpp b/include/boost/geometry/multi/multi.hpp index 24e39c3c7..3cd4b12c0 100644 --- a/include/boost/geometry/multi/multi.hpp +++ b/include/boost/geometry/multi/multi.hpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -49,7 +50,6 @@ #include #include -#include #include #include #include