3 // Copyright (c) 2018, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP
11 #define BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP
15 #include <boost/geometry/srs/projections/dpar.hpp>
16 #include <boost/geometry/srs/projections/proj4.hpp>
18 namespace boost { namespace geometry { namespace projections
24 template <typename Params>
25 struct factory_key_util
27 BOOST_MPL_ASSERT_MSG((false), INVALID_PARAMETERS_TYPE, (Params));
31 struct factory_key_util<srs::detail::proj4_parameters>
33 typedef std::string type;
34 template <typename ProjParams>
35 static type const& get(ProjParams const& par)
42 struct factory_key_util<srs::dpar::parameters<T> >
44 typedef srs::dpar::value_proj type;
45 template <typename ProjParams>
46 static type const& get(ProjParams const& par)
54 factory_key(const char* name, srs::dpar::value_proj id)
55 : m_name(name), m_id(id)
58 operator const char*() const
63 operator std::string() const
65 return std::string(m_name);
68 operator srs::dpar::value_proj() const
75 srs::dpar::value_proj m_id;
81 }}} // namespace boost::geometry::projections
83 #endif // BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP