]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/detail/is_simple/always_simple.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / detail / is_simple / always_simple.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2014, Oracle and/or its affiliates.
4
5// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
6
7// Licensed under the Boost Software License version 1.0.
8// http://www.boost.org/users/license.html
9
10#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP
11#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP
12
13#include <boost/geometry/core/tags.hpp>
14
15#include <boost/geometry/algorithms/dispatch/is_simple.hpp>
16
17
18namespace boost { namespace geometry
19{
20
21
22#ifndef DOXYGEN_NO_DETAIL
23namespace detail { namespace is_simple
24{
25
26
27template <typename Geometry>
28struct always_simple
29{
30 static inline bool apply(Geometry const&)
31 {
32 return true;
33 }
34};
35
36
37}} // namespace detail::is_simple
38#endif // DOXYGEN_NO_DETAIL
39
40
41
42
43#ifndef DOXYGEN_NO_DISPATCH
44namespace dispatch
45{
46
47
48// A point is always simple
49template <typename Point>
50struct is_simple<Point, point_tag>
51 : detail::is_simple::always_simple<Point>
52{};
53
54
55// A valid segment is always simple.
56// A segment is a curve.
57// A curve is simple if it does not pass through the same point twice,
58// with the possible exception of its two endpoints
59//
60// Reference: OGC 06-103r4 (6.1.6.1)
61template <typename Segment>
62struct is_simple<Segment, segment_tag>
63 : detail::is_simple::always_simple<Segment>
64{};
65
66
67// A valid box is always simple
68// A box is a Polygon, and it satisfies the conditions for Polygon validity.
69//
70// Reference (for polygon validity): OGC 06-103r4 (6.1.11.1)
71template <typename Box>
72struct is_simple<Box, box_tag>
73 : detail::is_simple::always_simple<Box>
74{};
75
76
77} // namespace dispatch
78#endif // DOXYGEN_NO_DISPATCH
79
80
81}} // namespace boost::geometry
82
83#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_SIMPLE_ALWAYS_SIMPLE_HPP