Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Circulator_from_iterator< I, TT, SS, DD > Class Template Reference

#include <circulator.h>

Public Types

typedef
Circulator_from_iterator< I,
TT, SS, DD > 
Self
 
typedef I iterator
 
typedef std::iterator_traits
< iterator
Traits
 
typedef Traits::value_type value_type
 
typedef std::size_t size_type
 
typedef Traits::difference_type difference_type
 
typedef Traits::reference reference
 
typedef Traits::pointer pointer
 
typedef Traits::iterator_category Icategory
 
typedef
I_Circulator_from_iterator_traits
< Icategory
CTraits
 
typedef CTraits::iterator_category iterator_category
 

Public Member Functions

 Circulator_from_iterator ()
 
 Circulator_from_iterator (const I &bgn, const I &end)
 
 Circulator_from_iterator (const I &bgn, const I &end, const I &cur)
 
 Circulator_from_iterator (const Self &c, const I &cur)
 
template<class II , class A1 , class A2 , class A3 >
 Circulator_from_iterator (const Circulator_from_iterator< II, A1, A2, A3 > &ii)
 
bool operator== (CGAL_NULL_TYPE p) const
 
bool operator!= (CGAL_NULL_TYPE p) const
 
bool operator== (const Self &c) const
 
bool operator!= (const Self &c) const
 
reference operator* () const
 
pointer operator-> () const
 
Selfoperator++ ()
 
Self operator++ (int)
 
Selfoperator-- ()
 
Self operator-- (int)
 
Selfoperator+= (difference_type n)
 
Self operator+ (difference_type n) const
 
Selfoperator-= (difference_type n)
 
Self operator- (difference_type n) const
 
difference_type operator- (const Self &i) const
 
reference operator[] (difference_type n) const
 
iterator begin () const
 
iterator end () const
 
iterator current_iterator () const
 
Self min_circulator () const
 

Private Attributes

m_begin
 
m_end
 
current
 

Detailed Description

template<class I, class TT = int, class SS = int, class DD = int>
class Circulator_from_iterator< I, TT, SS, DD >

Definition at line 1078 of file circulator.h.

Member Typedef Documentation

typedef Traits::difference_type difference_type

Definition at line 1088 of file circulator.h.

typedef Traits::iterator_category Icategory

Definition at line 1092 of file circulator.h.

typedef I iterator

Definition at line 1083 of file circulator.h.

Definition at line 1094 of file circulator.h.

typedef Traits::pointer pointer

Definition at line 1090 of file circulator.h.

typedef Traits::reference reference

Definition at line 1089 of file circulator.h.

typedef Circulator_from_iterator<I,TT,SS,DD> Self

Definition at line 1082 of file circulator.h.

typedef std::size_t size_type

Definition at line 1087 of file circulator.h.

typedef std::iterator_traits<iterator> Traits

Definition at line 1084 of file circulator.h.

typedef Traits::value_type value_type

Definition at line 1086 of file circulator.h.

Constructor & Destructor Documentation

Definition at line 1104 of file circulator.h.

Circulator_from_iterator ( const I &  bgn,
const I &  end 
)
inline

Definition at line 1106 of file circulator.h.

Circulator_from_iterator ( const I &  bgn,
const I &  end,
const I &  cur 
)
inline

Definition at line 1109 of file circulator.h.

Circulator_from_iterator ( const Self c,
const I &  cur 
)
inline

Definition at line 1112 of file circulator.h.

Circulator_from_iterator ( const Circulator_from_iterator< II, A1, A2, A3 > &  ii)
inline

Definition at line 1119 of file circulator.h.

Member Function Documentation

iterator begin ( ) const
inline

Definition at line 1197 of file circulator.h.

References Circulator_from_iterator< I, TT, SS, DD >::m_begin.

1197 { return m_begin;}
iterator current_iterator ( ) const
inline

Definition at line 1199 of file circulator.h.

References Circulator_from_iterator< I, TT, SS, DD >::current.

1199 { return current;}
iterator end ( ) const
inline

Definition at line 1198 of file circulator.h.

References Circulator_from_iterator< I, TT, SS, DD >::m_end.

1198 { return m_end;}
Self min_circulator ( ) const
inline
bool operator!= ( CGAL_NULL_TYPE  p) const
inline

Definition at line 1132 of file circulator.h.

1132 { return !(*this == p); }
bool operator!= ( const Self c) const
inline

Definition at line 1134 of file circulator.h.

1134 { return !(*this == c); }
reference operator* ( ) const
inline
Self operator+ ( difference_type  n) const
inline

Definition at line 1179 of file circulator.h.

References n.

1179  {
1180  Self tmp = *this;
1181  return tmp += n;
1182  }
Circulator_from_iterator< I, TT, SS, DD > Self
Definition: circulator.h:1082
const NT & n
Self operator++ ( int  )
inline

Definition at line 1150 of file circulator.h.

1150  {
1151  Self tmp= *this;
1152  ++*this;
1153  return tmp;
1154  }
Circulator_from_iterator< I, TT, SS, DD > Self
Definition: circulator.h:1082
Self& operator+= ( difference_type  n)
inline

Definition at line 1167 of file circulator.h.

References CGAL_assertion, Circulator_from_iterator< I, TT, SS, DD >::current, i, Circulator_from_iterator< I, TT, SS, DD >::m_begin, Circulator_from_iterator< I, TT, SS, DD >::m_end, and non_negative_mod().

Referenced by Circulator_from_iterator< I, TT, SS, DD >::operator-=().

1167  {
1170  difference_type size = m_end - m_begin;
1171  CGAL_assertion( i >= 0);
1172  CGAL_assertion( size >= 0);
1173  i = non_negative_mod( i + n, size);
1174  CGAL_assertion( i >= 0);
1175  CGAL_assertion( i < size);
1176  current = m_begin + i;
1177  return *this;
1178  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Traits::difference_type difference_type
Definition: circulator.h:1088
blockLoc i
Definition: read.cpp:79
const NT & n
I non_negative_mod(I n, U m)
Definition: circulator.h:523

Here is the call graph for this function:

Here is the caller graph for this function:

Self operator- ( difference_type  n) const
inline

Definition at line 1184 of file circulator.h.

References n.

1184  {
1185  Self tmp = *this;
1186  return tmp += -n;
1187  }
Circulator_from_iterator< I, TT, SS, DD > Self
Definition: circulator.h:1082
const NT & n
difference_type operator- ( const Self i) const
inline
Self operator-- ( int  )
inline

Definition at line 1162 of file circulator.h.

1162  {
1163  Self tmp = *this;
1164  --*this;
1165  return tmp;
1166  }
Circulator_from_iterator< I, TT, SS, DD > Self
Definition: circulator.h:1082
Self& operator-= ( difference_type  n)
inline

Definition at line 1183 of file circulator.h.

References Circulator_from_iterator< I, TT, SS, DD >::operator+=().

1183 { return operator+=( -n); }
Self & operator+=(difference_type n)
Definition: circulator.h:1167
const NT & n

Here is the call graph for this function:

pointer operator-> ( ) const
inline

Definition at line 1139 of file circulator.h.

References CGAL_assertion, Circulator_from_iterator< I, TT, SS, DD >::current, and Circulator_from_iterator< I, TT, SS, DD >::m_end.

1139  {
1141  return &(*current);
1142  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
bool operator== ( const Self c) const
inline

Definition at line 1133 of file circulator.h.

References Circulator_from_iterator< I, TT, SS, DD >::current.

1133 { return current == c.current;}
reference operator[] ( difference_type  n) const
inline

Definition at line 1192 of file circulator.h.

References n.

1192  {
1193  Self tmp = *this;
1194  tmp += n;
1195  return tmp.operator*();
1196  }
Circulator_from_iterator< I, TT, SS, DD > Self
Definition: circulator.h:1082
const NT & n

Member Data Documentation


The documentation for this class was generated from the following file: