]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/srs/projections/impl/factory_entry.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / geometry / srs / projections / impl / factory_entry.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4
5 // This file was modified by Oracle on 2017.
6 // Modifications copyright (c) 2017, Oracle and/or its affiliates.
7 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
8
9 // Use, modification and distribution is subject to the Boost Software License,
10 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12
13 #ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP
14 #define BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP
15
16 #include <string>
17
18 #include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
19
20 namespace boost { namespace geometry { namespace projections
21 {
22
23 namespace detail
24 {
25
26 // forward declaration needed by some projections
27 template <typename CT, typename Parameters>
28 class factory;
29
30 template <typename CT, typename P>
31 class factory_entry
32 {
33 public:
34
35 virtual ~factory_entry() {}
36 virtual base_v<CT, P>* create_new(P const& par) const = 0;
37 };
38
39 template <typename CT, typename P>
40 class base_factory
41 {
42 public:
43
44 virtual ~base_factory() {}
45 virtual void add_to_factory(std::string const& name, factory_entry<CT, P>* sub) = 0;
46 };
47
48 } // namespace detail
49 }}} // namespace boost::geometry::projections
50
51 #endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP