Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:47

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2017-2018, Oracle and/or its affiliates.
0004 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0005 
0006 // Use, modification and distribution is subject to the Boost Software License,
0007 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 #ifndef BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
0011 #define BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
0012 
0013 
0014 #include <algorithm>
0015 
0016 #include <boost/geometry/srs/projections/dpar.hpp>
0017 
0018 
0019 namespace boost { namespace geometry { namespace projections
0020 {
0021 
0022 
0023 #ifndef DOXYGEN_NO_DETAIL
0024 namespace detail
0025 {
0026 
0027     struct code_element
0028     {
0029         int code;
0030         srs::dpar::parameters<> parameters;
0031     };
0032 
0033     struct code_element_less
0034     {
0035         inline bool operator()(code_element const& l, code_element const& r) const
0036         {
0037             return l.code < r.code;
0038         }
0039     };
0040 
0041     template<typename RandIt>
0042     inline RandIt binary_find_code_element(RandIt first, RandIt last, int code)
0043     {
0044         code_element_less comp;
0045         code_element value;
0046         value.code = code;
0047         first = std::lower_bound(first, last, value, comp);
0048         return first != last && !comp(value, *first) ? first : last;
0049     }
0050 
0051 }
0052 #endif // DOXYGEN_NO_DETAIL
0053 
0054 
0055 }}} // namespace boost::geometry::projections
0056 
0057 #endif