Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
circulator_bases.h
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Copyright (c) 1997 The CGAL Consortium
4 
5 // This software and related documentation is part of the Computational
6 // Geometry Algorithms Library (CGAL).
7 // This software and documentation is provided "as-is" and without warranty
8 // of any kind. In no event shall the CGAL Consortium be liable for any
9 // damage of any kind.
10 //
11 // Every use of CGAL requires a license.
12 //
13 // Academic research and teaching license
14 // - For academic research and teaching purposes, permission to use and copy
15 // the software and its documentation is hereby granted free of charge,
16 // provided that it is not a component of a commercial product, and this
17 // notice appears in all copies of the software and related documentation.
18 //
19 // Commercial licenses
20 // - A commercial license is available through Algorithmic Solutions, who also
21 // markets LEDA (http://www.algorithmic-solutions.de).
22 // - Commercial users may apply for an evaluation license by writing to
23 // Algorithmic Solutions (contact@algorithmic-solutions.com).
24 //
25 // The CGAL Consortium consists of Utrecht University (The Netherlands),
26 // ETH Zurich (Switzerland), Free University of Berlin (Germany),
27 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
28 // (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
29 // and Tel-Aviv University (Israel).
30 //
31 // ----------------------------------------------------------------------
32 //
33 // release : CGAL-2.2
34 // release_date : 2000, September 30
35 //
36 // file : include/CGAL/circulator_bases.h
37 // package : Circulator (3.15)
38 // chapter : $CGAL_Chapter: Circulators $
39 // source : circulator.fw
40 // revision : $Revision: 1.1.1.1 $
41 // revision_date : $Date: 2001/07/05 22:17:48 $
42 // author(s) : Lutz Kettner
43 //
44 // coordinator : INRIA, Sophia Antipolis
45 //
46 // Base classes and tags to build own circulators.
47 // email : contact@cgal.org
48 // www : http://www.cgal.org
49 //
50 // ======================================================================
51 
52 #ifndef CGAL_CIRCULATOR_BASES_H
53 #define CGAL_CIRCULATOR_BASES_H 1
54 
55 #ifndef CGAL_PROTECT_CSTDDEF
56 #include <cstddef>
57 #define CGAL_PROTECT_CSTDDEF
58 #endif
59 #ifndef CGAL_PROTECT_ITERATOR
60 #include <iterator>
61 #define CGAL_PROTECT_ITERATOR
62 #endif
63 
65 
66 struct Circulator_tag {}; // any circulator.
67 struct Iterator_tag {}; // any iterator.
68 
70  : public CGAL_STD::forward_iterator_tag {};
72  : public CGAL_STD::bidirectional_iterator_tag {};
74  : public CGAL_STD::random_access_iterator_tag {};
75 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
77  typedef T value_type;
78  typedef Dist difference_type;
79  typedef Size size_type;
80  typedef T* pointer;
81  typedef T& reference;
83 };
84 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
86  typedef T value_type;
87  typedef Dist difference_type;
88  typedef Size size_type;
89  typedef T* pointer;
90  typedef T& reference;
92 };
93 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
95  typedef T value_type;
96  typedef Dist difference_type;
97  typedef Size size_type;
98  typedef T* pointer;
99  typedef T& reference;
101 };
102 template < class Category,
103  class T,
104  class Distance = std::ptrdiff_t,
105  class Size = std::size_t,
106  class Pointer = T*,
107  class Reference = T&>
109  typedef Category iterator_category;
110  typedef T value_type;
112  typedef Size size_type;
113  typedef Pointer pointer;
114  typedef Reference reference;
115 };
116 
117 // variant base classes
118 // ---------------------
119 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
120 class Forward_circulator_ptrbase // forward circulator.
121 {
122  protected:
123  void* _ptr;
124  public:
126  typedef T value_type;
127  typedef Dist difference_type;
128  typedef Size size_type;
129  typedef T* pointer;
130  typedef T& reference;
133 };
134 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
135 class Bidirectional_circulator_ptrbase // bidirectional circulator.
136 {
137  protected:
138  void* _ptr;
139  public:
141  typedef T value_type;
142  typedef Dist difference_type;
143  typedef Size size_type;
144  typedef T* pointer;
145  typedef T& reference;
148 };
149 template <class T, class Dist = std::ptrdiff_t, class Size = std::size_t>
150 class Random_access_circulator_ptrbase // random access circulator.
151 {
152  protected:
153  void* _ptr;
154  public:
156  typedef T value_type;
157  typedef Dist difference_type;
158  typedef Size size_type;
159  typedef T* pointer;
160  typedef T& reference;
163 };
164 
166 
167 #endif // CGAL_CIRCULATOR_BASES_H //
168 // EOF //
Forward_circulator_tag iterator_category
Bidirectional_circulator_tag iterator_category
Distance difference_type
Random_access_circulator_tag iterator_category
Forward_circulator_tag iterator_category
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
Bidirectional_circulator_tag iterator_category
double Distance(const CPoint &p, const CLine &l)
Definition: GeoPrimitives.C:35
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
Category iterator_category
Random_access_circulator_tag iterator_category