|
BWAPI
|
00001 // Copyright (c) 2003,2004,2005,2006 INRIA Sophia-Antipolis (France) and 00002 // Notre Dame University (U.S.A.). All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under 00005 // the terms of the Q Public License version 1.0. 00006 // See the file LICENSE.QPL distributed with CGAL. 00007 // 00008 // Licensees holding a valid commercial license may use this file in 00009 // accordance with the commercial license agreement provided with the software. 00010 // 00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 // 00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h $ 00015 // $Id: Segment_Delaunay_graph_traits_2.h 40259 2007-09-07 09:52:51Z spion $ 00016 // 00017 // 00018 // Author(s) : Menelaos Karavelas <mkaravel@cse.nd.edu> 00019 00020 00021 00022 #ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_TRAITS_2_H 00023 #define CGAL_SEGMENT_DELAUNAY_GRAPH_TRAITS_2_H 00024 00025 00026 #include <CGAL/Segment_Delaunay_graph_2/basic.h> 00027 00028 #include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h> 00029 00030 #include <CGAL/Filtered_kernel.h> 00031 #include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h> 00032 00033 00034 CGAL_BEGIN_NAMESPACE 00035 00036 //----------------------------------------------------------------------- 00037 // the Traits classes 00038 //----------------------------------------------------------------------- 00039 00040 // this traits class does support intersecting segments 00041 template<class R, class MTag = Field_tag> 00042 struct Segment_Delaunay_graph_traits_2 00043 : public Segment_Delaunay_graph_traits_base_2<R,MTag,Tag_true> {}; 00044 00045 template<class R> 00046 struct Segment_Delaunay_graph_traits_2<R,Field_tag> 00047 : public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true> {}; 00048 00049 00050 // Concept checking 00051 template<class R> 00052 struct Segment_Delaunay_graph_traits_2<R,Integral_domain_without_division_tag> 00053 : public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true> 00054 { 00055 Segment_Delaunay_graph_traits_2() { 00056 THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag 00057 ( R() ); 00058 } 00059 }; 00060 00061 template<class R> 00062 struct Segment_Delaunay_graph_traits_2<R,Euclidean_ring_tag> 00063 : public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true> 00064 { 00065 Segment_Delaunay_graph_traits_2() { 00066 THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag 00067 ( R() ); 00068 } 00069 }; 00070 00071 // Specializations for filtered_kernel 00072 template<class R> 00073 struct Segment_Delaunay_graph_traits_2<Filtered_kernel<R>,Field_tag> 00074 : public 00075 Segment_Delaunay_graph_filtered_traits_2<R,Field_tag, 00076 typename Filtered_kernel<R>::Exact_kernel, 00077 Field_tag, 00078 typename Filtered_kernel<R>::Approximate_kernel, 00079 Field_with_sqrt_tag> 00080 {}; 00081 00082 template<class R> 00083 struct Segment_Delaunay_graph_traits_2<Filtered_kernel<R>,Field_with_sqrt_tag> 00084 : public 00085 Segment_Delaunay_graph_filtered_traits_2<R,Field_with_sqrt_tag, 00086 typename Filtered_kernel<R>::Exact_kernel, 00087 Field_tag, 00088 typename Filtered_kernel<R>::Approximate_kernel, 00089 Field_with_sqrt_tag> 00090 {}; 00091 00092 //========================================================================= 00093 00094 // this traits class does NOT support intersecting segments 00095 template<class R, class MTag = Integral_domain_without_division_tag> 00096 struct Segment_Delaunay_graph_traits_without_intersections_2 00097 : public Segment_Delaunay_graph_traits_base_2<R,MTag,Tag_false> {}; 00098 00099 template<class R> 00100 struct Segment_Delaunay_graph_traits_without_intersections_2<R,Field_tag> 00101 : public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_false> 00102 { 00103 Segment_Delaunay_graph_traits_without_intersections_2() { 00104 THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag 00105 ( R() ); 00106 } 00107 }; 00108 00109 template<class R> 00110 struct 00111 Segment_Delaunay_graph_traits_without_intersections_2<R,Euclidean_ring_tag> 00112 : public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_false> 00113 { 00114 Segment_Delaunay_graph_traits_without_intersections_2() { 00115 THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag 00116 ( R() ); 00117 } 00118 }; 00119 00120 00121 // Specialization for filtered_kernel 00122 template<class R> 00123 struct 00124 Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>, 00125 Integral_domain_without_division_tag> 00126 : public 00127 Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,Integral_domain_without_division_tag, 00128 typename Filtered_kernel<R>::Exact_kernel, 00129 Integral_domain_without_division_tag, 00130 typename Filtered_kernel<R>::Approximate_kernel, 00131 Field_with_sqrt_tag> 00132 {}; 00133 00134 template<class R> 00135 struct 00136 Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>, 00137 Field_with_sqrt_tag> 00138 : public 00139 Segment_Delaunay_graph_filtered_traits_without_intersections_2<R, 00140 Field_with_sqrt_tag, 00141 typename Filtered_kernel<R>::Exact_kernel, 00142 Integral_domain_without_division_tag, 00143 typename Filtered_kernel<R>::Approximate_kernel, 00144 Field_with_sqrt_tag> 00145 {}; 00146 00147 CGAL_END_NAMESPACE 00148 00149 #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_TRAITS_2_H
1.7.6.1