File indexing completed on 2025-01-18 09:35:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP
0020 #define BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP
0021
0022
0023 #include <type_traits>
0024
0025 #include <boost/geometry/core/static_assert.hpp>
0026 #include <boost/geometry/core/tag.hpp>
0027 #include <boost/geometry/core/tags.hpp>
0028
0029
0030 namespace boost { namespace geometry
0031 {
0032
0033
0034 #ifndef DOXYGEN_NO_DISPATCH
0035 namespace core_dispatch
0036 {
0037
0038 template <typename GeometryTag>
0039 struct geometry_id
0040 {
0041 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0042 "Not implemented for this Geometry type.",
0043 GeometryTag);
0044 };
0045
0046
0047 template <>
0048 struct geometry_id<point_tag> : std::integral_constant<int, 1> {};
0049
0050
0051 template <>
0052 struct geometry_id<linestring_tag> : std::integral_constant<int, 2> {};
0053
0054
0055 template <>
0056 struct geometry_id<polygon_tag> : std::integral_constant<int, 3> {};
0057
0058
0059 template <>
0060 struct geometry_id<multi_point_tag> : std::integral_constant<int, 4> {};
0061
0062
0063 template <>
0064 struct geometry_id<multi_linestring_tag> : std::integral_constant<int, 5> {};
0065
0066
0067 template <>
0068 struct geometry_id<multi_polygon_tag> : std::integral_constant<int, 6> {};
0069
0070
0071 template <>
0072 struct geometry_id<geometry_collection_tag> : std::integral_constant<int, 7> {};
0073
0074
0075 template <>
0076 struct geometry_id<segment_tag> : std::integral_constant<int, 92> {};
0077
0078
0079 template <>
0080 struct geometry_id<ring_tag> : std::integral_constant<int, 93> {};
0081
0082
0083 template <>
0084 struct geometry_id<box_tag> : std::integral_constant<int, 94> {};
0085
0086
0087 }
0088 #endif
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101 template <typename Geometry>
0102 struct geometry_id : core_dispatch::geometry_id<typename tag<Geometry>::type>
0103 {};
0104
0105
0106 }}
0107
0108
0109 #endif