File: concept_archetype_2.h

package info (click to toggle)
cgal 3.2.1-2
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 47,752 kB
  • ctags: 72,510
  • sloc: cpp: 397,707; ansic: 10,393; sh: 4,232; makefile: 3,713; perl: 394; sed: 9
file content (244 lines) | stat: -rw-r--r-- 7,688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
// Copyright (c) 1999,2003  Utrecht University (The Netherlands),
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
// and Tel-Aviv University (Israel).  All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.2-branch/Kernel_23/include/CGAL/concept_archetype_2.h $
// $Id: concept_archetype_2.h 28567 2006-02-16 14:30:13Z lsaboret $
// 
//
// Author(s)     : Matthias Baesken

#ifndef CGAL_CONCEPT_ARCHETYPE_2
#define CGAL_CONCEPT_ARCHETYPE_2
 
// 2d CA types (and number types)...

#define CGAL_concept_archetype_constructors(T) \
template<class T1> T(const T1&) { } \
template<class T1,class T2> T(const T1&,const T2&) { } \
template<class T1,class T2,class T3> T(const T1&,const T2&,const T3&) { } \
template<class T1,class T2,class T3,class T4> \
T(const T1&,const T2&,const T3&,const T4&) { } \
template<class T1,class T2,class T3,class T4,class T5> \
T(const T1&,const T2&,const T3&,const T4&,const T5&) { }


CGAL_BEGIN_NAMESPACE

struct Point_2_archetype {
  Point_2_archetype() {  }
  Point_2_archetype(const Point_2_archetype& t) { }
  
  Point_2_archetype& operator=(const Point_2_archetype& t) { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Point_2_archetype)
#endif  
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool operator==(const Point_2_archetype& obj1, 
                       const Point_2_archetype& obj2)
{ return true; }

inline bool operator!=(const Point_2_archetype& obj1, 
                       const Point_2_archetype& obj2)
{ return true; }
#endif

struct Segment_2_archetype {
  Segment_2_archetype() {  }
  Segment_2_archetype(const Segment_2_archetype& t) { }
  
  Segment_2_archetype& operator=(const Segment_2_archetype& t) { return *this;}
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Segment_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool
operator==(const Segment_2_archetype& obj1, const Segment_2_archetype& obj2)
{ return true; }

inline bool
operator!=(const Segment_2_archetype& obj1, const Segment_2_archetype& obj2)
{ return true; }
#endif

struct Line_2_archetype {
  Line_2_archetype() {  }
  Line_2_archetype(const Line_2_archetype& t) { }
  
  Line_2_archetype& operator=(const Line_2_archetype& t) { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Line_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool
operator==(const Line_2_archetype& obj1, const Line_2_archetype& obj2)
{ return true; }

inline bool
operator!=(const Line_2_archetype& obj1, const Line_2_archetype& obj2)
{ return true; }
#endif

struct Ray_2_archetype {
  Ray_2_archetype() {  }
  Ray_2_archetype(const Ray_2_archetype& t) { }
  
  Ray_2_archetype& operator=(const Ray_2_archetype& t) { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Ray_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool
operator==(const Ray_2_archetype& obj1, const Ray_2_archetype& obj2)
{ return true; }

inline bool
operator!=(const Ray_2_archetype& obj1, const Ray_2_archetype& obj2)
{ return true; }
#endif

struct Vector_2_archetype {
  Vector_2_archetype() {  }
  Vector_2_archetype(const Vector_2_archetype& t) { }
  
  Vector_2_archetype& operator=(const Vector_2_archetype& t) { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Vector_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool
operator==(const Vector_2_archetype& obj1, const Vector_2_archetype& obj2)
{ return true; }

inline bool
operator!=(const Vector_2_archetype& obj1, const Vector_2_archetype& obj2)
{ return true; }
#endif

struct Direction_2_archetype {
  Direction_2_archetype() {  }
  Direction_2_archetype(const Direction_2_archetype& t) { }
  
  Direction_2_archetype& operator=(const Direction_2_archetype& t)
  { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Direction_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool operator==(const Direction_2_archetype& obj1, 
                       const Direction_2_archetype& obj2)
{ return true; }

inline bool operator!=(const Direction_2_archetype& obj1, 
                       const Direction_2_archetype& obj2)
{ return true; }
#endif

struct Triangle_2_archetype {
  Triangle_2_archetype() {  }
  Triangle_2_archetype(const Triangle_2_archetype& t) { }
  
  Triangle_2_archetype& operator=(const Triangle_2_archetype& t)
  { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Triangle_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool operator==(const Triangle_2_archetype& obj1, 
                       const Triangle_2_archetype& obj2)
{ return true; }

inline bool operator!=(const Triangle_2_archetype& obj1, 
                       const Triangle_2_archetype& obj2)
{ return true; }
#endif

struct Circle_2_archetype {
  Circle_2_archetype() {  }
  Circle_2_archetype(const Circle_2_archetype& t) { }
  
  Circle_2_archetype& operator=(const Circle_2_archetype& t) { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Circle_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool
operator==(const Circle_2_archetype& obj1, const Circle_2_archetype& obj2)
{ return true; }

inline bool
operator!=(const Circle_2_archetype& obj1, const Circle_2_archetype& obj2)
{ return true; }
#endif

struct Iso_rectangle_2_archetype {
  Iso_rectangle_2_archetype() {  }
  Iso_rectangle_2_archetype(const Iso_rectangle_2_archetype& t) { }
  
  Iso_rectangle_2_archetype& operator=(const Iso_rectangle_2_archetype& t) 
  { return *this; }
  
#if defined(CGAL_CONCEPT_ARCHETYPE_PROVIDE_CONSTRUCTORS)
  CGAL_concept_archetype_constructors(Iso_rectangle_2_archetype)
#endif   
};

#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS)
inline bool operator==(const Iso_rectangle_2_archetype& obj1, 
                       const Iso_rectangle_2_archetype& obj2)
{ return true; }

inline bool operator!=(const Iso_rectangle_2_archetype& obj1, 
                       const Iso_rectangle_2_archetype& obj2)
{ return true; }
#endif

struct Cartesian_coordinate_const_iterator_2_archetype {
  Cartesian_coordinate_const_iterator_2_archetype() { }
  Cartesian_coordinate_const_iterator_2_archetype& 
  operator=(const Cartesian_coordinate_const_iterator_2_archetype&) 
  { return *this; }
};

CGAL_END_NAMESPACE

#undef CGAL_concept_archetype_constructors

#endif