52 #ifndef CGAL_CIRCULATOR_H
53 #define CGAL_CIRCULATOR_H 1
56 #include <CGAL/basic.h>
58 #ifndef CGAL_PROTECT_CSTDDEF
60 #define CGAL_PROTECT_CSTDDEF
62 #ifndef CGAL_PROTECT_FUNCTIONAL
64 #define CGAL_PROTECT_FUNCTIONAL
66 #ifndef CGAL_PROTECT_ITERATOR
68 #define CGAL_PROTECT_ITERATOR
70 #ifndef CGAL_CIRCULATOR_BASES_H
74 #ifndef CGAL_NULL_TYPE
75 #if defined( __GNUG__ )
77 #define CGAL_NULL_TYPE const void*
78 #define CGAL_CIRC_NULL 0
80 #define CGAL_NULL_TYPE int
81 #define CGAL_CIRC_NULL NULL
83 #endif // CGAL_NULL_TYPE //
88 #define Forward_container_from_circulator \
89 Container_from_circulator
90 #define Bidirectional_container_from_circulator \
91 Container_from_circulator
92 #define Random_access_container_from_circulator \
93 Container_from_circulator
95 #define Forward_circulator_from_iterator \
96 Circulator_from_iterator
97 #define Forward_const_circulator_from_iterator \
98 Circulator_from_iterator
99 #define Bidirectional_circulator_from_iterator \
100 Circulator_from_iterator
101 #define Bidirectional_const_circulator_from_iterator \
102 Circulator_from_iterator
103 #define Random_access_circulator_from_iterator \
104 Circulator_from_iterator
105 #define Random_access_const_circulator_from_iterator \
106 Circulator_from_iterator
108 #define Forward_circulator_from_container \
109 Circulator_from_container
110 #define Bidirectional_circulator_from_container \
111 Circulator_from_container
112 #define Random_access_circulator_from_container \
113 Circulator_from_container
115 #define Forward_const_circulator_from_container \
116 Const_circulator_from_container
117 #define Bidirectional_const_circulator_from_container \
118 Const_circulator_from_container
119 #define Random_access_const_circulator_from_container \
120 Const_circulator_from_container
151 template <
class Tag,
class IC>
155 #ifndef CGAL_CFG_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
168 #endif // CGAL_CFG_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION //
170 template <
class CCtg>
189 template <
class ICtg>
209 typedef typename traits::iterator_category
ICAT;
229 #ifndef CGAL_ASSERT_COMPILE_TIME_TAG
230 #define CGAL_ASSERT_COMPILE_TIME_TAG 1
231 template <
class Base>
235 template<
class Tag,
class Derived>
242 template <
class C>
inline
246 template <
class I>
inline
250 template <
class I>
inline
254 std::iterator_traits<I>::iterator_category());
256 template <
class I>
inline
260 std::iterator_traits<I>::iterator_category());
262 template <
class IC>
inline
266 std::iterator_traits<IC>::iterator_category());
268 template <
class IC>
inline
272 std::iterator_traits<IC>::iterator_category());
275 template <
class IC>
inline
279 std::iterator_traits<IC>::iterator_category());
287 std::input_iterator_tag){}
289 std::forward_iterator_tag){}
291 std::bidirectional_iterator_tag){}
293 std::random_access_iterator_tag){}
296 std::output_iterator_tag){}
298 std::forward_iterator_tag){}
300 std::bidirectional_iterator_tag){}
302 std::random_access_iterator_tag){}
305 std::forward_iterator_tag){}
307 std::bidirectional_iterator_tag){}
309 std::random_access_iterator_tag){}
312 std::bidirectional_iterator_tag){}
314 std::random_access_iterator_tag){}
317 std::random_access_iterator_tag){}
320 template <
class I>
inline
324 std::iterator_traits<I>::iterator_category());
326 template <
class I>
inline
330 std::iterator_traits<I>::iterator_category());
332 template <
class IC>
inline
336 std::iterator_traits<IC>::iterator_category());
338 template <
class IC>
inline
342 std::iterator_traits<IC>::iterator_category());
344 template <
class IC>
inline
348 std::iterator_traits<IC>::iterator_category());
351 template<
class C>
inline
356 template<
class I>
inline
361 template<
class IC>
inline
382 template<
class IC>
inline
389 #define CGAL_For_all( ic1, ic2) \
390 for ( bool _circ_loop_flag = ! ::CGAL::is_empty_range( ic1, ic2); \
392 _circ_loop_flag = ((++ic1) != (ic2)) )
394 #define CGAL_For_all_backwards( ic1, ic2) \
395 for ( bool _circ_loop_flag = ! ::CGAL::is_empty_range( ic1, ic2); \
397 _circ_loop_flag = ((ic1) != (--ic2)) )
401 template <
class C>
inline
402 typename C::size_type
406 typedef typename C::size_type size_type;
416 typename C::size_type
421 typedef typename C::size_type size_type;
430 template <
class C>
inline
431 typename C::size_type
435 template <
class C>
inline
436 typename C::size_type
441 template <
class C>
inline
442 typename C::size_type
446 std::iterator_traits<C>::iterator_category());
449 typename C::difference_type
454 typedef typename C::difference_type difference_type;
455 difference_type
n = 0;
461 template <
class C>
inline
462 typename C::difference_type
467 template <
class C>
inline
468 typename C::difference_type
471 typedef typename C::difference_type difference_type;
472 typedef typename C::size_type size_type;
476 c.min_circulator()))) - (c-d);
479 template <
class C>
inline
480 typename C::difference_type
484 std::iterator_traits<C>::iterator_category());
486 template <
class C>
inline
487 typename std::iterator_traits<C>::difference_type
492 template <
class I>
inline
493 typename std::iterator_traits<I>::difference_type
495 return std::distance( i1, i2);
498 template <
class IC>
inline
499 typename std::iterator_traits<IC>::difference_type
504 template <
class C>
inline
508 template <
class C>
inline
512 template <
class C>
inline
514 return c.min_circulator();
516 template <
class C>
inline
520 std::iterator_traits<C>::iterator_category());
522 template<
class I,
class U>
inline
529 n = - (( - n - 1) % m) + m - 1;
537 template <
class C,
class Ref,
class Ptr>
574 template <
class CC,
class CREF,
class CPTR>
588 return !(*
this ==
i);
598 return Ptr(
current.operator->());
666 return tmp.operator*();
687 template <
class Dist,
class C,
class Ref,
class Ptr>
695 template <
class C,
class Ref,
class Ptr>
696 typename C::difference_type
704 return (current - *m_anchor) - (i.
current - *m_anchor)
707 return (current - *m_anchor) - (i.
current - *m_anchor);
709 #endif // _MSC_VER //
731 typedef C Circulator;
767 template <
class Ctnr>
781 typedef std::iterator_traits<iterator>
ITraits;
808 return (
ctnr == NULL) || (
ctnr->begin() ==
ctnr->end());
821 return i.operator->();
827 if ( i ==
ctnr->end())
839 if ( i ==
ctnr->begin())
855 typename Ctnr::difference_type
j = i -
ctnr->begin();
856 typename Ctnr::difference_type size =
ctnr->size();
862 i =
ctnr->begin() +
j;
890 template <
class Ctnr>
900 template <
class Ctnr>
906 typename Ctnr::difference_type j = i - ctnr->begin();
907 typename Ctnr::difference_type size = ctnr->size();
913 i = ctnr->begin() +
j;
916 #endif // _MSC_VER //
919 template <
class Ctnr>
934 typedef std::iterator_traits<const_iterator>
ITraits;
948 :
ctnr(c), i(c->begin()) {}
965 return (
ctnr == NULL) || (
ctnr->begin() ==
ctnr->end());
978 return i.operator->();
984 if ( i ==
ctnr->end())
996 if ( i ==
ctnr->begin())
1012 typename Ctnr::difference_type j = i -
ctnr->begin();
1013 typename Ctnr::difference_type size =
ctnr->size();
1019 i =
ctnr->begin() +
j;
1047 template <
class Ctnr>
1058 template <
class Ctnr>
1064 typename Ctnr::difference_type j = i - ctnr->begin();
1065 typename Ctnr::difference_type size = ctnr->size();
1071 i = ctnr->begin() +
j;
1077 template <
class I,
class TT =
int,
class SS =
int,
class DD =
int>
1084 typedef std::iterator_traits<iterator>
Traits;
1116 template <
class II,
class A1,
class A2,
class A3>
1195 return tmp.operator*();
1203 template <
class D,
class I,
class T,
class Size,
class Dist>
inline
1209 return tmp += Dist(n);
1214 #endif // CGAL_CIRCULATOR_H //
Self operator+(difference_type n) const
bool operator==(const Self &c) const
Const_circulator_from_container(const Mutable &c)
CTraits::iterator_category iterator_category
Ic_traits::iterator_category iterator_category
std::iterator_traits< iterator > ITraits
#define CGAL_assertion(EX)
Random_access_circulator_tag iterator_category
Self operator-(difference_type n) const
Self operator+(difference_type n) const
difference_type operator-(const Self &i) const
bool operator==(const Self &i) const
Circulator current_circulator() const
Ctnr::reference reference
I_Circulator_traits< ICAT > C_traits
C::difference_type difference_type
Ci_traits::iterator_category circulator_category
bool operator!=(CGAL_NULL_TYPE p) const
Ctnr::const_reference reference
iterator current_iterator() const
Self & operator-=(difference_type n)
Ctnr::size_type size_type
Self & operator+=(difference_type n)
void Assert_is_at_least_forward_category(const IC &ic)
void Assert_output_category(const I &i)
bool operator==(const Self &c) const
traits::iterator_category ICAT
void Assert_is_at_least_output_category(const I &i)
Self & operator-=(difference_type n)
C::difference_type difference_type
std::iterator_traits< IC >::difference_type iterator_distance(const IC &ic1, const IC &ic2)
std::iterator_traits< C > traits
bool operator==(CGAL_NULL_TYPE p) const
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
Bidirectional_circulator_tag iterator_category
pointer operator->() const
std::iterator_traits< const_iterator > ITraits
Iterator_from_circulator< C, Ref, Ptr > operator+(Dist n, const Iterator_from_circulator< C, Ref, Ptr > &circ)
bool is_empty_range(const IC &ic1, const IC &ic2)
Iterator_from_circulator< C, reference, pointer > iterator
ITraits::iterator_category Icategory
bool operator==(const Self &c) const
Ctnr::const_iterator const_iterator
bool operator!=(const Self &c) const
C::difference_type I_circulator_distance(C c, const C &d, Forward_circulator_tag)
bool operator>=(const Self &i) const
Container_from_circulator()
I_Circulator_from_iterator_traits< Icategory > CTraits
Const_circulator_from_container< Ctnr > Self
Self & operator+=(difference_type n)
C get_min_circulator(C c)
Circulator_from_container()
Self operator+(difference_type n) const
void Assert_bidirectional_category(const IC &ic)
bool operator==(CGAL_NULL_TYPE p) const
Traits::iterator_category Icategory
C I_get_min_circulator(C c, Forward_circulator_tag)
bool operator!=(CGAL_NULL_TYPE p) const
std::iterator_traits< iterator > Traits
Circulator_or_iterator_tag check_circulator_or_iterator(Circulator_tag)
CTraits::iterator_category iterator_category
Circulator_from_iterator< I, TT, SS, DD > Self
Iterator_from_circulator< C, const_reference, const_pointer > const_iterator
void I_Has_to_be_at_least(std::input_iterator_tag, std::input_iterator_tag)
Self min_circulator() const
pointer operator->() const
Self min_circulator() const
I_Iterator_from_circulator_traits< ICAT > Ic_traits
Self operator-(difference_type n) const
Self min_circulator() const
Circulator_traits< C >::category query_circulator_or_iterator(const C &)
Self operator+(difference_type n) const
bool operator!=(const Self &c) const
reference operator[](difference_type n) const
void Assert_iterator(const I &i)
#define CGAL_TEMPLATE_NULL
bool operator<(const Self &i) const
std::forward_iterator_tag iterator_category
#define CGAL_precondition(EX)
Ctnr::difference_type difference_type
C::size_type I_circulator_size(const C &c, Forward_circulator_tag)
Circulator_from_container< Ctnr > Mutable
Traits::difference_type difference_type
reference operator*() const
bool operator!=(CGAL_NULL_TYPE p) const
const_iterator end() const
std::iterator_traits< C > I_traits
void Assert_circulator_or_iterator(const IC &ic)
Circulator_from_container(Ctnr *c)
Iterator_from_circulator(const Iterator_from_circulator< CC, CREF, CPTR > &c)
I__traits::iterator_category iterator_category
bool operator!=(const Self &c) const
Self operator-(difference_type n) const
Ctnr::value_type value_type
void Assert_random_access_category(const IC &ic)
difference_type operator-(const Self &c) const
Self & operator+=(difference_type n)
reference operator[](difference_type n) const
Self & operator-=(difference_type n)
Self & operator-=(difference_type n)
const value_type * const_pointer
const value_type * pointer
Const_circulator_from_container(const Ctnr *c, const_iterator j)
void Assert_forward_category(const IC &ic)
CTraits::iterator_category iterator_category
Ctnr::value_type value_type
Ctnr::difference_type difference_type
I_Circulator_from_iterator_traits< Icategory > CTraits
Self operator-(difference_type n) const
std::random_access_iterator_tag iterator_category
void Assert_is_at_least_random_access_category(const IC &ic)
Const_circulator_from_container()
Circulator_from_iterator()
C_traits::category category
bool operator==(CGAL_NULL_TYPE p) const
C::difference_type circulator_distance(const C &c, const C &d)
void Assert_input_category(const I &i)
Traits::value_type value_type
I non_negative_mod(I n, U m)
difference_type operator-(const Self &c) const
bool operator>(const Self &i) const
Self & operator=(const Self &c)
void Assert_compile_time_tag(const Tag &, const Derived &b)
std::bidirectional_iterator_tag iterator_category
Circulator_from_iterator(const I &bgn, const I &end, const I &cur)
void Assert_is_at_least_input_category(const I &i)
Traits::reference reference
C::size_type I_min_circulator_size(const C &c)
reference operator[](difference_type n) const
Ref operator[](difference_type n) const
Circulator_from_iterator(const I &bgn, const I &end)
Circulator_from_iterator(const Self &c, const I &cur)
void Assert_is_at_least_bidirectional_category(const IC &ic)
Self & operator=(const Self &c)
Iterator_from_circulator(const C *circ, int n)
std::iterator_traits< C >::difference_type I_iterator_distance(const C &c1, const C &c2, Circulator_tag)
void match_compile_time_tag(const Base &) const
I_Circulator_from_iterator_traits< ICAT > Ci_traits
Circulator_from_container(Ctnr *c, iterator j)
ITraits::iterator_category Icategory
I_Circulator_from_iterator_traits< Icategory > CTraits
Circulator_from_iterator(const Circulator_from_iterator< II, A1, A2, A3 > &ii)
#define CGAL_BEGIN_NAMESPACE
bool I_is_empty_range(const C &c1, const C &, Circulator_tag)
#define CGAL_postcondition(EX)
pointer operator->() const
Iterator_from_circulator()
void Assert_circulator(const C &c)
Forward_circulator_tag iterator_category
Iterator_from_circulator< C, Ref, Ptr > Self
iterator current_iterator() const
I_traits::iterator_category I_Iter_cat
Const_circulator_from_container(const Ctnr *c)
const_iterator current_iterator() const
bool operator<=(const Self &i) const
const_iterator begin() const
Self & operator+=(difference_type n)
#define CGAL_END_NAMESPACE
bool operator!=(const Self &i) const
const Ctnr * container() const
const value_type & const_reference
I_Iterator_from_circulator_traits< I_Iter_cat > I__traits
Circulator_from_container< Ctnr > Self
reference operator*() const
Ctnr::size_type size_type
C::size_type circulator_size(const C &c)
reference operator*() const