annotate DEPENDENCIES/generic/include/boost/geometry/strategies/default_length_result.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 // Boost.Geometry (aka GGL, Generic Geometry Library)
Chris@16 2
Chris@101 3 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
Chris@101 4 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
Chris@101 5 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
Chris@101 6
Chris@101 7 // This file was modified by Oracle on 2014.
Chris@101 8 // Modifications copyright (c) 2014, Oracle and/or its affiliates.
Chris@101 9
Chris@101 10 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
Chris@16 11
Chris@16 12 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
Chris@16 13 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
Chris@16 14
Chris@16 15 // Use, modification and distribution is subject to the Boost Software License,
Chris@16 16 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 17 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 18
Chris@16 19 #ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
Chris@16 20 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
Chris@16 21
Chris@101 22 #include <boost/variant/variant_fwd.hpp>
Chris@16 23
Chris@16 24 #include <boost/geometry/core/coordinate_type.hpp>
Chris@101 25
Chris@101 26 #include <boost/geometry/util/compress_variant.hpp>
Chris@16 27 #include <boost/geometry/util/select_most_precise.hpp>
Chris@101 28 #include <boost/geometry/util/transform_variant.hpp>
Chris@16 29
Chris@16 30
Chris@16 31 namespace boost { namespace geometry
Chris@16 32 {
Chris@16 33
Chris@101 34
Chris@101 35 namespace resolve_strategy
Chris@101 36 {
Chris@101 37
Chris@101 38 template <typename Geometry>
Chris@101 39 struct default_length_result
Chris@101 40 {
Chris@101 41 typedef typename select_most_precise
Chris@101 42 <
Chris@101 43 typename coordinate_type<Geometry>::type,
Chris@101 44 long double
Chris@101 45 >::type type;
Chris@101 46 };
Chris@101 47
Chris@101 48 } // namespace resolve_strategy
Chris@101 49
Chris@101 50
Chris@101 51 namespace resolve_variant
Chris@101 52 {
Chris@101 53
Chris@101 54 template <typename Geometry>
Chris@101 55 struct default_length_result
Chris@101 56 : resolve_strategy::default_length_result<Geometry>
Chris@101 57 {};
Chris@101 58
Chris@101 59 template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
Chris@101 60 struct default_length_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
Chris@101 61 {
Chris@101 62 typedef typename compress_variant<
Chris@101 63 typename transform_variant<
Chris@101 64 boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>,
Chris@101 65 resolve_strategy::default_length_result<boost::mpl::placeholders::_>
Chris@101 66 >::type
Chris@101 67 >::type type;
Chris@101 68 };
Chris@101 69
Chris@101 70 } // namespace resolve_variant
Chris@101 71
Chris@101 72
Chris@16 73 /*!
Chris@16 74 \brief Meta-function defining return type of length function
Chris@16 75 \ingroup length
Chris@16 76 \note Length of a line of integer coordinates can be double.
Chris@16 77 So we take at least a double. If Big Number types are used,
Chris@16 78 we take that type.
Chris@16 79
Chris@16 80 */
Chris@16 81 template <typename Geometry>
Chris@16 82 struct default_length_result
Chris@101 83 : resolve_variant::default_length_result<Geometry>
Chris@101 84 {};
Chris@101 85
Chris@16 86
Chris@16 87 }} // namespace boost::geometry
Chris@16 88
Chris@16 89 #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP