|
||||
File indexing completed on 2025-01-18 09:36:50
0001 // Boost.Geometry (aka GGL, Generic Geometry Library) 0002 0003 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. 0004 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France. 0005 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK. 0006 0007 // This file was modified by Oracle on 2014-2021. 0008 // Modifications copyright (c) 2014-2021, Oracle and/or its affiliates. 0009 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle 0010 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle 0011 0012 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library 0013 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. 0014 0015 // Use, modification and distribution is subject to the Boost Software License, 0016 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0017 // http://www.boost.org/LICENSE_1_0.txt) 0018 0019 #ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP 0020 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP 0021 0022 0023 #include <boost/geometry/algorithms/detail/select_geometry_type.hpp> 0024 #include <boost/geometry/core/coordinate_type.hpp> 0025 #include <boost/geometry/util/select_most_precise.hpp> 0026 #include <boost/geometry/util/type_traits.hpp> 0027 0028 0029 namespace boost { namespace geometry 0030 { 0031 0032 0033 namespace resolve_strategy 0034 { 0035 0036 // NOTE: The implementation was simplified greately preserving the old 0037 // behavior. In general case the result types of Strategies should be 0038 // taken into account. 0039 // It would probably be enough to use distance_result and 0040 // default_distance_result here. 0041 0042 } // namespace resolve_strategy 0043 0044 0045 namespace resolve_dynamic 0046 { 0047 0048 template <typename Sequence> 0049 struct default_length_result_impl; 0050 0051 template <typename ...Geometries> 0052 struct default_length_result_impl<util::type_sequence<Geometries...>> 0053 { 0054 using type = typename select_most_precise 0055 < 0056 typename coordinate_type<Geometries>::type..., 0057 long double 0058 >::type; 0059 }; 0060 0061 template <typename Geometry> 0062 struct default_length_result 0063 : default_length_result_impl<typename detail::geometry_types<Geometry>::type> 0064 {}; 0065 0066 0067 } // namespace resolve_dynamic 0068 0069 0070 /*! 0071 \brief Meta-function defining return type of length function 0072 \ingroup length 0073 \note Length of a line of integer coordinates can be double. 0074 So we take at least a double. If Big Number types are used, 0075 we take that type. 0076 0077 */ 0078 template <typename Geometry> 0079 struct default_length_result 0080 : resolve_dynamic::default_length_result<Geometry> 0081 {}; 0082 0083 0084 }} // namespace boost::geometry 0085 0086 #endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |