]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/core/coordinate_system.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / core / coordinate_system.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
4// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
5// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6
20effc67
TL
7// This file was modified by Oracle on 2020.
8// Modifications copyright (c) 2020, Oracle and/or its affiliates.
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
7c673cae
FG
11// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
13
14// Use, modification and distribution is subject to the Boost Software License,
15// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16// http://www.boost.org/LICENSE_1_0.txt)
17
18#ifndef BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
19#define BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
20
21
7c673cae 22#include <boost/geometry/core/point_type.hpp>
20effc67
TL
23#include <boost/geometry/core/static_assert.hpp>
24#include <boost/geometry/util/type_traits_std.hpp>
7c673cae
FG
25
26
27namespace boost { namespace geometry
28{
29
30
31namespace traits
32{
33
34/*!
35\brief Traits class defining the coordinate system of a point, important for strategy selection
36\ingroup traits
37\par Geometries:
38 - point
39\par Specializations should provide:
40 - typedef CS type; (cs::cartesian, cs::spherical, etc)
41*/
42template <typename Point, typename Enable = void>
43struct coordinate_system
44{
20effc67
TL
45 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
46 "Not implemented for this Point type.",
47 Point);
7c673cae
FG
48};
49
50} // namespace traits
51
52
53
54#ifndef DOXYGEN_NO_DISPATCH
55namespace core_dispatch
56{
57 template <typename GeometryTag, typename G>
58 struct coordinate_system
59 {
60 typedef typename point_type<GeometryTag, G>::type P;
61
62 // Call its own specialization on point-tag
63 typedef typename coordinate_system<point_tag, P>::type type;
64 };
65
66
67 template <typename Point>
68 struct coordinate_system<point_tag, Point>
69 {
70 typedef typename traits::coordinate_system
71 <
20effc67 72 typename util::remove_cptrref<Point>::type
7c673cae
FG
73 >::type type;
74 };
75
76
77} // namespace core_dispatch
78#endif
79
80
81/*!
82\brief \brief_meta{type, coordinate system (cartesian\, spherical\, etc), \meta_point_type}
83\tparam Geometry \tparam_geometry
84\ingroup core
85
86\qbk{[include reference/core/coordinate_system.qbk]}
87*/
88template <typename Geometry>
89struct coordinate_system
90{
91 typedef typename core_dispatch::coordinate_system
92 <
93 typename tag<Geometry>::type,
20effc67 94 typename util::remove_cptrref<Geometry>::type
7c673cae
FG
95 >::type type;
96};
97
98
99}} // namespace boost::geometry
100
101
102#endif // BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP